Browse Source

推送配置:设备配置中增加一网温度调整值,并且二网回温调整值和一网温度调整值都可以批量修改

develop^2
bobol 8 months ago
parent
commit
2fe3436b17
  1. 150
      src/views/model/heatapiconf/index.vue

150
src/views/model/heatapiconf/index.vue

@ -94,12 +94,12 @@
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getList"/>
</el-col>
</el-row>
<!-- 添加或修改供热办推送接口配置对话框 -->
<el-dialog :title="title" v-model="open" width="1000px" append-to-body draggable :close-on-click-modal="false" destroy-on-close>
<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">
@ -159,8 +159,21 @@
<el-table-column type="index" width="50"/>
<el-table-column prop="deviceUuid" label="设备" :formatter="formatterDevicesName"/>
<el-table-column prop="strategy" label="策略" :formatter="formatterStrategy"/>
<el-table-column prop="adjustedValue" label="调整值"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="300"
<el-table-column prop="twoWaterBackTmpt" label="二网回温调整值">
<template #header>
<div @click="twoWaterBackTmptEditHandler">
{{"二网回温调整值"}}<el-icon style="margin-left: 5px;"><EditPen /></el-icon>
</div>
</template>
</el-table-column>
<el-table-column prop="oneWaterTmpt" label="一网供回温调整值">
<template #header>
<div @click="oneWaterTmptEditHandler">
{{"一网供回温调整值"}}<el-icon style="margin-left: 5px;"><EditPen /></el-icon>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300"
:fixed="fixedColumns ? 'right' : false">
<template #default="scope">
<el-button type="text" icon="Edit" @click="handleUpdateStrategyConf(scope.row)">修改</el-button>
@ -179,7 +192,7 @@
<el-dialog title="编辑设备调整策略" v-model="openStrategyConfEditForm" width="500px" append-to-body draggable
:close-on-click-modal="false" destroy-on-close>
<el-form ref="strategyConfEditFormRef" :model="strategyConfEditForm" :rules="strategyConfEditRules"
label-width="80px">
label-width="150px">
<el-form-item label="设备:" prop="deviceName">
{{ getDevicesName(strategyConfEditForm.deviceUuid) }}
</el-form-item>
@ -189,8 +202,13 @@
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="调整值:" prop="adjustedValue">
<el-input type="number" v-model="strategyConfEditForm.adjustedValue" placeholder="请输入调整值" :disabled="strategyConfEditForm.strategy !== '1'"/>
<el-form-item label="二网回温调整值:" prop="twoWaterBackTmpt">
<el-input type="number" v-model="strategyConfEditForm.twoWaterBackTmpt" placeholder="请输入二网回温调整值"
:disabled="strategyConfEditForm.strategy !== '1'"/>
</el-form-item>
<el-form-item label="一网供回温调整值:" prop="oneWaterTmpt">
<el-input type="number" v-model="strategyConfEditForm.oneWaterTmpt" placeholder="请输入一网供回温调整值"
:disabled="strategyConfEditForm.strategy !== '1'"/>
</el-form-item>
</el-form>
<template #footer>
@ -230,6 +248,38 @@
</div>
</template>
</el-dialog>
<el-dialog title="批量修改二网回温调整值" v-model="openEditTwoWaterBackTmpt" width="500px" append-to-body draggable
:close-on-click-modal="false" destroy-on-close>
<el-form ref="editTwoWaterBackTmptFromRef" :model="editTwoWaterBackTmptFrom" :rules="editTwoWaterBackTmptRules"
label-width="150px">
<el-form-item label="二网回温调整值:" prop="twoWaterBackTmpt">
<el-input type="number" v-model="editTwoWaterBackTmptFrom.twoWaterBackTmpt" placeholder="请输入二网回温调整值"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitEditTwoWaterBackTmptFrom"> </el-button>
<el-button @click="cancelEditTwoWaterBackTmptFrom"> </el-button>
</div>
</template>
</el-dialog>
<el-dialog title="批量修改一网供回温调整值" v-model="openOneWaterTmptFrom" width="500px" append-to-body draggable
:close-on-click-modal="false" destroy-on-close>
<el-form ref="editOneWaterTmptFromRef" :model="editOneWaterTmptFrom" :rules="editOneWaterTmptRules"
label-width="150px">
<el-form-item label="一网供回温调整值:" prop="oneWaterTmpt">
<el-input type="number" v-model="editOneWaterTmptFrom.oneWaterTmpt" placeholder="请输入一网供回温调整值"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitEditOneWaterTmptFrom"> </el-button>
<el-button @click="cancelEditOneWaterTmptFrom"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<style lang="scss"> @import "@/assets/styles/self-defined.scss";
@ -302,7 +352,24 @@ const deviceList = ref([]);
const deviceStrategyConfList = ref([]);
const openStrategyConfEditForm = ref(false);
const strategyConfEditForm = ref({});
const strategyConfEditRules = ref({});
const strategyConfEditRules = ref({
strategy: [{
required: true,
message: '请选择策略',
trigger: 'change'
}],
twoWaterBackTmpt: [{
required: true,
message: '请输入二网回温调整值',
trigger: 'blur'
}],
oneWaterTmpt: [{
required: true,
message: '请输入一网供回温调整值',
trigger: 'blur'
}
]
});
const openStrategyConfAddForm = ref(false);
const strategyConfSaveForm = ref({
deviceList: []
@ -314,6 +381,24 @@ const strategyConfSaveRules = ref({
trigger: 'change'
}]
});
const openEditTwoWaterBackTmpt = ref(false);
const editTwoWaterBackTmptFrom = ref({});
const editTwoWaterBackTmptRules = ref({
twoWaterBackTmpt: [{
required: true,
message: '请输入二网回温调整值',
trigger: 'blur'
}],
});
const openOneWaterTmptFrom = ref(false);
const editOneWaterTmptFrom = ref({});
const editOneWaterTmptRules = ref({
oneWaterTmpt: [{
required: true,
message: '请输入一网供回温调整值',
trigger: 'blur'
}],
});
/** 查询供热办推送接口配置列表 */
@ -391,11 +476,6 @@ function handleAdd() {
form.value.computeSwitchTotal = true;
title.value = "添加供热办推送接口配置";
form.value.excludeDevices = null;
if (treeSelected.value != null && treeSelected.value != '') {
editable.value = true;
} else {
editable.value = false;
}
}
/** 修改按钮操作 */
@ -830,6 +910,50 @@ function getDevicesName(deviceUuid) {
}
}
function twoWaterBackTmptEditHandler() {
editTwoWaterBackTmptFrom.value = {};
openEditTwoWaterBackTmpt.value = true;
}
function submitEditTwoWaterBackTmptFrom() {
proxy.$refs["editTwoWaterBackTmptFromRef"].validate(valid => {
if (valid) {
if (deviceStrategyConfList.value && deviceStrategyConfList.value.length > 0) {
deviceStrategyConfList.value.forEach(item => {
item.twoWaterBackTmpt = editTwoWaterBackTmptFrom.value.twoWaterBackTmpt;
})
}
cancelEditTwoWaterBackTmptFrom();
}
})
}
function cancelEditTwoWaterBackTmptFrom() {
openEditTwoWaterBackTmpt.value = false;
}
function oneWaterTmptEditHandler() {
editOneWaterTmptFrom.value = {};
openOneWaterTmptFrom.value = true;
}
function submitEditOneWaterTmptFrom() {
proxy.$refs["editOneWaterTmptFromRef"].validate(valid => {
if (valid) {
if (deviceStrategyConfList.value && deviceStrategyConfList.value.length > 0) {
deviceStrategyConfList.value.forEach(item => {
item.oneWaterTmpt = editOneWaterTmptFrom.value.oneWaterTmpt;
})
}
cancelEditOneWaterTmptFrom();
}
})
}
function cancelEditOneWaterTmptFrom() {
openOneWaterTmptFrom.value = false;
}
getDevicesAll();
getDeptTree();
getDeptTreeSelectNew();

Loading…
Cancel
Save