This commit is contained in:
jiangyinzhi
2025-01-16 16:21:23 +08:00
parent 7f7ff91a5e
commit 561624a90c
17 changed files with 54 additions and 368 deletions
@@ -438,10 +438,7 @@ export default {
customerTypeSure() {},
//所属区域点击确认
provOrgSure() {},
//用电户号点击操作
// goUseele() {
// this.$router.push('/useele')
// }
}
}
@@ -57,9 +57,9 @@
<van-cell title="是否享受峰谷平电价" required is-link :value="showData.valleyElectricityPrices1" @click="showPicker3 = !showForm" />
<van-cell title="是否使用绿电交易" required is-link :value="showData.greenElectricityTrading1" @click="showPickerLd = !showForm" />
<van-cell title="已使用清洁能源" required is-link :value="result1" @click="showPicker4 = !showForm" />
<van-field v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1 }]" label="光伏总建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
<van-field v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1 }]" label="光伏已建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
</van-field>
<div class="tips" v-if="tips8 == true&&gfShow == 1">光伏总建设面积+可利用屋面面积<总建筑面积</div>
<div class="tips" v-if="tips8 == true&&gfShow == 1">光伏已建设面积+可利用屋面面积<总建筑面积</div>
<van-field v-model="formData.photovoltaicPhotovoltaic" required :rules="[{ required: gfShow == 1 }]" label="光伏总装机容量(kW)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
</van-field>
<div class="tips" v-if="tips9 == true&&gfShow == 1">50×光伏已建设面积/1000<光伏总装机容量<200×光伏已建设面积/1000</div>
@@ -296,7 +296,6 @@
import Year from '@/views/facilityManage/common-vue/year.vue'
import mixin from '@/mixins/mixin'
// import { Toast } from 'vant'
// saveLog
import { getCode } from '@/api/common.js'
import { addEnergyEquip } from '@/api/energyConsumption'
import { downloadUrl } from '@/settings'
@@ -500,7 +499,7 @@ export default {
purchasePower: '1', // 购电方式
basicCharge: '1', // 基本电费
valleyElectricityPrices: '2', // 是否享受峰谷平电价
photovoltaicArea: '0', // 光伏总建设面积
photovoltaicArea: '0', // 光伏已建设面积
photovoltaicPhotovoltaic: '0', // 光伏总装机容量
reclaimedWater: '2', // 是否采用再生水
reclaimedWaterType: '', // 再生水类型
@@ -837,19 +836,7 @@ export default {
})
},
//保存绿网传来的数据
// async saveGreenComeData(content) {
// const tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
// console.log(tidCid);
// const data = {
// businessKey: "buildBusinessKey",
// content: content,
// customerId: tidCid.customerId
// }
// const res = await saveLog(data)
// console.log(res);
// },
//点击选择日期时只展示年份
handelOpen() {
this.datePopup = !this.showForm;
@@ -2021,7 +2008,7 @@ export default {
purchasePower: '1', // 购电方式
basicCharge: '1', // 基本电费
valleyElectricityPrices: '2', // 是否享受峰谷平电价
photovoltaicArea: '', // 光伏总建设面积
photovoltaicArea: '', // 光伏已建设面积
photovoltaicPhotovoltaic: '', // 光伏总装机容量
reclaimedWater: '2', // 是否采用再生水
reclaimedWaterType: '', // 再生水类型
+25 -25
View File
@@ -275,7 +275,7 @@ export default {
// this.init()
},
mounted() {
this.getAi()
// this.getAi()
if(this.$route.query.type == 2) {
this.handleSelect('2')
} else {
@@ -283,30 +283,30 @@ export default {
}
},
methods: {
//获取到ai
async getAi() {
const params = sessionStorage.getItem('saikey')
const res = await getAi({ai: params})
if(res.code == 0 && !res.data) {
return
}
this.ai = res.data
// Dialog.confirm({
// title: '标题',
// message: `${res.data}`,
//}).then(() => {
// var cInput = document.createElement("input");
// cInput.value = res.data;
// document.body.appendChild(cInput);
// cInput.select(); // 选取文本框内容
// // 执行浏览器复制命令
// // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签)
// // Input要在正常的编辑状态下原生复制方法才会生效
// document.execCommand("copy");
// document.body.removeChild(cInput);
// // on confirm
//})
},
// //获取到ai
// async getAi() {
// const params = sessionStorage.getItem('saikey')
// const res = await getAi({ai: params})
// if(res.code == 0 && !res.data) {
// return
// }
// this.ai = res.data
// // Dialog.confirm({
// // title: '标题',
// // message: `${res.data}`,
// //}).then(() => {
// // var cInput = document.createElement("input");
// // cInput.value = res.data;
// // document.body.appendChild(cInput);
// // cInput.select(); // 选取文本框内容
// // // 执行浏览器复制命令
// // // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签)
// // // Input要在正常的编辑状态下原生复制方法才会生效
// // document.execCommand("copy");
// // document.body.removeChild(cInput);
// // // on confirm
// //})
// },
// 搜索
async searchEveryItem() {
if (!this.searchValue) {
-237
View File
@@ -1,237 +0,0 @@
<template>
<div class="list">
<!-- 搜索框 -->
<!-- <div class="search">
<img src="@/assets/search.png" alt="" />
<input
type="text"
placeholder="请输入搜索文字"
@keydown.enter="searchEveryItem"
v-model="searchValue"
/>
</div> -->
<div class="container">
<van-radio-group v-model="radio">
<van-cell
v-for="(item, index) in client"
:title="item.consName +' '+ item.consNo"
:key="index"
clickable
@click="clickRadio(item, index)"
:style="item.checked ? 'background: #e5f6f3; ' : ''"
>
<!-- <van-radio :name="index" /> -->
</van-cell>
</van-radio-group>
</div>
<div class="btn">
<van-button size="large" class="faqi" @click="sureEle">
确认
</van-button>
</div>
</div>
</template>
<script>
// import Header from "@/components/headerNew";
import { getUseele } from '@/api/customer'
import { Notify } from 'vant'
export default {
name: '',
components: {
// Header,
},
beforeRouteEnter(to, from, next) {
next(vm => {
vm.title = to.meta.title
})
},
data() {
return {
// 标题
title: '客户选择',
// 单选框
radio: '',
searchValue:'',
client: [],
loading: false, //加载
finished: false, //完成
pageNum: 1, //当前页数
pageSize: 10, //每页多少条
allPage: 0, //总共多少条
numArr: [],
currentItem: {}
}
},
mounted() {
// this.getData();
},
created() {
// this.getUseele()
this.getUseele()
},
methods: {
//反显数据
editData(data) {
const arr = sessionStorage.getItem('customer')
if(arr) {
this.numArr = JSON.parse(arr).list
data.forEach((ele)=> {
this.numArr.forEach((v)=>{
if(ele.consId == v.consId) {
ele.checked = true
}
})
})
}
},
//获取列表数据
async getUseele() {
const customer = sessionStorage.getItem('customer')
const data = {
pageNum: this.pageNum,
pagesize: this.pageSize,
}
if(customer) {
data.consName = JSON.parse(customer).name
} else {
data.consName = ''
}
const res = await getUseele(data)
if(res.code == 0) {
res.data.records.forEach((v) => {
v.checked = false
})
this.client = res.data.records
this.editData(res.data.records)
} else {
Notify({ type: 'danger', message: res.msg })
}
},
// 滑动加载
// onLoad() {
// // 异步更新数据
// setTimeout(async () => {
// this.pageNum++
// const data = {
// pageNum: this.pageNum,
// pagesize: this.pageSize,
// }
// // 加载状态结束
// this.loading = false
// const res = await getUseele(data)
// if(res.code == 0) {
// res.data.records.forEach((v) => {
// v.checked = false
// })
// // this.client = res.data.records
// this.client.push(...res.data.records)
// this.editData(res.data.records)
// // 数据全部加载完成
// if (this.client.length == res.data.total) {
// this.finished = true
// return
// }
// } else {
// this.finished = true
// }
// }, 1000)
// },
// 选择客户数据处理
clickRadio(item, index) {
item.checked = !item.checked
if(item.checked == true) {
this.numArr.push(item)
} else {
this.numArr.splice(index, 1)
}
console.log(this.numArr);
},
// 点击确认
sureEle() {
if (this.numArr.length == 0 ) {
Notify({ type: 'danger', message: '请至少选择一条' })
return
}
sessionStorage.setItem('numArr', JSON.stringify(this.numArr))
this.$router.go(-1)
}
},
}
</script>
<style lang="less" scoped>
.list {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.container {
height: calc(100vh - 60px);
overflow-y: auto;
.van-cell {
padding: 20px;
font-size: 17px;
opacity: 0.9;
}
.item {
background: #fff;
padding: 30px;
box-sizing: border-box;
font-size: 18px;
color: #797b7b;
border-bottom: 1px solid #e9e9e9;
}
}
::v-deep .van-radio__icon {
-webkit-box-flex: 0;
-webkit-flex: none;
flex: none;
height: 1em;
font-size: 0.533333rem;
line-height: 1em;
cursor: pointer;
position: absolute;
right: 0;
top: 0px;
}
.btn {
padding: 0 20px;
}
.faqi {
background-color: #63cbb6;
color: #fff;
border-radius: 8px;
margin-top: -20px;
}
/deep/ .van-radio-group{
height: 100%;
background: #fff;
}
.search {
width: 100%;
height: 60px;
display: flex;
// border: 1px solid #f2f2f2;
// opacity: 0.5;
border-radius: 6px;
padding: 5px 10px;
box-sizing: border-box;
align-items: center;
background: #fff;
margin-bottom: 10px;
img {
width: 15px;
height: 15px;
margin-right: 10px;
}
}
</style>
@@ -1,9 +1,9 @@
<template>
<div class="list">
<van-form ref="detailForm" @submit="handelClickSave">
<div class="list-upload" v-if="(type == 1||type == 2) && $store.getters.imageRecognition">
<!-- <div class="list-upload" v-if="(type == 1||type == 2) && $store.getters.imageRecognition">
<btn-uploader type="filePic" :value="filePic" @afterRead="afterRead" @delImg="delImg" @onUpload="onUpload" />
</div>
</div> -->
<div class="container" v-if="type == 1">
<div class="inputStyle">
<van-cell-group>
@@ -1,15 +1,11 @@
<template>
<div class="multipleAir">
<div class="list-upload" v-if="$store.getters.imageRecognition">
<!-- <div class="list-upload" v-if="$store.getters.imageRecognition">
<btnUploader type="filePic" :value="filePic"
@afterRead="afterRead1"
@delImg="delImg1"
@onUpload="onUpload1" />
<!-- <Uploader type="exteriorImage" :value="exteriorImage"
@afterRead="afterRead"
@delImg="delImg"
@onUpload="onUpload" /> -->
</div>
</div> -->
<div class="focusItem">
<div class="inputStyle">
<van-cell-group>