Commit 5e01974b authored by 裴文涛's avatar 裴文涛
parents 4c8a80c3 71843e84
...@@ -7,6 +7,7 @@ import { postEnergyManage, postEnergyDel, postEnergyUpdate } from "@/api/schedul ...@@ -7,6 +7,7 @@ import { postEnergyManage, postEnergyDel, postEnergyUpdate } from "@/api/schedul
import http from '../../api/http' import http from '../../api/http'
import loading from 'element-plus' import loading from 'element-plus'
import store from '../../store' import store from '../../store'
import { vFloatNumber } from "@/utils/directives.js";
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const tableData = ref([{}]) const tableData = ref([{}])
const formEnergy = ref({ const formEnergy = ref({
...@@ -15,7 +16,7 @@ const formEnergy = ref({ ...@@ -15,7 +16,7 @@ const formEnergy = ref({
"energyType": "", "energyType": "",
"record": "", "record": "",
"recordDate": "", "recordDate": "",
"energyName":'' "energyName": ''
}) })
const energyForm = ref() const energyForm = ref()
const dialogVisible = ref(false) const dialogVisible = ref(false)
...@@ -138,11 +139,11 @@ const handleDelete = async (row) => { ...@@ -138,11 +139,11 @@ const handleDelete = async (row) => {
type: 'warning', type: 'warning',
confirmButtonClass: 'ExitConfirmButton' confirmButtonClass: 'ExitConfirmButton'
}) })
const res = await http.get("api/energy/Delete",{params:{EnergyId:row.energyId}}, false) const res = await http.get("api/energy/Delete", { params: { EnergyId: row.energyId } }, false)
if(res.success) { if (res.success) {
ElMessage.success("删除成功") ElMessage.success("删除成功")
getEnergyData() getEnergyData()
}else { } else {
ElMessage.error("删除失败") ElMessage.error("删除失败")
} }
} }
...@@ -174,7 +175,7 @@ const handleEdit = (val) => { ...@@ -174,7 +175,7 @@ const handleEdit = (val) => {
dialogVisible.value = true dialogVisible.value = true
nextTick(() => { nextTick(() => {
Object.assign(formEnergy.value, { ...val }) Object.assign(formEnergy.value, { ...val })
console.log("val:",val); console.log("val:", val);
// var newArr = [] // var newArr = []
// formEnergy.supplyId.map((item)=> { // formEnergy.supplyId.map((item)=> {
// newArr.push(item[item.length-1]) // newArr.push(item[item.length-1])
...@@ -220,7 +221,7 @@ const onSubmit = () => { ...@@ -220,7 +221,7 @@ const onSubmit = () => {
} }
}) })
} }
const props = { multiple: false, emitPath: false,checkStrictly: true } const props = { multiple: false, emitPath: false, checkStrictly: true }
const enterpriseId = ref(); const enterpriseId = ref();
let supplyIdOptions = reactive([]) let supplyIdOptions = reactive([])
getEnterprise(); getEnterprise();
...@@ -400,7 +401,7 @@ onMounted(() => { ...@@ -400,7 +401,7 @@ onMounted(() => {
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<el-form-item prop="record" style="margin: 0;padding: 0;width: 100%;"> <el-form-item prop="record" style="margin: 0;padding: 0;width: 100%;">
<el-input v-model="formEnergy.record" placeholder="请输入能源用度" /> <el-input v-float-number v-model="formEnergy.record" placeholder="请输入能源用度" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input style="width: 80%" v-model="List.diffPercentage"></el-input> <el-input v-float-number style="width: 80%" v-model="List.diffPercentage"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input style="width: 80%" v-model="List.tempRegulation"></el-input> <el-input v-float-number style="width: 80%" v-model="List.tempRegulation"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -93,6 +93,7 @@ import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling" ...@@ -93,6 +93,7 @@ import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { toRaw } from "@vue/reactivity"; import { toRaw } from "@vue/reactivity";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import http from "../../api/http"; import http from "../../api/http";
import { vFloatNumber } from "@/utils/directives.js";
const loading = ref(false) const loading = ref(false)
......
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