checkList.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="check-map-list">
  3. <view class="item"
  4. v-for="(item, index) in depList"
  5. :key="index">
  6. <view class="title-wrap">
  7. <text>{{item.deptName}}</text>
  8. <view>
  9. <image src="../../static/icon-map.png"></image>
  10. <text>{{item.deptClassName}}</text>
  11. </view>
  12. </view>
  13. <view class="content">
  14. <text>{{item.decs}}</text>
  15. <text>
  16. 要点概览:{{item.checkPointNames}}
  17. </text>
  18. </view>
  19. <view class="footer">
  20. <text>查核人:{{item.empName}}</text>
  21. <text>{{item.startDate}}~{{item.endDate}}</text>
  22. </view>
  23. </view>
  24. <view class="null" v-if="depList.length === 0">暂无数据</view>
  25. <view class="modal">
  26. <view class="content-list">
  27. <view class="list-item">
  28. <text>第1次查核计划(2020-09-21 ~ 2020-09-22)</text>
  29. <view class="item-icon">已完成</view>
  30. </view>
  31. <view class="list-item active">
  32. <text>第1次查核计划(2020-09-21 ~ 2020-09-22)</text>
  33. <view class="item-icon">进行中</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. depList: [
  44. {
  45. "checkId":30, //类型:Number 必有字段 备注:计划id
  46. "deptId":1, //类型:Number 必有字段 备注:单位id
  47. "deptName":"测试单位1", //类型:String 必有字段 备注:单位名称
  48. "deptClassId":1, //类型:Number 必有字段 备注:单位分组id
  49. "deptClassName":"单位分类1", //类型:String 必有字段 备注:单位分组名称
  50. "checkPointNames":"要点1", //类型:String 必有字段 备注:要点名称拼接
  51. "decs":"包含1个查核要点, 已完成0/2个查核项目", //类型:String 必有字段 备注:描述
  52. "empId":6, //类型:Number 必有字段 备注:分配查核人id
  53. "empName":"查核组员2", //类型:String 必有字段 备注:分配查核人名称
  54. "startDate":"2021-02-20 08:00", //类型:String 必有字段 备注:分配开始时间
  55. "endDate":"2021-02-21 05:00" //类型:String 必有字段 备注:分配结束时间
  56. }
  57. ]
  58. };
  59. },
  60. created: function(){
  61. this.dispatch('depList', {checkId: ''}).then((data)=>{
  62. console.log(data);
  63. if(data) {
  64. // this.depList = data;
  65. }
  66. });
  67. },
  68. methods: {
  69. dispatch: function(key, data) {
  70. return this.$store.dispatch({type: 'checkList/commActions', key, data});
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="less">
  76. .check-map-list {
  77. padding: 25rpx;
  78. .footer {
  79. display: flex;
  80. flex-direction: row;
  81. justify-content: space-between;
  82. align-items: center;
  83. margin: 0 25rpx 16.87rpx;
  84. border-top: 1px solid #DADEE6;
  85. padding-top: 16.25rpx;
  86. font-size: 17.5rpx;
  87. line-height: 26.25rpx;
  88. color: #666E80;
  89. }
  90. }
  91. .null {
  92. text-align: center;
  93. color: #999;
  94. }
  95. .content-list {
  96. width: 100%;
  97. background-color: #fff;
  98. .list-item {
  99. display: flex;
  100. flex-direction: row;
  101. align-items: center;
  102. border-bottom: 1px solid #DADEE6;
  103. padding: 0 25rpx;
  104. width: 100%;
  105. height: 87.5rpx;
  106. font-size: 22.5rpx;
  107. line-height: 33.75rpx;
  108. color: #292C33;
  109. .item-icon {
  110. border-radius: 5rpx;
  111. padding: 6.25rpx 11.25rpx;
  112. line-height: 26.25rpx;
  113. color: #29CC96;
  114. background-color: #e9f9f4;
  115. }
  116. &.active {
  117. color: #3377FF;
  118. .item-icon {
  119. color: #FFAA00;
  120. background-color: #fff9ef;
  121. }
  122. }
  123. }
  124. }
  125. </style>