优化
This commit is contained in:
@@ -183,7 +183,8 @@ export default {
|
||||
taskId: '',
|
||||
customerId: '',
|
||||
// year: ''
|
||||
}
|
||||
},
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@@ -220,6 +221,9 @@ export default {
|
||||
created() {
|
||||
this.level = sessionStorage.getItem('level')
|
||||
this.getEnergyReportInfo()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('report', ['setEnergyReportInfo']),
|
||||
@@ -416,9 +420,9 @@ export default {
|
||||
this.$router.push({path: '/energyReport'})
|
||||
},
|
||||
// 重新生成
|
||||
generateReport:debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true),
|
||||
generateReport(){
|
||||
this.doDebounce()
|
||||
},
|
||||
async getGenerateReport() {
|
||||
let data = {
|
||||
customerId: this.energyData.customerId,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<div
|
||||
class="main2-content"
|
||||
@click="energyadd"
|
||||
@click="handleClick"
|
||||
v-if="showList.length < 4"
|
||||
>
|
||||
<img src="@/assets/数据采集-新增.png" alt="" />
|
||||
@@ -103,6 +103,7 @@ import { changeSubStateType, taskList } from '@/api/api'
|
||||
|
||||
// import img1 from '@/assets/gyqy/three.png'
|
||||
// import EnergyManagement from './energyManagement.vue'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -143,6 +144,7 @@ export default {
|
||||
records: [],
|
||||
tidCid: null,
|
||||
enterpriseSystemId: null,
|
||||
doDebounce: null,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -153,6 +155,9 @@ export default {
|
||||
this.getEnergyList()
|
||||
this.getCustomerType()
|
||||
this.getSingleTaskInfo()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.energyadd()
|
||||
}, 5000, true)
|
||||
},
|
||||
mounted() {
|
||||
// alert(this.$route.params.enterpriseId)
|
||||
@@ -258,6 +263,9 @@ export default {
|
||||
toGeneral(url) {
|
||||
this.$router.push(url)
|
||||
},
|
||||
handleClick() {
|
||||
this.doDebounce()
|
||||
},
|
||||
energyadd() {
|
||||
if(this.showList.length === 0){
|
||||
this.addSystem()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn" @click="save">
|
||||
<div class="footer-btn" @click="handleClick">
|
||||
<div>保存</div>
|
||||
</div>
|
||||
<!-- 年份选择 -->
|
||||
@@ -40,6 +40,7 @@
|
||||
import { getCode } from '@/api/common.js'
|
||||
import { Notify } from "vant";
|
||||
import { reformAdd, reformGetInfo, reformEdit } from "@/api/universalEnergy.js"
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -64,7 +65,8 @@ export default {
|
||||
customerId: '', // 用户id
|
||||
getGzId: '', // 改造id
|
||||
id: '', // 修改时所用id
|
||||
show: false
|
||||
show: false,
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -79,6 +81,9 @@ export default {
|
||||
this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId;
|
||||
this.getType()
|
||||
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
|
||||
},
|
||||
mounted() {
|
||||
@@ -157,6 +162,9 @@ export default {
|
||||
this.gzDate = year + '-' + month + '-' + day;
|
||||
this.datePicker = false
|
||||
},
|
||||
handleClick() {
|
||||
this.doDebounce()
|
||||
},
|
||||
// 保存
|
||||
save() {
|
||||
let taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn" @click="save">
|
||||
<div class="footer-btn" @click="handleClick">
|
||||
<div>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,6 +128,7 @@ import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
|
||||
import { downloadUrl } from '@/settings'
|
||||
|
||||
// import Header from "@/components/headerNew";
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header,
|
||||
@@ -161,6 +162,7 @@ export default {
|
||||
img1:'0,0,0',
|
||||
img3:'0,0,0',
|
||||
img4:'0,0,0',
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -172,6 +174,9 @@ export default {
|
||||
this.getid = msg2.id
|
||||
}
|
||||
this.getList();
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
},
|
||||
activated() {
|
||||
|
||||
@@ -395,6 +400,9 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
this.doDebounce()
|
||||
},
|
||||
|
||||
save() {
|
||||
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
|
||||
|
||||
@@ -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">
|
||||
@@ -41,6 +41,7 @@ import { pumpAdd, pumpGetInfo, pumpEdit } from "@/api/universalEnergy.js"
|
||||
import { Notify } from "vant";
|
||||
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: {
|
||||
handelChangeNumber (params,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;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<div class="btn" @click="sure">
|
||||
<div class="btn" @click="handleClick">
|
||||
<van-button size="large" class="faqi">
|
||||
确认
|
||||
</van-button>
|
||||
@@ -31,6 +31,7 @@ import { getInfoByCustomerId } from '@/api/universalEnergy.js'
|
||||
// import Header from "@/components/headerNew";
|
||||
import { enterprisAdd, enterprisEdit } from "@/api/universalEnergy.js"
|
||||
// import Header from "@/components/headerNew";
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
name: '',
|
||||
components: {
|
||||
@@ -75,7 +76,8 @@ export default {
|
||||
}
|
||||
],
|
||||
checkCurrent: null,
|
||||
numArr: []
|
||||
numArr: [],
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -84,6 +86,9 @@ export default {
|
||||
this.systemTypes = this.$route.query.systemTypes;
|
||||
this.systemId = sessionStorage.getItem('enterpriseSystemId');
|
||||
this.setGray()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.sure()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
// 选择客户数据处理
|
||||
@@ -102,6 +107,9 @@ export default {
|
||||
this.radio = index
|
||||
}
|
||||
},
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
// 跳转
|
||||
sure() {
|
||||
let tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn" @click="save">
|
||||
<div class="footer-btn" @click="handleClick">
|
||||
<div>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,6 +120,7 @@ import { Notify } from "vant";
|
||||
|
||||
import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
|
||||
import { downloadUrl } from '@/settings'
|
||||
import {debounce} from '@/utils/common.js'
|
||||
|
||||
// import Header from "@/components/headerNew";
|
||||
export default {
|
||||
@@ -155,6 +156,7 @@ export default {
|
||||
img1:'0,0,0',
|
||||
img2:'0,0,0',
|
||||
img4:'0,0,0',
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -166,6 +168,9 @@ export default {
|
||||
this.getid = msg2.id
|
||||
}
|
||||
this.getList();
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
},
|
||||
// activated() {
|
||||
|
||||
@@ -398,6 +403,9 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
save() {
|
||||
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
|
||||
return
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn" @click="save">
|
||||
<div class="footer-btn" @click="handleClick">
|
||||
<div>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -128,6 +128,7 @@ import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
|
||||
import { downloadUrl } from '@/settings'
|
||||
|
||||
// import Header from "@/components/headerNew";
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header,
|
||||
@@ -161,6 +162,7 @@ export default {
|
||||
img2:'0,0,0',
|
||||
img3:'0,0,0',
|
||||
img4:'0,0,0',
|
||||
doDebounce: null,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -173,6 +175,9 @@ export default {
|
||||
this.getid = msg2.id
|
||||
}
|
||||
this.getList();
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
},
|
||||
activated() {
|
||||
|
||||
@@ -383,7 +388,9 @@ export default {
|
||||
const i = this.aarr1.findIndex((ele) => ele == item.enquireId)
|
||||
this.aarr1.splice(i, 1)
|
||||
},
|
||||
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
// 保存
|
||||
save() {
|
||||
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn" @click="save">
|
||||
<div class="footer-btn" @click="handleClick">
|
||||
<div>保存</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,6 +124,7 @@ import { Notify } from "vant";
|
||||
import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
|
||||
import { downloadUrl } from '@/settings'
|
||||
// import Header from "@/components/headerNew"
|
||||
import {debounce} from '@/utils/common.js'
|
||||
export default {
|
||||
components: {
|
||||
// Header,
|
||||
@@ -156,6 +157,7 @@ export default {
|
||||
img1:'0,0,0',
|
||||
img2:'0,0,0',
|
||||
img3:'0,0,0',
|
||||
doDebounce: null,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -168,6 +170,9 @@ export default {
|
||||
this.getid = msg2.id
|
||||
}
|
||||
this.getList();
|
||||
this.doDebounce = debounce(function () {
|
||||
this.save()
|
||||
}, 5000, true)
|
||||
},
|
||||
activated() {
|
||||
|
||||
@@ -398,6 +403,9 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
handleClick(){
|
||||
this.doDebounce()
|
||||
},
|
||||
save() {
|
||||
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
|
||||
return
|
||||
|
||||
@@ -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 mixin from '@/mixins/mixin'
|
||||
// import Header from "@/components/headerNew";
|
||||
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() {
|
||||
@@ -98,7 +100,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.doDebounce = debounce(async function () {
|
||||
await this.handelClickSave()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
handelChange (params,num,name) {
|
||||
@@ -124,6 +128,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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
<van-field v-input.float v-show="energySaviRatioShow" required :rules="[{ required: energySaviRatioShow, message:'请填写占比' }]" v-model="form.energySaviRatio" label="节能灯占比(%)" type="number" label-width="140" input-align="right" placeholder="请输入" @input="handelChangeNumber('energySaviRatio')" />
|
||||
|
||||
<van-field v-input.float v-show="showOther" required v-model="form.otherRatio" label="其它占比(%)" type="number" label-width="140" input-align="right" placeholder="请输入" readonly />
|
||||
|
||||
<van-field v-input.numNo0 v-model="form.totalNum" label="合计数量约(盏)" type="number" required :rules="[{ required: true, message: '请填写合计数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
|
||||
<!-- 是否进行过设备改造 -->
|
||||
@@ -225,6 +227,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showOther(){
|
||||
return this.ledRatioShow||this.fluorescentRadioShow||this.incandescentRadioShow||this.energySaviRatioShow
|
||||
},
|
||||
showForm() {
|
||||
if(this.tidCid.taskId) {
|
||||
return false
|
||||
@@ -615,6 +620,7 @@ export default {
|
||||
|
||||
|
||||
this.checkboxShow = false
|
||||
this.handelChangeNumber()
|
||||
},
|
||||
|
||||
handelChangeNumber(title) {
|
||||
@@ -638,6 +644,8 @@ export default {
|
||||
if(num > 100) {
|
||||
Notify({ type: "danger", message: '不可超过100%' });
|
||||
this.form[title] = 0
|
||||
}else{
|
||||
this.form.otherRatio = 100 - num
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ export default {
|
||||
customerId: '',
|
||||
// year: ''
|
||||
},
|
||||
toast:null
|
||||
toast:null,
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
components:{
|
||||
@@ -248,6 +249,9 @@ export default {
|
||||
// },
|
||||
created() {
|
||||
this.userLevel()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true)
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@@ -429,9 +433,9 @@ export default {
|
||||
this.option1 = arr
|
||||
},
|
||||
// 重新生成
|
||||
generateReport:debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true),
|
||||
generateReport(){
|
||||
this.doDebounce()
|
||||
},
|
||||
async getGenerateReport() {
|
||||
let data = {
|
||||
customerId:
|
||||
|
||||
Reference in New Issue
Block a user