This commit is contained in:
jiangyinzhi
2024-11-14 11:27:16 +08:00
parent da36f860ca
commit 455c8b58da
19 changed files with 182 additions and 43 deletions
+10 -4
View File
@@ -2,7 +2,7 @@
<div>
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
<div class="yearenergy">
<van-form @submit="handelClickSave">
<van-form @submit="handleClick">
<!-- 年份 -->
<!-- is-link -->
<!-- @click="showDatePicker" -->
@@ -394,7 +394,7 @@
import { Notify } from 'vant'
import { NewAddQyAPI, getQyInfo, EditQyInfo, getInfoByCustomerId } from '@/api/energyReport.js'
import { mapGetters } from "vuex";
import {debounce} from '@/utils/common.js'
export default {
name: 'yearEnergyAddEdit',
data() {
@@ -454,7 +454,8 @@ export default {
heatDemandName: '', // 企业生产工艺用热需求名称显示
notHeatDemandName: '', // 企业非生产工艺用热需求名称显示
heatDemandOtherName: '', // 企业生产工艺用热需求其他具体内容
notHeatDemandOtherName: '' // 企业非生产工艺用热需求其他具体内容
notHeatDemandOtherName: '', // 企业非生产工艺用热需求其他具体内容
doDebounce: null,
};
},
watch: {
@@ -518,7 +519,9 @@ export default {
}
},
mounted() {
this.doDebounce=debounce(async function () {
await this.handelClickSave()
}, 5000, true)
},
methods: {
// 校验总产值与增加值
@@ -736,6 +739,9 @@ export default {
}
this.$refs.checkboxes[index].toggle();
},
handleClick(){
this.doDebounce()
},
// 保存接口
async handelClickSave() {
if(!this.yearForm.energyYear) {