fix: 告警中心组件替换及自测
This commit is contained in:
parent
351e4f35ab
commit
a8fd7232eb
|
@ -1,27 +1,27 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-form layout="vertical" :rules="rule" :model="form" ref="formRef">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="名称" name="name">
|
||||
<a-input
|
||||
<j-form layout="vertical" :rules="rule" :model="form" ref="formRef">
|
||||
<j-row :gutter="24">
|
||||
<j-col :span="12">
|
||||
<j-form-item label="名称" name="name">
|
||||
<j-input
|
||||
placeholder="请输入名称"
|
||||
v-model:value="form.name"
|
||||
></a-input> </a-form-item
|
||||
></a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="类型" name="targetType">
|
||||
<a-select
|
||||
></j-input> </j-form-item
|
||||
></j-col>
|
||||
<j-col :span="12">
|
||||
<j-form-item label="类型" name="targetType">
|
||||
<j-select
|
||||
:options="options"
|
||||
v-model:value="form.targetType"
|
||||
:disabled="selectDisable"
|
||||
></a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item label="级别" name="level">
|
||||
<a-radio-group v-model:value="form.level">
|
||||
<a-radio-button
|
||||
></j-select>
|
||||
</j-form-item>
|
||||
</j-col>
|
||||
</j-row>
|
||||
<j-form-item label="级别" name="level">
|
||||
<j-radio-group v-model:value="form.level">
|
||||
<j-radio-button
|
||||
v-for="(item, index) in levelOption"
|
||||
:key="index"
|
||||
:value="item.value"
|
||||
|
@ -40,14 +40,14 @@
|
|||
alt=""
|
||||
/>{{ item.label }}
|
||||
</div>
|
||||
</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="说明" name="description">
|
||||
<a-textarea v-model:value="form.description"></a-textarea>
|
||||
</a-form-item>
|
||||
</j-radio-button>
|
||||
</j-radio-group>
|
||||
</j-form-item>
|
||||
<j-form-item label="说明" name="description">
|
||||
<j-textarea v-model:value="form.description"></j-textarea>
|
||||
</j-form-item>
|
||||
<PermissionButton type="primary" @click="handleSave" :hasPermission="['rule-engine/Alarm/Configuration:add','rule-engine/Alarm/Configuration:update']">保存</PermissionButton>
|
||||
</a-form>
|
||||
</j-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -178,7 +178,7 @@ const handleSave = async () => {
|
|||
const res = await save(form);
|
||||
loading.value = false;
|
||||
if (res.status === 200) {
|
||||
message.success('操作成功');
|
||||
message.success('操作成功,请配置关联的场景联动');
|
||||
menuStory.jumpPage(
|
||||
'rule-engine/Alarm/Configuration/Save',
|
||||
{},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-modal
|
||||
<j-modal
|
||||
visible
|
||||
title="新增"
|
||||
okText="确定"
|
||||
|
@ -8,7 +8,7 @@
|
|||
@cancel="closeModal"
|
||||
@ok="saveCorrelation"
|
||||
>
|
||||
<Search :columns="columns" @search="handleSearch"></Search>
|
||||
<pro-search :columns="columns" @search="handleSearch"/>
|
||||
<div style="height: 500px; overflow-y: auto">
|
||||
<JProTable
|
||||
model="CARD"
|
||||
|
@ -78,7 +78,7 @@
|
|||
</template>
|
||||
</JProTable>
|
||||
</div>
|
||||
</a-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -213,7 +213,7 @@ const saveCorrelation = async () => {
|
|||
const list = _selectedRowKeys.value.map((item: any) => {
|
||||
return {
|
||||
alarmId: props.id,
|
||||
releId: item,
|
||||
ruleId: item,
|
||||
};
|
||||
});
|
||||
const res = await bindScene([...list]);
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
ref="actionRef"
|
||||
>
|
||||
<template #headerTitle>
|
||||
<a-space>
|
||||
<j-space>
|
||||
<PermissionButton type="primary" @click="showModal" hasPermission="rule-engine/Alarm/Configuration:add">
|
||||
<template #icon><AIcon type="PlusOutlined" /></template>
|
||||
新增
|
||||
</PermissionButton>
|
||||
</a-space>
|
||||
</j-space>
|
||||
</template>
|
||||
<template #card="slotProps">
|
||||
<SceneCard
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<j-card>
|
||||
<j-tabs :activeKey="activeKey" @change="changeTabs">
|
||||
<j-tab-pane key="1" tab="基础配置">
|
||||
<Base/>
|
||||
<Base />
|
||||
</j-tab-pane>
|
||||
<j-tab-pane key="2" tab="关联场景联动">
|
||||
<Scene></Scene>
|
||||
</j-tab-pane>
|
||||
<j-tab-pane key="3" tab="告警记录">
|
||||
<Log/>
|
||||
<Log v-if="activeKey === '3'" />
|
||||
</j-tab-pane>
|
||||
</j-tabs>
|
||||
</j-card>
|
||||
|
@ -23,13 +23,13 @@ import Log from './Log/indev.vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { message } from 'ant-design-vue';
|
||||
const route = useRoute();
|
||||
const changeTabs = (e:any) =>{
|
||||
if(route.query?.id){
|
||||
const changeTabs = (e: any) => {
|
||||
if (route.query?.id) {
|
||||
activeKey.value = e;
|
||||
}else{
|
||||
} else {
|
||||
message.error('请先保存基础配置');
|
||||
}
|
||||
}
|
||||
};
|
||||
const activeKey = ref('1');
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<j-row>
|
||||
<j-col :span="12">
|
||||
<div class="content-des-title">
|
||||
关联场景联动
|
||||
</div>
|
||||
|
@ -66,8 +66,8 @@
|
|||
{{ (slotProps?.scene || []).map((item: any) => item?.name).join(',') || '' }}
|
||||
</div></Ellipsis
|
||||
>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
</j-col>
|
||||
<j-col :span="12">
|
||||
<div class="content-des-title">
|
||||
告警级别
|
||||
</div>
|
||||
|
@ -75,8 +75,8 @@
|
|||
{{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
|
||||
slotProps.level }}
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</j-col>
|
||||
</j-row>
|
||||
</template>
|
||||
<template #actions="item">
|
||||
<PermissionButton
|
||||
|
@ -109,7 +109,7 @@
|
|||
<span>{{ map[slotProps.targetType] }}</span>
|
||||
</template>
|
||||
<template #level="slotProps">
|
||||
<a-tooltip
|
||||
<j-tooltip
|
||||
placement="topLeft"
|
||||
:title="(Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
|
||||
slotProps.level"
|
||||
|
@ -118,7 +118,7 @@
|
|||
{{ (Store.get('default-level') || []).find((item: any) => item?.level === slotProps.level)?.title ||
|
||||
slotProps.level }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</j-tooltip>
|
||||
</template>
|
||||
<template #sceneId="slotProps">
|
||||
<span
|
||||
|
@ -126,7 +126,7 @@
|
|||
>
|
||||
</template>
|
||||
<template #state="slotProps">
|
||||
<a-badge
|
||||
<j-badge
|
||||
:text="
|
||||
slotProps.state?.value === 'enabled'
|
||||
? '正常'
|
||||
|
@ -140,7 +140,7 @@
|
|||
/>
|
||||
</template>
|
||||
<template #action="slotProps">
|
||||
<a-space :size="16">
|
||||
<j-space :size="16">
|
||||
<template
|
||||
v-for="i in getActions(slotProps, 'table')"
|
||||
:key="i.key"
|
||||
|
@ -168,7 +168,7 @@
|
|||
/></template>
|
||||
</PermissionButton>
|
||||
</template>
|
||||
</a-space>
|
||||
</j-space>
|
||||
</template>
|
||||
</JProTable>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<page-container>
|
||||
<Search
|
||||
<pro-search
|
||||
:columns="columns"
|
||||
target="alarm-log-detail"
|
||||
@search="handleSearch"
|
||||
></Search>
|
||||
/>
|
||||
<JProTable
|
||||
:columns="columns"
|
||||
model="TABLE"
|
||||
|
@ -19,7 +19,7 @@
|
|||
moment(slotProps.alarmTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
}}</template>
|
||||
<template #action="slotProps">
|
||||
<a-space
|
||||
<j-space
|
||||
><template
|
||||
v-for="i in getActions(slotProps, 'table')"
|
||||
:key="i.key"
|
||||
|
@ -37,7 +37,7 @@
|
|||
<template #icon><AIcon :type="i.icon"/></template>
|
||||
</PermissionButton>
|
||||
</template>
|
||||
</a-space>
|
||||
</j-space>
|
||||
</template>
|
||||
</JProTable>
|
||||
<Info v-if="visiable" :data="current" @close="close"/>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<a-modal visible title="详情" okText="确定" cancelText="取消" :width="1000" @ok="closeModal" @cancel="closeModal">
|
||||
<a-descriptions bordered :column="2">
|
||||
<a-descriptions-item v-if="props.data.targetType==='device'" label="告警设备" :span="1">{{props.data?.targetName || ''}}</a-descriptions-item>
|
||||
<a-descriptions-item v-if="props.data.targetType==='device'" label="设备ID" :span="1">{{props.data?.targetId || ''}}</a-descriptions-item>
|
||||
<a-descriptions-item label="告警名称" :span="1">{{
|
||||
<j-modal visible title="详情" okText="确定" cancelText="取消" :width="1000" @ok="closeModal" @cancel="closeModal">
|
||||
<j-descriptions bordered :column="2">
|
||||
<j-descriptions-item v-if="props.data.targetType==='device'" label="告警设备" :span="1">{{props.data?.targetName || ''}}</j-descriptions-item>
|
||||
<j-descriptions-item v-if="props.data.targetType==='device'" label="设备ID" :span="1">{{props.data?.targetId || ''}}</j-descriptions-item>
|
||||
<j-descriptions-item label="告警名称" :span="1">{{
|
||||
props.data?.alarmConfigName
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="告警时间" :span="1">{{
|
||||
}}</j-descriptions-item>
|
||||
<j-descriptions-item label="告警时间" :span="1">{{
|
||||
moment(data?.alarmTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
}}</a-descriptions-item>
|
||||
<a-descriptions-item label="告警级别" :span="1">
|
||||
<a-tooltip
|
||||
}}</j-descriptions-item>
|
||||
<j-descriptions-item label="告警级别" :span="1">
|
||||
<j-tooltip
|
||||
placement="topLeft"
|
||||
:title="(Store.get('default-level') || []).find((item: any) => item?.level === data?.level)
|
||||
?.title || props.data?.level"
|
||||
|
@ -21,10 +21,10 @@
|
|||
?.title || props.data?.level}}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
</a-tooltip>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="告警说明" :span="1"
|
||||
><a-tooltip
|
||||
</j-tooltip>
|
||||
</j-descriptions-item>
|
||||
<j-descriptions-item label="告警说明" :span="1"
|
||||
><j-tooltip
|
||||
placement="topLeft"
|
||||
:title="data?.description || ''"
|
||||
>
|
||||
|
@ -33,14 +33,14 @@
|
|||
{{ data?.description || '' }}
|
||||
</span> </Ellipsis
|
||||
>
|
||||
</a-tooltip></a-descriptions-item
|
||||
</j-tooltip></j-descriptions-item
|
||||
>
|
||||
<a-descriptions-item
|
||||
<j-descriptions-item
|
||||
label="告警流水"
|
||||
:span="2"
|
||||
><div style="max-height: 500px; overflow-y: auto;"><JsonViewer :value="JSON.parse(data?.alarmInfo || '{}')" :expand-depth="5"></JsonViewer></div></a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-modal>
|
||||
><div style="max-height: 500px; overflow-y: auto;"><JsonViewer :value="JSON.parse(data?.alarmInfo || '{}')" :expand-depth="5"></JsonViewer></div></j-descriptions-item>
|
||||
</j-descriptions>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-modal
|
||||
<j-modal
|
||||
title="告警处理"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
|
@ -9,18 +9,18 @@
|
|||
destroyOnClose
|
||||
:confirmLoading="loading"
|
||||
>
|
||||
<a-form :rules="rules" layout="vertical" ref="formRef" :model="form">
|
||||
<a-form-item label="处理结果" name="describe">
|
||||
<a-textarea
|
||||
<j-form :rules="rules" layout="vertical" ref="formRef" :model="form">
|
||||
<j-form-item label="处理结果" name="describe">
|
||||
<j-textarea
|
||||
:rows="8"
|
||||
:maxlength="200"
|
||||
showCount
|
||||
placeholder="请输入处理结果"
|
||||
v-model:value="form.describe"
|
||||
></a-textarea>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
></j-textarea>
|
||||
</j-form-item>
|
||||
</j-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -64,6 +64,7 @@ const handleSave = () => {
|
|||
});
|
||||
if (res.status === 200) {
|
||||
onlyMessage('操作成功!');
|
||||
emit('closeSolve');
|
||||
} else {
|
||||
onlyMessage('操作失败!', 'error');
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-modal
|
||||
<j-modal
|
||||
visible
|
||||
title="处理记录"
|
||||
:width="1200"
|
||||
|
@ -8,11 +8,11 @@
|
|||
@ok="clsoeModal"
|
||||
@cancel="clsoeModal"
|
||||
>
|
||||
<Search
|
||||
<pro-search
|
||||
:columns="columns"
|
||||
target="bind-channel"
|
||||
@search="handleSearch"
|
||||
></Search>
|
||||
/>
|
||||
<JProTable
|
||||
model="TABLE"
|
||||
:columns="columns"
|
||||
|
@ -48,7 +48,7 @@
|
|||
</span>
|
||||
</template>
|
||||
</JProTable>
|
||||
</a-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<template>
|
||||
<div class="alarm-log-card">
|
||||
<Search
|
||||
<pro-search
|
||||
:columns="columns"
|
||||
target="alarm-log"
|
||||
v-if="['all', 'detail'].includes(props.type)"
|
||||
@search="search"
|
||||
></Search>
|
||||
<Search
|
||||
/>
|
||||
<pro-search
|
||||
:columns="produtCol"
|
||||
target="alarm-log"
|
||||
v-if="['product', 'other'].includes(props.type)"
|
||||
@search="search"
|
||||
></Search>
|
||||
<Search
|
||||
/>
|
||||
<pro-search
|
||||
:columns="deviceCol"
|
||||
target="alarm-log"
|
||||
v-if="props.type === 'device'"
|
||||
@search="search"
|
||||
></Search>
|
||||
<Search
|
||||
/>
|
||||
<pro-search
|
||||
:columns="orgCol"
|
||||
target="alarm-log"
|
||||
v-if="props.type === 'org'"
|
||||
@search="search"
|
||||
></Search>
|
||||
/>
|
||||
<JProTable
|
||||
:columns="columns"
|
||||
:request="handleSearch"
|
||||
|
@ -31,6 +31,7 @@
|
|||
:gridColumns="[1, 1, 2]"
|
||||
:gridColumn="2"
|
||||
model="CARD"
|
||||
ref="tableRef"
|
||||
>
|
||||
<template #card="slotProps">
|
||||
<CardBox
|
||||
|
@ -52,8 +53,8 @@
|
|||
{{ slotProps.alarmName }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="8">
|
||||
<j-row :gutter="24">
|
||||
<j-col :span="8">
|
||||
<div class="content-des-title">
|
||||
{{ titleMap.get(slotProps.targetType) }}
|
||||
</div>
|
||||
|
@ -62,8 +63,8 @@
|
|||
{{ slotProps?.targetName }}
|
||||
</div></Ellipsis
|
||||
>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
</j-col>
|
||||
<j-col :span="8">
|
||||
<div class="content-des-title">
|
||||
最近告警时间
|
||||
</div>
|
||||
|
@ -76,17 +77,17 @@
|
|||
}}
|
||||
</div></Ellipsis
|
||||
>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
</j-col>
|
||||
<j-col :span="8">
|
||||
<div class="content-des-title">状态</div>
|
||||
<a-badge
|
||||
<j-badge
|
||||
:status="
|
||||
slotProps.state.value === 'warning'
|
||||
? 'error'
|
||||
: 'default'
|
||||
"
|
||||
>
|
||||
</a-badge
|
||||
</j-badge
|
||||
><span
|
||||
:style="
|
||||
slotProps.state.value === 'warning'
|
||||
|
@ -96,8 +97,8 @@
|
|||
>
|
||||
{{ slotProps.state.text }}
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</j-col>
|
||||
</j-row>
|
||||
</template>
|
||||
<template #actions="item">
|
||||
<PermissionButton
|
||||
|
@ -105,7 +106,6 @@
|
|||
item.key === 'solve' &&
|
||||
slotProps.state.value === 'normal'
|
||||
"
|
||||
:popConfirm="item.popConfirm"
|
||||
:tooltip="{
|
||||
...item.tooltip,
|
||||
}"
|
||||
|
@ -152,11 +152,11 @@ import { Store } from 'jetlinks-store';
|
|||
import moment from 'moment';
|
||||
import type { ActionsType } from '@/components/Table';
|
||||
import SolveComponent from '../SolveComponent/index.vue';
|
||||
import SolveLog from '../SolveLog/index.vue'
|
||||
import SolveLog from '../SolveLog/index.vue';
|
||||
import { useMenuStore } from '@/store/menu';
|
||||
import { usePermissionStore } from '@/store/permission';
|
||||
const menuStory = useMenuStore();
|
||||
|
||||
const tableRef = ref();
|
||||
const alarmStore = useAlarmStore();
|
||||
const { data } = storeToRefs(alarmStore);
|
||||
const getDefaulitLevel = () => {
|
||||
|
@ -339,7 +339,7 @@ watchEffect(() => {
|
|||
},
|
||||
];
|
||||
}
|
||||
if(props.type === 'all'){
|
||||
if (props.type === 'all') {
|
||||
params.value.terms = [];
|
||||
}
|
||||
});
|
||||
|
@ -347,24 +347,20 @@ watchEffect(() => {
|
|||
const search = (data: any) => {
|
||||
params.value.terms = [...data?.terms];
|
||||
if (props.type !== 'all' && !props.id) {
|
||||
params.value.terms.push(
|
||||
{
|
||||
params.value.terms.push({
|
||||
termType: 'eq',
|
||||
column: 'targetType',
|
||||
value: props.type,
|
||||
type: 'and',
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
if (props.id) {
|
||||
params.value.terms.push (
|
||||
{
|
||||
params.value.terms.push({
|
||||
termType: 'eq',
|
||||
column: 'alarmConfigId',
|
||||
value: props.id,
|
||||
type: 'and',
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -381,17 +377,19 @@ const getActions = (
|
|||
title: '告警处理',
|
||||
},
|
||||
icon: 'ToolOutlined',
|
||||
onClick: () =>{
|
||||
onClick: () => {
|
||||
data.value.current = currentData;
|
||||
data.value.solveVisible = true;
|
||||
},
|
||||
popConfirm:{
|
||||
title: !usePermissionStore().hasPermission('rule-engine/Alarm/Log:action')
|
||||
? '暂无权限,请联系管理员'
|
||||
: data.state?.value === 'normal'
|
||||
? '无告警'
|
||||
: ''
|
||||
}
|
||||
// popConfirm: {
|
||||
// title: !usePermissionStore().hasPermission(
|
||||
// 'rule-engine/Alarm/Log:action',
|
||||
// )
|
||||
// ? '暂无权限,请联系管理员'
|
||||
// : data.state?.value === 'normal'
|
||||
// ? '无告警'
|
||||
// : '',
|
||||
// },
|
||||
},
|
||||
{
|
||||
key: 'log',
|
||||
|
@ -400,9 +398,11 @@ const getActions = (
|
|||
title: '告警日志',
|
||||
},
|
||||
icon: 'FileOutlined',
|
||||
onClick: () =>{
|
||||
menuStory.jumpPage(`rule-engine/Alarm/Log/Detail`,{id:currentData.id});
|
||||
}
|
||||
onClick: () => {
|
||||
menuStory.jumpPage(`rule-engine/Alarm/Log/Detail`, {
|
||||
id: currentData.id,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'detail',
|
||||
|
@ -411,10 +411,10 @@ const getActions = (
|
|||
title: '处理记录',
|
||||
},
|
||||
icon: 'FileTextOutlined',
|
||||
onClick:() =>{
|
||||
onClick: () => {
|
||||
data.value.current = currentData;
|
||||
data.value.logVisible = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
return actions;
|
||||
|
@ -422,15 +422,16 @@ const getActions = (
|
|||
/**
|
||||
* 关闭告警日志
|
||||
*/
|
||||
const closeSolve = () =>{
|
||||
const closeSolve = () => {
|
||||
data.value.solveVisible = false;
|
||||
}
|
||||
tableRef.value.reload(params.value);
|
||||
};
|
||||
/**
|
||||
* 关闭处理记录
|
||||
*/
|
||||
const closeLog = () =>{
|
||||
const closeLog = () => {
|
||||
data.value.logVisible = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
</style>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-modal
|
||||
<j-modal
|
||||
:maskClosable="false"
|
||||
width="650px"
|
||||
destroyOnClose
|
||||
|
@ -12,30 +12,30 @@
|
|||
:confirmLoading="loading"
|
||||
>
|
||||
<div style="margin-top: 10px">
|
||||
<a-form
|
||||
<j-form
|
||||
:layout="'vertical'"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="modelRef"
|
||||
>
|
||||
<a-form-item label="名称" name="name">
|
||||
<a-input
|
||||
<j-form-item label="名称" name="name">
|
||||
<j-input
|
||||
v-model:value="modelRef.name"
|
||||
placeholder="请输入名称"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="说明" name="describe">
|
||||
<a-textarea
|
||||
</j-form-item>
|
||||
<j-form-item label="说明" name="describe">
|
||||
<j-textarea
|
||||
v-model:value="modelRef.description"
|
||||
placeholder="请输入说明"
|
||||
showCount
|
||||
:maxlength="200"
|
||||
:rows="4"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</j-form-item>
|
||||
</j-form>
|
||||
</div>
|
||||
</a-modal>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<page-container>
|
||||
<div>
|
||||
<Search
|
||||
<pro-search
|
||||
:columns="query.columns"
|
||||
target="device-instance"
|
||||
@search="handleSearch"
|
||||
></Search>
|
||||
/>
|
||||
<JProTable
|
||||
:columns="columns"
|
||||
:request="queryList"
|
||||
|
@ -53,15 +53,15 @@
|
|||
{{ slotProps.name }}
|
||||
</span>
|
||||
</Ellipsis>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<j-row>
|
||||
<j-col :span="12">
|
||||
<Ellipsis>
|
||||
<div>
|
||||
{{ slotProps.description }}
|
||||
</div>
|
||||
</Ellipsis>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</j-col>
|
||||
</j-row>
|
||||
</template>
|
||||
<template #actions="item">
|
||||
<PermissionButton
|
||||
|
@ -88,7 +88,7 @@
|
|||
</CardBox>
|
||||
</template>
|
||||
<template #state="slotProps">
|
||||
<a-badge
|
||||
<j-badge
|
||||
:text="
|
||||
slotProps.state?.value === 'started'
|
||||
? '正常'
|
||||
|
@ -102,7 +102,7 @@
|
|||
/>
|
||||
</template>
|
||||
<template #action="slotProps">
|
||||
<a-space :size="16">
|
||||
<j-space :size="16">
|
||||
<template
|
||||
v-for="i in getActions(slotProps, 'table')"
|
||||
:key="i.key"
|
||||
|
@ -123,7 +123,7 @@
|
|||
/></template>
|
||||
</PermissionButton>
|
||||
</template>
|
||||
</a-space>
|
||||
</j-space>
|
||||
</template>
|
||||
</JProTable>
|
||||
<!-- 新增、编辑 -->
|
||||
|
|
Loading…
Reference in New Issue