|
@ -1,9 +1,21 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px" class="my-custom-form"> |
|
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" class="my-custom-form"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="4" class="card-box"> |
|
|
|
|
|
<div class="head-container"> |
|
|
|
|
|
<el-input v-model="deptName" placeholder="请输入部门名称" clearable prefix-icon="Search" style="margin-bottom: 20px" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="head-container"> |
|
|
|
|
|
<el-tree :data="deptOptions" :props="{ label: 'label', children: 'children' }" :expand-on-click-node="false" |
|
|
|
|
|
:filter-node-method="filterNode" ref="deptTreeRef" node-key="id" highlight-current default-expand-all |
|
|
|
|
|
@node-click="handleNodeClick" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="20"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="设备编号" prop="deviceUuid"> |
|
|
<el-form-item label="设备编号" prop="deviceUuid" label-width="auto"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.deviceUuid" |
|
|
v-model="queryParams.deviceUuid" |
|
|
placeholder="请输入设备编号" |
|
|
placeholder="请输入设备编号" |
|
@ -13,7 +25,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="设备名称" prop="deviceName"> |
|
|
<el-form-item label="设备名称" prop="deviceName" label-width="auto"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.deviceName" |
|
|
v-model="queryParams.deviceName" |
|
|
placeholder="请输入设备名称" |
|
|
placeholder="请输入设备名称" |
|
@ -23,7 +35,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="参数编码" prop="paramCode"> |
|
|
<el-form-item label="参数编码" prop="paramCode" label-width="auto"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.paramCode" |
|
|
v-model="queryParams.paramCode" |
|
|
placeholder="请输入参数编码" |
|
|
placeholder="请输入参数编码" |
|
@ -33,7 +45,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item label="参数名称" prop="paramName"> |
|
|
<el-form-item label="参数名称" prop="paramName" label-width="auto"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="queryParams.paramName" |
|
|
v-model="queryParams.paramName" |
|
|
placeholder="请输入参数名称" |
|
|
placeholder="请输入参数名称" |
|
@ -43,14 +55,12 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-form-item class="childTextAlignCenter"> |
|
|
<el-form-item class="childTextAlignLeft"> |
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-row :gutter="10" class="mb8"> |
|
|
<el-col :span="1.5"> |
|
|
<el-col :span="1.5"> |
|
|
<el-button |
|
|
<el-button |
|
@ -135,6 +145,9 @@ |
|
|
@pagination="getList" |
|
|
@pagination="getList" |
|
|
class="paddingBothLeftRight" |
|
|
class="paddingBothLeftRight" |
|
|
/> |
|
|
/> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
<!-- 添加或修改设备告警对话框 --> |
|
|
<!-- 添加或修改设备告警对话框 --> |
|
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body> |
|
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body> |
|
@ -330,6 +343,7 @@ import { listModelEnabledNoPage } from "@/api/model/alertmodel"; |
|
|
import { ElMessageBox } from 'element-plus'; |
|
|
import { ElMessageBox } from 'element-plus'; |
|
|
import {listPolicyInfo,updatePolicy,updatePolicyBatch,addPolicy,addPolicyBatch,listAlertParamSelect } from "@/api/model/policy"; |
|
|
import {listPolicyInfo,updatePolicy,updatePolicyBatch,addPolicy,addPolicyBatch,listAlertParamSelect } from "@/api/model/policy"; |
|
|
import lock from "@/assets/icons/svg/lock.svg"; |
|
|
import lock from "@/assets/icons/svg/lock.svg"; |
|
|
|
|
|
import { deptTreeSelect } from "@/api/system/user"; |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const { proxy } = getCurrentInstance(); |
|
|
const router = useRouter(); |
|
|
const router = useRouter(); |
|
|
const { dc_operator_sign,dc_param_value_type,dc_alert_level,dc_device_partion } = proxy.useDict('dc_operator_sign','dc_param_value_type','dc_alert_level','dc_device_partion'); |
|
|
const { dc_operator_sign,dc_param_value_type,dc_alert_level,dc_device_partion } = proxy.useDict('dc_operator_sign','dc_param_value_type','dc_alert_level','dc_device_partion'); |
|
@ -374,6 +388,8 @@ const paramTip = ref("请先选择设备"); |
|
|
const paramDisabled = ref(false); |
|
|
const paramDisabled = ref(false); |
|
|
const partionDisabled = ref(false); |
|
|
const partionDisabled = ref(false); |
|
|
const submitDisabled = ref(true); |
|
|
const submitDisabled = ref(true); |
|
|
|
|
|
const deptOptions = ref([]); |
|
|
|
|
|
const deptName = ref(null); |
|
|
const names = ref([]); |
|
|
const names = ref([]); |
|
|
const alert_value = ref([ |
|
|
const alert_value = ref([ |
|
|
{label: '1', value: true, elTagType: 'default', elTagClass: null}, |
|
|
{label: '1', value: true, elTagType: 'default', elTagClass: null}, |
|
@ -522,6 +538,8 @@ function handleQuery() { |
|
|
/** 重置按钮操作 */ |
|
|
/** 重置按钮操作 */ |
|
|
function resetQuery() { |
|
|
function resetQuery() { |
|
|
proxy.resetForm("queryRef"); |
|
|
proxy.resetForm("queryRef"); |
|
|
|
|
|
queryParams.value.orgCode = null; |
|
|
|
|
|
queryParamsDevice.value.orgCode = null; |
|
|
handleQuery(); |
|
|
handleQuery(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1335,7 +1353,32 @@ const calculateTableHeight = () => { |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function getDeptTree() { |
|
|
|
|
|
deptTreeSelect().then(response => { |
|
|
|
|
|
deptOptions.value = response.data; |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** 节点单击事件 */ |
|
|
|
|
|
function handleNodeClick(data) { |
|
|
|
|
|
queryParams.value.orgCode = data.id; |
|
|
|
|
|
queryParamsDevice.value.orgCode = data.id; |
|
|
|
|
|
handleQuery(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 通过条件过滤节点 */ |
|
|
|
|
|
const filterNode = (value, data) => { |
|
|
|
|
|
if (!value) return true; |
|
|
|
|
|
return data.label.indexOf(value) !== -1; |
|
|
|
|
|
}; |
|
|
|
|
|
/** 根据名称筛选部门树 */ |
|
|
|
|
|
watch(deptName, val => { |
|
|
|
|
|
proxy.$refs["deptTreeRef"].filter(val); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
getList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getList(); |
|
|
|
|
|
getDeptTree(); |
|
|
</script> |
|
|
</script> |
|
|