fix(gxmu): 审核状态文案「拒绝」统一改为「驳回」
审核列表状态标签、审核流通过/驳回操作与状态文案同步调整。
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
:loading="submitting"
|
:loading="submitting"
|
||||||
@click="openActionModal('reject', item)"
|
@click="openActionModal('reject', item)"
|
||||||
>
|
>
|
||||||
拒绝
|
驳回
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="actionVisible"
|
v-model:visible="actionVisible"
|
||||||
:title="actionType === 'approve' ? '审核通过' : '审核拒绝'"
|
:title="actionType === 'approve' ? '审核通过' : '审核驳回'"
|
||||||
ok-text="确认"
|
ok-text="确认"
|
||||||
cancel-text="取消"
|
cancel-text="取消"
|
||||||
:confirm-loading="submitting"
|
:confirm-loading="submitting"
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
|
|
||||||
const getStatusText = (status?: number) => {
|
const getStatusText = (status?: number) => {
|
||||||
if (status === 1) return '通过';
|
if (status === 1) return '通过';
|
||||||
if (status === 2) return '拒绝';
|
if (status === 2) return '驳回';
|
||||||
return '待审核';
|
return '待审核';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+168
-149
@@ -23,7 +23,7 @@
|
|||||||
<template v-if="column.key === 'status'">
|
<template v-if="column.key === 'status'">
|
||||||
<a-tag v-if="record.status === 0">待审核</a-tag>
|
<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 === 1" color="green">通过</a-tag>
|
||||||
<a-tag v-else-if="record.status === 2" color="red">拒绝</a-tag>
|
<a-tag v-else-if="record.status === 2" color="red">驳回</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<a-space>
|
<a-space>
|
||||||
@@ -36,7 +36,11 @@
|
|||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<ReviewListEdit v-model:visible="showEdit" :data="current" @done="reload" />
|
<ReviewListEdit
|
||||||
|
v-model:visible="showEdit"
|
||||||
|
:data="current"
|
||||||
|
@done="reload"
|
||||||
|
/>
|
||||||
<ModuleDataModal
|
<ModuleDataModal
|
||||||
v-model:visible="showDataVisible"
|
v-model:visible="showDataVisible"
|
||||||
:module="dataCurrent?.module"
|
:module="dataCurrent?.module"
|
||||||
@@ -55,162 +59,177 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref } from 'vue';
|
import { createVNode, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
import { toDateString } from 'ele-admin-pro';
|
import { toDateString } from 'ele-admin-pro';
|
||||||
import type { DatasourceFunction, ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
|
import type {
|
||||||
import Search from './components/search.vue';
|
DatasourceFunction,
|
||||||
import ReviewListEdit from './components/reviewListEdit.vue';
|
ColumnItem
|
||||||
import ModuleDataModal from './components/moduleDataModal.vue';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import ReviewFlowModal from './components/reviewFlowModal.vue';
|
import Search from './components/search.vue';
|
||||||
import { pageGroupReviewList, removeBatchReviewList } from '@/api/gxmu/reviewList';
|
import ReviewListEdit from './components/reviewListEdit.vue';
|
||||||
import type { ReviewList, ReviewListParam } from '@/api/gxmu/reviewList/model';
|
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 tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||||
const selection = ref<ReviewList[]>([]);
|
const selection = ref<ReviewList[]>([]);
|
||||||
const current = ref<ReviewList | null>(null);
|
const current = ref<ReviewList | null>(null);
|
||||||
const dataCurrent = ref<ReviewList | null>(null);
|
const dataCurrent = ref<ReviewList | null>(null);
|
||||||
const flowCurrent = ref<ReviewList | null>(null);
|
const flowCurrent = ref<ReviewList | null>(null);
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
const showDataVisible = ref(false);
|
const showDataVisible = ref(false);
|
||||||
const showFlowVisible = ref(false);
|
const showFlowVisible = ref(false);
|
||||||
const showMove = ref(false);
|
const showMove = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
const datasource: DatasourceFunction = ({ page, limit, where, orders, filters }) => {
|
const datasource: DatasourceFunction = ({
|
||||||
if (filters) {
|
|
||||||
where.status = filters.status;
|
|
||||||
}
|
|
||||||
return pageGroupReviewList({
|
|
||||||
...where,
|
|
||||||
...orders,
|
|
||||||
page,
|
page,
|
||||||
limit
|
limit,
|
||||||
});
|
where,
|
||||||
};
|
orders,
|
||||||
|
filters
|
||||||
const columns = ref<ColumnItem[]>([
|
}) => {
|
||||||
{
|
if (filters) {
|
||||||
title: 'ID',
|
where.status = filters.status;
|
||||||
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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
return pageGroupReviewList({
|
||||||
};
|
...where,
|
||||||
|
...orders,
|
||||||
|
page,
|
||||||
|
limit
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const query = () => {
|
const columns = ref<ColumnItem[]>([
|
||||||
loading.value = true;
|
{
|
||||||
};
|
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
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
query();
|
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>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'ReviewList'
|
name: 'ReviewList'
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
|||||||
Reference in New Issue
Block a user