优化
This commit is contained in:
@@ -292,7 +292,7 @@
|
||||
</van-tabs>
|
||||
</div>
|
||||
<div class="footer-btn">
|
||||
<div @click="adddata">保存</div>
|
||||
<div @click="handleClick">保存</div>
|
||||
</div>
|
||||
<van-overlay :show="show">
|
||||
<div class="wrapper" @click.stop>
|
||||
@@ -314,6 +314,7 @@ import { Notify } from 'vant'
|
||||
import { formatymd } from '@/utils/timeUtil.js'
|
||||
import { getLocationMessage, chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
||||
import { downloadUrl } from '@/settings'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header
|
||||
@@ -366,6 +367,7 @@ export default {
|
||||
taskType:"",
|
||||
buildId:"",
|
||||
ifEnterpriseId: '', // 查询是否有enterpriseId,编辑/新增
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -433,6 +435,9 @@ export default {
|
||||
this.getsecondEnergyMeterType()
|
||||
this.getbase()
|
||||
this.getBuildAsk()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.adddata()
|
||||
}, 5000, true)
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
@@ -783,6 +788,9 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
// 保存
|
||||
async adddata() {
|
||||
if(this.showForm) {
|
||||
@@ -840,6 +848,7 @@ export default {
|
||||
|
||||
data.id = this.dataDetail.id
|
||||
let res = await editInfoAPI(data)
|
||||
console.log(res, 'res0---------------------');
|
||||
if (res.code == 0) {
|
||||
// this.active = 0
|
||||
Notify({
|
||||
|
||||
Reference in New Issue
Block a user