Commit 1f7658bf authored by baiyinhao's avatar baiyinhao

修改质量任务

parent 2c580453
import { BasicColumn, FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
},
{
title: '类型',
dataIndex: 'category',
width: 120,
},
{
title: '拥有者',
dataIndex: 'owner',
width: 120,
},
{
title: '创建时间',
dataIndex: 'createDate',
width: 140,
},
];
export const SearchFormSchema: FormSchema[] = [
{
field: 'name',
label: '名称',
component: 'Input',
colProps: { span: 8 },
},
{
field: 'isKinship',
component: 'Checkbox',
label: '仅看血缘对象',
colProps: { span: 8 },
labelWidth: 120,
},
];
export const storageManagementColumns: BasicColumn[] = [
{
title: '参数名',
dataIndex: 'parameterName',
width: 120,
},
{
title: '参数类型',
dataIndex: 'parameterType',
edit: true,
editComponent: 'Select',
editComponentProps: {
options: [
{
label: '时间类',
value: '1',
},
{
label: '字符类',
value: '2',
},
{
label: '数值类',
value: '3',
},
{
label: '自定义类',
value: '4',
},
],
},
width: 200,
},
{
title: '参数值',
dataIndex: 'parameterValue',
width: 80,
editable: true,
edit: true,
},
];
export const storageManagementFormSchema: FormSchema[] = [
{
field: 'keyword',
label: '',
component: 'Input',
componentProps: {
placeholder: '请输入关键字搜索',
},
colProps: { lg: 8, md: 4 },
},
];
export const storageManagementData: any[] = [
{
id: '1',
startTime: '2024-10-01 08:00:00',
endTime: '2024-10-01 10:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5000',
num: '2000',
user: '张三',
parameterName: 'check_date',
parameterType: '字符类',
parameterValue: '参数值',
},
{
id: '2',
startTime: '2024-10-02 09:00:00',
endTime: '2024-10-02 11:45:00',
useTime: '2小时45分钟',
status: '0',
type: '自动清理',
pointNum: '7000',
num: '3500',
user: '李四',
parameterName: 'check_date',
parameterType: '时间类',
parameterValue: '参数值',
},
{
id: '3',
startTime: '2024-10-03 10:00:00',
endTime: '2024-10-03 12:15:00',
useTime: '2小时15分钟',
status: '1',
type: '手动清理',
pointNum: '6000',
num: '3000',
user: '王五',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
{
id: '4',
startTime: '2024-10-04 11:00:00',
endTime: '2024-10-04 13:20:00',
useTime: '2小时20分钟',
status: '1',
type: '自动清理',
pointNum: '4500',
num: '2250',
user: '赵六',
parameterName: 'check_date',
parameterType: '自定义类',
parameterValue: '参数值',
},
{
id: '5',
startTime: '2024-10-05 12:00:00',
endTime: '2024-10-05 14:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5500',
num: '2750',
user: '孙七',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
];
export const storageManagementBasicFormSchema: FormSchema[] = [
// {
// field: 'field12',
// component: 'BasicTitle',
// label: '规则展示',
// componentProps: {
// // line: true,
// span: true,
// },
// colProps: {
// span: 24,
// },
// },
{
field: 'ruleName',
component: 'Input',
label: '规则名称',
required: true,
componentProps: {},
colProps: {
span: 24,
},
},
{
field: 'description',
component: 'InputTextArea',
label: '描述',
colProps: {
span: 24,
},
},
{
field: 'status',
component: 'Switch',
label: '规则状态',
componentProps: {},
colProps: {
span: 12,
},
},
{
field: 'resourceType',
component: 'Select',
label: '资源类型',
componentProps: {
defaultValue: '1',
options: [
{ label: '工作流', value: '1' },
{ label: '工作流', value: '2' },
],
},
colProps: {
span: 16,
},
},
{
field: 'resourceId',
component: 'CheckboxGroup',
label: '触发方式',
required: true,
componentProps: {
options: [
{ label: '运行失败', value: '1' },
{ label: '运行成功', value: '2' },
{ label: '开始运行', value: '3' },
{ label: '运行超时', value: '4' },
],
},
colProps: {
span: 24,
},
},
{
field: 'timeOut',
component: 'InputNumber',
label: '超时时长',
ifShow: ({ values }) => values.resourceId !== undefined && values.resourceId.includes('4'),
required: ({ values }) => values.resourceId !== undefined && values.resourceId.includes('4'),
componentProps: {
min: 0,
},
suffix: '分钟',
colProps: {
span: 24,
},
},
{
field: 'alarmType',
component: 'CheckboxGroup',
label: '通知方式',
required: true,
componentProps: {
options: [
{ label: '站内信', value: '1' },
{ label: '邮件', value: '2' },
{ label: '短信', value: '3' },
],
},
colProps: {
span: 24,
},
},
{
field: 'zhanneixin',
component: 'Input',
label: '站内信',
ifShow: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('1'),
required: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('1'),
componentProps: {},
colProps: {
span: 24,
},
},
{
field: 'email',
label: '邮箱地址',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
defaultValue: '11111112222222@123321.123',
placeholder: '多个邮件地址用;分隔符分割',
},
ifShow: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('2'),
required: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('2'),
},
{
field: 'sms',
label: '短信号码',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
defaultValue: '123321.123',
placeholder: '多个短信号码用;分隔符分割',
},
ifShow: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('3'),
required: ({ values }) => values.alarmType !== undefined && values.alarmType.includes('3'),
},
];
<template>
<BasicModal
width="35%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<template #title>
<div tyle="display: flex; justify-content: flex-end;">
<div>通知规则详情</div>
</div>
</template>
<template #footer>
<a-button type="primary" @click="handleSubmit">保存</a-button>
<a-button type="error">删除</a-button>
</template>
<!-- <BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<Tag color="error" v-if="record.status === '0'">失败</Tag>
</template>
<template v-if="column.key === 'status'">
<Tag color="success" v-if="record.status === '1'">成功</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
//配置详情
icon: 'clarity:note-edit-line',
label: '',
onClick: handleEdit.bind(null),
},
{
icon: 'ant-design:delete-outlined',
color: 'error',
label: '',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null),
},
},
{
//失败日志
icon: 'clarity:contract-line',
label: '',
ifShow: record.status === '0',
onClick: handleDetail.bind(null),
},
]"
/>
</template>
</template>
</BasicTable> -->
<BasicForm @register="registerForm" />
<div class="modalRow">
<div>可见范围</div>
<div class="right">
<div class="clearAll"> 清空 </div>
<div>
<a-button type="primary">添加工作组</a-button>
</div>
</div>
</div>
<div class="addDialogBG">
<div style="float: right">
<Icon icon="ant-design:delete-outlined" :size="25" :color="'#ED6F6F'" />
</div>
<TreeTwo class="w-1/4 xl:w-1/5" @select="handleSelect" />
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form';
import {
storageManagementColumns,
storageManagementFormSchema,
storageManagementData,
storageManagementBasicFormSchema,
} from './QualityTaskAlarmSetting.data';
import TreeTwo from './treeTwo.vue';
// import { storageManagementData } from './analysisData';
import { Tag } from 'ant-design-vue';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage, createConfirm } = useMessage();
const title = ref();
const isRunning = ref(false);
const getTitle = computed(() => (!unref(isRunning) ? '配置质量文件' : '配置质量文件'));
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: storageManagementColumns,
// useSearchForm: true,
showTableSetting: false,
formConfig: {
labelWidth: 120,
schemas: storageManagementFormSchema,
autoSubmitOnEnter: true,
},
rowKey: 'id',
// rowSelection: true,
bordered: true,
showIndexColumn: false,
// actionColumn: {
// width: 150,
// title: '操作',
// dataIndex: 'action',
// },
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
schemas: storageManagementBasicFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
async function handleSubmit() {
closeModal();
}
function handleDetail() {
createMessage.success('提交成功');
}
function handleEdit() {
createMessage.success('提交成功');
}
function handleDelete() {
createMessage.success('删除成功');
}
function deleteAll() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
function handleImport() {
createMessage.success('导出完成');
}
onMounted(() => {
tableData.value = storageManagementData;
});
</script>
<style lang="scss" scoped>
.modalRow {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
.clearAll {
padding-right: 10px;
font-size: 16px;
}
.right {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.addDialogBG {
width: 98%;
height: 400px;
margin: 10px;
padding: 20px;
border-radius: 10px;
background-color: #e8ecf7;
}
</style>
import { BasicColumn, FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
},
{
title: '类型',
dataIndex: 'category',
width: 120,
},
{
title: '拥有者',
dataIndex: 'owner',
width: 120,
},
{
title: '创建时间',
dataIndex: 'createDate',
width: 140,
},
];
export const SearchFormSchema: FormSchema[] = [
{
field: 'name',
label: '名称',
component: 'Input',
colProps: { span: 8 },
},
{
field: 'isKinship',
component: 'Checkbox',
label: '仅看血缘对象',
colProps: { span: 8 },
labelWidth: 120,
},
];
export const storageManagementColumns: BasicColumn[] = [
{
title: '参数名',
dataIndex: 'parameterName',
width: 120,
},
{
title: '参数类型',
dataIndex: 'parameterType',
edit: true,
editComponent: 'Select',
editComponentProps: {
options: [
{
label: '时间类',
value: '1',
},
{
label: '字符类',
value: '2',
},
{
label: '数值类',
value: '3',
},
{
label: '自定义类',
value: '4',
},
],
},
width: 200,
},
{
title: '参数值',
dataIndex: 'parameterValue',
width: 80,
editable: true,
edit: true,
},
];
export const storageManagementFormSchema: FormSchema[] = [
{
field: 'keyword',
label: '',
component: 'Input',
componentProps: {
placeholder: '请输入关键字搜索',
},
colProps: { lg: 8, md: 4 },
},
];
export const storageManagementData: any[] = [
{
id: '1',
startTime: '2024-10-01 08:00:00',
endTime: '2024-10-01 10:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5000',
num: '2000',
user: '张三',
parameterName: 'check_date',
parameterType: '字符类',
parameterValue: '参数值',
},
{
id: '2',
startTime: '2024-10-02 09:00:00',
endTime: '2024-10-02 11:45:00',
useTime: '2小时45分钟',
status: '0',
type: '自动清理',
pointNum: '7000',
num: '3500',
user: '李四',
parameterName: 'check_date',
parameterType: '时间类',
parameterValue: '参数值',
},
{
id: '3',
startTime: '2024-10-03 10:00:00',
endTime: '2024-10-03 12:15:00',
useTime: '2小时15分钟',
status: '1',
type: '手动清理',
pointNum: '6000',
num: '3000',
user: '王五',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
{
id: '4',
startTime: '2024-10-04 11:00:00',
endTime: '2024-10-04 13:20:00',
useTime: '2小时20分钟',
status: '1',
type: '自动清理',
pointNum: '4500',
num: '2250',
user: '赵六',
parameterName: 'check_date',
parameterType: '自定义类',
parameterValue: '参数值',
},
{
id: '5',
startTime: '2024-10-05 12:00:00',
endTime: '2024-10-05 14:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5500',
num: '2750',
user: '孙七',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
];
export const storageManagementBasicFormSchema: FormSchema[] = [
{
field: 'field12',
component: 'BasicTitle',
label: '规则展示',
componentProps: {
// line: true,
span: true,
},
colProps: {
span: 24,
},
},
{
field: 'divider-linked',
component: 'Divider',
label: 'name日期逻辑正确',
colProps: {
span: 24,
},
},
{
field: 'field122',
component: 'InputTextArea',
label: '',
componentProps: {
disabled: true,
defaultValue:
'RESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESSRESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESSRESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESS',
},
colProps: {
span: 24,
},
},
{
field: 'divider-linked',
component: 'Divider',
label: '创建日期逻辑',
colProps: {
span: 24,
},
},
{
field: 'field123',
component: 'InputTextArea',
label: '',
componentProps: {
disabled: true,
defaultValue:
'RESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESSRESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESSRESPONSE_DATA_SUCCESSFULLY_RECEIVED_FROM_SERVER_WITH_STATUS_CODE_200_AND_RESPONSE_BODY_CONTAINING_EXPECTED_DATA_IN_JSON_FORMAT_WITH_NO_ERRORS_OR_WARNINGS_DETECTED_IN_THE_PROCESS',
},
colProps: {
span: 24,
},
},
];
<template>
<BasicModal
width="35%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<!-- <div style="display: flex; justify-content: flex-end; padding-bottom: 10px">
<a-button style="margin-right: 5px" type="primary" @click="deleteAll">批量删除</a-button>
<a-button style="margin-right: 5px" type="primary" @click="handleImport">规则设置</a-button>
</div> -->
<template #footer>
<a-button type="primary" @click="handleSubmit">执行</a-button>
</template>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<Tag color="error" v-if="record.status === '0'">失败</Tag>
</template>
<template v-if="column.key === 'status'">
<Tag color="success" v-if="record.status === '1'">成功</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
//配置详情
icon: 'clarity:note-edit-line',
label: '',
onClick: handleEdit.bind(null),
},
{
icon: 'ant-design:delete-outlined',
color: 'error',
label: '',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null),
},
},
{
//失败日志
icon: 'clarity:contract-line',
label: '',
ifShow: record.status === '0',
onClick: handleDetail.bind(null),
},
]"
/>
</template>
</template>
</BasicTable>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form';
import {
storageManagementColumns,
storageManagementFormSchema,
storageManagementData,
storageManagementBasicFormSchema,
} from './QualityTaskNewRule.data';
// import { storageManagementData } from './analysisData';
import { Tag } from 'ant-design-vue';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage, createConfirm } = useMessage();
const title = ref();
const isRunning = ref(false);
const getTitle = computed(() => (!unref(isRunning) ? '全局参数配置' : '全局参数配置'));
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: storageManagementColumns,
useSearchForm: true,
showTableSetting: false,
formConfig: {
labelWidth: 120,
schemas: storageManagementFormSchema,
autoSubmitOnEnter: true,
},
rowKey: 'id',
// rowSelection: true,
bordered: true,
showIndexColumn: false,
// actionColumn: {
// width: 150,
// title: '操作',
// dataIndex: 'action',
// },
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
schemas: storageManagementBasicFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
async function handleSubmit() {
closeModal();
}
function handleDetail() {
createMessage.success('提交成功');
}
function handleEdit() {
createMessage.success('提交成功');
}
function handleDelete() {
createMessage.success('删除成功');
}
function deleteAll() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
function handleImport() {
createMessage.success('导出完成');
}
onMounted(() => {
tableData.value = storageManagementData;
});
</script>
......@@ -11,7 +11,7 @@
<a-button style="margin-right: 5px" type="primary" @click="handleImport">规则设置</a-button>
</div> -->
<template #footer>
<a-button type="primary" @click="handleSubmit">关闭</a-button>
<a-button type="primary" @click="handleSubmit">执行</a-button>
</template>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
......
import { BasicColumn, FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
},
{
title: '类型',
dataIndex: 'category',
width: 120,
},
{
title: '拥有者',
dataIndex: 'owner',
width: 120,
},
{
title: '创建时间',
dataIndex: 'createDate',
width: 140,
},
];
export const SearchFormSchema: FormSchema[] = [
{
field: 'name',
label: '名称',
component: 'Input',
colProps: { span: 8 },
},
{
field: 'isKinship',
component: 'Checkbox',
label: '仅看血缘对象',
colProps: { span: 8 },
labelWidth: 120,
},
];
export const storageManagementColumns: BasicColumn[] = [
{
title: '参数名',
dataIndex: 'parameterName',
width: 120,
},
{
title: '参数类型',
dataIndex: 'parameterType',
edit: true,
editComponent: 'Select',
editComponentProps: {
options: [
{
label: '时间类',
value: '1',
},
{
label: '字符类',
value: '2',
},
{
label: '数值类',
value: '3',
},
{
label: '自定义类',
value: '4',
},
],
},
width: 200,
},
{
title: '参数值',
dataIndex: 'parameterValue',
width: 80,
editable: true,
edit: true,
},
];
export const storageManagementFormSchema: FormSchema[] = [
{
field: 'keyword',
label: '',
component: 'Input',
componentProps: {
placeholder: '请输入关键字搜索',
},
colProps: { lg: 8, md: 4 },
},
];
export const storageManagementData: any[] = [
{
id: '1',
startTime: '2024-10-01 08:00:00',
endTime: '2024-10-01 10:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5000',
num: '2000',
user: '张三',
parameterName: 'check_date',
parameterType: '字符类',
parameterValue: '参数值',
},
{
id: '2',
startTime: '2024-10-02 09:00:00',
endTime: '2024-10-02 11:45:00',
useTime: '2小时45分钟',
status: '0',
type: '自动清理',
pointNum: '7000',
num: '3500',
user: '李四',
parameterName: 'check_date',
parameterType: '时间类',
parameterValue: '参数值',
},
{
id: '3',
startTime: '2024-10-03 10:00:00',
endTime: '2024-10-03 12:15:00',
useTime: '2小时15分钟',
status: '1',
type: '手动清理',
pointNum: '6000',
num: '3000',
user: '王五',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
{
id: '4',
startTime: '2024-10-04 11:00:00',
endTime: '2024-10-04 13:20:00',
useTime: '2小时20分钟',
status: '1',
type: '自动清理',
pointNum: '4500',
num: '2250',
user: '赵六',
parameterName: 'check_date',
parameterType: '自定义类',
parameterValue: '参数值',
},
{
id: '5',
startTime: '2024-10-05 12:00:00',
endTime: '2024-10-05 14:30:00',
useTime: '2小时30分钟',
status: '1',
type: '手动清理',
pointNum: '5500',
num: '2750',
user: '孙七',
parameterName: 'check_date',
parameterType: '数值类',
parameterValue: '参数值',
},
];
export const storageManagementBasicFormSchema: FormSchema[] = [
// {
// field: 'field12',
// component: 'BasicTitle',
// label: '规则展示',
// componentProps: {
// // line: true,
// span: true,
// },
// colProps: {
// span: 24,
// },
// },
{
field: 'taskName',
component: 'Input',
label: '质量任务名称',
colProps: {
span: 12,
},
},
{
field: 'dispatchCycle',
component: 'Input',
label: '调度周期',
colProps: {
span: 12,
},
},
{
field: 'description',
component: 'InputTextArea',
label: '描述',
colProps: {
span: 12,
},
},
{
field: 'timeoutCancel',
component: 'Checkbox',
label: '超时取消',
componentProps: {},
colProps: {
span: 8,
},
suffix: '开启',
},
{
field: 'checkType',
component: 'RadioGroup',
label: '检查方式',
componentProps: {
options: [
{ label: '全量', value: '1' },
{ label: '增量', value: '2' },
],
},
colProps: {
span: 12,
},
},
{
field: 'updateTime',
component: 'Input',
label: '更新时间',
componentProps: {
disabled: true,
defaultValue: '2024-10-01 00:00:00',
},
colProps: {
span: 12,
},
},
{
field: 'ruleType',
component: 'RadioGroup',
label: '规则选择方式',
componentProps: {
options: [
{ label: '自由选择', value: '1' },
{ label: '按规则组选择', value: '2' },
],
},
colProps: {
span: 24,
},
},
];
<template>
<BasicModal
width="35%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<!-- <div style="display: flex; justify-content: flex-end; padding-bottom: 10px">
<a-button style="margin-right: 5px" type="primary" @click="deleteAll">批量删除</a-button>
<a-button style="margin-right: 5px" type="primary" @click="handleImport">规则设置</a-button>
</div> -->
<template #footer>
<a-button type="primary" @click="handleSubmit">关闭</a-button>
</template>
<!-- <BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<Tag color="error" v-if="record.status === '0'">失败</Tag>
</template>
<template v-if="column.key === 'status'">
<Tag color="success" v-if="record.status === '1'">成功</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
//配置详情
icon: 'clarity:note-edit-line',
label: '',
onClick: handleEdit.bind(null),
},
{
icon: 'ant-design:delete-outlined',
color: 'error',
label: '',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null),
},
},
{
//失败日志
icon: 'clarity:contract-line',
label: '',
ifShow: record.status === '0',
onClick: handleDetail.bind(null),
},
]"
/>
</template>
</template>
</BasicTable> -->
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, reactive, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form';
import {
storageManagementColumns,
storageManagementFormSchema,
storageManagementData,
storageManagementBasicFormSchema,
} from './QualityTaskSetting.data';
// import { storageManagementData } from './analysisData';
import { Tag } from 'ant-design-vue';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage, createConfirm } = useMessage();
const title = ref();
const isRunning = ref(false);
const getTitle = computed(() => (!unref(isRunning) ? '配置质量文件' : '配置质量文件'));
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: storageManagementColumns,
// useSearchForm: true,
showTableSetting: false,
formConfig: {
labelWidth: 120,
schemas: storageManagementFormSchema,
autoSubmitOnEnter: true,
},
rowKey: 'id',
// rowSelection: true,
bordered: true,
showIndexColumn: false,
// actionColumn: {
// width: 150,
// title: '操作',
// dataIndex: 'action',
// },
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
schemas: storageManagementBasicFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
async function handleSubmit() {
closeModal();
}
function handleDetail() {
createMessage.success('提交成功');
}
function handleEdit() {
createMessage.success('提交成功');
}
function handleDelete() {
createMessage.success('删除成功');
}
function deleteAll() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
function handleImport() {
createMessage.success('导出完成');
}
onMounted(() => {
tableData.value = storageManagementData;
});
</script>
......@@ -16,12 +16,20 @@
<a-button type="primary" @click="handleImport">导入</a-button>
<a-button type="primary" @click="handleAdd">新增文件夹</a-button>
<a-button type="primary" @click="handleAddMainBody">新增质量任务文件</a-button>
<a-button
type="primary"
@click="handleQualityTaskSetting"
:disabled="getRowSelection().selectedRowKeys <= 0"
>配置质量任务文件</a-button
>
<a-button type="primary" @click="handleAddQualityRule">新增质量规则</a-button>
<a-button
type="primary"
@click="handleAlarmSetting"
:disabled="getRowSelection().selectedRowKeys <= 0"
>配置通知告警</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunSetting"
......@@ -102,6 +110,9 @@
<remove-modal @register="registerRemove" />
<main-body-modal @register="registerMain" />
<quality-Run-setting-modal @register="registerRunSetting" />
<quality-setting-modal @register="registerSettingModal" />
<new-rule-modal @register="registerNewRule" />
<alarm-setting-modal @register="registerAlarmSettingModal" />
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -124,6 +135,9 @@
import RemoveModal from '@/views/dataQuality/dataSheet/task/removeModal.vue';
import MainBodyModal from '@/views/dataQuality/dataSheet/task/mainBodyModal.vue';
import QualityRunSettingModal from './QualityTaskRunSetting.vue';
import QualitySettingModal from './QualityTaskSetting.vue';
import NewRuleModal from './QualityTaskNewRule.vue';
import AlarmSettingModal from './QualityTaskAlarmSetting.vue';
import { Modal } from 'ant-design-vue';
defineOptions({ name: 'AccountManagement' });
......@@ -137,7 +151,10 @@
const [registerImport, { openModal: openImportModal }] = useModal();
const [registerRemove, { openModal: openRemoveModal }] = useModal();
const [registerMain, { openModal: openMainModal }] = useModal();
const [registerNewRule, { openModal: openNewRuleModal }] = useModal();
const [registerRunSetting, { openModal: openRunSettingModal }] = useModal();
const [registerSettingModal, { openModal: openSettingModal }] = useModal();
const [registerAlarmSettingModal, { openModal: openAlarmSettingModal }] = useModal();
const searchInfo = reactive<Recordable>({});
const [
registerTable,
......@@ -206,9 +223,21 @@
isUpdate: false,
});
}
/** 新增质量规则*/
function handleAddQualityRule() {
openNewRuleModal(true, {
isUpdate: false,
});
}
/** 配置通知告警*/
function handleAlarmSetting() {
openAlarmSettingModal(true, {
isUpdate: false,
});
}
/** 配置质量任务 未完成 应为弹窗 */
function handleQualityTaskSetting() {
go('/dataQuality/task');
openSettingModal(true, {});
}
/** 配置运行 正在做 应为弹窗*/
function handleQualityTaskRunSetting() {
......
import { BasicColumn, FormSchema } from '@/components/Table';
import { DescItem } from '@/components/Description';
export const columns: BasicColumn[] = [
{
title: '血缘插件名称',
dataIndex: 'name',
width: 120,
},
{
title: '插件状态',
dataIndex: 'status',
width: 120,
},
];
export const modEditColumns: BasicColumn[] = [
{
title: '连接名称',
dataIndex: 'name',
width: 80,
},
{
title: '连接类型',
dataIndex: 'type',
width: 80,
},
{
title: '连接字符串',
dataIndex: 'filed',
width: 120,
},
];
export const ruleSchema: FormSchema[] = [
{
field: 'type',
label: '过滤类型',
component: 'RadioGroup',
colProps: { lg: 22 },
componentProps: {
options: [
{ label: '黑名单', value: '0' },
{ label: '白名单', value: '1' },
],
},
defaultValue: '0',
required: true,
},
{
field: 'baseRule',
label: '库规则',
component: 'InputTextArea',
colProps: { lg: 22 },
defaultValue: 'system|discover|tmp',
required: true,
},
{
field: 'tableRule',
label: '表规则',
component: 'InputTextArea',
colProps: { lg: 22 },
defaultValue:
'tdt_,TDT_VIEW,baymax_tmp_,TDT_ROCK_VIEW_,TDT_ROCK_TABLE_,TDTTABLEEXTERNAL,TDTTABLE_PERSISTENT',
required: true,
},
{
field: 'rule',
label: '规则检验',
component: 'Input',
colProps: { lg: 22 },
},
];
export const detailHookColumns: BasicColumn[] = [
{
title: '实例地址',
dataIndex: 'name',
width: 120,
},
{
title: '生产者分区ID',
dataIndex: 'code',
width: 120,
},
{
title: '生成者注释',
dataIndex: 'remark',
width: 120,
},
{
title: '实例状态',
dataIndex: 'status',
width: 120,
},
];
export const refundSchema: DescItem[] = [
{
field: 'type',
label: '认证类型',
},
{
field: 'name',
label: '当前消费组名称',
},
{
field: 'code',
label: '消费者分组ID',
},
{
field: 'theme',
label: '消费者主体',
},
];
export const KafkaColumns: BasicColumn[] = [
{
title: 'Partition Number',
dataIndex: 'PartitionNumber',
width: 120,
},
{
title: 'LastEndOffset',
dataIndex: 'LastEndOffset',
width: 120,
},
{
title: 'CurrentOffset',
dataIndex: 'CurrentOffset',
width: 120,
},
{
title: 'Lag',
dataIndex: 'Lag',
width: 120,
},
];
<template>
<BasicModal
width="60%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<Description size="middle" :bordered="false" title="Hook插件" />
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<Tag color="success" v-if="record.status === '1'">up</Tag>
</template>
</template>
</BasicTable>
<Description
size="middle"
:bordered="false"
title="Kafka服务"
:column="2"
:data="refundData"
:schema="refundSchema"
/>
<BasicTable @register="registerKafkaTable" />
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, useTable } from '@/components/Table';
import Description from '@/components/Description/src/Description.vue';
import { detailHookColumns, KafkaColumns, refundSchema } from './data';
import { detailHookData, KafkaData, refundData } from './kinshipOperationsData';
import { Tag } from 'ant-design-vue';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: detailHookColumns,
useSearchForm: false,
showTableSetting: false,
bordered: false,
showIndexColumn: false,
scroll: { y: 300 },
actionColumn: {
width: '120px',
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
const [registerKafkaTable] = useTable({
dataSource: KafkaData,
columns: KafkaColumns,
pagination: false,
showIndexColumn: false,
scroll: { y: 300 },
});
async function handleSubmit() {
closeModal();
}
onMounted(() => {
tableData.value = detailHookData;
});
</script>
<template>
<PageWrapper title="所有数据质量任务" contentFullHeight fixedHeight contentClass="flex">
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<a-button type="primary" @click="refresh">刷新</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<Tag color="error" v-if="record.status === '0'">错误</Tag>
</template>
<template v-if="column.key === 'status'">
<Tag color="success" v-if="record.status === '1'">健康</Tag>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:contract-line',
label: '',
onClick: handleDetail.bind(null),
},
{
icon: 'clarity:link-line',
label: '',
onClick: modEdit.bind(null),
},
{
icon: 'clarity:usb-line',
label: '',
onClick: handleDelete.bind(null),
},
]"
/>
</template>
</template>
</BasicTable>
<modEditModal @register="registerModal" />
<ruleModal @register="registerRuleModal" />
<detailModal @register="registerDetailModal" />
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal';
import { Tag } from 'ant-design-vue';
import { columns } from './data';
import { Data } from './kinshipOperationsData';
import modEditModal from './modEditModal.vue';
import ruleModal from './ruleModal.vue';
import detailModal from './detailModal.vue';
defineOptions({ name: 'KnowledgeBase' });
const { createMessage, createConfirm } = useMessage();
const [registerModal, { openModal }] = useModal();
const [registerRuleModal, { openModal: openRuleModal }] = useModal();
const [registerDetailModal, { openModal: openDetailModal }] = useModal();
const searchInfo = reactive<Recordable>({});
const [registerTable, { reload }] = useTable({
dataSource: Data,
striped: false,
columns,
showIndexColumn: false,
showTableSetting: false,
bordered: true,
actionColumn: {
width: 120,
title: '操作',
dataIndex: 'action',
},
});
function modEdit() {
openModal(true, {
title: '插件配置',
});
}
function refresh() {
createMessage.success('刷新成功!');
}
function handleDelete() {
openRuleModal(true, {
title: '血缘采集规则配置',
});
}
function handleDetail() {
openDetailModal(true, {
title: '血缘插件详情',
});
}
</script>
export const Data: any[] = [
{
name: 'quark1',
status: '1',
},
{
name: 'quark2',
status: '1',
},
{
name: 'quark3',
status: '1',
},
{
name: 'quark4',
status: '1',
},
{
name: 'quark5',
status: '0',
},
];
export const modEditData: any[] = [
{
name: 'quark1',
type: 'mysql',
filed: 'mysql://root:123456@127.0.0.1:3306/quark',
},
{
name: 'quark2',
type: 'mysql',
filed: 'mysql://root:123456@127.0.0.1:3306/quark',
},
{
name: 'quark3',
type: 'mysql',
filed: 'mysql://root:123456@127.0.0.1:3306/quark',
},
];
export const detailHookData: any[] = [
{
name: 'Instance-001',
code: 'Partition-10',
remark: '用于处理日常任务',
status: '1',
},
{
name: 'Instance-002',
code: 'Partition-15',
remark: '仅供测试使用',
status: '1',
},
{
name: 'Instance-003',
code: 'Partition-20',
remark: '处理高优先级任务',
status: '1',
},
{
name: 'Instance-004',
code: 'Partition-25',
remark: '备用实例',
status: '1',
},
];
export const refundData = {
type: 'NONE',
name: 'catalog_hook_group_catalog12',
code: '4',
theme: 'CATALOG_HOOK',
};
export const KafkaData: any[] = [
{
PartitionNumber: '2',
LastEndOffset: '404792',
CurrentOffset: '404792',
Lag: '0',
},
{
PartitionNumber: '3',
LastEndOffset: '3',
CurrentOffset: '3',
Lag: '0',
},
{
PartitionNumber: '0',
LastEndOffset: '55',
CurrentOffset: '55',
Lag: '0',
},
{
PartitionNumber: '1',
LastEndOffset: '5',
CurrentOffset: '5',
Lag: '0',
},
];
<template>
<BasicModal
width="50%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<Alert
show-icon
message="维护血缘插件与数据连接的映射关系,标识插件中的血缘在以下连接所关联的数据源中展示。"
/>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleDeleteIds">新增映射</a-button>
</template>
<template #bodyCell="{ column }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:delete-outlined',
color: 'error',
label: '',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null),
},
},
]"
/>
</template>
</template>
</BasicTable>
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, TableAction, useTable } from '@/components/Table';
import { Alert } from 'ant-design-vue';
import { modEditColumns } from './data';
import { modEditData } from './kinshipOperationsData';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerTable, { reload }] = useTable({
api: async () => {
const response = {
pageNum: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
var data = [];
data = tableData.value;
return { ...response, data: data };
},
pagination: false,
columns: modEditColumns,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
actionColumn: {
width: 40,
title: '操作',
dataIndex: 'action',
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await reload();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
async function handleSubmit() {
closeModal();
createMessage.success('提交成功');
}
/** 批量删除按钮*/
function handleDeleteIds() {
createMessage.success('刷新成功!');
}
/** 删除按钮*/
function handleDelete() {
createMessage.success('删除成功!');
reload();
}
onMounted(() => {
tableData.value = modEditData;
});
</script>
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="title"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { recommendData } from '@/views/metadata/metadataData';
import { BasicForm, useForm } from '@/components/Form';
import { ruleSchema } from './data';
defineOptions({ name: 'KnowledgeModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const title = ref();
const tableData = ref([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: ruleSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
await resetFields();
setModalProps({ confirmLoading: false });
title.value = data.title;
});
async function handleSubmit() {
closeModal();
createMessage.success('提交成功');
await resetFields();
}
onMounted(() => {
tableData.value = recommendData;
});
</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