createList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  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. <image class="expand" :src="imgBase+'questionnaire_icon_down.png'"></image>
  8. <view class="title">{{item.title||''}}</view>
  9. <view class="name">团队名称:{{item.teamName||''}}</view>
  10. <view class="progress adfacjb">
  11. <view class="progress-left adfac">
  12. <view class="progress-left-text">作答进度:</view>
  13. <view class="progress-left-box">
  14. <view class="progress-left-box-current" :style="{'width':(item.yzdNum/item.sum*100)+'%'}"></view>
  15. </view>
  16. </view>
  17. <view class="progress-right"><span>{{item.yzdNum}}/</span>{{item.sum}}</view>
  18. </view>
  19. <view class="bottom adfacjb">
  20. <view class="bottom-left">截止时间:{{item.endTime}}</view>
  21. <view class="bottom-right" v-if="item.status===0">立即作答</view>
  22. <view class="bottom-right" v-else-if="item.status===1">生成报告</view>
  23. <view class="bottom-right" v-else-if="item.status===2">发送报告</view>
  24. </view>
  25. </view>
  26. </up-list-item>
  27. </up-list>
  28. </view>
  29. <view class="empty" v-else>
  30. <page-empty></page-empty>
  31. </view>
  32. <view class="dialog adffc" v-if="show">
  33. <view class="dbox">
  34. <view class="dbox-top adfacjb">
  35. <view class="dbox-top-title">{{dto.title||''}}</view>
  36. <image class="dbox-top-expand" :src="imgBase+'questionnaire_icon_down.png'" @click="show=false"></image>
  37. </view>
  38. <view class="dbox-name">团队名称:{{dto.teamName||''}}</view>
  39. <view class="dbox-progress adfacjb">
  40. <view class="dbox-progress-left adfac">
  41. <view class="dbox-progress-left-text">作答进度:</view>
  42. <view class="dbox-progress-left-box">
  43. <view class="dbox-progress-left-box-current" :style="{'width':(dto.yzdNum/dto.sum*100)+'%'}"></view>
  44. </view>
  45. </view>
  46. <view class="dbox-progress-right"><span>{{dto.yzdNum}}/</span>{{dto.sum}}</view>
  47. </view>
  48. <view class="dbox-menu">
  49. <view class="dbox-menu-pre adffcac" v-for="(item,index) in menuList" :key="index" @click="handleMenuClick(index)">
  50. <image :src="item.img"></image>
  51. <text>{{item.text}}</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="dialog adffc" v-if="teamInfoShow">
  57. <view class="dialog-box">
  58. <view class="dialog-box-title">团队信息</view>
  59. <image class="dialog-box-close" :src="imgBase+'remind_close.png'" @click="teamInfoShow=false"></image>
  60. <view class="dialog-box-teaminfo">
  61. <cus-team-info-fill confirmText="保存" @handleConfirm="handleConfirm"></cus-team-info-fill>
  62. </view>
  63. </view>
  64. </view>
  65. <div class="alert adffcacjc" v-if="alertShow">
  66. <div class="alert-box">
  67. <div class="alert-box-title">温馨提示</div>
  68. <image :src="imgBase+'remind_close.png'" class="alert-box-close" @click="alertShow=false"></image>
  69. <div class="alert-box-text">该问卷尚未生成报告<br>请确认团队人员是否全部作答<br>完成后点击生成报告</div>
  70. <div class="zt_btn" @click="alertShow=false">我知道了</div>
  71. </div>
  72. </div>
  73. <cus-team-user :deluser="true" :show="teamUserShow" :list="teamUserList" @close="teamUserShow=false"></cus-team-user>
  74. </view>
  75. </template>
  76. <script>
  77. import PageEmpty from '@/components/pageEmpty/index.vue'
  78. import CusTeamUser from '@/components/CusTeamUser/index.vue'
  79. import CusTeamInfoFill from '@/components/CusTeamInfoFill/index.vue'
  80. export default {
  81. components:{ PageEmpty, CusTeamUser, CusTeamInfoFill },
  82. props:{
  83. list:{
  84. typeof:Array,
  85. default:[]
  86. }
  87. },
  88. data(){
  89. return {
  90. show:false,
  91. teamInfoShow:false,
  92. teamUserShow:false,
  93. alertShow:false,
  94. dto:null,
  95. menuList:[
  96. {
  97. img:this.$imgBase+'questionnaire_edit.png',
  98. text:'编辑问卷'
  99. },
  100. {
  101. img:this.$imgBase+'questionnaire_share.png',
  102. text:'分享问卷'
  103. },
  104. {
  105. img:this.$imgBase+'questionnaire_info.png',
  106. text:'团队信息'
  107. },
  108. {
  109. img:this.$imgBase+'questionnaire_copy.png',
  110. text:'复制链接'
  111. },
  112. {
  113. img:this.$imgBase+'questionnaire_users.png',
  114. text:'团队人员'
  115. },
  116. {
  117. img:this.$imgBase+'questionnaire_report.png',
  118. text:'生成报告'
  119. },
  120. {
  121. img:this.$imgBase+'questionnaire_report.png',
  122. text:'发送报告'
  123. }
  124. ],
  125. teamUserList:[
  126. {
  127. name:'张三',
  128. email:'2233983769@qq.com',
  129. type:1,
  130. status:0
  131. },
  132. {
  133. name:'李四',
  134. email:'2233983769@qq.com',
  135. type:2,
  136. status:0
  137. },
  138. {
  139. name:'王五',
  140. email:'2233983769@qq.com',
  141. type:3,
  142. status:1
  143. },
  144. {
  145. name:'赵六',
  146. email:'2233983769@qq.com',
  147. type:1,
  148. status:1
  149. }
  150. ],
  151. }
  152. },
  153. methods:{
  154. scrolltolower(){
  155. this.$emit('scrolltolower')
  156. },
  157. showDialog(item){
  158. this.dto = item;
  159. this.show = true;
  160. },
  161. handleMenuClick(type){
  162. if(type===0){
  163. uni.navigateTo({
  164. url:'/pagesHome/questionnaireEdit?id='+this.dto.id||''
  165. })
  166. }else if(type===1){
  167. }else if(type===2) this.teamInfoShow = true
  168. else if(type===3) {
  169. this.$showToast('复制成功')
  170. }
  171. else if(type===4) this.teamUserShow = true
  172. else if(type===5){
  173. this.$showToast('问卷未完成,全部团队人员作答后才能生成报告')
  174. }
  175. else if(type===6){
  176. this.alertShow = true;
  177. }
  178. },
  179. handleConfirm(){
  180. this.teamInfoShow = false;
  181. }
  182. }
  183. }
  184. </script>
  185. <style scoped lang="scss">
  186. .qbox{
  187. width: 100%;
  188. height: 100%;
  189. flex: 1;
  190. .list{
  191. flex: 1;
  192. margin-top: 20rpx;
  193. overflow: hidden;
  194. &-item{
  195. width: 100%;
  196. background: #FFFFFF;
  197. border-radius: 24rpx;
  198. margin-top: 20rpx;
  199. padding: 36rpx 24rpx 19rpx;
  200. box-sizing: border-box;
  201. position: relative;
  202. display: block;
  203. .expand{
  204. width: 32rpx;
  205. height: 32rpx;
  206. position: absolute;
  207. top: 36rpx;
  208. right: 32rpx;
  209. }
  210. .title{
  211. width: calc(100% - 128rpx);
  212. font-family: PingFang-SC, PingFang-SC;
  213. font-weight: bold;
  214. font-size: 32rpx;
  215. color: #002846;
  216. line-height: 32rpx;
  217. }
  218. .name{
  219. font-family: PingFangSC, PingFang SC;
  220. font-weight: 400;
  221. font-size: 24rpx;
  222. color: #667E90;
  223. line-height: 24rpx;
  224. margin-top: 35rpx;
  225. }
  226. .progress{
  227. margin-top: 36rpx;
  228. &-left{
  229. width: calc(100% - 95rpx);
  230. &-text{
  231. font-family: PingFangSC, PingFang SC;
  232. font-weight: 400;
  233. font-size: 24rpx;
  234. color: #667E90;
  235. line-height: 24rpx;
  236. }
  237. &-box{
  238. flex: 1;
  239. position: relative;
  240. height: 12rpx;
  241. background: #F0F2F8;
  242. border-radius: 6rpx;
  243. &-current{
  244. height: 12rpx;
  245. background: #7CC5C5;
  246. border-radius: 6rpx;
  247. position: absolute;
  248. top: 0;
  249. left: 0;
  250. }
  251. }
  252. }
  253. &-right{
  254. font-size: 24rpx;
  255. line-height: 24rpx;
  256. color: #95A5B1;
  257. span{
  258. font-size: 24rpx;
  259. line-height: 24rpx;
  260. color: #002846;
  261. }
  262. }
  263. }
  264. .bottom{
  265. margin-top: 30rpx;
  266. border-top: 1rpx solid #EFEFEF;
  267. padding-top: 20rpx;
  268. &-left{
  269. font-family: PingFangSC, PingFang SC;
  270. font-weight: 400;
  271. font-size: 24rpx;
  272. color: #667E90;
  273. line-height: 24rpx;
  274. }
  275. &-right{
  276. border-radius: 32rpx;
  277. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  278. padding: 19rpx 22rpx;
  279. font-family: PingFangSC, PingFang SC;
  280. font-weight: 400;
  281. font-size: 26rpx;
  282. color: #FFFFFF;
  283. line-height: 26rpx;
  284. letter-spacing: 2rpx;
  285. }
  286. }
  287. }
  288. }
  289. .empty{
  290. flex: 1;
  291. }
  292. .dialog{
  293. position: fixed;
  294. left: 0;
  295. right: 0;
  296. top: 0;
  297. bottom: 0;
  298. background: rgba(0, 0, 0, .4);
  299. z-index: 1001;
  300. justify-content: flex-end;
  301. .dbox{
  302. width: 100%;
  303. height: 738rpx;
  304. background: #FFFFFF;
  305. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  306. border-radius: 24rpx 24rpx 0rpx 0rpx;
  307. padding: 48rpx 30rpx 0;
  308. box-sizing: border-box;
  309. &-top{
  310. &-title{
  311. width: calc(100% - 60rpx);
  312. font-family: PingFang-SC, PingFang-SC;
  313. font-weight: bold;
  314. font-size: 32rpx;
  315. color: #002846;
  316. line-height: 40rpx;
  317. }
  318. &-expand{
  319. width: 32rpx;
  320. height: 32rpx;
  321. transform: rotate(180deg);
  322. }
  323. }
  324. &-name{
  325. font-family: PingFangSC, PingFang SC;
  326. font-weight: 400;
  327. font-size: 24rpx;
  328. color: #667E90;
  329. line-height: 24rpx;
  330. margin-top: 24rpx;
  331. }
  332. &-progress{
  333. margin-top: 36rpx;
  334. &-left{
  335. width: calc(100% - 95rpx);
  336. &-text{
  337. font-family: PingFangSC, PingFang SC;
  338. font-weight: 400;
  339. font-size: 24rpx;
  340. color: #667E90;
  341. line-height: 24rpx;
  342. }
  343. &-box{
  344. flex: 1;
  345. position: relative;
  346. height: 12rpx;
  347. background: #F0F2F8;
  348. border-radius: 6rpx;
  349. &-current{
  350. height: 12rpx;
  351. background: #7CC5C5;
  352. border-radius: 6rpx;
  353. position: absolute;
  354. top: 0;
  355. left: 0;
  356. }
  357. }
  358. }
  359. &-right{
  360. font-size: 24rpx;
  361. line-height: 24rpx;
  362. color: #95A5B1;
  363. span{
  364. font-size: 24rpx;
  365. line-height: 24rpx;
  366. color: #002846;
  367. }
  368. }
  369. }
  370. &-menu{
  371. margin-top: 43rpx;
  372. overflow: hidden;
  373. margin-left: -30rpx;
  374. &-pre{
  375. width: calc(25% - 30rpx);
  376. background: #F7F8FA;
  377. border-radius: 24rpx;
  378. padding: 30rpx 20rpx;
  379. margin-top: 24rpx;
  380. margin-left: 30rpx;
  381. box-sizing: border-box;
  382. float: left;
  383. image{
  384. width: 42rpx;
  385. height: 42rpx;
  386. }
  387. text{
  388. font-family: PingFangSC, PingFang SC;
  389. font-weight: 400;
  390. font-size: 24rpx;
  391. color: #002846;
  392. line-height: 24rpx;
  393. text-align: center;
  394. margin-top: 24rpx;
  395. }
  396. }
  397. }
  398. }
  399. &-box{
  400. width: 100%;
  401. height: 1200rpx;
  402. background: #F7F7F7;
  403. padding-top: 38rpx;
  404. border-radius: 24rpx 24rpx 0rpx 0rpx;
  405. box-sizing: border-box;
  406. position: relative;
  407. overflow-y: auto;
  408. &-title{
  409. font-family: PingFang-SC, PingFang-SC;
  410. font-weight: bold;
  411. font-size: 32rpx;
  412. color: #002846;
  413. line-height: 32rpx;
  414. text-align: center;
  415. }
  416. &-close{
  417. width: 48rpx;
  418. height: 48rpx;
  419. position: absolute;
  420. top: 30rpx;
  421. right: 30rpx;
  422. }
  423. &-teaminfo{
  424. margin-top: 40rpx;
  425. }
  426. }
  427. }
  428. .alert{
  429. position: fixed;
  430. left: 0;
  431. right: 0;
  432. top: 0;
  433. bottom: 0;
  434. z-index: 1002;
  435. background: rgba(0, 0, 0, .4);
  436. &-box{
  437. width: calc(100% - 100rpx);
  438. padding: 54rpx 99rpx 48rpx;
  439. box-sizing: border-box;
  440. position: relative;
  441. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/alert_bg.png') no-repeat;
  442. background-size: 100% 100%;
  443. &-title{
  444. font-family: PingFang-SC, PingFang-SC;
  445. font-weight: bold;
  446. font-size: 36rpx;
  447. color: #002846;
  448. line-height: 56rpx;
  449. text-align: center;
  450. }
  451. &-close{
  452. width: 48rpx;
  453. height: 48rpx;
  454. position: absolute;
  455. top: 40rpx;
  456. right: 30rpx;
  457. }
  458. &-text{
  459. font-family: PingFangSC, PingFang SC;
  460. font-weight: 400;
  461. font-size: 30rpx;
  462. color: #002846;
  463. line-height: 48rpx;
  464. text-align: center;
  465. margin-top: 32rpx;
  466. }
  467. .zt_btn{
  468. margin-top: 66rpx;
  469. }
  470. }
  471. }
  472. }
  473. </style>