Commit 07b4d06c authored by liwei's avatar liwei

补数页面

parent 7de9fec6
......@@ -892,6 +892,15 @@ export const taskSchedulingRoute: AppRouteRecordRaw = {
currentActiveMenu: '/taskScheduling/taskFlowMaintenance',
},
children: [
{
path: 'periodicScheduling/index',
name: 'periodicScheduling',
component: () => import('@/views/taskScheduling/taskFlowMaintenance/periodicScheduling/index.vue'),
meta: {
title: '调度任务',
icon: '',
},
},
{
path: 'periodicScheduling/executionDetails',
name: 'executionDetails',
......
<template>
<div style="width: 100%;height: 100%;background-color: white">
<div style="width: 100%;height:35%">
<div class="TopClass1">
<div class="center">
<div class="center1">
<div class="center1-1">
<div class="eventCenterTitle">
所有任务流
</div>
......@@ -9,7 +9,7 @@
<BasicForm @register="registerForm1"/>
</div>
</div>
<div class="TopClass2">
<div class="center1-2">
<div class="selectCss">
<BasicForm @register="registerForm2"/>
</div>
......@@ -195,8 +195,8 @@
</TabPane>
</Tabs>
</div>
<div style="width: 100%;height:65%;display: flex;margin-top: 10px">
<div style="width: 25%;height: 500px">
<div class="center2">
<div class="center2-1">
<BasicTree
toolbar
search
......@@ -221,9 +221,9 @@
</template>
</BasicTree>
</div>
<div style="width: 75%;height: 500px">
<div style="display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;">
<div style="margin-top: 10px;display: flex;margin-left: 10px;align-items: center">
<div class="center2-2">
<div class="center2-2-1">
<div class="center2-2-1-1">
<div>
<Icon icon="material-symbols:sync" :size="25" :color="'rgb(121, 74, 235)'" />
</div>
......@@ -701,7 +701,7 @@
display: flex;
align-items: center
}
.TopClass1{
.center1-1{
display: flex;
height: 30px;
margin-left: 30px;
......@@ -713,7 +713,7 @@
font-size: 20px
}
}
.TopClass2{
.center1-2{
display: flex;
height: 30px;
margin-top: 10px;
......@@ -728,4 +728,39 @@
margin:0px 0px!important;
background-color: rgb(221, 225, 240)!important;
}
.center{
width: 100%;
height: 100%;
background-color: white;
.center1{
width: 100%;
height:35%
}
}
.center2{
width: 100%;
height:65%;
display: flex;
margin-top: 10px;
.center2-1{
width: 25%;
height: 500px
}
.center2-2{
width: 75%;
height: 500px;
.center2-2-1{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.center2-2-1-1{
margin-top: 10px;
display: flex;
margin-left: 10px;
align-items: center
}
}
}
}
</style>
<template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit">
<div>
<div style="font-weight: bold;font-size: 15px">
已选中的资源信息
</div>
<div style="display: flex;margin-top: 10px">
<div>任务流数量:10</div>
<div style="margin-left: 15px;">补数时间范围:2023/06/27 19:29:55 - 2023/06/27 19:29:55</div>
</div>
</div>
<BasicTable @register="registerTable1"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref, reactive} from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {addTaskColumns1} from './supplyNumber.data';
import { useMessage } from '@/hooks/web/useMessage';
import {addTaskTableData1} from "./supplyNumberData";
import { BasicTable, useTable, TableAction } from '@/components/Table';
defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const getTitle = computed(() => ('补数任务1配置'));
const [registerTable1] = useTable({
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: addTaskTableData1.length,
code:'',
message:'',
data: [],
};
return { ...response,data: addTaskTableData1 };
},
columns:addTaskColumns1,
useSearchForm: false,
showTableSetting: false,
showIndexColumn:false,
bordered: true,
scroll: { y: 300 },
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
});
/**提交按钮*/
function handleSubmit() {
createMessage.success('导入成功!')
closeModal();
}
</script>
......@@ -20,11 +20,11 @@
</div>
<div class="center2">
<div class="center2-1">手动选择任务流</div>
<BasicTable @register="registerTable">
<BasicTable @register="registerTable1">
<template #toolbar>
<a-input-search
v-model:value="value"
placeholder="input search text"
placeholder="任务流名称搜索"
style="width: 200px;margin-right: 80%"
@search="onSearch"
/>
......@@ -34,16 +34,6 @@
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'icon-park-twotone:setting',
// label: '编辑',
onClick: resetNameButton.bind(null, record),
},
{
icon: 'jam:stop-sign',
// label: '编辑',
onClick: resetNameButton.bind(null, record),
},
{
icon: 'material-symbols:delete-outline',
// label: '编辑',
......@@ -55,6 +45,24 @@
</template>
</BasicTable>
</div>
<div class="center3">
<div class="center3-1">
<div style="font-weight: bold;font-size: 15px">
补数范围预览
</div>
<div style="margin-left: 15px">
任务流数量:10
</div>
<div style="margin-left: 15px">
任务流预计执行数量:66
</div>
</div>
<div style="display: flex;justify-content: space-between">
<BasicForm @register="registerForm2"/>
<a-button type="primary" @click="addTaskStreamButton">添加任务流</a-button>
</div>
<BasicTable @register="registerTable2"/>
</div>
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
</div>
......@@ -72,8 +80,13 @@
import { useRoute } from 'vue-router';
import { router } from '@/router';
import {downloadByData} from "@/utils/file/download";
import {addTaskFormSchema1, addTaskFormSchema2, columns, searchFormSchema} from './supplyNumber.data';
import { tableData,TreeData } from './supplyNumberData'
import {
addTaskColumns1, addTaskColumns2,
addTaskFormSchema1,
addTaskFormSchema2,
addTaskFormSchema3,
} from './supplyNumber.data';
import {addTaskTableData1, addTaskTableData2, tableData, TreeData} from './supplyNumberData'
import { BasicForm, useForm } from '@/components/Form';
import { useECharts } from '@/hooks/web/useECharts';
......@@ -87,34 +100,53 @@
'2、若执行记录已经存在,则忽略不会产生补数记录;\n' +
'3、补数时会按照当前选中资源的最新版本配置执行。');
const [registerResetNameModal, { openModal: openResetNameModal }] = useModal();
const [registerTable, { reload,getForm,getRowSelection }] = useTable({
const [registerTable1] = useTable({
title: '',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: tableData.length,
total: addTaskTableData1.length,
code:'',
message:'',
data: [],
};
return { ...response,data: tableData };
return { ...response,data: addTaskTableData1 };
},
rowKey: 'businessId',
columns,
rowSelection: true,
columns:addTaskColumns1,
useSearchForm: false,
showTableSetting: false,
showIndexColumn:false,
bordered: true,
scroll: { y: 200 },
actionColumn: {
width: 150,
width: 30,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable2] = useTable({
title: '',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: addTaskTableData2.length,
code:'',
message:'',
data: [],
};
return { ...response,data: addTaskTableData2 };
},
columns:addTaskColumns2,
useSearchForm: false,
showTableSetting: false,
showIndexColumn:false,
bordered: true,
scroll: { y: 200 },
});
//初始化表单
const [registerForm1, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 80,
......@@ -127,7 +159,7 @@
const [registerForm2] = useForm({
labelWidth: 80,
schemas: addTaskFormSchema2,
schemas: addTaskFormSchema3,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
......@@ -218,7 +250,7 @@
}
.center2{
width: 100%;
height:90%;
height:40%;
.center2-1{
margin-bottom: 20px;
margin-left: 10px;
......@@ -226,6 +258,16 @@
ont-size: 15px
}
}
.center3{
margin-top: 30px;
width: 100%;
height:40%;
.center3-1{
display: flex;
margin-bottom: 20px;
margin-left: 10px;
}
}
}
</style>
......@@ -10,8 +10,8 @@
</div>
<div>
<a-button type="primary" style="margin-right: 10px" @click="reloadButton">手动刷新</a-button>
<a-button type="primary" style="margin-right: 10px" @click="cancelButton">取消</a-button>
<a-button type="primary" style="margin-right: 10px" @click="deleteButton">删除</a-button>
<a-button type="primary" style="margin-right: 10px" @click="cancelBatchButton">取消</a-button>
<a-button type="primary" style="margin-right: 10px" @click="deleteBatchButton">删除</a-button>
<a-button type="primary" style="margin-right: 10px" @click="addSupplyNumberButton">新增补数</a-button>
</div>
</div>
......@@ -28,30 +28,38 @@
:actions="[
{
icon: 'icon-park-twotone:setting',
// label: '编辑',
onClick: addSupplyNumberButton.bind(null, record),
// label: '补数配置',
onClick: SupplyNumberSettingButton.bind(null, record),
},
{
icon: 'jam:stop-sign',
// label: '编辑',
onClick: addSupplyNumberButton.bind(null, record),
// label: '取消',
popConfirm: {
title: '是否确认取消',
placement: 'left',
confirm: cancelButton.bind(null, record),
},
},
{
icon: 'material-symbols:delete-outline',
// label: '编辑',
onClick: addSupplyNumberButton.bind(null, record),
// label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: deleteButton.bind(null, record),
},
},
]"
/>
</template>
</template>
<template #latestEventTime="{ text, record }">
<template #supplyNumberName="{ text, record }">
<a @click="showDetails(record)"> {{ text }}</a>
</template>
</BasicTable>
</div>
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
<!-- 补数配置 弹窗-->
<SupplyNumberSettingModal @register="registerSupplyNumberSettingModal" @success="handleSuccess" />
</div>
</template>
......@@ -71,6 +79,8 @@
import { tableData,TreeData } from './supplyNumberData'
import { BasicForm, useForm } from '@/components/Form';
import { useECharts } from '@/hooks/web/useECharts';
import SupplyNumberSettingModal from './SupplyNumberSettingModal.vue'
defineOptions({ name: 'AccountManagement' });
const chartRef = ref<HTMLDivElement | null>(null);
......@@ -79,7 +89,7 @@
const route = useRoute();
const go = useGo();
const [registerResetNameModal, { openModal: openResetNameModal }] = useModal();
const [registerSupplyNumberSettingModal, { openModal: openSupplyNumberSettingModal }] = useModal();
const [registerTable, { reload,getForm,getRowSelection }] = useTable({
title: '',
api: async (params) => {
......@@ -139,6 +149,57 @@
})
}
/***/
function showDetails(record){
router.push({
path: '/taskScheduling/taskFlowMaintenance/periodicScheduling/index',
query: {
}
})
}
/**取消 按钮*/
function cancelButton(record){
createMessage.success('取消成功!')
}
/**删除 按钮*/
function deleteButton(record){
createMessage.success('删除成功!')
}
/**批量删除 按钮*/
function deleteBatchButton(record){
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('删除成功!');
reload();
},
});
}
/**批量取消 按钮*/
function cancelBatchButton(record){
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量取消选中数据吗?',
onOk() {
createMessage.success('取消成功!');
reload();
},
});
}
/**补数配置 按钮*/
function SupplyNumberSettingButton(record){
openSupplyNumberSettingModal(true,{})
}
/** 转成树 */
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id'
......
......@@ -14,7 +14,8 @@ export const columns: BasicColumn[] = [
{
title: '补数名称',
dataIndex: 'supplyNumberName',
width: 120
width: 120,
slots: { customRender: 'supplyNumberName' },
},
{
title: '创建者',
......@@ -64,7 +65,6 @@ export const searchFormSchema: FormSchema[] = [
field: 'supplyState',
label: '补数状态',
component: 'Select',
required: true,
componentProps: {
placeholder: '请选择补数状态',
options: [
......@@ -131,3 +131,80 @@ export const addTaskFormSchema2: FormSchema[] = [
},
},
];
/**新建任务页-表单3*/
export const addTaskFormSchema3: FormSchema[] = [
{
field: 'taskStreamName',
label: ' ',
labelWidth:20,
component: 'Input',
componentProps: {
placeholder: '任务流名称搜索',
},
},
{
field: 'taskStream',
label: ' ',
labelWidth:20,
component: 'Select',
componentProps: {
placeholder: '手动选择的任务流',
options: [
{
label: '已取消',
value: '已取消',
},
],
},
},
{
field: 'publishState',
label: ' ',
labelWidth:20,
component: 'Select',
componentProps: {
placeholder: '发布状态',
options: [
{
label: '已取消',
value: '已取消',
},
{
label: '已完成',
value: '已完成',
},
],
},
},
];
/**新建任务页-table列表1*/
export const addTaskColumns1: BasicColumn[] = [
{
title: '任务流名称',
dataIndex: 'taskStreamName',
width: 120
},
{
title: '任务流位置',
dataIndex: 'taskStreamLocation',
width: 120
},
];
/**新建任务页-table列表2*/
export const addTaskColumns2: BasicColumn[] = [
{
title: '补数范围内任务流',
dataIndex: 'rangeTaskStream',
width: 120
},
{
title: '发布状态',
dataIndex: 'publishState',
width: 120
},
{
title: '手动选择的任务流',
dataIndex: 'chooseTaskStream',
width: 120
},
];
......@@ -94,5 +94,54 @@ export const tableData: any[] =[
supplyNumberTime: '2024-01-01 09:00:00 - 2024-01-10 09:00:00',
},
]
/**新建任务列表 数据1*/
export const addTaskTableData1: any[] =[
{
businessId:'1',
taskStreamName: 'QC12345',
taskStreamLocation:'admin-个人工作区/demo',
},
{
businessId:'2',
taskStreamName: 'Smart financial modeling',
taskStreamLocation:'admin-个人工作区/demo',
},
{
businessId:'3',
taskStreamName: 'Result data entry',
taskStreamLocation:'admin-个人工作区/demo',
},
{
businessId:'4',
taskStreamName: 'Shed and huo area',
taskStreamLocation:'admin-个人工作区/demo',
},
]
/**新建任务列表 数据2*/
export const addTaskTableData2: any[] =[
{
businessId:'1',
rangeTaskStream: 'QC12345',
publishState:'已发布',
chooseTaskStream:''
},
{
businessId:'2',
rangeTaskStream: 'Smart financial modeling',
publishState:'已发布',
chooseTaskStream:''
},
{
businessId:'3',
rangeTaskStream: 'Result data entry',
publishState:'未发布',
chooseTaskStream:''
},
{
businessId:'4',
rangeTaskStream: 'Shed and huo area',
publishState:'已发布',
chooseTaskStream:''
},
]
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