Commit 01674fef authored by 王亚晖's avatar 王亚晖
parents 807363c0 88c39c0d
......@@ -6,17 +6,15 @@
<span>瞬时热量对比配置</span>
</div>
<table cellpadding="0" cellspacing="1">
<tr>
<th style="width: 25%">计划名称:</th>
<td style="width: 60%; margin: 0; padding: 0">
<td style="width: 60%; margin:0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
style="width: 80%"
v-model="List.planName"
></el-input>
<el-input style="width: 80%" v-model="List.planName"></el-input>
</td>
</tr>
</table>
......@@ -28,143 +26,114 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
style="width: 80%"
v-model="List.diffPercentage"
></el-input>
<el-input v-float-number style="width: 80%" v-model="List.diffPercentage"></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="width: 25%">判断时间 (分):</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
style="width: 80%"
v-model="List.timeoutMin"
></el-input>
<el-input style="width: 80%" v-model="List.timeoutMin"></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="width: 25%">调节温度 (℃)</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
style="width: 80%"
v-model="List.tempRegulation"
></el-input>
<el-input v-float-number style="width: 80%" v-model="List.tempRegulation"></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="width: 25%">备注</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
style="width: 80%"
type="textarea"
rows="6"
v-model="List.description"
></el-input>
<el-input style="width: 80%" type="textarea" rows="6" v-model="List.description"></el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel"
>关闭</el-button
>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div>
</el-card>
<!-- <AudioPlayer
:option="{
src: aedio,
title: 'your-audio-title',
}"
/> -->
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from "vue";
import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling";
import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { ElMessage } from "element-plus";
import http from "../../api/http";
import aedio from "./aedio.mp3"
import { vFloatNumber } from "@/utils/directives.js";
const loading = ref(false);
import AudioPlayer from "vue3-audio-player";
import "vue3-audio-player/dist/style.css";
const audioList = ref([]);
const handleBeforePlay = (next) => {
this.currentAudioName =
audioList[this.$refs.audioPlayer.currentPlayIndex].title;
next(); // Start play
};
const loading = ref(false)
const List = ref([
{
planId: "",
planName: "",
diffPercentage: "",
timeoutMin: "",
tempRegulation: "",
description: "",
isActive: "",
},
]);
"planId": "",
"planName": "",
"diffPercentage": "",
"timeoutMin": "",
"tempRegulation": "",
"description": "",
"isActive": ''
}
])
const getInstanceHeat = async () => {
loading.value = true;
loading.value = true
const data = await postInstantHeat();
console.log(data);
List.value = data.data[0];
loading.value = false;
};
List.value = data.data[0]
loading.value = false
}
const onSave = async () => {
// await postInstantHeatUpdate(List.value)
await http
.post(
"/api/Scheduling/BizInstantaneousHeat/Update",
{ ...List.value },
false
)
.then((result) => {})
.catch((error) => {
console.log(error);
});
ElMessage.success("修改成功");
getInstanceHeat();
};
await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((result) => {
}).catch((error) => {
console.log(error)
})
ElMessage.success('修改成功')
getInstanceHeat()
}
onMounted(() => {
getInstanceHeat();
});
getInstanceHeat()
})
</script>
<style lang="less" scoped>
.card-contianer {
background-color: #dfe8f6;
background-color: #DFE8F6;
}
.card-header {
......@@ -177,8 +146,10 @@ onMounted(() => {
.btngrounp {
margin-top: 10px;
text-align: center;
}
table {
width: 100%;
}
......@@ -190,28 +161,32 @@ td {
font-size: 14px;
margin: 0;
padding: 0;
}
table {
width: 100%;
border-collapse: collapse;
}
table th {
background-color: #f2f6f8;
background-color: #F2F6F8;
text-align: center;
padding: 5px 10px;
border: 1px solid #dfe8f6;
border: 1px solid #DFE8F6;
}
table td {
text-align: center;
background-color: #ffffff;
padding: 5px 10px;
border: 1px solid #dfe8f6;
border: 1px solid #DFE8F6;
border-bottom: 0;
}
table.botList td {
width: 33%;
text-align: left;
......
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