敏感数据识别接口联调
Showing
6 changed files
with
169 additions
and
42 deletions
| ... | @@ -186,6 +186,12 @@ export const batchUpdateSensitiveDataTaskFieldStatus = (params) => request({ | ... | @@ -186,6 +186,12 @@ export const batchUpdateSensitiveDataTaskFieldStatus = (params) => request({ |
| 186 | data: params | 186 | data: params |
| 187 | }) | 187 | }) |
| 188 | 188 | ||
| 189 | /** 修改任务状态 */ | ||
| 190 | export const confirmTaskStatus = (guid) => request({ | ||
| 191 | url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/confirm-task?execGuid=${guid}`, | ||
| 192 | method: 'get' | ||
| 193 | }) | ||
| 194 | |||
| 189 | /** 获取敏感数据识别任务执行日志 */ | 195 | /** 获取敏感数据识别任务执行日志 */ |
| 190 | export const getSensitiveDataTaskExecLog = (params) => request({ | 196 | export const getSensitiveDataTaskExecLog = (params) => request({ |
| 191 | url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-exec-log`, | 197 | url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-exec-log`, | ... | ... |
| ... | @@ -100,7 +100,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -100,7 +100,7 @@ const routes: RouteRecordRaw[] = [ |
| 100 | }, | 100 | }, |
| 101 | beforeEnter: (to, from) => { | 101 | beforeEnter: (to, from) => { |
| 102 | if (to.query.taskName) { | 102 | if (to.query.taskName) { |
| 103 | to.meta.title = `敏感数据识别查看-${to.query.taskName}`; | 103 | to.meta.title = `敏感数据${to.query.isLook == '1' ? '日志查看' : '查看'}-${to.query.taskName}`; |
| 104 | } | 104 | } |
| 105 | } | 105 | } |
| 106 | }, | 106 | }, | ... | ... |
| ... | @@ -496,7 +496,7 @@ export const tagType = (row, type): any => { | ... | @@ -496,7 +496,7 @@ export const tagType = (row, type): any => { |
| 496 | } else { | 496 | } else { |
| 497 | state = 'info'; | 497 | state = 'info'; |
| 498 | } | 498 | } |
| 499 | } else if (type == 'sensitiveIdentifyTaskStatus') { | 499 | } else if (type == 'sensitiveIdentifyTaskStatus') { //敏感数据识别任务执行状态 |
| 500 | if (row[type] == 'Y') { | 500 | if (row[type] == 'Y') { |
| 501 | state = 'success' | 501 | state = 'success' |
| 502 | } else if (row[type] == 'N') { | 502 | } else if (row[type] == 'N') { |
| ... | @@ -506,6 +506,12 @@ export const tagType = (row, type): any => { | ... | @@ -506,6 +506,12 @@ export const tagType = (row, type): any => { |
| 506 | } else if (row[type] == 'R') { | 506 | } else if (row[type] == 'R') { |
| 507 | state = 'warning'; | 507 | state = 'warning'; |
| 508 | } | 508 | } |
| 509 | } else if (type == 'sensitiveIdentifyConfirmStatus') { //敏感数据识别任务确认状态 | ||
| 510 | if (row[type] == 'Y') { | ||
| 511 | state = 'success'; | ||
| 512 | } else { | ||
| 513 | state = 'warning'; | ||
| 514 | } | ||
| 509 | } else if (type == 'state' || type == 'documentState') { | 515 | } else if (type == 'state' || type == 'documentState') { |
| 510 | switch (row[type]) { | 516 | switch (row[type]) { |
| 511 | case 'N': | 517 | case 'N': |
| ... | @@ -829,6 +835,12 @@ export const tagMethod = (row, type) => { | ... | @@ -829,6 +835,12 @@ export const tagMethod = (row, type) => { |
| 829 | }else if (row[type] == 'R') { //部分通过 | 835 | }else if (row[type] == 'R') { //部分通过 |
| 830 | tag = '执行中'; | 836 | tag = '执行中'; |
| 831 | } | 837 | } |
| 838 | } else if (type == 'sensitiveIdentifyConfirmStatus') { | ||
| 839 | if (row[type] == 'Y') { | ||
| 840 | tag = '已确认' | ||
| 841 | } else { | ||
| 842 | tag = '待确认' | ||
| 843 | } | ||
| 832 | } else if (type == 'execState') { | 844 | } else if (type == 'execState') { |
| 833 | if (row[type] == 0 || row[type] == null) { | 845 | if (row[type] == 0 || row[type] == null) { |
| 834 | tag = '未执行' | 846 | tag = '未执行' | ... | ... |
| ... | @@ -200,6 +200,7 @@ const newCreateTaskFormItems = ref([{ | ... | @@ -200,6 +200,7 @@ const newCreateTaskFormItems = ref([{ |
| 200 | type: 'input', | 200 | type: 'input', |
| 201 | placeholder: '请选择', | 201 | placeholder: '请选择', |
| 202 | field: 'taskName', | 202 | field: 'taskName', |
| 203 | maxlength: 15, | ||
| 203 | default: '', | 204 | default: '', |
| 204 | required: true, | 205 | required: true, |
| 205 | filterable: true, | 206 | filterable: true, | ... | ... |
| ... | @@ -12,16 +12,23 @@ import { | ... | @@ -12,16 +12,23 @@ import { |
| 12 | getParamsList, | 12 | getParamsList, |
| 13 | updateSensitiveDataTaskFieldLabel, | 13 | updateSensitiveDataTaskFieldLabel, |
| 14 | batchUpdateSensitiveDataTaskFieldStatus, | 14 | batchUpdateSensitiveDataTaskFieldStatus, |
| 15 | confirmTaskStatus, | ||
| 15 | } from '@/api/modules/dataAnonymization'; | 16 | } from '@/api/modules/dataAnonymization'; |
| 16 | import PageNav from "@/components/PageNav/index.vue"; | 17 | import PageNav from "@/components/PageNav/index.vue"; |
| 17 | import { commonPageConfig } from '@/components/PageNav/index'; | 18 | import { commonPageConfig } from '@/components/PageNav/index'; |
| 18 | import { ElMessageBox } from 'element-plus'; | 19 | import { ElMessageBox } from 'element-plus'; |
| 19 | import { changeNum } from "@/utils/common"; | 20 | import { changeNum } from "@/utils/common"; |
| 20 | import BtnPopover from "@/components/Popover/index.vue"; | 21 | import BtnPopover from "@/components/Popover/index.vue"; |
| 22 | import useUserStore from "@/store/modules/user"; | ||
| 21 | 23 | ||
| 22 | const route = useRoute(); | 24 | const route = useRoute(); |
| 25 | const router = useRouter(); | ||
| 23 | const { proxy } = getCurrentInstance() as any; | 26 | const { proxy } = getCurrentInstance() as any; |
| 24 | const isLook = ref(!!route.query.isLook); | 27 | const userStore = useUserStore(); |
| 28 | const fullPath = route.fullPath; | ||
| 29 | const isLook = ref(route.query.isLook == '1'); | ||
| 30 | |||
| 31 | const fullScreenLoading = ref(false); | ||
| 25 | 32 | ||
| 26 | const treeInfo = ref({ | 33 | const treeInfo = ref({ |
| 27 | id: "data-list-tree", | 34 | id: "data-list-tree", |
| ... | @@ -65,7 +72,7 @@ const nodeClick = (data, node) => { | ... | @@ -65,7 +72,7 @@ const nodeClick = (data, node) => { |
| 65 | } | 72 | } |
| 66 | if (checkTableSave()) { | 73 | if (checkTableSave()) { |
| 67 | ElMessageBox.confirm( | 74 | ElMessageBox.confirm( |
| 68 | '存在未保存的数据,切换后会丢失,是否确定切换', | 75 | '存在未保存的数据,确定放弃修改吗?', |
| 69 | '提示', | 76 | '提示', |
| 70 | { | 77 | { |
| 71 | confirmButtonText: '确定', | 78 | confirmButtonText: '确定', |
| ... | @@ -87,14 +94,35 @@ const batchConfirm = () => { | ... | @@ -87,14 +94,35 @@ const batchConfirm = () => { |
| 87 | proxy.$ElMessage.error('请先勾选待确认的字段'); | 94 | proxy.$ElMessage.error('请先勾选待确认的字段'); |
| 88 | return; | 95 | return; |
| 89 | } | 96 | } |
| 90 | batchUpdateSensitiveDataTaskFieldStatus(selectTableFieldRows.value.map(s => s.guid)).then((res: any) => { | 97 | if (checkTableSave()) { |
| 91 | if (res?.code == proxy.$passCode) { | 98 | ElMessageBox.confirm( |
| 92 | proxy.$ElMessage.success('批量确认字段成功'); | 99 | '存在未保存的数据,确定放弃修改吗?', |
| 93 | getSensitiveTableFieldData(); | 100 | '提示', |
| 94 | } else { | 101 | { |
| 95 | proxy.$ElMessage.error(res.msg); | 102 | confirmButtonText: '确定', |
| 96 | } | 103 | cancelButtonText: '取消', |
| 97 | }) | 104 | type: 'warning', |
| 105 | } | ||
| 106 | ).then(() => { | ||
| 107 | batchUpdateSensitiveDataTaskFieldStatus(selectTableFieldRows.value.map(s => s.guid)).then((res: any) => { | ||
| 108 | if (res?.code == proxy.$passCode) { | ||
| 109 | proxy.$ElMessage.success('批量确认字段成功'); | ||
| 110 | getSensitiveTableFieldData(); | ||
| 111 | } else { | ||
| 112 | proxy.$ElMessage.error(res.msg); | ||
| 113 | } | ||
| 114 | }) | ||
| 115 | }) | ||
| 116 | } else { | ||
| 117 | batchUpdateSensitiveDataTaskFieldStatus(selectTableFieldRows.value.map(s => s.guid)).then((res: any) => { | ||
| 118 | if (res?.code == proxy.$passCode) { | ||
| 119 | proxy.$ElMessage.success('批量确认字段成功'); | ||
| 120 | getSensitiveTableFieldData(); | ||
| 121 | } else { | ||
| 122 | proxy.$ElMessage.error(res.msg); | ||
| 123 | } | ||
| 124 | }) | ||
| 125 | } | ||
| 98 | } | 126 | } |
| 99 | 127 | ||
| 100 | /** 数量统计信息 */ | 128 | /** 数量统计信息 */ |
| ... | @@ -120,7 +148,7 @@ const getExecSensitiveTableData = () => { | ... | @@ -120,7 +148,7 @@ const getExecSensitiveTableData = () => { |
| 120 | treeInfo.value.loading = false; | 148 | treeInfo.value.loading = false; |
| 121 | if (res?.code == proxy.$passCode) { | 149 | if (res?.code == proxy.$passCode) { |
| 122 | treeInfo.value.data = res.data?.map(d => { | 150 | treeInfo.value.data = res.data?.map(d => { |
| 123 | d.value = d.databaseName; | 151 | d.value = `${d.databaseName}-ds`; //解决文件名称和文件的sheet名称一样的树形选中问题 |
| 124 | d.label = d.databaseChName; | 152 | d.label = d.databaseChName; |
| 125 | d.tableList = d.tableList?.map(t => { | 153 | d.tableList = d.tableList?.map(t => { |
| 126 | t.value = t.tableName; | 154 | t.value = t.tableName; |
| ... | @@ -270,7 +298,7 @@ const popoverLabelListInfo = computed(() => { | ... | @@ -270,7 +298,7 @@ const popoverLabelListInfo = computed(() => { |
| 270 | const handleLabelPopoverClick = (scope) => { | 298 | const handleLabelPopoverClick = (scope) => { |
| 271 | if (checkTableSave()) { | 299 | if (checkTableSave()) { |
| 272 | ElMessageBox.confirm( | 300 | ElMessageBox.confirm( |
| 273 | '存在未保存的数据,切换后会丢失,是否确定切换', | 301 | '存在未保存的数据,确定放弃修改吗?', |
| 274 | '提示', | 302 | '提示', |
| 275 | { | 303 | { |
| 276 | confirmButtonText: '确定', | 304 | confirmButtonText: '确定', |
| ... | @@ -312,7 +340,7 @@ const popoverLabelTypeListInfo = computed(() => { | ... | @@ -312,7 +340,7 @@ const popoverLabelTypeListInfo = computed(() => { |
| 312 | const handleLabelTypePopoverClick = (scope) => { | 340 | const handleLabelTypePopoverClick = (scope) => { |
| 313 | if (checkTableSave()) { | 341 | if (checkTableSave()) { |
| 314 | ElMessageBox.confirm( | 342 | ElMessageBox.confirm( |
| 315 | '存在未保存的数据,切换后会丢失,是否确定切换', | 343 | '存在未保存的数据,确定放弃修改吗?', |
| 316 | '提示', | 344 | '提示', |
| 317 | { | 345 | { |
| 318 | confirmButtonText: '确定', | 346 | confirmButtonText: '确定', |
| ... | @@ -360,7 +388,7 @@ const popoverStatusListInfo = computed(() => { | ... | @@ -360,7 +388,7 @@ const popoverStatusListInfo = computed(() => { |
| 360 | const handleStatusPopoverClick = (scope) => { | 388 | const handleStatusPopoverClick = (scope) => { |
| 361 | if (checkTableSave()) { | 389 | if (checkTableSave()) { |
| 362 | ElMessageBox.confirm( | 390 | ElMessageBox.confirm( |
| 363 | '存在未保存的数据,切换后会丢失,是否确定切换', | 391 | '存在未保存的数据,确定放弃修改吗?', |
| 364 | '提示', | 392 | '提示', |
| 365 | { | 393 | { |
| 366 | confirmButtonText: '确定', | 394 | confirmButtonText: '确定', |
| ... | @@ -380,12 +408,23 @@ const handleStatusPopoverClick = (scope) => { | ... | @@ -380,12 +408,23 @@ const handleStatusPopoverClick = (scope) => { |
| 380 | } | 408 | } |
| 381 | 409 | ||
| 382 | /** 标签选择的值改变,标签类型跟着变化。 */ | 410 | /** 标签选择的值改变,标签类型跟着变化。 */ |
| 383 | const handleSelectChange = (val) => { | 411 | const handleSelectChange = (val, scope) => { |
| 384 | //暂时不处理,因为未保存会出现清空的场景,需要先存下之前的值。 | 412 | //暂时不处理,因为未保存会出现清空的场景,需要先存下之前的值。 |
| 413 | let label = allDataLabelList.value.find(label => label.guid == val); | ||
| 414 | if (label) { | ||
| 415 | scope.row.labelTypeCode = label.labelTypeCode; | ||
| 416 | scope.row.labelTypeName = label.labelTypeName; | ||
| 417 | scope.row.labelName = label.labelName; | ||
| 418 | } else { | ||
| 419 | scope.row.labelTypeCode = null; | ||
| 420 | scope.row.labelTypeName = null; | ||
| 421 | scope.row.labelName = null; | ||
| 422 | } | ||
| 385 | } | 423 | } |
| 386 | 424 | ||
| 387 | const sensitiveTableSelectable = (row, index) => { | 425 | const sensitiveTableSelectable = (row, index) => { |
| 388 | return row.confirmStatus == 'N'; | 426 | // return row.confirmStatus == 'N'; |
| 427 | return true; | ||
| 389 | } | 428 | } |
| 390 | 429 | ||
| 391 | const selectTableFieldRows: any = ref([]); | 430 | const selectTableFieldRows: any = ref([]); |
| ... | @@ -400,6 +439,10 @@ const handleFieldClickEdit = (scope) => { | ... | @@ -400,6 +439,10 @@ const handleFieldClickEdit = (scope) => { |
| 400 | } | 439 | } |
| 401 | 440 | ||
| 402 | const handleFieldClickSave = (scope) => { | 441 | const handleFieldClickSave = (scope) => { |
| 442 | if (!scope.row.labelGuid) { | ||
| 443 | proxy.$ElMessage.error('字段的标签不能为空'); | ||
| 444 | return; | ||
| 445 | } | ||
| 403 | let labelName = ''; | 446 | let labelName = ''; |
| 404 | let labelTypeCode = ''; | 447 | let labelTypeCode = ''; |
| 405 | if (scope.row.labelGuid) { | 448 | if (scope.row.labelGuid) { |
| ... | @@ -421,7 +464,7 @@ const handleFieldClickSave = (scope) => { | ... | @@ -421,7 +464,7 @@ const handleFieldClickSave = (scope) => { |
| 421 | getSensitiveTableFieldData(); | 464 | getSensitiveTableFieldData(); |
| 422 | getSensitiveFieldLabelData(); | 465 | getSensitiveFieldLabelData(); |
| 423 | getCntSumInfo(); | 466 | getCntSumInfo(); |
| 424 | proxy.$ElMessage.success('标签修改成功'); | 467 | proxy.$ElMessage.success('字段的标签修改成功'); |
| 425 | } else { | 468 | } else { |
| 426 | proxy.$ElMessage.error(res.msg); | 469 | proxy.$ElMessage.error(res.msg); |
| 427 | } | 470 | } |
| ... | @@ -441,7 +484,7 @@ const pageChange = (info) => { | ... | @@ -441,7 +484,7 @@ const pageChange = (info) => { |
| 441 | } | 484 | } |
| 442 | if (toChange) { | 485 | if (toChange) { |
| 443 | ElMessageBox.confirm( | 486 | ElMessageBox.confirm( |
| 444 | '存在未保存的数据,切换后会丢失,是否确定切换', | 487 | '存在未保存的数据,确定放弃修改吗?', |
| 445 | '提示', | 488 | '提示', |
| 446 | { | 489 | { |
| 447 | confirmButtonText: '确定', | 490 | confirmButtonText: '确定', |
| ... | @@ -456,19 +499,53 @@ const pageChange = (info) => { | ... | @@ -456,19 +499,53 @@ const pageChange = (info) => { |
| 456 | } | 499 | } |
| 457 | } | 500 | } |
| 458 | 501 | ||
| 502 | const cancel = () => { | ||
| 503 | if (checkTableSave()) { | ||
| 504 | proxy.$openMessageBox("当前页面存在未保存的数据,确定放弃修改吗?", () => { | ||
| 505 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 506 | router.push({ | ||
| 507 | name: 'sensitiveIdentify' | ||
| 508 | }); | ||
| 509 | }, () => { | ||
| 510 | proxy.$ElMessage.info("已取消"); | ||
| 511 | }); | ||
| 512 | } else { | ||
| 513 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 514 | router.push({ | ||
| 515 | name: 'sensitiveIdentify' | ||
| 516 | }); | ||
| 517 | } | ||
| 518 | } | ||
| 519 | |||
| 520 | const pageConfirm = () => { | ||
| 521 | fullScreenLoading.value = true; | ||
| 522 | confirmTaskStatus(route.query.execGuid).then((res: any) => { | ||
| 523 | fullScreenLoading.value = false; | ||
| 524 | if (res?.code == proxy.$passCode) { | ||
| 525 | proxy.$ElMessage.success('确认成功'); | ||
| 526 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 527 | router.push({ | ||
| 528 | name: 'sensitiveIdentify' | ||
| 529 | }); | ||
| 530 | } else { | ||
| 531 | proxy.$ElMessage.error(res.msg); | ||
| 532 | } | ||
| 533 | }) | ||
| 534 | } | ||
| 535 | |||
| 459 | </script> | 536 | </script> |
| 460 | 537 | ||
| 461 | <template> | 538 | <template> |
| 462 | <div class="container_wrap full flex"> | 539 | <div class="container_wrap full flex" v-loading="fullScreenLoading"> |
| 463 | <div class="aside_wrap"> | 540 | <div class="aside_wrap" :style="{ height: isLook ? '100%' : 'calc(100% - 40px)' }"> |
| 464 | <div class="aside_title">数据表列表</div> | 541 | <div class="aside_title">数据表列表</div> |
| 465 | <Tree ref="treeRef" :treeInfo="treeInfo" @nodeClick="nodeClick" /> | 542 | <Tree ref="treeRef" :treeInfo="treeInfo" @nodeClick="nodeClick" /> |
| 466 | </div> | 543 | </div> |
| 467 | <div class="main_wrap"> | 544 | <div class="main_wrap" :style="{ height: isLook ? '100%' : 'calc(100% - 40px)' }"> |
| 468 | <div class="table_tool_wrap"> | 545 | <div class="table_tool_wrap"> |
| 469 | <div class="tools_btns"> | 546 | <div class="tools_btns"> |
| 470 | <el-button v-if="!isLook" type="primary" @click="batchConfirm">批量确认</el-button> | 547 | <el-button v-if="!isLook" type="primary" @click="batchConfirm">批量确认</el-button> |
| 471 | <div class="cnt-desc">{{ '表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) + '张 敏感表总数:' + | 548 | <div v-show="!sensitiveTableDataLoading" class="cnt-desc">{{ '表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) + '张 敏感表总数:' + |
| 472 | changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 字段总数:' | 549 | changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 字段总数:' |
| 473 | + changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0, 0) + | 550 | + changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0, 0) + |
| 474 | '个,其中直接标识:' + | 551 | '个,其中直接标识:' + |
| ... | @@ -487,10 +564,11 @@ const pageChange = (info) => { | ... | @@ -487,10 +564,11 @@ const pageChange = (info) => { |
| 487 | 'max-height': 'calc(100% - 16px)', | 564 | 'max-height': 'calc(100% - 16px)', |
| 488 | display: 'inline-block', | 565 | display: 'inline-block', |
| 489 | }"> | 566 | }"> |
| 490 | <el-table-column type="selection" v-if="!isLook" :selectable="sensitiveTableSelectable" :width="32" align="center" /> | 567 | <el-table-column type="selection" v-if="!isLook" :selectable="sensitiveTableSelectable" :width="32" |
| 568 | align="center" /> | ||
| 491 | <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> | 569 | <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> |
| 492 | </el-table-column> | 570 | </el-table-column> |
| 493 | <el-table-column label="字段中文名" prop="fieldChName" width="140" align="left" show-overflow-tooltip> | 571 | <el-table-column label="字段中文名" prop="fieldChName" width="160" align="left" show-overflow-tooltip> |
| 494 | <template #default="scope"> | 572 | <template #default="scope"> |
| 495 | <span>{{ scope.row.fieldChName || '--' }}</span> | 573 | <span>{{ scope.row.fieldChName || '--' }}</span> |
| 496 | </template> | 574 | </template> |
| ... | @@ -510,7 +588,7 @@ const pageChange = (info) => { | ... | @@ -510,7 +588,7 @@ const pageChange = (info) => { |
| 510 | <template #default="scope"> | 588 | <template #default="scope"> |
| 511 | <el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable | 589 | <el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable |
| 512 | :options="allDataLabelList" placeholder="请选择" clearable :props="{ value: 'guid', label: 'labelName' }" | 590 | :options="allDataLabelList" placeholder="请选择" clearable :props="{ value: 'guid', label: 'labelName' }" |
| 513 | @change="handleSelectChange" /> | 591 | @change="(val) => handleSelectChange(val, scope)" /> |
| 514 | <span v-else>{{ scope.row["labelName"] || '--' }}</span> | 592 | <span v-else>{{ scope.row["labelName"] || '--' }}</span> |
| 515 | </template> | 593 | </template> |
| 516 | </el-table-column> | 594 | </el-table-column> |
| ... | @@ -552,13 +630,20 @@ const pageChange = (info) => { | ... | @@ -552,13 +630,20 @@ const pageChange = (info) => { |
| 552 | <PageNav :pageInfo="pageInfo" @pageChange="pageChange" /> | 630 | <PageNav :pageInfo="pageInfo" @pageChange="pageChange" /> |
| 553 | </div> | 631 | </div> |
| 554 | </div> | 632 | </div> |
| 633 | <div class="bottom_tool_wrap"> | ||
| 634 | <el-button @click="cancel" v-preReClick>取消</el-button> | ||
| 635 | <el-button type="primary" @click="pageConfirm" v-preReClick>确认</el-button> | ||
| 636 | </div> | ||
| 555 | </div> | 637 | </div> |
| 556 | </template> | 638 | </template> |
| 557 | 639 | ||
| 558 | <style lang="scss" scoped> | 640 | <style lang="scss" scoped> |
| 559 | .container_wrap { | 641 | .container_wrap { |
| 642 | flex-wrap: wrap; | ||
| 643 | |||
| 560 | .aside_wrap { | 644 | .aside_wrap { |
| 561 | width: 200px; | 645 | width: 200px; |
| 646 | height: calc(100% - 40px); | ||
| 562 | } | 647 | } |
| 563 | 648 | ||
| 564 | .table_tool_wrap { | 649 | .table_tool_wrap { |
| ... | @@ -568,6 +653,16 @@ const pageChange = (info) => { | ... | @@ -568,6 +653,16 @@ const pageChange = (info) => { |
| 568 | .table_panel_wrap { | 653 | .table_panel_wrap { |
| 569 | height: calc(100% - 70px); | 654 | height: calc(100% - 70px); |
| 570 | } | 655 | } |
| 656 | |||
| 657 | .bottom_tool_wrap { | ||
| 658 | height: 40px; | ||
| 659 | width: 100%; | ||
| 660 | padding: 0 16px; | ||
| 661 | border-top: 1px solid #d9d9d9; | ||
| 662 | display: flex; | ||
| 663 | justify-content: center; | ||
| 664 | align-items: center; | ||
| 665 | } | ||
| 571 | } | 666 | } |
| 572 | 667 | ||
| 573 | .tree_panel { | 668 | .tree_panel { | ... | ... |
| ... | @@ -9,8 +9,9 @@ import Table from "@/components/Table/index.vue"; | ... | @@ -9,8 +9,9 @@ import Table from "@/components/Table/index.vue"; |
| 9 | import { ElMessage } from "element-plus"; | 9 | import { ElMessage } from "element-plus"; |
| 10 | import { commonPageConfig } from '@/components/PageNav/index'; | 10 | import { commonPageConfig } from '@/components/PageNav/index'; |
| 11 | import { | 11 | import { |
| 12 | getSensitiveDataTaskExecLog, | 12 | getSensitiveDataTaskExecLog, |
| 13 | } from '@/api/modules/dataAnonymization'; | 13 | } from '@/api/modules/dataAnonymization'; |
| 14 | import { TableColumnWidth } from "@/utils/enum"; | ||
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | const { proxy } = getCurrentInstance() as any; | 17 | const { proxy } = getCurrentInstance() as any; |
| ... | @@ -28,17 +29,13 @@ const tableInfo = ref({ | ... | @@ -28,17 +29,13 @@ const tableInfo = ref({ |
| 28 | id: "word-log-table", | 29 | id: "word-log-table", |
| 29 | loading: false, | 30 | loading: false, |
| 30 | fields: [ | 31 | fields: [ |
| 31 | { label: "报告名称", field: "analysisReportName", width: 230 }, | 32 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 32 | { | 33 | { label: "执行人", field: "createUserName", width: TableColumnWidth.USERNAME }, |
| 33 | label: "方案类型", field: "analysisReportType", width: 100, getName: (scope) => { | 34 | { label: "执行时间", field: "execTime", width: TableColumnWidth.DATETIME }, |
| 34 | let planType = scope.row.analysisReportType; | 35 | { label: "执行状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, |
| 35 | return planType == 1 ? '表' : (planType == 2 ? '数据库' : (planType == 4 ? '数据同步' : '分组')); | 36 | { label: "确认人", field: "confirmUserName", width: TableColumnWidth.USERNAME }, |
| 36 | } | 37 | { label: "确认时间", field: "confirmTime", width: TableColumnWidth.DATETIME }, |
| 37 | }, | 38 | { label: "确认状态", field: "sensitiveIdentifyConfirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, |
| 38 | { label: "报告对象", field: "qualityModelName", width: 180, }, | ||
| 39 | { label: "质量评分", field: "qualityScore", width: 100, align: "right" }, | ||
| 40 | { label: "最后执行时间", field: "execTime", width: 180, }, | ||
| 41 | { label: "执行状态", field: "execResult", type: "tag", width: 120, align: "center" }, | ||
| 42 | ], | 39 | ], |
| 43 | data: [], | 40 | data: [], |
| 44 | page: { | 41 | page: { |
| ... | @@ -52,7 +49,19 @@ const tableInfo = ref({ | ... | @@ -52,7 +49,19 @@ const tableInfo = ref({ |
| 52 | width: 100, | 49 | width: 100, |
| 53 | fixed: 'right', | 50 | fixed: 'right', |
| 54 | btns: (scope) => { | 51 | btns: (scope) => { |
| 55 | return [{ label: "查看报告", value: "reportView", disabled: scope.row['execResult'] != 'Y' }]; | 52 | return [{ |
| 53 | label: "查看", value: "report", disabled: scope.row['status'] != 'Y', click: (scope) => { | ||
| 54 | router.push({ | ||
| 55 | name: 'sensitiveIdentifyConfig', | ||
| 56 | query: { | ||
| 57 | guid: route.query.guid, | ||
| 58 | execGuid: scope.row.guid, | ||
| 59 | taskName: route.query.name, | ||
| 60 | isLook: '1', | ||
| 61 | } | ||
| 62 | }); | ||
| 63 | } | ||
| 64 | }]; | ||
| 56 | } | 65 | } |
| 57 | } | 66 | } |
| 58 | }); | 67 | }); |
| ... | @@ -63,7 +72,11 @@ const getTableData = () => { | ... | @@ -63,7 +72,11 @@ const getTableData = () => { |
| 63 | tableInfo.value.loading = false; | 72 | tableInfo.value.loading = false; |
| 64 | if (res?.code == proxy.$passCode) { | 73 | if (res?.code == proxy.$passCode) { |
| 65 | const data = res.data || {} | 74 | const data = res.data || {} |
| 66 | tableInfo.value.data = data.records || [] | 75 | tableInfo.value.data = data.records?.map(d => { |
| 76 | d.sensitiveIdentifyTaskStatus = d.status; | ||
| 77 | d.sensitiveIdentifyConfirmStatus = d.confirmStatus; | ||
| 78 | return d; | ||
| 79 | }) || [] | ||
| 67 | tableInfo.value.page.limit = data.pageSize | 80 | tableInfo.value.page.limit = data.pageSize |
| 68 | tableInfo.value.page.curr = data.pageIndex | 81 | tableInfo.value.page.curr = data.pageIndex |
| 69 | tableInfo.value.page.rows = data.totalRows | 82 | tableInfo.value.page.rows = data.totalRows |
| ... | @@ -88,7 +101,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -88,7 +101,7 @@ const tableBtnClick = (scope, btn) => { |
| 88 | } | 101 | } |
| 89 | }; | 102 | }; |
| 90 | 103 | ||
| 91 | onBeforeMount(() => { | 104 | onActivated(() => { |
| 92 | getTableData(); | 105 | getTableData(); |
| 93 | }); | 106 | }); |
| 94 | 107 | ... | ... |
-
Please register or sign in to post a comment