优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user