c9dffc9a by lihua

敏感数据识别

1 parent 74df973c
...@@ -112,8 +112,8 @@ export const saveSensitiveDataTask = (params) => request({ ...@@ -112,8 +112,8 @@ export const saveSensitiveDataTask = (params) => request({
112 /** 编辑修改敏感数据识别任务 */ 112 /** 编辑修改敏感数据识别任务 */
113 export const updateSensitiveDataTask = (params) => request({ 113 export const updateSensitiveDataTask = (params) => request({
114 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/update`, 114 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/update`,
115 method: 'post', 115 method: 'put',
116 params 116 data: params
117 }) 117 })
118 118
119 /** 删除敏感数据识别任务 */ 119 /** 删除敏感数据识别任务 */
...@@ -123,5 +123,72 @@ export const deleteSensitiveDataTask = (data) => request({ ...@@ -123,5 +123,72 @@ export const deleteSensitiveDataTask = (data) => request({
123 data 123 data
124 }) 124 })
125 125
126 /** 手动执行敏感任务 */
127 export const execSensitiveDataTask = (guid) => request({
128 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/exec-task?taskGuid=${guid}`,
129 method: 'get'
130 })
131
126 /** 数据来源类型 */ 132 /** 数据来源类型 */
127 //export const
...\ No newline at end of file ...\ No newline at end of file
133 export const dataSourceTypeList = [{
134 value: 1,
135 label: '数据源'
136 }, {
137 value: 2,
138 label: '文件导入'
139 }];
140
141 /** 获取数据库选择列表 */
142 export const getDatabase = (params) => request({
143 url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/get-source-list`,
144 method: 'post',
145 data: params
146 })
147
148 /** 获取敏感数据任务执行的数据表列表 */
149 export const getExecSensitiveTable = (execGuid) => request({
150 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-table?execGuid=${execGuid}`,
151 method: 'get'
152 })
153
154 /** 根据数据源或表获取敏感数据任务执行的字段列表 */
155 export const getExecSensitiveFieldTable = (params) => request({
156 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-field`,
157 method: 'post',
158 data: params
159 })
160
161 /** 获取当前数据表下的执行字段 */
162 export const getExecSensitiveFieldLabel = (params) => request({
163 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-label`,
164 method: 'post',
165 data: params
166 })
167
168 /** 获取敏感数据识别任务执行后的统计结果 */
169 export const getStatisticsNum = (params) => request({
170 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/statistics-num`,
171 method: 'get',
172 params
173 })
174
175 /** 修改敏感数据识别字段标签 */
176 export const updateSensitiveDataTaskFieldLabel = (params) => request({
177 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/batch-update-label`,
178 method: 'put',
179 data: params
180 })
181
182 /** 批量修改确认状态 */
183 export const batchUpdateSensitiveDataTaskFieldStatus = (params) => request({
184 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/batch-change-status`,
185 method: 'post',
186 data: params
187 })
188
189 /** 获取敏感数据识别任务执行日志 */
190 export const getSensitiveDataTaskExecLog = (params) => request({
191 url: `${import.meta.env.VITE_APP_ANONYMIZATION_BASEURL}/sensitive-data-task/get-exec-sensitive-exec-log`,
192 method: 'post',
193 data: params
194 })
...\ No newline at end of file ...\ No newline at end of file
......
1 <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755825941248" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1233" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M102.784 179.648A32 32 0 0 1 128.064 128H768a32 32 0 0 1 25.28 51.648L576 458.944v468.992a32 32 0 0 1-49.728 26.624l-192-128a32 32 0 0 1-14.24-26.592V458.944L102.784 179.648z m274.528 248.672A32 32 0 0 1 384 448v334.848l128 85.344V448a32 32 0 0 1 6.72-19.68L702.624 192H193.472l183.84 236.32zM735.968 512h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z" fill="#4fa1a4" p-id="1234"></path></svg>
...\ No newline at end of file ...\ No newline at end of file
1 <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M102.784 179.648A32 32 0 0 1 128.064 128H768a32 32 0 0 1 25.28 51.648L576 458.944v468.992a32 32 0 0 1-49.728 26.624l-192-128a32 32 0 0 1-14.24-26.592V458.944L102.784 179.648z m274.528 248.672A32 32 0 0 1 384 448v334.848l128 85.344V448a32 32 0 0 1 6.72-19.68L702.624 192H193.472l183.84 236.32zM735.968 512h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z" fill="#999999" p-id="1519"></path></svg>
...\ No newline at end of file ...\ No newline at end of file
1 <svg t="1755766425695" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1233" width="200" height="200"><path d="M102.784 179.648A32 32 0 0 1 128.064 128H768a32 32 0 0 1 25.28 51.648L576 458.944v468.992a32 32 0 0 1-49.728 26.624l-192-128a32 32 0 0 1-14.24-26.592V458.944L102.784 179.648z m274.528 248.672A32 32 0 0 1 384 448v334.848l128 85.344V448a32 32 0 0 1 6.72-19.68L702.624 192H193.472l183.84 236.32zM735.968 512h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z m0 128h128a32 32 0 1 1 0 64h-128a32 32 0 1 1 0-64z" fill="#999999" p-id="1234"></path></svg>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -43,18 +43,23 @@ const btn = computed(() => { ...@@ -43,18 +43,23 @@ const btn = computed(() => {
43 return props.popoverInfo.btn ?? {}; 43 return props.popoverInfo.btn ?? {};
44 }); 44 });
45 45
46 const dataProps = computed(() => {
47 return <any>(props.popoverInfo.props || {});
48 });
49
46 const initAttr = () => { 50 const initAttr = () => {
47 const data = props.popoverInfo.data ?? [] 51 const data = props.popoverInfo.data ?? []
48 const check = props.popoverInfo.checked ?? [] 52 const check = props.popoverInfo.checked ?? []
49 checkedVal.value = check 53 checkedVal.value = check
50 isIndeterminate.value = data.length > 0 && data.length == check.length 54 checkAll.value = data.length > 0 && data.length == check.length;
55 isIndeterminate.value = check.length > 0 && data.length > check.length
51 authorities.value = data 56 authorities.value = data
52 } 57 }
53 58
54 const filterPopover = (val) => { 59 const filterPopover = (val) => {
55 let data = props.popoverInfo.data ?? [] 60 let data = props.popoverInfo.data ?? []
56 if (val) { 61 if (val) {
57 authorities.value = data.filter(item => item.dataPermissionName.indexOf(val) > -1) 62 authorities.value = data.filter(item => item[dataProps.value.label || 'dataPermissionName'].indexOf(val) > -1)
58 } else { 63 } else {
59 authorities.value = data 64 authorities.value = data
60 } 65 }
...@@ -70,7 +75,8 @@ const handleCheckedCitiesChange = (val) => { ...@@ -70,7 +75,8 @@ const handleCheckedCitiesChange = (val) => {
70 isIndeterminate.value = checkedCount > 0 && checkedCount < authorities.value.length; 75 isIndeterminate.value = checkedCount > 0 && checkedCount < authorities.value.length;
71 }; 76 };
72 const showPopver = () => { 77 const showPopver = () => {
73 inputValue.value = '' 78 inputValue.value = '';
79 initAttr();
74 emits('showPopver', props.popoverInfo.scope, btn.value) 80 emits('showPopver', props.popoverInfo.scope, btn.value)
75 } 81 }
76 const btnClick = () => { 82 const btnClick = () => {
...@@ -98,10 +104,10 @@ watch(() => props.popoverInfo, async (val) => { ...@@ -98,10 +104,10 @@ watch(() => props.popoverInfo, async (val) => {
98 </template> 104 </template>
99 <template v-else-if="type == 'checkbox-list-btns'"> 105 <template v-else-if="type == 'checkbox-list-btns'">
100 <div class="content_body"> 106 <div class="content_body">
101 <el-input v-model.trim="inputValue" placeholder="请输入权限名称" :prefix-icon="Search" clearable 107 <el-input v-model.trim="inputValue" v-show="popoverInfo.data?.length > 5" :placeholder="props.popoverInfo.placeholder ?? '请输入权限名称'" :prefix-icon="Search" clearable
102 @change="filterPopover" /> 108 @input="filterPopover" />
103 <el-checkbox-group v-model="checkedVal" @change="handleCheckedCitiesChange"> 109 <el-checkbox-group v-model="checkedVal" @change="handleCheckedCitiesChange">
104 <el-checkbox v-for="auth in authorities" :key="auth.guid" :label="auth.guid">{{ auth.dataPermissionName 110 <el-checkbox v-for="auth in authorities" :key="auth.guid" :value="auth.guid">{{ auth[dataProps.label || 'dataPermissionName']
105 }}</el-checkbox> 111 }}</el-checkbox>
106 </el-checkbox-group> 112 </el-checkbox-group>
107 </div> 113 </div>
...@@ -118,6 +124,9 @@ watch(() => props.popoverInfo, async (val) => { ...@@ -118,6 +124,9 @@ watch(() => props.popoverInfo, async (val) => {
118 </div> 124 </div>
119 <template #reference> 125 <template #reference>
120 <span v-if="btn.value == 'authority'" @click="showPopver" v-preReClick>{{ btn.label }}</span> 126 <span v-if="btn.value == 'authority'" @click="showPopver" v-preReClick>{{ btn.label }}</span>
127 <el-icon class="filter-icon" v-else-if="btn.value == 'filter'" @click="showPopver">
128 <svg-icon :name="checkedVal.length ? 'filter-mobile-select' : 'filter-mobile'" />
129 </el-icon>
121 <el-icon v-else-if="btn.value == 'QuestionFilled'"> 130 <el-icon v-else-if="btn.value == 'QuestionFilled'">
122 <QuestionFilled /> 131 <QuestionFilled />
123 </el-icon> 132 </el-icon>
...@@ -138,8 +147,8 @@ watch(() => props.popoverInfo, async (val) => { ...@@ -138,8 +147,8 @@ watch(() => props.popoverInfo, async (val) => {
138 } 147 }
139 148
140 .el-checkbox-group { 149 .el-checkbox-group {
141 margin: 8px -8px 0; 150 margin: 0px -8px 0;
142 max-height: 276px; 151 max-height: 256px;
143 overflow: hidden auto; 152 overflow: hidden auto;
144 153
145 .el-checkbox { 154 .el-checkbox {
......
...@@ -339,7 +339,7 @@ onMounted(() => { ...@@ -339,7 +339,7 @@ onMounted(() => {
339 <span v-if="item.unit">{{ item.unit }}</span> 339 <span v-if="item.unit">{{ item.unit }}</span>
340 </template> 340 </template>
341 <template #default="scope" v-else-if="item.type == 'switch'"> 341 <template #default="scope" v-else-if="item.type == 'switch'">
342 <el-switch v-model="scope.row[item.field]" inline-prompt :key="scope.row.guid" 342 <el-switch v-model="scope.row[item.field]" inline-prompt :key="scope.row[rowKey || 'guid']"
343 :disabled="!item.isDisabled ? false : item.isDisabled(scope)" :active-value="item.activeValue" 343 :disabled="!item.isDisabled ? false : item.isDisabled(scope)" :active-value="item.activeValue"
344 :inactive-value="item.inactiveValue" :width="item.switchWidth" :active-text="item.activeText" 344 :inactive-value="item.inactiveValue" :width="item.switchWidth" :active-text="item.activeText"
345 :inactive-text="item.inactiveText" :before-change="() => beforeChange(scope, item)" 345 :inactive-text="item.inactiveText" :before-change="() => beforeChange(scope, item)"
......
...@@ -85,6 +85,42 @@ const routes: RouteRecordRaw[] = [ ...@@ -85,6 +85,42 @@ const routes: RouteRecordRaw[] = [
85 cache: true 85 cache: true
86 }, 86 },
87 }, 87 },
88 {
89 path: 'sensitive-identify-config',
90 name: 'sensitiveIdentifyConfig',
91 component: () => import('@/views/data_anonymization/sensitiveIdentifyConfig.vue'),
92 meta: {
93 title: '敏感数据识别查看',
94 sidebar: false,
95 breadcrumb: false,
96 cache: true,
97 reuse: true,
98 editPage: false,
99 activeMenu: '/data-anonymization/sensitive-identify'
100 },
101 beforeEnter: (to, from) => {
102 if (to.query.taskName) {
103 to.meta.title = `敏感数据识别查看-${to.query.taskName}`;
104 }
105 }
106 },
107 {
108 path: 'sensitive-identify-task-exec-log',
109 name: 'sensitiveIdentifyTaskExecLog',
110 component: () => import('@/views/data_anonymization/sensitiveIdentifyTaskExecLog.vue'),
111 meta: {
112 title: '执行日志',
113 sidebar: false,
114 breadcrumb: false,
115 cache: true,
116 reuse: true
117 },
118 beforeEnter: (to, from) => {
119 if (to.query.guid) {
120 to.meta.title = `日志-${to.query.name}`;
121 }
122 }
123 }
88 ], 124 ],
89 }, 125 },
90 { 126 {
......
...@@ -496,6 +496,16 @@ export const tagType = (row, type): any => { ...@@ -496,6 +496,16 @@ export const tagType = (row, type): any => {
496 } else { 496 } else {
497 state = 'info'; 497 state = 'info';
498 } 498 }
499 } else if (type == 'sensitiveIdentifyTaskStatus') {
500 if (row[type] == 'Y') {
501 state = 'success'
502 } else if (row[type] == 'N') {
503 state = 'info';
504 } else if (row[type] == 'E') {
505 state = 'danger';
506 } else if (row[type] == 'R') {
507 state = 'warning';
508 }
499 } else if (type == 'state' || type == 'documentState') { 509 } else if (type == 'state' || type == 'documentState') {
500 switch (row[type]) { 510 switch (row[type]) {
501 case 'N': 511 case 'N':
...@@ -809,6 +819,16 @@ export const tagMethod = (row, type) => { ...@@ -809,6 +819,16 @@ export const tagMethod = (row, type) => {
809 }else if (row[type] == 'R') { //部分通过 819 }else if (row[type] == 'R') { //部分通过
810 tag = '执行中'; 820 tag = '执行中';
811 } 821 }
822 } else if (type == 'sensitiveIdentifyTaskStatus') {
823 if (row[type] == 'Y') {
824 tag = '成功'
825 } else if (row[type] == 'N') {
826 tag = '未执行';
827 } else if (row[type] == 'E') { //部分通过
828 tag = '失败';
829 }else if (row[type] == 'R') { //部分通过
830 tag = '执行中';
831 }
812 } else if (type == 'execState') { 832 } else if (type == 'execState') {
813 if (row[type] == 0 || row[type] == null) { 833 if (row[type] == 0 || row[type] == null) {
814 tag = '未执行' 834 tag = '未执行'
......
...@@ -82,7 +82,7 @@ const tableInfo = ref({ ...@@ -82,7 +82,7 @@ const tableInfo = ref({
82 proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { 82 proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => {
83 let guids = [scope.row.guid]; 83 let guids = [scope.row.guid];
84 deleteGeneralizeFile(guids).then((res: any) => { 84 deleteGeneralizeFile(guids).then((res: any) => {
85 if (res.code == proxy.$passCode) { 85 if (res?.code == proxy.$passCode) {
86 getTableData(); 86 getTableData();
87 proxy.$ElMessage({ 87 proxy.$ElMessage({
88 type: "success", 88 type: "success",
...@@ -122,7 +122,7 @@ const getTableData = () => { ...@@ -122,7 +122,7 @@ const getTableData = () => {
122 generalizeFileName: page.value.generalizeFileName, 122 generalizeFileName: page.value.generalizeFileName,
123 fieldType: page.value.fieldType 123 fieldType: page.value.fieldType
124 }).then((res: any) => { 124 }).then((res: any) => {
125 if (res.code == proxy.$passCode) { 125 if (res?.code == proxy.$passCode) {
126 const data = res.data || {} 126 const data = res.data || {}
127 tableInfo.value.data = data.records || [] 127 tableInfo.value.data = data.records || []
128 tableInfo.value.page.limit = data.pageSize 128 tableInfo.value.page.limit = data.pageSize
......
...@@ -268,7 +268,7 @@ const saveUpdate = async () => { ...@@ -268,7 +268,7 @@ const saveUpdate = async () => {
268 if (!guid.value) { 268 if (!guid.value) {
269 saveLoading.value = true; 269 saveLoading.value = true;
270 saveGeneralizeFile(params).then((res: any) => { 270 saveGeneralizeFile(params).then((res: any) => {
271 if (res.code == proxy.$passCode) { 271 if (res?.code == proxy.$passCode) {
272 proxy.$ElMessage.success('泛化文件新建成功'); 272 proxy.$ElMessage.success('泛化文件新建成功');
273 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 273 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
274 anonymizationStore.setIsRefresh(true); 274 anonymizationStore.setIsRefresh(true);
...@@ -285,7 +285,7 @@ const saveUpdate = async () => { ...@@ -285,7 +285,7 @@ const saveUpdate = async () => {
285 params.guid = guid.value; 285 params.guid = guid.value;
286 saveLoading.value = true; 286 saveLoading.value = true;
287 updateGeneralizeFile(params).then((res: any) => { 287 updateGeneralizeFile(params).then((res: any) => {
288 if (res.code == proxy.$passCode) { 288 if (res?.code == proxy.$passCode) {
289 proxy.$ElMessage.success('泛化文件编辑成功'); 289 proxy.$ElMessage.success('泛化文件编辑成功');
290 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 290 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
291 anonymizationStore.setIsRefresh(true); 291 anonymizationStore.setIsRefresh(true);
...@@ -310,7 +310,7 @@ onBeforeMount(() => { ...@@ -310,7 +310,7 @@ onBeforeMount(() => {
310 if (guid.value) { 310 if (guid.value) {
311 fullscreenLoading.value = true; 311 fullscreenLoading.value = true;
312 getGeneralizeFileDetail(guid.value).then(async (res: any) => { 312 getGeneralizeFileDetail(guid.value).then(async (res: any) => {
313 if (res.code == proxy.$passCode) { 313 if (res?.code == proxy.$passCode) {
314 let detail = res.data || {}; 314 let detail = res.data || {};
315 baseInfoItems.value.forEach(item => { 315 baseInfoItems.value.forEach(item => {
316 item.default = detail[item.field]; 316 item.default = detail[item.field];
......
...@@ -73,7 +73,7 @@ const tableInfo = ref({ ...@@ -73,7 +73,7 @@ const tableInfo = ref({
73 label: "编辑", value: "edit", click: (scope) => { 73 label: "编辑", value: "edit", click: (scope) => {
74 currTableData.value = scope.row; 74 currTableData.value = scope.row;
75 getLabelDetail(scope.row.guid).then((res: any) => { 75 getLabelDetail(scope.row.guid).then((res: any) => {
76 if (res.code == proxy.$passCode) { 76 if (res?.code == proxy.$passCode) {
77 const detail = res.data || {}; 77 const detail = res.data || {};
78 currTableData.value = Object.assign({}, currTableData.value, detail); 78 currTableData.value = Object.assign({}, currTableData.value, detail);
79 newCreateLabelFormItems.value.forEach(item => { 79 newCreateLabelFormItems.value.forEach(item => {
...@@ -120,7 +120,7 @@ const tableInfo = ref({ ...@@ -120,7 +120,7 @@ const tableInfo = ref({
120 proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => { 120 proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => {
121 let guids = [scope.row.guid]; 121 let guids = [scope.row.guid];
122 deleteLabel(guids).then((res: any) => { 122 deleteLabel(guids).then((res: any) => {
123 if (res.code == proxy.$passCode) { 123 if (res?.code == proxy.$passCode) {
124 getTableData(); 124 getTableData();
125 proxy.$ElMessage({ 125 proxy.$ElMessage({
126 type: "success", 126 type: "success",
...@@ -159,7 +159,7 @@ const getTableData = () => { ...@@ -159,7 +159,7 @@ const getTableData = () => {
159 pageSize: page.value.limit, 159 pageSize: page.value.limit,
160 labelName: page.value.labelName 160 labelName: page.value.labelName
161 }).then((res: any) => { 161 }).then((res: any) => {
162 if (res.code == proxy.$passCode) { 162 if (res?.code == proxy.$passCode) {
163 const data = res.data || {} 163 const data = res.data || {}
164 tableInfo.value.data = data.records || [] 164 tableInfo.value.data = data.records || []
165 tableInfo.value.page.limit = data.pageSize 165 tableInfo.value.page.limit = data.pageSize
...@@ -193,7 +193,7 @@ const tableSwitchChange = (val, scope, field) => { ...@@ -193,7 +193,7 @@ const tableSwitchChange = (val, scope, field) => {
193 bizState: val 193 bizState: val
194 } 194 }
195 updateLabelState(params).then((res: any) => { 195 updateLabelState(params).then((res: any) => {
196 if (res.code == proxy.$passCode && res.data) { 196 if (res?.code == proxy.$passCode && res.data) {
197 getTableData(); 197 getTableData();
198 proxy.$ElMessage({ 198 proxy.$ElMessage({
199 type: "success", 199 type: "success",
...@@ -331,7 +331,7 @@ const newCreateLabelDialogInfo = ref({ ...@@ -331,7 +331,7 @@ const newCreateLabelDialogInfo = ref({
331 newCreateLabelDialogInfo.value.submitBtnLoading = true; 331 newCreateLabelDialogInfo.value.submitBtnLoading = true;
332 if (newCreateLabelDialogInfo.value.type == 'add') { 332 if (newCreateLabelDialogInfo.value.type == 'add') {
333 saveLabel(params).then((res: any) => { 333 saveLabel(params).then((res: any) => {
334 if (res.code == proxy.$passCode) { 334 if (res?.code == proxy.$passCode) {
335 proxy.$ElMessage.success('标签新建成功'); 335 proxy.$ElMessage.success('标签新建成功');
336 newCreateLabelDialogInfo.value.visible = false; 336 newCreateLabelDialogInfo.value.visible = false;
337 newCreateLabelDialogInfo.value.submitBtnLoading = false; 337 newCreateLabelDialogInfo.value.submitBtnLoading = false;
...@@ -350,7 +350,7 @@ const newCreateLabelDialogInfo = ref({ ...@@ -350,7 +350,7 @@ const newCreateLabelDialogInfo = ref({
350 params.labelRuleContent.guid = currTableData.value.labelRuleContent?.guid; 350 params.labelRuleContent.guid = currTableData.value.labelRuleContent?.guid;
351 params.labelRuleField.guid = currTableData.value.labelRuleField?.guid; 351 params.labelRuleField.guid = currTableData.value.labelRuleField?.guid;
352 updateLabel(params).then((res: any) => { 352 updateLabel(params).then((res: any) => {
353 if (res.code == proxy.$passCode) { 353 if (res?.code == proxy.$passCode) {
354 proxy.$ElMessage.success('标签编辑成功'); 354 proxy.$ElMessage.success('标签编辑成功');
355 newCreateLabelDialogInfo.value.visible = false; 355 newCreateLabelDialogInfo.value.visible = false;
356 newCreateLabelDialogInfo.value.submitBtnLoading = false; 356 newCreateLabelDialogInfo.value.submitBtnLoading = false;
...@@ -654,7 +654,7 @@ onBeforeMount(() => { ...@@ -654,7 +654,7 @@ onBeforeMount(() => {
654 getParamsList({ 654 getParamsList({
655 dictType: "标签类型", 655 dictType: "标签类型",
656 }).then((res: any) => { 656 }).then((res: any) => {
657 if (res.code == proxy.$passCode) { 657 if (res?.code == proxy.$passCode) {
658 labelTypeList.value = res.data || []; 658 labelTypeList.value = res.data || [];
659 let item = newCreateLabelFormItems.value.find(item => item.field == 'labelgroup'); 659 let item = newCreateLabelFormItems.value.find(item => item.field == 'labelgroup');
660 item && (item.children[0].options = labelTypeList.value); 660 item && (item.children[0].options = labelTypeList.value);
...@@ -665,7 +665,7 @@ onBeforeMount(() => { ...@@ -665,7 +665,7 @@ onBeforeMount(() => {
665 getParamsList({ 665 getParamsList({
666 dictType: "内置规则", 666 dictType: "内置规则",
667 }).then((res: any) => { 667 }).then((res: any) => {
668 if (res.code == proxy.$passCode) { 668 if (res?.code == proxy.$passCode) {
669 builtInRuleList.value = res.data || []; 669 builtInRuleList.value = res.data || [];
670 ruleContentFormItems.value[1].options = builtInRuleList.value; 670 ruleContentFormItems.value[1].options = builtInRuleList.value;
671 } else { 671 } else {
......
1 <route lang="yaml">
2 name: sensitiveIdentifyTaskExecLog
3 </route>
4
5 <script lang="ts" setup name="sensitiveIdentifyTaskExecLog">
6 import { ref } from "vue";
7 import { useRouter, useRoute } from "vue-router";
8 import Table from "@/components/Table/index.vue";
9 import { ElMessage } from "element-plus";
10 import { commonPageConfig } from '@/components/PageNav/index';
11 import {
12 getSensitiveDataTaskExecLog,
13 } from '@/api/modules/dataAnonymization';
14
15
16 const { proxy } = getCurrentInstance() as any;
17
18 const router = useRouter();
19 const route = useRoute();
20 const guid = route.query.guid;
21 const wordName = route.query.name
22
23 const page = ref({
24 ...commonPageConfig
25 });
26
27 const tableInfo = ref({
28 id: "word-log-table",
29 loading: false,
30 fields: [
31 { label: "报告名称", field: "analysisReportName", width: 230 },
32 {
33 label: "方案类型", field: "analysisReportType", width: 100, getName: (scope) => {
34 let planType = scope.row.analysisReportType;
35 return planType == 1 ? '表' : (planType == 2 ? '数据库' : (planType == 4 ? '数据同步' : '分组'));
36 }
37 },
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 ],
43 data: [],
44 page: {
45 type: "normal",
46 rows: 0,
47 ...page.value,
48 },
49 actionInfo: {
50 label: "操作",
51 type: "btn",
52 width: 100,
53 fixed: 'right',
54 btns: (scope) => {
55 return [{ label: "查看报告", value: "reportView", disabled: scope.row['execResult'] != 'Y' }];
56 }
57 }
58 });
59
60 const getTableData = () => {
61 tableInfo.value.loading = true;
62 getSensitiveDataTaskExecLog({ pageIndex: page.value.curr, pageSize: page.value.limit, taskGuid: guid }).then((res: any) => {
63 tableInfo.value.loading = false;
64 if (res?.code == proxy.$passCode) {
65 const data = res.data || {}
66 tableInfo.value.data = data.records || []
67 tableInfo.value.page.limit = data.pageSize
68 tableInfo.value.page.curr = data.pageIndex
69 tableInfo.value.page.rows = data.totalRows
70 } else {
71 ElMessage.error(res.msg);
72 }
73 })
74 };
75
76 const tableBtnClick = (scope, btn) => {
77 const type = btn.value;
78 const row = scope.row;
79 if (type == 'reportView') {
80 router.push({
81 name: 'analysisReport',
82 query: {
83 planGuid: row.planGuid,
84 reportExecGuid: row.guid,
85 name: wordName
86 }
87 });
88 }
89 };
90
91 onBeforeMount(() => {
92 getTableData();
93 });
94
95 </script>
96
97 <template>
98 <div class="container_wrap">
99 <div class="table_panel_wrap">
100 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
101 </div>
102 </div>
103 </template>
104
105 <style lang="scss" scoped>
106 .container_wrap {
107 padding: 0;
108
109 .table_panel_wrap {
110 height: 100%;
111 padding: 16px 16px 0;
112 }
113 }
114 </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!