receiveList.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <template>
  2. <view class="qbox adffc">
  3. <view class="list" v-if="list.length">
  4. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  5. <up-list-item class="list-item" v-for="(item, index) in list" :key="index">
  6. <view @click.prevent="showDialog(item)">
  7. <view class="status adf" :class="{'dwc':item.status===0,'ywc':item.status===1}">
  8. <image :src="imgBase+'questionnaire_icon_dwc.png'" v-if="item.status===0"></image>
  9. <image :src="imgBase+'questionnaire_icon_ywc.png'" v-else-if="item.status===1"></image>
  10. <text>{{item.status===0?'待完成':item.status===1?'':''}}</text>
  11. </view>
  12. <image class="expand" :src="imgBase+'questionnaire_icon_down.png'"></image>
  13. <view class="title">{{item.title||''}}</view>
  14. <view class="name">团队名称:{{item.teamName||''}}</view>
  15. <view class="bottom adfacjb">
  16. <view class="bottom-left">截止时间:{{item.endTime}}</view>
  17. <view class="bottom-right" v-if="item.status===0" @click.stop="showNotice(item)">立即作答</view>
  18. <view class="bottom-right" v-else-if="item.status===1" @click.stop="reviewReport(item)">查看报告</view>
  19. </view>
  20. </view>
  21. </up-list-item>
  22. </up-list>
  23. </view>
  24. <view class="empty" v-else>
  25. <page-empty></page-empty>
  26. </view>
  27. <view class="dialog adffc" v-if="show">
  28. <view class="dbox">
  29. <view class="dbox-top adfacjb">
  30. <view class="dbox-top-title">{{dto.title||''}}</view>
  31. <image class="dbox-top-expand" :src="imgBase+'questionnaire_icon_down.png'" @click="show=false"></image>
  32. </view>
  33. <view class="dbox-name">团队名称:{{ dto.teamName || '' }}</view>
  34. <!-- <view class="dbox-status adfac" :class="{'dwc':dto.status===0,'ywc':dto.status===1}">
  35. <image :src="imgBase+'questionnaire_icon_dwc.png'" v-if="dto.status===0"></image>
  36. <image :src="imgBase+'questionnaire_icon_ywc.png'" v-else-if="dto.status===1"></image>
  37. <text>{{dto.status===0?'待完成':dto.status===1?'已完成':''}}</text>
  38. </view> -->
  39. <view class="dbox-menu adf">
  40. <view class="dbox-menu-pre adffcac" v-for="(item,index) in menuList" :key="index" @click="handleMenuClick(index)">
  41. <template v-if="item.text === '分享问卷'">
  42. <button class="share-btn" open-type="share">
  43. <image :src="item.img"></image>
  44. <text>{{ item.text }}</text>
  45. </button>
  46. </template>
  47. <template v-else>
  48. <image :src="item.img"></image>
  49. <text>{{ item.text }}</text>
  50. </template>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <cus-notice title="问卷答题说明" :show="noticeShow" :content="noticeContent"
  56. @close="noticeShow=false" @handleKnow="handleKnow"></cus-notice>
  57. <cus-team-info :show="teamInfoShow" :teamInfo="teamInfo" @close="teamInfoShow=false"></cus-team-info>
  58. <cus-team-user :canEdit="false" :show="teamUserShow" :list="teamUserList" @close="teamUserShow=false"></cus-team-user>
  59. </view>
  60. </template>
  61. <script>
  62. import CusNotice from '@/components/CusNotice/index.vue'
  63. import CusTeamUser from '@/components/CusTeamUser/index.vue'
  64. import CusTeamInfo from '@/components/CusTeamInfo/index.vue'
  65. import PageEmpty from '@/components/pageEmpty/index.vue'
  66. export default {
  67. components:{ CusNotice, CusTeamUser, CusTeamInfo, PageEmpty },
  68. props:{
  69. list:{
  70. typeof:Array,
  71. default:[]
  72. }
  73. },
  74. data(){
  75. return {
  76. show:false,
  77. noticeShow:false,
  78. teamInfoShow:false,
  79. teamUserShow:false,
  80. dto:null,
  81. menuList:[
  82. {
  83. img:this.$imgBase+'questionnaire_users.png',
  84. text:'团队成员'
  85. },
  86. {
  87. img:this.$imgBase+'questionnaire_share.png',
  88. text:'分享问卷'
  89. },
  90. {
  91. img:this.$imgBase+'questionnaire_info.png',
  92. text:'团队信息'
  93. },
  94. {
  95. img:this.$imgBase+'questionnaire_report.png',
  96. text:'查看报告'
  97. }
  98. ],
  99. categoryData:[],
  100. teamScaleData:[],
  101. teamLevelData:[],
  102. teamUserList:[],
  103. teamInfo:null,
  104. noticeContent:`Transcend International PERILL Assessment is designed to provide insight into the key factors that underpin high value-creating team. It consists of six elements, focusing on Purpose & Motivation, External Systems and Processes, Relationships, Internal Systems and Processes, Learning Processes, Leadership Qualities and Behaviours.<br>
  105. 创衡国际PERILL团队发展动态评估旨在深入了解支撑高价值团队的关键因素。这些关键因素涵盖六个维度:宗旨和动机、外部流程/系统和结构、人际关系、外部流程/系统和结构、学习、领导力。
  106. <br><br>
  107. All information will be kept confidential.<br>
  108. 您所填写的所有信息将被保密的。<br>
  109.  <br>
  110. The following 36 statements describe the ideal state of a team. Please score the actual performance of the team being tested on each statement from two perspectives:<br>
  111. 以下36个陈述是对团队理想状态的描述,请您对受测团队当下在每项描述上所呈现的实际表现从两个角度进行打分:<br>
  112. <br>
  113. 1. Agreement: There are 5 levels ranging from 1 to 5. Score of 5 if you completely agree that the team has reached the statement. Score of 1 if you completely disagree.<br>
  114. 1、同意度:1-5分共5个等级,假如您完全同意该团队当下达到了所描述的状态为5分,假如您完全不同意该团队当下达到了所描述的状态为1分<br>
  115. 2. Importance: There are 5 levels ranging from 1 to 5. Score of 5 if you believe that the statement is extremely significant for the team at this moment. Score of 1 if you believe it is very insignificant.<br>
  116. 2、重要性:1-5分共5个等级,假如您认为所描述的状态对该团队当下非常重要为5分,假如您认为所描述的状态对该团队当下非常不重要为1分<br>
  117.  <br>
  118. Completing these questions should take approximately 10-15 minutes. If you have any questions, please feel free to contact Transcend by Wecom.
  119. 完成这个问卷调查大约需要8-10分钟。如有任何疑问,欢迎添加大衡同学企业微信联系。
  120. `
  121. }
  122. },
  123. methods:{
  124. scrolltolower(){
  125. this.$emit('scrolltolower')
  126. },
  127. showDialog(item){
  128. this.dto = item;
  129. this.show = true;
  130. this.$emit('showDialogFn',item);
  131. },
  132. showNotice(item){
  133. this.dto = item;
  134. this.noticeShow = true;
  135. },
  136. async getUserCategoryData(){
  137. return new Promise((resolve,reject)=>{
  138. this.$api.get('/getListByType/UserCategory').then(({data:res})=>{
  139. if(res.code!==0) return this.$showToast(res.msg)
  140. this.categoryData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  141. resolve()
  142. })
  143. })
  144. },
  145. async handleMenuClick(type){
  146. if(type===0){
  147. await this.getUserCategoryData()
  148. this.$api.get(`/core/member/listByQueTeamId/${this.dto.teamQuestionnaireId}`).then(({data:res})=>{
  149. if(res.code!==0) return this.$showToast(res.msg)
  150. this.teamUserList = res.data;
  151. this.originTeamUserList = res.data;
  152. this.teamUserList.forEach(l=>{
  153. l.categoryName = this.categoryData.find(c=>c.id==l.category)?.name;
  154. })
  155. this.teamUserShow = true
  156. })
  157. } else if(type===2){
  158. this.showTeamInfo()
  159. } else if(type===3){
  160. let url = '/pagesHome/pdf';
  161. if(this.dto.type==2) url = '/pagesHome/pdfZyb'
  162. uni.navigateTo({ url })
  163. }
  164. },
  165. reviewReport(item){
  166. let url = '/pagesHome/pdf';
  167. if(item.type==2) url = '/pagesHome/pdfZyb'
  168. uni.navigateTo({ url })
  169. },
  170. handleKnow(){
  171. uni.navigateTo({
  172. url:'/pagesPublish/questionnaireFill?teamQuestionnaireId='+this.dto.teamQuestionnaireId+'&teamId='+this.dto.teamId+'&type='+this.dto.type+'&turnType=questionnaire'
  173. })
  174. },
  175. async getTeamScaleData(){
  176. return new Promise((resolve,reject)=>{
  177. this.$api.get('/getListByType/team_scale').then(({data:res})=>{
  178. if(res.code!==0) return this.$showToast(res.msg)
  179. this.teamScaleData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  180. resolve()
  181. })
  182. })
  183. },
  184. async getTeamHierarchyData(){
  185. return new Promise((resolve,reject)=>{
  186. this.$api.get('/getListByType/team_hierarchy').then(({data:res})=>{
  187. if(res.code!==0) return this.$showToast(res.msg)
  188. this.teamLevelData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  189. resolve()
  190. })
  191. })
  192. },
  193. async showTeamInfo(){
  194. await this.getTeamScaleData()
  195. await this.getTeamHierarchyData()
  196. this.$api.get(`/core/user/team/${this.dto.teamId}`).then(({data:res})=>{
  197. if(res.code!==0) return this.$showToast(res.msg)
  198. this.teamInfo = res.data;
  199. this.teamInfo.functionsName = res.data.functions.map(f=>f.functionName).join('、');
  200. this.teamInfo.organizationsName = res.data.organizations.map(f=>f.orgName).join('、');
  201. this.teamInfo.address = res.data.provinceName+res.data.cityName;
  202. this.teamInfo.scaleName = this.teamScaleData.find(d=>d.id==res.data.scale).name;
  203. this.teamInfo.hierarchyName = this.teamLevelData.find(d=>d.id==res.data.hierarchy).name;
  204. this.teamInfoShow = true;
  205. })
  206. }
  207. }
  208. }
  209. </script>
  210. <style scoped lang="scss">
  211. .share-btn {
  212. background-color: transparent;
  213. border: none;
  214. padding: 0;
  215. margin: 0;
  216. line-height: 1;
  217. display: flex;
  218. flex-direction: column;
  219. justify-content: center;
  220. align-items: center;
  221. &::after {
  222. border: none;
  223. }
  224. }
  225. .qbox{
  226. width: 100%;
  227. height: 100%;
  228. flex: 1;
  229. .list{
  230. flex: 1;
  231. margin-top: 20rpx;
  232. overflow: hidden;
  233. &-item{
  234. width: 100%;
  235. background: #FFFFFF;
  236. border-radius: 24rpx;
  237. margin-top: 20rpx;
  238. padding: 99rpx 24rpx 19rpx;
  239. box-sizing: border-box;
  240. position: relative;
  241. display: block;
  242. .status{
  243. width: 164rpx;
  244. height: 80rpx;
  245. padding: 14rpx 0 0 15rpx;
  246. box-sizing: border-box;
  247. position: absolute;
  248. left: 0;
  249. top: 0;
  250. image{
  251. width: 26rpx;
  252. height: 26rpx;
  253. }
  254. text{
  255. font-family: PingFangSC, PingFang SC;
  256. font-weight: 400;
  257. font-size: 24rpx;
  258. color: #FFFFFF;
  259. line-height: 30rpx;
  260. margin-left: 12rpx;
  261. }
  262. &.dwc{
  263. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/questionnaire_dwc.png') no-repeat;
  264. background-size: 100% 100%;
  265. text{
  266. color: #193D59;
  267. }
  268. }
  269. &.ywc{
  270. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/questionnaire_ywc.png') no-repeat;
  271. background-size: 100% 100%;
  272. }
  273. }
  274. .expand{
  275. width: 32rpx;
  276. height: 32rpx;
  277. position: absolute;
  278. top: 24rpx;
  279. right: 32rpx;
  280. }
  281. .title{
  282. font-family: PingFang-SC, PingFang-SC;
  283. font-weight: bold;
  284. font-size: 32rpx;
  285. color: #002846;
  286. line-height: 32rpx;
  287. }
  288. .name{
  289. font-family: PingFangSC, PingFang SC;
  290. font-weight: 400;
  291. font-size: 24rpx;
  292. color: #667E90;
  293. line-height: 24rpx;
  294. margin-top: 32rpx;
  295. }
  296. .bottom{
  297. margin-top: 30rpx;
  298. border-top: 1rpx solid #EFEFEF;
  299. padding-top: 20rpx;
  300. &-left{
  301. font-family: PingFangSC, PingFang SC;
  302. font-weight: 400;
  303. font-size: 24rpx;
  304. color: #667E90;
  305. line-height: 24rpx;
  306. }
  307. &-right{
  308. border-radius: 32rpx;
  309. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  310. padding: 19rpx 22rpx;
  311. font-family: PingFangSC, PingFang SC;
  312. font-weight: 400;
  313. font-size: 26rpx;
  314. color: #FFFFFF;
  315. line-height: 26rpx;
  316. letter-spacing: 2rpx;
  317. }
  318. }
  319. }
  320. }
  321. .empty{
  322. flex: 1;
  323. }
  324. .dialog{
  325. position: fixed;
  326. left: 0;
  327. right: 0;
  328. top: 0;
  329. bottom: 0;
  330. background: rgba(0, 0, 0, .4);
  331. z-index: 1001;
  332. justify-content: flex-end;
  333. .dbox{
  334. width: 100%;
  335. height: 738rpx;
  336. background: #FFFFFF;
  337. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  338. border-radius: 24rpx 24rpx 0rpx 0rpx;
  339. padding: 48rpx 30rpx 0;
  340. box-sizing: border-box;
  341. &-top{
  342. &-title{
  343. width: calc(100% - 60rpx);
  344. font-family: PingFang-SC, PingFang-SC;
  345. font-weight: bold;
  346. font-size: 32rpx;
  347. color: #002846;
  348. line-height: 40rpx;
  349. }
  350. &-expand{
  351. width: 32rpx;
  352. height: 32rpx;
  353. transform: rotate(180deg);
  354. }
  355. }
  356. &-name {
  357. font-family: PingFangSC, PingFang SC;
  358. font-weight: 400;
  359. font-size: 24rpx;
  360. color: #667e90;
  361. line-height: 24rpx;
  362. margin-top: 24rpx;
  363. }
  364. &-status{
  365. width: 140rpx;
  366. margin-top: 28rpx;
  367. border-radius: 16rpx;
  368. padding: 11rpx 15rpx;
  369. box-sizing: border-box;
  370. &.dwc{
  371. background: #BA9B31;
  372. }
  373. &.ywc{
  374. background: #64BBBB;
  375. }
  376. image{
  377. width: 26rpx;
  378. height: 26rpx;
  379. }
  380. text{
  381. font-family: PingFangSC, PingFang SC;
  382. font-weight: 400;
  383. font-size: 24rpx;
  384. color: #193D59;
  385. line-height: 24rpx;
  386. margin-left: 12rpx;
  387. }
  388. }
  389. &-menu{
  390. margin-top: 43rpx;
  391. overflow: hidden;
  392. flex-wrap: wrap;
  393. justify-content: space-between;
  394. &-pre{
  395. width: calc(25% - 22.5rpx);
  396. background: #F7F8FA;
  397. border-radius: 24rpx;
  398. padding: 30rpx 20rpx;
  399. margin-top: 24rpx;
  400. box-sizing: border-box;
  401. image{
  402. width: 42rpx;
  403. height: 42rpx;
  404. }
  405. text{
  406. font-family: PingFangSC, PingFang SC;
  407. font-weight: 400;
  408. font-size: 24rpx;
  409. color: #002846;
  410. line-height: 24rpx;
  411. text-align: center;
  412. margin-top: 24rpx;
  413. }
  414. }
  415. }
  416. }
  417. }
  418. }
  419. </style>