|
|
@ -17,13 +17,13 @@ |
|
|
|
class="my-custom-form"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="排除设备" prop="excludeDevices" label-width="auto"> |
|
|
|
<el-select v-model="queryParams.excludeDevices" placeholder="请选择排除设备" clearable multiple> |
|
|
|
<el-form-item label="推送方" prop="pushingCounterpart" label-width="auto"> |
|
|
|
<el-select v-model="queryParams.pushingCounterpart" placeholder="请选择推送方" clearable> |
|
|
|
<el-option |
|
|
|
v-for="dict in listDeviceAll" |
|
|
|
:key="dict.uuid" |
|
|
|
:label="dict.deviceName" |
|
|
|
:value="dict.uuid" |
|
|
|
v-for="dict in pushing_counterpart" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
@ -34,12 +34,6 @@ |
|
|
|
@keyup.enter="handleQuery"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="发送地址" prop="sendIp" label-width="auto"> |
|
|
|
<el-input v-model="queryParams.sendIp" placeholder="请输入发送地址" clearable |
|
|
|
@keyup.enter="handleQuery"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item class="childTextAlignLeft"> |
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
|
|
@ -67,19 +61,11 @@ |
|
|
|
<el-table v-loading="loading" :data="heatapiconfList" @selection-change="handleSelectionChange" |
|
|
|
:max-height="tableHeight" :border="true" :column-width-draggable="true"> |
|
|
|
<el-table-column type="selection" width="55" align="center" fixed="left"/> |
|
|
|
<!-- <el-table-column label="主键" align="center" prop="id" /> --> |
|
|
|
<el-table-column label="机构编号" align="center" prop="orgCode"/> |
|
|
|
<el-table-column label="机构名称" align="center" prop="orgName"/> |
|
|
|
<!-- <el-table-column label="排除设备" align="center" prop="excludeDevices" show-overflow-tooltip="true" >--> |
|
|
|
<!-- <template #default="scope">--> |
|
|
|
<!-- {{getDevicesNames(scope.row.excludeDevices)}}--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<el-table-column label="推送方" align="center" prop="pushingCounterpart" |
|
|
|
:formatter="formatterPushingCounterpart"/> |
|
|
|
<!-- <el-table-column label="策略" align="center" prop="strategy" :formatter="formatterStrategy"/>--> |
|
|
|
<el-table-column label="标准值" align="center" prop="standard"/> |
|
|
|
<!-- <el-table-column label="发送地址" align="center" prop="sendIp"/>--> |
|
|
|
<el-table-column label="是否发送" align="center" prop="available"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-switch v-model="scope.row.available" @change="changeEnabled(scope.row)"/> |
|
|
@ -113,7 +99,7 @@ |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<!-- 添加或修改供热办推送接口配置对话框 --> |
|
|
|
<el-dialog :title="title" v-model="open" width="1000px" append-to-body draggable :close-on-click-modal="false"> |
|
|
|
<el-dialog :title="title" v-model="open" width="1000px" append-to-body draggable :close-on-click-modal="false" destroy-on-close> |
|
|
|
<el-form ref="heatapiconfRef" :model="form" :rules="rules" label-width="80px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
@ -191,7 +177,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="编辑设备调整策略" v-model="openStrategyConfEditForm" width="500px" append-to-body draggable |
|
|
|
:close-on-click-modal="false"> |
|
|
|
:close-on-click-modal="false" destroy-on-close> |
|
|
|
<el-form ref="strategyConfEditFormRef" :model="strategyConfEditForm" :rules="strategyConfEditRules" |
|
|
|
label-width="80px"> |
|
|
|
<el-form-item label="设备:" prop="deviceName"> |
|
|
@ -216,7 +202,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="新增设备" v-model="openStrategyConfAddForm" width="500px" append-to-body draggable |
|
|
|
:close-on-click-modal="false"> |
|
|
|
:close-on-click-modal="false" destroy-on-close> |
|
|
|
<el-form ref="strategyConfSaveFormRef" :model="strategyConfSaveForm" :rules="strategyConfSaveRules" |
|
|
|
label-width="70px"> |
|
|
|
<el-form-item label="设备:" prop="deviceList"> |
|
|
@ -302,7 +288,13 @@ const data = reactive({ |
|
|
|
standard: null, |
|
|
|
excludeDevices: [], |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
rules: { |
|
|
|
orgCode: [{required: true, message: "请选择热源", trigger: "change"}], |
|
|
|
pushingCounterpart: [{required: true, message: "请选择推送方", trigger: "change"}], |
|
|
|
standard: [{required: true, message: "请选择标准值", trigger: "blur"}], |
|
|
|
dateRange: [{required: true, message: "请选择日期范围", trigger: "change"}], |
|
|
|
pushingInterval: [{required: true, message: "请输入时间间隔", trigger: "blur"}], |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
const {queryParams, form, rules} = toRefs(data); |
|
|
@ -531,7 +523,7 @@ function handleNodeClick(data) { |
|
|
|
queryParams.value.orgCode = data.id; |
|
|
|
form.value.orgCode = data.id; |
|
|
|
form.value.orgName = data.label; |
|
|
|
disabled.value = data.isLeaf |
|
|
|
// disabled.value = data.isLeaf |
|
|
|
treeSelected.value = data.id; |
|
|
|
handleQuery(); |
|
|
|
} |
|
|
@ -758,14 +750,15 @@ function dateRangeChange(dataRange) { |
|
|
|
|
|
|
|
function handleAddStrategyConf() { |
|
|
|
deviceList.value = JSON.parse(JSON.stringify(listDevices.value)); |
|
|
|
console.log("deviceList", deviceList.value, deviceStrategyConfList.value); |
|
|
|
let deviceArr = []; |
|
|
|
if (deviceStrategyConfList.value && deviceStrategyConfList.value.length > 0) { |
|
|
|
deviceList.value.forEach(device => { |
|
|
|
let arr = deviceStrategyConfList.value.filter(item => item.deviceUuid === device.uuid); |
|
|
|
if (arr && arr.length > 0) { |
|
|
|
device.disabled = true; |
|
|
|
if (!arr || arr.length === 0) { |
|
|
|
deviceArr.push(device); |
|
|
|
} |
|
|
|
}) |
|
|
|
deviceList.value = deviceArr; |
|
|
|
} |
|
|
|
strategyConfSaveForm.value.deviceList = []; |
|
|
|
openStrategyConfAddForm.value = true; |
|
|
|