Commit 4be49630 authored by LiXuyang's avatar LiXuyang

落标检查-上下线

parent 66527512
......@@ -9,11 +9,11 @@
/>
<BasicTable class="w-4/5" @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<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" :disabled="getRowSelection().selectedRowKeys <=0">批量上线</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <=0">批量下载</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <=0">复制到</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <=0">删除</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <=0">移动</a-button>
<a-button type="primary">新建分类</a-button>
<a-button type="primary" @click="handleAdd">新建落标检查</a-button>
</template>
......
......@@ -63,24 +63,28 @@ export const treeData = [
];
export const labelTableData = [
{
businessId: 1,
name: '客户编号',
type: '数据标准',
uploadFlag: '已下线',
updateTime: '2022/10/27 12:14:41',
},
{
businessId: 2,
name: '指标落标test',
type: '数据标准',
uploadFlag: '已下线',
updateTime: '2022/10/26 17:57:08',
},
{
businessId: 3,
name: '主数据标志落标',
type: '数据标准',
uploadFlag: '已下线',
updateTime: '2022/10/26 18:20:41',
},
{
businessId: 4,
name: '客户详细地址',
type: '数据标准',
uploadFlag: '已上线',
......
......@@ -106,27 +106,6 @@ export const detailDataFormSchema: FormSchema[] = [
},
colProps: { lg: 4 },
},
{
field: 'change',
label: '是否运行质量检查',
labelWidth: '180',
helpMessage: '是否运行质量检查',
defaultValue: '否',
component: 'RadioGroup',
componentProps: {
options: [
{
label: '是',
value: '是',
},
{
label: '否',
value: '否',
},
],
},
colProps: { lg: 8 },
},
];
export const metadataColumns: BasicColumn[] = [
{
......@@ -163,27 +142,6 @@ export const metadataFormSchema: FormSchema[] = [
component: 'Input',
colProps: { lg: 4 },
},
{
field: 'change',
label: '是否运行质量检查',
labelWidth: '180',
helpMessage: '是否运行质量检查',
defaultValue: '否',
component: 'RadioGroup',
componentProps: {
options: [
{
label: '是',
value: '是',
},
{
label: '否',
value: '否',
},
],
},
colProps: { lg: 8 },
},
];
export const metadataData = [
{
......
......@@ -3,12 +3,12 @@
<template #extra>
<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" :disabled="disabled">保存</a-button>
<a-button type="primary" @click="handleOnline">{{ isOnline ? '下线' : '上线' }}</a-button>
<a-button type="primary">运行</a-button>
</template>
<template #footer>
<BasicForm @register="registerForm">
<BasicForm :disabled="disabled" @register="registerForm">
<template #name="{ model, field }">
<span>{{ model[field] }}</span>
</template>
......@@ -23,7 +23,7 @@
</template>
<template #formula="{ model, field }">
<a-input style="width: 200px" v-model:value="model[field]" />
<a-button type="link">Cron表达式</a-button>
<a-button :disabled="disabled" type="link">Cron表达式</a-button>
</template>
<template #type="{ model, field }">
<RadioGroup v-model:value="model[field]" @change="changeTableType(model[field])">
......@@ -40,8 +40,17 @@
:searchInfo="searchInfo"
>
<template #toolbar>
<a-button><DeleteOutlined /></a-button>
<a-button type="primary">添加数据标准</a-button>
<span>是否运行质量检查</span>
<QuestionCircleOutlined />
<RadioGroup :disabled="disabled" v-model:value="checkType">
<Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio>
</RadioGroup>
<a-button
:disabled="disabled || getRowSelection().selectedRowKeys <= 0"
@click="handleDelete"
><DeleteOutlined
/></a-button>
<a-button :disabled="disabled" type="primary">添加数据标准</a-button>
</template>
<template #standard="{ text, record }">
<a @click="handleTableName">{{ text }}</a>
......@@ -53,10 +62,20 @@
</BasicTable>
<BasicTable v-if="tableType === '元数据'" @register="metadataTable" :searchInfo="searchInfo">
<template #toolbar>
<a-button><DeleteOutlined /></a-button>
<span>是否运行质量检查</span>
<QuestionCircleOutlined />
<RadioGroup :disabled="disabled" v-model:value="checkType">
<QuestionCircleOutlined style="z-index: 2" />
<Radio :value="item" v-for="item in ['是', '否']" :key="item">{{ item }}</Radio>
</RadioGroup>
<a-button
:disabled="disabled || getMetadataRowSelection().selectedRowKeys <= 0"
@click="handleDelete"
><DeleteOutlined
/></a-button>
<!-- <a-button type="primary">添加元数据</a-button>-->
<a-button type="primary" @click="handleExcel">Excel导入</a-button>
<a-button type="primary" @click="handleAdd">手动添加</a-button>
<a-button :disabled="disabled" type="primary" @click="handleExcel">Excel导入</a-button>
<a-button :disabled="disabled" type="primary" @click="handleAdd">手动添加</a-button>
</template>
<template #name="{ text, record }">
<div>{{ text }}</div>
......@@ -75,12 +94,12 @@
<script lang="ts" setup>
import { Radio, Select, Switch } from 'ant-design-vue';
import { PageWrapper } from '@/components/Page';
import { DeleteOutlined } from '@ant-design/icons-vue';
import { DeleteOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable } from '@/components/Table';
import BasicForm from '../../../../components/Form/src/BasicForm.vue';
import { useForm } from '@/components/Form';
import { useModal } from '@/components/Modal';
import { onMounted, reactive, ref } from 'vue';
import { computed, onMounted, reactive, ref } from 'vue';
import { useRoute } from 'vue-router';
import {
detailDataColumn,
......@@ -97,12 +116,17 @@
} from '@/views/dataStandards/labelDropInspection/labelDetail/detailData';
import ExcelModel from './excelModel.vue';
import AddMetadataModel from './addMetadataModel.vue';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
const RadioGroup = Radio.Group;
const route = useRoute();
const modelName = ref(route.query.name);
const searchInfo = reactive<Recordable>({});
const infoData = route.query;
const isOnline = ref(false);
const disabled = computed(() => isOnline.value);
const checkType = ref('否');
let tableType = ref('数据标准');
function handleTableName() {}
function changeTableType(type) {
......@@ -118,6 +142,20 @@
isUpdate: false,
});
}
function handleOnline() {
isOnline.value = !isOnline.value;
}
/** 删除按钮*/
function handleDelete() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
const [excelModel, { openModal: openExcelModal }] = useModal();
const [addMetadataModel, { openModal: openAddMetadataModel }] = useModal();
const [registerForm, { setFieldsValue, getFieldsValue, updateSchema, resetFields, validate }] =
......@@ -161,7 +199,7 @@
showTableSetting: false,
bordered: true,
});
const [metadataTable, {}] = useTable({
const [metadataTable, { getRowSelection: getMetadataRowSelection }] = useTable({
title: '',
isTreeTable: true,
dataSource: metadataData,
......
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