createList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  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" @click.stop="handleAnswer(item)">立即作答</view>
  22. <view class="bottom-right" v-else-if="item.status===1" @click.stop="createReport(item)">生成报告</view>
  23. <view class="bottom-right" v-else-if="item.status===2" @click.stop="sendReport(item)">发送报告</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. handleAnswer(item){
  183. uni.navigateTo({
  184. url:'/pagesPublish/questionnaireFill?questionnaireId='+item.questionnaireId
  185. })
  186. },
  187. createReport(item){
  188. },
  189. sendReport(item){
  190. },
  191. }
  192. }
  193. </script>
  194. <style scoped lang="scss">
  195. .qbox{
  196. width: 100%;
  197. height: 100%;
  198. flex: 1;
  199. .list{
  200. flex: 1;
  201. margin-top: 20rpx;
  202. overflow: hidden;
  203. &-item{
  204. width: 100%;
  205. background: #FFFFFF;
  206. border-radius: 24rpx;
  207. margin-top: 20rpx;
  208. padding: 36rpx 24rpx 19rpx;
  209. box-sizing: border-box;
  210. position: relative;
  211. display: block;
  212. .expand{
  213. width: 32rpx;
  214. height: 32rpx;
  215. position: absolute;
  216. top: 36rpx;
  217. right: 32rpx;
  218. }
  219. .title{
  220. width: calc(100% - 128rpx);
  221. font-family: PingFang-SC, PingFang-SC;
  222. font-weight: bold;
  223. font-size: 32rpx;
  224. color: #002846;
  225. line-height: 32rpx;
  226. }
  227. .name{
  228. font-family: PingFangSC, PingFang SC;
  229. font-weight: 400;
  230. font-size: 24rpx;
  231. color: #667E90;
  232. line-height: 24rpx;
  233. margin-top: 35rpx;
  234. }
  235. .progress{
  236. margin-top: 36rpx;
  237. &-left{
  238. width: calc(100% - 95rpx);
  239. &-text{
  240. font-family: PingFangSC, PingFang SC;
  241. font-weight: 400;
  242. font-size: 24rpx;
  243. color: #667E90;
  244. line-height: 24rpx;
  245. }
  246. &-box{
  247. flex: 1;
  248. position: relative;
  249. height: 12rpx;
  250. background: #F0F2F8;
  251. border-radius: 6rpx;
  252. &-current{
  253. height: 12rpx;
  254. background: #7CC5C5;
  255. border-radius: 6rpx;
  256. position: absolute;
  257. top: 0;
  258. left: 0;
  259. }
  260. }
  261. }
  262. &-right{
  263. font-size: 24rpx;
  264. line-height: 24rpx;
  265. color: #95A5B1;
  266. span{
  267. font-size: 24rpx;
  268. line-height: 24rpx;
  269. color: #002846;
  270. }
  271. }
  272. }
  273. .bottom{
  274. margin-top: 30rpx;
  275. border-top: 1rpx solid #EFEFEF;
  276. padding-top: 20rpx;
  277. &-left{
  278. font-family: PingFangSC, PingFang SC;
  279. font-weight: 400;
  280. font-size: 24rpx;
  281. color: #667E90;
  282. line-height: 24rpx;
  283. }
  284. &-right{
  285. border-radius: 32rpx;
  286. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  287. padding: 19rpx 22rpx;
  288. font-family: PingFangSC, PingFang SC;
  289. font-weight: 400;
  290. font-size: 26rpx;
  291. color: #FFFFFF;
  292. line-height: 26rpx;
  293. letter-spacing: 2rpx;
  294. }
  295. }
  296. }
  297. }
  298. .empty{
  299. flex: 1;
  300. }
  301. .dialog{
  302. position: fixed;
  303. left: 0;
  304. right: 0;
  305. top: 0;
  306. bottom: 0;
  307. background: rgba(0, 0, 0, .4);
  308. z-index: 1001;
  309. justify-content: flex-end;
  310. .dbox{
  311. width: 100%;
  312. height: 738rpx;
  313. background: #FFFFFF;
  314. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  315. border-radius: 24rpx 24rpx 0rpx 0rpx;
  316. padding: 48rpx 30rpx 0;
  317. box-sizing: border-box;
  318. &-top{
  319. &-title{
  320. width: calc(100% - 60rpx);
  321. font-family: PingFang-SC, PingFang-SC;
  322. font-weight: bold;
  323. font-size: 32rpx;
  324. color: #002846;
  325. line-height: 40rpx;
  326. }
  327. &-expand{
  328. width: 32rpx;
  329. height: 32rpx;
  330. transform: rotate(180deg);
  331. }
  332. }
  333. &-name{
  334. font-family: PingFangSC, PingFang SC;
  335. font-weight: 400;
  336. font-size: 24rpx;
  337. color: #667E90;
  338. line-height: 24rpx;
  339. margin-top: 24rpx;
  340. }
  341. &-progress{
  342. margin-top: 36rpx;
  343. &-left{
  344. width: calc(100% - 95rpx);
  345. &-text{
  346. font-family: PingFangSC, PingFang SC;
  347. font-weight: 400;
  348. font-size: 24rpx;
  349. color: #667E90;
  350. line-height: 24rpx;
  351. }
  352. &-box{
  353. flex: 1;
  354. position: relative;
  355. height: 12rpx;
  356. background: #F0F2F8;
  357. border-radius: 6rpx;
  358. &-current{
  359. height: 12rpx;
  360. background: #7CC5C5;
  361. border-radius: 6rpx;
  362. position: absolute;
  363. top: 0;
  364. left: 0;
  365. }
  366. }
  367. }
  368. &-right{
  369. font-size: 24rpx;
  370. line-height: 24rpx;
  371. color: #95A5B1;
  372. span{
  373. font-size: 24rpx;
  374. line-height: 24rpx;
  375. color: #002846;
  376. }
  377. }
  378. }
  379. &-menu{
  380. margin-top: 43rpx;
  381. overflow: hidden;
  382. margin-left: -30rpx;
  383. &-pre{
  384. width: calc(25% - 30rpx);
  385. background: #F7F8FA;
  386. border-radius: 24rpx;
  387. padding: 30rpx 20rpx;
  388. margin-top: 24rpx;
  389. margin-left: 30rpx;
  390. box-sizing: border-box;
  391. float: left;
  392. image{
  393. width: 42rpx;
  394. height: 42rpx;
  395. }
  396. text{
  397. font-family: PingFangSC, PingFang SC;
  398. font-weight: 400;
  399. font-size: 24rpx;
  400. color: #002846;
  401. line-height: 24rpx;
  402. text-align: center;
  403. margin-top: 24rpx;
  404. }
  405. }
  406. }
  407. }
  408. &-box{
  409. width: 100%;
  410. height: 1200rpx;
  411. background: #F7F7F7;
  412. padding-top: 38rpx;
  413. border-radius: 24rpx 24rpx 0rpx 0rpx;
  414. box-sizing: border-box;
  415. position: relative;
  416. overflow-y: auto;
  417. &-title{
  418. font-family: PingFang-SC, PingFang-SC;
  419. font-weight: bold;
  420. font-size: 32rpx;
  421. color: #002846;
  422. line-height: 32rpx;
  423. text-align: center;
  424. }
  425. &-close{
  426. width: 48rpx;
  427. height: 48rpx;
  428. position: absolute;
  429. top: 30rpx;
  430. right: 30rpx;
  431. }
  432. &-teaminfo{
  433. margin-top: 40rpx;
  434. }
  435. }
  436. }
  437. .alert{
  438. position: fixed;
  439. left: 0;
  440. right: 0;
  441. top: 0;
  442. bottom: 0;
  443. z-index: 1002;
  444. background: rgba(0, 0, 0, .4);
  445. &-box{
  446. width: calc(100% - 100rpx);
  447. padding: 54rpx 99rpx 48rpx;
  448. box-sizing: border-box;
  449. position: relative;
  450. background: url('https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/alert_bg.png') no-repeat;
  451. background-size: 100% 100%;
  452. &-title{
  453. font-family: PingFang-SC, PingFang-SC;
  454. font-weight: bold;
  455. font-size: 36rpx;
  456. color: #002846;
  457. line-height: 56rpx;
  458. text-align: center;
  459. }
  460. &-close{
  461. width: 48rpx;
  462. height: 48rpx;
  463. position: absolute;
  464. top: 40rpx;
  465. right: 30rpx;
  466. }
  467. &-text{
  468. font-family: PingFangSC, PingFang SC;
  469. font-weight: 400;
  470. font-size: 30rpx;
  471. color: #002846;
  472. line-height: 48rpx;
  473. text-align: center;
  474. margin-top: 32rpx;
  475. }
  476. .zt_btn{
  477. margin-top: 66rpx;
  478. }
  479. }
  480. }
  481. }
  482. </style>