improve-mission-list.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="improve-mission-list-page">
  3. <scroll-view class="scroll-y" scroll-y="true">
  4. <list-item
  5. v-for="(item, i) in improvingTaskList"
  6. :key="item.id"
  7. :task="item"
  8. />
  9. <list-item
  10. v-for="(item, i) in completeTaskList"
  11. :key="item.id"
  12. :task="item"
  13. :isComplete="true"
  14. />
  15. <tm-no-data v-if="completeTaskList.length === 0 && improvingTaskList.length === 0"
  16. :textArr="['暂时没有内容可以展示哦', '请返回上一页面或尝试刷新页面']" />
  17. </scroll-view>
  18. </view>
  19. </template>
  20. <script>
  21. // 改善列表
  22. import listItem from '../mission/components/list-item.vue';
  23. export default {
  24. data() {
  25. return {
  26. // 改善中任务
  27. improvingTaskList: [],
  28. // 历史任务
  29. completeTaskList: []
  30. }
  31. },
  32. onLoad({ situationId,systemSituationType }){ // situationId:情景id,systemSituationType 情境标签类型
  33. //当systemSituationType == 2时查看改善列表planType传1,查看督查改善列表
  34. this.getMissionList({situationId,planType:systemSituationType==2?1:0});
  35. },
  36. methods: {
  37. // 获取改善任务列表
  38. getMissionList(data) {
  39. this.$store.dispatch({
  40. type: 'mission/commActions',
  41. payload: {
  42. key: "getMissionList",
  43. data
  44. }
  45. }).then(data => {
  46. if(data) {
  47. this.improvingTaskList = data.improvingTaskResponses || [];
  48. this.completeTaskList = data.improveCompleteResponses || [];
  49. }
  50. });
  51. /** 请求参数 data
  52. * situationId: 情境id 当管路员或者查核者通过情境进入任务列表时 必传
  53. * checkItemId 单位负责人通过 查核要点进入改善任务列表时 必传
  54. */
  55. },
  56. },
  57. components: {
  58. listItem
  59. },
  60. }
  61. </script>
  62. <style lang="less">
  63. .improve-mission-list-page {
  64. height: 100%;
  65. padding-top: 15rpx;
  66. .scroll-y {
  67. height: 100%;
  68. }
  69. }
  70. </style>