优化
This commit is contained in:
@@ -129,6 +129,7 @@ export default {
|
||||
showSubmit: false,
|
||||
taskId: '',
|
||||
customerId: '',
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -136,6 +137,9 @@ export default {
|
||||
this.taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId
|
||||
this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId
|
||||
this.getHistory()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
// 查询打卡记录
|
||||
@@ -240,9 +244,9 @@ export default {
|
||||
})
|
||||
return list
|
||||
},
|
||||
handleClick:debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true),
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
// 保存
|
||||
save() {
|
||||
if (this.$refs.uploaderRef.checkImgisUpload(this.text1)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-form ref="form" @submit="save" :disabled="showForm">
|
||||
<van-form ref="form" @submit="handleClick" :disabled="showForm">
|
||||
|
||||
<Loading :loading="loading" />
|
||||
<!-- 选项卡 -->
|
||||
@@ -59,6 +59,7 @@
|
||||
<van-cell title="已使用清洁能源" required is-link :value="result1" @click="showPicker4 = !showForm" />
|
||||
<van-field v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1, message: '请填写光伏总建设面积' }]" label="光伏总建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
||||
</van-field>
|
||||
<div class="tips" v-if="tips8 == true">光伏总建设面积+可利用屋面面积<总建筑面积</div>
|
||||
<van-field v-model="formData.photovoltaicPhotovoltaic" required :rules="[{ required: gfShow == 1, message: '请填写总装机容量' }]" label="光伏总装机容量(kW)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
||||
</van-field>
|
||||
<van-cell title="是否采用再生水" is-link :value="showData.reclaimedWater1" @click="showPicker5 = !showForm" />
|
||||
@@ -312,6 +313,7 @@ import {
|
||||
// downloadFile,
|
||||
} from '@/api/api.js'
|
||||
// import { debuglog } from 'util'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header,
|
||||
@@ -331,6 +333,7 @@ export default {
|
||||
tips5: false,
|
||||
tips6: false,
|
||||
tips7: false,
|
||||
// tips8: false,
|
||||
newAnswer: [], // 问答题存
|
||||
loading:false,
|
||||
result1: '无',
|
||||
@@ -591,7 +594,8 @@ export default {
|
||||
codeType: 'ptgnbh',
|
||||
}
|
||||
],
|
||||
validateData: ''
|
||||
validateData: '',
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -660,6 +664,12 @@ export default {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
tips8(){
|
||||
if(Number(this.formData.photovoltaicArea) + Number(this.formData.availableArea) < this.formData.totalArea){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -686,6 +696,9 @@ export default {
|
||||
}else{
|
||||
this.validateData = 50
|
||||
}
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
// this.getWaterType()
|
||||
// this.getWqjg()
|
||||
// this.getMcbl()
|
||||
@@ -1784,6 +1797,9 @@ export default {
|
||||
// })
|
||||
// })
|
||||
},
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
// 新增保存建筑基本信息
|
||||
save() {
|
||||
this.$refs.form.validate()
|
||||
@@ -1841,7 +1857,7 @@ export default {
|
||||
// this.formData.enquireIds = this.aarr1.concat(this.aarr)
|
||||
// }
|
||||
// this.tips6 == true ||
|
||||
if(this.tips0 == true || this.tips1 == true || this.tips2 == true || this.tips3 == true || this.tips4 == true || this.tips6 == true || this.tips7 == true){
|
||||
if(this.tips0 == true || this.tips1 == true || this.tips2 == true || this.tips3 == true || this.tips4 == true || this.tips6 == true || this.tips7 == true|| this.tips8 == true){
|
||||
return;
|
||||
}
|
||||
this.formData.enquireIds = this.newAnswer.join();
|
||||
|
||||
@@ -301,6 +301,7 @@ export default {
|
||||
scrollPosition: 0,
|
||||
pageN: 1,
|
||||
isList: false,
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -319,6 +320,9 @@ export default {
|
||||
// sessionStorage.removeItem('tidCid')
|
||||
},
|
||||
async mounted() {
|
||||
this.doDebounce = debounce(function (item) {
|
||||
this.getReport(item)
|
||||
}, 5000, true)
|
||||
this.scrollPosition = sessionStorage.getItem('scrollableDiv') || 0
|
||||
this.pageN = sessionStorage.getItem('pageNum') || 1
|
||||
await this.getTaskType()
|
||||
@@ -480,9 +484,9 @@ export default {
|
||||
query: item
|
||||
})
|
||||
},
|
||||
togenReport:debounce(function () {
|
||||
this.getReport()
|
||||
}, 5000, true),
|
||||
togenReport(item){
|
||||
this.doDebounce(item)
|
||||
},
|
||||
// 生成诊断报告
|
||||
getReport(item) {
|
||||
this.pageN = this.page.pageNum
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<div class="btn" >
|
||||
<button @click="handelClickClose(item)">取消</button>
|
||||
<button @click="hanelClickReply(item)">回复</button>
|
||||
<button @click="handleClick(item)">回复</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -100,6 +100,7 @@ import { getCurrentUserEvaluate, getCurrentUserEvaluateAdd } from '@/api/evaluat
|
||||
import { Notify } from 'vant'
|
||||
import Loading from '@/components/loading'
|
||||
import { downloadUrl } from '@/settings'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
name: 'userEvaluate',
|
||||
components: {
|
||||
@@ -116,6 +117,7 @@ export default {
|
||||
overlayShow: false,
|
||||
// 报告价值
|
||||
reportLevel: {},
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
@@ -124,6 +126,9 @@ export default {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.doDebounce = debounce(function (item) {
|
||||
this.hanelClickReply(item)
|
||||
}, 5000, true)
|
||||
this.getuserEvaluate()
|
||||
},
|
||||
methods: {
|
||||
@@ -187,6 +192,9 @@ export default {
|
||||
item.show = false
|
||||
item.showTextArea = false
|
||||
},
|
||||
handleClick(item) {
|
||||
this.doDebounce(item)
|
||||
},
|
||||
//点击回复按钮
|
||||
async hanelClickReply(item) {
|
||||
console.log(item);
|
||||
|
||||
Reference in New Issue
Block a user