Commit b905b534 authored by 曹泽华's avatar 曹泽华

数据治理-数据标准

parent dfaace8a
...@@ -706,6 +706,15 @@ export const DataStandardRoute: AppRouteRecordRaw = { ...@@ -706,6 +706,15 @@ export const DataStandardRoute: AppRouteRecordRaw = {
icon: '', icon: '',
}, },
}, },
{
path: 'referenceDocument/relatedRelationships',
name: 'referenceRelatedRelationships',
component: () => import('@/views/dataStandards/referenceDocument/relatedRelationships.vue'),
meta: {
title: '引用文档关联关系',
icon: '',
},
},
{ {
path: 'namingDictionary/versionContrast', path: 'namingDictionary/versionContrast',
name: 'versionContrast2', name: 'versionContrast2',
......
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div> <div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div>
<BasicTable @register="registerTable" ></BasicTable> <BasicTable @register="registerTable" />
<template #footer> <template #footer>
<a-button @click="handleCancel"> 取消发布</a-button> <a-button @click="handleCancel"> 取消发布</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button> <a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button>
...@@ -9,72 +15,80 @@ ...@@ -9,72 +15,80 @@
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ref, computed, unref, reactive} from 'vue'; import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { batchColumns } from './indicatorStandards.data'; import { batchColumns } from './indicatorStandards.data';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import {router} from "@/router"; import { router } from '@/router';
defineOptions({ name: 'AccountModal' }); defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const isUpdate = ref(true); const isUpdate = ref(true);
const rowId = ref(''); const rowId = ref('');
//初始化弹框
//初始化弹框 const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
setModalProps({ confirmLoading: false,showCancelBtn:false,showOkBtn:false });
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) { if (unref(isUpdate)) {
} }
});
}); const [
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({ registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '', title: '',
api: async (params) => { api: async (params) => {
const response = { const response = {
pageNu: "1", pageNu: '1',
pageSize: "10", pageSize: '10',
pages: "1", pages: '1',
total: 0, total: 0,
code:'', code: '',
message:'', message: '',
data: [], data: [],
}; };
return { ...response}; return { ...response };
}, },
columns:batchColumns, columns: batchColumns,
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
}); });
const getTitle = computed(() => ('批量发布')); const getTitle = computed(() => '批量发布');
function handleCancel() { function handleCancel() {
closeModal(); closeModal();
} }
function handleSubmitApplication() { function handleSubmitApplication() {
closeModal(); closeModal();
router.push({ router.push({
path: '/dataStandards/IndicatorStandards/applyPublication', path: '/dataStandards/referenceDocument/applyPublication',
query: {
data: JSON.stringify([
{
key: '对外投资出资方式',
model: {
path: '个人工作区/对外投资出资方式',
type: '指标标准',
},
},
]),
formSchema: '2',
},
}); });
} }
async function handleSubmit() { async function handleSubmit() {
try { try {
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
// TODO custom api // TODO custom api
closeModal(); closeModal();
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
} }
</script> </script>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
function contrastButton() { function contrastButton() {
closeModal(); closeModal();
router.push({ router.push({
path: '/dataStandards/namingDictionary/versionContrast', path: '/dataStandards/namingDictionary/domain/versionContrast',
query: { query: {
businessId: route.query.businessId, businessId: route.query.businessId,
}, },
......
...@@ -3101,7 +3101,7 @@ export const formSchemaPublishTwo: any = [ ...@@ -3101,7 +3101,7 @@ export const formSchemaPublishTwo: any = [
field: 'valueOne', field: 'valueOne',
label: '数据标准路径', label: '数据标准路径',
component: 'Input', component: 'Input',
defaultValue: '域/共享工作区/短编号', defaultValue: '个人工作区/对外投资出资方式',
componentProps: { componentProps: {
readonly: true, readonly: true,
disabled: true, disabled: true,
......
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div> <div>当前选中标准共 2条,其中1条已在其他审批流程中,本次申请不再二次提交,示例如下:</div>
<BasicTable @register="registerTable" ></BasicTable> <BasicTable @register="registerTable" />
<template #footer> <template #footer>
<a-button @click="handleCancel"> 取消发布</a-button> <a-button @click="handleCancel"> 取消发布</a-button>
<a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button> <a-button type="primary" @click="handleSubmitApplication"> 继续发布</a-button>
...@@ -9,72 +15,80 @@ ...@@ -9,72 +15,80 @@
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ref, computed, unref, reactive} from 'vue'; import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { batchColumns } from './basicStandards.data'; import { batchColumns } from './basicStandards.data';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import {router} from "@/router"; import { router } from '@/router';
defineOptions({ name: 'AccountModal' }); defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const isUpdate = ref(true); const isUpdate = ref(true);
const rowId = ref(''); const rowId = ref('');
//初始化弹框
//初始化弹框 const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
setModalProps({ confirmLoading: false,showCancelBtn:false,showOkBtn:false });
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) { if (unref(isUpdate)) {
} }
});
}); const [
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({ registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '', title: '',
api: async (params) => { api: async (params) => {
const response = { const response = {
pageNu: "1", pageNu: '1',
pageSize: "10", pageSize: '10',
pages: "1", pages: '1',
total: 0, total: 0,
code:'', code: '',
message:'', message: '',
data: [], data: [],
}; };
return { ...response}; return { ...response };
}, },
columns:batchColumns, columns: batchColumns,
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
}); });
const getTitle = computed(() => ('批量发布')); const getTitle = computed(() => '批量发布');
function handleCancel() { function handleCancel() {
closeModal(); closeModal();
} }
function handleSubmitApplication() { function handleSubmitApplication() {
closeModal(); closeModal();
router.push({ router.push({
path: '/dataStandards/basicStandards/applyPublication', path: '/dataStandards/referenceDocument/applyPublication',
query: {
data: JSON.stringify([
{
key: '对外投资出资方式',
model: {
path: '个人工作区/对外投资出资方式',
type: '基础标准',
},
},
]),
formSchema: '1',
},
}); });
} }
async function handleSubmit() { async function handleSubmit() {
try { try {
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
// TODO custom api // TODO custom api
closeModal(); closeModal();
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
} }
</script> </script>
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
<Divider/> <Divider />
<BasicForm @register="registerFormTwo" /> <BasicForm @register="registerFormTwo" />
<div class="table-container"> <div class="table-container">
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span> <span>对外投资出资方式</span>
<div>域/共享工作区/短编号</div> <div>个人工作区/对外投资出资方式</div>
</div> </div>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编号</span> <span>对外投资出资方式</span>
<div>域/共享工作区/短编号</div> <div>个人工作区/对外投资出资方式</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -26,26 +32,14 @@ ...@@ -26,26 +32,14 @@
</div> </div>
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<step-header title="属性"/> <BasicForm @register="registerLeftForm1" />
<Row> <BasicForm @register="registerLeftForm11" />
<Col :span="6"> <BasicForm @register="registerLeftForm12" />
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<step-header title="属性"/> <BasicForm @register="registerLeftForm1" />
<Row> <BasicForm @register="registerLeftForm11" />
<Col :span="6"> <BasicForm @register="registerLeftForm12" />
域名称
</Col>
<Col :span="18">
短编号
</Col>
</Row>
</div> </div>
</div> </div>
</div> </div>
...@@ -56,23 +50,29 @@ ...@@ -56,23 +50,29 @@
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import {ref, computed, unref, reactive} from 'vue'; import {ref, computed, unref, reactive, onMounted} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, FormProps, useForm } from '@/components/Form';
import {formSchemaPublish, formSchemaPublishTwo} from './basicStandards.data'; import { formSchemaPublish, formSchemaPublishTwo } from './basicStandards.data';
import { Divider,Form,Col, Row, } from 'ant-design-vue'; import { Divider, Form, Col, Row } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' }); import stepHeader from '../../../components/stepHeader.vue';
import stepHeader from '../../../components/stepHeader.vue' import StepHeader from '@/components/stepHeader.vue';
import StepHeader from "@/components/stepHeader.vue"; import {
const emit = defineEmits(['success', 'register']); contrastSchema1,
const { createMessage } = useMessage(); contrastSchema11,
const isUpdate = ref(true); contrastSchema12,
const rowId = ref(''); } from '@/views/dataStandards/referenceDocument/referenceDocument.data';
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单 defineOptions({ name: 'AccountModal' });
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({ const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 24, md: 24 }, baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublish, schemas: formSchemaPublish,
...@@ -80,8 +80,8 @@ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = ...@@ -80,8 +80,8 @@ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] =
actionColOptions: { actionColOptions: {
span: 23, span: 23,
}, },
}); });
const [registerFormTwo] = useForm({ const [registerFormTwo] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 24, md: 24 }, baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublishTwo, schemas: formSchemaPublishTwo,
...@@ -89,34 +89,51 @@ const [registerFormTwo] = useForm({ ...@@ -89,34 +89,51 @@ const [registerFormTwo] = useForm({
actionColOptions: { actionColOptions: {
span: 23, span: 23,
}, },
}); });
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
const [registerLeftForm1, { setFieldsValue: setLeftFieldsValue1, resetSchema: resetSchema1 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema1,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm11, { setFieldsValue: setLeftFieldsValue11, resetSchema: resetSchema11 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema11,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm12, { setFieldsValue: setLeftFieldsValue12, resetSchema: resetSchema12 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema12,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields(); resetFields();
setModalProps({ confirmLoading: false,showOkBtn:false,showCancelBtn:false }); setModalProps({ confirmLoading: false, showOkBtn: false, showCancelBtn: false });
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) { if (unref(isUpdate)) {
} }
updateSchema({ updateSchema({});
}); });
});
const getTitle = computed(() => ('发布申请')); const getTitle = computed(() => '发布申请');
function handleCancel() { function handleCancel() {
closeModal(); closeModal();
} }
function handleSubmitApplication() { function handleSubmitApplication() {
createMessage.success('发布成功'); createMessage.success('发布成功');
closeModal(); closeModal();
} }
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate(); const values = await validate();
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
...@@ -126,14 +143,14 @@ async function handleSubmit() { ...@@ -126,14 +143,14 @@ async function handleSubmit() {
} finally { } finally {
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.info_title{ .info_title {
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
} }
.table-container { .table-container {
display: grid; display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */ grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */ gap: 0; /* Space between cells, to create border effect */
...@@ -147,5 +164,5 @@ async function handleSubmit() { ...@@ -147,5 +164,5 @@ async function handleSubmit() {
border: 1px solid #ddd; border: 1px solid #ddd;
} }
} }
} }
</style> </style>
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { resetNameFormSchema } from './referenceDocument.data';
import { useMessage } from '@/hooks/web/useMessage';
import { TreeData } from '@/views/dataStandards/basicStandards/basicStandardsData';
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const rowId = ref('');
const getTitle = computed(() => '重命名');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: resetNameFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
await setFieldsValue({
...data.record,
});
});
/**确定按钮*/
async function handleSubmit() {
createMessage.success('重命名成功!');
closeModal();
}
</script>
...@@ -71,10 +71,13 @@ ...@@ -71,10 +71,13 @@
data: JSON.stringify([ data: JSON.stringify([
{ {
key: '企业号', key: '企业号',
model: {}, model: {
path: 'admin_个人工作区/企业/企业号',
type: '命名字典',
},
}, },
]), ]),
formSchema: '2', formSchema: '4',
}, },
}); });
} }
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
model: {}, model: {},
}, },
]), ]),
formSchema: '4', formSchema: '6',
}, },
}); });
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div> <div>
<div style="font-weight: bold; font-size: 25px">短编号</div> <div style="font-weight: bold; font-size: 25px">短编号</div>
<div>域/共享工作区/企业/短编号</div> <div>域/共享工作区/短编号</div>
</div> </div>
</div> </div>
<div style="margin-top: 10px; display: flex" v-if="!isShow"> <div style="margin-top: 10px; display: flex" v-if="!isShow">
......
...@@ -185,7 +185,9 @@ ...@@ -185,7 +185,9 @@
console.log('st', state); console.log('st', state);
} }
/** 导出按钮*/ /** 导出按钮*/
function handleExport() {} function handleExport() {
downloadByData('excel content', '域信息.xlsx');
}
function handlePublish() { function handlePublish() {
openModalBatch(true, {}); openModalBatch(true, {});
......
...@@ -32,18 +32,10 @@ ...@@ -32,18 +32,10 @@
</div> </div>
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<step-header title="属性" /> <BasicForm @register="registerLeftForm1" />
<Row>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<step-header title="属性" /> <BasicForm @register="registerLeftForm2" />
<Row>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div> </div>
</div> </div>
</div> </div>
...@@ -57,8 +49,12 @@ ...@@ -57,8 +49,12 @@
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { ref, computed, unref, reactive } from 'vue'; import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, FormProps, useForm } from '@/components/Form';
import { formSchemaPublish, formSchemaPublishTwo } from './referenceDocument.data'; import {
contrastSchema4,
formSchemaPublish,
formSchemaPublishTwo,
} from './referenceDocument.data';
import { Divider, Form, Col, Row } from 'ant-design-vue'; import { Divider, Form, Col, Row } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
...@@ -88,6 +84,21 @@ ...@@ -88,6 +84,21 @@
span: 23, span: 23,
}, },
}); });
const [registerLeftForm1, { setFieldsValue: setLeftFieldsValue1, resetSchema: resetSchema1 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema4,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm2, { setFieldsValue: setLeftFieldsValue2, resetSchema: resetSchema2 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema4,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
//初始化弹框 //初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields(); resetFields();
......
...@@ -860,3 +860,115 @@ export const contrastSchema: FormSchema[] = [ ...@@ -860,3 +860,115 @@ export const contrastSchema: FormSchema[] = [
}, },
}, },
]; ];
export const contrastSchema4: FormSchema[] = [
{
field: '',
label: '属性',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
},
{
field: 'valueOne',
label: '域名称',
component: 'Input',
defaultValue: '短编号',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词中文名称',
},
},
{
field: 'valueTwo',
label: '父域',
component: 'Input',
defaultValue: '字符型',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词英文全称',
},
},
{
field: 'valueThree',
label: '字段示例',
component: 'Input',
defaultValue: '会员号/品种代码',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词英文简称',
},
},
{
field: 'valueFour',
label: '数据类型',
component: 'Input',
defaultValue: 'varchar',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
},
},
{
field: 'valueFive',
label: '传统数据库数据类型',
component: 'Input',
defaultValue: 'varchar',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
},
},
{
field: 'valueSix',
label: '长度',
component: 'Input',
defaultValue: '10',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
},
},
{
field: 'valueSeven',
label: '精度',
component: 'Input',
defaultValue: '-',
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
},
},
];
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
/> />
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo"> <BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar> <template #toolbar>
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary" @click="handleCopy" <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleCopy"
>复制到</a-button >复制到</a-button
> >
<a-button <a-button
...@@ -17,9 +20,17 @@ ...@@ -17,9 +20,17 @@
@click="handleDeleteIds" @click="handleDeleteIds"
>删除</a-button >删除</a-button
> >
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" @click="handleMove" type="primary">移动</a-button> <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="handleMove"
type="primary"
>移动</a-button
>
<a-button @click="handleImport" type="primary">导入</a-button> <a-button @click="handleImport" type="primary">导入</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary" <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleExport"
>导出命名字典</a-button >导出命名字典</a-button
> >
<a-button <a-button
...@@ -29,11 +40,7 @@ ...@@ -29,11 +40,7 @@
>批量发布</a-button >批量发布</a-button
> >
<a-button type="primary" @click="handleAddDocumentClassification">新增名词分类</a-button> <a-button type="primary" @click="handleAddDocumentClassification">新增名词分类</a-button>
<a-button <a-button @click="handleAddManage" type="primary">新增名词</a-button>
@click="handleAddManage"
type="primary"
>新增名词</a-button
>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
...@@ -41,6 +48,7 @@ ...@@ -41,6 +48,7 @@
:actions="[ :actions="[
{ {
icon: 'ant-design:form-outlined', icon: 'ant-design:form-outlined',
onClick: resetNameButton.bind(null, record),
// label: '移动', // label: '移动',
}, },
{ {
...@@ -83,6 +91,7 @@ ...@@ -83,6 +91,7 @@
<ImportModalInfo @register="registerModalImport" /> <ImportModalInfo @register="registerModalImport" />
<CopyModal @register="registerCopyModal" /> <CopyModal @register="registerCopyModal" />
<MoveModal @register="registerMOveModal" /> <MoveModal @register="registerMOveModal" />
<ResetNameModal @register="registerResetNameModal" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -103,9 +112,10 @@ ...@@ -103,9 +112,10 @@
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { router } from '@/router'; import { router } from '@/router';
import ManageModal from './manageModal.vue'; import ManageModal from './manageModal.vue';
import CopyModal from "@/views/dataStandards/namingDictionary/CopyModal.vue"; import CopyModal from '@/views/dataStandards/namingDictionary/CopyModal.vue';
import MoveModal from "@/views/dataStandards/namingDictionary/MoveModal.vue"; import MoveModal from '@/views/dataStandards/namingDictionary/MoveModal.vue';
import ImportModalInfo from "@/views/dataStandards/namingDictionary/importModalInfo.vue"; import ImportModalInfo from '@/views/dataStandards/namingDictionary/importModalInfo.vue';
import ResetNameModal from '@/views/dataStandards/namingDictionary/ResetNameModal.vue';
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
...@@ -118,6 +128,15 @@ ...@@ -118,6 +128,15 @@
const [registerCopyModal, { openModal: openCopyModal }] = useModal(); const [registerCopyModal, { openModal: openCopyModal }] = useModal();
const [registerModalManage, { openModal: openModalManage }] = useModal(); const [registerModalManage, { openModal: openModalManage }] = useModal();
const [registerModalBatch, { openModal: openModalBatch }] = useModal(); const [registerModalBatch, { openModal: openModalBatch }] = useModal();
const [registerResetNameModal, { openModal: openResetNameModal }] = useModal();
/**重命名 按钮*/
function resetNameButton(record) {
openResetNameModal(true, {
isUpdate: true,
record,
});
}
const searchInfo = reactive<Recordable>({}); const searchInfo = reactive<Recordable>({});
const [ const [
registerTable, registerTable,
...@@ -197,7 +216,9 @@ ...@@ -197,7 +216,9 @@
reload(); reload();
} }
/** 导出按钮*/ /** 导出按钮*/
async function handleExport() {} function handleExport() {
downloadByData('excel content', '命名字典信息.xlsx');
}
function handleView(record: Recordable) { function handleView(record: Recordable) {
router.push({ router.push({
path: '/dataStandards/namingDictionary/details', path: '/dataStandards/namingDictionary/details',
......
...@@ -61,48 +61,14 @@ export const treeDataList = [ ...@@ -61,48 +61,14 @@ export const treeDataList = [
export const treeObjectDataList = [ export const treeObjectDataList = [
{ {
label: '数据库对象资源', label: '数据标准',
value: 1, value: 1,
icon: 'home|svg', icon: 'home|svg',
children: [ children: [
{ {
label: 'admin_个人工作区', label: '命名字典元模型',
value: 2, value: 2,
icon: 'home|svg', icon: 'home|svg',
children: [
{
label: '数据源1',
value: 3,
icon: 'home|svg',
children: [{ label: '数据库1', value: 4, children: [{ label: '数据表1', value: 5 }] }],
},
],
},
{
label: '共享工作区',
value: 6,
icon: 'home|svg',
children: [
{
label: '数据源2',
value: 7,
icon: 'home|svg',
children: [{ label: '数据库2', value: 8, children: [{ label: '数据表2', value: 9 }] }],
},
],
},
{
label: '高级工作区',
value: 10,
icon: 'home|svg',
children: [
{
label: '数据源3',
value: 11,
icon: 'home|svg',
children: [{ label: '数据库3', value: 12, children: [{ label: '数据表3', value: 13 }] }],
},
],
}, },
], ],
}, },
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<div class="table-cell label"> <div class="table-cell label">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编</span> <span>企业</span>
<div>域/共享工作区/短编号</div> <div>命名字典/admin-个人工作区/企业/企业号 </div>
</div> </div>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>短编</span> <span>企业</span>
<div>域/共享工作区/短编号</div> <div>命名字典/admin-个人工作区/企业/企业号 </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -32,18 +32,10 @@ ...@@ -32,18 +32,10 @@
</div> </div>
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<step-header title="属性" /> <BasicForm @register="registerLeftForm1" />
<Row>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<step-header title="属性" /> <BasicForm @register="registerLeftForm2" />
<Row>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div> </div>
</div> </div>
</div> </div>
...@@ -58,7 +50,11 @@ ...@@ -58,7 +50,11 @@
import { ref, computed, unref, reactive } from 'vue'; import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import { formSchemaPublish, formSchemaPublishTwo } from './referenceDocument.data'; import {
contrastSchema2,
formSchemaPublish,
formSchemaPublishTwo,
} from './referenceDocument.data';
import { Divider, Form, Col, Row } from 'ant-design-vue'; import { Divider, Form, Col, Row } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
...@@ -88,6 +84,21 @@ ...@@ -88,6 +84,21 @@
span: 23, span: 23,
}, },
}); });
const [registerLeftForm1, { setFieldsValue: setLeftFieldsValue1, resetSchema: resetSchema1 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema2,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm2, { setFieldsValue: setLeftFieldsValue2, resetSchema: resetSchema2 }] =
useForm({
labelWidth: 100,
schemas: contrastSchema2,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
//初始化弹框 //初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields(); resetFields();
......
...@@ -136,7 +136,8 @@ export const formSchema: FormSchema[] = [ ...@@ -136,7 +136,8 @@ export const formSchema: FormSchema[] = [
{ {
field: 'modal', field: 'modal',
component: 'Cascader', component: 'Cascader',
label: '路径', label: '关联元模型',
defaultValue: '数据标准/命名字典元模型',
componentProps: { componentProps: {
// dataField: 'data', // dataField: 'data',
labelField: 'label', labelField: 'label',
...@@ -510,7 +511,7 @@ export const formSchemaPublishTwo: any = [ ...@@ -510,7 +511,7 @@ export const formSchemaPublishTwo: any = [
field: 'valueOne', field: 'valueOne',
label: '数据标准路径', label: '数据标准路径',
component: 'Input', component: 'Input',
defaultValue: '域/共享工作区/短编号', defaultValue: '命名字典/admin-个人工作区/企业/企业号 ',
componentProps: { componentProps: {
readonly: true, readonly: true,
disabled: true, disabled: true,
...@@ -655,7 +656,6 @@ export const copyFormSchema: any[] = [ ...@@ -655,7 +656,6 @@ export const copyFormSchema: any[] = [
}, },
]; ];
export const contrastSchema: FormSchema[] = [ export const contrastSchema: FormSchema[] = [
{ {
field: '', field: '',
...@@ -736,3 +736,96 @@ export const contrastSchema: FormSchema[] = [ ...@@ -736,3 +736,96 @@ export const contrastSchema: FormSchema[] = [
}, },
}, },
]; ];
export const resetNameFormSchema: FormSchema[] = [
{
field: 'name',
label: '文件中文名',
component: 'Input',
rules: [
{
required: true,
message: '请输入标准中文名称',
},
],
componentProps: {
placeholder: '请输入文件中文名',
},
colProps: { lg: 24, md: 24 },
},
];
export const contrastSchema2: FormSchema[] = [
{
field: '',
label: '属性',
component: 'BasicTitle',
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
marginLeft: '15px',
fontWeight: 'bold',
},
},
},
{
field: 'valueOne',
label: '名词中文名称',
component: 'Input',
defaultValue: '企业号',
rules: [
{
message: '请输入名词中文名称',
},
],
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词中文名称',
},
},
{
field: 'valueTwo',
label: '名词英文全称',
component: 'Input',
defaultValue: 'REF000023',
rules: [
{
message: '请输入名词英文全称',
},
],
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词英文全称',
},
},
{
field: 'valueThree',
label: '名词英文简称',
component: 'Input',
defaultValue: '标准文件A',
rules: [
{
message: '请输入名词英文简称',
},
],
componentProps: {
style: {
border: 'none',
backgroundColor: 'transparent',
},
readonly: true,
placeholder: '请输入名词英文简称',
},
},
];
...@@ -71,10 +71,13 @@ ...@@ -71,10 +71,13 @@
data: JSON.stringify([ data: JSON.stringify([
{ {
key: '对外投资出资方式', key: '对外投资出资方式',
model: {}, model: {
path: '个人工作区/对外投资出资方式',
type: '公共代码',
},
}, },
]), ]),
formSchema: '3', formSchema: '5',
}, },
}); });
} }
......
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { resetNameFormSchema } from './referenceDocument.data';
import { useMessage } from '@/hooks/web/useMessage';
import {TreeData} from "@/views/dataStandards/basicStandards/basicStandardsData";
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const rowId = ref('');
const getTitle = computed(() => ('重命名'));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: resetNameFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
setFieldsValue({
...data.record,
})
});
/**确定按钮*/
async function handleSubmit() {
createMessage.success('重命名成功!');
closeModal()
}
</script>
<template> <template>
<div class="applyPublication_module"> <div class="applyPublication_module">
<div class="top_title"> <div class="top_title">
<div class="title"> 申请发布<日期类>等2个域 </div> <div class="title"> 申请发布<{{ key }}> {{ type }} </div>
<div> <div>
<a-button type="primary" @click="handleGoBack">取消</a-button> <a-button type="primary" @click="handleGoBack">取消</a-button>
<a-button style="margin-left: 20px" type="primary">提交申请</a-button> <a-button style="margin-left: 20px" type="primary">提交申请</a-button>
...@@ -11,22 +11,24 @@ ...@@ -11,22 +11,24 @@
<BasicForm @register="registerForm1" /> <BasicForm @register="registerForm1" />
<Tabs v-model:activeKey="activeKey" tab-position="left" animated> <Tabs v-model:activeKey="activeKey" tab-position="left" animated>
<TabPane :key="index" :tab="item.key" v-for="(item, index) in list"> <TabPane :key="index" :tab="item.key" v-for="(item, index) in list">
<BasicForm @register="registerForm2" /> <BasicForm @register="registerForm2">
<template #path> </template>
</BasicForm>
<div class="contrastTitle">版本对比</div> <div class="contrastTitle">版本对比</div>
<div class="table-container"> <div class="table-container">
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span> <span>{{ key }}</span>
<div>共享工作区/日期类</div> <div>{{ path }}</div>
</div> </div>
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<div> <div>
<Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" /> <Icon icon="ant-design:database-outlined" :size="20" :color="'#42C465'" />
<span>日期类</span> <span>{{ key }}</span>
<div>共享工作区/日期类</div> <div>{{ path }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -37,9 +39,17 @@ ...@@ -37,9 +39,17 @@
<div class="table-row"> <div class="table-row">
<div class="table-cell label"> <div class="table-cell label">
<BasicForm @register="registerLeftForm1" /> <BasicForm @register="registerLeftForm1" />
<BasicForm v-if="isShow === '1'" @register="registerLeftForm11" />
<BasicForm v-if="isShow === '1'" @register="registerLeftForm12" />
<BasicForm v-if="isShow === '2'" @register="registerLeftForm21" />
<BasicForm v-if="isShow === '2'" @register="registerLeftForm22" />
</div> </div>
<div class="table-cell value"> <div class="table-cell value">
<BasicForm @register="registerLeftForm2" /> <BasicForm @register="registerLeftForm2" />
<BasicForm v-if="isShow === '1'" @register="registerLeftForm11" />
<BasicForm v-if="isShow === '1'" @register="registerLeftForm12" />
<BasicForm v-if="isShow === '2'" @register="registerLeftForm21" />
<BasicForm v-if="isShow === '2'" @register="registerLeftForm22" />
</div> </div>
</div> </div>
</div> </div>
...@@ -86,17 +96,23 @@ ...@@ -86,17 +96,23 @@
<script lang="ts" setup> <script lang="ts" setup>
import { BasicForm, FormProps, useForm } from '@/components/Form'; import { BasicForm, FormProps, useForm } from '@/components/Form';
import StepHeader from '@/components/stepHeader.vue'; import StepHeader from '@/components/stepHeader.vue';
import {nextTick, onMounted, ref} from 'vue'; import { nextTick, onMounted, ref } from 'vue';
import { Tabs, Col, Row } from 'ant-design-vue'; import { Tabs, Col, Row } from 'ant-design-vue';
import { import {
applySchemas, applySchemas,
applySchemas1, applySchemas1,
applySchemas2, applySchemas2,
applySchemas3, applySchemas3,
contrastSchema, contrastSchema1,
contrastSchema2, contrastSchema2,
contrastSchema3, contrastSchema3,
contrastSchema4, contrastSchema4,
contrastSchema5,
contrastSchema6,
contrastSchema11,
contrastSchema12,
contrastSchema21,
contrastSchema22,
} from './referenceDocument.data'; } from './referenceDocument.data';
import moment from 'moment'; import moment from 'moment';
import { router } from '@/router'; import { router } from '@/router';
...@@ -106,19 +122,50 @@ ...@@ -106,19 +122,50 @@
const activeKey = ref(0); const activeKey = ref(0);
const TabPane = Tabs.TabPane; const TabPane = Tabs.TabPane;
const list = ref([]); const list = ref([]);
const path = ref();
const type = ref();
const key = ref();
const formSchema = route.query.formSchema; const formSchema = route.query.formSchema;
const [registerLeftForm1, { setFieldsValue: setLeftFieldsValue1, resetSchema: resetSchema1 }] = useForm({ const isShow = route.query.formSchema;
const qwe = route.query.data;
const [registerLeftForm1, { setFieldsValue: setLeftFieldsValue1, resetSchema: resetSchema1 }] =
useForm({
labelWidth: 100, labelWidth: 100,
// schemas: [], // schemas: [],
baseColProps: { span: 24 }, baseColProps: { span: 24 },
showActionButtonGroup: false, showActionButtonGroup: false,
} as FormProps); } as FormProps);
const [registerLeftForm2, { setFieldsValue: setLeftFieldsValue2, resetSchema: resetSchema2 }] = useForm({ const [registerLeftForm2, { setFieldsValue: setLeftFieldsValue2, resetSchema: resetSchema2 }] =
useForm({
labelWidth: 100, labelWidth: 100,
// schemas: [], // schemas: [],
baseColProps: { span: 24 }, baseColProps: { span: 24 },
showActionButtonGroup: false, showActionButtonGroup: false,
} as FormProps); } as FormProps);
const [registerLeftForm11, {}] = useForm({
labelWidth: 100,
schemas: contrastSchema11,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm12, {}] = useForm({
labelWidth: 100,
schemas: contrastSchema12,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm21, {}] = useForm({
labelWidth: 100,
schemas: contrastSchema21,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerLeftForm22, {}] = useForm({
labelWidth: 100,
schemas: contrastSchema22,
baseColProps: { span: 24 },
showActionButtonGroup: false,
} as FormProps);
const [registerForm, { setFieldsValue }] = useForm({ const [registerForm, { setFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 12, md: 24 }, baseColProps: { lg: 12, md: 24 },
...@@ -137,7 +184,7 @@ ...@@ -137,7 +184,7 @@
span: 23, span: 23,
}, },
}); });
const [registerForm2, {}] = useForm({ const [registerForm2, { setFieldsValue: setForm2Value }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 12, md: 24 }, baseColProps: { lg: 12, md: 24 },
schemas: applySchemas2, schemas: applySchemas2,
...@@ -161,23 +208,33 @@ ...@@ -161,23 +208,33 @@
} }
onMounted(() => { onMounted(() => {
list.value = JSON.parse(route.query.data); list.value = JSON.parse(route.query.data);
console.log('formSchema', formSchema); path.value = list.value[0].model.path;
type.value = list.value[0].model.type;
key.value = list.value[0].key;
nextTick(() => { nextTick(() => {
setForm2Value({ ...list.value[0].model, name: list.value[0].key });
console.log('formSchema', formSchema);
if (formSchema === '1') { if (formSchema === '1') {
resetSchema1([...contrastSchema]); resetSchema1([...contrastSchema1]);
resetSchema2([...contrastSchema]); resetSchema2([...contrastSchema1]);
} else if (formSchema === '2') { } else if (formSchema === '2') {
resetSchema1([...contrastSchema2]); resetSchema1([...contrastSchema2]);
resetSchema2([...contrastSchema2]); resetSchema2([...contrastSchema2]);
} else if (formSchema === '3') { } else if (formSchema === '3') {
console.log('12312312');
resetSchema1([...contrastSchema3]); resetSchema1([...contrastSchema3]);
resetSchema2([...contrastSchema3]); resetSchema2([...contrastSchema3]);
} else if (formSchema === '4') { } else if (formSchema === '4') {
resetSchema1([...contrastSchema4]); resetSchema1([...contrastSchema4]);
resetSchema2([...contrastSchema4]); resetSchema2([...contrastSchema4]);
} else if (formSchema === '5') {
console.log('12312312');
resetSchema1([...contrastSchema5]);
resetSchema2([...contrastSchema5]);
} else if (formSchema === '6') {
resetSchema1([...contrastSchema6]);
resetSchema2([...contrastSchema6]);
} }
}) });
setFieldsValue({ setFieldsValue({
time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'), time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
}); });
......
...@@ -71,10 +71,14 @@ ...@@ -71,10 +71,14 @@
data: JSON.stringify([ data: JSON.stringify([
{ {
key: '标准文件A', key: '标准文件A',
model: {}, model: {
path: '引用文档管理/admin-个人工作区/国家标准/标准文件A',
type: '引用文档',
},
}, },
]), ]),
formSchema: '1', formSchema: '3',
}, },
}); });
} }
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
> >
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary">移动</a-button> <a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary">移动</a-button>
<a-button type="primary" @click="handleImport">导入文档信息</a-button> <a-button type="primary" @click="handleImport">导入文档信息</a-button>
<a-button :disabled="getRowSelection().selectedRowKeys <= 0" type="primary">导出</a-button> <a-button
:disabled="getRowSelection().selectedRowKeys <= 0"
type="primary"
@click="handleExport"
>导出</a-button
>
<a-button <a-button
:disabled="getRowSelection().selectedRowKeys <= 0" :disabled="getRowSelection().selectedRowKeys <= 0"
type="primary" type="primary"
...@@ -74,6 +79,7 @@ ...@@ -74,6 +79,7 @@
<ImportModalInfo @register="registerModalImport" /> <ImportModalInfo @register="registerModalImport" />
<CopyModal @register="registerCopyModal" @success="handleSuccess" /> <CopyModal @register="registerCopyModal" @success="handleSuccess" />
<MoveModal @register="registerMoveModal" @success="handleSuccess" /> <MoveModal @register="registerMoveModal" @success="handleSuccess" />
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -96,7 +102,8 @@ ...@@ -96,7 +102,8 @@
import BatchPublish from '@/views/dataStandards/referenceDocument/batchPublish.vue'; import BatchPublish from '@/views/dataStandards/referenceDocument/batchPublish.vue';
import CopyModal from './CopyModal.vue'; import CopyModal from './CopyModal.vue';
import MoveModal from './MoveModal.vue'; import MoveModal from './MoveModal.vue';
import ImportModalInfo from "@/views/dataStandards/referenceDocument/importModalInfo.vue"; import ImportModalInfo from '@/views/dataStandards/referenceDocument/importModalInfo.vue';
import ResetNameModal from '@/views/dataStandards/referenceDocument/ResetNameModal.vue';
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
...@@ -190,7 +197,9 @@ ...@@ -190,7 +197,9 @@
reload(); reload();
} }
/** 导出按钮*/ /** 导出按钮*/
async function handleExport() {} function handleExport() {
downloadByData('excel content', '引用文档信息.xlsx');
}
function handleView(record: Recordable) { function handleView(record: Recordable) {
router.push({ router.push({
path: '/dataStandards/referenceDocument/details', path: '/dataStandards/referenceDocument/details',
...@@ -208,7 +217,7 @@ ...@@ -208,7 +217,7 @@
/**关联关系*/ /**关联关系*/
function relatedRelationshipsButton(record: Recordable) { function relatedRelationshipsButton(record: Recordable) {
router.push({ router.push({
path: '/dataStandards/basicStandards/relatedRelationships', path: '/dataStandards/referenceDocument/relatedRelationships',
query: { query: {
businessId: 201, businessId: 201,
}, },
......
...@@ -120,3 +120,15 @@ export const rightContrastData: any[] = [ ...@@ -120,3 +120,15 @@ export const rightContrastData: any[] = [
valueEight: '-', valueEight: '-',
}, },
]; ];
export const relatedRelationshipsData2 = [
{
businessId: '1',
standardName: '当前就读学校',
standardNumber: 'BIDQ000000001',
path: '/基础标准/DMP_admin-个人工作区/...',
associationRelation:'无',
associationDescription: '无',
associationTime: '2024-01-01 10:00:00',
operatorUser: 'DMP_admin',
},
]
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { relatedBasicStandardsSchema } from './referenceDocument.data';
import { useMessage } from '@/hooks/web/useMessage';
import {qualityTreeData, TreeData} from "@/views/dataStandards/basicStandards/basicStandardsData";
import { BasicTable, useTable, TableAction } from '@/components/Table';
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const rowId = ref('');
const getTitle = computed(() => ('关联基础标准'));
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: relatedBasicStandardsSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
setFieldsValue({
...data.record,
})
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([
{
field: 'basicStandardsTree',
componentProps: {
treeData: treeList
},
},
]);
});
/**确定按钮*/
async function handleSubmit() {
createMessage.success('移动成功');
closeModal()
}
/**数组对象转成树*/
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id'
parentId = parentId || 'parentId'
children = children || 'children'
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data))
// 循环所有项
const treeData = cloneData.filter(father => {
const branchArr = cloneData.filter(child => {
// 返回每一项的子级数组
return father[id] === child[parentId]
})
branchArr.length > 0 ? father.children = branchArr : ''
// 返回第一层
return father[parentId] === rootId
})
return treeData !== '' ? treeData : data
}
</script>
<template>
<PageWrapper :title="title" class="content-padding" contentBackground @back="goBack">
<BasicTable @register="registerTable2">
<template #toolbar>
<a-button type="primary" @click="referenceBasicStandardsButton">引用标准</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
//解绑
icon: 'ant-design:link-outlined',
onClick: unbindButton.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<!-- 引用基础标准 弹窗-->
<RelatedBasicStandardModal @register="registerBasicStandardModal" @success="handleSuccess" />
</PageWrapper>
</template>
<script lang="ts" setup>
import { Divider } from 'ant-design-vue';
import { router } from '@/router';
import { BasicForm, useForm } from '@/components/Form';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useMessage } from '@/hooks/web/useMessage';
import { PageWrapper } from '@/components/Page';
import { useGo } from '@/hooks/web/usePage';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import RelatedQualityModal from './relatedQualityModal.vue';
import RelatedBasicStandardModal from './relatedReferenceDocumentModal.vue';
import RelatedMetaDataModal from './relatedMetaDataModal.vue';
import RelatedIndicatorStandardsModal from './relatedIndicatorStandardsModal.vue';
import { relatedRelationshipColumns2 } from './referenceDocument.data';
import { relatedRelationshipsData2 } from './mock';
import { useModal } from '@/components/Modal';
const go = useGo();
const route = useRoute();
const title = ref('关联关系');
const { createMessage, createConfirm } = useMessage();
const [registerBasicStandardModal, { openModal: openBasicStandardModal }] = useModal();
const [registerTable2] = useTable({
title: '基础标准',
api: async (params) => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: relatedRelationshipsData2.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
return { ...response, data: relatedRelationshipsData2 };
},
columns: relatedRelationshipColumns2,
useSearchForm: false,
showTableSetting: false,
pagination: false,
showIndexColumn: false,
bordered: true,
scroll: { y: 500 },
actionColumn: {
width: 100,
title: '操作',
dataIndex: 'action',
},
});
/**引用基础标准 按钮*/
function referenceBasicStandardsButton(record) {
openBasicStandardModal(true, {});
}
/**解绑 按钮*/
function unbindButton(record) {
createConfirm({
iconType: 'warning',
title: '确认解绑',
content: '确认解绑选中的数据吗?',
onOk() {
createMessage.success('解绑成功!');
},
});
}
/**按钮*/
function Button(record) {
router.push({
path: '',
query: {},
});
}
/**返回*/
function goBack() {
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
go('/dataStandards/IndicatorStandards/index');
}
/**初始化*/
onMounted(() => {});
</script>
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