diff --git a/src/views/entryWindow/index.vue b/src/views/entryWindow/index.vue index 6950c6f..fbd924c 100644 --- a/src/views/entryWindow/index.vue +++ b/src/views/entryWindow/index.vue @@ -13,14 +13,28 @@ const uid = userStore.user.userName; const dict = catchStore.getDicts(["procurementMethod"]); const tableData = ref([]) const ressDialog =ref(false) +const activeTab = ref('all') +const stageNodeMap = { + pending: ['initial', 'review'], + auditing: ['first', 'second', 'third', 'Lead'], + issued: ['original', 'audit', 'end'] +} const currentNodeOptions = Object.entries(FlowNodeEnum).map(([value, label]) => ({ value, label })) -let query = ref({ +const filteredNodeOptions = computed(() => { + const allowedNodes = stageNodeMap[activeTab.value] + if (!allowedNodes) { + return currentNodeOptions + } + return currentNodeOptions.filter(item => allowedNodes.includes(item.value)) +}) +const createDefaultQuery = () => ({ current: 1, size: 10, code:'all', nodeList: [], auditLevel: '' }) +let query = ref(createDefaultQuery()) let showRecord =ref(false) let total = ref(10) let loading =ref(false) @@ -82,9 +96,21 @@ const showRecordClose = ()=>{ showRecord.value=false } +const syncNodeListByTab = () => { + const allowedNodes = stageNodeMap[activeTab.value] + if (!allowedNodes) { + query.value.nodeList = [] + return + } + query.value.nodeList = [...allowedNodes] +} -const handleClick =(val)=>{ - query.value.code=val.props.name; +const handleClick =(tab)=>{ + const tabName = tab.props.name; + activeTab.value = tabName; + query.value.current = 1; + query.value.code = tabName === 'recessed' ? '1' : 'all'; + syncNodeListByTab() getList() } @@ -116,13 +142,8 @@ const getList =async ()=>{ } //重置 const reset =()=>{ - query.value = { - current: 1, - size: 10, - code:'all', - nodeList: [], - auditLevel: '' - }; + query.value = createDefaultQuery(); + activeTab.value = 'all' getList(); } getList() @@ -364,7 +385,7 @@ const isAdminShow = ()=>{ collapse-tags-tooltip > {
- + - - + + + +