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

数据治理

parent 71b59ac3
......@@ -39,7 +39,7 @@ export const tableList: any[] = [
flag: '--',
group: '共享工作组',
},
]
];
export const treeDataList = [
{
......@@ -52,20 +52,61 @@ export const treeDataList = [
value: 2,
icon: 'home|svg',
children: [
{ label: '企业',
{ label: '企业', value: 3, icon: 'home|svg', children: [{ label: '企业号', value: 4 }] },
],
},
],
},
];
export const treeObjectDataList = [
{
label: '数据库对象资源',
value: 1,
icon: 'home|svg',
children: [
{
label: 'admin_个人工作区',
value: 2,
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: '企业号',
value: 4,
{
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 }] }],
},
],
},
],
},
]
];
export const treeDataList2 = [
{
label: '域',
......@@ -76,18 +117,11 @@ export const treeDataList2 = [
label: '共享工作区',
value: 2,
icon: 'home|svg',
children: [
{ label: '日期类',
value: 3,
icon: 'home|svg',
children: [
],
},
],
children: [{ label: '日期类', value: 3, icon: 'home|svg', children: [] }],
},
],
},
]
];
export const treeDataListPath = [
{
label: '主体管理',
......@@ -99,7 +133,7 @@ export const treeDataListPath = [
{ label: '指标工作区', businessId: 5 },
],
},
]
];
export const treeDataListTwo = [
{
label: '默认工作组',
......@@ -111,7 +145,7 @@ export const treeDataListTwo = [
{ label: '默认工作组04', businessId: 5 },
],
},
]
];
export const options = [
{
value: '标准数据',
......@@ -120,13 +154,10 @@ export const options = [
{
value: '引用文档元模型',
label: '引用文档元模型',
children: [
],
children: [],
},
],
},
];
export const tableListTwo: any[] = [
{
......@@ -134,4 +165,4 @@ export const tableListTwo: any[] = [
name: '某领域办公办文格式撰写标准',
type: 'DOCX',
},
]
];
<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" />
<Divider/>
<Divider />
<BasicForm @register="registerFormTwo" />
<div class="table-container">
<div class="table-row">
......@@ -26,25 +32,17 @@
</div>
<div class="table-row">
<div class="table-cell label">
<step-header title="属性"/>
<step-header title="属性" />
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div>
<div class="table-cell value">
<step-header title="属性"/>
<step-header title="属性" />
<Row>
<Col :span="6">
域名称
</Col>
<Col :span="18">
短编号
</Col>
<Col :span="6"> 域名称 </Col>
<Col :span="18"> 短编号 </Col>
</Row>
</div>
</div>
......@@ -56,23 +54,25 @@
</BasicModal>
</template>
<script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue';
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {formSchemaPublish, formSchemaPublishTwo} from './referenceDocument.data';
import { Divider,Form,Col, Row, } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' });
import stepHeader from '../../../components/stepHeader.vue'
import StepHeader from "@/components/stepHeader.vue";
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
import Icon from '@/components/Icon/Icon.vue';
import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { formSchemaPublish, formSchemaPublishTwo } from './referenceDocument.data';
import { Divider, Form, Col, Row } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
import stepHeader from '../../../components/stepHeader.vue';
import StepHeader from '@/components/stepHeader.vue';
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublish,
......@@ -80,8 +80,8 @@ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] =
actionColOptions: {
span: 23,
},
});
const [registerFormTwo] = useForm({
});
const [registerFormTwo] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: formSchemaPublishTwo,
......@@ -89,35 +89,30 @@ const [registerFormTwo] = useForm({
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false,showOkBtn:false,showCancelBtn:false });
setModalProps({ confirmLoading: false, showOkBtn: false, showCancelBtn: false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
}
updateSchema({
updateSchema({});
});
});
const getTitle = computed(() => ('发布申请'));
const getTitle = computed(() => '发布申请');
function handleCancel() {
function handleCancel() {
closeModal();
}
}
function handleSubmitApplication() {
function handleSubmitApplication() {
closeModal();
createMessage.success('发布成功!');
}
}
async function handleSubmit() {
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
......@@ -127,14 +122,14 @@ async function handleSubmit() {
} finally {
setModalProps({ confirmLoading: false });
}
}
}
</script>
<style lang="scss" scoped>
.info_title{
.info_title {
font-size: 15px;
font-weight: bold;
}
.table-container {
}
.table-container {
display: grid;
grid-template-columns: 2fr 2fr; /* Define two columns with 1:2 ratio */
gap: 0; /* Space between cells, to create border effect */
......@@ -148,5 +143,5 @@ async function handleSubmit() {
border: 1px solid #ddd;
}
}
}
}
</style>
......@@ -123,15 +123,11 @@ export const formSchema: FormSchema[] = [
{
field: 'modal',
component: 'Cascader',
label: '关联元模型',
required: true,
label: '路径',
componentProps: {
// dataField: 'data',
fieldNames: {
title: 'modelName',
key: 'businessId',
},
treeData: TreeData,
labelField: 'label',
valueField: 'value',
initFetchParams: {
parentCode: '',
},
......
......@@ -11,7 +11,8 @@ import { BasicForm, useForm } from '@/components/Form';
import { formSchema } from './referenceDocument.data';
import TreeTwo from './treeTwo.vue'
import { useMessage } from '@/hooks/web/useMessage';
import {treeDataList,options} from "./mock";
import {treeDataList, options, treeObjectDataList} from "./mock";
import {TreeData} from "@/views/metadata/metadataData";
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
......@@ -49,7 +50,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
},
{
field: 'modal',
componentProps: { options:options },
componentProps: { options:treeObjectDataList },
},
]
......
......@@ -218,7 +218,7 @@ export const applySchemas: FormSchema[] = [
},
{
field: 'name',
label: '资源名称',
label: '申请标题',
component: 'Input',
defaultValue: '申请发布<日期类>等2个域',
componentProps: {},
......
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<div class="flex">
<div class="w-[120px]"> 是否重置同步点: </div>
<RadioGroup
v-model:value="radioValue"
:options="[
{ label: '否', value: '2' },
{ label: '是', value: '1' },
]"
/>
</div>
<div v-show="radioValue === '1'">
<Alert
style="margin-top: 20px"
type="info"
message="若指定的位点信息和目前数据库最新的位点中若存在DDL变更,数据解析可能失效"
/>
<RadioGroup style="margin: 20px 120px" v-model:value="value1" :options="valueList" />
<BasicForm v-show="value1 === '1'" @register="registerForm1" />
<div v-show="value1 === '2'" style="display: flex; margin-top: 20px">
<div style="margin: 0 20px">同步点</div>
<Select style="margin-left: 40px" v-model:value="value2" :options="value2List" />
</div>
</div>
<template #insertFooter>
<a-button @click="handleCancel">取消</a-button>
<a-button @click="handleReset">强制重启</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { Alert, RadioGroup, Select } from 'ant-design-vue';
import { BasicForm, useForm } from '@/components/Form';
import { resetNameFormSchema, resetNameFormSchema1 } from './maintenance.data';
import { useMessage } from '@/hooks/web/useMessage';
defineOptions({ name: 'AccountModal' });
const value1 = ref('1');
const value2 = ref('1');
const valueList = [
{
label: '指定日志文件',
value: '1',
},
{
label: '指定同步点',
value: '2',
},
];
const value2List = [
{
label: '2023-12-28 18:40:00',
value: '1',
},
{
label: '2023-12-30 12:40:00',
value: '2',
},
];
const radioValue = ref();
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const getTitle = '启动';
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
const form = ref();
//初始化表单
const [registerForm, { setFieldsValue, getFieldsValue, updateSchema, resetFields, validate }] =
useForm({
labelWidth: 120,
baseColProps: { lg: 12, md: 24 },
schemas: resetNameFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
const [
registerForm1,
{
setFieldsValue: setFieldsValue1,
updateSchema: updateSchema1,
resetFields: resetFields1,
validate: validate1,
},
] = useForm({
labelWidth: 120,
baseColProps: { lg: 24, md: 24 },
schemas: resetNameFormSchema1,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({
confirmLoading: false,
showCancelBtn: false,
});
setFieldsValue({
...data.record,
});
});
/**提交按钮*/
function handleSubmit() {
createMessage.success('启动成功!');
closeModal();
}
function handleCancel() {
closeModal();
}
function handleReset() {
createMessage.success('强制重启成功!');
closeModal();
}
</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