Commit cf586fd1 authored by 曹泽华's avatar 曹泽华

数仓开发 策略指标

parent b98fa22d
<template>
<PageWrapper title="生成原子标签" dense contentFullHeight fixedHeight>
<template #extra>
<a-button type="primary">保存</a-button>
<PageWrapper contentFullHeight fixedHeight>
<template #headerContent>
<div class="flex" style="justify-content: space-between">
<div style="font-size: 18px; font-weight: 650">
<LeftOutlined @click="handleGo" /><DeploymentUnitOutlined
style="color: #3b8cf7; font-size: 24px"
/>生成原子标签</div
>
<a-button type="primary" @click="handleSave">保存</a-button>
</div>
</template>
<template #footer>
<BasicTable @register="registerTable">
......@@ -25,6 +32,7 @@
<script lang="ts" setup>
import { Input, Select } from 'ant-design-vue';
import { LeftOutlined, DeploymentUnitOutlined } from '@ant-design/icons-vue';
import PageWrapper from '../../../../../components/Page/src/PageWrapper.vue';
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { BasicTableProps, useTable } from '@/components/Table';
......@@ -33,6 +41,8 @@
atomTableColumn,
} from '@/views/mallResourceDevelopment/label/labelDevelop/atomLabel/atom.data';
import { atomTableData } from '@/views/mallResourceDevelopment/label/labelDevelop/atomLabel/atomData';
import { useMessage } from '@/hooks/web/useMessage';
import { router } from '@/router';
function hasSelect(record) {
return getAtomSelectKeys().includes(record.businessId);
......@@ -62,6 +72,7 @@
},
rowKey: 'businessId',
rowSelection: true,
striped: false,
columns: atomTableColumn,
showIndexColumn: false,
showTableSetting: false,
......@@ -72,6 +83,16 @@
autoSubmitOnEnter: true,
},
} as BasicTableProps);
const { createMessage } = useMessage();
function handleSave() {
createMessage.success('保存成功!');
router.go(-1);
}
function handleGo() {
router.go(-1);
}
</script>
<style scoped></style>
<template>
<PageWrapper title="创建商城标签" dense content-full-height fixed-height>
<template #extra>
<a-button type="link">
<a-button type="link" @click="handleCancel">
<div><RollbackOutlined /></div>取消
</a-button>
<a-button type="link">
<a-button type="link" @click="handleCreate">
<div><CheckOutlined /></div>创建
</a-button>
</template>
......@@ -98,6 +98,7 @@
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { BasicTableProps, useTable } from '@/components/Table';
import { rangeTableData, gatherData, gatherDataTableHeader } from './upShopData';
import {useRouter} from "vue-router";
const visibleRangeOptions = [
{
......@@ -185,11 +186,16 @@
// 动态头listColumn获取
const headerFieldList = [];
const router = useRouter();
onMounted(() => {
gatherDataTableHeader.forEach((item) => {
headerFieldList.push(item.field);
});
});
function handleCancel() {
router.go(-1);
}
</script>
<style scoped>
......
......@@ -48,7 +48,7 @@
import BasicHelp from '@/components/Basic/src/BasicHelp.vue';
const { createMessage, createConfirm } = useMessage();
const useTime = ref();
const useTime = ref('1');
const optionList = [
{
value: '1',
......
......@@ -19,17 +19,24 @@
<template #retainTime="{ field, model }">
<RadioGroup v-model:value="model[field]">
<Radio :style="radioStyle" :value="1"
><span>保留从</span><DatePicker style="width: 200px" /><span
>开始的所有执行或监控数据</span
></Radio
><span>保留从</span
><DatePicker
value-format="YYYY-MM-DD"
v-model:value="model.retainDate"
style="width: 200px"
/><span>开始的所有执行或监控数据</span></Radio
>
<Radio :style="radioStyle" :value="2"
><span>保留时间为</span><InputNumber style="width: 200px" /><span
><span>保留时间为</span
><InputNumber v-model:value="model.retainDay" style="width: 200px" /><span
>天的执行或监控数据</span
></Radio
>
</RadioGroup>
</template>
<template #clearTime="{ field, model }">
<TimePicker value-format="HH:mm:ss" v-model:value="model[field]" style="width: 200px" />
</template>
<template #formFooter>
<a-button style="margin-left: 30%" type="primary" @click="handleSave"> 保存 </a-button>
</template>
......@@ -40,12 +47,13 @@
<script lang="ts" setup>
import PageWrapper from '@/components/Page/src/PageWrapper.vue';
import { Alert, RadioGroup, DatePicker, InputNumber, Radio } from 'ant-design-vue';
import { Alert, RadioGroup, DatePicker, InputNumber, Radio, TimePicker } from 'ant-design-vue';
import BasicForm from '@/components/Form/src/BasicForm.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { useForm } from '@/components/Form';
import { checkFormSchema, clearFormSchema } from './strategic.data';
import { reactive } from 'vue';
import { onMounted, reactive, ref } from 'vue';
import { Data } from '@/views/kinship/kinshipOperations/kinshipOperationsData';
const { createMessage } = useMessage();
......@@ -57,7 +65,7 @@
});
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 300,
labelWidth: 460,
schemas: clearFormSchema,
showActionButtonGroup: false,
actionColOptions: {
......@@ -65,6 +73,16 @@
},
});
onMounted(() => {
setFieldsValue({
clearTime: '00:00:00',
retainDate: '1970-01-01',
retainDay: 7,
retainTime: 1,
errorData: '2',
});
});
function handleSave() {
createMessage.success('保存成功!');
}
......
<template>
<PageWrapper>
<Tabs v-model:activeKey="tabsKey">
<Tabs.TabPane key="1" tab="任务策略配置">
<div style="display: flex">
<div class="w-1/4">
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<div style="flex: 1">
<InputSearch placeholder="输入关键字搜索" style="width: 170px" />
<Select
placeholder="策略类型"
style="width: 150px; margin-left: 10px"
:options="typeOptions"
/>
<a-button type="link" @click="handleAdd"
><PlusOutlined style="color: #9396a4"
/></a-button>
</div>
</template>
<template #strategicName="{ text, record }">
<div @click="handleRow(record)" class="hover1">
{{ text }}
</div>
</template>
<template #strategicType="{ text, record }">
<div class="flex justify-between gap-10px">
<div class="hover1 flex-1" @click="handleRow(record)">
<PageWrapper dense>
<template #footer>
<Tabs v-model:activeKey="tabsKey">
<Tabs.TabPane key="1" tab="任务策略配置">
<div style="display: flex">
<div class="w-1/3 tree-height">
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<div style="flex: 1">
<InputSearch placeholder="输入关键字搜索" style="width: 170px" />
<Select
placeholder="策略类型"
style="width: 150px; margin-left: 10px"
:options="typeOptions"
/>
<a-button type="link" @click="handleAdd"
><PlusOutlined style="color: #9396a4"
/></a-button>
</div>
</template>
<template #strategicName="{ text, record }">
<div @click="handleRow(record)" class="hover1">
{{ text }}
</div>
<DeleteOutlined
v-if="record.strategicId > 106"
class="hover1"
</template>
<template #strategicType="{ text, record }">
<div class="flex justify-between gap-10px">
<div class="hover1 flex-1" @click="handleRow(record)">
{{ text }}
</div>
<DeleteOutlined
v-if="record.strategicId > 106"
class="hover1"
@click="handleDelete"
/>
</div>
</template>
</BasicTable>
</div>
<div class="w-2/3">
<div
v-if="titleType !== null || isAdd"
style="display: flex; justify-content: space-between"
>
<div style="font-size: 16px; font-weight: 650; margin: 0 0 20px 20px">
{{ titleName }}
</div>
<div>
<a-button
v-if="!isAdd && titleId > 106"
type="primary"
@click="handleDelete"
/>
style="margin-right: 10px"
>删除</a-button
>
<a-button type="primary" @click="handleSubmit">保存</a-button>
</div>
</template>
</BasicTable>
</div>
<div class="w-3/4">
<div
v-if="titleType !== null || isAdd"
style="display: flex; justify-content: space-between"
>
<div style="font-size: 16px; font-weight: 650; margin: 0 0 20px 20px">
{{ titleName }}
</div>
<div>
<a-button
v-if="!isAdd && titleId > 106"
type="primary"
@click="handleDelete"
style="margin-right: 10px"
>删除</a-button
>
<a-button type="primary" @click="handleSubmit">保存</a-button>
<div v-if="isAdd">
<BasicForm @register="registerAdd" />
</div>
</div>
<div v-if="isAdd">
<BasicForm @register="registerAdd" />
</div>
<BasicForm v-show="titleType !== null" @register="registerForm">
<template #strategicType="{ field, model }">
<div v-if="model.strategicType === 'DB-DB源端DDL处理策略'">
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="当前DDL自动变更仅支持源端和目标端数据源类型相同,且未配置库/表/字段映射的场景。并且自动变更不经过审批流程,对于目标端数据结构、数据传输等方面存在影响,请谨慎选择。"
/>
</div>
<div v-if="model.strategicType === 'DB-Kafka源端DDL处理策略'">
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:源端表对象进行DDL,任务应对策略配置。"
/>
</div>
<div
v-if="model.strategicType === '系统异常策略'"
v-show="model.strategicType === '系统异常策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin: 20px 0"
type="info"
showIcon
message="含义:服务级别的系统异常的应对措施预览,部分异常支持自定义配置。"
/>
<SystemStrategic />
</div>
<div
v-if="model.strategicType === '数据异常策略'"
v-show="model.strategicType === '数据异常策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:实时任务目标端进行数据写入、数据转换等出现数据异常是的任务处理策略。"
/>
<Alert
style="margin: 20px 0"
type="info"
showIcon
message="所有捕获的异常数据均会记录在任务运维的异常数据详情中"
/>
<ErrorStrategic />
</div>
<div
v-if="model.strategicType === '一致性检查策略'"
v-show="model.strategicType === '一致性检查策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:实时任务数据一致性功能的采集时间间隔设定。"
/>
</div>
<div
v-if="model.strategicType === '数据积压策略'"
v-show="model.strategicType === '数据积压策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:有效数据进入任务对应的Topic后,任务中任意Topic的数据积压情况的策略定义"
/>
<div style="margin-top: 20px">
<span>当数据偏差超过</span
><Input style="width: 200px" v-model.value="model.strategicWarn" /><span
>条时,进行告警处理</span
>
<BasicForm v-show="titleType !== null" @register="registerForm">
<template #strategicType="{ field, model }">
<div v-if="model.strategicType === 'DB-DB源端DDL处理策略'">
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="当前DDL自动变更仅支持源端和目标端数据源类型相同,且未配置库/表/字段映射的场景。并且自动变更不经过审批流程,对于目标端数据结构、数据传输等方面存在影响,请谨慎选择。"
/>
</div>
<div style="margin-top: 20px">
<span>当数据偏差超过</span
><Input style="width: 200px" v-model.value="model.strategicStop" /><span
>条时,暂停源端读取任务</span
>
<div v-if="model.strategicType === 'DB-Kafka源端DDL处理策略'">
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:源端表对象进行DDL,任务应对策略配置。"
/>
</div>
<div
v-if="model.strategicType === '系统异常策略'"
v-show="model.strategicType === '系统异常策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin: 20px 0"
type="info"
showIcon
message="含义:服务级别的系统异常的应对措施预览,部分异常支持自定义配置。"
/>
<SystemStrategic />
</div>
<div
v-if="model.strategicType === '数据异常策略'"
v-show="model.strategicType === '数据异常策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:实时任务目标端进行数据写入、数据转换等出现数据异常是的任务处理策略。"
/>
<Alert
style="margin: 20px 0"
type="info"
showIcon
message="所有捕获的异常数据均会记录在任务运维的异常数据详情中"
/>
<ErrorStrategic />
</div>
<div
v-if="model.strategicType === '一致性检查策略'"
v-show="model.strategicType === '一致性检查策略'"
>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:实时任务数据一致性功能的采集时间间隔设定。"
/>
</div>
</div>
<div
v-if="model.strategicType === null || model.strategicType === undefined"
v-show="model.strategicType === null || model.strategicType === undefined"
>
<Select v-model:value="model[field]" :options="typeOptions" />
</div>
</template>
<template #checkSpan="{ field, model }">
<div style="display: flex">
<div
style="width: 150px; text-align: right; padding-right: 6px; line-height: 30px"
>检查间隔</div
v-if="model.strategicType === '数据积压策略'"
v-show="model.strategicType === '数据积压策略'"
>
<div>
<div style="display: flex">
<InputNumber
style="width: 180px"
v-model:value="model[field]"
:min="1"
:step="1"
/>
<span style="line-height: 30px; margin-left: 5px">分钟</span>
<Select v-model:value="model[field]" :options="typeOptions" />
<Alert
style="margin-top: 20px"
type="info"
showIcon
message="含义:有效数据进入任务对应的Topic后,任务中任意Topic的数据积压情况的策略定义"
/>
<div style="margin-top: 20px">
<span>当数据偏差超过</span
><Input style="width: 200px" v-model:value="strategicWarn" /><span
>条时,进行告警处理</span
>
</div>
<div style="color: #b1b7cc">
检查间隔不建议过小,推荐5分钟、10分钟等可被整除的检查间隔,不可以超过60分钟。
<div style="margin-top: 20px">
<span>当数据偏差超过</span
><Input style="width: 200px" v-model:value="strategicStop" /><span
>条时,暂停源端读取任务</span
>
</div>
</div>
</div>
</template>
</BasicForm>
<div
v-if="model.strategicType === null || model.strategicType === undefined"
v-show="model.strategicType === null || model.strategicType === undefined"
>
<Select v-model:value="model[field]" :options="typeOptions" />
</div>
</template>
<template #checkSpan="{ field, model }">
<div style="display: flex">
<div
style="width: 150px; text-align: right; padding-right: 6px; line-height: 30px"
>检查间隔</div
>
<div>
<div style="display: flex">
<InputNumber
style="width: 180px"
v-model:value="model[field]"
:min="1"
:step="1"
/>
<span style="line-height: 30px; margin-left: 5px">分钟</span>
</div>
<div style="color: #b1b7cc">
检查间隔不建议过小,推荐5分钟、10分钟等可被整除的检查间隔,不可以超过60分钟。
</div>
</div>
</div>
</template>
</BasicForm>
</div>
</div>
</div>
</Tabs.TabPane>
<Tabs.TabPane key="2" tab="清理策略">
<ClearStrategic />
</Tabs.TabPane>
</Tabs>
</Tabs.TabPane>
<Tabs.TabPane key="2" tab="清理策略">
<ClearStrategic />
</Tabs.TabPane>
</Tabs>
</template>
<SaveModal @register="registerModal" :title-type="titleType" />
</PageWrapper>
......@@ -227,6 +229,8 @@
const tabsKey = ref('1');
const isAdd = ref(false);
const strategicWarn = ref(100000);
const strategicStop = ref(500000);
const typeOptions = [
{
......@@ -300,7 +304,6 @@
},
] = useTable({
title: '',
scroll: { y: 500 },
api: async (params) => {
console.log('params:', params);
const response = {
......@@ -430,4 +433,7 @@
::v-deep .ant-table-cell {
padding: 0;
}
.tree-height {
height: calc(100vh - 161px);
}
</style>
......@@ -79,7 +79,7 @@ export const dbFormSchema: FormSchema[] = [
field: 'strategicName',
label: '策略名称',
component: 'Input',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
required: true,
},
{
......@@ -89,13 +89,13 @@ export const dbFormSchema: FormSchema[] = [
componentProps: {
rows: 4,
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'strategicType',
label: '策略类型',
slot: 'strategicType',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'checkSpan',
......@@ -103,6 +103,7 @@ export const dbFormSchema: FormSchema[] = [
return model.strategicType === '一致性检查策略';
},
slot: 'checkSpan',
defaultValue: 5,
colProps: { lg: 24, md: 24 },
},
{
......@@ -140,7 +141,7 @@ export const dbFormSchema: FormSchema[] = [
},
],
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'deleteTable',
......@@ -149,6 +150,7 @@ export const dbFormSchema: FormSchema[] = [
return model.strategicType === 'DB-DB源端DDL处理策略';
},
component: 'RadioGroup',
defaultValue: '1',
componentProps: {
options: [
{
......@@ -166,6 +168,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'deleteField',
label: '字段删除',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -191,6 +194,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'addField',
label: '新增字段',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -212,6 +216,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'fieldUpdate',
label: '字段类型或精度变更',
defaultValue: '3',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -237,6 +242,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'addTable',
label: '新增数据表',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -262,6 +268,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'clearTable',
label: '清空表',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -287,6 +294,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'fieldRename',
label: '字段重命名',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -308,6 +316,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'renameTable',
label: '表重命名',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-DB源端DDL处理策略';
},
......@@ -329,6 +338,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'deleteTable',
label: '数据表删除',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -346,6 +356,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'deleteField',
label: '字段删除',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -363,6 +374,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'addField',
label: '新增字段',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -378,8 +390,9 @@ export const dbFormSchema: FormSchema[] = [
colProps: { lg: 24, md: 24 },
},
{
field: 'fieldUpdate',
field: 'kafafieldUpdate',
label: '字段类型或精度变更',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -397,6 +410,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'addTable',
label: '新增数据表',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -414,6 +428,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'clearTable',
label: '清空表',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -431,6 +446,7 @@ export const dbFormSchema: FormSchema[] = [
{
field: 'fieldRename',
label: '字段重命名',
defaultValue: '1',
show: ({ model }) => {
return model.strategicType === 'DB-Kafka源端DDL处理策略';
},
......@@ -452,7 +468,7 @@ export const kafkaFormSchema: FormSchema[] = [
field: 'strategicName',
label: '策略名称',
component: 'Input',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
required: true,
},
{
......@@ -462,13 +478,13 @@ export const kafkaFormSchema: FormSchema[] = [
componentProps: {
rows: 4,
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'strategicType',
label: '策略类型',
slot: 'strategicType',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'deleteTable',
......@@ -671,7 +687,7 @@ export const backlogFormSchema: FormSchema[] = [
field: 'strategicName',
label: '策略名称',
component: 'Input',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
required: true,
},
{
......@@ -681,7 +697,7 @@ export const backlogFormSchema: FormSchema[] = [
componentProps: {
rows: 4,
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'strategicType',
......@@ -694,16 +710,15 @@ export const backlogFormSchema: FormSchema[] = [
export const clearFormSchema: FormSchema[] = [
{
field: 'retainTime',
label: '执行记录保留时间*',
label: '执行记录保留时间',
slot: 'retainTime',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
required: true,
},
{
field: 'clearTime',
label: '清理时间配置',
component: 'TimePicker',
colProps: { lg: 13, md: 13 },
slot: 'clearTime',
},
{
field: 'errorData',
......@@ -723,6 +738,14 @@ export const clearFormSchema: FormSchema[] = [
},
colProps: { lg: 24, md: 24 },
},
{
field: 'retainDate',
show: false,
},
{
field: 'retainDay',
show: false,
},
];
export const addFormSchema: FormSchema[] = [
......@@ -730,7 +753,7 @@ export const addFormSchema: FormSchema[] = [
field: 'strategicName',
label: '策略名称',
component: 'Input',
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
required: true,
},
{
......@@ -740,7 +763,7 @@ export const addFormSchema: FormSchema[] = [
componentProps: {
rows: 4,
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
{
field: 'strategicType',
......@@ -757,6 +780,6 @@ export const addFormSchema: FormSchema[] = [
{ label: '—致性检查策略', value: '一致性检查策略' },
],
},
colProps: { lg: 13, md: 13 },
colProps: { lg: 24, md: 24 },
},
];
......@@ -37,29 +37,29 @@ export const systemData: any[] = [
{
eventDetail: '源端解析异常',
eventHandle: '任务暂停',
isStop: false,
isStop: 3,
},
{
eventDetail: 'Kafka异常',
eventHandle: '',
isStop: true,
eventHandle: '120',
isStop: 1,
},
{
eventDetail: '内部异常',
eventHandle: '任务暂停',
isStop: false,
isStop: 3,
},
{
eventDetail: '数据源连接异常',
eventHandle: '',
isStop: true,
eventHandle: '3',
isStop: 2,
},
];
export const errorData: any[] = [
{
eventDetail: '数据异常',
eventHandle: '',
eventHandle: '1',
},
];
......
<template>
<BasicTable @register="registerTable">
<template #eventHandle="{ text, record }">
<div v-if="record.isStop">
<span>若连接超时,自动重试</span><Input v-model:value="record.eventHandle" /><span
<div v-if="record.isStop === 1">
<span>若连接超时,自动重试</span><Input style="width: 200px" v-model:value="kafka" /><span
>分钟,其它场景均任务暂停</span
>
</div>
<div v-else>任务暂停</div>
<div v-if="record.isStop === 2">
<span>若连接超时,自动重试</span><Input style="width: 200px" v-model:value="dataError" /><span
>分钟,其它场景均任务暂停</span
>
</div>
<div v-if="record.isStop === 3">任务暂停</div>
</template>
</BasicTable>
</template>
<script lang="ts" setup>
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { Input } from 'ant-design-vue';
import { BasicTableProps, useTable } from '@/components/Table';
import { systemData } from './strategicData';
import { systemColumns } from './strategic.data';
import { ref } from 'vue';
const kafka = ref(120);
const dataError = ref(3);
const [
registerTable,
......@@ -31,7 +41,6 @@
clearSelectedRowKeys,
},
] = useTable({
scroll: { y: 200 },
api: async (params) => {
console.log('params:', params);
const response = {
......
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