This commit is contained in:
jiangyinzhi
2024-09-24 23:10:36 +08:00
parent be8a167fd0
commit da36f860ca
9 changed files with 82 additions and 16 deletions
+8
View File
@@ -278,3 +278,11 @@ export function getPositionData(params) {
data: params
})
}
// 获取配电信息
export function getNxzdPower(params) {
return myAxios({
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getNxzdPower?customerId=${params}`,
method: 'get',
})
}
+1 -1
View File
@@ -36,7 +36,7 @@ const getDefaultState = () => ({
path: ''
},
cityType: true, //外观图片必填
cityIsNx: process.env.VUE_APP_CITY_TYPE=='sx', //位置必填
cityIsNx: process.env.VUE_APP_CITY_TYPE=='nx', //宁夏特供-公共机构配电获取
imageRecognition: process.env.VUE_APP_CITY_TYPE=='ah', // 图像识别
validate: process.env.VUE_APP_CITY_TYPE=='ah', // 大区间校验
})
+5 -1
View File
@@ -106,6 +106,7 @@ import {
import { pushWebviewVC } from '@/utils/dsbridge.js'
import { Notify } from 'vant'
import {debounce} from '@/utils/common.js'
// import * as echarts from 'echarts'
import { mapMutations } from 'vuex'
@@ -415,7 +416,10 @@ export default {
this.$router.push({path: '/energyReport'})
},
// 重新生成
async generateReport() {
generateReport:debounce(function () {
this.getGenerateReport()
}, 5000, true),
async getGenerateReport() {
let data = {
customerId: this.energyData.customerId,
taskId: this.energyData.taskId
+5 -1
View File
@@ -1,6 +1,6 @@
<template>
<div>
<van-form ref="form" @submit="save">
<van-form ref="form" @submit="handleClick">
<div class="cont">
<div class="container">
<div class="part">
@@ -105,6 +105,7 @@ import {
} from '@/utils/dsbridge'
import { insertPositionData, getPositionData } from '@/api/api.js'
import { downloadUrl } from '@/settings'
import {debounce} from '@/utils/common.js'
export default {
components: {
Uploader,
@@ -239,6 +240,9 @@ export default {
})
return list
},
handleClick:debounce(function () {
this.save()
}, 5000, true),
// 保存
save() {
if (this.$refs.uploaderRef.checkImgisUpload(this.text1)) {
@@ -44,12 +44,6 @@
<van-cell title="建筑外观照片" :required="$store.getters.cityType" :rules="[{ required: $store.getters.cityType}] "/>
<van-uploader v-model="fileList" :max-count="3" :after-read="afterRead" :before-delete="delImg" @click-upload="onUpload" preview-size="100px" class="uploader" ref="file" />
<div class="tips tipImage" v-if="$store.getters.cityType&&fileList.length<1">请上传建筑外观照片</div>
<!-- <van-uploader v-model="fileList" multiple :max-count="3" :after-read="afterRead" :before-delete="delImg" @click-upload="onUpload" preview-size="100px" class="uploader" ref="file" /> -->
<!-- <van-field v-model="formData.buildAddr" :required="$store.getters.cityIsNx" :rules="[{ required: $store.getters.cityIsNx}]" center disabled clearable label="定位" placeholder="位置信息" class="location">
<template #button>
<van-button :disabled="showForm" native-type="button" size="small" type="primary" style="background: #0caea0" @click="getLocation">获取</van-button>
</template>
</van-field> -->
</van-cell-group>
</div>
</div>
+36 -2
View File
@@ -179,6 +179,12 @@
<div class="list-bot">
<div>
<button
@click="show=true"
style="margin-left: 10px;"
>
留言
</button>
<button
@click="goClockIn(item)"
style="margin-left: 10px;"
@@ -227,6 +233,20 @@
<van-button size="large" class="faqi">发起预约</van-button>
</div>
</div>
<van-dialog v-model="show" title="留言" show-cancel-button :lazy-render="false" @cancel="message=''" @confirm="leaveMessage()">
<van-field
type="textarea"
v-model="message"
rows="4"
autosize
autofocus
maxlength="500"
placeholder="请输入留言"
>
</van-field>
</van-dialog>
</div>
</template>
<script>
@@ -234,6 +254,7 @@ import { taskList, genReport } from '@/api/api.js'
import { getCurrentPersonInfoAPI } from "@/api/customerIformation.js";
import { getCode } from '@/api/common.js'
import Year from '@/views/facilityManage/common-vue/year.vue'
import {debounce} from '@/utils/common.js'
// import Loading from '@/components/loading'
export default {
@@ -243,6 +264,8 @@ export default {
},
data() {
return {
show: false,
message: '',
statusPopup: false,
datePopup: false,
currentDate: new Date(),
@@ -457,8 +480,11 @@ export default {
query: item
})
},
togenReport:debounce(function () {
this.getReport()
}, 5000, true),
// 生成诊断报告
togenReport(item) {
getReport(item) {
this.pageN = this.page.pageNum
this.page.pageNum = 1
const scrollableDiv = this.$refs.scrollableDiv
@@ -586,6 +612,14 @@ export default {
this.$router.push({
name: 'clockIn',
})
},
leaveMessage(){
this.message = ''
this.$notify({
message: '留言成功',
duration: 1000,
background: '#34babe'
})
}
},
beforeRouteLeave(to, from, next) {
@@ -611,7 +645,7 @@ export default {
font-size: 15px;
padding-bottom: 10px;
position: fixed;
z-index: 2013;
z-index: 1013;
}
.select {
// // width: 100%;
+2 -2
View File
@@ -53,7 +53,7 @@ export default {
gzDate: '', // 改造时间
currentDate: new Date(),
maxDate: new Date(),
minDate: new Date('1900-1-1'),
minDate: new Date('1900/1/1'),
datePicker: false,
message: '',
option: [],
@@ -100,7 +100,7 @@ export default {
const res = await reformGetInfo({id: this.id});
if(res.code == 0) {
this.show = false
this.currentDate = new Date(res.data.tranTime);
this.currentDate = new Date(res.data.tranTime.replace(/\-/g, '/'));
this.activeId = res.data.secondType;
this.gzDate = res.data.tranTime;
this.message = res.data.tranContent;
@@ -188,6 +188,8 @@ import Year from '../common-vue/year.vue'
import mixin from '@/mixins/mixin'
import { dataMode, getCodeCommon } from '../common'
import Radio from '../common-vue/radio.vue'
import { getNxzdPower } from '@/api/api.js'
import { mapGetters } from 'vuex'
export default {
name:'dis',
@@ -375,6 +377,7 @@ export default {
}
},
computed: {
...mapGetters(['cityIsNx']),
showForm() {
if(this.tidCid.taskId) {
return false
@@ -427,7 +430,7 @@ export default {
created() {
this.tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
},
mounted() {
async mounted() {
this.$store.commit('pageData/GET_DIS', this.typeId)
this.editData()
},
@@ -438,6 +441,18 @@ export default {
this.clearData()
},
methods: {
async getData(){
let {code, data} = await getNxzdPower(this.tidCid.customerId)
if(code==0){
Object.keys(data).map(ele => {
this.form[ele] = data[ele]
})
//电压等级
this.getList()
//变压器
this.editDataTrName()
}
},
changeTips () {
this.tips0 = false
if (Number(this.form.maxNeed) > Number(this.form.distributeCapacity)) {
@@ -602,6 +617,9 @@ export default {
for (const key in this.form) {
this.form[key] = ''
}
if(this.cityIsNx){
this.getData()
}
}
return
}
+5 -1
View File
@@ -118,6 +118,7 @@ import { pushWebviewVC } from '@/utils/dsbridge.js'
import { genReport } from '@/api/api.js'
import { Notify } from 'vant'
import Loading from '@/components/loading'
import {debounce} from '@/utils/common.js'
// import {
// getEnergyReportInfoAPI,
@@ -428,7 +429,10 @@ export default {
this.option1 = arr
},
// 重新生成
async generateReport() {
generateReport:debounce(function () {
this.getGenerateReport()
}, 5000, true),
async getGenerateReport() {
let data = {
customerId:
this.$route.params.customerId || JSON.parse(sessionStorage.getItem('tidCid')).customerId,