fb6fdb50 by lihua

资产登记进度一览

1 parent 85ef7667
...@@ -58,7 +58,9 @@ onMounted(() => { ...@@ -58,7 +58,9 @@ onMounted(() => {
58 }) 58 })
59 59
60 //判断token的过期时间。 60 //判断token的过期时间。
61 if (!route.fullPath?.includes('?code=')) {
61 userStore.refreshUserToken(); 62 userStore.refreshUserToken();
63 }
62 }) 64 })
63 65
64 import.meta.env.VITE_APP_DEBUG_TOOL === 'eruda' && eruda.init() 66 import.meta.env.VITE_APP_DEBUG_TOOL === 'eruda' && eruda.init()
......
...@@ -431,7 +431,18 @@ export const getExchangeList = (params) => request({ ...@@ -431,7 +431,18 @@ export const getExchangeList = (params) => request({
431 data: params 431 data: params
432 }) 432 })
433 433
434 /** 登记进度一览 */
435 export const getRegisterOverview = (params) => request({
436 url: `${import.meta.env.VITE_API_NEW_PORTAL}/register-base/dam-register-overview`,
437 method: 'post',
438 data: params
439 })
434 440
441 /** 获取资产登记的下拉数交所 */
442 export const getRegisterExchangeList = () => request({
443 url: `${import.meta.env.VITE_APP_PERSONAL_URL}/tenant/get-data-exchange-tenant`,
444 method: 'get'
445 })
435 446
436 // API详情 447 // API详情
437 /** 查询域名和文根 */ 448 /** 查询域名和文根 */
......
...@@ -489,6 +489,12 @@ onMounted(() => { ...@@ -489,6 +489,12 @@ onMounted(() => {
489 </template> 489 </template>
490 <span v-else>{{ scope.row[item.field] ?? "--" }}</span> 490 <span v-else>{{ scope.row[item.field] ?? "--" }}</span>
491 </template> 491 </template>
492 <template #default="scope" v-else-if="item.type == 'stepsBar'">
493 <div :class="item.className" v-if="item.stepsInfo(scope)">
494 <StepBar :steps-info="item.stepsInfo(scope)" />
495 </div>
496 <span v-else>--</span>
497 </template>
492 <template #default="scope" v-else> 498 <template #default="scope" v-else>
493 <template v-if="item.getSvg"> 499 <template v-if="item.getSvg">
494 <el-icon class="svg-title-icon" :class="item.getSvg(scope)"> 500 <el-icon class="svg-title-icon" :class="item.getSvg(scope)">
......
...@@ -196,6 +196,27 @@ const routes: RouteRecordRaw[] = [ ...@@ -196,6 +196,27 @@ const routes: RouteRecordRaw[] = [
196 }, 196 },
197 }, 197 },
198 ] 198 ]
199 },
200 {
201 path: '/data-asset-register/register-progress',
202 component: Layout,
203 meta: {
204 title: '登记进度一览',
205 icon: 'ep:grid',
206 },
207 children: [
208 {
209 path: '',
210 name: 'registerProgress',
211 component: () => import('@/views/data_asset/registerProgress.vue'),
212 meta: {
213 title: '登记进度一览',
214 sidebar: false,
215 cache: true,
216 breadcrumb: false,
217 },
218 },
219 ]
199 } 220 }
200 ] 221 ]
201 export default routes 222 export default routes
......
...@@ -493,7 +493,7 @@ export const tagType = (row, type): any => { ...@@ -493,7 +493,7 @@ export const tagType = (row, type): any => {
493 } else { 493 } else {
494 state = 'info'; 494 state = 'info';
495 } 495 }
496 } else if (type == 'state') { 496 } else if (type == 'state' || type == 'documentState') {
497 switch (row[type]) { 497 switch (row[type]) {
498 case 'N': 498 case 'N':
499 state = 'warning'; 499 state = 'warning';
...@@ -504,6 +504,7 @@ export const tagType = (row, type): any => { ...@@ -504,6 +504,7 @@ export const tagType = (row, type): any => {
504 case "R": 504 case "R":
505 state = 'danger' 505 state = 'danger'
506 break; 506 break;
507 case -1:
507 case 0: 508 case 0:
508 state = 'info'; 509 state = 'info';
509 break; 510 break;
...@@ -679,7 +680,7 @@ export const tagMethod = (row, type) => { ...@@ -679,7 +680,7 @@ export const tagMethod = (row, type) => {
679 tag = '关闭' 680 tag = '关闭'
680 break; 681 break;
681 } 682 }
682 } else if (type == 'state') { //纠纷处理状态 683 } else if (type == 'state' || type == 'documentState') { //纠纷处理状态
683 switch (row[type]) { 684 switch (row[type]) {
684 case 3: 685 case 3:
685 tag = '发证中' 686 tag = '发证中'
...@@ -696,6 +697,9 @@ export const tagMethod = (row, type) => { ...@@ -696,6 +697,9 @@ export const tagMethod = (row, type) => {
696 case 0: 697 case 0:
697 tag = '已过期' 698 tag = '已过期'
698 break; 699 break;
700 case -1:
701 tag = '未发证'
702 break;
699 case "Y": 703 case "Y":
700 tag = '已通过' 704 tag = '已通过'
701 break; 705 break;
......
1 <route lang="yaml">
2 name: registerProgress
3 </route>
4
5 <script lang="ts" setup name="registerProgress">
6 import { ref } from 'vue';
7 import TableTools from "@/components/Tools/table_tools.vue";
8 import {
9 getRegisterOverview,
10 getRegisterExchangeList
11 } from "@/api/modules/dataAsset";
12 import { TableColumnWidth, commonPageConfig } from '@/utils/enum';
13
14 const router = useRouter();
15 const { proxy } = getCurrentInstance() as any;
16
17 /** 下拉数交所列表 */
18 const exchangList = ref([]);
19
20 const searchItemList = ref([
21 {
22 type: "input",
23 label: "",
24 field: "daName",
25 default: "",
26 maxlength: 50,
27 placeholder: "数据资产名称",
28 clearable: true,
29 },
30 {
31 label: "数交所",
32 type: "select",
33 placeholder: "数交所",
34 field: "exchangGuid",
35 options: exchangList.value,
36 props: {
37 value: 'guid',
38 label: 'tenantName'
39 },
40 default: '',
41 filterable: true,
42 clearable: true,
43 },
44 {
45 type: 'select',
46 label: '',
47 field: 'approveState',
48 default: '',
49 placeholder: '流程状态',
50 options: [
51 { label: '审批中', value: 'A' },
52 { label: '已通过', value: 'Y' },
53 { label: '已驳回', value: 'R' }
54 ],
55 clearable: true
56 },
57 {
58 type: "date-time",
59 field: "dateRange",
60 default: null,
61 placeholder: "开始时间~结束时间",
62 clearable: true,
63 required: true
64 }
65 ]);
66
67 const toSearch = (val: any, clear: boolean = false) => {
68 page.value.curr = 1;
69 if (clear) {
70 searchItemList.value.map((item) => (item.default = ""));
71 page.value.daName = '';
72 page.value.exchangGuid = "";
73 page.value.approveState = "";
74 page.value.dateRange = [];
75 } else {
76 page.value.daName = val.daName;
77 page.value.exchangGuid = val.exchangGuid;
78 page.value.approveState = val.approveState;
79 page.value.dateRange = val.dateRange;
80 }
81 getTableData();
82 };
83
84 const getTableData = () => {
85 tableInfo.value.loading = true;
86 getRegisterOverview({
87 pageSize: page.value.limit,
88 pageIndex: page.value.curr,
89 daName: page.value.daName,
90 exchangGuid: page.value.exchangGuid,
91 approveState: page.value.approveState,
92 startTime: page.value.dateRange?.[0] || '',
93 endTime: page.value.dateRange?.[1] || '',
94 }).then((res: any) => {
95 tableInfo.value.loading = false
96 if (res.code == proxy.$passCode) {
97 const data = res.data || {}
98 tableInfo.value.data = data.records || [];
99 tableInfo.value.page.curr = data.pageIndex;
100 tableInfo.value.page.rows = data.totalRows || 0;
101 } else {
102 proxy.$ElMessage.error(res.msg);
103 }
104 })
105 }
106
107 const page = ref({
108 ...commonPageConfig,
109 daName: '',
110 exchangGuid: '',
111 approveState: '',
112 dateRange: []
113 });
114
115 const tableInfo = ref({
116 id: 'dissent-data-table',
117 rowKey: 'guid',
118 loading: false,
119 fields: [{ label: "序号", type: "index", width: 56, align: "center" },
120 { label: "数据资产名称", field: "daName", width: 180, align: "left", type: 'text_btn', value: 'assetDetail', columClass: 'text_btn', click: (scope) => {
121 let row = scope.row;
122 router.push({
123 name: 'registerInfoDetail',
124 query: { guid: row.guid, name: row.daName, tenantGuid: row.tenantGuid, tenantName: row.tenantName, type: 'asset' }
125 });
126 } },
127 { label: "所属公司", field: "tenantName", width: 240 },
128 { label: "数交所", field: "exchangeName", width: 200 },
129 { label: "流程状态", field: "approveVO", type: "approveTag", width: 96, align: 'center' },
130 {
131 label: "提交时间", field: "createTime", width: TableColumnWidth.DATETIME, align: "left", getName: (scope) => {
132 return scope.row.approveVO?.createTime || '--';
133 }
134 },
135 { label: "证书状态", field: "documentState", type: "tag", width: 96, align: 'center' },
136 {
137 label: "审核阶段", field: "progress", className: 'custom-steps', type: "stepsBar", width: 320, align: 'center', fixed: 'right', stepsInfo: (scope) => {
138 let nodes = scope.row.approveVO?.nodes;
139 if (!nodes?.length) {
140 return null;
141 }
142 return {
143 list: nodes.map((n, index) => {
144 return {
145 title: n.processName,
146 value: index + 1
147 }
148 }),
149 step: nodes.findIndex(n => !n.approveState) == -1 ? 3 : (nodes.findIndex(n => !n.approveState) - 1)
150 }
151 }
152 },
153 ],
154 data: [],
155 page: {
156 type: "normal",
157 rows: 0,
158 ...page.value,
159 },
160 actionInfo: {
161 show: false
162 }
163 });
164
165 const tablePageChange = (info) => {
166 page.value.curr = Number(info.curr);
167 page.value.limit = Number(info.limit);
168 getTableData();
169 };
170
171 onBeforeMount(() => {
172 getRegisterExchangeList().then((res: any) => {
173 if (res.code == proxy.$passCode) {
174 exchangList.value = res.data || [];
175 searchItemList.value[1].options = exchangList.value;
176 } else {
177 proxy.$ElMessage.error(res.msg);
178 }
179 })
180 })
181
182 </script>
183
184 <template>
185 <div class="container_wrap">
186 <div class="table_tool_wrap">
187 <TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" :init="true" />
188 </div>
189 <div class="table_panel_wrap">
190 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
191 </div>
192 </div>
193 </template>
194
195 <style scoped lang="scss">
196 .container_wrap {
197 padding: 0 16px;
198 }
199
200 .table_panel_wrap {
201 height: calc(100% - 48px);
202 }
203
204 :deep(.el-dialog) {
205 .dialog_panel {
206 padding: 14px 24px;
207 }
208 }
209
210 :deep(.custom-steps) {
211 width: 100%;
212 height: 60px;
213 display: flex;
214
215 .el-steps {
216 width: 100%;
217 }
218 }
219 </style>
...\ No newline at end of file ...\ 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!