优化
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
|
||||
<van-form ref="form" @submit="handelClickSave">
|
||||
<van-form ref="form" @submit="handleClick">
|
||||
<div class="yearenergy">
|
||||
<div class="year-main">
|
||||
<div class="nengyuan">
|
||||
@@ -42,6 +42,7 @@ import { Notify } from "vant";
|
||||
// import Header from "@/components/headerNew";
|
||||
import mixin from '@/mixins/mixin'
|
||||
import Year from '../facilityManage/common-vue/year.vue'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header,
|
||||
@@ -64,7 +65,8 @@ export default {
|
||||
efficiency: '',
|
||||
userYear: '',
|
||||
},
|
||||
show: false
|
||||
show: false,
|
||||
doDebounce: null,
|
||||
};
|
||||
},
|
||||
activated() {
|
||||
@@ -99,7 +101,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.doDebounce = debounce(async function () {
|
||||
await this.handelClickSave()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
handelChange (params,num,name) {
|
||||
@@ -125,6 +129,9 @@ export default {
|
||||
onClickLeft() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
async handelClickSave() {
|
||||
if(this.id == '') {
|
||||
this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId;
|
||||
|
||||
Reference in New Issue
Block a user