0444846422
- 申报记录详情弹窗新增撤回、作废(强制放行)入口,覆盖 9 个模块 - 申报管理支持配置允许重复提交与最多同时条数 - 批量导入逐行容错,命中重复时跳过并给出失败清单导出
236 lines
5.9 KiB
Vue
236 lines
5.9 KiB
Vue
<template>
|
|
<div class="page">
|
|
<div class="ele-body">
|
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
|
<ele-pro-table
|
|
ref="tableRef"
|
|
row-key="id"
|
|
:columns="columns"
|
|
:datasource="datasource"
|
|
tool-class="ele-toolbar-form"
|
|
class="sys-org-table"
|
|
>
|
|
<template #toolbar>
|
|
<search
|
|
@search="reload"
|
|
:selection="selection"
|
|
@add="openEdit"
|
|
@remove="removeBatch"
|
|
@batchMove="openMove"
|
|
/>
|
|
</template>
|
|
<template #bodyCell="{ column, record }">
|
|
<template v-if="column.key === 'status'">
|
|
<a-tag v-if="record.status === 0">待审核</a-tag>
|
|
<a-tag v-else-if="record.status === 1" color="green">通过</a-tag>
|
|
<a-tag v-else-if="record.status === 2" color="red">驳回</a-tag>
|
|
</template>
|
|
<template v-if="column.key === 'action'">
|
|
<a-space>
|
|
<a @click="openDataModal(record)">查看数据</a>
|
|
<a-divider type="vertical" />
|
|
<a @click="openFlowModal(record)">查看审核流</a>
|
|
</a-space>
|
|
</template>
|
|
</template>
|
|
</ele-pro-table>
|
|
</a-card>
|
|
|
|
<ReviewListEdit
|
|
v-model:visible="showEdit"
|
|
:data="current"
|
|
@done="reload"
|
|
/>
|
|
<ModuleDataModal
|
|
v-model:visible="showDataVisible"
|
|
:module="dataCurrent?.module"
|
|
:module-name="dataCurrent?.moduleName"
|
|
:pk="dataCurrent?.pk"
|
|
@done="reload"
|
|
/>
|
|
<ReviewFlowModal
|
|
v-model:visible="showFlowVisible"
|
|
:module="flowCurrent?.module"
|
|
:module-name="flowCurrent?.moduleName"
|
|
:pk="flowCurrent?.pk"
|
|
@done="reload"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { createVNode, ref } from 'vue';
|
|
import { message, Modal } from 'ant-design-vue';
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
import type { EleProTable } from 'ele-admin-pro';
|
|
import { toDateString } from 'ele-admin-pro';
|
|
import type {
|
|
DatasourceFunction,
|
|
ColumnItem
|
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
|
import Search from './components/search.vue';
|
|
import ReviewListEdit from './components/reviewListEdit.vue';
|
|
import ModuleDataModal from './components/moduleDataModal.vue';
|
|
import ReviewFlowModal from './components/reviewFlowModal.vue';
|
|
import {
|
|
pageGroupReviewList,
|
|
removeBatchReviewList
|
|
} from '@/api/gxmu/reviewList';
|
|
import type {
|
|
ReviewList,
|
|
ReviewListParam
|
|
} from '@/api/gxmu/reviewList/model';
|
|
|
|
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
|
const selection = ref<ReviewList[]>([]);
|
|
const current = ref<ReviewList | null>(null);
|
|
const dataCurrent = ref<ReviewList | null>(null);
|
|
const flowCurrent = ref<ReviewList | null>(null);
|
|
const showEdit = ref(false);
|
|
const showDataVisible = ref(false);
|
|
const showFlowVisible = ref(false);
|
|
const showMove = ref(false);
|
|
const loading = ref(true);
|
|
|
|
const datasource: DatasourceFunction = ({
|
|
page,
|
|
limit,
|
|
where,
|
|
orders,
|
|
filters
|
|
}) => {
|
|
if (filters) {
|
|
where.status = filters.status;
|
|
}
|
|
return pageGroupReviewList({
|
|
...where,
|
|
...orders,
|
|
page,
|
|
limit
|
|
});
|
|
};
|
|
|
|
const columns = ref<ColumnItem[]>([
|
|
{
|
|
title: 'ID',
|
|
dataIndex: 'id',
|
|
key: 'id',
|
|
align: 'center',
|
|
width: 90
|
|
},
|
|
{
|
|
title: '模块',
|
|
dataIndex: 'moduleName',
|
|
key: 'module',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '名称',
|
|
dataIndex: 'businessName',
|
|
key: 'businessName',
|
|
align: 'center',
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: '状态',
|
|
dataIndex: 'status',
|
|
key: 'status',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '最新审核意见',
|
|
dataIndex: 'content',
|
|
key: 'content',
|
|
align: 'center',
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: '提交时间',
|
|
dataIndex: 'createTime',
|
|
key: 'createTime',
|
|
align: 'center',
|
|
sorter: true,
|
|
ellipsis: true,
|
|
customRender: ({ text }) => toDateString(text, 'yyyy-MM-dd HH:mm:ss')
|
|
},
|
|
{
|
|
title: '当前审核人',
|
|
dataIndex: ['user', 'realName'],
|
|
key: 'userId',
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '操作',
|
|
key: 'action',
|
|
width: 220,
|
|
fixed: 'right',
|
|
align: 'center',
|
|
hideInSetting: true
|
|
}
|
|
]);
|
|
|
|
const reload = (where?: ReviewListParam) => {
|
|
selection.value = [];
|
|
tableRef?.value?.reload({ where });
|
|
};
|
|
|
|
const openEdit = (row?: ReviewList) => {
|
|
current.value = row ?? null;
|
|
showEdit.value = true;
|
|
};
|
|
|
|
const openMove = () => {
|
|
showMove.value = true;
|
|
};
|
|
|
|
const openDataModal = (row: ReviewList) => {
|
|
dataCurrent.value = row;
|
|
showDataVisible.value = true;
|
|
};
|
|
|
|
const openFlowModal = (row: ReviewList) => {
|
|
flowCurrent.value = row;
|
|
showFlowVisible.value = true;
|
|
};
|
|
|
|
const removeBatch = () => {
|
|
if (!selection.value.length) {
|
|
message.error('请至少选择一条数据');
|
|
return;
|
|
}
|
|
Modal.confirm({
|
|
title: '提示',
|
|
content: '确定要删除选中的记录吗?',
|
|
icon: createVNode(ExclamationCircleOutlined),
|
|
maskClosable: true,
|
|
onOk: () => {
|
|
const hide = message.loading('请求中..', 0);
|
|
removeBatchReviewList(selection.value.map((d) => d.id))
|
|
.then((msg) => {
|
|
hide();
|
|
message.success(msg);
|
|
reload();
|
|
})
|
|
.catch((e) => {
|
|
hide();
|
|
message.error(e.message);
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
const query = () => {
|
|
loading.value = true;
|
|
};
|
|
|
|
query();
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
export default {
|
|
name: 'ReviewList'
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped></style> |