diff --git a/src/views/centerairC/deviceStrategy/index.vue b/src/views/centerairC/deviceStrategy/index.vue
index 032141c..22aa232 100644
--- a/src/views/centerairC/deviceStrategy/index.vue
+++ b/src/views/centerairC/deviceStrategy/index.vue
@@ -35,16 +35,20 @@
placeholder="请选择"
size="mini"
ref="selectRef"
- @change="selectThink(children)"
+ @change="selectThink(children, item.name)"
@visible-change="
(visible) => handleVisibleChange(visible, children)
"
>
@@ -90,11 +94,24 @@ export default {
this.getPolicyList();
},
methods: {
- // select数组
- getOptions(min, max) {
+ /** select选项生成 */
+ getOptions(min, max, name) {
const options = [];
+ /** 冷冻泵策略:压差控制(0) / 温差控制(1) */
+ if (name === "冷冻泵策略") {
+ options.push({ value: 0, label: "压差控制" });
+ options.push({ value: 1, label: "温差控制" });
+ return options;
+ }
+ /** 冷却泵/冷却塔策略:逼近温度控制(0) / 塔出水温度控制(1) */
+ if (name === "冷却泵/冷却塔策略") {
+ options.push({ value: 0, label: "逼近温度控制" });
+ options.push({ value: 1, label: "塔出水温度控制" });
+ return options;
+ }
+ /** 默认:数值选项 */
for (let i = min; i <= max; i++) {
- options.push(i);
+ options.push({ value: i, label: i.toString() });
}
return options;
},
@@ -134,11 +151,19 @@ export default {
this.$set(children, "_oldValue", children.curValue);
}
},
- // 处理select的选中值
- selectThink(children) {
+ /** 处理select的选中值 */
+ selectThink(children, policyName) {
const oldValue = children._oldValue;
+ /** 根据策略名称将curValue转为中文显示 */
+ let displayValue = children.curValue;
+ if (policyName === "冷冻泵策略") {
+ displayValue = children.curValue == 0 ? "压差控制" : "温差控制";
+ } else if (policyName === "冷却泵/冷却塔策略") {
+ displayValue =
+ children.curValue == 0 ? "逼近温度控制" : "塔出水温度控制";
+ }
this.$confirm(
- `确定要修改"${children.pointName}"的数据为:${children.curValue}吗?`,
+ `确定要修改"${children.pointName}"的数据为:${displayValue}吗?`,
"提示",
{
confirmButtonText: "确定",
@@ -147,6 +172,7 @@ export default {
}
)
.then(() => {
+ /** 传给接口的仍然是原值 children.curValue */
this.hadleOperationConrol(children.cpmId, children.curValue);
})
.catch(() => {
@@ -407,16 +433,13 @@ export default {
}
}
.el-input {
- width: 80px !important;
+ width: 140px !important;
margin: 0 15px 0 5px;
}
.el-select {
- width: 80px !important;
+ width: 140px !important;
margin: 0 15px 0 5px;
}
- .tips-text {
- font-size: 14px;
- }
}
}
.radio-style {
@@ -430,6 +453,10 @@ export default {
width: calc(50% - 20px) !important;
}
}
+ .tips-text {
+ font-size: 14px;
+ width: 100%;
+ }
}
@media (min-width: 1560px) and (max-width: 1670px) {
.policy {
@@ -524,7 +551,7 @@ export default {
}
.policy-li .el-radio {
margin-bottom: 0.05rem !important;
-}
+ }
}