Commit 7887dd94 authored by xuke's avatar xuke

完善-瞬时热量

parent 562534e4
......@@ -5,9 +5,7 @@
<div class="card-header">
<span>瞬时热量对比配置</span>
</div>
<table cellpadding="0" cellspacing="1">
<table v-loading="loading" cellpadding="0" cellspacing="1">
<tr>
<th style="width: 25%">计划名称:</th>
<td style="width: 60%; margin:0; padding: 0">
......@@ -96,7 +94,7 @@ import { vFloatNumber } from "@/utils/directives.js";
const loading = ref(false)
const List = ref([
const List = ref(
{
"planId": "",
"planName": "",
......@@ -106,25 +104,28 @@ const List = ref([
"description": "",
"isActive": ''
}
])
)
const getInstanceHeat = async () => {
const getInstanceHeat = () => {
loading.value = true
const data = await postInstantHeat();
console.log(data);
List.value = data.data[0]
http.post("api/Scheduling/BizInstantaneousHeat/Get", false).then(res => {
if (res.success) {
List.value = res.data[0]
console.log("res.data===>", res.data);
loading.value = false
}
})
}
const onSave = async () => {
// await postInstantHeatUpdate(List.value)
await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((result) => {
const onSave = () => {
http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((res) => {
if (res.success) {
ElMessage.success(res.message)
getInstanceHeat()
}
}).catch((error) => {
console.log(error)
})
ElMessage.success('修改成功')
getInstanceHeat()
}
onMounted(() => {
getInstanceHeat()
......
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