receiveList.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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">查看报告</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.
  105. 创衡国际PERILL团队发展动态评估旨在深入了解支撑高价值团队的关键因素。这些关键因素涵盖六个维度:宗旨和动机、外部流程/系统和结构、人际关系、外部流程/系统和结构、学习、领导力。
  106. <br/>
  107. All information will be kept confidential.
  108. 您所填写的所有信息将被保密的。
  109. <br/>
  110. The following statements in the assessment describe the ideal state of a team. Please score the actual performance of the team being tested on each statement from two perspectives:
  111. 以下问卷中的各条陈述是对团队理想状态的描述,请您对受测团队当下在每项描述上所呈现的实际表现从两个角度进行打分:
  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.
  114. 1、同意度:1-5分共5个等级,假如您完全同意该团队当下达到了所描述的状态为5分,假如您完全不同意该团队当下达到了所描述的状态为1分
  115. `
  116. }
  117. },
  118. methods:{
  119. scrolltolower(){
  120. this.$emit('scrolltolower')
  121. },
  122. showDialog(item){
  123. this.dto = item;
  124. this.show = true;
  125. this.$emit('showDialogFn',item);
  126. },
  127. showNotice(item){
  128. this.dto = item;
  129. this.noticeShow = true;
  130. },
  131. async getUserCategoryData(){
  132. return new Promise((resolve,reject)=>{
  133. this.$api.get('/getListByType/UserCategory').then(({data:res})=>{
  134. if(res.code!==0) return this.$showToast(res.msg)
  135. this.categoryData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  136. resolve()
  137. })
  138. })
  139. },
  140. async handleMenuClick(type){
  141. if(type===0){
  142. await this.getUserCategoryData()
  143. this.$api.get(`/core/member/listByQueTeamId/${this.dto.teamQuestionnaireId}`).then(({data:res})=>{
  144. if(res.code!==0) return this.$showToast(res.msg)
  145. this.teamUserList = res.data;
  146. this.originTeamUserList = res.data;
  147. this.teamUserList.forEach(l=>{
  148. l.categoryName = this.categoryData.find(c=>c.id==l.category)?.name;
  149. })
  150. this.teamUserShow = true
  151. })
  152. } else if(type===2){
  153. this.showTeamInfo()
  154. } else if(type===3){
  155. let url = '/pagesHome/pdf';
  156. if(this.dto.type==2) url = '/pagesHome/pdfZyb'
  157. uni.navigateTo({ url })
  158. }
  159. },
  160. handleKnow(){
  161. uni.navigateTo({
  162. url:'/pagesPublish/questionnaireFill?teamQuestionnaireId='+this.dto.teamQuestionnaireId+'&teamId='+this.dto.teamId+'&type='+this.dto.type+'&turnType=questionnaire'
  163. })
  164. },
  165. async getTeamScaleData(){
  166. return new Promise((resolve,reject)=>{
  167. this.$api.get('/getListByType/team_scale').then(({data:res})=>{
  168. if(res.code!==0) return this.$showToast(res.msg)
  169. this.teamScaleData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  170. resolve()
  171. })
  172. })
  173. },
  174. async getTeamHierarchyData(){
  175. return new Promise((resolve,reject)=>{
  176. this.$api.get('/getListByType/team_hierarchy').then(({data:res})=>{
  177. if(res.code!==0) return this.$showToast(res.msg)
  178. this.teamLevelData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  179. resolve()
  180. })
  181. })
  182. },
  183. async showTeamInfo(){
  184. await this.getTeamScaleData()
  185. await this.getTeamHierarchyData()
  186. this.$api.get(`/core/user/team/${this.dto.teamId}`).then(({data:res})=>{
  187. if(res.code!==0) return this.$showToast(res.msg)
  188. this.teamInfo = res.data;
  189. this.teamInfo.functionsName = res.data.functions.map(f=>f.functionName).join('、');
  190. this.teamInfo.organizationsName = res.data.organizations.map(f=>f.orgName).join('、');
  191. this.teamInfo.address = res.data.provinceName+res.data.cityName;
  192. this.teamInfo.scaleName = this.teamScaleData.find(d=>d.id==res.data.scale).name;
  193. this.teamInfo.hierarchyName = this.teamLevelData.find(d=>d.id==res.data.hierarchy).name;
  194. this.teamInfoShow = true;
  195. })
  196. }
  197. }
  198. }
  199. </script>
  200. <style scoped lang="scss">
  201. .share-btn {
  202. background-color: transparent;
  203. border: none;
  204. padding: 0;
  205. margin: 0;
  206. line-height: 1;
  207. display: flex;
  208. flex-direction: column;
  209. justify-content: center;
  210. align-items: center;
  211. &::after {
  212. border: none;
  213. }
  214. }
  215. .qbox{
  216. width: 100%;
  217. height: 100%;
  218. flex: 1;
  219. .list{
  220. flex: 1;
  221. margin-top: 20rpx;
  222. overflow: hidden;
  223. &-item{
  224. width: 100%;
  225. background: #FFFFFF;
  226. border-radius: 24rpx;
  227. margin-top: 20rpx;
  228. padding: 99rpx 24rpx 19rpx;
  229. box-sizing: border-box;
  230. position: relative;
  231. display: block;
  232. .status{
  233. width: 164rpx;
  234. height: 80rpx;
  235. padding: 14rpx 0 0 15rpx;
  236. box-sizing: border-box;
  237. position: absolute;
  238. left: 0;
  239. top: 0;
  240. image{
  241. width: 26rpx;
  242. height: 26rpx;
  243. }
  244. text{
  245. font-family: PingFangSC, PingFang SC;
  246. font-weight: 400;
  247. font-size: 24rpx;
  248. color: #FFFFFF;
  249. line-height: 30rpx;
  250. margin-left: 12rpx;
  251. }
  252. &.dwc{
  253. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/questionnaire_dwc.png') no-repeat;
  254. background-size: 100% 100%;
  255. text{
  256. color: #193D59;
  257. }
  258. }
  259. &.ywc{
  260. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/questionnaire_ywc.png') no-repeat;
  261. background-size: 100% 100%;
  262. }
  263. }
  264. .expand{
  265. width: 32rpx;
  266. height: 32rpx;
  267. position: absolute;
  268. top: 24rpx;
  269. right: 32rpx;
  270. }
  271. .title{
  272. font-family: PingFang-SC, PingFang-SC;
  273. font-weight: bold;
  274. font-size: 32rpx;
  275. color: #002846;
  276. line-height: 32rpx;
  277. }
  278. .name{
  279. font-family: PingFangSC, PingFang SC;
  280. font-weight: 400;
  281. font-size: 24rpx;
  282. color: #667E90;
  283. line-height: 24rpx;
  284. margin-top: 32rpx;
  285. }
  286. .bottom{
  287. margin-top: 30rpx;
  288. border-top: 1rpx solid #EFEFEF;
  289. padding-top: 20rpx;
  290. &-left{
  291. font-family: PingFangSC, PingFang SC;
  292. font-weight: 400;
  293. font-size: 24rpx;
  294. color: #667E90;
  295. line-height: 24rpx;
  296. }
  297. &-right{
  298. border-radius: 32rpx;
  299. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  300. padding: 19rpx 22rpx;
  301. font-family: PingFangSC, PingFang SC;
  302. font-weight: 400;
  303. font-size: 26rpx;
  304. color: #FFFFFF;
  305. line-height: 26rpx;
  306. letter-spacing: 2rpx;
  307. }
  308. }
  309. }
  310. }
  311. .empty{
  312. flex: 1;
  313. }
  314. .dialog{
  315. position: fixed;
  316. left: 0;
  317. right: 0;
  318. top: 0;
  319. bottom: 0;
  320. background: rgba(0, 0, 0, .4);
  321. z-index: 1001;
  322. justify-content: flex-end;
  323. .dbox{
  324. width: 100%;
  325. height: 738rpx;
  326. background: #FFFFFF;
  327. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  328. border-radius: 24rpx 24rpx 0rpx 0rpx;
  329. padding: 48rpx 30rpx 0;
  330. box-sizing: border-box;
  331. &-top{
  332. &-title{
  333. width: calc(100% - 60rpx);
  334. font-family: PingFang-SC, PingFang-SC;
  335. font-weight: bold;
  336. font-size: 32rpx;
  337. color: #002846;
  338. line-height: 40rpx;
  339. }
  340. &-expand{
  341. width: 32rpx;
  342. height: 32rpx;
  343. transform: rotate(180deg);
  344. }
  345. }
  346. &-name {
  347. font-family: PingFangSC, PingFang SC;
  348. font-weight: 400;
  349. font-size: 24rpx;
  350. color: #667e90;
  351. line-height: 24rpx;
  352. margin-top: 24rpx;
  353. }
  354. &-status{
  355. width: 140rpx;
  356. margin-top: 28rpx;
  357. border-radius: 16rpx;
  358. padding: 11rpx 15rpx;
  359. box-sizing: border-box;
  360. &.dwc{
  361. background: #BA9B31;
  362. }
  363. &.ywc{
  364. background: #64BBBB;
  365. }
  366. image{
  367. width: 26rpx;
  368. height: 26rpx;
  369. }
  370. text{
  371. font-family: PingFangSC, PingFang SC;
  372. font-weight: 400;
  373. font-size: 24rpx;
  374. color: #193D59;
  375. line-height: 24rpx;
  376. margin-left: 12rpx;
  377. }
  378. }
  379. &-menu{
  380. margin-top: 43rpx;
  381. overflow: hidden;
  382. flex-wrap: wrap;
  383. justify-content: space-between;
  384. &-pre{
  385. width: calc(25% - 22.5rpx);
  386. background: #F7F8FA;
  387. border-radius: 24rpx;
  388. padding: 30rpx 20rpx;
  389. margin-top: 24rpx;
  390. box-sizing: border-box;
  391. image{
  392. width: 42rpx;
  393. height: 42rpx;
  394. }
  395. text{
  396. font-family: PingFangSC, PingFang SC;
  397. font-weight: 400;
  398. font-size: 24rpx;
  399. color: #002846;
  400. line-height: 24rpx;
  401. text-align: center;
  402. margin-top: 24rpx;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. }
  409. </style>