This commit is contained in:
jiangyinzhi
2024-11-14 11:27:16 +08:00
parent da36f860ca
commit 455c8b58da
19 changed files with 182 additions and 43 deletions
+8 -4
View File
@@ -183,7 +183,8 @@ export default {
taskId: '', taskId: '',
customerId: '', customerId: '',
// year: '' // year: ''
} },
doDebounce: null,
} }
}, },
beforeDestroy() { beforeDestroy() {
@@ -220,6 +221,9 @@ export default {
created() { created() {
this.level = sessionStorage.getItem('level') this.level = sessionStorage.getItem('level')
this.getEnergyReportInfo() this.getEnergyReportInfo()
this.doDebounce = debounce(function () {
this.getGenerateReport()
}, 5000, true)
}, },
methods: { methods: {
...mapMutations('report', ['setEnergyReportInfo']), ...mapMutations('report', ['setEnergyReportInfo']),
@@ -416,9 +420,9 @@ export default {
this.$router.push({path: '/energyReport'}) this.$router.push({path: '/energyReport'})
}, },
// 重新生成 // 重新生成
generateReport:debounce(function () { generateReport(){
this.getGenerateReport() this.doDebounce()
}, 5000, true), },
async getGenerateReport() { async getGenerateReport() {
let data = { let data = {
customerId: this.energyData.customerId, customerId: this.energyData.customerId,
+7 -3
View File
@@ -129,6 +129,7 @@ export default {
showSubmit: false, showSubmit: false,
taskId: '', taskId: '',
customerId: '', customerId: '',
doDebounce: null,
} }
}, },
mounted() { mounted() {
@@ -136,6 +137,9 @@ export default {
this.taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId this.taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId
this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId
this.getHistory() this.getHistory()
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
methods: { methods: {
// 查询打卡记录 // 查询打卡记录
@@ -240,9 +244,9 @@ export default {
}) })
return list return list
}, },
handleClick:debounce(function () { handleClick(){
this.save() this.doDebounce()
}, 5000, true), },
// 保存 // 保存
save() { save() {
if (this.$refs.uploaderRef.checkImgisUpload(this.text1)) { if (this.$refs.uploaderRef.checkImgisUpload(this.text1)) {
@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<van-form ref="form" @submit="save" :disabled="showForm"> <van-form ref="form" @submit="handleClick" :disabled="showForm">
<Loading :loading="loading" /> <Loading :loading="loading" />
<!-- 选项卡 --> <!-- 选项卡 -->
@@ -59,6 +59,7 @@
<van-cell title="已使用清洁能源" required is-link :value="result1" @click="showPicker4 = !showForm" /> <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 v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1, message: '请填写光伏总建设面积' }]" label="光伏总建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
</van-field> </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 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-field>
<van-cell title="是否采用再生水" is-link :value="showData.reclaimedWater1" @click="showPicker5 = !showForm" /> <van-cell title="是否采用再生水" is-link :value="showData.reclaimedWater1" @click="showPicker5 = !showForm" />
@@ -312,6 +313,7 @@ import {
// downloadFile, // downloadFile,
} from '@/api/api.js' } from '@/api/api.js'
// import { debuglog } from 'util' // import { debuglog } from 'util'
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -331,6 +333,7 @@ export default {
tips5: false, tips5: false,
tips6: false, tips6: false,
tips7: false, tips7: false,
// tips8: false,
newAnswer: [], // 问答题存 newAnswer: [], // 问答题存
loading:false, loading:false,
result1: '无', result1: '无',
@@ -591,7 +594,8 @@ export default {
codeType: 'ptgnbh', codeType: 'ptgnbh',
} }
], ],
validateData: '' validateData: '',
doDebounce: null,
} }
}, },
watch: { watch: {
@@ -660,6 +664,12 @@ export default {
return true return true
} }
return false return false
},
tips8(){
if(Number(this.formData.photovoltaicArea) + Number(this.formData.availableArea) < this.formData.totalArea){
return false
}
return true
} }
}, },
created() { created() {
@@ -686,6 +696,9 @@ export default {
}else{ }else{
this.validateData = 50 this.validateData = 50
} }
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
// this.getWaterType() // this.getWaterType()
// this.getWqjg() // this.getWqjg()
// this.getMcbl() // this.getMcbl()
@@ -1784,6 +1797,9 @@ export default {
// }) // })
// }) // })
}, },
handleClick(){
this.doDebounce()
},
// 新增保存建筑基本信息 // 新增保存建筑基本信息
save() { save() {
this.$refs.form.validate() this.$refs.form.validate()
@@ -1841,7 +1857,7 @@ export default {
// this.formData.enquireIds = this.aarr1.concat(this.aarr) // this.formData.enquireIds = this.aarr1.concat(this.aarr)
// } // }
// this.tips6 == true || // 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; return;
} }
this.formData.enquireIds = this.newAnswer.join(); this.formData.enquireIds = this.newAnswer.join();
+7 -3
View File
@@ -301,6 +301,7 @@ export default {
scrollPosition: 0, scrollPosition: 0,
pageN: 1, pageN: 1,
isList: false, isList: false,
doDebounce: null,
} }
}, },
watch: { watch: {
@@ -319,6 +320,9 @@ export default {
// sessionStorage.removeItem('tidCid') // sessionStorage.removeItem('tidCid')
}, },
async mounted() { async mounted() {
this.doDebounce = debounce(function (item) {
this.getReport(item)
}, 5000, true)
this.scrollPosition = sessionStorage.getItem('scrollableDiv') || 0 this.scrollPosition = sessionStorage.getItem('scrollableDiv') || 0
this.pageN = sessionStorage.getItem('pageNum') || 1 this.pageN = sessionStorage.getItem('pageNum') || 1
await this.getTaskType() await this.getTaskType()
@@ -480,9 +484,9 @@ export default {
query: item query: item
}) })
}, },
togenReport:debounce(function () { togenReport(item){
this.getReport() this.doDebounce(item)
}, 5000, true), },
// 生成诊断报告 // 生成诊断报告
getReport(item) { getReport(item) {
this.pageN = this.page.pageNum this.pageN = this.page.pageNum
+9 -1
View File
@@ -57,7 +57,7 @@
<div class="btn" > <div class="btn" >
<button @click="handelClickClose(item)">取消</button> <button @click="handelClickClose(item)">取消</button>
<button @click="hanelClickReply(item)">回复</button> <button @click="handleClick(item)">回复</button>
</div> </div>
@@ -100,6 +100,7 @@ import { getCurrentUserEvaluate, getCurrentUserEvaluateAdd } from '@/api/evaluat
import { Notify } from 'vant' import { Notify } from 'vant'
import Loading from '@/components/loading' import Loading from '@/components/loading'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
import {debounce} from '@/utils/common.js'
export default { export default {
name: 'userEvaluate', name: 'userEvaluate',
components: { components: {
@@ -116,6 +117,7 @@ export default {
overlayShow: false, overlayShow: false,
// 报告价值 // 报告价值
reportLevel: {}, reportLevel: {},
doDebounce: null,
} }
}, },
activated() { activated() {
@@ -124,6 +126,9 @@ export default {
}, },
created() { created() {
this.doDebounce = debounce(function (item) {
this.hanelClickReply(item)
}, 5000, true)
this.getuserEvaluate() this.getuserEvaluate()
}, },
methods: { methods: {
@@ -187,6 +192,9 @@ export default {
item.show = false item.show = false
item.showTextArea = false item.showTextArea = false
}, },
handleClick(item) {
this.doDebounce(item)
},
//点击回复按钮 //点击回复按钮
async hanelClickReply(item) { async hanelClickReply(item) {
console.log(item); console.log(item);
+9 -1
View File
@@ -71,7 +71,7 @@
<div <div
class="main2-content" class="main2-content"
@click="energyadd" @click="handleClick"
v-if="showList.length < 4" v-if="showList.length < 4"
> >
<img src="@/assets/数据采集-新增.png" alt="" /> <img src="@/assets/数据采集-新增.png" alt="" />
@@ -103,6 +103,7 @@ import { changeSubStateType, taskList } from '@/api/api'
// import img1 from '@/assets/gyqy/three.png' // import img1 from '@/assets/gyqy/three.png'
// import EnergyManagement from './energyManagement.vue' // import EnergyManagement from './energyManagement.vue'
import {debounce} from '@/utils/common.js'
export default { export default {
data() { data() {
return { return {
@@ -143,6 +144,7 @@ export default {
records: [], records: [],
tidCid: null, tidCid: null,
enterpriseSystemId: null, enterpriseSystemId: null,
doDebounce: null,
} }
}, },
@@ -153,6 +155,9 @@ export default {
this.getEnergyList() this.getEnergyList()
this.getCustomerType() this.getCustomerType()
this.getSingleTaskInfo() this.getSingleTaskInfo()
this.doDebounce = debounce(function () {
this.energyadd()
}, 5000, true)
}, },
mounted() { mounted() {
// alert(this.$route.params.enterpriseId) // alert(this.$route.params.enterpriseId)
@@ -258,6 +263,9 @@ export default {
toGeneral(url) { toGeneral(url) {
this.$router.push(url) this.$router.push(url)
}, },
handleClick() {
this.doDebounce()
},
energyadd() { energyadd() {
if(this.showList.length === 0){ if(this.showList.length === 0){
this.addSystem() this.addSystem()
+10 -2
View File
@@ -10,7 +10,7 @@
</van-cell-group> </van-cell-group>
</div> </div>
</div> </div>
<div class="footer-btn" @click="save"> <div class="footer-btn" @click="handleClick">
<div>保存</div> <div>保存</div>
</div> </div>
<!-- 年份选择 --> <!-- 年份选择 -->
@@ -40,6 +40,7 @@
import { getCode } from '@/api/common.js' import { getCode } from '@/api/common.js'
import { Notify } from "vant"; import { Notify } from "vant";
import { reformAdd, reformGetInfo, reformEdit } from "@/api/universalEnergy.js" import { reformAdd, reformGetInfo, reformEdit } from "@/api/universalEnergy.js"
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
@@ -64,7 +65,8 @@ export default {
customerId: '', // 用户id customerId: '', // 用户id
getGzId: '', // 改造id getGzId: '', // 改造id
id: '', // 修改时所用id id: '', // 修改时所用id
show: false show: false,
doDebounce: null,
} }
}, },
created() { created() {
@@ -79,6 +81,9 @@ export default {
this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId; this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId;
this.getType() this.getType()
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
mounted() { mounted() {
@@ -157,6 +162,9 @@ export default {
this.gzDate = year + '-' + month + '-' + day; this.gzDate = year + '-' + month + '-' + day;
this.datePicker = false this.datePicker = false
}, },
handleClick() {
this.doDebounce()
},
// 保存 // 保存
save() { save() {
let taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId let taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId
+9 -1
View File
@@ -102,7 +102,7 @@
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div> <div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
</div> </div>
</div> </div>
<div class="footer-btn" @click="save"> <div class="footer-btn" @click="handleClick">
<div>保存</div> <div>保存</div>
</div> </div>
</div> </div>
@@ -128,6 +128,7 @@ import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -161,6 +162,7 @@ export default {
img1:'0,0,0', img1:'0,0,0',
img3:'0,0,0', img3:'0,0,0',
img4:'0,0,0', img4:'0,0,0',
doDebounce: null,
} }
}, },
created() { created() {
@@ -172,6 +174,9 @@ export default {
this.getid = msg2.id this.getid = msg2.id
} }
this.getList(); this.getList();
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
activated() { activated() {
@@ -395,6 +400,9 @@ export default {
}) })
}, },
handleClick() {
this.doDebounce()
},
save() { save() {
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) { if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
+10 -3
View File
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> --> <!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
<van-form ref="form" @submit="handelClickSave"> <van-form ref="form" @submit="handleClick">
<div class="yearenergy"> <div class="yearenergy">
<div class="year-main"> <div class="year-main">
<div class="nengyuan"> <div class="nengyuan">
@@ -41,6 +41,7 @@ import { pumpAdd, pumpGetInfo, pumpEdit } from "@/api/universalEnergy.js"
import { Notify } from "vant"; import { Notify } from "vant";
import mixin from '@/mixins/mixin' import mixin from '@/mixins/mixin'
import Year from '../facilityManage/common-vue/year.vue' import Year from '../facilityManage/common-vue/year.vue'
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -64,7 +65,8 @@ export default {
efficiency: '', efficiency: '',
userYear: '', userYear: '',
}, },
show: false show: false,
doDebounce: null,
}; };
}, },
activated() { activated() {
@@ -99,7 +101,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.doDebounce = debounce(async function () {
await this.handelClickSave()
}, 5000, true)
}, },
methods: { methods: {
handelChangeNumber (params,name) { handelChangeNumber (params,name) {
@@ -125,6 +129,9 @@ export default {
onClickLeft() { onClickLeft() {
this.$router.go(-1) this.$router.go(-1)
}, },
handleClick(){
this.doDebounce()
},
async handelClickSave() { async handelClickSave() {
if(this.id == '') { if(this.id == '') {
this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId; this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId;
+10 -2
View File
@@ -18,7 +18,7 @@
</van-cell-group> </van-cell-group>
</van-radio-group> </van-radio-group>
</div> </div>
<div class="btn" @click="sure"> <div class="btn" @click="handleClick">
<van-button size="large" class="faqi"> <van-button size="large" class="faqi">
确认 确认
</van-button> </van-button>
@@ -31,6 +31,7 @@ import { getInfoByCustomerId } from '@/api/universalEnergy.js'
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import { enterprisAdd, enterprisEdit } from "@/api/universalEnergy.js" import { enterprisAdd, enterprisEdit } from "@/api/universalEnergy.js"
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import {debounce} from '@/utils/common.js'
export default { export default {
name: '', name: '',
components: { components: {
@@ -75,7 +76,8 @@ export default {
} }
], ],
checkCurrent: null, checkCurrent: null,
numArr: [] numArr: [],
doDebounce: null,
} }
}, },
mounted() { mounted() {
@@ -84,6 +86,9 @@ export default {
this.systemTypes = this.$route.query.systemTypes; this.systemTypes = this.$route.query.systemTypes;
this.systemId = sessionStorage.getItem('enterpriseSystemId'); this.systemId = sessionStorage.getItem('enterpriseSystemId');
this.setGray() this.setGray()
this.doDebounce = debounce(function () {
this.sure()
}, 5000, true)
}, },
methods: { methods: {
// 选择客户数据处理 // 选择客户数据处理
@@ -102,6 +107,9 @@ export default {
this.radio = index this.radio = index
} }
}, },
handleClick(){
this.doDebounce()
},
// 跳转 // 跳转
sure() { sure() {
let tidCid = JSON.parse(sessionStorage.getItem('tidCid')) let tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
+10 -1
View File
@@ -292,7 +292,7 @@
</van-tabs> </van-tabs>
</div> </div>
<div class="footer-btn"> <div class="footer-btn">
<div @click="adddata">保存</div> <div @click="handleClick">保存</div>
</div> </div>
<van-overlay :show="show"> <van-overlay :show="show">
<div class="wrapper" @click.stop> <div class="wrapper" @click.stop>
@@ -314,6 +314,7 @@ import { Notify } from 'vant'
import { formatymd } from '@/utils/timeUtil.js' import { formatymd } from '@/utils/timeUtil.js'
import { getLocationMessage, chooseAlbumAndTakePhoto } from '@/utils/dsbridge' import { getLocationMessage, chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header // Header
@@ -366,6 +367,7 @@ export default {
taskType:"", taskType:"",
buildId:"", buildId:"",
ifEnterpriseId: '', // 查询是否有enterpriseId,编辑/新增 ifEnterpriseId: '', // 查询是否有enterpriseId,编辑/新增
doDebounce: null,
} }
}, },
computed: { computed: {
@@ -433,6 +435,9 @@ export default {
this.getsecondEnergyMeterType() this.getsecondEnergyMeterType()
this.getbase() this.getbase()
this.getBuildAsk() this.getBuildAsk()
this.doDebounce = debounce(function () {
this.adddata()
}, 5000, true)
}, },
mounted() { mounted() {
this.getList() this.getList()
@@ -783,6 +788,9 @@ export default {
}) })
} }
}, },
handleClick(){
this.doDebounce()
},
// 保存 // 保存
async adddata() { async adddata() {
if(this.showForm) { if(this.showForm) {
@@ -840,6 +848,7 @@ export default {
data.id = this.dataDetail.id data.id = this.dataDetail.id
let res = await editInfoAPI(data) let res = await editInfoAPI(data)
console.log(res, 'res0---------------------');
if (res.code == 0) { if (res.code == 0) {
// this.active = 0 // this.active = 0
Notify({ Notify({
+9 -1
View File
@@ -97,7 +97,7 @@
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div> <div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
</div> </div>
</div> </div>
<div class="footer-btn" @click="save"> <div class="footer-btn" @click="handleClick">
<div>保存</div> <div>保存</div>
</div> </div>
</div> </div>
@@ -120,6 +120,7 @@ import { Notify } from "vant";
import Uploader from '@/views/facilityManage/common-vue/uploader.vue' import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
import {debounce} from '@/utils/common.js'
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
export default { export default {
@@ -155,6 +156,7 @@ export default {
img1:'0,0,0', img1:'0,0,0',
img2:'0,0,0', img2:'0,0,0',
img4:'0,0,0', img4:'0,0,0',
doDebounce: null,
} }
}, },
created() { created() {
@@ -166,6 +168,9 @@ export default {
this.getid = msg2.id this.getid = msg2.id
} }
this.getList(); this.getList();
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
// activated() { // activated() {
@@ -398,6 +403,9 @@ export default {
}) })
}, },
handleClick(){
this.doDebounce()
},
save() { save() {
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) { if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
return return
+10 -3
View File
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> --> <!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
<van-form ref="form" @submit="handelClickSave"> <van-form ref="form" @submit="handleClick">
<div class="yearenergy"> <div class="yearenergy">
<div class="year-main"> <div class="year-main">
<div class="nengyuan"> <div class="nengyuan">
@@ -42,6 +42,7 @@ import { Notify } from "vant";
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import mixin from '@/mixins/mixin' import mixin from '@/mixins/mixin'
import Year from '../facilityManage/common-vue/year.vue' import Year from '../facilityManage/common-vue/year.vue'
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -64,7 +65,8 @@ export default {
efficiency: '', efficiency: '',
userYear: '', userYear: '',
}, },
show: false show: false,
doDebounce: null,
}; };
}, },
activated() { activated() {
@@ -99,7 +101,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.doDebounce = debounce(async function () {
await this.handelClickSave()
}, 5000, true)
}, },
methods: { methods: {
handelChange (params,num,name) { handelChange (params,num,name) {
@@ -125,6 +129,9 @@ export default {
onClickLeft() { onClickLeft() {
this.$router.go(-1) this.$router.go(-1)
}, },
handleClick(){
this.doDebounce()
},
async handelClickSave() { async handelClickSave() {
if(this.id == '') { if(this.id == '') {
this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId; this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId;
+9 -2
View File
@@ -103,7 +103,7 @@
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div> <div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
</div> </div>
</div> </div>
<div class="footer-btn" @click="save"> <div class="footer-btn" @click="handleClick">
<div>保存</div> <div>保存</div>
</div> </div>
</div> </div>
@@ -128,6 +128,7 @@ import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -161,6 +162,7 @@ export default {
img2:'0,0,0', img2:'0,0,0',
img3:'0,0,0', img3:'0,0,0',
img4:'0,0,0', img4:'0,0,0',
doDebounce: null,
} }
}, },
@@ -173,6 +175,9 @@ export default {
this.getid = msg2.id this.getid = msg2.id
} }
this.getList(); this.getList();
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
activated() { activated() {
@@ -383,7 +388,9 @@ export default {
const i = this.aarr1.findIndex((ele) => ele == item.enquireId) const i = this.aarr1.findIndex((ele) => ele == item.enquireId)
this.aarr1.splice(i, 1) this.aarr1.splice(i, 1)
}, },
handleClick(){
this.doDebounce()
},
// 保存 // 保存
save() { save() {
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) { if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
+9 -1
View File
@@ -98,7 +98,7 @@
<div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div> <div class="tips tipImage" v-if="$store.getters.cityType&&text3.length<1">请上传设备能效标识</div>
</div> </div>
</div> </div>
<div class="footer-btn" @click="save"> <div class="footer-btn" @click="handleClick">
<div>保存</div> <div>保存</div>
</div> </div>
</div> </div>
@@ -124,6 +124,7 @@ import { Notify } from "vant";
import Uploader from '@/views/facilityManage/common-vue/uploader.vue' import Uploader from '@/views/facilityManage/common-vue/uploader.vue'
import { downloadUrl } from '@/settings' import { downloadUrl } from '@/settings'
// import Header from "@/components/headerNew" // import Header from "@/components/headerNew"
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -156,6 +157,7 @@ export default {
img1:'0,0,0', img1:'0,0,0',
img2:'0,0,0', img2:'0,0,0',
img3:'0,0,0', img3:'0,0,0',
doDebounce: null,
} }
}, },
@@ -168,6 +170,9 @@ export default {
this.getid = msg2.id this.getid = msg2.id
} }
this.getList(); this.getList();
this.doDebounce = debounce(function () {
this.save()
}, 5000, true)
}, },
activated() { activated() {
@@ -398,6 +403,9 @@ export default {
}) })
}, },
handleClick(){
this.doDebounce()
},
save() { save() {
if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) { if(this.showForm||(this.$store.getters.cityType&&(this.text1.length<1||this.text2.length<1||this.text3.length<1))) {
return return
+10 -3
View File
@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> --> <!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
<van-form ref="form" @submit="handelClickSave"> <van-form ref="form" @submit="handleClick">
<div class="yearenergy"> <div class="yearenergy">
<div class="year-main"> <div class="year-main">
<div class="nengyuan"> <div class="nengyuan">
@@ -42,6 +42,7 @@ import { Notify } from "vant";
import mixin from '@/mixins/mixin' import mixin from '@/mixins/mixin'
// import Header from "@/components/headerNew"; // import Header from "@/components/headerNew";
import Year from '../facilityManage/common-vue/year.vue' import Year from '../facilityManage/common-vue/year.vue'
import {debounce} from '@/utils/common.js'
export default { export default {
components: { components: {
// Header, // Header,
@@ -64,7 +65,8 @@ export default {
efficiency: '', efficiency: '',
userYear: '', userYear: '',
}, },
show: false show: false,
doDebounce: null,
}; };
}, },
activated() { activated() {
@@ -98,7 +100,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.doDebounce = debounce(async function () {
await this.handelClickSave()
}, 5000, true)
}, },
methods: { methods: {
handelChange (params,num,name) { handelChange (params,num,name) {
@@ -124,6 +128,9 @@ export default {
onClickLeft() { onClickLeft() {
this.$router.go(-1) this.$router.go(-1)
}, },
handleClick(){
this.doDebounce()
},
async handelClickSave() { async handelClickSave() {
if(this.id == '') { if(this.id == '') {
this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId; this.form.id = sessionStorage.getItem('enterpriseSystemId') ? this.form.systemId = sessionStorage.getItem('enterpriseSystemId') : this.userMsg.taskId;
+10 -4
View File
@@ -2,7 +2,7 @@
<div> <div>
<!-- <Header :title="title" @onClickLeft="onClickLeft" /> --> <!-- <Header :title="title" @onClickLeft="onClickLeft" /> -->
<div class="yearenergy"> <div class="yearenergy">
<van-form @submit="handelClickSave"> <van-form @submit="handleClick">
<!-- 年份 --> <!-- 年份 -->
<!-- is-link --> <!-- is-link -->
<!-- @click="showDatePicker" --> <!-- @click="showDatePicker" -->
@@ -394,7 +394,7 @@
import { Notify } from 'vant' import { Notify } from 'vant'
import { NewAddQyAPI, getQyInfo, EditQyInfo, getInfoByCustomerId } from '@/api/energyReport.js' import { NewAddQyAPI, getQyInfo, EditQyInfo, getInfoByCustomerId } from '@/api/energyReport.js'
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import {debounce} from '@/utils/common.js'
export default { export default {
name: 'yearEnergyAddEdit', name: 'yearEnergyAddEdit',
data() { data() {
@@ -454,7 +454,8 @@ export default {
heatDemandName: '', // 企业生产工艺用热需求名称显示 heatDemandName: '', // 企业生产工艺用热需求名称显示
notHeatDemandName: '', // 企业非生产工艺用热需求名称显示 notHeatDemandName: '', // 企业非生产工艺用热需求名称显示
heatDemandOtherName: '', // 企业生产工艺用热需求其他具体内容 heatDemandOtherName: '', // 企业生产工艺用热需求其他具体内容
notHeatDemandOtherName: '' // 企业非生产工艺用热需求其他具体内容 notHeatDemandOtherName: '', // 企业非生产工艺用热需求其他具体内容
doDebounce: null,
}; };
}, },
watch: { watch: {
@@ -518,7 +519,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.doDebounce=debounce(async function () {
await this.handelClickSave()
}, 5000, true)
}, },
methods: { methods: {
// 校验总产值与增加值 // 校验总产值与增加值
@@ -736,6 +739,9 @@ export default {
} }
this.$refs.checkboxes[index].toggle(); this.$refs.checkboxes[index].toggle();
}, },
handleClick(){
this.doDebounce()
},
// 保存接口 // 保存接口
async handelClickSave() { async handelClickSave() {
if(!this.yearForm.energyYear) { 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="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="请输入" /> <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: { computed: {
showOther(){
return this.ledRatioShow||this.fluorescentRadioShow||this.incandescentRadioShow||this.energySaviRatioShow
},
showForm() { showForm() {
if(this.tidCid.taskId) { if(this.tidCid.taskId) {
return false return false
@@ -615,6 +620,7 @@ export default {
this.checkboxShow = false this.checkboxShow = false
this.handelChangeNumber()
}, },
handelChangeNumber(title) { handelChangeNumber(title) {
@@ -638,6 +644,8 @@ export default {
if(num > 100) { if(num > 100) {
Notify({ type: "danger", message: '不可超过100%' }); Notify({ type: "danger", message: '不可超过100%' });
this.form[title] = 0 this.form[title] = 0
}else{
this.form.otherRatio = 100 - num
} }
} }
+8 -4
View File
@@ -200,7 +200,8 @@ export default {
customerId: '', customerId: '',
// year: '' // year: ''
}, },
toast:null toast:null,
doDebounce: null,
} }
}, },
components:{ components:{
@@ -248,6 +249,9 @@ export default {
// }, // },
created() { created() {
this.userLevel() this.userLevel()
this.doDebounce = debounce(function () {
this.getGenerateReport()
}, 5000, true)
}, },
mounted() { mounted() {
}, },
@@ -429,9 +433,9 @@ export default {
this.option1 = arr this.option1 = arr
}, },
// 重新生成 // 重新生成
generateReport:debounce(function () { generateReport(){
this.getGenerateReport() this.doDebounce()
}, 5000, true), },
async getGenerateReport() { async getGenerateReport() {
let data = { let data = {
customerId: customerId: