优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user