Commit 432872ff authored by baiyinhao's avatar baiyinhao

修改质量参数新建编辑 修改服务管理按钮位置

parent 21ba825a
......@@ -3,7 +3,12 @@
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<a-button type="primary" @click="handleImport">导入</a-button>
<a-button type="primary" @click="handleExport">导出</a-button>
<a-button
type="primary"
@click="handleExport"
:disabled="getRowSelection().selectedRowKeys <= 0"
>导出</a-button
>
<a-button type="primary" @click="handleCreate">新建</a-button>
</template>
<template #bodyCell="{ column, record }">
......@@ -109,6 +114,14 @@
isUpdate: false,
});
}
/** 编辑按钮*/
function handleEdit(record: Recordable, disabled: number) {
isAdd.value = false;
openRuleEditModel(true, {
isUpdate: true,
record,
});
}
/** 导入按钮*/
function handleImport() {
openImportModal(true, {});
......@@ -120,17 +133,7 @@
const data = await exportRoleList(params);
downloadByData(data, '质量参数' + '.xlsx');
}
/** 编辑按钮*/
function handleEdit(record: Recordable, disabled: number) {
// console.log('record', record.businessId);
router.push({
path: '/dataQuality/edit',
query: {
id: record.businessId,
disabled: String(disabled),
},
});
}
/** 重置密码弹窗确定按钮*/
/** 删除按钮*/
function handleDelete(record: Recordable) {
......
......@@ -20,8 +20,6 @@
label: '规则组2',
value: '规则组2',
},
]"
v-model:value="model[field]"
/>
......@@ -81,15 +79,16 @@
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref, defineProps} from 'vue';
import { ref, computed, unref, defineProps } from 'vue';
import { Select } from 'ant-design-vue';
import { BasicModal, useModalInner, useModal } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {
import {
configColumn,
ruleEditModelFormSchema, ruleModelFormSchema,
ruleEditModelFormSchema,
ruleModelFormSchema,
taskColumn,
} from '@/views/dataQuality/dataSheet/rule/parameter/parameterType.data';
} from '@/views/dataQuality/dataSheet/rule/parameter/parameterType.data';
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { useTable } from '@/components/Table';
......@@ -101,7 +100,7 @@ import {
});
const isUpdate = ref(true);
const rowId = ref('');
const getTitle = computed(() => (isUpdate.value ? '质量规则详情' : '新建规则'));
const getTitle = computed(() => (!isUpdate.value ? '新建参数' : '编辑参数'));
function handleAddGroup() {
openRuleGroupAddModel(true, {
isUpdate: false,
......@@ -138,11 +137,18 @@ import {
});
await resetSchema([...ruleEditModelFormSchema]);
} else {
await resetSchema([...ruleModelFormSchema]);
await resetSchema([...ruleEditModelFormSchema]);
}
if (unref(isUpdate)) {
// 获取行数据的id
rowId.value = data.record.businessId;
// 塞值
await setFieldsValue({
...data.record,
});
}
});
const [configTable] =
useTable({
const [configTable] = useTable({
title: '',
// 定高
scroll: { y: 175 },
......
import { BasicColumn, FormSchema } from '@/components/Table';
// 引入开关组件
......@@ -11,7 +10,6 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 4 },
componentProps: {
placeholder: '搜索关键字',
},
},
......@@ -39,8 +37,6 @@ export const columns: BasicColumn[] = [
dataIndex: 'ParameterValues',
width: 140,
},
];
/** 新增编辑表单字段*/
......@@ -81,10 +77,7 @@ export const formSchema: any[] = [
label: '检查数据源',
component: 'Select',
componentProps: {
options: [
{ label: 'inceptor', value: 'inceptor' },
],
options: [{ label: 'inceptor', value: 'inceptor' }],
},
rules: [
{
......@@ -97,10 +90,8 @@ export const formSchema: any[] = [
field: 'params',
label: '关联模板',
component: 'Input',
},
]
];
export const ruleModelFormSchema: any[] = [
{
......@@ -140,7 +131,6 @@ export const ruleModelFormSchema: any[] = [
{ label: '质量模板', value: '质量模板' },
{ label: '内置模版', value: '内置模版' },
{ label: '非空检查(不为NULL)', value: '非空检查(不为NULL)' },
],
},
colProps: { lg: 24, md: 24 },
......@@ -162,75 +152,99 @@ export const ruleModelFormSchema: any[] = [
},
colProps: { lg: 24, md: 24 },
},
];
export const ruleEditModelFormSchema: any[] = [
{
field: 'rule',
label: '规则名称',
field: 'name',
label: '参数名称',
required: true,
component: 'Input',
colProps: { lg: 24, md: 24 },
},
{
field: 'distinct',
label: '规则描述',
field: 'describe',
label: '参数说明',
component: 'Input',
colProps: { lg: 24, md: 24 },
},
{
field: 'group',
label: '所属规则组',
slot: 'group',
colProps: { lg: 24, md: 24 },
},
{
field: 'dataSource',
label: '检查数据源',
required: true,
slot: 'dataSource',
component: 'Select',
colProps: { lg: 24, md: 24 },
},
{
field: 'dataSource',
label: '数据源',
slot: 'dataSourceTxt',
colProps: { lg: 24, md: 24 },
},
{
field: 'model',
label: '关键模板',
required: true,
component: 'Select',
componentProps: {
options: [{ label: '公民身份号码', value: '公民身份号码' }],
},
field: 'type',
label: '参数类型',
component: 'Input',
colProps: { lg: 24, md: 24 },
},
{
field: 'config',
label: '参数配置',
slot: 'config',
field: 'ParameterValues',
label: '参数',
component: 'Input',
colProps: { lg: 24, md: 24 },
},
// {
// field: 'rule',
// label: '规则名称',
// required: true,
// component: 'Input',
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'distinct',
// label: '规则描述',
// component: 'Input',
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'group',
// label: '所属规则组',
// slot: 'group',
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'dataSource',
// label: '检查数据源',
// required: true,
// slot: 'dataSource',
// component: 'Select',
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'dataSource',
// label: '数据源',
// slot: 'dataSourceTxt',
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'model',
// label: '关键模板',
// required: true,
// component: 'Select',
// componentProps: {
// options: [{ label: '公民身份号码', value: '公民身份号码' }],
// },
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'config',
// label: '参数配置',
// slot: 'config',
// colProps: { lg: 24, md: 24 },
// },
{
field: 'preview',
label: 'SQL预览',
component: 'InputTextArea',
componentProps: {
placeholder: '请输入描述',
rows: 4,
},
colProps: { lg: 24, md: 24 },
},
{
field: 'task',
label: '关联质量任务',
slot: 'task',
colProps: { lg: 24, md: 24 },
},
// {
// field: 'preview',
// label: 'SQL预览',
// component: 'InputTextArea',
// componentProps: {
// placeholder: '请输入描述',
// rows: 4,
// },
// colProps: { lg: 24, md: 24 },
// },
// {
// field: 'task',
// label: '关联质量任务',
// slot: 'task',
// colProps: { lg: 24, md: 24 },
// },
];
export const configColumn: BasicColumn[] = [
{
......
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<div class="all-of-all" style="display: flex">
<PageWrapper class="w-1/3 xl:w-2/9" dense style="height: 100vh">
<GroupTree @select="onNodeSelect" style="height: 100%; overflow-y: auto" />
</PageWrapper>
......@@ -39,6 +40,7 @@
</div>
</template>
</PageWrapper>
</div>
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -137,4 +139,8 @@
}
}
}
.all-of-all {
background-color: #fff;
}
</style>
......@@ -146,7 +146,7 @@ export const tableList: any[] = [
callFailNum: '10',
},
{
businessId: 1,
businessId: 2,
account: 'admin',
name: 'admin',
serviceNum: '17',
......@@ -155,7 +155,25 @@ export const tableList: any[] = [
callFailNum: '10',
},
{
businessId: 1,
businessId: 3,
account: 'admin',
name: 'admin',
serviceNum: '17',
callNum: '28',
callSuccessNum: '18',
callFailNum: '10',
},
{
businessId: 4,
account: 'admin',
name: 'admin',
serviceNum: '17',
callNum: '28',
callSuccessNum: '18',
callFailNum: '10',
},
{
businessId: 5,
account: 'admin',
name: 'admin',
serviceNum: '17',
......
......@@ -17,7 +17,12 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<template #headerTop>
<a-Input-Search placeholder="输入关键字搜索" style="width: 200px" />
<a-button type="primary" @click="handleNew" style="margin-left: 10px">新建</a-button>
<a-button
type="primary"
@click="handleNew"
style=" margin-right: 20px;margin-left: 10px; float: right"
>新建</a-button
>
</template>
<template #toolbar> </template>
<template #bodyCell="{ column, record }">
......
......@@ -16,7 +16,12 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<template #headerTop>
<a-Input-Search placeholder="输入关键字搜索" style="width: 200px" />
<a-button type="primary" @click="handleNew" style="margin-left: 10px">新建</a-button>
<a-button
type="primary"
@click="handleNew"
style="margin-right: 20px; margin-left: 10px; float: right"
>新建</a-button
>
</template>
<template #toolbar> </template>
<template #bodyCell="{ column, record }">
......
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