createList.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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>
  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. handleMenuClick(type){
  113. if(type===0){
  114. uni.navigateTo({
  115. url:'/pagesHome/questionnaireEdit?id='+this.dto.id||''
  116. })
  117. }
  118. }
  119. }
  120. }
  121. </script>
  122. <style scoped lang="scss">
  123. .qbox{
  124. width: 100%;
  125. height: 100%;
  126. flex: 1;
  127. .list{
  128. flex: 1;
  129. margin-top: 20rpx;
  130. overflow: hidden;
  131. &-item{
  132. width: 100%;
  133. background: #FFFFFF;
  134. border-radius: 24rpx;
  135. margin-top: 20rpx;
  136. padding: 36rpx 24rpx 19rpx;
  137. box-sizing: border-box;
  138. position: relative;
  139. display: block;
  140. .expand{
  141. width: 32rpx;
  142. height: 32rpx;
  143. position: absolute;
  144. top: 36rpx;
  145. right: 32rpx;
  146. }
  147. .title{
  148. width: calc(100% - 128rpx);
  149. font-family: PingFang-SC, PingFang-SC;
  150. font-weight: bold;
  151. font-size: 32rpx;
  152. color: #002846;
  153. line-height: 32rpx;
  154. }
  155. .name{
  156. font-family: PingFangSC, PingFang SC;
  157. font-weight: 400;
  158. font-size: 24rpx;
  159. color: #667E90;
  160. line-height: 24rpx;
  161. margin-top: 35rpx;
  162. }
  163. .progress{
  164. margin-top: 36rpx;
  165. &-left{
  166. width: calc(100% - 95rpx);
  167. &-text{
  168. font-family: PingFangSC, PingFang SC;
  169. font-weight: 400;
  170. font-size: 24rpx;
  171. color: #667E90;
  172. line-height: 24rpx;
  173. }
  174. &-box{
  175. flex: 1;
  176. position: relative;
  177. height: 12rpx;
  178. background: #F0F2F8;
  179. border-radius: 6rpx;
  180. &-current{
  181. height: 12rpx;
  182. background: #7CC5C5;
  183. border-radius: 6rpx;
  184. position: absolute;
  185. top: 0;
  186. left: 0;
  187. }
  188. }
  189. }
  190. &-right{
  191. font-size: 24rpx;
  192. line-height: 24rpx;
  193. color: #95A5B1;
  194. span{
  195. font-size: 24rpx;
  196. line-height: 24rpx;
  197. color: #002846;
  198. }
  199. }
  200. }
  201. .bottom{
  202. margin-top: 30rpx;
  203. border-top: 1rpx solid #EFEFEF;
  204. padding-top: 20rpx;
  205. &-left{
  206. font-family: PingFangSC, PingFang SC;
  207. font-weight: 400;
  208. font-size: 24rpx;
  209. color: #667E90;
  210. line-height: 24rpx;
  211. }
  212. &-right{
  213. border-radius: 32rpx;
  214. background: rgba(144, 74, 135, .11);
  215. padding: 19rpx 22rpx;
  216. font-family: PingFangSC, PingFang SC;
  217. font-weight: 400;
  218. font-size: 26rpx;
  219. color: #761E6A;
  220. line-height: 26rpx;
  221. letter-spacing: 2rpx;
  222. }
  223. }
  224. }
  225. }
  226. .empty{
  227. flex: 1;
  228. }
  229. .dialog{
  230. position: fixed;
  231. left: 0;
  232. right: 0;
  233. top: 0;
  234. bottom: 0;
  235. background: rgba(0, 0, 0, .4);
  236. z-index: 1001;
  237. justify-content: flex-end;
  238. .dbox{
  239. width: 100%;
  240. height: 738rpx;
  241. background: #FFFFFF;
  242. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  243. border-radius: 24rpx 24rpx 0rpx 0rpx;
  244. padding: 48rpx 30rpx 0;
  245. box-sizing: border-box;
  246. &-top{
  247. &-title{
  248. width: calc(100% - 60rpx);
  249. font-family: PingFang-SC, PingFang-SC;
  250. font-weight: bold;
  251. font-size: 32rpx;
  252. color: #002846;
  253. line-height: 40rpx;
  254. }
  255. &-expand{
  256. width: 32rpx;
  257. height: 32rpx;
  258. transform: rotate(180deg);
  259. }
  260. }
  261. &-name{
  262. font-family: PingFangSC, PingFang SC;
  263. font-weight: 400;
  264. font-size: 24rpx;
  265. color: #667E90;
  266. line-height: 24rpx;
  267. margin-top: 24rpx;
  268. }
  269. &-progress{
  270. margin-top: 36rpx;
  271. &-left{
  272. width: calc(100% - 95rpx);
  273. &-text{
  274. font-family: PingFangSC, PingFang SC;
  275. font-weight: 400;
  276. font-size: 24rpx;
  277. color: #667E90;
  278. line-height: 24rpx;
  279. }
  280. &-box{
  281. flex: 1;
  282. position: relative;
  283. height: 12rpx;
  284. background: #F0F2F8;
  285. border-radius: 6rpx;
  286. &-current{
  287. height: 12rpx;
  288. background: #7CC5C5;
  289. border-radius: 6rpx;
  290. position: absolute;
  291. top: 0;
  292. left: 0;
  293. }
  294. }
  295. }
  296. &-right{
  297. font-size: 24rpx;
  298. line-height: 24rpx;
  299. color: #95A5B1;
  300. span{
  301. font-size: 24rpx;
  302. line-height: 24rpx;
  303. color: #002846;
  304. }
  305. }
  306. }
  307. &-menu{
  308. margin-top: 43rpx;
  309. overflow: hidden;
  310. margin-left: -30rpx;
  311. &-pre{
  312. width: calc(25% - 30rpx);
  313. background: #F7F8FA;
  314. border-radius: 24rpx;
  315. padding: 30rpx 20rpx;
  316. margin-top: 24rpx;
  317. margin-left: 30rpx;
  318. box-sizing: border-box;
  319. float: left;
  320. image{
  321. width: 42rpx;
  322. height: 42rpx;
  323. }
  324. text{
  325. font-family: PingFangSC, PingFang SC;
  326. font-weight: 400;
  327. font-size: 24rpx;
  328. color: #002846;
  329. line-height: 24rpx;
  330. text-align: center;
  331. margin-top: 24rpx;
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. </style>