浏览代码

任务审批显示修改

duy 7 月之前
父节点
当前提交
35456f9946
共有 1 个文件被更改,包括 16 次插入2 次删除
  1. 16 2
      src/views/tasks/hc-data.vue

+ 16 - 2
src/views/tasks/hc-data.vue

@@ -93,7 +93,9 @@ const tabsClick = ({ key }) => {
     tabsKey.value = key
     tabsKey.value = key
     searchForm.value.selectedType = key
     searchForm.value.selectedType = key
     searchForm.value.current = 1
     searchForm.value.current = 1
+    setTaskTastus(key)
     getTableData()
     getTableData()
+
 }
 }
 
 
 //搜索条件
 //搜索条件
@@ -115,9 +117,21 @@ const tasksStatus = ref([])
 const queryTaskStatus = async () => {
 const queryTaskStatus = async () => {
     const { data } = await mainApi.queryTaskStatus({ typeOrStatus: 'task_status' })
     const { data } = await mainApi.queryTaskStatus({ typeOrStatus: 'task_status' })
     tasksStatus.value = getArrValue(data)
     tasksStatus.value = getArrValue(data)
-    tasksStatus.value = [{ dictKey: '1', dictValue: '待审批' }, { dictKey: '2', dictValue: '已审批' }, { dictKey: '3', dictValue: '已废除' }, { dictKey: '4', dictValue: '可审批' }] 
+    // tasksStatus.value = [{ dictKey: '1', dictValue: '待审批' }, { dictKey: '2', dictValue: '已审批' }, { dictKey: '3', dictValue: '已废除' }, { dictKey: '4', dictValue: '可审批' }] 
+    tasksStatus.value = [{ dictKey: '1', dictValue: '待审批' }, { dictKey: '4', dictValue: '可审批' }] 
+}
+const setTaskTastus = (key) => {
+    if (key === '1') {
+        searchForm.value.statusValue = '4'
+        tasksStatus.value = [{ dictKey: '1', dictValue: '待审批' }, { dictKey: '4', dictValue: '可审批' }] 
+    } else if (key === '2') {
+         searchForm.value.statusValue = ''
+        tasksStatus.value = [{ dictKey: '2', dictValue: '已审批' }, { dictKey: '3', dictValue: '已废除' }] 
+    } else {
+            searchForm.value.statusValue = ''
+        tasksStatus.value = [{ dictKey: '1', dictValue: '待审批' }, { dictKey: '2', dictValue: '已审批' }, { dictKey: '3', dictValue: '已废除' }, { dictKey: '4', dictValue: '可审批' }] 
+    }
 }
 }
-
 //日期范围选择
 //日期范围选择
 const betweenTime = ref(null)
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ val, arr }) => {
 const betweenTimeUpdate = ({ val, arr }) => {