Commit 2bfdff78 authored by chenjiahao's avatar chenjiahao

修复已知问题

parent b22bea4b
......@@ -23,7 +23,7 @@
<div style="margin-left: 10px">
<span class="title">id</span>
<div>
<span class="path">/共享工作区/xw/xw_inptu</span>
<span class="path">/共享工作区/xw/xw_input</span>
</div>
</div>
</div>
......@@ -63,7 +63,10 @@
>
删除
</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <= 0"
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="handleBatchEditing"
>批量编辑</a-button
>
<a-button @click="addRules" type="primary">添加规则</a-button>
......@@ -175,10 +178,19 @@
function handleEdit(record: Recordable, isUpdate) {
console.log(isUpdate);
SensProtMo(true, {
record,
data: record,
isUpdate: isUpdate,
});
}
/** 批量编辑按钮*/
function handleBatchEditing() {
console.log(getRowSelection().selectedRowKeys);
const ids = getRowSelection().selectedRowKeys;
SensProtMo(true, {
data: ids,
isUpdate: true,
});
}
/** 新增/编辑成功*/
function handleSuccess({ isUpdate, values }) {
......
import { BasicColumn, FormSchema } from '@/components/Table';
/** 列表筛选项*/
export const searchFormSchema: FormSchema[] = [
{
field: 'APIName',
label: ' ',
......@@ -28,8 +25,6 @@ export const searchFormSchema: FormSchema[] = [
],
},
},
];
/** 列表展示字段*/
......@@ -66,7 +61,6 @@ export const columns: BasicColumn[] = [
},
];
export const FieldProtectionRules: BasicColumn[] = [
{
title: '对象',
......@@ -88,10 +82,8 @@ export const FieldProtectionRules: BasicColumn[] = [
dataIndex: 'ProtectiveAction',
width: 100,
},
];
/** 添加规则表单字段*/
export const formSchema: any[] = [
{
......@@ -101,9 +93,7 @@ export const formSchema: any[] = [
colProps: { span: 4 },
componentProps: {
// placeholder: '优先级',
options: [
],
options: [],
},
rules: [
{
......@@ -139,9 +129,7 @@ export const formSchema: any[] = [
colProps: { span: 4 },
componentProps: {
placeholder: '脱敏算法',
options: [
{ label: 'Unbase64', value: 'Unbase64' },
],
options: [{ label: 'Unbase64', value: 'Unbase64' }],
},
ifShow: ({ values }) => values.protectiveAction === '脱敏',
rules: [
......@@ -161,8 +149,7 @@ export const formSchema: any[] = [
},
ifShow: ({ values }) => values.protectiveAction === '脱敏',
},
]
];
/** 查看编辑表单字段*/
export const sensitiveFormSchema: any[] = [
......@@ -182,7 +169,6 @@ export const sensitiveFormSchema: any[] = [
options: [
{ label: '用户', value: '用户' },
{ label: '机构', value: '机构' },
],
},
},
......@@ -193,9 +179,7 @@ export const sensitiveFormSchema: any[] = [
colProps: { span: 4 },
componentProps: {
// placeholder: '优先级',
options: [
],
options: [],
},
rules: [
{
......@@ -224,20 +208,17 @@ export const sensitiveFormSchema: any[] = [
},
],
},
]
];
export const roleColumn: BasicColumn[] = [
{
title: '全部角色',
dataIndex: 'name'
dataIndex: 'name',
},
];
export const roleColumn2: BasicColumn[] = [
{
title: '全部用户',
dataIndex: 'name'
dataIndex: 'name',
},
];
......@@ -6,12 +6,12 @@
:title="title"
@ok="handleSubmit"
>
<div class="modal_top">
<div>
<div class="title">{{ formParams.fieldCode }}</div>
<div class="path">{{ formParams.sensitiveState }}</div>
</div>
</div>
<!-- <div class="modal_top">-->
<!-- <div>-->
<!-- <div class="title">{{ formParams.fieldCode }}</div>-->
<!-- <div class="path">{{ formParams.sensitiveState }}</div>-->
<!-- </div>-->
<!-- </div>-->
<BasicForm @register="registerForm" />
</BasicModal>
</template>
......@@ -22,6 +22,7 @@
import { sensitiveFormSchema } from './sensitiveProtection.data';
import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { tableRulesList } from './mock';
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
......@@ -42,27 +43,57 @@
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
await resetFields();
isUpdate.value = data.isUpdate;
if (data.isUpdate === false) {
title.value = '查看字段保护规则';
updateSchema([
{ field: 'sensitiveState', required: false, componentProps: { disabled: true } },
{ field: 'sensitiveType', required: false, componentProps: { disabled: true } },
{ field: 'level', required: false, componentProps: { disabled: true } },
await updateSchema([
{ field: 'object', required: false, componentProps: { disabled: true } },
{ field: 'objectProperties', required: false, componentProps: { disabled: true } },
{ field: 'priority', required: false, componentProps: { disabled: true } },
{ field: 'ProtectiveAction', required: false, componentProps: { disabled: true } },
]);
} else {
title.value = '编辑字段保护规则';
updateSchema([
{ field: 'sensitiveState', required: true, componentProps: { disabled: false } },
{ field: 'sensitiveType', required: true, componentProps: { disabled: false } },
{ field: 'level', required: true, componentProps: { disabled: false } },
await updateSchema([
{ field: 'object', required: true, componentProps: { disabled: false } },
{ field: 'objectProperties', required: true, componentProps: { disabled: false } },
{ field: 'priority', required: true, componentProps: { disabled: false } },
{ field: 'ProtectiveAction', required: true, componentProps: { disabled: false } },
]);
}
setModalProps({ confirmLoading: false });
formParams.value = data.record;
setFieldsValue({
...data.record,
// formParams.value = data.record;
console.log(data.data.length);
console.log(data.data);
const fieldsValue = ref();
if (data.data.length >= 1) {
const businessIds = Object.values(data.data);
const result = {
object: '',
objectProperties: '',
priority: '',
ProtectiveAction: '',
};
// 收集所有匹配到的对象
const matchedObjects = tableRulesList.filter((item) => businessIds.includes(item.businessId));
// 如果存在匹配项,则进行处理
if (matchedObjects.length > 0) {
// 将所有匹配到的object字段拼接成一个字符串
result.object = matchedObjects.map((item) => item.object).join('、');
// 使用第一个匹配到的对象的其他字段作为结果
const firstMatchedItem = matchedObjects[0];
result.objectProperties = firstMatchedItem.objectProperties || '';
result.priority = firstMatchedItem.priority;
result.ProtectiveAction = firstMatchedItem.ProtectiveAction;
// 将结果赋值给fieldsValue
fieldsValue.value = result;
}
} else {
fieldsValue.value = data.data;
}
await setFieldsValue({
...fieldsValue.value,
});
});
......
......@@ -19,9 +19,9 @@
/>
</template>
</template>
<template #qualityTemplateName="{ text, record }">
<a @click="showDetails1(record)"> {{ text }}</a>
</template>
<!-- <template #qualityTemplateName="{ text, record }">-->
<!-- <a @click="showDetails1(record)"> {{ text }}</a>-->
<!-- </template>-->
<template #dataSource="{ text, record }">
<span v-for="(item, index) in text" :key="index">
{{ item.icon }}
......
......@@ -140,7 +140,7 @@
{
label: '标准分类信息',
handler: () => {
createStandardsTypeButton(node);
standardsTypeButton(node);
},
icon: 'ant-design:file-text-twotone',
},
......@@ -206,6 +206,16 @@
record,
});
}
/**新建标准分类*/
function standardsTypeButton(record) {
console.log(record.businessId);
router.push({
path: '/dataStandards/basicStandards/detailStandard',
query: {
businessId: record.businessId,
},
});
}
/**新建基础标准*/
function createBasicStandardsButton(record) {
......
......@@ -21,16 +21,8 @@
@click="MoveButton"
>移动</a-button
>
<a-button
type="primary"
@click="ImportRelativeButton"
>导入关联关系</a-button
>
<a-button
type="primary"
@click="ImportDataStandardsButton"
>导入数据标准</a-button
>
<a-button type="primary" @click="ImportRelativeButton">导入关联关系</a-button>
<a-button type="primary" @click="ImportDataStandardsButton">导入数据标准</a-button>
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
......@@ -59,16 +51,19 @@
{
icon: 'ant-design:form-outlined',
// label: '重命名',
tooltip: '重命名',
onClick: resetNameButton.bind(null, record),
},
{
icon: 'ant-design:folder-open-outlined',
// label: '移动',
tooltip: '移动',
onClick: MoveButton.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
// label: '删除',
tooltip: '删除',
color: 'error',
popConfirm: {
title: '是否确认删除',
......@@ -79,16 +74,19 @@
{
icon: 'ant-design:folder-outlined',
// label: '复制',
tooltip: '复制',
onClick: copyButton.bind(null, record),
},
{
icon: 'ant-design:file-search-outlined',
// label: '查看详情',
tooltip: '查看详情',
onClick: detailButton.bind(null, record),
},
{
icon: 'ant-design:api-outlined',
// label: '关联关系',
tooltip: '关联关系',
onClick: relatedRelationshipsButton.bind(null, record),
},
]"
......
<template>
<PageWrapper class="content-padding" contentBackground>
<div class="container">
<div style="margin-top: 20px">
<span style="font-size: 20px; font-weight: bold; margin-left: 20px">血缘影响分析</span>
<span style="margin-left: 1000px; font-size: 20px">深度</span>
<Input style="width: 100px;height: 40px; margin-left: 10px" v-model:value="key" />
<icon
style="font-size: 30px; margin-left: 10px"
icon="heroicons:magnifying-glass-plus-solid"
/>
<icon style="font-size: 30px; margin-left: 10px" icon="ph:magnifying-glass-minus" />
<icon style="font-size: 30px; margin-left: 10px" icon="hugeicons:reload" />
<icon style="font-size: 30px; margin-left: 10px" icon="lets-icons:full-alt-light" />
<a-button style="margin-left: 20px" type="primary" @click="back">退出</a-button>
<div
style="margin-top: 20px; display: flex; justify-content: space-between; align-items: center"
>
<div>
<span style="font-size: 20px; font-weight: bold; margin-left: 20px">血缘影响分析</span>
</div>
<div style="display: flex; align-items: center">
<span style="font-size: 20px">深度</span>
<Input style="width: 100px; height: 40px; margin-left: 10px" v-model:value="key" />
<!-- <icon-->
<!-- style="font-size: 25px; margin-left: 10px"-->
<!-- icon="heroicons:magnifying-glass-plus-solid"-->
<!-- />-->
<!-- <icon style="font-size: 25px; margin-left: 10px" icon="ph:magnifying-glass-minus" />-->
<icon
@click="router.go(0)"
style="font-size: 23px; margin-left: 10px"
icon="hugeicons:reload"
/>
<!-- <icon style="font-size: 25px; margin-left: 10px" icon="lets-icons:full-alt-light" />-->
<a-button style="margin-left: 20px" type="primary" @click="back">退出</a-button>
</div>
</div>
<div class="image-container">
<img src="../../../assets/images/kinshipAnalysisDetail.png" alt="Logo" class="image" />
......
......@@ -10,11 +10,21 @@
<template v-if="currentKey == '1'">
<BasicForm @register="registerForm">
<template #file>
<div style="display: flex">
<div>
<a-button>下载文件模板</a-button>
<a-button type="primary" style="margin-left: 5px">选择文件</a-button>
</div>
<div style="display: flex; gap: 10px">
<a-button @click="handleDownload">下载文件模板</a-button>
<BasicUpload
:maxSize="20"
:maxNumber="1"
@change="handleChange"
@click="handleUpload"
:api="userImport"
:accept="['.xlsx, .xls']"
>
<template #uploadBtnName>
<span>选择文件</span>
</template>
</BasicUpload>
<!-- <a-button type="primary" style="margin-left: 5px">选择文件</a-button>-->
</div>
</template>
</BasicForm>
......@@ -61,6 +71,7 @@
</template>
<script lang="ts" setup>
import { BasicUpload } from '@/components/Upload';
import { onMounted, ref } from 'vue';
import { PageWrapper } from '@/components/Page';
import { Tabs, Tag } from 'ant-design-vue';
......@@ -74,8 +85,7 @@
SearchFormSchema,
} from '@/views/kinship/kinshipEdit/data';
import { editData, historyData } from '@/views/kinship/kinshipEdit/kinshipEditData';
defineOptions({ name: 'AccountDetail' });
import { downloadByData } from '@/utils/file/download';
const tableData = ref([]);
const { createMessage, createConfirm } = useMessage();
......@@ -138,6 +148,7 @@
createMessage.success('提交成功');
}
function handleDownload() {
downloadByData(null, '血缘模板' + '.xlsx');
createMessage.success('下载成功');
}
function handleDelete() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment