Commit 10e2e52a authored by xuke's avatar xuke

完善-参数配置

parent 7887dd94
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="contentBlock"> <div class="contentBlock">
<div class="contentBlockInn"> <div class="contentBlockInn">
<el-card class="card-contianer"> <el-card class="card-contianer">
<table cellpadding="0" cellspacing="1" style="background-color: #99bbe8"> <table v-loading="loading" cellpadding="0" cellspacing="1" style="background-color: #99bbe8">
<tr> <tr>
<th style="width: 25%">电调阈开启度</th> <th style="width: 25%">电调阈开启度</th>
<td style="width: 60%; margin: 0; padding: 0"> <td style="width: 60%; margin: 0; padding: 0">
...@@ -24,15 +24,6 @@ ...@@ -24,15 +24,6 @@
<tr> <tr>
<th style="width: 25%">换热站</th> <th style="width: 25%">换热站</th>
<td style="text-align: left"> <td style="text-align: left">
<!-- <el-checkbox-group v-model="formDatas.transferIds" style="width: 60%;">
<el-checkbox v-for="(option, index) in options" :key="index" :label="option" :value="options.value">
{{ option.label }}
</el-checkbox>
</el-checkbox-group> -->
<!-- <el-checkbox-group v-model="checkList" style="width: 60%;">
<el-checkbox v-for="(option, index) in options" :key="index" :label="option" :value="option.value">
{{ option.label }}
</el-checkbox> -->
<el-checkbox-group v-model="formDatas.transferIds" style="width: 60%"> <el-checkbox-group v-model="formDatas.transferIds" style="width: 60%">
<el-checkbox v-for="(option, index) in options" :label="option.value" :key="index"> <el-checkbox v-for="(option, index) in options" :label="option.value" :key="index">
{{ option.label }} {{ option.label }}
...@@ -169,7 +160,7 @@ import { ElMessage } from "element-plus"; ...@@ -169,7 +160,7 @@ import { ElMessage } from "element-plus";
const options = reactive([]); const options = reactive([]);
import store from "../../store/index"; import store from "../../store/index";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
import { ElLoading } from "element-plus"; const loading = ref(false)
const form = ref({ const form = ref({
types: [], types: [],
}); });
...@@ -189,32 +180,25 @@ const formDatas = ref([ ...@@ -189,32 +180,25 @@ const formDatas = ref([
}, },
]); ]);
const getListData = () => { const getListData = () => {
const loading = ElLoading.service({ loading.value = true
lock: true,
text: "获取数据中",
background: "rgba(0, 0, 0, 0.7)",
});
http.get("/api/configboiler/getData").then((result) => { http.get("/api/configboiler/getData").then((result) => {
if (result.success) {
formDatas.value = result.data; formDatas.value = result.data;
ElMessage.success(result.message)
formDatas.value.transferIds = formDatas.value.transferIds.split(","); formDatas.value.transferIds = formDatas.value.transferIds.split(",");
formDatas.value.updateNullFields = ""; formDatas.value.updateNullFields = "";
loading.close(); loading.value = false
}
}).catch(err => {
console.log(err);
}); });
}; };
const onSave = async () => { const onSave = async () => {
const loading = ElLoading.service({
lock: true,
text: "保存数据中",
background: "rgba(0, 0, 0, 0.7)",
});
formDatas.value.transferIds = formDatas.value.transferIds.join(","); formDatas.value.transferIds = formDatas.value.transferIds.join(",");
const result = await postConfigBoilerUpdate({ ...formDatas.value }); const result = await postConfigBoilerUpdate({ ...formDatas.value });
if (result.success) { if (result.success) {
ElMessage.success(result.message)
getListData(); getListData();
loading.close();
ElMessage.success("修改成功");
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment