2c76be84 by lihua

资产登记进度一览

1 parent 41eb9630
......@@ -58,7 +58,9 @@ onMounted(() => {
})
//判断token的过期时间。
userStore.refreshUserToken();
if (!route.fullPath?.includes('?code=')) {
userStore.refreshUserToken();
}
})
import.meta.env.VITE_APP_DEBUG_TOOL === 'eruda' && eruda.init()
......
......@@ -431,7 +431,18 @@ export const getExchangeList = (params) => request({
data: params
})
/** 登记进度一览 */
export const getRegisterOverview = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/dam-register-overview`,
method: 'post',
data: params
})
/** 获取资产登记的下拉数交所 */
export const getRegisterExchangeList = () => request({
url: `${import.meta.env.VITE_APP_PERSONAL_URL}/tenant/get-data-exchange-tenant`,
method: 'get'
})
// API详情
/** 查询域名和文根 */
......
......@@ -489,6 +489,12 @@ onMounted(() => {
</template>
<span v-else>{{ scope.row[item.field] ?? "--" }}</span>
</template>
<template #default="scope" v-else-if="item.type == 'stepsBar'">
<div :class="item.className" v-if="item.stepsInfo(scope)">
<StepBar :steps-info="item.stepsInfo(scope)" />
</div>
<span v-else>--</span>
</template>
<template #default="scope" v-else>
<template v-if="item.getSvg">
<el-icon class="svg-title-icon" :class="item.getSvg(scope)">
......
......@@ -196,6 +196,27 @@ const routes: RouteRecordRaw[] = [
},
},
]
},
{
path: '/data-asset-register/register-progress',
component: Layout,
meta: {
title: '登记进度一览',
icon: 'ep:grid',
},
children: [
{
path: '',
name: 'registerProgress',
component: () => import('@/views/data_asset/registerProgress.vue'),
meta: {
title: '登记进度一览',
sidebar: false,
cache: true,
breadcrumb: false,
},
},
]
}
]
export default routes
......
......@@ -493,7 +493,7 @@ export const tagType = (row, type): any => {
} else {
state = 'info';
}
} else if (type == 'state') {
} else if (type == 'state' || type == 'documentState') {
switch (row[type]) {
case 'N':
state = 'warning';
......@@ -504,7 +504,8 @@ export const tagType = (row, type): any => {
case "R":
state = 'danger'
break;
case 0:
case -1:
case 0:
state = 'info';
break;
case 1:
......@@ -679,7 +680,7 @@ export const tagMethod = (row, type) => {
tag = '关闭'
break;
}
} else if (type == 'state') { //纠纷处理状态
} else if (type == 'state' || type == 'documentState') { //纠纷处理状态
switch (row[type]) {
case 3:
tag = '发证中'
......@@ -696,6 +697,9 @@ export const tagMethod = (row, type) => {
case 0:
tag = '已过期'
break;
case -1:
tag = '未发证'
break;
case "Y":
tag = '已通过'
break;
......
<route lang="yaml">
name: registerProgress
</route>
<script lang="ts" setup name="registerProgress">
import { ref } from 'vue';
import TableTools from "@/components/Tools/table_tools.vue";
import {
getRegisterOverview,
getRegisterExchangeList
} from "@/api/modules/dataAsset";
import { TableColumnWidth, commonPageConfig } from '@/utils/enum';
const router = useRouter();
const { proxy } = getCurrentInstance() as any;
/** 下拉数交所列表 */
const exchangList = ref([]);
const searchItemList = ref([
{
type: "input",
label: "",
field: "daName",
default: "",
maxlength: 50,
placeholder: "数据资产名称",
clearable: true,
},
{
label: "数交所",
type: "select",
placeholder: "数交所",
field: "exchangGuid",
options: exchangList.value,
props: {
value: 'guid',
label: 'tenantName'
},
default: '',
filterable: true,
clearable: true,
},
{
type: 'select',
label: '',
field: 'approveState',
default: '',
placeholder: '流程状态',
options: [
{ label: '审批中', value: 'A' },
{ label: '已通过', value: 'Y' },
{ label: '已驳回', value: 'R' }
],
clearable: true
},
{
type: "date-time",
field: "dateRange",
default: null,
placeholder: "开始时间~结束时间",
clearable: true,
required: true
}
]);
const toSearch = (val: any, clear: boolean = false) => {
page.value.curr = 1;
if (clear) {
searchItemList.value.map((item) => (item.default = ""));
page.value.daName = '';
page.value.exchangGuid = "";
page.value.approveState = "";
page.value.dateRange = [];
} else {
page.value.daName = val.daName;
page.value.exchangGuid = val.exchangGuid;
page.value.approveState = val.approveState;
page.value.dateRange = val.dateRange;
}
getTableData();
};
const getTableData = () => {
tableInfo.value.loading = true;
getRegisterOverview({
pageSize: page.value.limit,
pageIndex: page.value.curr,
daName: page.value.daName,
exchangGuid: page.value.exchangGuid,
approveState: page.value.approveState,
startTime: page.value.dateRange?.[0] || '',
endTime: page.value.dateRange?.[1] || '',
}).then((res: any) => {
tableInfo.value.loading = false
if (res.code == proxy.$passCode) {
const data = res.data || {}
tableInfo.value.data = data.records || [];
tableInfo.value.page.curr = data.pageIndex;
tableInfo.value.page.rows = data.totalRows || 0;
} else {
proxy.$ElMessage.error(res.msg);
}
})
}
const page = ref({
...commonPageConfig,
daName: '',
exchangGuid: '',
approveState: '',
dateRange: []
});
const tableInfo = ref({
id: 'dissent-data-table',
rowKey: 'guid',
loading: false,
fields: [{ label: "序号", type: "index", width: 56, align: "center" },
{ label: "数据资产名称", field: "daName", width: 180, align: "left", type: 'text_btn', value: 'assetDetail', columClass: 'text_btn', click: (scope) => {
let row = scope.row;
router.push({
name: 'registerInfoDetail',
query: { guid: row.guid, name: row.daName, tenantGuid: row.tenantGuid, tenantName: row.tenantName, type: 'asset' }
});
} },
{ label: "所属公司", field: "tenantName", width: 240 },
{ label: "数交所", field: "exchangeName", width: 200 },
{ label: "流程状态", field: "approveVO", type: "approveTag", width: 96, align: 'center' },
{
label: "提交时间", field: "createTime", width: TableColumnWidth.DATETIME, align: "left", getName: (scope) => {
return scope.row.approveVO?.createTime || '--';
}
},
{ label: "证书状态", field: "documentState", type: "tag", width: 96, align: 'center' },
{
label: "审核阶段", field: "progress", className: 'custom-steps', type: "stepsBar", width: 320, align: 'center', fixed: 'right', stepsInfo: (scope) => {
let nodes = scope.row.approveVO?.nodes;
if (!nodes?.length) {
return null;
}
return {
list: nodes.map((n, index) => {
return {
title: n.processName,
value: index + 1
}
}),
step: nodes.findIndex(n => !n.approveState) == -1 ? 3 : (nodes.findIndex(n => !n.approveState) - 1)
}
}
},
],
data: [],
page: {
type: "normal",
rows: 0,
...page.value,
},
actionInfo: {
show: false
}
});
const tablePageChange = (info) => {
page.value.curr = Number(info.curr);
page.value.limit = Number(info.limit);
getTableData();
};
onBeforeMount(() => {
getRegisterExchangeList().then((res: any) => {
if (res.code == proxy.$passCode) {
exchangList.value = res.data || [];
searchItemList.value[1].options = exchangList.value;
} else {
proxy.$ElMessage.error(res.msg);
}
})
})
</script>
<template>
<div class="container_wrap">
<div class="table_tool_wrap">
<TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" :init="true" />
</div>
<div class="table_panel_wrap">
<Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
</div>
</div>
</template>
<style scoped lang="scss">
.container_wrap {
padding: 0 16px;
}
.table_panel_wrap {
height: calc(100% - 48px);
}
:deep(.el-dialog) {
.dialog_panel {
padding: 14px 24px;
}
}
:deep(.custom-steps) {
width: 100%;
height: 60px;
display: flex;
.el-steps {
width: 100%;
}
}
</style>
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!