Compare commits

..

No commits in common. '405824c032cca0440f2e1ea58275e437ffe53730' and '7b29efb567d48022ac8b69085abdb4704a01cd92' have entirely different histories.

  1. 10
      src/api/entryWindow/index.ts
  2. 68
      src/views/entryWindow/index.vue

10
src/api/entryWindow/index.ts

@ -11,13 +11,3 @@ export const recessedData=(body)=>{
body body
}) })
} }
export const excelEntryWindowList = (body) => {
return request.post({
url: '/reportProject/excelEntryWindowList',
body,
config: {
excelName: '进退窗项目列表.xlsx'
},
showErrorMsg: true
})
}

68
src/views/entryWindow/index.vue

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

Loading…
Cancel
Save