fix: 告警中心组件替换及自测

This commit is contained in:
leiqiaochu 2023-03-14 13:39:49 +08:00
parent 351e4f35ab
commit a8fd7232eb
12 changed files with 172 additions and 170 deletions

View File

@ -1,27 +1,27 @@
<template> <template>
<div> <div>
<a-form layout="vertical" :rules="rule" :model="form" ref="formRef"> <j-form layout="vertical" :rules="rule" :model="form" ref="formRef">
<a-row :gutter="24"> <j-row :gutter="24">
<a-col :span="12"> <j-col :span="12">
<a-form-item label="名称" name="name"> <j-form-item label="名称" name="name">
<a-input <j-input
placeholder="请输入名称" placeholder="请输入名称"
v-model:value="form.name" v-model:value="form.name"
></a-input> </a-form-item ></j-input> </j-form-item
></a-col> ></j-col>
<a-col :span="12"> <j-col :span="12">
<a-form-item label="类型" name="targetType"> <j-form-item label="类型" name="targetType">
<a-select <j-select
:options="options" :options="options"
v-model:value="form.targetType" v-model:value="form.targetType"
:disabled="selectDisable" :disabled="selectDisable"
></a-select> ></j-select>
</a-form-item> </j-form-item>
</a-col> </j-col>
</a-row> </j-row>
<a-form-item label="级别" name="level"> <j-form-item label="级别" name="level">
<a-radio-group v-model:value="form.level"> <j-radio-group v-model:value="form.level">
<a-radio-button <j-radio-button
v-for="(item, index) in levelOption" v-for="(item, index) in levelOption"
:key="index" :key="index"
:value="item.value" :value="item.value"
@ -40,14 +40,14 @@
alt="" alt=""
/>{{ item.label }} />{{ item.label }}
</div> </div>
</a-radio-button> </j-radio-button>
</a-radio-group> </j-radio-group>
</a-form-item> </j-form-item>
<a-form-item label="说明" name="description"> <j-form-item label="说明" name="description">
<a-textarea v-model:value="form.description"></a-textarea> <j-textarea v-model:value="form.description"></j-textarea>
</a-form-item> </j-form-item>
<PermissionButton type="primary" @click="handleSave" :hasPermission="['rule-engine/Alarm/Configuration:add','rule-engine/Alarm/Configuration:update']">保存</PermissionButton> <PermissionButton type="primary" @click="handleSave" :hasPermission="['rule-engine/Alarm/Configuration:add','rule-engine/Alarm/Configuration:update']">保存</PermissionButton>
</a-form> </j-form>
</div> </div>
</template> </template>
@ -178,7 +178,7 @@ const handleSave = async () => {
const res = await save(form); const res = await save(form);
loading.value = false; loading.value = false;
if (res.status === 200) { if (res.status === 200) {
message.success('操作成功'); message.success('操作成功,请配置关联的场景联动');
menuStory.jumpPage( menuStory.jumpPage(
'rule-engine/Alarm/Configuration/Save', 'rule-engine/Alarm/Configuration/Save',
{}, {},

View File

@ -1,5 +1,5 @@
<template> <template>
<a-modal <j-modal
visible visible
title="新增" title="新增"
okText="确定" okText="确定"
@ -8,7 +8,7 @@
@cancel="closeModal" @cancel="closeModal"
@ok="saveCorrelation" @ok="saveCorrelation"
> >
<Search :columns="columns" @search="handleSearch"></Search> <pro-search :columns="columns" @search="handleSearch"/>
<div style="height: 500px; overflow-y: auto"> <div style="height: 500px; overflow-y: auto">
<JProTable <JProTable
model="CARD" model="CARD"
@ -78,7 +78,7 @@
</template> </template>
</JProTable> </JProTable>
</div> </div>
</a-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -213,7 +213,7 @@ const saveCorrelation = async () => {
const list = _selectedRowKeys.value.map((item: any) => { const list = _selectedRowKeys.value.map((item: any) => {
return { return {
alarmId: props.id, alarmId: props.id,
releId: item, ruleId: item,
}; };
}); });
const res = await bindScene([...list]); const res = await bindScene([...list]);

View File

@ -10,12 +10,12 @@
ref="actionRef" ref="actionRef"
> >
<template #headerTitle> <template #headerTitle>
<a-space> <j-space>
<PermissionButton type="primary" @click="showModal" hasPermission="rule-engine/Alarm/Configuration:add"> <PermissionButton type="primary" @click="showModal" hasPermission="rule-engine/Alarm/Configuration:add">
<template #icon><AIcon type="PlusOutlined" /></template> <template #icon><AIcon type="PlusOutlined" /></template>
新增 新增
</PermissionButton> </PermissionButton>
</a-space> </j-space>
</template> </template>
<template #card="slotProps"> <template #card="slotProps">
<SceneCard <SceneCard

View File

@ -1,19 +1,19 @@
<template> <template>
<page-container> <page-container>
<j-card> <j-card>
<j-tabs :activeKey="activeKey" @change="changeTabs"> <j-tabs :activeKey="activeKey" @change="changeTabs">
<j-tab-pane key="1" tab="基础配置"> <j-tab-pane key="1" tab="基础配置">
<Base/> <Base />
</j-tab-pane> </j-tab-pane>
<j-tab-pane key="2" tab="关联场景联动"> <j-tab-pane key="2" tab="关联场景联动">
<Scene></Scene> <Scene></Scene>
</j-tab-pane> </j-tab-pane>
<j-tab-pane key="3" tab="告警记录"> <j-tab-pane key="3" tab="告警记录">
<Log/> <Log v-if="activeKey === '3'" />
</j-tab-pane> </j-tab-pane>
</j-tabs> </j-tabs>
</j-card> </j-card>
</page-container> </page-container>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -23,13 +23,13 @@ import Log from './Log/indev.vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
const route = useRoute(); const route = useRoute();
const changeTabs = (e:any) =>{ const changeTabs = (e: any) => {
if(route.query?.id){ if (route.query?.id) {
activeKey.value = e; activeKey.value = e;
}else{ } else {
message.error('请先保存基础配置'); message.error('请先保存基础配置');
} }
} };
const activeKey = ref('1'); const activeKey = ref('1');
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -56,8 +56,8 @@
{{ slotProps.name }} {{ slotProps.name }}
</span> </span>
</Ellipsis> </Ellipsis>
<a-row> <j-row>
<a-col :span="12"> <j-col :span="12">
<div class="content-des-title"> <div class="content-des-title">
关联场景联动 关联场景联动
</div> </div>
@ -66,8 +66,8 @@
{{ (slotProps?.scene || []).map((item: any) => item?.name).join(',') || '' }} {{ (slotProps?.scene || []).map((item: any) => item?.name).join(',') || '' }}
</div></Ellipsis </div></Ellipsis
> >
</a-col> </j-col>
<a-col :span="12"> <j-col :span="12">
<div class="content-des-title"> <div class="content-des-title">
告警级别 告警级别
</div> </div>
@ -75,8 +75,8 @@
{{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title || {{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
slotProps.level }} slotProps.level }}
</div> </div>
</a-col> </j-col>
</a-row> </j-row>
</template> </template>
<template #actions="item"> <template #actions="item">
<PermissionButton <PermissionButton
@ -109,7 +109,7 @@
<span>{{ map[slotProps.targetType] }}</span> <span>{{ map[slotProps.targetType] }}</span>
</template> </template>
<template #level="slotProps"> <template #level="slotProps">
<a-tooltip <j-tooltip
placement="topLeft" placement="topLeft"
:title="(Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title || :title="(Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
slotProps.level" slotProps.level"
@ -118,7 +118,7 @@
{{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title || {{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
slotProps.level }} slotProps.level }}
</div> </div>
</a-tooltip> </j-tooltip>
</template> </template>
<template #sceneId="slotProps"> <template #sceneId="slotProps">
<span <span
@ -126,7 +126,7 @@
> >
</template> </template>
<template #state="slotProps"> <template #state="slotProps">
<a-badge <j-badge
:text=" :text="
slotProps.state?.value === 'enabled' slotProps.state?.value === 'enabled'
? '正常' ? '正常'
@ -140,7 +140,7 @@
/> />
</template> </template>
<template #action="slotProps"> <template #action="slotProps">
<a-space :size="16"> <j-space :size="16">
<template <template
v-for="i in getActions(slotProps, 'table')" v-for="i in getActions(slotProps, 'table')"
:key="i.key" :key="i.key"
@ -168,7 +168,7 @@
/></template> /></template>
</PermissionButton> </PermissionButton>
</template> </template>
</a-space> </j-space>
</template> </template>
</JProTable> </JProTable>
</div> </div>

View File

@ -1,10 +1,10 @@
<template> <template>
<page-container> <page-container>
<Search <pro-search
:columns="columns" :columns="columns"
target="alarm-log-detail" target="alarm-log-detail"
@search="handleSearch" @search="handleSearch"
></Search> />
<JProTable <JProTable
:columns="columns" :columns="columns"
model="TABLE" model="TABLE"
@ -19,7 +19,7 @@
moment(slotProps.alarmTime).format('YYYY-MM-DD HH:mm:ss') moment(slotProps.alarmTime).format('YYYY-MM-DD HH:mm:ss')
}}</template> }}</template>
<template #action="slotProps"> <template #action="slotProps">
<a-space <j-space
><template ><template
v-for="i in getActions(slotProps, 'table')" v-for="i in getActions(slotProps, 'table')"
:key="i.key" :key="i.key"
@ -37,7 +37,7 @@
<template #icon><AIcon :type="i.icon"/></template> <template #icon><AIcon :type="i.icon"/></template>
</PermissionButton> </PermissionButton>
</template> </template>
</a-space> </j-space>
</template> </template>
</JProTable> </JProTable>
<Info v-if="visiable" :data="current" @close="close"/> <Info v-if="visiable" :data="current" @close="close"/>

View File

@ -1,16 +1,16 @@
<template> <template>
<a-modal visible title="详情" okText="确定" cancelText="取消" :width="1000" @ok="closeModal" @cancel="closeModal"> <j-modal visible title="详情" okText="确定" cancelText="取消" :width="1000" @ok="closeModal" @cancel="closeModal">
<a-descriptions bordered :column="2"> <j-descriptions bordered :column="2">
<a-descriptions-item v-if="props.data.targetType==='device'" label="告警设备" :span="1">{{props.data?.targetName || ''}}</a-descriptions-item> <j-descriptions-item v-if="props.data.targetType==='device'" label="告警设备" :span="1">{{props.data?.targetName || ''}}</j-descriptions-item>
<a-descriptions-item v-if="props.data.targetType==='device'" label="设备ID" :span="1">{{props.data?.targetId || ''}}</a-descriptions-item> <j-descriptions-item v-if="props.data.targetType==='device'" label="设备ID" :span="1">{{props.data?.targetId || ''}}</j-descriptions-item>
<a-descriptions-item label="告警名称" :span="1">{{ <j-descriptions-item label="告警名称" :span="1">{{
props.data?.alarmConfigName props.data?.alarmConfigName
}}</a-descriptions-item> }}</j-descriptions-item>
<a-descriptions-item label="告警时间" :span="1">{{ <j-descriptions-item label="告警时间" :span="1">{{
moment(data?.alarmTime).format('YYYY-MM-DD HH:mm:ss') moment(data?.alarmTime).format('YYYY-MM-DD HH:mm:ss')
}}</a-descriptions-item> }}</j-descriptions-item>
<a-descriptions-item label="告警级别" :span="1"> <j-descriptions-item label="告警级别" :span="1">
<a-tooltip <j-tooltip
placement="topLeft" placement="topLeft"
:title="(Store.get('default-level') || []).find((item: any) => item?.level === data?.level) :title="(Store.get('default-level') || []).find((item: any) => item?.level === data?.level)
?.title || props.data?.level" ?.title || props.data?.level"
@ -21,10 +21,10 @@
?.title || props.data?.level}} ?.title || props.data?.level}}
</span> </span>
</Ellipsis> </Ellipsis>
</a-tooltip> </j-tooltip>
</a-descriptions-item> </j-descriptions-item>
<a-descriptions-item label="告警说明" :span="1" <j-descriptions-item label="告警说明" :span="1"
><a-tooltip ><j-tooltip
placement="topLeft" placement="topLeft"
:title="data?.description || ''" :title="data?.description || ''"
> >
@ -33,14 +33,14 @@
{{ data?.description || '' }} {{ data?.description || '' }}
</span> </Ellipsis </span> </Ellipsis
> >
</a-tooltip></a-descriptions-item </j-tooltip></j-descriptions-item
> >
<a-descriptions-item <j-descriptions-item
label="告警流水" label="告警流水"
:span="2" :span="2"
><div style="max-height: 500px; overflow-y: auto;"><JsonViewer :value="JSON.parse(data?.alarmInfo || '{}')" :expand-depth="5"></JsonViewer></div></a-descriptions-item> ><div style="max-height: 500px; overflow-y: auto;"><JsonViewer :value="JSON.parse(data?.alarmInfo || '{}')" :expand-depth="5"></JsonViewer></div></j-descriptions-item>
</a-descriptions> </j-descriptions>
</a-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -1,5 +1,5 @@
<template> <template>
<a-modal <j-modal
title="告警处理" title="告警处理"
okText="确定" okText="确定"
cancelText="取消" cancelText="取消"
@ -9,18 +9,18 @@
destroyOnClose destroyOnClose
:confirmLoading="loading" :confirmLoading="loading"
> >
<a-form :rules="rules" layout="vertical" ref="formRef" :model="form"> <j-form :rules="rules" layout="vertical" ref="formRef" :model="form">
<a-form-item label="处理结果" name="describe"> <j-form-item label="处理结果" name="describe">
<a-textarea <j-textarea
:rows="8" :rows="8"
:maxlength="200" :maxlength="200"
showCount showCount
placeholder="请输入处理结果" placeholder="请输入处理结果"
v-model:value="form.describe" v-model:value="form.describe"
></a-textarea> ></j-textarea>
</a-form-item> </j-form-item>
</a-form> </j-form>
</a-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -64,6 +64,7 @@ const handleSave = () => {
}); });
if (res.status === 200) { if (res.status === 200) {
onlyMessage('操作成功!'); onlyMessage('操作成功!');
emit('closeSolve');
} else { } else {
onlyMessage('操作失败!', 'error'); onlyMessage('操作失败!', 'error');
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<a-modal <j-modal
visible visible
title="处理记录" title="处理记录"
:width="1200" :width="1200"
@ -8,11 +8,11 @@
@ok="clsoeModal" @ok="clsoeModal"
@cancel="clsoeModal" @cancel="clsoeModal"
> >
<Search <pro-search
:columns="columns" :columns="columns"
target="bind-channel" target="bind-channel"
@search="handleSearch" @search="handleSearch"
></Search> />
<JProTable <JProTable
model="TABLE" model="TABLE"
:columns="columns" :columns="columns"
@ -48,7 +48,7 @@
</span> </span>
</template> </template>
</JProTable> </JProTable>
</a-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -1,29 +1,29 @@
<template> <template>
<div class="alarm-log-card"> <div class="alarm-log-card">
<Search <pro-search
:columns="columns" :columns="columns"
target="alarm-log" target="alarm-log"
v-if="['all', 'detail'].includes(props.type)" v-if="['all', 'detail'].includes(props.type)"
@search="search" @search="search"
></Search> />
<Search <pro-search
:columns="produtCol" :columns="produtCol"
target="alarm-log" target="alarm-log"
v-if="['product', 'other'].includes(props.type)" v-if="['product', 'other'].includes(props.type)"
@search="search" @search="search"
></Search> />
<Search <pro-search
:columns="deviceCol" :columns="deviceCol"
target="alarm-log" target="alarm-log"
v-if="props.type === 'device'" v-if="props.type === 'device'"
@search="search" @search="search"
></Search> />
<Search <pro-search
:columns="orgCol" :columns="orgCol"
target="alarm-log" target="alarm-log"
v-if="props.type === 'org'" v-if="props.type === 'org'"
@search="search" @search="search"
></Search> />
<JProTable <JProTable
:columns="columns" :columns="columns"
:request="handleSearch" :request="handleSearch"
@ -31,6 +31,7 @@
:gridColumns="[1, 1, 2]" :gridColumns="[1, 1, 2]"
:gridColumn="2" :gridColumn="2"
model="CARD" model="CARD"
ref="tableRef"
> >
<template #card="slotProps"> <template #card="slotProps">
<CardBox <CardBox
@ -52,8 +53,8 @@
{{ slotProps.alarmName }} {{ slotProps.alarmName }}
</span> </span>
</Ellipsis> </Ellipsis>
<a-row :gutter="24"> <j-row :gutter="24">
<a-col :span="8"> <j-col :span="8">
<div class="content-des-title"> <div class="content-des-title">
{{ titleMap.get(slotProps.targetType) }} {{ titleMap.get(slotProps.targetType) }}
</div> </div>
@ -62,8 +63,8 @@
{{ slotProps?.targetName }} {{ slotProps?.targetName }}
</div></Ellipsis </div></Ellipsis
> >
</a-col> </j-col>
<a-col :span="8"> <j-col :span="8">
<div class="content-des-title"> <div class="content-des-title">
最近告警时间 最近告警时间
</div> </div>
@ -76,17 +77,17 @@
}} }}
</div></Ellipsis </div></Ellipsis
> >
</a-col> </j-col>
<a-col :span="8"> <j-col :span="8">
<div class="content-des-title">状态</div> <div class="content-des-title">状态</div>
<a-badge <j-badge
:status=" :status="
slotProps.state.value === 'warning' slotProps.state.value === 'warning'
? 'error' ? 'error'
: 'default' : 'default'
" "
> >
</a-badge </j-badge
><span ><span
:style=" :style="
slotProps.state.value === 'warning' slotProps.state.value === 'warning'
@ -96,8 +97,8 @@
> >
{{ slotProps.state.text }} {{ slotProps.state.text }}
</span> </span>
</a-col> </j-col>
</a-row> </j-row>
</template> </template>
<template #actions="item"> <template #actions="item">
<PermissionButton <PermissionButton
@ -105,7 +106,6 @@
item.key === 'solve' && item.key === 'solve' &&
slotProps.state.value === 'normal' slotProps.state.value === 'normal'
" "
:popConfirm="item.popConfirm"
:tooltip="{ :tooltip="{
...item.tooltip, ...item.tooltip,
}" }"
@ -152,11 +152,11 @@ import { Store } from 'jetlinks-store';
import moment from 'moment'; import moment from 'moment';
import type { ActionsType } from '@/components/Table'; import type { ActionsType } from '@/components/Table';
import SolveComponent from '../SolveComponent/index.vue'; import SolveComponent from '../SolveComponent/index.vue';
import SolveLog from '../SolveLog/index.vue' import SolveLog from '../SolveLog/index.vue';
import { useMenuStore } from '@/store/menu'; import { useMenuStore } from '@/store/menu';
import { usePermissionStore } from '@/store/permission'; import { usePermissionStore } from '@/store/permission';
const menuStory = useMenuStore(); const menuStory = useMenuStore();
const tableRef = ref();
const alarmStore = useAlarmStore(); const alarmStore = useAlarmStore();
const { data } = storeToRefs(alarmStore); const { data } = storeToRefs(alarmStore);
const getDefaulitLevel = () => { const getDefaulitLevel = () => {
@ -339,7 +339,7 @@ watchEffect(() => {
}, },
]; ];
} }
if(props.type === 'all'){ if (props.type === 'all') {
params.value.terms = []; params.value.terms = [];
} }
}); });
@ -347,24 +347,20 @@ watchEffect(() => {
const search = (data: any) => { const search = (data: any) => {
params.value.terms = [...data?.terms]; params.value.terms = [...data?.terms];
if (props.type !== 'all' && !props.id) { if (props.type !== 'all' && !props.id) {
params.value.terms.push( params.value.terms.push({
{ termType: 'eq',
termType: 'eq', column: 'targetType',
column: 'targetType', value: props.type,
value: props.type, type: 'and',
type: 'and', });
},
);
} }
if (props.id) { if (props.id) {
params.value.terms.push ( params.value.terms.push({
{ termType: 'eq',
termType: 'eq', column: 'alarmConfigId',
column: 'alarmConfigId', value: props.id,
value: props.id, type: 'and',
type: 'and', });
},
);
} }
}; };
@ -381,17 +377,19 @@ const getActions = (
title: '告警处理', title: '告警处理',
}, },
icon: 'ToolOutlined', icon: 'ToolOutlined',
onClick: () =>{ onClick: () => {
data.value.current = currentData; data.value.current = currentData;
data.value.solveVisible = true; data.value.solveVisible = true;
}, },
popConfirm:{ // popConfirm: {
title: !usePermissionStore().hasPermission('rule-engine/Alarm/Log:action') // title: !usePermissionStore().hasPermission(
? '暂无权限,请联系管理员' // 'rule-engine/Alarm/Log:action',
: data.state?.value === 'normal' // )
? '无告警' // ? ''
: '' // : data.state?.value === 'normal'
} // ? ''
// : '',
// },
}, },
{ {
key: 'log', key: 'log',
@ -400,9 +398,11 @@ const getActions = (
title: '告警日志', title: '告警日志',
}, },
icon: 'FileOutlined', icon: 'FileOutlined',
onClick: () =>{ onClick: () => {
menuStory.jumpPage(`rule-engine/Alarm/Log/Detail`,{id:currentData.id}); menuStory.jumpPage(`rule-engine/Alarm/Log/Detail`, {
} id: currentData.id,
});
},
}, },
{ {
key: 'detail', key: 'detail',
@ -411,10 +411,10 @@ const getActions = (
title: '处理记录', title: '处理记录',
}, },
icon: 'FileTextOutlined', icon: 'FileTextOutlined',
onClick:() =>{ onClick: () => {
data.value.current = currentData; data.value.current = currentData;
data.value.logVisible = true; data.value.logVisible = true;
} },
}, },
]; ];
return actions; return actions;
@ -422,15 +422,16 @@ const getActions = (
/** /**
* 关闭告警日志 * 关闭告警日志
*/ */
const closeSolve = () =>{ const closeSolve = () => {
data.value.solveVisible = false; data.value.solveVisible = false;
} tableRef.value.reload(params.value);
};
/** /**
* 关闭处理记录 * 关闭处理记录
*/ */
const closeLog = () =>{ const closeLog = () => {
data.value.logVisible = false; data.value.logVisible = false;
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<a-modal <j-modal
:maskClosable="false" :maskClosable="false"
width="650px" width="650px"
destroyOnClose destroyOnClose
@ -12,30 +12,30 @@
:confirmLoading="loading" :confirmLoading="loading"
> >
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<a-form <j-form
:layout="'vertical'" :layout="'vertical'"
ref="formRef" ref="formRef"
:rules="rules" :rules="rules"
:model="modelRef" :model="modelRef"
> >
<a-form-item label="名称" name="name"> <j-form-item label="名称" name="name">
<a-input <j-input
v-model:value="modelRef.name" v-model:value="modelRef.name"
placeholder="请输入名称" placeholder="请输入名称"
/> />
</a-form-item> </j-form-item>
<a-form-item label="说明" name="describe"> <j-form-item label="说明" name="describe">
<a-textarea <j-textarea
v-model:value="modelRef.description" v-model:value="modelRef.description"
placeholder="请输入说明" placeholder="请输入说明"
showCount showCount
:maxlength="200" :maxlength="200"
:rows="4" :rows="4"
/> />
</a-form-item> </j-form-item>
</a-form> </j-form>
</div> </div>
</a-modal> </j-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -1,11 +1,11 @@
<template> <template>
<page-container> <page-container>
<div> <div>
<Search <pro-search
:columns="query.columns" :columns="query.columns"
target="device-instance" target="device-instance"
@search="handleSearch" @search="handleSearch"
></Search> />
<JProTable <JProTable
:columns="columns" :columns="columns"
:request="queryList" :request="queryList"
@ -53,15 +53,15 @@
{{ slotProps.name }} {{ slotProps.name }}
</span> </span>
</Ellipsis> </Ellipsis>
<a-row> <j-row>
<a-col :span="12"> <j-col :span="12">
<Ellipsis> <Ellipsis>
<div> <div>
{{ slotProps.description }} {{ slotProps.description }}
</div> </div>
</Ellipsis> </Ellipsis>
</a-col> </j-col>
</a-row> </j-row>
</template> </template>
<template #actions="item"> <template #actions="item">
<PermissionButton <PermissionButton
@ -88,7 +88,7 @@
</CardBox> </CardBox>
</template> </template>
<template #state="slotProps"> <template #state="slotProps">
<a-badge <j-badge
:text=" :text="
slotProps.state?.value === 'started' slotProps.state?.value === 'started'
? '正常' ? '正常'
@ -102,7 +102,7 @@
/> />
</template> </template>
<template #action="slotProps"> <template #action="slotProps">
<a-space :size="16"> <j-space :size="16">
<template <template
v-for="i in getActions(slotProps, 'table')" v-for="i in getActions(slotProps, 'table')"
:key="i.key" :key="i.key"
@ -123,7 +123,7 @@
/></template> /></template>
</PermissionButton> </PermissionButton>
</template> </template>
</a-space> </j-space>
</template> </template>
</JProTable> </JProTable>
<!-- 新增编辑 --> <!-- 新增编辑 -->