fix: bug#11127 11132 11133 11136
This commit is contained in:
parent
407f3a8758
commit
0c46c38177
|
@ -43,7 +43,7 @@ export const detail = (id: string) => server.get<ProductItem>(`/device-product/$
|
|||
* 产品分类
|
||||
* @param data 查询条件
|
||||
*/
|
||||
export const category = (data: any) => server.post('/device/category/_tree', data)
|
||||
export const category = (data: any) => server.get('/device/category/_tree?paging=false', data)
|
||||
|
||||
/**
|
||||
* 获取网关类型
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
type="primary"
|
||||
:popConfirm="{
|
||||
title: `确定应用配置?`,
|
||||
onConfirm: handleConfig,
|
||||
onConfirm: handleDeploy,
|
||||
}"
|
||||
:disabled="productStore.current?.state === 0"
|
||||
:tooltip="
|
||||
|
|
|
@ -68,7 +68,11 @@
|
|||
:tree-data="treeList"
|
||||
@change="valueChange"
|
||||
allow-clear
|
||||
:fieldNames="{ label: 'name', value: 'id' }"
|
||||
:fieldNames="{
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
children: 'children',
|
||||
}"
|
||||
:filterTreeNode="
|
||||
(v, option) => filterSelectNode(v, option)
|
||||
"
|
||||
|
@ -120,11 +124,7 @@ import { FILE_UPLOAD } from '@/api/comm';
|
|||
import { isInput } from '@/utils/regular';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { queryProductId, addProduct, editProduct } from '@/api/device/product';
|
||||
import {
|
||||
SearchOutlined,
|
||||
CheckOutlined,
|
||||
DeleteOutlined,
|
||||
} from '@ant-design/icons-vue';
|
||||
import encodeQuery from '@/utils/encodeQuery';
|
||||
const productStore = useProductStore();
|
||||
const emit = defineEmits(['success']);
|
||||
const props = defineProps({
|
||||
|
@ -246,14 +246,25 @@ const valueChange = (value: string, label: string) => {
|
|||
* 查询产品分类
|
||||
*/
|
||||
const queryProductTree = async () => {
|
||||
category({
|
||||
paging: false,
|
||||
}).then((resp) => {
|
||||
category(encodeQuery({ sorts: { sortIndex: 'asc' } })).then((resp) => {
|
||||
if (resp.status === 200) {
|
||||
treeList.value = resp.result;
|
||||
treeList.value = dealProductTree(treeList.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 处理产品分类key
|
||||
*/
|
||||
const dealProductTree = (arr: any) => {
|
||||
return arr.map((element: any) => {
|
||||
element.key = element.id;
|
||||
if (element.children) {
|
||||
element.children = dealProductTree(element.children);
|
||||
}
|
||||
return element
|
||||
});
|
||||
};
|
||||
watch(
|
||||
() => props.isAdd,
|
||||
() => {
|
||||
|
@ -326,7 +337,7 @@ const submitData = () => {
|
|||
// 编辑
|
||||
form.classifiedId
|
||||
? form.classifiedId
|
||||
: (form.classifiedId = ''); // 产品分类不选传空字符串
|
||||
: (form.classifiedId = ''); // 产品分类不选传空字符串
|
||||
form.classifiedName
|
||||
? form.classifiedName
|
||||
: (form.classifiedName = '');
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<PermissionButton
|
||||
type="primary"
|
||||
@click="add"
|
||||
hasPermission="device/Instance:add"
|
||||
hasPermission="rule-engine/Alarm/Configuration:add"
|
||||
>
|
||||
<template #icon
|
||||
><AIcon type="PlusOutlined"
|
||||
|
@ -82,7 +82,7 @@
|
|||
<PermissionButton
|
||||
:disabled="item.disabled"
|
||||
:popConfirm="item.popConfirm"
|
||||
:tooltip="{ ...item.tootip }"
|
||||
:tooltip="{ ...item.tooltip }"
|
||||
@click="item.onClick"
|
||||
:hasPermission="
|
||||
'rule-engine/Alarm/Configuration:' +
|
||||
|
|
|
@ -287,7 +287,7 @@ const orgCol = [
|
|||
},
|
||||
];
|
||||
|
||||
let params:any = ref({
|
||||
let params: any = ref({
|
||||
sorts: [{ name: 'alarmTime', order: 'desc' }],
|
||||
terms: [],
|
||||
});
|
||||
|
@ -369,7 +369,10 @@ const getActions = (
|
|||
key: 'solve',
|
||||
text: '告警处理',
|
||||
tooltip: {
|
||||
title: '告警处理',
|
||||
title:
|
||||
currentData.state?.value === 'normal'
|
||||
? '无告警'
|
||||
: '告警处理',
|
||||
},
|
||||
icon: 'ToolOutlined',
|
||||
onClick: () => {
|
||||
|
@ -432,14 +435,14 @@ const closeLog = () => {
|
|||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.content-left{
|
||||
border-right: .2px solid rgba(0,0,0,0.2);
|
||||
.content-left {
|
||||
border-right: 0.2px solid rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.content-right-title{
|
||||
.content-right-title {
|
||||
color: #666;
|
||||
font-size: 12px
|
||||
font-size: 12px;
|
||||
}
|
||||
.content-left-title{
|
||||
font-size: 18px
|
||||
.content-left-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue