3f7f827b by lihua

fix

1 parent f4d92393
......@@ -197,4 +197,20 @@ export const getSensitiveDataTaskExecLog = (params) => request({
url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-exec-log`,
method: 'post',
data: params
})
/** ---------- 匿名化处理 ------------------ */
/** 获取匿名化任务列表 */
export const getAnonTaskList = (params) => request({
url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/anon-task/page-list`,
method: 'post',
data: params
})
/** 删除匿名化任务 */
export const deleteAnonTask = (data) => request({
url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/anon-task/delete`,
method: 'delete',
data
})
\ No newline at end of file
......
......@@ -1415,6 +1415,10 @@ const panelChange = (scope, row) => {
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'">
<img class="file-img" src="../../assets/images/csv.png" />
</template>
<template
v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
......
......@@ -7,7 +7,9 @@ import TableTools from "@/components/Tools/table_tools.vue";
import { commonPageConfig } from '@/components/PageNav/index';
import { TableColumnWidth } from "@/utils/enum";
import {
dataSourceTypeList
dataSourceTypeList,
getAnonTaskList,
deleteAnonTask,
} from '@/api/modules/dataAnonymization';
import { useValidator } from '@/hooks/useValidator';
......@@ -46,7 +48,7 @@ const tableInfo = ref({
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "任务名称", field: "taskName", width: 160 },
{
label: "数据来源", field: "dataSource", width: 120, getName: (scope) => {
label: "数据来源", field: "dataSource", width: 100, getName: (scope) => {
return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--';
}
},
......@@ -65,29 +67,29 @@ const tableInfo = ref({
actionInfo: {
label: "操作",
type: "btn",
width: 304,
width: 180,
fixed: 'right',
btns: (scope) => {
return [{
label: '敏感数据查看', value: 'view', disabled: scope.row.status != 'Y', click: (scope) => {
router.push({
name: 'sensitiveIdentifyConfig',
query: {
guid: scope.row.guid,
execGuid: scope.row.execGuid,
taskName: scope.row.taskName
}
});
}
}, {
return [ {
label: "编辑", value: "edit", disabled: scope.row.status == 'R', click: (scope) => {
}
}, {
label: '查看数据', value: 'view', disabled: scope.row.status != 'Y', click: (scope) => {
// router.push({
// name: 'sensitiveIdentifyConfig',
// query: {
// guid: scope.row.guid,
// execGuid: scope.row.execGuid,
// taskName: scope.row.taskName
// }
// });
}
}, {
label: "删除", value: "delete", disabled: scope.row.status == 'R', click: (scope) => {
proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => {
let guids = [scope.row.guid];
deleteSensitiveDataTask(guids).then((res: any) => {
deleteAnonTask(guids).then((res: any) => {
if (res?.code == proxy.$passCode) {
getTableData();
proxy.$ElMessage({
......@@ -122,7 +124,7 @@ const toSearch = (val: any, clear: boolean = false) => {
const getTableData = () => {
tableInfo.value.loading = true
getSensitiveDataTaskList({
getAnonTaskList({
pageIndex: page.value.curr,
pageSize: page.value.limit,
taskName: page.value.taskName,
......
......@@ -52,17 +52,17 @@ const tableInfo = ref({
id: 'data-file-table',
fields: [
{ label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
{ label: "任务名称", field: "taskName", width: 160 },
{ label: "任务名称", field: "taskName", width: 170 },
{
label: "数据来源", field: "dataSource", width: 120, getName: (scope) => {
label: "数据来源", field: "dataSource", width: 100, getName: (scope) => {
return scope.row.dataSource && dataSourceTypeList.find(f => f.value == scope.row.dataSource)?.label || '--';
}
},
{ label: "任务状态", field: "sensitiveIdentifyTaskStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag" },
{ label: "执行人", field: "execUserName", width: TableColumnWidth.USERNAME },
{ label: "执行时间", field: "execTime", width: TableColumnWidth.DATETIME },
{ label: "修改人", field: "updateUserName", width: TableColumnWidth.USERNAME },
{ label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
{ label: "执行人", field: "execUserName", width: 100 },
{ label: "执行时间", field: "execTime", width: 170 },
{ label: "修改人", field: "updateUserName", width: 100 },
{ label: "修改时间", field: "updateTime", width: 170 },
],
data: [],
page: {
......
......@@ -66,6 +66,7 @@ const nodeClick = (data, node) => {
pageInfo.value.databaseName = data.databaseName;
pageInfo.value.tableName = '';
}
pageInfo.value.curr = 1;
getSensitiveTableFieldData();
getCntSumInfo();
getSensitiveFieldLabelData();
......@@ -151,7 +152,7 @@ const getExecSensitiveTableData = () => {
d.value = `${d.databaseName}-ds`; //解决文件名称和文件的sheet名称一样的树形选中问题
d.label = d.databaseChName;
d.tableList = d.tableList?.map(t => {
t.value = t.tableName;
t.value = `${d.databaseName}-${t.tableName}`;
t.label = t.tableChName;
t.parent = d.databaseName;
return t;
......@@ -546,16 +547,16 @@ const cntLabelMap = ref({
</div>
<div class="main_wrap" :style="{ height: isLook ? '100%' : 'calc(100% - 40px)' }">
<div class="table_tool_wrap">
<div class="cnt-desc">{{'表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) +
'张 字段总数:'
+ changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感表总数:' +
changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0,
0) +
'个,其中' + labelTypeList?.map(l => `${l.label}${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0,
0)}个`).join(',') + ',非敏感' + changeNum(cntSumInfo['nonSensitiveNum'] || 0, 0) + '个'
}}</div>
<div class="tools_btns">
<el-button v-if="!isLook" type="primary" @click="batchConfirm">批量确认</el-button>
<div v-show="!sensitiveTableDataLoading" class="cnt-desc">{{'表总数:' + changeNum(cntSumInfo.tableNum || 0, 0) +
'张 字段总数:'
+ changeNum(cntSumInfo.fieldNum || 0, 0) + '个 敏感表总数:' +
changeNum(cntSumInfo.sensitiveTableNum || 0, 0) + '张 敏感字段总数:' + changeNum(cntSumInfo.sensitiveFieldNum || 0,
0) +
'个,其中' + labelTypeList?.map(l => `${l.label}${changeNum(cntSumInfo[cntLabelMap[l.value]] || 0,
0)}个`).join(',') + ',非敏感' + changeNum(cntSumInfo['nonSensitiveNum'] || 0, 0) + '个'
}}</div>
</div>
</div>
<div class="table_panel_wrap">
......@@ -570,6 +571,13 @@ const cntLabelMap = ref({
<el-table-column type="selection" v-if="!isLook" :selectable="sensitiveTableSelectable" :width="32"
align="center" />
<el-table-column label="序号" type="index" width="56px" align="center" show-overflow-tooltip>
<template #default="scope">
<span>{{
pageInfo.curr !== undefined
? (pageInfo.curr - 1) * pageInfo.limit + scope.$index + 1
: scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="字段中文名" prop="fieldChName" width="160" align="left" show-overflow-tooltip>
<template #default="scope">
......@@ -589,12 +597,12 @@ const cntLabelMap = ref({
@popverBtnClick="handleLabelPopoverClick" />
</template>
<template #default="scope">
<el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable popper-class="el-select-v2-popper"
:options="allDataLabelList" placeholder="请选择" clearable :props="{ value: 'guid', label: 'labelName' }"
@change="(val) => handleSelectChange(val, scope)">
<el-select-v2 v-if="scope.row['isEdit']" v-model="scope.row['labelGuid']" filterable
popper-class="el-select-v2-popper" :options="allDataLabelList" placeholder="请选择" clearable
:props="{ value: 'guid', label: 'labelName' }" @change="(val) => handleSelectChange(val, scope)">
<template #default="{ item }">
<ellipsis-tooltip :content="item.labelName ?? ''" class-name="w100f"
:refName="'tooltipOver' + item.guid"></ellipsis-tooltip>
<ellipsis-tooltip :content="item.labelName ?? ''" class-name="w100f"
:refName="'tooltipOver' + item.guid"></ellipsis-tooltip>
</template>
</el-select-v2>
<span v-else>{{ scope.row["labelName"] || '--' }}</span>
......@@ -656,15 +664,21 @@ const cntLabelMap = ref({
.table_tool_wrap {
display: flex;
flex-direction: column;
.cnt-desc {
line-height: 21px;
line-height: 24px;
white-space: break-spaces;
margin-top: 4px;
}
}
.tools_btns {
padding-top: 0px;
}
.table_panel_wrap {
height: calc(100% - 70px);
height: calc(100% - 91px);
}
.bottom_tool_wrap {
......@@ -700,15 +714,6 @@ const cntLabelMap = ref({
}
}
.tools_btns {
display: flex;
align-items: center;
.el-button {
margin-right: 8px;
}
}
:deep(.filter-cell) {
.cell {
position: relative;
......
......@@ -46,6 +46,10 @@
v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'">
<img class="file-img" src="../../../assets/images/excel.png" />
</template>
<template
v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'">
<img class="file-img" src="../../assets/images/csv.png" />
</template>
<template
v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
<img class="file-img" src="../../../assets/images/word.png" />
......
......@@ -1989,6 +1989,10 @@ const rejectDialogBtnClick = (btn, info) => {
v-if="flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-if="flowDetail.productPic.name.substring(flowDetail.productPic.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'">
<img class="file-img" src="../../assets/images/csv.png" />
</template>
<template
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'">
<img class="file-img" src="../../assets/images/word.png" />
......@@ -2038,6 +2042,10 @@ const rejectDialogBtnClick = (btn, info) => {
v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() === 'csv'">
<img class="file-img" src="../../assets/images/csv.png" />
</template>
<template
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'">
<img class="file-img" src="../../assets/images/word.png" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!