fix
Showing
8 changed files
with
80 additions
and
41 deletions
| ... | @@ -198,3 +198,19 @@ export const getSensitiveDataTaskExecLog = (params) => request({ | ... | @@ -198,3 +198,19 @@ export const getSensitiveDataTaskExecLog = (params) => request({ |
| 198 | method: 'post', | 198 | method: 'post', |
| 199 | data: params | 199 | data: params |
| 200 | }) | 200 | }) |
| 201 | |||
| 202 | /** ---------- 匿名化处理 ------------------ */ | ||
| 203 | |||
| 204 | /** 获取匿名化任务列表 */ | ||
| 205 | export const getAnonTaskList = (params) => request({ | ||
| 206 | url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/anon-task/page-list`, | ||
| 207 | method: 'post', | ||
| 208 | data: params | ||
| 209 | }) | ||
| 210 | |||
| 211 | /** 删除匿名化任务 */ | ||
| 212 | export const deleteAnonTask = (data) => request({ | ||
| 213 | url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/anon-task/delete`, | ||
| 214 | method: 'delete', | ||
| 215 | data | ||
| 216 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/assets/images/csv.png
0 → 100644
2.46 KB
| ... | @@ -1415,6 +1415,10 @@ const panelChange = (scope, row) => { | ... | @@ -1415,6 +1415,10 @@ const panelChange = (scope, row) => { |
| 1415 | <img class="file-img" src="../../assets/images/excel.png" /> | 1415 | <img class="file-img" src="../../assets/images/excel.png" /> |
| 1416 | </template> | 1416 | </template> |
| 1417 | <template | 1417 | <template |
| 1418 | v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"> | ||
| 1419 | <img class="file-img" src="../../assets/images/csv.png" /> | ||
| 1420 | </template> | ||
| 1421 | <template | ||
| 1418 | v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'"> | 1422 | v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'"> |
| 1419 | <img class="file-img" src="../../assets/images/word.png" /> | 1423 | <img class="file-img" src="../../assets/images/word.png" /> |
| 1420 | </template> | 1424 | </template> | ... | ... |
| ... | @@ -7,7 +7,9 @@ import TableTools from "@/components/Tools/table_tools.vue"; | ... | @@ -7,7 +7,9 @@ import TableTools from "@/components/Tools/table_tools.vue"; |
| 7 | import { commonPageConfig } from '@/components/PageNav/index'; | 7 | import { commonPageConfig } from '@/components/PageNav/index'; |
| 8 | import { TableColumnWidth } from "@/utils/enum"; | 8 | import { TableColumnWidth } from "@/utils/enum"; |
| 9 | import { | 9 | import { |
| 10 | dataSourceTypeList | 10 | dataSourceTypeList, |
| 11 | getAnonTaskList, | ||
| 12 | deleteAnonTask, | ||
| 11 | } from '@/api/modules/dataAnonymization'; | 13 | } from '@/api/modules/dataAnonymization'; |
| 12 | import { useValidator } from '@/hooks/useValidator'; | 14 | import { useValidator } from '@/hooks/useValidator'; |
| 13 | 15 | ||
| ... | @@ -46,7 +48,7 @@ const tableInfo = ref({ | ... | @@ -46,7 +48,7 @@ const tableInfo = ref({ |
| 46 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 48 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 47 | { label: "任务名称", field: "taskName", width: 160 }, | 49 | { label: "任务名称", field: "taskName", width: 160 }, |
| 48 | { | 50 | { |
| 49 | label: "数据来源", field: "dataSource", width: 120, getName: (scope) => { | 51 | label: "数据来源", field: "dataSource", width: 100, getName: (scope) => { |
| 50 | return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--'; | 52 | return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--'; |
| 51 | } | 53 | } |
| 52 | }, | 54 | }, |
| ... | @@ -65,29 +67,29 @@ const tableInfo = ref({ | ... | @@ -65,29 +67,29 @@ const tableInfo = ref({ |
| 65 | actionInfo: { | 67 | actionInfo: { |
| 66 | label: "操作", | 68 | label: "操作", |
| 67 | type: "btn", | 69 | type: "btn", |
| 68 | width: 304, | 70 | width: 180, |
| 69 | fixed: 'right', | 71 | fixed: 'right', |
| 70 | btns: (scope) => { | 72 | btns: (scope) => { |
| 71 | return [{ | 73 | return [ { |
| 72 | label: '敏感数据查看', value: 'view', disabled: scope.row.status != 'Y', click: (scope) => { | ||
| 73 | router.push({ | ||
| 74 | name: 'sensitiveIdentifyConfig', | ||
| 75 | query: { | ||
| 76 | guid: scope.row.guid, | ||
| 77 | execGuid: scope.row.execGuid, | ||
| 78 | taskName: scope.row.taskName | ||
| 79 | } | ||
| 80 | }); | ||
| 81 | } | ||
| 82 | }, { | ||
| 83 | label: "编辑", value: "edit", disabled: scope.row.status == 'R', click: (scope) => { | 74 | label: "编辑", value: "edit", disabled: scope.row.status == 'R', click: (scope) => { |
| 84 | 75 | ||
| 85 | } | 76 | } |
| 86 | }, { | 77 | }, { |
| 78 | label: '查看数据', value: 'view', disabled: scope.row.status != 'Y', click: (scope) => { | ||
| 79 | // router.push({ | ||
| 80 | // name: 'sensitiveIdentifyConfig', | ||
| 81 | // query: { | ||
| 82 | // guid: scope.row.guid, | ||
| 83 | // execGuid: scope.row.execGuid, | ||
| 84 | // taskName: scope.row.taskName | ||
| 85 | // } | ||
| 86 | // }); | ||
| 87 | } | ||
| 88 | }, { | ||
| 87 | label: "删除", value: "delete", disabled: scope.row.status == 'R', click: (scope) => { | 89 | label: "删除", value: "delete", disabled: scope.row.status == 'R', click: (scope) => { |
| 88 | proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { | 90 | proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { |
| 89 | let guids = [scope.row.guid]; | 91 | let guids = [scope.row.guid]; |
| 90 | deleteSensitiveDataTask(guids).then((res: any) => { | 92 | deleteAnonTask(guids).then((res: any) => { |
| 91 | if (res?.code == proxy.$passCode) { | 93 | if (res?.code == proxy.$passCode) { |
| 92 | getTableData(); | 94 | getTableData(); |
| 93 | proxy.$ElMessage({ | 95 | proxy.$ElMessage({ |
| ... | @@ -122,7 +124,7 @@ const toSearch = (val: any, clear: boolean = false) => { | ... | @@ -122,7 +124,7 @@ const toSearch = (val: any, clear: boolean = false) => { |
| 122 | 124 | ||
| 123 | const getTableData = () => { | 125 | const getTableData = () => { |
| 124 | tableInfo.value.loading = true | 126 | tableInfo.value.loading = true |
| 125 | getSensitiveDataTaskList({ | 127 | getAnonTaskList({ |
| 126 | pageIndex: page.value.curr, | 128 | pageIndex: page.value.curr, |
| 127 | pageSize: page.value.limit, | 129 | pageSize: page.value.limit, |
| 128 | taskName: page.value.taskName, | 130 | taskName: page.value.taskName, | ... | ... |
| ... | @@ -52,17 +52,17 @@ const tableInfo = ref({ | ... | @@ -52,17 +52,17 @@ const tableInfo = ref({ |
| 52 | id: 'data-file-table', | 52 | id: 'data-file-table', |
| 53 | fields: [ | 53 | fields: [ |
| 54 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, | 54 | { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, |
| 55 | { label: "任务名称", field: "taskName", width: 160 }, | 55 | { label: "任务名称", field: "taskName", width: 170 }, |
| 56 | { | 56 | { |
| 57 | label: "数据来源", field: "dataSource", width: 120, getName: (scope) => { | 57 | label: "数据来源", field: "dataSource", width: 100, getName: (scope) => { |
| 58 | return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--'; | 58 | return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--'; |
| 59 | } | 59 | } |
| 60 | }, | 60 | }, |
| 61 | { label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, | 61 | { label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" }, |
| 62 | { label: "执行人", field: "execUserName", width: TableColumnWidth.USERNAME }, | 62 | { label: "执行人", field: "execUserName", width: 100 }, |
| 63 | { label: "执行时间", field: "execTime", width: TableColumnWidth.DATETIME }, | 63 | { label: "执行时间", field: "execTime", width: 170 }, |
| 64 | { label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME }, | 64 | { label: "修改人", field: "updateUserName", width: 100 }, |
| 65 | { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, | 65 | { label: "修改时间", field: "updateTime", width: 170 }, |
| 66 | ], | 66 | ], |
| 67 | data: [], | 67 | data: [], |
| 68 | page: { | 68 | page: { | ... | ... |
| ... | @@ -66,6 +66,7 @@ const nodeClick = (data, node) => { | ... | @@ -66,6 +66,7 @@ const nodeClick = (data, node) => { |
| 66 | pageInfo.value.databaseName = data.databaseName; | 66 | pageInfo.value.databaseName = data.databaseName; |
| 67 | pageInfo.value.tableName = ''; | 67 | pageInfo.value.tableName = ''; |
| 68 | } | 68 | } |
| 69 | pageInfo.value.curr = 1; | ||
| 69 | getSensitiveTableFieldData(); | 70 | getSensitiveTableFieldData(); |
| 70 | getCntSumInfo(); | 71 | getCntSumInfo(); |
| 71 | getSensitiveFieldLabelData(); | 72 | getSensitiveFieldLabelData(); |
| ... | @@ -151,7 +152,7 @@ const getExecSensitiveTableData = () => { | ... | @@ -151,7 +152,7 @@ const getExecSensitiveTableData = () => { |
| 151 | d.value = `${d.databaseName}-ds`; //解决文件名称和文件的sheet名称一样的树形选中问题 | 152 | d.value = `${d.databaseName}-ds`; //解决文件名称和文件的sheet名称一样的树形选中问题 |
| 152 | d.label = d.databaseChName; | 153 | d.label = d.databaseChName; |
| 153 | d.tableList = d.tableList?.map(t => { | 154 | d.tableList = d.tableList?.map(t => { |
| 154 | t.value = t.tableName; | 155 | t.value = `${d.databaseName}-${t.tableName}`; |
| 155 | t.label = t.tableChName; | 156 | t.label = t.tableChName; |
| 156 | t.parent = d.databaseName; | 157 | t.parent = d.databaseName; |
| 157 | return t; | 158 | return t; |
| ... | @@ -546,9 +547,7 @@ const cntLabelMap = ref({ | ... | @@ -546,9 +547,7 @@ const cntLabelMap = ref({ |
| 546 | </div> | 547 | </div> |
| 547 | <div class="main_wrap" :style="{ height: isLook ? '100%' : 'calc(100% - 40px)' }"> | 548 | <div class="main_wrap" :style="{ height: isLook ? '100%' : 'calc(100% - 40px)' }"> |
| 548 | <div class="table_tool_wrap"> | 549 | <div class="table_tool_wrap"> |
| 549 | <div class="tools_btns"> | 550 | <div class="cnt-desc">{{'表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) + |
| 550 | <el-button v-if="!isLook" type="primary" @click="batchConfirm">批量确认</el-button> | ||
| 551 | <div v-show="!sensitiveTableDataLoading" class="cnt-desc">{{'表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) + | ||
| 552 | '张 字段总数:' | 551 | '张 字段总数:' |
| 553 | + changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感表总数:' + | 552 | + changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感表总数:' + |
| 554 | changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0, | 553 | changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0, |
| ... | @@ -556,6 +555,8 @@ const cntLabelMap = ref({ | ... | @@ -556,6 +555,8 @@ const cntLabelMap = ref({ |
| 556 | '个,其中' + labelTypeList?.map(l => `${l.label}${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0, | 555 | '个,其中' + labelTypeList?.map(l => `${l.label}${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0, |
| 557 | 0)}个`).join(',') + ',非敏感' + changeNum(cntSumInfo['nonSensitiveNum'] || 0, 0) + '个' | 556 | 0)}个`).join(',') + ',非敏感' + changeNum(cntSumInfo['nonSensitiveNum'] || 0, 0) + '个' |
| 558 | }}</div> | 557 | }}</div> |
| 558 | <div class="tools_btns"> | ||
| 559 | <el-button v-if="!isLook" type="primary" @click="batchConfirm">批量确认</el-button> | ||
| 559 | </div> | 560 | </div> |
| 560 | </div> | 561 | </div> |
| 561 | <div class="table_panel_wrap"> | 562 | <div class="table_panel_wrap"> |
| ... | @@ -570,6 +571,13 @@ const cntLabelMap = ref({ | ... | @@ -570,6 +571,13 @@ const cntLabelMap = ref({ |
| 570 | <el-table-column type="selection" v-if="!isLook" :selectable="sensitiveTableSelectable" :width="32" | 571 | <el-table-column type="selection" v-if="!isLook" :selectable="sensitiveTableSelectable" :width="32" |
| 571 | align="center" /> | 572 | align="center" /> |
| 572 | <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> | 573 | <el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip> |
| 574 | <template #default="scope"> | ||
| 575 | <span>{{ | ||
| 576 | pageInfo.curr !== undefined | ||
| 577 | ? (pageInfo.curr - 1) * pageInfo.limit + scope.$index + 1 | ||
| 578 | : scope.$index + 1 | ||
| 579 | }}</span> | ||
| 580 | </template> | ||
| 573 | </el-table-column> | 581 | </el-table-column> |
| 574 | <el-table-column label="字段中文名" prop="fieldChName" width="160" align="left" show-overflow-tooltip> | 582 | <el-table-column label="字段中文名" prop="fieldChName" width="160" align="left" show-overflow-tooltip> |
| 575 | <template #default="scope"> | 583 | <template #default="scope"> |
| ... | @@ -589,9 +597,9 @@ const cntLabelMap = ref({ | ... | @@ -589,9 +597,9 @@ const cntLabelMap = ref({ |
| 589 | @popverBtnClick="handleLabelPopoverClick" /> | 597 | @popverBtnClick="handleLabelPopoverClick" /> |
| 590 | </template> | 598 | </template> |
| 591 | <template #default="scope"> | 599 | <template #default="scope"> |
| 592 | <el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable popper-class="el-select-v2-popper" | 600 | <el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable |
| 593 | :options="allDataLabelList" placeholder="请选择" clearable :props="{ value: 'guid', label: 'labelName' }" | 601 | popper-class="el-select-v2-popper" :options="allDataLabelList" placeholder="请选择" clearable |
| 594 | @change="(val) => handleSelectChange(val, scope)"> | 602 | :props="{ value: 'guid', label: 'labelName' }" @change="(val) => handleSelectChange(val, scope)"> |
| 595 | <template #default="{ item }"> | 603 | <template #default="{ item }"> |
| 596 | <ellipsis-tooltip :content="item.labelName ?? ''" class-name="w100f" | 604 | <ellipsis-tooltip :content="item.labelName ?? ''" class-name="w100f" |
| 597 | :refName="'tooltipOver' + item.guid"></ellipsis-tooltip> | 605 | :refName="'tooltipOver' + item.guid"></ellipsis-tooltip> |
| ... | @@ -656,15 +664,21 @@ const cntLabelMap = ref({ | ... | @@ -656,15 +664,21 @@ const cntLabelMap = ref({ |
| 656 | 664 | ||
| 657 | .table_tool_wrap { | 665 | .table_tool_wrap { |
| 658 | display: flex; | 666 | display: flex; |
| 667 | flex-direction: column; | ||
| 659 | 668 | ||
| 660 | .cnt-desc { | 669 | .cnt-desc { |
| 661 | line-height: 21px; | 670 | line-height: 24px; |
| 662 | white-space: break-spaces; | 671 | white-space: break-spaces; |
| 672 | margin-top: 4px; | ||
| 663 | } | 673 | } |
| 664 | } | 674 | } |
| 665 | 675 | ||
| 676 | .tools_btns { | ||
| 677 | padding-top: 0px; | ||
| 678 | } | ||
| 679 | |||
| 666 | .table_panel_wrap { | 680 | .table_panel_wrap { |
| 667 | height: calc(100% - 70px); | 681 | height: calc(100% - 91px); |
| 668 | } | 682 | } |
| 669 | 683 | ||
| 670 | .bottom_tool_wrap { | 684 | .bottom_tool_wrap { |
| ... | @@ -700,15 +714,6 @@ const cntLabelMap = ref({ | ... | @@ -700,15 +714,6 @@ const cntLabelMap = ref({ |
| 700 | } | 714 | } |
| 701 | } | 715 | } |
| 702 | 716 | ||
| 703 | .tools_btns { | ||
| 704 | display: flex; | ||
| 705 | align-items: center; | ||
| 706 | |||
| 707 | .el-button { | ||
| 708 | margin-right: 8px; | ||
| 709 | } | ||
| 710 | } | ||
| 711 | |||
| 712 | :deep(.filter-cell) { | 717 | :deep(.filter-cell) { |
| 713 | .cell { | 718 | .cell { |
| 714 | position: relative; | 719 | position: relative; | ... | ... |
| ... | @@ -47,6 +47,10 @@ | ... | @@ -47,6 +47,10 @@ |
| 47 | <img class="file-img" src="../../../assets/images/excel.png" /> | 47 | <img class="file-img" src="../../../assets/images/excel.png" /> |
| 48 | </template> | 48 | </template> |
| 49 | <template | 49 | <template |
| 50 | v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"> | ||
| 51 | <img class="file-img" src="../../assets/images/csv.png" /> | ||
| 52 | </template> | ||
| 53 | <template | ||
| 50 | v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> | 54 | v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> |
| 51 | <img class="file-img" src="../../../assets/images/word.png" /> | 55 | <img class="file-img" src="../../../assets/images/word.png" /> |
| 52 | </template> | 56 | </template> | ... | ... |
| ... | @@ -1990,6 +1990,10 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -1990,6 +1990,10 @@ const rejectDialogBtnClick = (btn, info) => { |
| 1990 | <img class="file-img" src="../../assets/images/excel.png" /> | 1990 | <img class="file-img" src="../../assets/images/excel.png" /> |
| 1991 | </template> | 1991 | </template> |
| 1992 | <template | 1992 | <template |
| 1993 | v-if="flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"> | ||
| 1994 | <img class="file-img" src="../../assets/images/csv.png" /> | ||
| 1995 | </template> | ||
| 1996 | <template | ||
| 1993 | v-else-if="flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> | 1997 | v-else-if="flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> |
| 1994 | <img class="file-img" src="../../assets/images/word.png" /> | 1998 | <img class="file-img" src="../../assets/images/word.png" /> |
| 1995 | </template> | 1999 | </template> |
| ... | @@ -2039,6 +2043,10 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -2039,6 +2043,10 @@ const rejectDialogBtnClick = (btn, info) => { |
| 2039 | <img class="file-img" src="../../assets/images/excel.png" /> | 2043 | <img class="file-img" src="../../assets/images/excel.png" /> |
| 2040 | </template> | 2044 | </template> |
| 2041 | <template | 2045 | <template |
| 2046 | v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'"> | ||
| 2047 | <img class="file-img" src="../../assets/images/csv.png" /> | ||
| 2048 | </template> | ||
| 2049 | <template | ||
| 2042 | v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> | 2050 | v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> |
| 2043 | <img class="file-img" src="../../assets/images/word.png" /> | 2051 | <img class="file-img" src="../../assets/images/word.png" /> |
| 2044 | </template> | 2052 | </template> | ... | ... |
-
Please register or sign in to post a comment