Commit 7d634aa9 authored by baiyinhao's avatar baiyinhao

修改数据任务 修改sql脚本开发

parent 7131a74a
......@@ -181,6 +181,8 @@ export const storageManagementBasicFormSchema: FormSchema[] = [
colProps: {
span: 12,
},
defaultValue: '指标导入',
componentProps: {},
},
{
field: 'dispatchCycle',
......
......@@ -9,56 +9,63 @@
<template #footer>
<a-button type="primary" @click="handleSubmit">关闭</a-button>
</template>
<a-button
type="primary"
@click="handleQualityTaskService"
style="margin-bottom: 20px; margin-right: 10px; margin-left: 600px"
>跳转运维</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunLog"
style="margin-bottom: 20px; margin-right: 10px"
>查看报告</a-button
>
<a-button type="primary" style="margin-bottom: 20px; margin-right: 10px" @click="handleSave"
>保存</a-button
>
<a-button
type="error"
@click="handleQualityTaskOffline"
v-if="isOffline"
style="margin-bottom: 20px; margin-right: 10px"
>下线</a-button
>
<a-button
type="primary"
@click="handleQualityTaskOnline"
v-if="isOnline"
style="margin-bottom: 20px; margin-right: 10px"
>上线</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunSetting"
style="margin-bottom: 20px; margin-right: 10px"
>配置运行</a-button
>
<a-button
type="primary"
style="margin-bottom: 20px; margin-right: 10px"
@click="handleQualityTaskRun"
>运行</a-button
<div class="btns">
<a-button
type="primary"
@click="handleQualityTaskService"
style="margin-right: 10px; margin-bottom: 20px; margin-left: 600px"
>跳转运维</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunLog"
style="margin-right: 10px; margin-bottom: 20px"
>查看报告</a-button
>
<a-button type="primary" style="margin-right: 10px; margin-bottom: 20px" @click="handleSave"
>保存</a-button
>
<a-button
type="error"
@click="handleQualityTaskOffline"
v-if="isOffline"
style="margin-right: 10px; margin-bottom: 20px"
>下线</a-button
>
<a-button
type="primary"
@click="handleQualityTaskOnline"
v-if="isOnline"
style="margin-right: 10px; margin-bottom: 20px"
>上线</a-button
>
<a-button
type="primary"
@click="handleQualityTaskRunSetting"
style="margin-right: 10px; margin-bottom: 20px"
>配置运行</a-button
>
<a-button
type="primary"
style="margin-right: 10px; margin-bottom: 20px"
@click="handleQualityTaskRun"
>运行</a-button
></div
>
<BasicForm @register="registerForm" />
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<DeptTree class="w-1/4" @select="handleSelect" />
<BasicTable @register="registerTable" class="w-3/4" :searchInfo="searchInfo" />
</PageWrapper>
<quality-Run-setting-modal @register="registerRunSetting" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, onMounted } from 'vue';
import { ref, computed, unref, onMounted, reactive } from 'vue';
import { BasicModal, useModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicForm, useForm } from '@/components/Form';
import { tableList } from './mock';
import {
storageManagementData,
storageManagementBasicFormSchema,
......@@ -66,6 +73,10 @@
import { Modal } from 'ant-design-vue';
import { useGo } from '@/hooks/web/usePage';
import QualityRunSettingModal from '@/views/dataQuality/dataSheet/task/QualityTaskRunSetting.vue';
import { BasicTable, useTable } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import DeptTree from './DeptTree.vue';
import { columns, searchFormSchemaForModal } from './mainBody.data';
defineOptions({ name: 'KnowledgeModal' });
......@@ -78,13 +89,22 @@
const tableData = ref([]);
const isOnline = ref(true);
const isOffline = ref(false);
const rowId = ref('');
const searchInfo = reactive<Recordable>({});
const [registerRunSetting, { openModal: openRunSettingModal }] = useModal();
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
title.value = data.title;
// 获取行数据的id
rowId.value = data.record.businessId;
// 塞值
setFieldsValue({
...data.record,
});
});
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
......@@ -94,6 +114,54 @@
actionColOptions: {
span: 23,
},
fieldMapToTime: [['startTime', ['startTime', 'endTime'], 'YYYY-MM-DD HH:mm:ss']],
});
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '质量任务列表',
api: async (params) => {
console.log('tableList', tableList);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableList.length,
code: '',
message: '',
data: tableList,
};
return { ...response };
},
rowKey: 'businessId',
rowSelection: true,
columns,
formConfig: {
labelWidth: 10,
schemas: searchFormSchemaForModal,
autoSubmitOnEnter: true,
resetFunc: () => {
searchInfo.deptId = '';
},
},
scroll: {
y: '400',
},
useSearchForm: true,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
actionColumn: {
width: 100,
title: '操作',
dataIndex: 'action',
// slots: { customRender: 'action' },
},
});
async function handleSubmit() {
closeModal();
......@@ -140,7 +208,18 @@
function handleSave() {
createMessage.success('保存成功!');
}
function handleSelect(deptId = '') {
searchInfo.deptId = deptId;
}
onMounted(() => {
tableData.value = storageManagementData;
});
</script>
<style scoped>
.btns {
display: flex;
flex-wrap: nowrap;
margin-right: -200px;
transform: translateX(-50%);
}
</style>
......@@ -216,7 +216,17 @@ export const formSchema: any = [
},
},
];
export const searchFormSchemaForModal: FormSchema[] = [
{
field: 'name',
label: ' ',
component: 'Input',
colProps: { span: 4 },
componentProps: {
placeholder: '搜索规则',
},
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
......
......@@ -18,6 +18,7 @@ export const tableList: any[] = [
qualityTemplate: '非空检查',
ruleGroup: 'bingtest',
qualityPassRate: '100',
taskName: '指标导入',
},
{
businessId: 2,
......@@ -36,6 +37,7 @@ export const tableList: any[] = [
qualityTemplate: '主键唯一',
ruleGroup: 'bingtest',
qualityPassRate: '100',
taskName: '指标导入',
},
{
businessId: 3,
......@@ -54,6 +56,7 @@ export const tableList: any[] = [
qualityTemplate: '主键唯一',
ruleGroup: 'Trinotest',
qualityPassRate: '100',
taskName: '指标导入',
},
{
businessId: 4,
......@@ -72,12 +75,13 @@ export const tableList: any[] = [
qualityTemplate: '主键唯一',
ruleGroup: 'Trinotest',
qualityPassRate: '100',
taskName: '指标导入',
},
];
export const treeDataList = [
{
label: '主体管理',
label: '质量任务',
businessId: 1,
children: [
{
......@@ -96,7 +100,7 @@ export const treeDataList = [
];
export const treeDataListTwo = [
{
label: '主体管理',
label: '质量任务',
businessId: 1,
children: [
{
......
......@@ -16,7 +16,7 @@
import { formSchemaRemove } from './mainBody.data';
import { useMessage } from '@/hooks/web/useMessage';
import { treeDataList } from '@/views/mainBody/mock';
import { treeDataList } from './mock';
defineOptions({ name: 'AccountModal' });
......@@ -37,7 +37,7 @@
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
console.log('bbbbbbbbb');
console.log('');
resetFields();
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
......@@ -54,7 +54,7 @@
});
});
const getTitle = computed(() => '新建文件夹');
const getTitle = computed(() => '移动到');
async function handleSubmit() {
try {
......
......@@ -246,3 +246,28 @@ export const resultViewSchema: FormSchema[] = [
colProps: { lg: 24, md: 24 },
},
];
export const CompareFormSchema: FormSchema[] = [
{
field: 'name',
label: '文件版本',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: [
{
label: 'V1',
value: 'V1',
},
{
label: 'V2',
value: 'V2',
},
{
label: 'V3',
value: 'V3',
},
],
},
defaultValue: 'V1',
},
];
......@@ -137,7 +137,7 @@
import optionsModal from './optionsModal.vue';
import { useModal } from '@/components/Modal';
import resultModal from './resultModal.vue';
import PreviewModal from './dataPreviewModal.vue';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue';
......@@ -161,7 +161,7 @@
const [registerModal, { openModal }] = useModal();
const [registerSubmitModal, { openModal: openSubmitModal }] = useModal();
const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerForm] = useForm({
......@@ -171,11 +171,11 @@
showActionButtonGroup: false,
});
/** 部门树的select*/
function handleSelect() {
openPreviewModal(true, {
title: '数据预览',
});
}
// function handleSelect() {
// openPreviewModal(true, {
// title: '数据预览',
// });
// }
function handleOptions() {
openModal(true, {
title: '参数配置',
......
......@@ -98,7 +98,7 @@
<optionsModal @register="registerModal" />
<resultModal @register="registerResultModal" />
<PreviewModal @register="registerPreviewModal" />
<!-- <PreviewModal @register="registerPreviewModal" /> -->
<RecordModal @register="registerRecordModal" />
<SubmitModal @register="registerSubmitModal" />
<versionManagementModal @register="registerVersionManagementModal" />
......@@ -117,7 +117,7 @@
import optionsModal from './optionsModal.vue';
import { useModal } from '@/components/Modal';
import resultModal from './resultModal.vue';
import PreviewModal from './dataPreviewModal.vue';
import { useMessage } from '@/hooks/web/useMessage';
import Icon from '@/components/Icon/Icon.vue';
import RecordModal from './executeRecordModal.vue';
......@@ -141,7 +141,7 @@
const [registerModal, { openModal }] = useModal();
const [registerSubmitModal, { openModal: openSubmitModal }] = useModal();
const [registerResultModal, { openModal: openResultModal }] = useModal();
const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
// const [registerPreviewModal, { openModal: openPreviewModal }] = useModal();
const [registerVersionManagementModal, { openModal: openVersionManagementModal }] = useModal();
const [registerRecordModal, { openModal: openRecordModal }] = useModal();
const [registerForm] = useForm({
......@@ -152,11 +152,11 @@
disabled: true,
});
/** 部门树的select*/
function handleSelect() {
openPreviewModal(true, {
title: '数据预览',
});
}
// function handleSelect() {
// openPreviewModal(true, {
// title: '数据预览',
// });
// }
function handleOptions() {
openModal(true, {
title: '参数配置',
......
<template>
<BasicModal
width="35%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm">
<template #fileMethods
><a-textarea
v-model="textareaValue"
:rows="4"
:maxlength="255"
placeholder="最多255个字符"
aria-required="true"
required
/></template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { importFormSchema } from './tempalte.data';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const emit = defineEmits(['success', 'register']);
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
const textareaValue = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: importFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
isMove.value = !!data?.isMove;
if (unref(isUpdate)) {
// 获取行数据的id
rowId.value = data.record.businessId;
// 塞值
setFieldsValue({
...data.record,
});
}
});
// onMounted(){}
// const getTitle = computed(() => '新建文件');
const getTitle = '提交版本';
/**确定按钮*/
async function handleSubmit() {
if (textareaValue.value.trim() == '') {
closeModal();
emit('success', textareaValue.value);
} else {
createMessage.error('请填写内容');
}
}
</script>
import { getAllRoleList } from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
slots: { customRender: 'name' },
},
{
title: '数据源',
dataIndex: 'dataSource',
slots: { customRender: 'dataSource' },
width: 150,
},
{
title: '模板编号',
dataIndex: 'templateNumber',
width: 120,
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 150,
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 150,
},
{
title: '拥有者',
dataIndex: 'owner',
width: 100,
},
{
title: '权属工作组',
dataIndex: 'workgroup',
width: 120,
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: ' ',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入关键字搜索',
},
},
];
/**移动*/
export const MoveFormSchema: any[] = [
{
field: 'taskId',
label: '路径',
component: 'TreeSelect',
colProps: { lg: 24, md: 24 },
componentProps: {
// border: 'none',
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
required: true,
},
];
export const formSchemaNewFolder: any = [
{
field: 'path',
label: '路径',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件夹名称',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件夹名称',
},
},
{
field: 'fileType',
label: '权限模式',
component: 'RadioGroup',
defaultValue: '本级定义',
colProps: { span: 8 },
componentProps: {
options: [
{ label: '本级定义', value: '本级定义' },
{ label: '资源自定义', value: '资源自定义' },
],
placeholder: '输入描述',
},
},
{
field: 'group',
label: '权属工作组',
component: 'Select',
defaultValue: '默认工作组',
colProps: { span: 8 },
componentProps: {
placeholder: '输入描述',
options: [{ label: '默认工作组', value: '默认工作组' }],
},
},
];
export const formSchemaTemplate: any = [
{
field: 'path',
label: '路径',
component: 'TreeSelect',
rules: [
{
required: true,
message: '请选择上级菜单',
},
],
componentProps: {
fieldNames: {
label: 'QualityName',
value: 'businessId',
},
getPopupContainer: () => document.body,
},
},
{
field: 'name',
label: '文件名称',
component: 'Input',
colProps: { span: 8 },
componentProps: {
placeholder: '输入文件夹名称',
},
required: true,
},
{
field: 'fileType',
label: '文件类型',
component: 'Input',
defaultValue: '质量模板',
colProps: { span: 8 },
componentProps: {
readonly: true,
style: {
border: 'none',
backgroundColor: 'transparent',
},
},
},
{
field: 'dataSource',
label: '支持数据源',
component: 'Select',
colProps: { span: 8 },
componentProps: {
mode: 'multiple',
options: [
{ label: 'INCEPTOR', value: 'INCEPTOR' },
{ label: 'IMPALA', value: 'IMPALA' },
{ label: 'MYSQL', value: 'MYSQL' },
],
},
required: true,
},
{
field: 'model',
label: '目录权属模式',
component: 'RadioGroup',
defaultValue: '本级定义',
colProps: { span: 8 },
componentProps: {
options: [
{ label: '本级定义', value: '本级定义' },
{ label: '资源自定义', value: '资源自定义' },
],
},
},
{
field: 'group',
label: '权属工作组',
component: 'Select',
defaultValue: '默认工作组',
colProps: { span: 8 },
componentProps: {
placeholder: '输入描述',
options: [{ label: '默认工作组', value: '默认工作组' }],
},
},
];
export const importFormSchema: any[] = [
{
field: 'importVersionAlert',
label: '版本描述',
slot: 'fileMethods',
component: 'InputTextarea',
colProps: { lg: 24, md: 24 },
componentProps: {
placeholder: '最多255个字符',
},
required: true,
rules: [{ required: true, message: '请输入版本描述!' }],
},
];
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