Commit 5e6bc29d authored by LiXuyang's avatar LiXuyang

落标检查-改

parent dd96c911
......@@ -141,9 +141,9 @@
const { createMessage, createConfirm } = useMessage();
const searchInfo = reactive<Recordable>({});
const searchKey = ref();
const tabName = ref();
const tabName = ref(treeData[0].name);
const tree = ref();
const path = ref();
const path = ref(treeData[0].name);
function handleSelect() {
const keys = unref(tree).getSelectedKeys();
const node = unref(tree).getSelectedNode(keys[0]);
......@@ -188,7 +188,7 @@
function handleDetail(record) {
push({
path: '/dataStandards/labelDropInspection/labelDetail',
query: record,
query: { ...record, ...{ path: path.value + '/' + record.name } },
});
}
/** 列表删除 */
......
......@@ -123,6 +123,7 @@ export const metadataColumns: BasicColumn[] = [
title: '标准',
dataIndex: 'standard',
width: 100,
slots: { customRender: 'standard' },
},
{
title: '落标状态',
......
......@@ -15,7 +15,7 @@
</div>
</div>
<a-button type="primary" @click="handleOperation">跳转运维</a-button>
<a-button type="primary">查看报告</a-button>
<a-button type="primary" @click="handleViewReport">查看报告</a-button>
<a-button type="primary" :disabled="disabled" @click="handleSave">保存</a-button>
<a-button type="primary" @click="handleOnline">{{ isOnline ? '下线' : '上线' }}</a-button>
<a-button type="primary" @click="handleRun">运行</a-button>
......@@ -119,6 +119,9 @@
<div>{{ text }}</div>
<div style="color: #9195a4">{{ record.nameTxt }}</div>
</template>
<template #standard="{ text, record }">
<a>{{ text }}</a>
</template>
<template #check="{ text, record }">
<Switch :disabled="disabled" v-model:checked="record['check']" />
</template>
......@@ -168,7 +171,7 @@
const RadioGroup = Radio.Group;
const route = useRoute();
const modelName = route.query.name;
const path = '落标检查 / admin-个人工作区 / ' + modelName;
const path = route.query.path;
const searchInfo = reactive<Recordable>({});
const infoData = route.query;
const isOnline = ref(false);
......@@ -278,6 +281,15 @@
function handleRun() {
createMessage.success('运行成功!');
}
function handleViewReport() {
router.push({
path: '/dataStandards/labelDropInspection/labelReport',
query: {
name: modelName,
path: path,
},
});
}
onMounted(() => {
setFieldsValue({ ...detailFormData, ...infoData });
});
......
<template>
<PageWrapper :title="modelName" contentBackground headerSticky>
<template #extra>
<span>执行批次</span>
<Select
@change="getTimeDifference()"
:options="options"
style="width: 320px"
v-model:value="selectBatch"
/>
<a-button>导出报告</a-button>
<PageWrapper contentBackground headerSticky>
<template #headerContent>
<div class="flex" style="gap: 10px">
<div class="flex-1 flex" style="gap: 10px">
<LeftOutlined style="font-size: 25px; cursor: pointer" @click="handleBack" />
<SearchOutlined style="font-size: 30px; color: #14b43e" />
<div>
<div style="font-weight: bolder; font-size: 16px">
{{ modelName }}
</div>
<div style="color: #b5b9c5">
{{ path }}
</div>
</div>
</div>
<span>执行批次</span>
<Select
@change="getTimeDifference()"
:options="options"
style="width: 320px"
v-model:value="selectBatch"
/>
<a-button>导出报告</a-button>
</div>
</template>
<template #footer>
<Descriptions :column="3">
......@@ -36,15 +50,33 @@
<div>
<span>规则清单</span>
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<span>规则总量:103</span>
<CheckCircleOutlined style="color: #25a665" />
<span>通过:79</span>
<CloseCircleOutlined style="color: #dd4b4c" />
<span>未通过:14</span>
<QuestionCircleOutlined style="color: #ee8b16" />
<span>执行失败:10</span>
<template #headerTop>
<div class="flex">
<div class="flex-1">
<Input style="width: 200px" v-model:value="searchKey" placeholder="输入关键字搜索">
<template #prefix>
<SearchOutlined />
</template>
</Input>
</div>
<div class="flex" style="gap: 10px">
<div>规则总量:103</div>
<div>
<CheckCircleOutlined style="color: #25a665" />
</div>
<div>通过:79</div>
<div>
<CloseCircleOutlined style="color: #dd4b4c" />
</div>
<div>未通过:14</div>
<div>
<QuestionCircleOutlined style="color: #ee8b16" />
</div>
<div>执行失败:10</div>
</div>
</div>
</template>
<template #toolbar> </template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
......@@ -74,12 +106,14 @@
</template>
<script lang="ts" setup>
import { Descriptions, Select } from 'ant-design-vue';
import { Descriptions, Select, Input } from 'ant-design-vue';
import {
CheckCircleOutlined,
CloseCircleOutlined,
QuestionCircleOutlined,
InfoCircleOutlined,
LeftOutlined,
SearchOutlined,
} from '@ant-design/icons-vue';
import * as echarts from 'echarts';
import { PageWrapper } from '@/components/Page';
......@@ -92,10 +126,12 @@
reportFormSchema,
} from '@/views/dataStandards/labelDropInspection/labelReport/report.data';
import { reportData } from '@/views/dataStandards/labelDropInspection/labelReport/reportData';
import { router } from '@/router';
type EChartsOption = echarts.EChartsOption;
const route = useRoute();
const modelName = route.query.name;
const path = route.query.path;
const selectBatch = ref('2023/06/07 19:45:59~2023/06/07 19:46:10');
const timeList = computed(() => selectBatch.value.split('~'));
const options = reactive([
......@@ -109,6 +145,7 @@
},
]);
const runTime = ref('0');
const searchKey = ref();
function getTimeDifference() {
if (!timeList.value) return '0';
// 使用 moment 解析带有自定义格式的日期字符串
......@@ -120,10 +157,7 @@
console.log('被调用');
runTime.value = endMoment.diff(startMoment, 'seconds');
}
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
const [registerTable] = useTable({
title: '',
// 数据
api: async (params) => {
......@@ -144,13 +178,7 @@
columns: reportColumn,
showIndexColumn: false,
striped: false,
// 搜索
formConfig: {
labelWidth: 120,
schemas: reportFormSchema,
autoSubmitOnEnter: true,
},
useSearchForm: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
actionColumn: {
......@@ -242,10 +270,7 @@
type: 'category',
data: ['及时性', '准确性', '一致性', '规范性', '唯一性', '完整性', '元数据检查'],
},
color: [
'#D66868',
'#5A88C5',
],
color: ['#D66868', '#5A88C5'],
series: [
{
name: '问题规则',
......@@ -276,6 +301,9 @@
option && myChart.setOption(option);
}
function handleBack() {
router.go(-1);
}
onMounted(() => {
getTimeDifference();
getEcharts1();
......
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