|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<script setup> |
|
|
|
|
import {reportPage,recessedData, excelEntryWindowList} from '@/api/entryWindow/index' |
|
|
|
|
import {reportPage,recessedData} from '@/api/entryWindow/index' |
|
|
|
|
import useCatchStore from "@/stores/modules/catch"; |
|
|
|
|
import {listPolice} from "@/api/system/police"; |
|
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
|
@ -13,29 +13,14 @@ const uid = userStore.user.userName;
|
|
|
|
|
const dict = catchStore.getDicts(["procurementMethod"]); |
|
|
|
|
const tableData = ref([]) |
|
|
|
|
const ressDialog =ref(false) |
|
|
|
|
const activeTab = ref('all') |
|
|
|
|
const exportLoading = ref(false) |
|
|
|
|
const stageNodeMap = { |
|
|
|
|
pending: ['initial', 'review'], |
|
|
|
|
auditing: ['first', 'second', 'third', 'Lead'], |
|
|
|
|
issued: ['original', 'audit', 'end'] |
|
|
|
|
} |
|
|
|
|
const currentNodeOptions = Object.entries(FlowNodeEnum).map(([value, label]) => ({ value, label })) |
|
|
|
|
const filteredNodeOptions = computed(() => { |
|
|
|
|
const allowedNodes = stageNodeMap[activeTab.value] |
|
|
|
|
if (!allowedNodes) { |
|
|
|
|
return currentNodeOptions |
|
|
|
|
} |
|
|
|
|
return currentNodeOptions.filter(item => allowedNodes.includes(item.value)) |
|
|
|
|
}) |
|
|
|
|
const createDefaultQuery = () => ({ |
|
|
|
|
let query = ref({ |
|
|
|
|
current: 1, |
|
|
|
|
size: 10, |
|
|
|
|
code:'all', |
|
|
|
|
nodeList: [], |
|
|
|
|
auditLevel: '' |
|
|
|
|
}) |
|
|
|
|
let query = ref(createDefaultQuery()) |
|
|
|
|
let showRecord =ref(false) |
|
|
|
|
let total = ref(10) |
|
|
|
|
let loading =ref(false) |
|
|
|
|
@ -97,21 +82,9 @@ const showRecordClose = ()=>{
|
|
|
|
|
showRecord.value=false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const syncNodeListByTab = () => { |
|
|
|
|
const allowedNodes = stageNodeMap[activeTab.value] |
|
|
|
|
if (!allowedNodes) { |
|
|
|
|
query.value.nodeList = [] |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
query.value.nodeList = [...allowedNodes] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleClick =(tab)=>{ |
|
|
|
|
const tabName = tab.props.name; |
|
|
|
|
activeTab.value = tabName; |
|
|
|
|
query.value.current = 1; |
|
|
|
|
query.value.code = tabName === 'recessed' ? '1' : 'all'; |
|
|
|
|
syncNodeListByTab() |
|
|
|
|
const handleClick =(val)=>{ |
|
|
|
|
query.value.code=val.props.name; |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -141,23 +114,15 @@ const getList =async ()=>{
|
|
|
|
|
total.value=res.total |
|
|
|
|
loading.value=false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const handleExcel = async ()=>{ |
|
|
|
|
if (exportLoading.value) return; |
|
|
|
|
try { |
|
|
|
|
exportLoading.value = true; |
|
|
|
|
await excelEntryWindowList(query.value); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error('导出失败', e); |
|
|
|
|
feedback.msgError("导出失败"); |
|
|
|
|
} finally { |
|
|
|
|
exportLoading.value = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//重置 |
|
|
|
|
const reset =()=>{ |
|
|
|
|
query.value = createDefaultQuery(); |
|
|
|
|
activeTab.value = 'all' |
|
|
|
|
query.value = { |
|
|
|
|
current: 1, |
|
|
|
|
size: 10, |
|
|
|
|
code:'all', |
|
|
|
|
nodeList: [], |
|
|
|
|
auditLevel: '' |
|
|
|
|
}; |
|
|
|
|
getList(); |
|
|
|
|
} |
|
|
|
|
getList() |
|
|
|
|
@ -399,7 +364,7 @@ const isAdminShow = ()=>{
|
|
|
|
|
collapse-tags-tooltip |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in filteredNodeOptions" |
|
|
|
|
v-for="item in currentNodeOptions" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
@ -446,7 +411,6 @@ const isAdminShow = ()=>{
|
|
|
|
|
</el-form> |
|
|
|
|
<div class="flex end"> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" :loading="exportLoading" @click="handleExcel">导出</el-button> |
|
|
|
|
<el-button type="primary" @click="getList"> |
|
|
|
|
<template #icon> |
|
|
|
|
<icon name="el-icon-Search"/> |
|
|
|
|
@ -459,12 +423,10 @@ const isAdminShow = ()=>{
|
|
|
|
|
</div> |
|
|
|
|
</header> |
|
|
|
|
<div class="table-container"> |
|
|
|
|
<el-tabs v-model="activeTab" @tab-click="handleClick"> |
|
|
|
|
<el-tabs v-model="query.code" @tab-click="handleClick"> |
|
|
|
|
<el-tab-pane label="全部" name="all"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="待受理" name="pending"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="审计中" name="auditing"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="已发文" name="issued"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="退窗" name="recessed"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="进窗" name="0"></el-tab-pane> |
|
|
|
|
<el-tab-pane label="退窗" name="1"></el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<el-table :data="tableData" v-loading="loading"> |
|
|
|
|
<el-table-column label="项目名称" prop="reportName" width="200" /> |
|
|
|
|
|