mission-details.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="mission-details-page">
  3. <scroll-view class="scroll-y" scroll-y="true">
  4. <list-item :isDetails="true" :task="missionDetails" />
  5. <view class="mission-plan">
  6. <view class="label">
  7. <text>改善进度</text>
  8. </view>
  9. <view class="plan-box">
  10. <template v-for="(item, i) in list">
  11. <view class="row" :key="i">
  12. <view class="col">
  13. <image
  14. class="plan-icon"
  15. :src="`/static/${i === list.length - 1 ? 'check-radio' : 'check-no'}.png`">
  16. </image>
  17. <view class="line" v-show="i != list.length -1"></view>
  18. </view>
  19. <view class="col">
  20. <view class="title">
  21. <text>{{ item.title }}</text>
  22. </view>
  23. <view class="sub-box">
  24. <view class="sub-title">
  25. <text>{{ item.subTitle }}</text>
  26. </view>
  27. <view class="sub-title">
  28. <text>{{ item.date }}</text>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <view class="btn-group">
  35. <tm-button type="pramary" btnText="不认可" @btnClick="clickRightBtn" />
  36. <tm-button btnText="指派改善任务" @btnClick="clickRightBtn" />
  37. </view>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <script>
  44. // 改善任务
  45. import { mapState } from "vuex";
  46. import listItem from '../mission/components/list-item.vue';
  47. export default {
  48. computed: {
  49. ...mapState({
  50. missionDetails: state => state.mission.missionDetails
  51. })
  52. },
  53. data() {
  54. return {
  55. list: [
  56. {title: '查核人:王晓雪', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'},
  57. {title: '单位负责人', subTitle: '发送改善通知,查核结果:主要缺失', date: '2020-11-22 15:30:22'}
  58. ],
  59. // 任务id
  60. taskId: ''
  61. }
  62. },
  63. onLoad({ taskId }){
  64. this.taskId = taskId;
  65. },
  66. created() {
  67. this.getMissionDetails();
  68. },
  69. methods: {
  70. // 获取改善任务列表
  71. getMissionDetails(data) {
  72. this.$store.dispatch({
  73. type: 'mission/commActions',
  74. payload: {
  75. key: "getMissionDetails",
  76. data: {taskId: this.taskId}
  77. }
  78. });
  79. },
  80. // 点击右侧按钮
  81. clickRightBtn() {
  82. uni.navigateTo({
  83. url: '/pages/mission-action/mission-action'
  84. })
  85. }
  86. },
  87. components: {
  88. listItem
  89. }
  90. }
  91. </script>
  92. <style lang="less">
  93. .mission-details-page {
  94. height: 100%;
  95. padding-top: 15rpx;
  96. .scroll-y {
  97. height: 100%;
  98. .mission-plan {
  99. .label {
  100. margin-top: 25rpx;
  101. margin-bottom: 15rpx;
  102. height: 20rpx;
  103. line-height: 20rpx;
  104. padding-left: 25rpx;
  105. text {
  106. font-size: 20rpx;
  107. color: #666F80;
  108. }
  109. }
  110. .plan-box {
  111. padding: 25rpx;
  112. background-color: #fff;
  113. .row {
  114. display: flex;
  115. .col {
  116. .title {
  117. display: flex;
  118. align-items: center;
  119. margin-bottom: 15rpx;
  120. height: 25rpx;
  121. >text {
  122. font-size: 22.5rpx;
  123. color: #292C33;
  124. }
  125. }
  126. .sub-box {
  127. display: flex;
  128. flex-direction: column;
  129. .sub-title {
  130. display: flex;
  131. align-items: center;
  132. margin-bottom: 15rpx;
  133. height: 20rpx;
  134. &:last-child {
  135. margin-bottom: 34.37rpx;
  136. }
  137. >text {
  138. font-size: 20rpx;
  139. color: #666E80;
  140. }
  141. }
  142. }
  143. &:first-child {
  144. display: flex;
  145. flex-direction: column;
  146. align-items: center;
  147. margin-right: 15rpx;
  148. width: 25rpx;
  149. .plan-icon {
  150. margin-bottom: 17.5rpx;
  151. width: 25rpx;
  152. height: 25rpx;
  153. }
  154. .line {
  155. width: 5rpx;
  156. height: 75rpx;
  157. background-color: #E6EAF2;
  158. }
  159. }
  160. }
  161. }
  162. .btn-group {
  163. display: flex;
  164. justify-content: space-between;
  165. padding: 0 25rpx;
  166. }
  167. }
  168. }
  169. }
  170. }
  171. </style>