createList.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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">
  50. <image :src="item.img"></image>
  51. <text>{{item.text}}</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import PageEmpty from '@/components/pageEmpty/index.vue'
  60. export default {
  61. components:{ PageEmpty },
  62. props:{
  63. list:{
  64. typeof:Array,
  65. default:[]
  66. }
  67. },
  68. data(){
  69. return {
  70. show:false,
  71. dto:null,
  72. menuList:[
  73. {
  74. img:this.$imgBase+'questionnaire_edit.png',
  75. text:'编辑问卷'
  76. },
  77. {
  78. img:this.$imgBase+'questionnaire_share.png',
  79. text:'分享问卷'
  80. },
  81. {
  82. img:this.$imgBase+'questionnaire_info.png',
  83. text:'团队信息'
  84. },
  85. {
  86. img:this.$imgBase+'questionnaire_copy.png',
  87. text:'复制链接'
  88. },
  89. {
  90. img:this.$imgBase+'questionnaire_users.png',
  91. text:'团队人员'
  92. },
  93. {
  94. img:this.$imgBase+'questionnaire_report.png',
  95. text:'生成报告'
  96. },
  97. {
  98. img:this.$imgBase+'questionnaire_report.png',
  99. text:'发送报告'
  100. }
  101. ]
  102. }
  103. },
  104. methods:{
  105. scrolltolower(){
  106. this.$emit('scrolltolower')
  107. },
  108. showDialog(item){
  109. this.dto = item;
  110. this.show = true;
  111. }
  112. }
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .qbox{
  117. width: 100%;
  118. height: 100%;
  119. flex: 1;
  120. .list{
  121. flex: 1;
  122. margin-top: 20rpx;
  123. overflow: hidden;
  124. &-item{
  125. width: 100%;
  126. background: #FFFFFF;
  127. border-radius: 24rpx;
  128. margin-top: 20rpx;
  129. padding: 36rpx 24rpx 19rpx;
  130. box-sizing: border-box;
  131. position: relative;
  132. display: block;
  133. .expand{
  134. width: 32rpx;
  135. height: 32rpx;
  136. position: absolute;
  137. top: 36rpx;
  138. right: 32rpx;
  139. }
  140. .title{
  141. width: calc(100% - 128rpx);
  142. font-family: PingFang-SC, PingFang-SC;
  143. font-weight: bold;
  144. font-size: 32rpx;
  145. color: #002846;
  146. line-height: 32rpx;
  147. }
  148. .name{
  149. font-family: PingFangSC, PingFang SC;
  150. font-weight: 400;
  151. font-size: 24rpx;
  152. color: #667E90;
  153. line-height: 24rpx;
  154. margin-top: 35rpx;
  155. }
  156. .progress{
  157. margin-top: 36rpx;
  158. &-left{
  159. width: calc(100% - 95rpx);
  160. &-text{
  161. font-family: PingFangSC, PingFang SC;
  162. font-weight: 400;
  163. font-size: 24rpx;
  164. color: #667E90;
  165. line-height: 24rpx;
  166. }
  167. &-box{
  168. flex: 1;
  169. position: relative;
  170. height: 12rpx;
  171. background: #F0F2F8;
  172. border-radius: 6rpx;
  173. &-current{
  174. height: 12rpx;
  175. background: #7CC5C5;
  176. border-radius: 6rpx;
  177. position: absolute;
  178. top: 0;
  179. left: 0;
  180. }
  181. }
  182. }
  183. &-right{
  184. font-size: 24rpx;
  185. line-height: 24rpx;
  186. color: #95A5B1;
  187. span{
  188. font-size: 24rpx;
  189. line-height: 24rpx;
  190. color: #002846;
  191. }
  192. }
  193. }
  194. .bottom{
  195. margin-top: 30rpx;
  196. border-top: 1rpx solid #EFEFEF;
  197. padding-top: 20rpx;
  198. &-left{
  199. font-family: PingFangSC, PingFang SC;
  200. font-weight: 400;
  201. font-size: 24rpx;
  202. color: #667E90;
  203. line-height: 24rpx;
  204. }
  205. &-right{
  206. border-radius: 32rpx;
  207. background: rgba(144, 74, 135, .11);
  208. padding: 19rpx 22rpx;
  209. font-family: PingFangSC, PingFang SC;
  210. font-weight: 400;
  211. font-size: 26rpx;
  212. color: #761E6A;
  213. line-height: 26rpx;
  214. letter-spacing: 2rpx;
  215. }
  216. }
  217. }
  218. }
  219. .empty{
  220. flex: 1;
  221. }
  222. .dialog{
  223. position: fixed;
  224. left: 0;
  225. right: 0;
  226. top: 0;
  227. bottom: 0;
  228. background: rgba(0, 0, 0, .4);
  229. z-index: 1001;
  230. justify-content: flex-end;
  231. .dbox{
  232. width: 100%;
  233. height: 738rpx;
  234. background: #FFFFFF;
  235. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  236. border-radius: 24rpx 24rpx 0rpx 0rpx;
  237. padding: 48rpx 30rpx 0;
  238. box-sizing: border-box;
  239. &-top{
  240. &-title{
  241. width: calc(100% - 60rpx);
  242. font-family: PingFang-SC, PingFang-SC;
  243. font-weight: bold;
  244. font-size: 32rpx;
  245. color: #002846;
  246. line-height: 40rpx;
  247. }
  248. &-expand{
  249. width: 32rpx;
  250. height: 32rpx;
  251. transform: rotate(180deg);
  252. }
  253. }
  254. &-name{
  255. font-family: PingFangSC, PingFang SC;
  256. font-weight: 400;
  257. font-size: 24rpx;
  258. color: #667E90;
  259. line-height: 24rpx;
  260. margin-top: 24rpx;
  261. }
  262. &-progress{
  263. margin-top: 36rpx;
  264. &-left{
  265. width: calc(100% - 95rpx);
  266. &-text{
  267. font-family: PingFangSC, PingFang SC;
  268. font-weight: 400;
  269. font-size: 24rpx;
  270. color: #667E90;
  271. line-height: 24rpx;
  272. }
  273. &-box{
  274. flex: 1;
  275. position: relative;
  276. height: 12rpx;
  277. background: #F0F2F8;
  278. border-radius: 6rpx;
  279. &-current{
  280. height: 12rpx;
  281. background: #7CC5C5;
  282. border-radius: 6rpx;
  283. position: absolute;
  284. top: 0;
  285. left: 0;
  286. }
  287. }
  288. }
  289. &-right{
  290. font-size: 24rpx;
  291. line-height: 24rpx;
  292. color: #95A5B1;
  293. span{
  294. font-size: 24rpx;
  295. line-height: 24rpx;
  296. color: #002846;
  297. }
  298. }
  299. }
  300. &-menu{
  301. margin-top: 43rpx;
  302. overflow: hidden;
  303. margin-left: -30rpx;
  304. &-pre{
  305. width: calc(25% - 30rpx);
  306. background: #F7F8FA;
  307. border-radius: 24rpx;
  308. padding: 30rpx 20rpx;
  309. margin-top: 24rpx;
  310. margin-left: 30rpx;
  311. box-sizing: border-box;
  312. float: left;
  313. image{
  314. width: 42rpx;
  315. height: 42rpx;
  316. }
  317. text{
  318. font-family: PingFangSC, PingFang SC;
  319. font-weight: 400;
  320. font-size: 24rpx;
  321. color: #002846;
  322. line-height: 24rpx;
  323. text-align: center;
  324. margin-top: 24rpx;
  325. }
  326. }
  327. }
  328. }
  329. }
  330. }
  331. </style>