createList.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  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. <cus-team-user :deluser="true" :show="teamUserShow" :list="teamUserList" @close="teamUserShow=false"></cus-team-user>
  66. </view>
  67. </template>
  68. <script>
  69. import PageEmpty from '@/components/pageEmpty/index.vue'
  70. import CusTeamUser from '@/components/CusTeamUser/index.vue'
  71. import CusTeamInfoFill from '@/components/CusTeamInfoFill/index.vue'
  72. export default {
  73. components:{ PageEmpty, CusTeamUser, CusTeamInfoFill },
  74. props:{
  75. list:{
  76. typeof:Array,
  77. default:[]
  78. }
  79. },
  80. data(){
  81. return {
  82. show:false,
  83. teamInfoShow:false,
  84. teamUserShow:false,
  85. dto:null,
  86. menuList:[
  87. {
  88. img:this.$imgBase+'questionnaire_edit.png',
  89. text:'编辑问卷'
  90. },
  91. {
  92. img:this.$imgBase+'questionnaire_share.png',
  93. text:'分享问卷'
  94. },
  95. {
  96. img:this.$imgBase+'questionnaire_info.png',
  97. text:'团队信息'
  98. },
  99. {
  100. img:this.$imgBase+'questionnaire_copy.png',
  101. text:'复制链接'
  102. },
  103. {
  104. img:this.$imgBase+'questionnaire_users.png',
  105. text:'团队人员'
  106. },
  107. {
  108. img:this.$imgBase+'questionnaire_report.png',
  109. text:'生成报告'
  110. },
  111. {
  112. img:this.$imgBase+'questionnaire_report.png',
  113. text:'发送报告'
  114. }
  115. ],
  116. teamUserList:[
  117. {
  118. name:'张三',
  119. email:'2233983769@qq.com',
  120. type:1,
  121. status:0
  122. },
  123. {
  124. name:'李四',
  125. email:'2233983769@qq.com',
  126. type:2,
  127. status:0
  128. },
  129. {
  130. name:'王五',
  131. email:'2233983769@qq.com',
  132. type:3,
  133. status:1
  134. },
  135. {
  136. name:'赵六',
  137. email:'2233983769@qq.com',
  138. type:1,
  139. status:1
  140. }
  141. ],
  142. }
  143. },
  144. methods:{
  145. scrolltolower(){
  146. this.$emit('scrolltolower')
  147. },
  148. showDialog(item){
  149. this.dto = item;
  150. this.show = true;
  151. },
  152. handleMenuClick(type){
  153. if(type===0){
  154. uni.navigateTo({
  155. url:'/pagesHome/questionnaireEdit?id='+this.dto.id||''
  156. })
  157. }else if(type===2) this.teamInfoShow = true
  158. else if(type===4) this.teamUserShow = true
  159. },
  160. handleConfirm(){
  161. this.teamInfoShow = false;
  162. }
  163. }
  164. }
  165. </script>
  166. <style scoped lang="scss">
  167. .qbox{
  168. width: 100%;
  169. height: 100%;
  170. flex: 1;
  171. .list{
  172. flex: 1;
  173. margin-top: 20rpx;
  174. overflow: hidden;
  175. &-item{
  176. width: 100%;
  177. background: #FFFFFF;
  178. border-radius: 24rpx;
  179. margin-top: 20rpx;
  180. padding: 36rpx 24rpx 19rpx;
  181. box-sizing: border-box;
  182. position: relative;
  183. display: block;
  184. .expand{
  185. width: 32rpx;
  186. height: 32rpx;
  187. position: absolute;
  188. top: 36rpx;
  189. right: 32rpx;
  190. }
  191. .title{
  192. width: calc(100% - 128rpx);
  193. font-family: PingFang-SC, PingFang-SC;
  194. font-weight: bold;
  195. font-size: 32rpx;
  196. color: #002846;
  197. line-height: 32rpx;
  198. }
  199. .name{
  200. font-family: PingFangSC, PingFang SC;
  201. font-weight: 400;
  202. font-size: 24rpx;
  203. color: #667E90;
  204. line-height: 24rpx;
  205. margin-top: 35rpx;
  206. }
  207. .progress{
  208. margin-top: 36rpx;
  209. &-left{
  210. width: calc(100% - 95rpx);
  211. &-text{
  212. font-family: PingFangSC, PingFang SC;
  213. font-weight: 400;
  214. font-size: 24rpx;
  215. color: #667E90;
  216. line-height: 24rpx;
  217. }
  218. &-box{
  219. flex: 1;
  220. position: relative;
  221. height: 12rpx;
  222. background: #F0F2F8;
  223. border-radius: 6rpx;
  224. &-current{
  225. height: 12rpx;
  226. background: #7CC5C5;
  227. border-radius: 6rpx;
  228. position: absolute;
  229. top: 0;
  230. left: 0;
  231. }
  232. }
  233. }
  234. &-right{
  235. font-size: 24rpx;
  236. line-height: 24rpx;
  237. color: #95A5B1;
  238. span{
  239. font-size: 24rpx;
  240. line-height: 24rpx;
  241. color: #002846;
  242. }
  243. }
  244. }
  245. .bottom{
  246. margin-top: 30rpx;
  247. border-top: 1rpx solid #EFEFEF;
  248. padding-top: 20rpx;
  249. &-left{
  250. font-family: PingFangSC, PingFang SC;
  251. font-weight: 400;
  252. font-size: 24rpx;
  253. color: #667E90;
  254. line-height: 24rpx;
  255. }
  256. &-right{
  257. border-radius: 32rpx;
  258. background: linear-gradient( 90deg, #33A7A7 0%, #4DB2B2 100%);
  259. padding: 19rpx 22rpx;
  260. font-family: PingFangSC, PingFang SC;
  261. font-weight: 400;
  262. font-size: 26rpx;
  263. color: #FFFFFF;
  264. line-height: 26rpx;
  265. letter-spacing: 2rpx;
  266. }
  267. }
  268. }
  269. }
  270. .empty{
  271. flex: 1;
  272. }
  273. .dialog{
  274. position: fixed;
  275. left: 0;
  276. right: 0;
  277. top: 0;
  278. bottom: 0;
  279. background: rgba(0, 0, 0, .4);
  280. z-index: 1001;
  281. justify-content: flex-end;
  282. .dbox{
  283. width: 100%;
  284. height: 738rpx;
  285. background: #FFFFFF;
  286. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  287. border-radius: 24rpx 24rpx 0rpx 0rpx;
  288. padding: 48rpx 30rpx 0;
  289. box-sizing: border-box;
  290. &-top{
  291. &-title{
  292. width: calc(100% - 60rpx);
  293. font-family: PingFang-SC, PingFang-SC;
  294. font-weight: bold;
  295. font-size: 32rpx;
  296. color: #002846;
  297. line-height: 40rpx;
  298. }
  299. &-expand{
  300. width: 32rpx;
  301. height: 32rpx;
  302. transform: rotate(180deg);
  303. }
  304. }
  305. &-name{
  306. font-family: PingFangSC, PingFang SC;
  307. font-weight: 400;
  308. font-size: 24rpx;
  309. color: #667E90;
  310. line-height: 24rpx;
  311. margin-top: 24rpx;
  312. }
  313. &-progress{
  314. margin-top: 36rpx;
  315. &-left{
  316. width: calc(100% - 95rpx);
  317. &-text{
  318. font-family: PingFangSC, PingFang SC;
  319. font-weight: 400;
  320. font-size: 24rpx;
  321. color: #667E90;
  322. line-height: 24rpx;
  323. }
  324. &-box{
  325. flex: 1;
  326. position: relative;
  327. height: 12rpx;
  328. background: #F0F2F8;
  329. border-radius: 6rpx;
  330. &-current{
  331. height: 12rpx;
  332. background: #7CC5C5;
  333. border-radius: 6rpx;
  334. position: absolute;
  335. top: 0;
  336. left: 0;
  337. }
  338. }
  339. }
  340. &-right{
  341. font-size: 24rpx;
  342. line-height: 24rpx;
  343. color: #95A5B1;
  344. span{
  345. font-size: 24rpx;
  346. line-height: 24rpx;
  347. color: #002846;
  348. }
  349. }
  350. }
  351. &-menu{
  352. margin-top: 43rpx;
  353. overflow: hidden;
  354. margin-left: -30rpx;
  355. &-pre{
  356. width: calc(25% - 30rpx);
  357. background: #F7F8FA;
  358. border-radius: 24rpx;
  359. padding: 30rpx 20rpx;
  360. margin-top: 24rpx;
  361. margin-left: 30rpx;
  362. box-sizing: border-box;
  363. float: left;
  364. image{
  365. width: 42rpx;
  366. height: 42rpx;
  367. }
  368. text{
  369. font-family: PingFangSC, PingFang SC;
  370. font-weight: 400;
  371. font-size: 24rpx;
  372. color: #002846;
  373. line-height: 24rpx;
  374. text-align: center;
  375. margin-top: 24rpx;
  376. }
  377. }
  378. }
  379. }
  380. &-box{
  381. width: 100%;
  382. height: 1200rpx;
  383. background: #F7F7F7;
  384. padding-top: 38rpx;
  385. border-radius: 24rpx 24rpx 0rpx 0rpx;
  386. box-sizing: border-box;
  387. position: relative;
  388. overflow-y: auto;
  389. &-title{
  390. font-family: PingFang-SC, PingFang-SC;
  391. font-weight: bold;
  392. font-size: 32rpx;
  393. color: #002846;
  394. line-height: 32rpx;
  395. text-align: center;
  396. }
  397. &-close{
  398. width: 48rpx;
  399. height: 48rpx;
  400. position: absolute;
  401. top: 30rpx;
  402. right: 30rpx;
  403. }
  404. &-teaminfo{
  405. margin-top: 40rpx;
  406. }
  407. }
  408. }
  409. }
  410. </style>