Commit 332c02bf authored by 罗林杰's avatar 罗林杰

Merge remote-tracking branch 'origin/master'

parents 8968f8b9 76de8963
...@@ -119,6 +119,7 @@ export const infoFormSchema: FormSchema[] = [ ...@@ -119,6 +119,7 @@ export const infoFormSchema: FormSchema[] = [
{ {
label: '调度周期', label: '调度周期',
field: 'cycle', field: 'cycle',
required: true,
labelWidth: 150, labelWidth: 150,
show: ({ model }) => { show: ({ model }) => {
return model.dispatch; return model.dispatch;
...@@ -145,10 +146,11 @@ export const infoFormSchema: FormSchema[] = [ ...@@ -145,10 +146,11 @@ export const infoFormSchema: FormSchema[] = [
{ {
label: '调度时间', label: '调度时间',
labelWidth: 150, labelWidth: 150,
required: true,
field: 'time', field: 'time',
slot: 'time', slot: 'time',
show: ({ model }) => { show: ({ model }) => {
return model.dispatch; return model.dispatch && model.cycle;
}, },
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
}, },
...@@ -996,3 +998,14 @@ export const editResultColumn: BasicColumn[] = [ ...@@ -996,3 +998,14 @@ export const editResultColumn: BasicColumn[] = [
width: 80, width: 80,
}, },
]; ];
export const uploadModelSchema: FormSchema[] = [
{
label: '版本变更描述',
field: 'txt',
component: 'InputTextArea',
componentProps: {
rows: 4,
},
colProps: { lg: 24, md: 24 },
},
];
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<a-button type="primary">运行当前及下游</a-button> <a-button type="primary">运行当前及下游</a-button>
<a-button type="primary">调试</a-button> <a-button type="primary">调试</a-button>
<a-button type="primary">保存</a-button> <a-button type="primary">保存</a-button>
<a-button type="primary">发布</a-button> <a-button type="primary" @click="handleUpload">发布</a-button>
<div style="display: flex; flex-direction: column; text-align: center"> <div style="display: flex; flex-direction: column; text-align: center">
<RadioGroup v-model:value="showType" button-style="solid" size="small"> <RadioGroup v-model:value="showType" button-style="solid" size="small">
<RadioButton value="table"><UnorderedListOutlined /></RadioButton> <RadioButton value="table"><UnorderedListOutlined /></RadioButton>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<UpstreamModel @register="upstreamTaskModel" /> <UpstreamModel @register="upstreamTaskModel" />
<DependModel @register="dependModel" /> <DependModel @register="dependModel" />
<TaskConfigModel @register="taskConfigModel" /> <TaskConfigModel @register="taskConfigModel" />
<UploadModel @register="uploadModel" />
</PageWrapper> </PageWrapper>
</template> </template>
...@@ -162,11 +163,13 @@ ...@@ -162,11 +163,13 @@
import UpstreamModel from './upstreamTaskModel.vue'; import UpstreamModel from './upstreamTaskModel.vue';
import DependModel from './dependModel.vue'; import DependModel from './dependModel.vue';
import TaskConfigModel from './taskConfigModel.vue'; import TaskConfigModel from './taskConfigModel.vue';
import UploadModel from './uploadModel.vue';
const [taskModel, { openModal: openTaskModel }] = useModal(); const [taskModel, { openModal: openTaskModel }] = useModal();
const [upstreamTaskModel, { openModal: openUpstreamModel }] = useModal(); const [upstreamTaskModel, { openModal: openUpstreamModel }] = useModal();
const [dependModel, { openModal: openDependModel }] = useModal(); const [dependModel, { openModal: openDependModel }] = useModal();
const [taskConfigModel, { openModal: openTaskConfigModel }] = useModal(); const [taskConfigModel, { openModal: openTaskConfigModel }] = useModal();
const [uploadModel, { openModal: openUploadModel }] = useModal();
const rotate = ref(90); const rotate = ref(90);
const showType = ref('table'); const showType = ref('table');
const searchInfo = reactive<Recordable>({}); const searchInfo = reactive<Recordable>({});
...@@ -199,6 +202,11 @@ ...@@ -199,6 +202,11 @@
isUpdate: false, isUpdate: false,
}); });
} }
function handleUpload() {
openUploadModel(true, {
isUpdate: false,
});
}
const [registerTable, { getRowSelection }] = useTable({ const [registerTable, { getRowSelection }] = useTable({
title: '', title: '',
// 数据 // 数据
......
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
} }
} }
//初始化表单 //初始化表单
const [infoForm, { resetFields: infoReset, validate }] = useForm({ const [infoForm, { resetFields: infoReset, validate, getFieldsValue: getInfoValue }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 12, md: 24 }, baseColProps: { lg: 12, md: 24 },
schemas: infoFormSchema, schemas: infoFormSchema,
...@@ -688,7 +688,10 @@ ...@@ -688,7 +688,10 @@
/**确定按钮*/ /**确定按钮*/
async function handleSubmit() { async function handleSubmit() {
await validate(); const model = getInfoValue();
if (model.dispatch) {
await validate();
}
closeModal(); closeModal();
} }
</script> </script>
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="register" />
</BasicModal>
</template>
<script lang="ts" setup>
import { useTable, TableAction } from '@/components/Table';
import { ref, computed, unref, reactive } from 'vue';
import { CloseOutlined } from '@ant-design/icons-vue';
import Icon from '@/components/Icon/Icon.vue';
import { Select } from 'ant-design-vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { connectionData } from '@/views/dataWarehousePlanning/logicalModel/modelDetail/modelData';
import {
connectionFormSchema,
connectionTable,
} from '@/views/dataWarehousePlanning/logicalModel/modelDetail/model.data';
import {
infoFormSchema,
uploadModelSchema,
upstreamTaskColumn,
} from '@/views/taskScheduling/taskFlowDesign/design.data';
import { useMessage } from '@/hooks/web/useMessage';
const getTitle = '发布新版本';
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
});
const [register] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: uploadModelSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
/**确定按钮*/
const { createMessage } = useMessage();
async function handleSubmit() {
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