Compare commits
2 Commits
6ba8e2c812
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 178f422dc5 | |||
| f0da970904 |
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 定义变量
|
# 定义变量
|
||||||
VUE_APP_CITY_TYPE = 'ah'
|
VUE_APP_CITY_TYPE = ''
|
||||||
|
|
||||||
# 开发环境接口调用前缀
|
# 开发环境接口调用前缀
|
||||||
# VUE_APP_BASE_API = '/dev-api'
|
# VUE_APP_BASE_API = '/dev-api'
|
||||||
|
|||||||
+12
-7
@@ -1,5 +1,6 @@
|
|||||||
import myAxios from './axios'
|
import myAxios from './axios'
|
||||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx' ? '/ferry_service/ferryController/conveyor' : ''
|
const sx = ''
|
||||||
|
// const sx = process.env.VUE_APP_CITY_TYPE == 'sx' ? '/ferry_service/ferryController/conveyor' : ''
|
||||||
|
|
||||||
// 查询客户基本信息分页列表
|
// 查询客户基本信息分页列表
|
||||||
export function getUserInfo(params) {
|
export function getUserInfo(params) {
|
||||||
@@ -150,27 +151,31 @@ export function getStatisticAPI(params) {
|
|||||||
// 签名上传
|
// 签名上传
|
||||||
export function uploadNoting(params) {
|
export function uploadNoting(params) {
|
||||||
return myAxios({
|
return myAxios({
|
||||||
url: '/portal/file/minio/upload',
|
url: `${sx}/energy-effcicency-net-service/nxzdUserFileNet/upload`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: params
|
params: params,
|
||||||
|
unEncrypted: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//图片上传
|
//图片上传
|
||||||
|
// 注意:不能手动设置 Content-Type,否则浏览器不会自动生成 multipart boundary;
|
||||||
|
// 需 unEncrypted 跳过请求拦截器加密,FormData 不能被 JSON.stringify+SM4 替换
|
||||||
export function uploadFile(params) {
|
export function uploadFile(params) {
|
||||||
// console.log(params);
|
// console.log(params);
|
||||||
// console.log(decrypt(params));
|
// console.log(decrypt(params));
|
||||||
return myAxios({
|
return myAxios({
|
||||||
url: '/file/minio/upload',
|
url: `${sx}/energy-effcicency-net-service/nxzdUserFileNet/upload`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: params
|
data: params,
|
||||||
|
unEncrypted: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//图片读取
|
//图片读取
|
||||||
export function downloadFile(attach_id) {
|
export function downloadFile(attach_id) {
|
||||||
return myAxios({
|
return myAxios({
|
||||||
url: '/file/minio/download',
|
url: `${sx}/energy-effcicency-net-service/nxzdUserFileNet/download/${attach_id}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: attach_id
|
responseType: 'blob',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 生成诊断报告
|
// 生成诊断报告
|
||||||
|
|||||||
+3
-3
@@ -35,7 +35,7 @@ const LoadingInstance = {
|
|||||||
function myAxios(axiosConfig, customOptions) {
|
function myAxios(axiosConfig, customOptions) {
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: axiosConfig.type ? '' : baseURLs, // 设置统一的请求前缀
|
baseURL: axiosConfig.type ? '' : baseURLs, // 设置统一的请求前缀
|
||||||
timeout: 30000, // 设置统一的超时时长
|
timeout: 20000, // 设置统一的超时时长
|
||||||
});
|
});
|
||||||
|
|
||||||
// 自定义配置
|
// 自定义配置
|
||||||
@@ -143,8 +143,8 @@ function httpErrorStatusHandle(error) {
|
|||||||
// console.log(router,'114');
|
// console.log(router,'114');
|
||||||
// router.push('/login')
|
// router.push('/login')
|
||||||
// eslint-disable-next-line no-case-declarations
|
// eslint-disable-next-line no-case-declarations
|
||||||
// let pathName = sessionStorage.getItem('path')
|
let pathName = sessionStorage.getItem('path')
|
||||||
// router.push(pathName)
|
router.push(pathName)
|
||||||
break;
|
break;
|
||||||
case 403: message = '您没有权限操作!'; break;
|
case 403: message = '您没有权限操作!'; break;
|
||||||
case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下
|
case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// 测试环境
|
// 测试环境
|
||||||
// baseURL = 'http://172.29.69.38:28083/' //后端ip和端口
|
// baseURL = 'http://172.29.69.38:28083/' //后端ip和端口
|
||||||
// baseURL = 'http://192.168.1.116:28083/' //测试后端ip和端口
|
// baseURL = 'http://192.168.1.116:28083/' //测试后端ip和端口
|
||||||
baseURL = 'http://172.29.106.250:19012/' //测试后端ip和端口
|
baseURL = 'http://172.29.69.38:19012/' //测试后端ip和端口
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 生产环境
|
// 生产环境
|
||||||
|
|||||||
@@ -2,13 +2,7 @@ import myAxios from "./axios";
|
|||||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||||
|
|
||||||
//建筑能耗数据信息
|
//建筑能耗数据信息
|
||||||
export function factorlist(data) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdReferFactorNet/list`, //后端接口路由
|
|
||||||
method: 'post',
|
|
||||||
data,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 查询建筑能耗 -- 年
|
* 查询建筑能耗 -- 年
|
||||||
* @param {
|
* @param {
|
||||||
|
|||||||
@@ -264,12 +264,3 @@ export function enterprisEdit(params) {
|
|||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否淘汰设备
|
|
||||||
export function checkEquipDieout(params) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/checkEquipDieout`,
|
|
||||||
method: 'POST',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
import { checkEquipDieout } from "@/api/universalEnergy.js"
|
|
||||||
const dieoutMixin = {
|
|
||||||
methods: {
|
|
||||||
// 改变台数
|
|
||||||
changeDataNum(type, arrModel, arrAbsoleteNum, form, systemNum){
|
|
||||||
form=form||'form'
|
|
||||||
systemNum=systemNum||'systemNum'
|
|
||||||
arrModel.map((ele, index) => {
|
|
||||||
this.changeData(type, ele, arrAbsoleteNum[index], form, systemNum)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeData(type, model, absoleteNum, form, systemNum){
|
|
||||||
form=form||'form'
|
|
||||||
systemNum=systemNum||'systemNum'
|
|
||||||
if(this[form][model+'isDieout']=='1'&&this[form][model]){
|
|
||||||
this.$set(this[form], absoleteNum, this[form][systemNum])
|
|
||||||
}else if( this[form][model+'isDieout']=='0'&&this[form][model]){
|
|
||||||
this.$set(this[form], absoleteNum, '0')
|
|
||||||
}else if(!this[form][model+'isDieout']&&this[form][model]){
|
|
||||||
this.checkEquipDieout(type, model, absoleteNum, form, systemNum)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
// 判断是否淘汰设备
|
|
||||||
checkEquipDieout(type, model, absoleteNum, form, systemNum){
|
|
||||||
form=form||'form'
|
|
||||||
systemNum=systemNum||'systemNum'
|
|
||||||
if(!this[form][model]) return
|
|
||||||
let params = {
|
|
||||||
systemType: type,
|
|
||||||
systemModel: this[form][model]
|
|
||||||
}
|
|
||||||
checkEquipDieout(params).then((res) => {
|
|
||||||
if(res&&res.code==0){
|
|
||||||
this.$set(this[form], model+'isDieout',res.data.isDieout)
|
|
||||||
if(res.data.isDieout=='1'){
|
|
||||||
this.$message.warning('该设备为淘汰设备!')
|
|
||||||
}
|
|
||||||
this.changeData(type, model, absoleteNum, form, systemNum)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const modelValidatorMixin= {
|
|
||||||
data() {
|
|
||||||
const modelValidator = ( value, rule) => {
|
|
||||||
if(value){
|
|
||||||
return /^.{2,30}$/.test(value)
|
|
||||||
}
|
|
||||||
if(!rule.required){
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
modelValidator,
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export {dieoutMixin, modelValidatorMixin}
|
|
||||||
+1
-2
@@ -10,8 +10,7 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
sidebarLogo: true,
|
sidebarLogo: true,
|
||||||
menuExclude: [],
|
menuExclude: [],
|
||||||
downloadUrl: `${process.env.VUE_APP_BASE_API}/proxy-cq/file/minio/download/`,
|
downloadUrl: `${process.env.VUE_APP_BASE_API}/energy-effcicency-net-service/nxzdUserFileNet/download/`,
|
||||||
uploadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/upload/`,
|
|
||||||
statusCode: {
|
statusCode: {
|
||||||
SUCCESS: 0
|
SUCCESS: 0
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const getDefaultState = () => ({
|
|||||||
},
|
},
|
||||||
cityType: true, //外观图片必填
|
cityType: true, //外观图片必填
|
||||||
cityIsNx: process.env.VUE_APP_CITY_TYPE=='nx', //宁夏特供-公共机构配电获取
|
cityIsNx: process.env.VUE_APP_CITY_TYPE=='nx', //宁夏特供-公共机构配电获取
|
||||||
imageRecognition: process.env.VUE_APP_CITY_TYPE=='ah'||process.env.VUE_APP_CITY_TYPE=='cq', // 安徽、重庆有图像识别
|
imageRecognition: process.env.VUE_APP_CITY_TYPE=='ah', // 图像识别
|
||||||
validate: process.env.VUE_APP_CITY_TYPE=='ah', // 大区间校验 任务列表 用户客户标识
|
validate: process.env.VUE_APP_CITY_TYPE=='ah', // 大区间校验 任务列表 用户客户标识
|
||||||
cityisXj: process.env.VUE_APP_CITY_TYPE=='xj', // 报告-二氧化碳系数
|
cityisXj: process.env.VUE_APP_CITY_TYPE=='xj', // 报告-二氧化碳系数
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -183,4 +183,47 @@ export function fileDown (downLoadUrl, fileName, id,data) {
|
|||||||
// console.log("fileDownloadCallback 下载文件 回调 " + JSON.stringify(obj));
|
// console.log("fileDownloadCallback 下载文件 回调 " + JSON.stringify(obj));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过 POST 接口下载图片并返回 blob URL
|
||||||
|
* @param {string} attach_id 文件ID
|
||||||
|
* @returns {Promise<string>} blob URL
|
||||||
|
*/
|
||||||
|
export async function getImageBlobUrl(attach_id) {
|
||||||
|
try {
|
||||||
|
const { downloadFile } = await import('@/api/api')
|
||||||
|
const blob = await downloadFile(attach_id)
|
||||||
|
if (blob instanceof Blob && blob.size > 0) {
|
||||||
|
const type = blob.type && blob.type.startsWith('image/') ? blob.type : 'image/jpeg'
|
||||||
|
const imgBlob = new Blob([blob], { type })
|
||||||
|
const url = URL.createObjectURL(imgBlob)
|
||||||
|
console.log('getImageBlobUrl ok: id=', attach_id, 'type=', blob.type, 'size=', blob.size, 'url=', url)
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
console.error('getImageBlobUrl 无效响应: id=', attach_id, 'isBlob=', blob instanceof Blob, 'size=', blob && blob.size, 'type=', blob && blob.type)
|
||||||
|
return ''
|
||||||
|
} catch (e) {
|
||||||
|
console.error('getImageBlobUrl 请求失败: id=', attach_id, e)
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 通过 POST 接口下载文件并触发浏览器保存
|
||||||
|
* 注意:后端返回的是文件流(Blob),浏览器不会自动下载,需手动触发
|
||||||
|
* @param {string} attachId 文件ID
|
||||||
|
* @param {string} [fileName] 保存的文件名(带后缀),缺省为 'download'
|
||||||
|
*/
|
||||||
|
export async function downloadFileById(attachId, fileName) {
|
||||||
|
const { downloadFile } = await import('@/api/api')
|
||||||
|
const blob = await downloadFile(attachId)
|
||||||
|
if (!(blob instanceof Blob)) return
|
||||||
|
const url = URL.createObjectURL(blob)
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.href = url
|
||||||
|
a.download = fileName || 'download'
|
||||||
|
document.body.appendChild(a)
|
||||||
|
a.click()
|
||||||
|
a.remove()
|
||||||
|
URL.revokeObjectURL(url)
|
||||||
|
}
|
||||||
|
|
||||||
export default service
|
export default service
|
||||||
|
|||||||
@@ -114,10 +114,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='energyReport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
EnergyReportInfo.centralizeCoolCapacity
|
EnergyReportInfo.centralizeCoolCapacity
|
||||||
}}千瓦。 机组平均能效比为{{
|
}}千瓦。 机组平均能效比为{{
|
||||||
EnergyReportInfo.centralizeAverageCop
|
EnergyReportInfo.centralizeAverageCop
|
||||||
}}(总制冷量/总功率), 机组最长投运年限为{{
|
}}, 机组最长投运年限为{{
|
||||||
EnergyReportInfo.centralizeMinUseYear
|
EnergyReportInfo.centralizeMinUseYear
|
||||||
}}年。
|
}}年。
|
||||||
</td>
|
</td>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
合计{{ EnergyReportInfo.multipleNum }}台,
|
合计{{ EnergyReportInfo.multipleNum }}台,
|
||||||
<span v-if="false">总额定功率为{{ EnergyReportInfo.multipleRatedPower }}千瓦,机组平均能效比为{{
|
<span v-if="false">总额定功率为{{ EnergyReportInfo.multipleRatedPower }}千瓦,机组平均能效比为{{
|
||||||
EnergyReportInfo.multipleAverageCop
|
EnergyReportInfo.multipleAverageCop
|
||||||
}}(总制冷量/总功率),</span>设备最长投运年限为{{ EnergyReportInfo.multipleMinUseYear }}年。
|
}},</span>设备最长投运年限为{{ EnergyReportInfo.multipleMinUseYear }}年。
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -230,9 +230,7 @@
|
|||||||
EnergyReportInfo.heatRatedPower
|
EnergyReportInfo.heatRatedPower
|
||||||
}}(吨/立方米/千瓦),总制热量为{{
|
}}(吨/立方米/千瓦),总制热量为{{
|
||||||
EnergyReportInfo.heatCapacity
|
EnergyReportInfo.heatCapacity
|
||||||
}}千瓦,
|
}}千瓦,机组最长投运年限为{{ EnergyReportInfo.heatUnitMinUseYear }}年。
|
||||||
机组平均能效比为{{(EnergyReportInfo.heatRatedPower/EnergyReportInfo.heatCapacity).toFixed(2)}}(总制热量/总功率),
|
|
||||||
机组最长投运年限为{{ EnergyReportInfo.heatUnitMinUseYear }}年。
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
采暖泵合计{{ EnergyReportInfo.heatPumpNum}}台,总额定功率为{{
|
采暖泵合计{{ EnergyReportInfo.heatPumpNum}}台,总额定功率为{{
|
||||||
@@ -628,10 +626,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='energyReport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -716,10 +716,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='energyReport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="manage-start-text">
|
<div class="manage-start-text">
|
||||||
在建筑用能管理方面,贵单位{{ EnergyReportInfo.energyPlatform }}能源管控平台<span v-if="!(EnergyReportInfo.platformFeatures&&(EnergyReportInfo.platformFeatures.split('')[0] == '未'||EnergyReportInfo.platformFeatures == '无'))">,平台的功能包括具备{{ EnergyReportInfo.platformFeatures }}功能</span>。
|
在建筑用能管理方面,贵单位{{ EnergyReportInfo.energyPlatform }}能源管控平台<span v-if="!(EnergyReportInfo.platformFeatures.split('')[0] == '未'||EnergyReportInfo.platformFeatures == '无')">,平台的功能包括具备{{ EnergyReportInfo.platformFeatures }}功能</span>。
|
||||||
<span v-if="!(EnergyReportInfo.useEnergy == '无')">
|
<span v-if="!(EnergyReportInfo.useEnergy == '无')">
|
||||||
使用能源({{ EnergyReportInfo.useEnergy }})已经具备分项计量功能,用能单位能源计量器具配备{{ EnergyReportInfo.meterComplete }}。
|
使用能源({{ EnergyReportInfo.useEnergy }})已经具备分项计量功能,用能单位能源计量器具配备{{ EnergyReportInfo.meterComplete }}。
|
||||||
</span>
|
</span>
|
||||||
@@ -264,10 +264,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='energyReport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -26,12 +26,9 @@
|
|||||||
<!-- <van-dropdown-menu class="timeSelect" v-if="timeSelectShow" >
|
<!-- <van-dropdown-menu class="timeSelect" v-if="timeSelectShow" >
|
||||||
<van-dropdown-item v-model="yearVal" :options="yearList" @change="handelChangeTime" />
|
<van-dropdown-item v-model="yearVal" :options="yearList" @change="handelChangeTime" />
|
||||||
</van-dropdown-menu> -->
|
</van-dropdown-menu> -->
|
||||||
<div class="detail2-right-top-reset" @click="generateReport(false)" v-if="timeSelectShow">
|
<div class="detail2-right-top-reset" @click="generateReport" v-if="timeSelectShow">
|
||||||
重新生成
|
重新生成
|
||||||
</div>
|
</div>
|
||||||
<div class="detail2-right-top-reset" @click="generateReport(true)" v-if="timeSelectShow&&isCq">
|
|
||||||
刷新
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detail2-right-bottom">
|
<div class="detail2-right-bottom">
|
||||||
{{userCode}}:
|
{{userCode}}:
|
||||||
@@ -215,9 +212,6 @@ export default {
|
|||||||
res ='|' + this.EnergyReportInfo.buildType.split('/')[0]
|
res ='|' + this.EnergyReportInfo.buildType.split('/')[0]
|
||||||
}
|
}
|
||||||
return '公共机构'+res
|
return '公共机构'+res
|
||||||
},
|
|
||||||
isCq(){
|
|
||||||
return process.env.VUE_APP_CITY_TYPE=='cq'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -230,8 +224,8 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.level = sessionStorage.getItem('level')
|
this.level = sessionStorage.getItem('level')
|
||||||
this.getEnergyReportInfo()
|
this.getEnergyReportInfo()
|
||||||
this.doDebounce = debounce(function (flag) {
|
this.doDebounce = debounce(function () {
|
||||||
this.getGenerateReport(flag)
|
this.getGenerateReport()
|
||||||
}, 5000, true)
|
}, 5000, true)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -429,14 +423,13 @@ export default {
|
|||||||
this.$router.push({path: '/energyReport'})
|
this.$router.push({path: '/energyReport'})
|
||||||
},
|
},
|
||||||
// 重新生成
|
// 重新生成
|
||||||
generateReport(flag){
|
generateReport(){
|
||||||
this.doDebounce(flag)
|
this.doDebounce()
|
||||||
},
|
},
|
||||||
async getGenerateReport(flag) {
|
async getGenerateReport() {
|
||||||
let data = {
|
let data = {
|
||||||
customerId: this.energyData.customerId,
|
customerId: this.energyData.customerId,
|
||||||
taskId: this.energyData.taskId,
|
taskId: this.energyData.taskId
|
||||||
refresh: flag
|
|
||||||
}
|
}
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import reportHeader from './report-header.vue'
|
// import reportHeader from './report-header.vue'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import { mapState,mapMutations } from 'vuex'
|
import { mapState,mapMutations } from 'vuex'
|
||||||
import { setTitle } from '@/utils/dsbridge.js'
|
import { setTitle } from '@/utils/dsbridge.js'
|
||||||
import { Notify } from 'vant'
|
import { Notify } from 'vant'
|
||||||
@@ -150,6 +150,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
signed: '',
|
signed: '',
|
||||||
signFile: '',
|
signFile: '',
|
||||||
|
imageUrlData: null,
|
||||||
flagModule:false,
|
flagModule:false,
|
||||||
isState: false
|
isState: false
|
||||||
// EnergyReportInfo: {}
|
// EnergyReportInfo: {}
|
||||||
@@ -157,6 +158,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// components: { reportHeader },
|
// components: { reportHeader },
|
||||||
|
watch: {
|
||||||
|
async '$store.getters.imageUrl'(val) {
|
||||||
|
if (val) {
|
||||||
|
this.imageUrlData = await getImageBlobUrl(val)
|
||||||
|
} else {
|
||||||
|
this.imageUrlData = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
setTitle('节能改造措施')
|
setTitle('节能改造措施')
|
||||||
this.getEnergyReportInfo()
|
this.getEnergyReportInfo()
|
||||||
@@ -164,7 +174,7 @@ export default {
|
|||||||
this.signed = sessionStorage.getItem('signed')
|
this.signed = sessionStorage.getItem('signed')
|
||||||
|
|
||||||
const obj = JSON.parse(sessionStorage.getItem('tidCid'))
|
const obj = JSON.parse(sessionStorage.getItem('tidCid'))
|
||||||
if(obj&&obj.item && obj.item.isState) {
|
if(obj.item && obj.item.isState) {
|
||||||
this.isState = obj.item.isState
|
this.isState = obj.item.isState
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,17 +191,13 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState('report', ['EnergyReportInfo']),
|
...mapState('report', ['EnergyReportInfo']),
|
||||||
levelShow() {
|
levelShow() {
|
||||||
// 客户经理 2
|
|
||||||
if(this.$store.getters.userLevel != 2) {
|
if(this.$store.getters.userLevel != 2) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
imageUrl() {
|
imageUrl() {
|
||||||
if(this.$store.getters.imageUrl) {
|
return this.imageUrlData
|
||||||
return `${downloadUrl}${this.$store.getters.imageUrl}`
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return localStorage.getItem('show') === 'true'
|
return localStorage.getItem('show') === 'true'
|
||||||
@@ -269,10 +275,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='energyReport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ import {
|
|||||||
editEnergyEquip,
|
editEnergyEquip,
|
||||||
} from '@/api/energyConsumption'
|
} from '@/api/energyConsumption'
|
||||||
import { dataMode } from '@/views/facilityManage/common.js'
|
import { dataMode } from '@/views/facilityManage/common.js'
|
||||||
import { getYearList } from "@/api/energyConsumption.js";
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TaskFilling',
|
name: 'TaskFilling',
|
||||||
components: {
|
components: {
|
||||||
@@ -624,39 +623,12 @@ export default {
|
|||||||
clearData() {
|
clearData() {
|
||||||
this.item = {}
|
this.item = {}
|
||||||
},
|
},
|
||||||
//获取能耗数据
|
|
||||||
async getDataInit() {
|
|
||||||
const id = JSON.parse(sessionStorage.getItem("tidCid")).customerId;
|
|
||||||
const data = {
|
|
||||||
customerId: id,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
};
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
getYearList(data).then((res) => {
|
|
||||||
let {code, data} = res
|
|
||||||
if (code == 0) {
|
|
||||||
resolve(data.list)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//提交页面信息
|
//提交页面信息
|
||||||
async saveAllInfo() {
|
saveAllInfo() {
|
||||||
const city = process.env.VUE_APP_CITY_TYPE=='cq'
|
const city = process.env.VUE_APP_CITY_TYPE=='cq'
|
||||||
const must = this.iconList&&this.iconList.some(ele => ele.typeId == '1'||ele.typeId=='8'||ele.typeId=='9')&&this.iconList.some(ele => ele.typeId=='3')&&this.iconList.some(ele => ele.typeId=='4')
|
const must = this.iconList&&this.iconList.some(ele => ele.typeId == '1'||ele.typeId=='8'||ele.typeId=='9')&&this.iconList.some(ele => ele.typeId=='3')&&this.iconList.some(ele => ele.typeId=='4')
|
||||||
|
// )&&ele.typeId=='3'&&ele.typeId=='4'}
|
||||||
console.log(city, must ,this.iconList, 'lllllllllllllllllll')
|
console.log(city, must ,this.iconList, 'lllllllllllllllllll')
|
||||||
let yearList = await this.getDataInit()
|
|
||||||
let noWaterList = yearList.filter(ele => {return !ele.useWater })
|
|
||||||
console.log(noWaterList, 'yearList')
|
|
||||||
if(city&&noWaterList.length>0){
|
|
||||||
this.$notify({
|
|
||||||
message: '能耗信息数据里的用水量必填',
|
|
||||||
duration: 1000,
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(!must&&city){
|
if(!must&&city){
|
||||||
this.$notify({
|
this.$notify({
|
||||||
message: '主要用能设备空调至少填一个、照明系统与配电系统必填',
|
message: '主要用能设备空调至少填一个、照明系统与配电系统必填',
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ import {
|
|||||||
// chooseAlbumAndTakePhoto,
|
// chooseAlbumAndTakePhoto,
|
||||||
} from '@/utils/dsbridge'
|
} from '@/utils/dsbridge'
|
||||||
import { insertPositionData, getPositionData } from '@/api/api.js'
|
import { insertPositionData, getPositionData } from '@/api/api.js'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -143,22 +143,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询打卡记录
|
// 查询打卡记录
|
||||||
getHistory(){
|
async getHistory(){
|
||||||
this.text1 = []
|
this.text1 = []
|
||||||
getPositionData({taskId: this.taskId}).then(res => {
|
const res = await getPositionData({taskId: this.taskId})
|
||||||
console.log(res.code , res.data);
|
console.log(res.code , res.data);
|
||||||
if(res.code == 0&&res.data){
|
if(res.code == 0&&res.data){
|
||||||
// for (const key in this.formData) {
|
|
||||||
// if (Object.hasOwnProperty.call(this.formData, key)) {
|
|
||||||
// this.formData[key] = res.data[key]
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
this.formData = res.data
|
this.formData = res.data
|
||||||
if (res.data.fileId) {
|
if (res.data.fileId) {
|
||||||
|
const blobUrl = await getImageBlobUrl(res.data.fileId)
|
||||||
this.$set(this.text1,0, {
|
this.$set(this.text1,0, {
|
||||||
fileName: res.data.fileName,
|
fileName: res.data.fileName,
|
||||||
fileId: res.data.fileId,
|
fileId: res.data.fileId,
|
||||||
url: `${downloadUrl}${res.data.fileId}`
|
url: blobUrl
|
||||||
})
|
})
|
||||||
console.log(this.text1);
|
console.log(this.text1);
|
||||||
}
|
}
|
||||||
@@ -169,7 +165,6 @@ export default {
|
|||||||
this.getLocation()
|
this.getLocation()
|
||||||
this.getAddress()
|
this.getAddress()
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 获取当前位置
|
// 获取当前位置
|
||||||
getLocation() {
|
getLocation() {
|
||||||
|
|||||||
@@ -13,13 +13,12 @@
|
|||||||
<van-field v-model="formData.buildName" label="建筑名称" required :rules="[{ required: true, message: '请填写建筑名称' }]" placeholder="请输入" input-align="right">
|
<van-field v-model="formData.buildName" label="建筑名称" required :rules="[{ required: true, message: '请填写建筑名称' }]" placeholder="请输入" input-align="right">
|
||||||
</van-field>
|
</van-field>
|
||||||
<van-cell title="建筑类型" is-link :value="showData.buildType1" required @click="showPicker = !showForm"/>
|
<van-cell title="建筑类型" is-link :value="showData.buildType1" required @click="showPicker = !showForm"/>
|
||||||
<van-field label="其他类型" required :rules="[{ required: true, message: '请填写具体类型' }]" v-if="formData.buildType==5" v-model="formData.otherDesc" input-align="right" />
|
|
||||||
<van-cell :title="userCode" :value="formData.consNo" />
|
<van-cell :title="userCode" :value="formData.consNo" />
|
||||||
<van-cell title="统一社会识别编码" :value="formData.creditCode" />
|
<van-cell title="统一社会识别编码" :value="formData.creditCode" />
|
||||||
<van-cell title="联系人" :value="formData.contactName" />
|
<van-cell title="联系人" :value="formData.contactName" />
|
||||||
<van-cell title="联系人手机号" :value="formData.contactPhone" />
|
<van-cell title="联系人手机号" :value="formData.contactPhone" />
|
||||||
<van-cell title="详细地址" :value="formData.detailAddress" />
|
<van-cell title="详细地址" :value="formData.detailAddress" />
|
||||||
<van-field v-model="formData.totalArea" v-input.float label="总建筑面积(㎡)" placeholder="只统计当前户号(区域)" @input="showTips" @blur="checkArea" type="number" required :rules="[{ required: true }]" input-align="right">
|
<van-field v-model="formData.totalArea" v-input.float label="总建筑面积(㎡)" placeholder="请输入" @input="showTips" @blur="checkArea" type="number" required :rules="[{ required: true }]" input-align="right">
|
||||||
</van-field>
|
</van-field>
|
||||||
<div class="tips" v-if="checkAreaTip">同一社会信用代码下建筑面积和用能人数重复</div>
|
<div class="tips" v-if="checkAreaTip">同一社会信用代码下建筑面积和用能人数重复</div>
|
||||||
<div class="tips" v-if="!checkAreaTip&&formData.totalArea>50000">总建筑面积>5万平方米,请确认是否属实</div>
|
<div class="tips" v-if="!checkAreaTip&&formData.totalArea>50000">总建筑面积>5万平方米,请确认是否属实</div>
|
||||||
@@ -42,9 +41,8 @@
|
|||||||
<div class="tips" v-if="tips7 == true">数据机房面积≤0.5*总建筑面积</div>
|
<div class="tips" v-if="tips7 == true">数据机房面积≤0.5*总建筑面积</div>
|
||||||
<van-cell title="建筑投运年份(年)" is-link required :rules="[{ required: true, message: '请选择建筑投运年份年份' }]" :value="formData.operationYear" @click="handelOpen" />
|
<van-cell title="建筑投运年份(年)" is-link required :rules="[{ required: true, message: '请选择建筑投运年份年份' }]" :value="formData.operationYear" @click="handelOpen" />
|
||||||
<!-- <van-field v-model="formData.operationYear" label="建筑投运年份(年)" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('operationYear', 'SET_HEAT_YEAR')" /> -->
|
<!-- <van-field v-model="formData.operationYear" label="建筑投运年份(年)" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('operationYear', 'SET_HEAT_YEAR')" /> -->
|
||||||
<van-field v-model="formData.peopleNum" v-input.numNo0 required @blur="checkArea" :rules="[{required: true, }]" :label="peopleShow" placeholder="只统计当前户号(区域)" type="number" input-align="right">
|
<van-field v-model="formData.peopleNum" v-input.numNo0 required @blur="checkArea" :rules="[{required: true, message: `请先选择建筑类型再填写` }]" :label="peopleShow" placeholder="" type="number" input-align="right">
|
||||||
</van-field>
|
</van-field>
|
||||||
<div class="tips" v-if="tips10 == true">0.1≤单位面积人数≤200</div>
|
|
||||||
<div class="tips" v-if="checkAreaTip">同一社会信用代码下建筑面积和用能人数重复</div>
|
<div class="tips" v-if="checkAreaTip">同一社会信用代码下建筑面积和用能人数重复</div>
|
||||||
<van-cell title="建筑外观照片" :required="$store.getters.cityType" :rules="[{ required: $store.getters.cityType}] "/>
|
<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" />
|
<van-uploader v-model="fileList" :max-count="3" :after-read="afterRead" :before-delete="delImg" @click-upload="onUpload" preview-size="100px" class="uploader" ref="file" />
|
||||||
@@ -303,7 +301,7 @@ import mixin from '@/mixins/mixin'
|
|||||||
// import { Toast } from 'vant'
|
// import { Toast } from 'vant'
|
||||||
import { getCode } from '@/api/common.js'
|
import { getCode } from '@/api/common.js'
|
||||||
import { addEnergyEquip } from '@/api/energyConsumption'
|
import { addEnergyEquip } from '@/api/energyConsumption'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import { Notify } from 'vant';
|
import { Notify } from 'vant';
|
||||||
import { getLocationMessage, getPosition, chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
import { getLocationMessage, getPosition, chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
||||||
import Loading from '@/components/loading'
|
import Loading from '@/components/loading'
|
||||||
@@ -315,7 +313,6 @@ import {
|
|||||||
getInfo,
|
getInfo,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
changeSaveStateAPI,
|
changeSaveStateAPI,
|
||||||
// downloadFile,
|
|
||||||
duplicateCheck,
|
duplicateCheck,
|
||||||
} from '@/api/api.js'
|
} from '@/api/api.js'
|
||||||
// import { debuglog } from 'util'
|
// import { debuglog } from 'util'
|
||||||
@@ -340,7 +337,6 @@ export default {
|
|||||||
tips6: false,
|
tips6: false,
|
||||||
tips7: false,
|
tips7: false,
|
||||||
// tips8: false,
|
// tips8: false,
|
||||||
tips10: false,
|
|
||||||
newAnswer: [], // 问答题存
|
newAnswer: [], // 问答题存
|
||||||
loading:false,
|
loading:false,
|
||||||
result1: '无',
|
result1: '无',
|
||||||
@@ -734,7 +730,6 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async checkArea(){
|
async checkArea(){
|
||||||
this.showTips10()
|
|
||||||
if(this.formData.totalArea>50000&&this.formData.peopleNum){
|
if(this.formData.totalArea>50000&&this.formData.peopleNum){
|
||||||
let params = {
|
let params = {
|
||||||
totalArea: this.formData.totalArea,
|
totalArea: this.formData.totalArea,
|
||||||
@@ -816,14 +811,6 @@ export default {
|
|||||||
this.tips7 = false
|
this.tips7 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showTips10() {
|
|
||||||
let rate = Number(this.formData.totalArea)/ Number(this.formData.peopleNum)
|
|
||||||
if( rate<0.1|| rate> 200) {
|
|
||||||
this.tips10 = true
|
|
||||||
}else {
|
|
||||||
this.tips10 = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
buildTypeChange(val) {
|
buildTypeChange(val) {
|
||||||
this.showPicker = false
|
this.showPicker = false
|
||||||
switch (val[0]) {
|
switch (val[0]) {
|
||||||
@@ -853,16 +840,18 @@ export default {
|
|||||||
return formData
|
return formData
|
||||||
},
|
},
|
||||||
// 上传图片调用原生的方法 获取到绝对路径调用getImageFileFromUrl
|
// 上传图片调用原生的方法 获取到绝对路径调用getImageFileFromUrl
|
||||||
onUpload () {
|
async onUpload () {
|
||||||
chooseAlbumAndTakePhoto((data) => {
|
chooseAlbumAndTakePhoto(async (data) => {
|
||||||
// this.saveGreenComeData(data)
|
// this.saveGreenComeData(data)
|
||||||
let d = 'data:image/jpeg;base64,' + data
|
let d = 'data:image/jpeg;base64,' + data
|
||||||
this.fileIamge = d
|
this.fileIamge = d
|
||||||
let params = this.base64ToFile(d,new Date().getTime().toString())
|
let params = this.base64ToFile(d,new Date().getTime().toString())
|
||||||
uploadFile(params).then((res) => {
|
uploadFile(params).then(async (res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
const blobUrl = await getImageBlobUrl(res.data.attach_id)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url:`${downloadUrl}${res.data.attach_id}`
|
url: blobUrl,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.attach_id)
|
this.fileIds.push(res.data.attach_id)
|
||||||
}
|
}
|
||||||
@@ -1010,10 +999,6 @@ export default {
|
|||||||
// ele.disabled = false
|
// ele.disabled = false
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}else{
|
|
||||||
this.showData.buildType1 = this.option[i].text
|
|
||||||
this.mainActiveIndex = i
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,23 +1229,26 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// this.form.files.map(path => ({ url: `${downloadUrl}${path}` }))
|
// this.form.files.map(path => ({ url: `${downloadUrl}${path}` }))
|
||||||
if (res.data.text1) {
|
if (res.data.text1) {
|
||||||
const url1 = `${downloadUrl}${res.data.text1}`
|
const url1 = await getImageBlobUrl(res.data.text1)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url1,
|
url: url1,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text1)
|
this.fileIds.push(res.data.text1)
|
||||||
}
|
}
|
||||||
if (res.data.text2) {
|
if (res.data.text2) {
|
||||||
const url2 = `${downloadUrl}${res.data.text2}`
|
const url2 = await getImageBlobUrl(res.data.text2)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url2,
|
url: url2,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text2)
|
this.fileIds.push(res.data.text2)
|
||||||
}
|
}
|
||||||
if (res.data.text3) {
|
if (res.data.text3) {
|
||||||
const url3 = `${downloadUrl}${res.data.text3}`
|
const url3 = await getImageBlobUrl(res.data.text3)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url3,
|
url: url3,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text3)
|
this.fileIds.push(res.data.text3)
|
||||||
}
|
}
|
||||||
@@ -1292,22 +1280,18 @@ export default {
|
|||||||
this.mainActiveIndex = 0
|
this.mainActiveIndex = 0
|
||||||
res.data.forEach((v, i) => {
|
res.data.forEach((v, i) => {
|
||||||
if(v.code == select) this.mainActiveIndex = i
|
if(v.code == select) this.mainActiveIndex = i
|
||||||
let list = []
|
const list = v.child.map((ele) => {
|
||||||
if(v.child){
|
|
||||||
list = v.child.map((ele) => {
|
|
||||||
return {
|
return {
|
||||||
text: ele.name,
|
text: ele.name,
|
||||||
id: ele.code,
|
id: ele.code,
|
||||||
pCode: ele.pCode
|
pCode: ele.pCode
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
arr.push({
|
arr.push({
|
||||||
text: v.name,
|
text: v.name,
|
||||||
value: v.code,
|
value: v.code,
|
||||||
children: list,
|
children: list,
|
||||||
disabled: select!=6&&!(v.code == select)
|
disabled: select!=5&&!(v.code == select)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.option = arr
|
this.option = arr
|
||||||
@@ -1809,14 +1793,11 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
delImg(detail) {
|
delImg(detail) {
|
||||||
let url = ''
|
|
||||||
if(!detail.file) {
|
|
||||||
url = detail.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
const index = this.fileList.findIndex((ele)=> ele == detail)
|
const index = this.fileList.findIndex((ele)=> ele == detail)
|
||||||
const index2 = this.fileIds.findIndex((ele)=> ele == url)
|
if (index > -1) {
|
||||||
this.fileList.splice(index, 1)
|
this.fileList.splice(index, 1)
|
||||||
this.fileIds.splice(index2, 1)
|
this.fileIds.splice(index, 1)
|
||||||
|
}
|
||||||
// console.log(this.fileList)
|
// console.log(this.fileList)
|
||||||
// console.log(this.fileIds)
|
// console.log(this.fileIds)
|
||||||
// return new Promise((resolve, reject) => {
|
// return new Promise((resolve, reject) => {
|
||||||
@@ -1893,7 +1874,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.checkAreaTip|| this.tips0 == true || this.tips1 == true || this.tips2 == true || this.tips3 == true || this.tips4 == true || this.tips6 == true || this.tips7 || this.tips10){
|
if(this.checkAreaTip|| this.tips0 == true || this.tips1 == true || this.tips2 == true || this.tips3 == true || this.tips4 == true || this.tips6 == true || this.tips7){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this.gfShow == 1&&(this.tips8||this.tips9)){
|
if(this.gfShow == 1&&(this.tips8||this.tips9)){
|
||||||
|
|||||||
@@ -287,7 +287,6 @@ import { getCurrentPersonInfoAPI } from "@/api/customerIformation.js";
|
|||||||
import { getCode } from '@/api/common.js'
|
import { getCode } from '@/api/common.js'
|
||||||
import Year from '@/views/facilityManage/common-vue/year.vue'
|
import Year from '@/views/facilityManage/common-vue/year.vue'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
import { Dialog, Notify } from 'vant';
|
|
||||||
|
|
||||||
// import Loading from '@/components/loading'
|
// import Loading from '@/components/loading'
|
||||||
export default {
|
export default {
|
||||||
@@ -504,32 +503,6 @@ export default {
|
|||||||
// 任务信息填报
|
// 任务信息填报
|
||||||
async filling(item) {
|
async filling(item) {
|
||||||
this.setCurrentTidCidPersonInfo(item)
|
this.setCurrentTidCidPersonInfo(item)
|
||||||
const that = this
|
|
||||||
const res = await getCurrentPersonInfoAPI(item.customerId)
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.creditCode = res.data.creditCode
|
|
||||||
if(!res.data.creditCode||res.data.creditCode=='null'||!res.data.contactName||res.data.contactName=='null'||!res.data.contactPhone||res.data.contactPhone=='null'){
|
|
||||||
Dialog.confirm({
|
|
||||||
title: '提示',
|
|
||||||
message: '请前往配置信息页面,填写用户基本信息',
|
|
||||||
beforeClose: async (action, done) => {
|
|
||||||
if (action === 'confirm') {
|
|
||||||
that.archivalInformation();
|
|
||||||
done();
|
|
||||||
}else {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$notify({
|
|
||||||
type: 'danger',
|
|
||||||
message: res.msg
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (item.type == '01') {
|
if (item.type == '01') {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'TaskFilling'
|
name: 'TaskFilling'
|
||||||
@@ -547,6 +520,19 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.removeItem('enterpriseId')
|
sessionStorage.removeItem('enterpriseId')
|
||||||
|
try {
|
||||||
|
const res = await getCurrentPersonInfoAPI(item.customerId)
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.creditCode = res.data.creditCode
|
||||||
|
} else {
|
||||||
|
this.$notify({
|
||||||
|
type: 'danger',
|
||||||
|
message: res.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'acquisition',
|
name: 'acquisition',
|
||||||
params: {
|
params: {
|
||||||
@@ -556,21 +542,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取当前页面信息
|
|
||||||
getPathInfo() {
|
|
||||||
let currentPath = {}
|
|
||||||
currentPath.path = this.$route.path
|
|
||||||
currentPath.name = '客户信息填报'
|
|
||||||
this.$store.commit('path/SET_PATH', currentPath)
|
|
||||||
sessionStorage.setItem('goPage', JSON.stringify(currentPath))
|
|
||||||
},
|
|
||||||
// 档案信息
|
|
||||||
archivalInformation() {
|
|
||||||
this.getPathInfo()
|
|
||||||
console.log('/archivalinformation');
|
|
||||||
this.$router.push('/archivalinformation')
|
|
||||||
},
|
|
||||||
// 能效诊断跳转
|
// 能效诊断跳转
|
||||||
nengxiaozd(item) {
|
nengxiaozd(item) {
|
||||||
this.setCurrentTidCidPersonInfo(item)
|
this.setCurrentTidCidPersonInfo(item)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
import { getCurrentUserEvaluate, getCurrentUserEvaluateAdd } from '@/api/evaluateAndReply'
|
import { getCurrentUserEvaluate, getCurrentUserEvaluateAdd } from '@/api/evaluateAndReply'
|
||||||
import { Notify } from 'vant'
|
import { Notify } from 'vant'
|
||||||
import Loading from '@/components/loading'
|
import Loading from '@/components/loading'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'userEvaluate',
|
name: 'userEvaluate',
|
||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.data.list.length > 0) {
|
if (res.data.list.length > 0) {
|
||||||
res.data.list.forEach((v) => {
|
for (const v of res.data.list) {
|
||||||
if(v.nxzdEvaluateReplyDTOS && v.nxzdEvaluateReplyDTOS.length > 0) {
|
if(v.nxzdEvaluateReplyDTOS && v.nxzdEvaluateReplyDTOS.length > 0) {
|
||||||
v.show = true
|
v.show = true
|
||||||
v.showTextArea = false
|
v.showTextArea = false
|
||||||
@@ -152,9 +152,9 @@ export default {
|
|||||||
v.message = ''
|
v.message = ''
|
||||||
}
|
}
|
||||||
if(v.image) {
|
if(v.image) {
|
||||||
v.image = `${downloadUrl}${v.image}`
|
v.image = await getImageBlobUrl(v.image)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
this.list = res.data.list
|
this.list = res.data.list
|
||||||
this.reportLevel = res.data.list[0]
|
this.reportLevel = res.data.list[0]
|
||||||
this.levelName(this.reportLevel.reportValue)
|
this.levelName(this.reportLevel.reportValue)
|
||||||
|
|||||||
@@ -14,19 +14,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="nengyuan">
|
<div class="nengyuan">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.floatNo0 v-model="yearForm.power" label="电(kWh)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.floatNo0 v-model="yearForm.power" label="电(kWh)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.naturalGas" label="天然气(m³)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.naturalGas" label="天然气(m³)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.steam" label="饱和蒸汽(t)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.steam" label="饱和蒸汽(t)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.dieselGas" label="柴油(L)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.dieselGas" label="柴油(L)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.gasoline" label="汽油(L)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.gasoline" label="汽油(L)" placeholder="请输入" />
|
||||||
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.petroleumGas" label="液化石油气(t)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.petroleumGas" label="液化石油气(t)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.hot" label="热力(GJ)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.hot" label="热力(GJ)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.coal" label="煤炭(t)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.coal" label="煤炭(t)" placeholder="请输入" />
|
||||||
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.gasSelfHeating" label=" 燃气自供暖(m³)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.gasSelfHeating" label=" 燃气自供暖(m³)" placeholder="请输入" />
|
||||||
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.centralHeating" label=" 集中供暖(GJ)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.centralHeating" label=" 集中供暖(GJ)" placeholder="请输入" />
|
||||||
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.dataRoom" label=" 机房总电能消耗(kWh)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.dataRoom" label=" 机房总电能消耗(kWh)" placeholder="请输入" />
|
||||||
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.energyConsumptionInformationEquipment" label=" 信息设备电能消耗(kWh)" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.energyConsumptionInformationEquipment" label=" 信息设备电能消耗(kWh)" placeholder="请输入" />
|
||||||
<van-field @blur="changeData" :disabled="showForm" type="number" v-input.reset v-model="yearForm.energyOther" label="其他" placeholder="请输入" />
|
<van-field :disabled="showForm" type="number" v-input.reset v-model="yearForm.energyOther" label="其他" placeholder="请输入" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
<!-- 资源 -->
|
<!-- 资源 -->
|
||||||
@@ -49,18 +49,6 @@
|
|||||||
<van-field v-model="yearForm.energyPv" v-input.reset :disabled="showForm" type="number" label="光伏(kWh)" placeholder="请输入" />
|
<van-field v-model="yearForm.energyPv" v-input.reset :disabled="showForm" type="number" label="光伏(kWh)" placeholder="请输入" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
<!-- 能耗折标煤数据 -->
|
|
||||||
<div class="title">
|
|
||||||
<div class="title-img"><img src="@/assets/u239.png" alt="" /></div>
|
|
||||||
<p>能耗折标煤数据</p>
|
|
||||||
</div>
|
|
||||||
<div class="nengyuan">
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field v-for="(item,index) in propsList" :key='index' :disabled="true" type="number" v-input.floatNo0 v-model="yearForm[item.prop2]" :label="item.name+'(tce)'" placeholder="请输入" />
|
|
||||||
<van-field v-model="yearForm.allswitch" v-input.reset :disabled="true" type="number" label="总能耗" placeholder="请输入" />
|
|
||||||
|
|
||||||
</van-cell-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -76,67 +64,13 @@
|
|||||||
<script>
|
<script>
|
||||||
// import Header from "@/components/headerNew";
|
// import Header from "@/components/headerNew";
|
||||||
import { Notify } from "vant";
|
import { Notify } from "vant";
|
||||||
import { yearEdit, getSingleYearInfo, factorlist} from "@/api/energyConsumption";
|
import { yearEdit, getSingleYearInfo } from "@/api/energyConsumption";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// Header,
|
// Header,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
propsList:[
|
|
||||||
{
|
|
||||||
type: '01',
|
|
||||||
name: '电',
|
|
||||||
prop1: 'power',
|
|
||||||
prop2: 'switchElectricity',
|
|
||||||
},{
|
|
||||||
type: '02',
|
|
||||||
name: '天然气',
|
|
||||||
prop1: 'naturalGas',
|
|
||||||
prop2: 'switchGas',
|
|
||||||
// },{
|
|
||||||
// type: '03',
|
|
||||||
// name: '饱和蒸汽',
|
|
||||||
// prop1: 'steam',
|
|
||||||
// prop2: '',
|
|
||||||
},{
|
|
||||||
type: '04',
|
|
||||||
name: '柴油',
|
|
||||||
prop1: 'dieselGas',
|
|
||||||
prop2: 'switchDiesel',
|
|
||||||
// },{
|
|
||||||
// type: '06',
|
|
||||||
// name: '用水量',
|
|
||||||
// prop1: 'useWater',
|
|
||||||
// prop2: '',
|
|
||||||
// },{
|
|
||||||
// type: '07',
|
|
||||||
// name: '光伏',
|
|
||||||
// prop1: 'energyPv',
|
|
||||||
// prop2: '',
|
|
||||||
},{
|
|
||||||
type: '08',
|
|
||||||
name: '热力',
|
|
||||||
prop1: 'hot',
|
|
||||||
prop2: 'switchHot',
|
|
||||||
},{
|
|
||||||
type: '09',
|
|
||||||
name: '煤炭',
|
|
||||||
prop1: 'coal',
|
|
||||||
prop2: 'switchCoal',
|
|
||||||
},{
|
|
||||||
type: '10',
|
|
||||||
name: '汽油',
|
|
||||||
prop1: 'gasoline',
|
|
||||||
prop2: 'switchGasoline',
|
|
||||||
},{
|
|
||||||
type: '05',
|
|
||||||
name: '其他',
|
|
||||||
prop1: 'energyOther',
|
|
||||||
prop2: 'switchOther',
|
|
||||||
}
|
|
||||||
|
|
||||||
],
|
|
||||||
title: "逐年能源账单详情",
|
title: "逐年能源账单详情",
|
||||||
yearForm: {
|
yearForm: {
|
||||||
dieselGas: 0,
|
dieselGas: 0,
|
||||||
@@ -155,8 +89,7 @@ export default {
|
|||||||
centralHeating: 0,
|
centralHeating: 0,
|
||||||
energyConsumptionInformationEquipment: 0,
|
energyConsumptionInformationEquipment: 0,
|
||||||
},
|
},
|
||||||
tidCid: null,
|
tidCid: null
|
||||||
dataList:[]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -175,17 +108,6 @@ export default {
|
|||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeData(){
|
|
||||||
let sum = 0
|
|
||||||
this.dataList.map(ele => {
|
|
||||||
let selectData = this.propsList.filter(item=> item.type === ele.energyName)
|
|
||||||
if(selectData&&selectData.length>0){
|
|
||||||
this.yearForm[selectData[0].prop2] = this.yearForm[selectData[0].prop1]?(this.yearForm[selectData[0].prop1]*ele.factorNum).toFixed(2):0
|
|
||||||
sum+=Number(this.yearForm[selectData[0].prop2])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.$set(this.yearForm, 'allswitch', sum.toFixed(2))
|
|
||||||
},
|
|
||||||
//获取数据
|
//获取数据
|
||||||
async getData() {
|
async getData() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
@@ -198,19 +120,6 @@ export default {
|
|||||||
}
|
}
|
||||||
// this.yearForm = res.data;
|
// this.yearForm = res.data;
|
||||||
}
|
}
|
||||||
let params = {
|
|
||||||
energyName: "",
|
|
||||||
factorUnit: "",
|
|
||||||
factorNum: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 20
|
|
||||||
}
|
|
||||||
const result = await factorlist(params)
|
|
||||||
if(result.code==0){
|
|
||||||
this.dataList = result.data.records
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.changeData()
|
|
||||||
},
|
},
|
||||||
//保存修改
|
//保存修改
|
||||||
async handelClickSave() {
|
async handelClickSave() {
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ import { pumpList, pumpRemove, enterprisGetInfo, enterprisEdit, enterprisAdd } f
|
|||||||
import { Notify } from "vant";
|
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 { getImageBlobUrl } from '@/utils/index'
|
||||||
|
|
||||||
// import Header from "@/components/headerNew";
|
// import Header from "@/components/headerNew";
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
@@ -200,7 +200,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//安卓会调用的方法
|
//安卓会调用的方法
|
||||||
onUpload(data, type) {
|
onUpload(data, type) {
|
||||||
this[type] = [data[0].url]
|
this[type] = [data[0].fileId]
|
||||||
},
|
},
|
||||||
|
|
||||||
delImg(file, detail, type) {
|
delImg(file, detail, type) {
|
||||||
@@ -242,21 +242,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
||||||
this.text1 = [this.text1[0].url.split('download/')[1]]
|
this.text1 = [this.text1[0].fileId]
|
||||||
} else if(this.text1.length > 0 && this.text1[0].split('download/').length > 1) {
|
|
||||||
this.text1 = [this.text1[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
||||||
this.text2 = [this.text2[0].url.split('download/')[1]]
|
this.text2 = [this.text2[0].fileId]
|
||||||
} else if(this.text2.length > 0 && this.text2[0].split('download/').length > 1) {
|
|
||||||
this.text2 = [this.text2[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
||||||
this.text3 = [this.text3[0].url.split('download/')[1]]
|
this.text3 = [this.text3[0].fileId]
|
||||||
} else if(this.text3.length > 0 && this.text3[0].split('download/').length > 1) {
|
|
||||||
this.text3 = [this.text3[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = this.text1.concat(this.text2, this.text3)
|
const text = this.text1.concat(this.text2, this.text3)
|
||||||
@@ -266,14 +260,9 @@ export default {
|
|||||||
//判断是否为对象格式
|
//判断是否为对象格式
|
||||||
ifObj(imgList) {
|
ifObj(imgList) {
|
||||||
console.log(imgList,'imgList');
|
console.log(imgList,'imgList');
|
||||||
imgList.forEach((v) => {
|
|
||||||
if(v instanceof Object && v.url.split('download/').length > 1) {
|
|
||||||
v.url = v.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = imgList.map((ele)=>{
|
const list = imgList.map((ele)=>{
|
||||||
if(ele instanceof Object) {
|
if(ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -331,19 +320,22 @@ export default {
|
|||||||
if(res.data.text2) {
|
if(res.data.text2) {
|
||||||
if(res.data.text2.split(',')[0] != 0) {
|
if(res.data.text2.split(',')[0] != 0) {
|
||||||
this.text1.push({
|
this.text1.push({
|
||||||
url:`${downloadUrl}${res.data.text2.split(',')[0]}`
|
fileId: res.data.text2.split(',')[0],
|
||||||
|
url: await getImageBlobUrl(res.data.text2.split(',')[0])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text2.split(',')[1] != 0) {
|
if(res.data.text2.split(',')[1] != 0) {
|
||||||
this.text2.push({
|
this.text2.push({
|
||||||
url:`${downloadUrl}${res.data.text2.split(',')[1]}`
|
fileId: res.data.text2.split(',')[1],
|
||||||
|
url: await getImageBlobUrl(res.data.text2.split(',')[1])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text2.split(',')[2] != 0) {
|
if(res.data.text2.split(',')[2] != 0) {
|
||||||
this.text3.push({
|
this.text3.push({
|
||||||
url:`${downloadUrl}${res.data.text2.split(',')[2]}`
|
fileId: res.data.text2.split(',')[2],
|
||||||
|
url: await getImageBlobUrl(res.data.text2.split(',')[2])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,19 @@
|
|||||||
<div class="year-main">
|
<div class="year-main">
|
||||||
<div class="nengyuan">
|
<div class="nengyuan">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="checkEquipDieout('02', 'systemModel', 'absoleteNum')" v-model="form.systemModel" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" maxlength="20" label="泵机型号" placeholder="请输入泵机型号"/>
|
<van-field v-model="form.systemModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" maxlength="20" label="泵机型号" placeholder="请输入泵机型号"/>
|
||||||
<van-field @blur="checkEquipDieout('02', 'motorModel', 'absoleteElecNum')" v-model="form.motorModel" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" maxlength="20" label="电机型号" placeholder="请输入电机型号"/>
|
<van-field v-model="form.motorModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" maxlength="20" label="电机型号" placeholder="请输入电机型号"/>
|
||||||
<van-field label="设备类型" v-model="form.equipTypeName" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','02')" />
|
<van-field label="设备类型" v-model="form.equipTypeName" required :rules="[{ required: true }]" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','02')" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field @blur="changeDataNum('02', ['systemModel','motorModel'], ['absoleteNum','absoleteElecNum'])" v-input.numNo0 v-model="form.systemNum" type="number" label="台数(台)" placeholder="请输入台数" />
|
<van-field v-input.numNo0 v-model="form.systemNum" type="number" required :rules="[{ required: true }]" label="台数(台)" placeholder="请输入台数" />
|
||||||
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" type="number" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange"/>
|
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" type="number" required :rules="[{ required: true }]" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange"/>
|
||||||
<van-field v-input.float v-model="form.frequencyPerValue" type="number" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
<van-field v-input.float v-model="form.frequencyPerValue" type="number" required :rules="[{ required: true }]" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteNum" type="number" label="淘汰泵机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteNum" type="number" label="淘汰泵机数量" placeholder="请输入" />
|
||||||
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="泵机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','泵机效率')" />
|
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="泵机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','泵机效率')" />
|
||||||
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" placeholder="请输入" />
|
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" required :rules="[{ required: true }]" placeholder="请输入" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -50,7 +50,6 @@ import VanPickerNew from '@/components/vanPickerNew'
|
|||||||
import { pumpAdd, pumpGetInfo, pumpEdit } from "@/api/universalEnergy.js"
|
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 {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin.js'
|
|
||||||
import Year from '../facilityManage/common-vue/year.vue'
|
import Year from '../facilityManage/common-vue/year.vue'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
@@ -59,7 +58,7 @@ export default {
|
|||||||
VanPickerNew,
|
VanPickerNew,
|
||||||
Year
|
Year
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
mixins: [mixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addeditId: '', // 新增修改提交id
|
addeditId: '', // 新增修改提交id
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ import { reformList, reformRemove } from '@/api/universalEnergy.js'
|
|||||||
import { Notify } from 'vant'
|
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 { getImageBlobUrl } from '@/utils/index'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -387,7 +387,6 @@ export default {
|
|||||||
newVal.forEach(v => {
|
newVal.forEach(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.listValue.push(v.value)
|
this.listValue.push(v.value)
|
||||||
this.listValue = [...new Set(this.listValue)]
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -489,18 +488,20 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
// 上传图片调用原生的方法 获取到绝对路径调用getImageFileFromUrl
|
// 上传图片调用原生的方法 获取到绝对路径调用getImageFileFromUrl
|
||||||
onUpload () {
|
async onUpload () {
|
||||||
console.log('进入chooseAlbumAndTakePhoto方法')
|
console.log('进入chooseAlbumAndTakePhoto方法')
|
||||||
chooseAlbumAndTakePhoto((data) => {
|
chooseAlbumAndTakePhoto(async (data) => {
|
||||||
// this.saveGreenComeData(data)
|
// this.saveGreenComeData(data)
|
||||||
let d = 'data:image/jpeg;base64,' + data
|
let d = 'data:image/jpeg;base64,' + data
|
||||||
console.log('data', d);
|
console.log('data', d);
|
||||||
this.fileIamge = d
|
this.fileIamge = d
|
||||||
let params = this.base64ToFile(d,new Date().getTime().toString())
|
let params = this.base64ToFile(d,new Date().getTime().toString())
|
||||||
uploadFile(params).then((res) => {
|
uploadFile(params).then(async (res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
const blobUrl = await getImageBlobUrl(res.data.attach_id)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url:`${downloadUrl}${res.data.attach_id}`
|
url: blobUrl,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.attach_id)
|
this.fileIds.push(res.data.attach_id)
|
||||||
}
|
}
|
||||||
@@ -509,14 +510,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
delImg(detail) {
|
delImg(detail) {
|
||||||
let url = ''
|
|
||||||
if(!detail.file) {
|
|
||||||
url = detail.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
const index = this.fileList.findIndex((ele)=> ele == detail)
|
const index = this.fileList.findIndex((ele)=> ele == detail)
|
||||||
const index2 = this.fileIds.findIndex((ele)=> ele == url)
|
if (index > -1) {
|
||||||
this.fileList.splice(index, 1)
|
this.fileList.splice(index, 1)
|
||||||
this.fileIds.splice(index2, 1)
|
this.fileIds.splice(index, 1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateUserStatus() {
|
updateUserStatus() {
|
||||||
const params = {
|
const params = {
|
||||||
@@ -662,23 +660,26 @@ export default {
|
|||||||
}
|
}
|
||||||
this.address = res.data.address
|
this.address = res.data.address
|
||||||
if (res.data.text1) {
|
if (res.data.text1) {
|
||||||
const url1 = `${downloadUrl}${res.data.text1}`
|
const url1 = await getImageBlobUrl(res.data.text1)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url1,
|
url: url1,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text1)
|
this.fileIds.push(res.data.text1)
|
||||||
}
|
}
|
||||||
if (res.data.text2) {
|
if (res.data.text2) {
|
||||||
const url2 = `${downloadUrl}${res.data.text2}`
|
const url2 = await getImageBlobUrl(res.data.text2)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url2,
|
url: url2,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text2)
|
this.fileIds.push(res.data.text2)
|
||||||
}
|
}
|
||||||
if (res.data.text3) {
|
if (res.data.text3) {
|
||||||
const url3 = `${downloadUrl}${res.data.text3}`
|
const url3 = await getImageBlobUrl(res.data.text3)
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: url3,
|
url: url3,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.fileIds.push(res.data.text3)
|
this.fileIds.push(res.data.text3)
|
||||||
}
|
}
|
||||||
@@ -692,7 +693,6 @@ export default {
|
|||||||
let aaa = commonEnergySystemArr[i].replace('0', '') - 1;
|
let aaa = commonEnergySystemArr[i].replace('0', '') - 1;
|
||||||
this.result.push(this.list[aaa])
|
this.result.push(this.list[aaa])
|
||||||
}
|
}
|
||||||
this.result = [...new Set(this.result)]
|
|
||||||
}
|
}
|
||||||
//能源计量见着数据处理
|
//能源计量见着数据处理
|
||||||
if(res.data.primaryEnergyMeterType.indexOf('0')>-1){
|
if(res.data.primaryEnergyMeterType.indexOf('0')>-1){
|
||||||
@@ -790,11 +790,6 @@ export default {
|
|||||||
|
|
||||||
this.list.push({ name: v.name, value: v.value })
|
this.list.push({ name: v.name, value: v.value })
|
||||||
})
|
})
|
||||||
|
|
||||||
if(this.ifEnterpriseId === ''){
|
|
||||||
this.result=[]
|
|
||||||
this.result.push(this.list[0])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -810,7 +805,8 @@ export default {
|
|||||||
this.$toast('通用能源系统必须有配电系统')
|
this.$toast('通用能源系统必须有配电系统')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(this.listValue2, 'this.listValue2', this.listValue);
|
console.log(this.listValue2, 'this.listValue2', this.list);
|
||||||
|
return
|
||||||
if( this.listValue2.indexOf("01") === -1){
|
if( this.listValue2.indexOf("01") === -1){
|
||||||
this.$toast('一级计量必须有勾选电')
|
this.$toast('一级计量必须有勾选电')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ import { fanList, fanRemove, enterprisGetInfo, enterprisEdit, enterprisAdd } fro
|
|||||||
import { Notify } from "vant";
|
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 { getImageBlobUrl } from '@/utils/index'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
|
|
||||||
// import Header from "@/components/headerNew";
|
// import Header from "@/components/headerNew";
|
||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//安卓会调用的方法
|
//安卓会调用的方法
|
||||||
onUpload(data, type) {
|
onUpload(data, type) {
|
||||||
this[type] = [data[0].url]
|
this[type] = [data[0].fileId]
|
||||||
},
|
},
|
||||||
|
|
||||||
delImg(file, detail, type) {
|
delImg(file, detail, type) {
|
||||||
@@ -243,21 +243,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
||||||
this.text1 = [this.text1[0].url.split('download/')[1]]
|
this.text1 = [this.text1[0].fileId]
|
||||||
} else if(this.text1.length > 0 && this.text1[0].split('download/').length > 1) {
|
|
||||||
this.text1 = [this.text1[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
||||||
this.text2 = [this.text2[0].url.split('download/')[1]]
|
this.text2 = [this.text2[0].fileId]
|
||||||
} else if(this.text2.length > 0 && this.text2[0].split('download/').length > 1) {
|
|
||||||
this.text2 = [this.text2[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
||||||
this.text3 = [this.text3[0].url.split('download/')[1]]
|
this.text3 = [this.text3[0].fileId]
|
||||||
} else if(this.text3.length > 0 && this.text3[0].split('download/').length > 1) {
|
|
||||||
this.text3 = [this.text3[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = this.text1.concat(this.text2, this.text3)
|
const text = this.text1.concat(this.text2, this.text3)
|
||||||
@@ -266,14 +260,9 @@ export default {
|
|||||||
|
|
||||||
//判断是否为对象格式
|
//判断是否为对象格式
|
||||||
ifObj(imgList) {
|
ifObj(imgList) {
|
||||||
imgList.forEach((v) => {
|
|
||||||
if(v instanceof Object && v.url.split('download/').length > 1) {
|
|
||||||
v.url = v.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = imgList.map((ele)=>{
|
const list = imgList.map((ele)=>{
|
||||||
if(ele instanceof Object) {
|
if(ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -334,19 +323,22 @@ export default {
|
|||||||
if(res.data.text3) {
|
if(res.data.text3) {
|
||||||
if(res.data.text3.split(',')[0] != 0) {
|
if(res.data.text3.split(',')[0] != 0) {
|
||||||
this.text1.push({
|
this.text1.push({
|
||||||
url:`${downloadUrl}${res.data.text3.split(',')[0]}`
|
fileId: res.data.text3.split(',')[0],
|
||||||
|
url: await getImageBlobUrl(res.data.text3.split(',')[0])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text3.split(',')[1] != 0) {
|
if(res.data.text3.split(',')[1] != 0) {
|
||||||
this.text2.push({
|
this.text2.push({
|
||||||
url:`${downloadUrl}${res.data.text3.split(',')[1]}`
|
fileId: res.data.text3.split(',')[1],
|
||||||
|
url: await getImageBlobUrl(res.data.text3.split(',')[1])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text3.split(',')[2] != 0) {
|
if(res.data.text3.split(',')[2] != 0) {
|
||||||
this.text3.push({
|
this.text3.push({
|
||||||
url:`${downloadUrl}${res.data.text3.split(',')[2]}`
|
fileId: res.data.text3.split(',')[2],
|
||||||
|
url: await getImageBlobUrl(res.data.text3.split(',')[2])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(res.data.text1) {
|
if(res.data.text1) {
|
||||||
|
|||||||
@@ -6,19 +6,19 @@
|
|||||||
<div class="year-main">
|
<div class="year-main">
|
||||||
<div class="nengyuan">
|
<div class="nengyuan">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="checkEquipDieout('03', 'systemModel', 'absoleteNum')" v-model="form.systemModel" :rules="[{ required: false, validator: modelValidator, message:'2≤型号长度≤20'}]" label="风机型号" placeholder="请输入风机型号" maxlength="20" />
|
<van-field v-model="form.systemModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" label="风机型号" placeholder="请输入风机型号" maxlength="20" />
|
||||||
<van-field @blur="checkEquipDieout('03', 'motorModel', 'absoleteElecNum')" v-model="form.motorModel" :rules="[{ required: false, validator: modelValidator, message:'2≤型号长度≤20'}]" label="电机型号" placeholder="请输入电机型号" maxlength="20"/>
|
<van-field v-model="form.motorModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" label="电机型号" placeholder="请输入电机型号" maxlength="20"/>
|
||||||
<van-field label="设备类型" v-model="form.equipTypeName" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','03')" />
|
<van-field label="设备类型" v-model="form.equipTypeName" required :rules="[{ required: true }]" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','03')" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field @blur="changeDataNum('02', ['systemModel','motorModel'], ['absoleteNum','absoleteElecNum'])" v-input.numNo0 v-model="form.systemNum" type="number" label="台数(台)" placeholder="请输入台数" />
|
<van-field v-input.numNo0 v-model="form.systemNum" required :rules="[{ required: true }]" type="number" label="台数(台)" placeholder="请输入台数" />
|
||||||
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" type="number" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange('ratedPowerValue',20,'单台额定功率')"/>
|
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" required :rules="[{ required: true }]" type="number" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange('ratedPowerValue',20,'单台额定功率')"/>
|
||||||
<van-field v-input.float v-model="form.frequencyPerValue" type="number" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
<van-field v-input.float v-model="form.frequencyPerValue" required :rules="[{ required: true }]" type="number" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteNum" type="number" label="淘汰风机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteNum" type="number" label="淘汰风机数量" placeholder="请输入" />
|
||||||
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="风机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','风机效率')" />
|
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="风机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','风机效率')" />
|
||||||
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" placeholder="请输入" />
|
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" required :rules="[{ required: true }]" placeholder="请输入" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +51,6 @@ import { fanAdd, fanGetInfo, fanEdit } from "@/api/universalEnergy.js"
|
|||||||
import { Notify } from "vant";
|
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 {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin'
|
|
||||||
import Year from '../facilityManage/common-vue/year.vue'
|
import Year from '../facilityManage/common-vue/year.vue'
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
@@ -60,7 +59,7 @@ export default {
|
|||||||
VanPickerNew,
|
VanPickerNew,
|
||||||
Year
|
Year
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
mixins: [mixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '新增/修改',
|
title: '新增/修改',
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ import {
|
|||||||
import { distributeList, distributeRemove, enterprisGetInfo, enterprisEdit, enterprisAdd } from "@/api/universalEnergy.js";
|
import { distributeList, distributeRemove, enterprisGetInfo, enterprisEdit, enterprisAdd } from "@/api/universalEnergy.js";
|
||||||
import { Notify } from "vant";
|
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 { getImageBlobUrl } from '@/utils/index'
|
||||||
|
|
||||||
// import Header from "@/components/headerNew";
|
// import Header from "@/components/headerNew";
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
@@ -242,7 +242,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//安卓会调用的方法
|
//安卓会调用的方法
|
||||||
onUpload(data, type) {
|
onUpload(data, type) {
|
||||||
this[type] = [data[0].url]
|
this[type] = [data[0].fileId]
|
||||||
},
|
},
|
||||||
|
|
||||||
delImg(file, detail, type) {
|
delImg(file, detail, type) {
|
||||||
@@ -285,21 +285,15 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
||||||
this.text1 = [this.text1[0].url.split('download/')[1]]
|
this.text1 = [this.text1[0].fileId]
|
||||||
} else if(this.text1.length > 0 && this.text1[0].split('download/').length > 1) {
|
|
||||||
this.text1 = [this.text1[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
||||||
this.text2 = [this.text2[0].url.split('download/')[1]]
|
this.text2 = [this.text2[0].fileId]
|
||||||
} else if(this.text2.length > 0 && this.text2[0].split('download/').length > 1) {
|
|
||||||
this.text2 = [this.text2[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
||||||
this.text3 = [this.text3[0].url.split('download/')[1]]
|
this.text3 = [this.text3[0].fileId]
|
||||||
} else if(this.text3.length > 0 && this.text3[0].split('download/').length > 1) {
|
|
||||||
this.text3 = [this.text3[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -308,14 +302,9 @@ export default {
|
|||||||
},
|
},
|
||||||
//判断是否为对象格式
|
//判断是否为对象格式
|
||||||
ifObj(imgList) {
|
ifObj(imgList) {
|
||||||
imgList.forEach((v) => {
|
|
||||||
if(v instanceof Object && v.url.split('download/').length > 1) {
|
|
||||||
v.url = v.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = imgList.map((ele)=>{
|
const list = imgList.map((ele)=>{
|
||||||
if(ele instanceof Object) {
|
if(ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -371,19 +360,22 @@ export default {
|
|||||||
if(res.data.text1) {
|
if(res.data.text1) {
|
||||||
if(res.data.text1.split(',')[0] != 0) {
|
if(res.data.text1.split(',')[0] != 0) {
|
||||||
this.text1.push({
|
this.text1.push({
|
||||||
url:`${downloadUrl}${res.data.text1.split(',')[0]}`
|
fileId: res.data.text1.split(',')[0],
|
||||||
|
url: await getImageBlobUrl(res.data.text1.split(',')[0])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text1.split(',')[1] != 0) {
|
if(res.data.text1.split(',')[1] != 0) {
|
||||||
this.text2.push({
|
this.text2.push({
|
||||||
url:`${downloadUrl}${res.data.text1.split(',')[1]}`
|
fileId: res.data.text1.split(',')[1],
|
||||||
|
url: await getImageBlobUrl(res.data.text1.split(',')[1])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text1.split(',')[2] != 0) {
|
if(res.data.text1.split(',')[2] != 0) {
|
||||||
this.text3.push({
|
this.text3.push({
|
||||||
url:`${downloadUrl}${res.data.text1.split(',')[2]}`
|
fileId: res.data.text1.split(',')[2],
|
||||||
|
url: await getImageBlobUrl(res.data.text1.split(',')[2])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(res.data.text2) {
|
if(res.data.text2) {
|
||||||
|
|||||||
@@ -6,16 +6,16 @@
|
|||||||
<div class="year-main">
|
<div class="year-main">
|
||||||
<div class="nengyuan">
|
<div class="nengyuan">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="checkEquipDieout('01', 'systemModel', 'absoleteNum')" v-model="form.systemModel" required :rules="[{ required: true, validator:modelValidator, message:'2≤型号长度≤30' }]" label="型号" maxlength="20" placeholder="请输入型号"/>
|
<van-field v-model="form.systemModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" label="型号" maxlength="20" placeholder="请输入型号"/>
|
||||||
<van-field @blur="changeData('01', 'systemModel', 'absoleteNum')" v-input.numNo0 v-model="form.systemNum" required :rules="[{ required: true }]" type="number" label="台数(台)" placeholder="请输入台数" />
|
<van-field v-input.numNo0 v-model="form.systemNum" type="number" required :rules="[{ required: true }]" label="台数(台)" placeholder="请输入台数" />
|
||||||
<van-field v-input.numNo0 v-model="form.ratedCapacityValue" required :rules="[{ required: true }]" type="number" label="单台额定容量(kVA)" placeholder="请输入" @blur="handelChange('ratedCapacityValue',50,'单台额定容量')"/>
|
<van-field v-input.numNo0 v-model="form.ratedCapacityValue" required :rules="[{ required: true }]" ltype="number" label="单台额定容量(kVA)" placeholder="请输入" @blur="handelChange('ratedCapacityValue',50,'单台额定容量')"/>
|
||||||
<van-field v-input.floatNo0 v-model="form.ratedVoltageValueText" required :rules="[{ required: true }]" type="number" label="额定一次电压(kV)" input-align="right" is-link placeholder="请选择" readonly @click="levelShow = true"/>
|
<van-field v-input.floatNo0 v-model="form.ratedVoltageValueText" required :rules="[{ required: true }]" type="number" label="额定一次电压(kV)" input-align="right" is-link placeholder="请选择" readonly @click="levelShow = true"/>
|
||||||
<van-field v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteNum" type="number" label="淘汰变压器数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteNum" type="number" label="淘汰变压器数量" placeholder="请输入" />
|
||||||
<van-field v-input.floatNo0 v-model="form.loadRate" type="number" label="负载率(%)" placeholder="请输入" @input="handelChangeNumber('loadRate','负载率')" />
|
<van-field v-input.floatNo0 v-model="form.loadRate" required :rules="[{ required: true }]" type="number" label="负载率(%)" placeholder="请输入" @input="handelChangeNumber('loadRate','负载率')" />
|
||||||
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
<van-field v-input.num v-model="form.userYear" required :rules="[{ required: true }]" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
<van-cell title="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" type="number" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,7 +66,6 @@
|
|||||||
import { distributeAdd, distributeGetInfo, distributeEdit } from "@/api/universalEnergy.js"
|
import { distributeAdd, distributeGetInfo, distributeEdit } from "@/api/universalEnergy.js"
|
||||||
import { Notify } from "vant";
|
import { Notify } from "vant";
|
||||||
import mixin from '@/mixins/mixin'
|
import mixin from '@/mixins/mixin'
|
||||||
import {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin.js'
|
|
||||||
import Year from '../facilityManage/common-vue/year.vue'
|
import Year from '../facilityManage/common-vue/year.vue'
|
||||||
import VanPickerNew from '@/components/vanPickerNew'
|
import VanPickerNew from '@/components/vanPickerNew'
|
||||||
export default {
|
export default {
|
||||||
@@ -75,7 +74,7 @@ export default {
|
|||||||
Year,
|
Year,
|
||||||
VanPickerNew
|
VanPickerNew
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
mixins: [mixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
inVoltage: '',
|
inVoltage: '',
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ import { airList, airRemove, enterprisGetInfo, enterprisEdit, enterprisAdd } fro
|
|||||||
import { Notify } from "vant";
|
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 { getImageBlobUrl } from '@/utils/index'
|
||||||
// import Header from "@/components/headerNew"
|
// import Header from "@/components/headerNew"
|
||||||
import {debounce} from '@/utils/common.js'
|
import {debounce} from '@/utils/common.js'
|
||||||
export default {
|
export default {
|
||||||
@@ -203,8 +203,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//安卓会调用的方法
|
//安卓会调用的方法
|
||||||
onUpload(data, type) {
|
onUpload(data, type) {
|
||||||
this[type] = [data[0].url]
|
this[type] = [data[0].fileId]
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
delImg(file, detail, type) {
|
delImg(file, detail, type) {
|
||||||
@@ -246,21 +245,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
if(this.text1.length > 0 && this.text1[0] instanceof Object) {
|
||||||
this.text1 = [this.text1[0].url.split('download/')[1]]
|
this.text1 = [this.text1[0].fileId]
|
||||||
} else if(this.text1.length > 0 && this.text1[0].split('download/').length > 1) {
|
|
||||||
this.text1 = [this.text1[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
if(this.text2.length > 0 && this.text2[0] instanceof Object) {
|
||||||
this.text2 = [this.text2[0].url.split('download/')[1]]
|
this.text2 = [this.text2[0].fileId]
|
||||||
} else if(this.text2.length > 0 && this.text2[0].split('download/').length > 1) {
|
|
||||||
this.text2 = [this.text2[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
if(this.text3.length > 0 && this.text3[0] instanceof Object) {
|
||||||
this.text3 = [this.text3[0].url.split('download/')[1]]
|
this.text3 = [this.text3[0].fileId]
|
||||||
} else if(this.text3.length > 0 && this.text3[0].split('download/').length > 1) {
|
|
||||||
this.text3 = [this.text3[0].split('download/')[1]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = this.text1.concat(this.text2, this.text3)
|
const text = this.text1.concat(this.text2, this.text3)
|
||||||
@@ -269,14 +262,9 @@ export default {
|
|||||||
|
|
||||||
//判断是否为对象格式
|
//判断是否为对象格式
|
||||||
ifObj(imgList) {
|
ifObj(imgList) {
|
||||||
imgList.forEach((v) => {
|
|
||||||
if(v instanceof Object && v.url.split('download/').length > 1) {
|
|
||||||
v.url = v.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = imgList.map((ele)=>{
|
const list = imgList.map((ele)=>{
|
||||||
if(ele instanceof Object) {
|
if(ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -334,19 +322,22 @@ export default {
|
|||||||
if(res.data.text4) {
|
if(res.data.text4) {
|
||||||
if(res.data.text4.split(',')[0] != 0) {
|
if(res.data.text4.split(',')[0] != 0) {
|
||||||
this.text1.push({
|
this.text1.push({
|
||||||
url:`${downloadUrl}${res.data.text4.split(',')[0]}`
|
fileId: res.data.text4.split(',')[0],
|
||||||
|
url: await getImageBlobUrl(res.data.text4.split(',')[0])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text4.split(',')[1] != 0) {
|
if(res.data.text4.split(',')[1] != 0) {
|
||||||
this.text2.push({
|
this.text2.push({
|
||||||
url:`${downloadUrl}${res.data.text4.split(',')[1]}`
|
fileId: res.data.text4.split(',')[1],
|
||||||
|
url: await getImageBlobUrl(res.data.text4.split(',')[1])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.data.text4.split(',')[2] != 0) {
|
if(res.data.text4.split(',')[2] != 0) {
|
||||||
this.text3.push({
|
this.text3.push({
|
||||||
url:`${downloadUrl}${res.data.text4.split(',')[2]}`
|
fileId: res.data.text4.split(',')[2],
|
||||||
|
url: await getImageBlobUrl(res.data.text4.split(',')[2])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,19 @@
|
|||||||
<div class="year-main">
|
<div class="year-main">
|
||||||
<div class="nengyuan">
|
<div class="nengyuan">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="checkEquipDieout('04', 'systemModel', 'absoleteNum')" v-model="form.systemModel" :rules="[{ required: false, validator: modelValidator, message:'2≤型号长度≤20'}]" label="空压机型号" placeholder="请输入空压机型号" maxlength="20" />
|
<van-field v-model="form.systemModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" label="空压机型号" placeholder="请输入空压机型号" maxlength="20" />
|
||||||
<van-field @blur="checkEquipDieout('04', 'motorModel', 'absoleteElecNum')" v-model="form.motorModel" :rules="[{ required: false, validator: modelValidator, message:'2≤型号长度≤20'}]" label="电机型号" placeholder="请输入电机型号" maxlength="20" />
|
<van-field v-model="form.motorModel" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" label="电机型号" placeholder="请输入电机型号" maxlength="20" />
|
||||||
<van-field label="设备类型" v-model="form.equipTypeName" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','01')" />
|
<van-field label="设备类型" v-model="form.equipTypeName" required :rules="[{ required: true }]" placeholder="请选择设备类型" is-link readonly @click="handelClickOptionShow('equipType','01')" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field @blur="changeDataNum('04', ['systemModel','motorModel'], ['absoleteNum','absoleteElecNum'])" v-input.numNo0 v-model="form.systemNum" type="number" label="台数(台)" placeholder="请输入台数" />
|
<van-field v-input.numNo0 v-model="form.systemNum" type="number" required :rules="[{ required: true }]" label="台数(台)" placeholder="请输入台数" />
|
||||||
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" type="number" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange('ratedPowerValue',5,'单台额定功率')"/>
|
<van-field v-input.floatNo0 v-model="form.ratedPowerValue" required :rules="[{ required: true }]" type="number" label="单台额定功率(kW)" placeholder="请输入" @blur="handelChange('ratedPowerValue',5,'单台额定功率')"/>
|
||||||
<van-field v-input.float v-model="form.frequencyPerValue" type="number" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
<van-field v-input.float v-model="form.frequencyPerValue" required :rules="[{ required: true }]" type="number" label="变频占比(%)" placeholder="请输入" @input="handelChangeNumber('frequencyPerValue','变频占比')" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteElecNum" type="number" label="淘汰电机数量" placeholder="请输入" />
|
||||||
<van-field disabled v-input.num v-model="form.absoleteNum" type="number" label="淘汰空压机数量" placeholder="请输入" />
|
<van-field v-input.num v-model="form.absoleteNum" type="number" label="淘汰空压机数量" placeholder="请输入" />
|
||||||
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="空压机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','空压机效率')" />
|
<van-field v-input.floatNo0 v-model="form.efficiency" type="number" label="空压机效率(%)" placeholder="请输入" @input="handelChangeNumber('efficiency','空压机效率')" />
|
||||||
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
<van-field v-input.num v-model="form.userYear" type="number" label="投入年份" placeholder="请选择投入年份" is-link readonly @click="handelClickYear('userYear', 'SET_CON_YEAR')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" placeholder="请输入" />
|
<van-field v-input.num v-model="form.runHours" type="number" label="累计运行小时数" required :rules="[{ required: true }]" placeholder="请输入" />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,14 +53,13 @@ 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'
|
import {debounce} from '@/utils/common.js'
|
||||||
import {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin.js'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// Header,
|
// Header,
|
||||||
VanPickerNew,
|
VanPickerNew,
|
||||||
Year
|
Year
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
mixins: [mixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '新增/修改',
|
title: '新增/修改',
|
||||||
|
|||||||
@@ -117,25 +117,6 @@
|
|||||||
<div class="tips" v-if="tips1">工业总产值>工业增产值</div>
|
<div class="tips" v-if="tips1">工业总产值>工业增产值</div>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
|
||||||
<div class="title-img"><img src="@/assets/u239.png" alt="" /></div>
|
|
||||||
<p>能源消耗折标量</p>
|
|
||||||
</div>
|
|
||||||
<div class="nengyuan">
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field
|
|
||||||
v-for="(item, index) in switchDataList" :key="index"
|
|
||||||
v-input.reset
|
|
||||||
v-input.float
|
|
||||||
:disabled="showForm"
|
|
||||||
type="number"
|
|
||||||
v-model="yearForm[item.prop]"
|
|
||||||
:label="item.name"
|
|
||||||
placeholder="请输入"
|
|
||||||
/>
|
|
||||||
</van-cell-group>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="year-main" v-if="tabName == 'b'">
|
<div class="year-main" v-if="tabName == 'b'">
|
||||||
<van-cell
|
<van-cell
|
||||||
@@ -146,16 +127,6 @@
|
|||||||
value-class="text-ellipsis"
|
value-class="text-ellipsis"
|
||||||
style="border-radius: 8px"
|
style="border-radius: 8px"
|
||||||
/>
|
/>
|
||||||
<div v-if="notUsedResidueEnergyName && notUsedResidueEnergyName.indexOf('其他') >= 0">
|
|
||||||
<van-field
|
|
||||||
v-input.reset
|
|
||||||
label="其他余能资源利用方式"
|
|
||||||
placeholder="请输入"
|
|
||||||
input-align="right"
|
|
||||||
required :rules="[{ required: true }]"
|
|
||||||
v-model="otherUseMethod"
|
|
||||||
></van-field>
|
|
||||||
</div>
|
|
||||||
<div class="title" style="margin-top: 12px; margin-left: 5px">
|
<div class="title" style="margin-top: 12px; margin-left: 5px">
|
||||||
若存在尚未利用余热(高温气体、蒸汽 、热水)
|
若存在尚未利用余热(高温气体、蒸汽 、热水)
|
||||||
</div>
|
</div>
|
||||||
@@ -458,14 +429,6 @@ export default {
|
|||||||
dieselValue: 0,
|
dieselValue: 0,
|
||||||
totalOutput: 0,
|
totalOutput: 0,
|
||||||
addOutput: 0,
|
addOutput: 0,
|
||||||
switchPowerPurchase:0,
|
|
||||||
switchNaturalGas:0,
|
|
||||||
switchSteamPurchaseLow:0,
|
|
||||||
switchSteamPurchaseMid:0,
|
|
||||||
switchSteamPurchaseHig:0,
|
|
||||||
switchCoal:0,
|
|
||||||
switchGasoline:0,
|
|
||||||
switchDiesel:0,
|
|
||||||
energyUnutilizedVO: {
|
energyUnutilizedVO: {
|
||||||
notUsedResidueEnergyType: '', // 尚未利用的余能资源
|
notUsedResidueEnergyType: '', // 尚未利用的余能资源
|
||||||
residueHotTemp: '', // 主要余热排放温度
|
residueHotTemp: '', // 主要余热排放温度
|
||||||
@@ -493,40 +456,7 @@ export default {
|
|||||||
notHeatDemandName: '', // 企业非生产工艺用热需求名称显示
|
notHeatDemandName: '', // 企业非生产工艺用热需求名称显示
|
||||||
heatDemandOtherName: '', // 企业生产工艺用热需求其他具体内容
|
heatDemandOtherName: '', // 企业生产工艺用热需求其他具体内容
|
||||||
notHeatDemandOtherName: '', // 企业非生产工艺用热需求其他具体内容
|
notHeatDemandOtherName: '', // 企业非生产工艺用热需求其他具体内容
|
||||||
otherUseMethod:'', // 其他余能资源利用方式
|
|
||||||
doDebounce: null,
|
doDebounce: null,
|
||||||
switchDataList:[
|
|
||||||
{
|
|
||||||
prop:'switchPowerPurchase',
|
|
||||||
name:'外购电 (tce)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop:'switchNaturalGas',
|
|
||||||
name:'天然气 (tce)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop:'switchSteamPurchaseLow',
|
|
||||||
name:'外购低压蒸汽 (tce)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop:'switchSteamPurchaseMid',
|
|
||||||
name:'外购中压蒸汽 (tce)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop:'switchSteamPurchaseHig',
|
|
||||||
name:'外购高压蒸汽 (tce)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop:'switchCoal',
|
|
||||||
name:'煤 (tce)'
|
|
||||||
},{
|
|
||||||
prop:'switchGasoline',
|
|
||||||
name:'汽油 (tce)'
|
|
||||||
},{
|
|
||||||
prop:'switchDiesel',
|
|
||||||
name:'柴油 (tce)'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -565,14 +495,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
|
||||||
'notUsedResidueEnergyName': {
|
|
||||||
handler(val) {
|
|
||||||
if(val.indexOf('其他') < 0) {
|
|
||||||
this.otherUseMethod = ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -694,7 +616,6 @@ export default {
|
|||||||
this.notHeatDemandName = '', // 企业非生产工艺用热需求名称显示
|
this.notHeatDemandName = '', // 企业非生产工艺用热需求名称显示
|
||||||
this.heatDemandOtherName = '', // 企业生产工艺用热需求其他具体内容
|
this.heatDemandOtherName = '', // 企业生产工艺用热需求其他具体内容
|
||||||
this.notHeatDemandOtherName = '' // 企业非生产工艺用热需求其他具体内容
|
this.notHeatDemandOtherName = '' // 企业非生产工艺用热需求其他具体内容
|
||||||
this.otherUseMethod = ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(this.type == 'residueHotTempOption') {
|
} else if(this.type == 'residueHotTempOption') {
|
||||||
@@ -845,9 +766,6 @@ export default {
|
|||||||
if(this.notHeatDemandOtherName) {
|
if(this.notHeatDemandOtherName) {
|
||||||
this.yearForm.energyUnutilizedVO.notHeatDemandOther = this.notHeatDemandOtherName
|
this.yearForm.energyUnutilizedVO.notHeatDemandOther = this.notHeatDemandOtherName
|
||||||
}
|
}
|
||||||
if(this.otherUseMethod) {
|
|
||||||
this.yearForm.energyUnutilizedVO.otherUseMethod = this.otherUseMethod
|
|
||||||
}
|
|
||||||
this.yearForm.energyUnutilizedVO = Object.assign( this.yearForm.energyUnutilizedVO ,this.customerInfo)
|
this.yearForm.energyUnutilizedVO = Object.assign( this.yearForm.energyUnutilizedVO ,this.customerInfo)
|
||||||
}
|
}
|
||||||
if(this.tabName == 'a'&&this.tips1){
|
if(this.tabName == 'a'&&this.tips1){
|
||||||
@@ -941,7 +859,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.heatDemandOtherName = this.yearForm.energyUnutilizedVO.heatDemandOther
|
this.heatDemandOtherName = this.yearForm.energyUnutilizedVO.heatDemandOther
|
||||||
this.notHeatDemandOtherName = this.yearForm.energyUnutilizedVO.notHeatDemandOther
|
this.notHeatDemandOtherName = this.yearForm.energyUnutilizedVO.notHeatDemandOther
|
||||||
this.otherUseMethod = this.yearForm.energyUnutilizedVO.otherUseMethod
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.show = false
|
this.show = false
|
||||||
|
|||||||
@@ -1,38 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<van-form ref="detailForm" @submit="handelClickSave">
|
<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" />
|
<btn-uploader type="filePic" :value="filePic" @afterRead="afterRead" @delImg="delImg" @onUpload="onUpload" />
|
||||||
</div>
|
</div> -->
|
||||||
<div class="container" v-if="type == 1">
|
<div class="container" v-if="type == 1">
|
||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="formColumns.refrigeTypeName" label="机组类型" is-link readonly input-align="right" placeholder="请选择" required :rules="[{ required: true }]" @click="handelClickHeatingShow('jzlx', 80000001016,'refrigeTypeName','refrigeType','kt')"/>
|
<van-field v-model="formColumns.refrigeTypeName" label="机组类型" is-link readonly input-align="right" placeholder="请选择" required :rules="[{ required: true }]" @click="handelClickHeatingShow('jzlx', 80000001016,'refrigeTypeName','refrigeType','kt')"/>
|
||||||
<van-field @blur="checkEquipDieout('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.model" label="设备型号" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30"/>
|
<van-field v-model="form.model" label="设备型号" required :rules="[{ required: true },{pattern:/^.{2,30}$/, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30" placeholder="请输入设备型号"/>
|
||||||
<van-field v-model="refrigeNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
<van-field v-model="refrigeNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
||||||
<div class="tips" v-if="refrigeNum+''=='0'">数量>0</div>
|
<div class="tips" v-if="refrigeNum+''=='0'">数量>0</div>
|
||||||
<van-field v-model="edgl" v-input.floatNo0 label="总额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="edgl" v-input.floatNo0 label="额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<div class="tips" v-if="ratio1">0<额定功率<1000</div>
|
<div class="tips" v-if="ratio1">0<额定功率<1000</div>
|
||||||
<div class="tips" v-if="ratio">{{ refrigeTypeData[form.refrigeType][0]}} ≤额定制冷量/额定功率≤ {{refrigeTypeData[form.refrigeType][1]}}</div>
|
<div class="tips" v-if="ratio">{{ refrigeTypeData[form.refrigeType][0]}} ≤额定制冷量/额定功率≤ {{refrigeTypeData[form.refrigeType][1]}}</div>
|
||||||
<van-field v-model="hyl" v-input.float label="耗用量(t或m3)" type="number" label-width="100" input-align="right" placeholder="请输入" />
|
<van-field v-model="hyl" v-input.float label="耗用量(t或m3)" type="number" label-width="100" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coolCapacity" v-input.floatNo0 label="额定制冷量(kW)" required :rules="[{ required: true }]" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coolCapacity" v-input.floatNo0 label="额定制冷量(kW)" required :rules="[{ required: true }]" type="number" input-align="right" placeholder="请输入" />
|
||||||
<div class="tips" v-if="ratio">{{ refrigeTypeData[form.refrigeType][0]}} ≤额定制冷量/额定功率≤ {{refrigeTypeData[form.refrigeType][1]}}</div>
|
<div class="tips" v-if="ratio">{{ refrigeTypeData[form.refrigeType][0]}} ≤额定制冷量/额定功率≤ {{refrigeTypeData[form.refrigeType][1]}}</div>
|
||||||
<van-field @blur="changeData('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.useExpl" v-input.num label="在用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
<van-field v-model="form.useExpl" v-input.num label="在用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
||||||
<van-field @blur="changeData('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.backupExpl" v-input.num label="备用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
<van-field v-model="form.backupExpl" v-input.num label="备用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
||||||
<van-field v-model="form.useYear" label="设备投用年份" label-width="140" :rules="[{ required: false }]" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
<van-field v-model="form.useYear" label="设备投用年份" label-width="140" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
||||||
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" :rules="[{ required: false }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" :rules="[{ required: false }]" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" :rules="[{ required: false }]" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kW/平方米)" type="number" :rules="[{ required: false }]" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kw/平方米)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" :rules="[{ required: false }]" clearable placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" clearable placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.cumulativeRunHours" :rules="[{ required: false }]" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.cumulativeRunHours" required :rules="[{ required: true }]" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
||||||
<van-field readonly v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" :rules="[{ required: false }]" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/>
|
||||||
<van-field v-input.float v-model="form.saveElectricity" type="number" label="预期年节电量(千瓦时)" placeholder="请输入" label-width="220" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonEmissionFactor" type="number" label="区域碳排放因子" placeholder="请输入" :rules="[{ required: false }]" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonReduction" type="number" label="预期减碳量(TCO₂)" placeholder="请输入" :rules="[{ required: false }]" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.centralAirConditionerCop" type="number" label="集中式空调机组平均COP" placeholder="请输入" :rules="[{ required: false }]" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-model="form.totalConcatenatedCold" v-input.float label="总额定制冷功率(kW)" type="number" input-align="right" placeholder="请输入" label-width="200" />
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
||||||
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
||||||
@@ -56,24 +51,24 @@
|
|||||||
<!-- 设备类型选择 -->
|
<!-- 设备类型选择 -->
|
||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="formColumns.refrigeTypeName" label="设备类型" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" @click="handelClickHeatingShow('jzlx', 80000001016,'refrigeTypeName','refrigeType','lqt' )" readonly />
|
<van-field v-model="formColumns.refrigeTypeName" label="设备类型1" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" @click="handelClickHeatingShow('jzlx', 80000001016,'refrigeTypeName','refrigeType','lqt' )" readonly />
|
||||||
<!-- <van-cell title="设备类型" is-link :value="form.refrigeTypeName" @click="showPicker = true" readonly /> -->
|
<!-- <van-cell title="设备类型" is-link :value="form.refrigeTypeName" @click="showPicker = true" readonly /> -->
|
||||||
<van-field @blur="checkEquipDieout('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.model" label="设备型号" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30" placeholder="请输入设备型号"/>
|
<van-field v-model="form.model" label="设备型号" required :rules="[{ required: true },{pattern:/^.{2,30}$/, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30" placeholder="请输入设备型号"/>
|
||||||
<van-field v-model="refrigeNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
<van-field v-model="refrigeNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
||||||
<div class="tips" v-if="refrigeNum+''=='0'">数量>0</div>
|
<div class="tips" v-if="refrigeNum+''=='0'">数量>0</div>
|
||||||
<van-field v-model="form.ratedPower" v-input.floatNo0 label="额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.ratedPower" v-input.floatNo0 label="额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<div class="tips" v-if="ratio2">0<额定功率<500</div>
|
<div class="tips" v-if="ratio2">0<额定功率<500</div>
|
||||||
<van-field @blur="changeData('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.useExpl" v-input.num label="在用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.useExpl" v-input.num label="在用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field @blur="changeData('1', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.backupExpl" v-input.num label="备用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.backupExpl" v-input.num label="备用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.useYear" label="设备投用年份" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
<van-field v-model="form.useYear" label="设备投用年份" label-width="140" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
||||||
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kW/平方米)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kw/平方米)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.cumulativeRunHours" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.cumulativeRunHours" required :rules="[{ required: true }]" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
||||||
<van-field readonly v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
||||||
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
||||||
@@ -92,27 +87,23 @@
|
|||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="formColumns.refrigeTypeName" label="机组类型" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" @click="handelClickHeatingShow('jzlx',80000001020,'refrigeTypeName','refrigeType')" readonly />
|
<van-field v-model="formColumns.refrigeTypeName" label="机组类型" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" @click="handelClickHeatingShow('jzlx',80000001020,'refrigeTypeName','refrigeType')" readonly />
|
||||||
<van-field @blur="checkEquipDieout('2', 'model', 'dieoutNum', 'form1', 'heatNum')" v-model="form1.model" label="设备型号" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30" placeholder="请输入设备型号"/>
|
<van-field v-model="form1.model" label="设备型号" required :rules="[{ required: true },{pattern:/^.{2,30}$/, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30" placeholder="请输入设备型号"/>
|
||||||
<van-field v-model="heatNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
<van-field v-model="heatNum" v-input.numNo0 label="数量(台)" readonly type="number" required :rules="[{ required: true }]" input-align="right" placeholder="自动计算" />
|
||||||
<div class="tips" v-if="heatNum+''=='0'">数量>0</div>
|
<div class="tips" v-if="heatNum+''=='0'">数量>0</div>
|
||||||
<van-field @input="changeTips" v-model="edgl" v-input.floatNo0 label="额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field @input="changeTips" v-model="edgl" v-input.floatNo0 label="额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="hyl" v-input.floatNo0 label="耗用量(t或m3)" type="number" required :rules="[{ required: true }]" label-width="100" input-align="right" placeholder="请输入" />
|
<van-field v-model="hyl" v-input.floatNo0 label="耗用量(t或m3)" type="number" label-width="100" input-align="right" placeholder="请输入" />
|
||||||
<van-field @input="changeTips" v-model="form1.heatCapacity" v-input.floatNo0 label="额定制热量(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field @input="changeTips" v-model="form1.heatCapacity" v-input.floatNo0 label="额定制热量(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field @blur="changeData('2', 'model', 'dieoutNum', 'form1', 'heatNum')" v-model="form1.useExpl" v-input.num type="number" label="在用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.useExpl" v-input.num type="number" label="在用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field @blur="changeData('2', 'model', 'dieoutNum', 'form1', 'heatNum')" v-model="form1.backupExpl" v-input.num type="number" label="备用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.backupExpl" v-input.num type="number" label="备用台数(台)" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form1.useYear" label="设备投用年份" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
<van-field v-model="form1.useYear" label="设备投用年份" label-width="140" required :rules="[{ required: true }]" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('useYear')" />
|
||||||
<van-field v-model="form1.loadFactor" v-input.float label="负载系数" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.loadFactor" v-input.float label="负载系数" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form1.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form1.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form1.heatPerArea" v-input.float label="单位面积热量(kW/平方米)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form1.heatPerArea" v-input.float label="单位面积热量(kw/平方米)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field label="设备能效等级" v-model="form1.equipEfficiencyName" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form1.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field label="设备生产日期" v-model="form1.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form1.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" input-align="right" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form1.cumulativeRunHours" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form1.cumulativeRunHours" required :rules="[{ required: true }]" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
||||||
<van-field readonly v-model="form1.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form1.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/>
|
||||||
<van-field v-input.float v-model="form1.saveElectricity" type="number" label="预期年节电量(千瓦时)" placeholder="请输入" label-width="220" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form1.carbonEmissionFactor" type="number" label="区域碳排放因子" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form1.carbonReduction" type="number" label="预期减碳量(TCO₂)" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
<van-cell class="img-box box1" title="设备外观" :required="$store.getters.cityType"/>
|
||||||
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
<Uploader type="exteriorImage1" :value="exteriorImage1" @afterRead="afterRead1" @delImg="delImg1" @onUpload="onUpload1" />
|
||||||
@@ -153,8 +144,7 @@ import { pureDigital } from '../pattern'
|
|||||||
import VanPickerNew from "@/components/vanPickerNew";
|
import VanPickerNew from "@/components/vanPickerNew";
|
||||||
import Year from "../common-vue/year.vue";
|
import Year from "../common-vue/year.vue";
|
||||||
import mixin from "@/mixins/mixin";
|
import mixin from "@/mixins/mixin";
|
||||||
import {dieoutMixin} from '@/mixins/dieoutMixin'
|
import { getImageBlobUrl } from "@/utils/index";
|
||||||
import { downloadUrl } from "@/settings";
|
|
||||||
import Uploader from "../common-vue/uploader.vue";
|
import Uploader from "../common-vue/uploader.vue";
|
||||||
import btnUploader from "../common-vue/btnUploader.vue";
|
import btnUploader from "../common-vue/btnUploader.vue";
|
||||||
|
|
||||||
@@ -167,7 +157,7 @@ export default {
|
|||||||
// Header,
|
// Header,
|
||||||
VanPickerNew,
|
VanPickerNew,
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin],
|
mixins: [mixin],
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
pureDigital() {
|
pureDigital() {
|
||||||
@@ -208,18 +198,8 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
const modelValidator = ( value, rule) => {
|
|
||||||
if(value){
|
|
||||||
return /^.{2,30}$/.test(value)
|
|
||||||
}
|
|
||||||
if(!rule.required){
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
modelValidator,
|
|
||||||
tips0: false,
|
tips0: false,
|
||||||
exteriorImage1: [], //设备外观
|
exteriorImage1: [], //设备外观
|
||||||
tagImage1: [], //设备铭牌
|
tagImage1: [], //设备铭牌
|
||||||
@@ -247,7 +227,6 @@ export default {
|
|||||||
refrigeNum: "",
|
refrigeNum: "",
|
||||||
ratedPower: "",
|
ratedPower: "",
|
||||||
coolCapacity: "",
|
coolCapacity: "",
|
||||||
totalConcatenatedCold: '',
|
|
||||||
useExpl: "",
|
useExpl: "",
|
||||||
backupExpl: "",
|
backupExpl: "",
|
||||||
useYear: "",
|
useYear: "",
|
||||||
@@ -261,11 +240,7 @@ export default {
|
|||||||
equipEfficiency: '',
|
equipEfficiency: '',
|
||||||
produceDate:'',
|
produceDate:'',
|
||||||
cumulativeRunHours: '',
|
cumulativeRunHours: '',
|
||||||
dieoutNum: '',
|
dieoutNum: ''
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
centralAirConditionerCop:'',
|
|
||||||
},
|
},
|
||||||
form1: {
|
form1: {
|
||||||
equipId:'',
|
equipId:'',
|
||||||
@@ -289,10 +264,7 @@ export default {
|
|||||||
equipEfficiency: '',
|
equipEfficiency: '',
|
||||||
produceDate:'',
|
produceDate:'',
|
||||||
cumulativeRunHours: '',
|
cumulativeRunHours: '',
|
||||||
dieoutNum: '',
|
dieoutNum: ''
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
},
|
},
|
||||||
formColumns: {
|
formColumns: {
|
||||||
refrigeType: "",
|
refrigeType: "",
|
||||||
@@ -670,19 +642,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//图片回显展示
|
//图片回显展示
|
||||||
picShow(formList, name) {
|
async picShow(formList, name) {
|
||||||
console.log(formList,name);
|
console.log(formList,name);
|
||||||
const picList = formList.map((ele) => {
|
const picList = await Promise.all(formList.map(async (ele) => {
|
||||||
if (ele.split(`${downloadUrl}`).length > 1) {
|
if (ele.startsWith('blob:')) {
|
||||||
return {
|
return {
|
||||||
url: ele,
|
url: ele,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
ele = `${downloadUrl}${ele}`;
|
const blobUrl = await getImageBlobUrl(ele);
|
||||||
return {
|
return {
|
||||||
url: ele,
|
url: blobUrl,
|
||||||
};
|
};
|
||||||
});
|
}));
|
||||||
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "ktExter":
|
case "ktExter":
|
||||||
@@ -854,7 +826,7 @@ export default {
|
|||||||
if (this.exteriorImage1.length > 0) {
|
if (this.exteriorImage1.length > 0) {
|
||||||
this.form1.exteriorImage = this.exteriorImage1.map((ele) => {
|
this.form1.exteriorImage = this.exteriorImage1.map((ele) => {
|
||||||
if (ele.url) {
|
if (ele.url) {
|
||||||
return ele = ele.url.split('download/')[1]
|
return ele.fileId || ele
|
||||||
} else {
|
} else {
|
||||||
return ele
|
return ele
|
||||||
}
|
}
|
||||||
@@ -863,7 +835,7 @@ export default {
|
|||||||
if (this.tagImage1.length > 0) {
|
if (this.tagImage1.length > 0) {
|
||||||
this.form1.tagImage = this.tagImage1.map((ele) => {
|
this.form1.tagImage = this.tagImage1.map((ele) => {
|
||||||
if (ele.url) {
|
if (ele.url) {
|
||||||
return ele = ele.url.split('download/')[1]
|
return ele.fileId || ele
|
||||||
} else {
|
} else {
|
||||||
return ele
|
return ele
|
||||||
}
|
}
|
||||||
@@ -872,7 +844,7 @@ export default {
|
|||||||
if (this.markImage1.length > 0) {
|
if (this.markImage1.length > 0) {
|
||||||
this.form1.markImage = this.markImage1.map((ele) => {
|
this.form1.markImage = this.markImage1.map((ele) => {
|
||||||
if (ele.url) {
|
if (ele.url) {
|
||||||
return ele = ele.url.split('download/')[1]
|
return ele.fileId || ele
|
||||||
} else {
|
} else {
|
||||||
return ele
|
return ele
|
||||||
}
|
}
|
||||||
@@ -890,25 +862,12 @@ export default {
|
|||||||
refrigeNum: "",
|
refrigeNum: "",
|
||||||
ratedPower: "",
|
ratedPower: "",
|
||||||
coolCapacity: "",
|
coolCapacity: "",
|
||||||
totalConcatenatedCold: '',
|
|
||||||
useExpl: "",
|
useExpl: "",
|
||||||
backupExpl: "",
|
backupExpl: "",
|
||||||
useYear: "",
|
useYear: "",
|
||||||
exteriorImage: "", //设备外观
|
exteriorImage: "", //设备外观
|
||||||
tagImage: "", //设备铭牌
|
tagImage: "", //设备铭牌
|
||||||
markImage: "", //设备能效标识
|
markImage: "", //设备能效标识
|
||||||
loadFactor: '',
|
|
||||||
runHours:'',
|
|
||||||
runDays: '',
|
|
||||||
coldPerArea: '',
|
|
||||||
equipEfficiency: '',
|
|
||||||
produceDate:'',
|
|
||||||
cumulativeRunHours: '',
|
|
||||||
dieoutNum: '',
|
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
centralAirConditionerCop:'',
|
|
||||||
};
|
};
|
||||||
this.form1 = {
|
this.form1 = {
|
||||||
equipId:'',
|
equipId:'',
|
||||||
@@ -923,17 +882,6 @@ export default {
|
|||||||
exteriorImage: "", //设备外观
|
exteriorImage: "", //设备外观
|
||||||
tagImage: "", //设备铭牌
|
tagImage: "", //设备铭牌
|
||||||
markImage: "", //设备能效标识
|
markImage: "", //设备能效标识
|
||||||
loadFactor: '',
|
|
||||||
runHours:'',
|
|
||||||
runDays: '',
|
|
||||||
heatPerArea: '',
|
|
||||||
equipEfficiency: '',
|
|
||||||
produceDate:'',
|
|
||||||
cumulativeRunHours: '',
|
|
||||||
dieoutNum: '',
|
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
};
|
};
|
||||||
this.formColumns = {
|
this.formColumns = {
|
||||||
refrigeType: "",
|
refrigeType: "",
|
||||||
|
|||||||
@@ -1,215 +0,0 @@
|
|||||||
<template>
|
|
||||||
<!-- :after-read="afterRead" -->
|
|
||||||
<!-- :after-read="afterRead" -->
|
|
||||||
<van-uploader
|
|
||||||
v-model="fileList"
|
|
||||||
:disabled="disableImg"
|
|
||||||
multiple
|
|
||||||
:deletable="deletable"
|
|
||||||
:max-count="1"
|
|
||||||
:before-read="beforeRead"
|
|
||||||
:afterRead="afterRead"
|
|
||||||
:before-delete="delImg"
|
|
||||||
@click-upload="onUpload"
|
|
||||||
accept="image/*"
|
|
||||||
>
|
|
||||||
<div class="uploader" >
|
|
||||||
<van-icon name="plus" class="uploader-icon" />
|
|
||||||
</div>
|
|
||||||
</van-uploader>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { uploadFile } from '@/api/api.js'
|
|
||||||
import { chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
|
||||||
import { downloadUrl } from '@/settings'
|
|
||||||
import { addWaterMarker } from '@/utils/marker'
|
|
||||||
import { Base64ToFile } from '@/utils/base64'
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
type: Array,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
deletable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
disableImg: false,
|
|
||||||
fileList: this.value,
|
|
||||||
activTimer: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.activTimer = setTimeout(() => {
|
|
||||||
this.fileList = this.value
|
|
||||||
}, 200)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearTimeout(this.activTimer)
|
|
||||||
this.fileList = []
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
base64ToFile(data, fileName) {
|
|
||||||
const dataArr = data.split(',')
|
|
||||||
const byteString = window.atob(dataArr[1])
|
|
||||||
const options = {
|
|
||||||
type: 'image/jpeg',
|
|
||||||
endings: 'native',
|
|
||||||
}
|
|
||||||
const u8Arr = new Uint8Array(byteString.length)
|
|
||||||
for (let i = 0; i < byteString.length; i++) {
|
|
||||||
u8Arr[i] = byteString.charCodeAt(i)
|
|
||||||
}
|
|
||||||
let formData = new FormData()
|
|
||||||
let fileOfBlob = new File([u8Arr], fileName + '.jpg', options) //返回文件流
|
|
||||||
formData.append('file', fileOfBlob)
|
|
||||||
return formData
|
|
||||||
},
|
|
||||||
// 上传图片调用原生的方法 获取到绝对路径调用getImageFileFromUrl
|
|
||||||
onUpload() {
|
|
||||||
this.fileList= []
|
|
||||||
console.log('--------chooseAlbumAndTakePhoto---', 'onUpload')
|
|
||||||
chooseAlbumAndTakePhoto(async (data) => {
|
|
||||||
console.log('--------onUpload---', data)
|
|
||||||
let d = 'data:image/jpeg;base64,' + data
|
|
||||||
this.fileIamge = d
|
|
||||||
// let params = this.base64ToFile(d, new Date().getTime().toString())
|
|
||||||
// console.log('--------params---', params)
|
|
||||||
let img = Base64ToFile(d,'image/jpeg',new Date().getTime().toString() + ".jpg")
|
|
||||||
console.log('-------------------------onUpload---', img);
|
|
||||||
let blob = await addWaterMarker(img, 'image')
|
|
||||||
console.log('-------------------------blob---', blob);
|
|
||||||
let params = new FormData()
|
|
||||||
let file = new File([blob], img.name)
|
|
||||||
params.append('file', file)
|
|
||||||
console.log('-------------------------file---', file);
|
|
||||||
const res = await uploadFile(params)
|
|
||||||
console.log('--------res---', res)
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.fileList.push({
|
|
||||||
fileName: res.data.original_name,
|
|
||||||
fileId: res.data.attach_id,
|
|
||||||
url: `${downloadUrl}${res.data.attach_id}`,
|
|
||||||
})
|
|
||||||
this.$emit('onUpload', this.fileList, this.type)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async afterRead(file) {
|
|
||||||
this.fileList= []
|
|
||||||
this.disableImg = true
|
|
||||||
let params = new FormData()
|
|
||||||
params.append('file', file.file)
|
|
||||||
console.log(file.file)
|
|
||||||
console.log(params)
|
|
||||||
// console.log(decryptParseToJSON(a),77777777);
|
|
||||||
const res = await uploadFile(params)
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.disableImg = false
|
|
||||||
this.fileList.push({
|
|
||||||
fileName: res.data.original_name,
|
|
||||||
fileId: res.data.attach_id,
|
|
||||||
url: `${downloadUrl}${res.data.attach_id}`,
|
|
||||||
})
|
|
||||||
this.$emit('onUpload', this.fileList, this.type)
|
|
||||||
// this.$emit('afterRead', res.data, this.type)
|
|
||||||
}else{
|
|
||||||
this.disableImg = false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
beforeRead(img) {
|
|
||||||
if(!img){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return new Promise(async(resolve, reject) => {
|
|
||||||
let blob = await addWaterMarker(img, 'blob')
|
|
||||||
blob.name = img.name
|
|
||||||
let file = new File([blob], img.name)
|
|
||||||
resolve(file)
|
|
||||||
})
|
|
||||||
}, //压缩图片
|
|
||||||
compressFiles(fileObj) {
|
|
||||||
let type = fileObj.type
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
let reader = new FileReader()
|
|
||||||
reader.readAsDataURL(fileObj)
|
|
||||||
reader.onload = function (e) {
|
|
||||||
let image = new Image() //新建一个img标签(不嵌入DOM节点,仅做canvas操作)
|
|
||||||
image.src = e.target.result //让该标签加载base64格式的原图
|
|
||||||
image.onload = function () {
|
|
||||||
//图片加载完毕后再通过canvas压缩图片,否则图片还没加载完就压缩,结果图片是全黑的
|
|
||||||
let canvas = document.createElement('canvas'), //创建一个canvas元素
|
|
||||||
context = canvas.getContext('2d'), //context相当于画笔,里面有各种可以进行绘图的API
|
|
||||||
imageWidth = image.width / 2, //压缩后图片的宽度,这里设置为缩小一半
|
|
||||||
imageHeight = image.height / 2, //压缩后图片的高度,这里设置为缩小一半
|
|
||||||
data = '' //存储压缩后的图片
|
|
||||||
canvas.width = imageWidth //设置绘图的宽度
|
|
||||||
canvas.height = imageHeight //设置绘图的高度
|
|
||||||
|
|
||||||
//使用drawImage重新设置img标签中的图片大小,实现压缩。drawImage方法的参数可以自行查阅W3C
|
|
||||||
context.drawImage(image, 0, 0, imageWidth, imageHeight)
|
|
||||||
//使用toDataURL将canvas上的图片转换为base64格式
|
|
||||||
data = canvas.toDataURL(type)
|
|
||||||
canvas.toBlob(function (blob) {
|
|
||||||
const f = new File([blob], fileObj.name, { type })
|
|
||||||
resolve(f)
|
|
||||||
}, type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
delImg(file, detail) {
|
|
||||||
this.fileList.splice(detail.index, 1)
|
|
||||||
this.$emit('delImg', file, detail, this.type)
|
|
||||||
},
|
|
||||||
|
|
||||||
checkImgisUpload(list) {
|
|
||||||
if (this.fileList && list && this.fileList.length == list.length) {
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang='less' scoped>
|
|
||||||
/deep/ .van-uploader__preview-image {
|
|
||||||
padding: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-left: 20px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ .van-uploader__preview-delete {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uploader {
|
|
||||||
width: 2.133333rem;
|
|
||||||
height: 2.133333rem;
|
|
||||||
background: #f7f7f7;
|
|
||||||
border-radius: 5px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 10px 0 10px 20px;
|
|
||||||
.uploader-icon {
|
|
||||||
font-size: 30px;
|
|
||||||
color: #ababab;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { uploadFile } from '@/api/api.js'
|
import { uploadFile } from '@/api/api.js'
|
||||||
import { chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
import { chooseAlbumAndTakePhoto } from '@/utils/dsbridge'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
@@ -41,17 +41,23 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
disableImg: false,
|
disableImg: false,
|
||||||
fileList: this.value,
|
fileList: [],
|
||||||
activTimer: null,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
watch: {
|
||||||
this.activTimer = setTimeout(() => {
|
// 父组件异步回填(如历史记录 getHistory 晚于 mounted)时同步列表;
|
||||||
this.fileList = this.value
|
// 上传后父组件把 value 改写为 [url字符串] 时不覆盖本地回显
|
||||||
}, 200)
|
value: {
|
||||||
|
handler(val) {
|
||||||
|
if (val && val.length && val.every(item => typeof item === 'object')) {
|
||||||
|
this.fileList = val.map(item => ({ ...item, isImage: true }))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearTimeout(this.activTimer)
|
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -83,10 +89,14 @@ export default {
|
|||||||
const res = await uploadFile(params)
|
const res = await uploadFile(params)
|
||||||
console.log('--------res---', res)
|
console.log('--------res---', res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
const blobUrl = await getImageBlobUrl(res.data.attach_id)
|
||||||
|
console.log('--------回显 blobUrl---', blobUrl)
|
||||||
|
if (!blobUrl) return
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
fileName: res.data.original_name,
|
fileName: res.data.original_name,
|
||||||
fileId: res.data.attach_id,
|
fileId: res.data.attach_id,
|
||||||
url: `${downloadUrl}${res.data.attach_id}`,
|
url: blobUrl,
|
||||||
|
isImage: true,
|
||||||
})
|
})
|
||||||
this.$emit('onUpload', this.fileList, this.type)
|
this.$emit('onUpload', this.fileList, this.type)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,19 +18,17 @@
|
|||||||
<van-field v-input.numNo0 v-show="s8show" v-model="form.s8Num" label="变压器S8台数" type="number" required :rules="[{ required: s8show, message:'请输入变压器S8台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
<van-field v-input.numNo0 v-show="s8show" v-model="form.s8Num" label="变压器S8台数" type="number" required :rules="[{ required: s8show, message:'请输入变压器S8台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-input.numNo0 v-show="s7show" v-model="form.s7BelowNum" label="变压器S7及以下台数" type="number" required :rules="[{ required: s7show, message:'请输入变压器S7及以下台数' }]" label-width="180" input-align="right" placeholder="请输入" />
|
<van-field v-input.numNo0 v-show="s7show" v-model="form.s7BelowNum" label="变压器S7及以下台数" type="number" required :rules="[{ required: s7show, message:'请输入变压器S7及以下台数' }]" label-width="180" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-input.numNo0 v-show="othershow" v-model="form.otherNum" label="其他变压器数量" type="number" required :rules="[{ required: othershow, message:'请输入其他变压器数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
<van-field v-input.numNo0 v-show="othershow" v-model="form.otherNum" label="其他变压器数量" type="number" required :rules="[{ required: othershow, message:'请输入其他变压器数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.useYear" label="变压器最早投运年限(年)" label-width="140" input-align="right" placeholder="请输入" is-link readonly @click="handelClickYear('useYear')" />
|
<van-field v-model="form.useYear" required :rules="[{ required: true, message:'请选择变压器最早投运年限' }]" label="变压器最早投运年限(年)" label-width="140" input-align="right" placeholder="请输入" is-link readonly @click="handelClickYear('useYear')" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" input-align="right" label-width="140" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" input-align="right" label-width="140" placeholder="请选择设备能效等级" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field label="变压器生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择变压器生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
<van-field label="变压器生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择变压器生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
||||||
<van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/>
|
||||||
|
|
||||||
<van-field v-input.numNo0 v-model="form.distributeCapacity" label="总额定容量(kVA)" type="number" name="distributeCapacity" required :rules="[{ required: true, message:'请填写总额定容量' }]" label-width="100" input-align="right" placeholder="请输入" />
|
<van-field v-input.numNo0 v-model="form.distributeCapacity" label="总额定容量(kVA)" type="number" name="distributeCapacity" required :rules="[{ required: true, message:'请填写总额定容量' }]" label-width="100" input-align="right" placeholder="请输入" />
|
||||||
|
|
||||||
<van-field v-input.float v-model="form.maxNeed" required :rules="[{ required: true}]" label="最大需量(kW)" type="number" input-align="right" placeholder="请输入" @input="changeTips" />
|
<van-field v-input.float v-model="form.maxNeed" required :rules="[{ required: true}]" label="最大需量(kW)" type="number" input-align="right" placeholder="请输入" @input="changeTips" />
|
||||||
<div class="tips" v-if="tips0">最大需量≤总额定容量</div>
|
<div class="tips" v-if="tips0">最大需量≤总额定容量</div>
|
||||||
<van-field v-input.allFloat v-model="form.penaltyAmount" required :rules="[{ required: true}]" label="上一年累计度力调电费的惩罚金额(元)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-input.allFloat v-model="form.penaltyAmount" required :rules="[{ required: true}]" label="上一年累计度力调电费的惩罚金额(元)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-input.float v-model="form.saveElectricity" type="number" label="预期年节电量(千瓦时)" placeholder="请输入" label-width="220" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonEmissionFactor" type="number" label="区域碳排放因子" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonReduction" type="number" label="预期减碳量(TCO₂)" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<Whether :value="formColumns.chargingName" feildName="charging" title="是否安装新能源充电桩" @onConfirmTrueFalse="onConfirmTrueFalse" />
|
<Whether :value="formColumns.chargingName" feildName="charging" title="是否安装新能源充电桩" @onConfirmTrueFalse="onConfirmTrueFalse" />
|
||||||
|
|
||||||
<van-field v-show="form.charging == 1" v-model="formColumns.deviceTypeName" label="设备类型" required :rules="[{ required: form.charging == 1, message:'请选择设备类型' }]" is-link input-align="right" placeholder="请输入" readonly @click="deviceTypeShow = true" />
|
<van-field v-show="form.charging == 1" v-model="formColumns.deviceTypeName" label="设备类型" required :rules="[{ required: form.charging == 1, message:'请选择设备类型' }]" is-link input-align="right" placeholder="请输入" readonly @click="deviceTypeShow = true" />
|
||||||
@@ -261,9 +259,6 @@ export default {
|
|||||||
produceDate:'',
|
produceDate:'',
|
||||||
equipEfficiency: '',
|
equipEfficiency: '',
|
||||||
dieoutNum: '',
|
dieoutNum: '',
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
},
|
},
|
||||||
//页面展示的中文名称
|
//页面展示的中文名称
|
||||||
formColumns: {
|
formColumns: {
|
||||||
|
|||||||
@@ -3,62 +3,33 @@
|
|||||||
<div class="fissionItem">
|
<div class="fissionItem">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field v-model="form.refrigeNum" v-input.numNo0 label="空调数量" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.refrigeNum" v-input.numNo0 label="空调数量" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field @blur="checkEquipDieout('9', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.model" label="设备型号" :rules="[{ required: false, validator:modelValidator, message:'2≤型号长度≤30'}]" input-align="right" maxlength="30"/>
|
<van-field v-model="form.dieoutNum" v-input.num label="淘汰设备数量" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.dieoutNum" v-input.num label="淘汰设备数量" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kw/平方米)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kW/平方米)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<!-- <van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/> -->
|
||||||
<van-field v-input.float v-model="form.saveElectricity" type="number" label="预期年节电量(千瓦时)" placeholder="请输入" label-width="220" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonEmissionFactor" type="number" label="区域碳排放因子" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonReduction" type="number" label="预期减碳量(TCO₂)" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-model="form.totalConcatenatedCold" v-input.float label="总额定制冷功率(kW)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" placeholder="请选择设备生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
|
||||||
<van-field v-input.num v-model="form.cumulativeRunHours" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<!-- <van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" label-width="200" input-align="right"/> -->
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="bottom"><van-button type="primary" block>保存</van-button></div> -->
|
<!-- <div class="bottom"><van-button type="primary" block>保存</van-button></div> -->
|
||||||
<!-- 年份选择 -->
|
|
||||||
<VanPickerNew :show="showOption" :columns="columnsList" :loading="loading" @onConfirm="onConfirmOption" @onCancel="showOption=false" />
|
|
||||||
<van-popup v-model="datePicker" position="bottom">
|
|
||||||
<van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmDate" @cancel="datePicker = false" />
|
|
||||||
</van-popup>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { pureDigital } from '../pattern'
|
import { pureDigital } from '../pattern'
|
||||||
import mixin from '@/mixins/mixin'
|
|
||||||
import VanPickerNew from '@/components/vanPickerNew'
|
|
||||||
import {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
VanPickerNew,
|
|
||||||
},
|
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
typeId: this.$route.query.typeId,
|
typeId: this.$route.query.typeId,
|
||||||
form: {
|
form: {
|
||||||
refrigeType:9,
|
refrigeType:9,
|
||||||
refrigeNum: '',
|
refrigeNum: '',
|
||||||
totalConcatenatedCold: '',
|
|
||||||
loadFactor: '',
|
loadFactor: '',
|
||||||
runHours:'',
|
runHours:'',
|
||||||
runDays: '',
|
runDays: '',
|
||||||
coldPerArea: '',
|
coldPerArea: '',
|
||||||
dieoutNum: '',
|
dieoutNum: ''
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
model: '',
|
|
||||||
produceDate: '',
|
|
||||||
equipEfficiency: '',
|
|
||||||
equipEfficiencyName: '',
|
|
||||||
cumulativeRunHours: '',
|
|
||||||
},
|
},
|
||||||
eqid: '',
|
eqid: '',
|
||||||
|
|
||||||
@@ -105,8 +76,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let Efficiency = this.form.equipEfficiency&&this.equipEfficiencyOption.find(item => item.value == this.form.equipEfficiency)
|
|
||||||
this.form.equipEfficiencyName = Efficiency&&Efficiency.text
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="tips" v-if="tips0 == true">35℃ ≤设定水温≤100℃</div>
|
<div class="tips" v-if="tips0 == true">35℃ ≤设定水温≤100℃</div>
|
||||||
<!-- <van-field v-model="form.useYear" label="变压器投运年限(年)" label-width="140" input-align="right" placeholder="请输入" is-link readonly @click="handelClickYear('useYear')" /> -->
|
<!-- <van-field v-model="form.useYear" label="变压器投运年限(年)" label-width="140" input-align="right" placeholder="请输入" is-link readonly @click="handelClickYear('useYear')" /> -->
|
||||||
<van-field v-model="formColumns.deviceTypeName" label="热水设备类型" required :rules="[{ required: true, message:'请选择热水设备类型' }]" input-align="right" placeholder="请选择" readonly is-link @click="deviceTypeShow = !showForm" />
|
<van-field v-model="formColumns.deviceTypeName" label="热水设备类型" required :rules="[{ required: true, message:'请选择热水设备类型' }]" input-align="right" placeholder="请选择" readonly is-link @click="deviceTypeShow = !showForm" />
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<!-- 是否进行过设备改造 -->
|
<!-- 是否进行过设备改造 -->
|
||||||
<Whether required :rules="[{ required: true, message:'请选择设备改造' }]" :value="formColumns.waterModiyName" @onConfirmTrueFalse="onConfirmTrueFalse" feildName="waterModiy" special="1" />
|
<Whether required :rules="[{ required: true, message:'请选择设备改造' }]" :value="formColumns.waterModiyName" @onConfirmTrueFalse="onConfirmTrueFalse" feildName="waterModiy" special="1" />
|
||||||
<!-- 改造方式 -->
|
<!-- 改造方式 -->
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="multipleAir">
|
<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"
|
<btnUploader type="filePic" :value="filePic"
|
||||||
@afterRead="afterRead1"
|
@afterRead="afterRead1"
|
||||||
@delImg="delImg1"
|
@delImg="delImg1"
|
||||||
@onUpload="onUpload1" />
|
@onUpload="onUpload1" />
|
||||||
</div>
|
</div> -->
|
||||||
<div class="focusItem">
|
<div class="focusItem">
|
||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field @blur="checkEquipDieout('8', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.model" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" maxlength="20" label="型号" label-width="120" input-align="right" placeholder="请输入型号"/>
|
<van-field v-model="form.model" required :rules="[{ required: true },{pattern:/^.{2,20}$/, message:'2≤型号长度≤20'}]" maxlength="20" label="型号" label-width="120" input-align="right" placeholder="请输入型号"/>
|
||||||
<van-field v-model="form.refrigeNum" v-input.numNo0 label="空调数量" type="number" required :rules="[{ required: true}]" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.refrigeNum" v-input.numNo0 label="空调数量" type="number" required :rules="[{ required: true}]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="edgl" v-input.floatNo0 label="总额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
<van-field v-model="edgl" v-input.floatNo0 label="总额定功率(kW)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<div class="tips" v-if="ratio">{{validateData[0]}}≤额定制冷量/额定功率≤{{validateData[1]}}</div>
|
<div class="tips" v-if="ratio">{{validateData[0]}}≤额定制冷量/额定功率≤{{validateData[1]}}</div>
|
||||||
<van-field v-model="hyl" v-input.float label="耗用量(t或m3)" type="number" label-width="100" input-align="right" placeholder="请输入" />
|
<van-field v-model="hyl" v-input.float label="耗用量(t或m3)" type="number" label-width="100" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coolCapacity" v-input.floatNo0 label="总额定制冷量(kW)" type="number" required :rules="[{ required: true}]" label-width="120" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coolCapacity" v-input.floatNo0 label="总额定制冷量(kW)" type="number" required :rules="[{ required: true}]" label-width="120" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.useYear" label="设备最早投入使用年份" label-width="150" is-link input-align="right" placeholder="请输入" readonly @click="handelClickYear('useYear', 'SET_CON_YEAR')" />
|
<van-field v-model="form.useYear" label="设备最早投入使用年份" required :rules="[{ required: true, message: '请选择投入年份' }]" label-width="150" is-link input-align="right" placeholder="请输入" readonly @click="handelClickYear('useYear', 'SET_CON_YEAR')" />
|
||||||
<!-- 是否进行过设备改造 -->
|
<!-- 是否进行过设备改造 -->
|
||||||
<Whether required :rules="[{ required: true, message:'请选择设备改造' }]" :value="formColumns.conEquipModiyName" @onConfirmTrueFalse="onConfirmTrueFalse" feildName="conEquipModiy" special="1" />
|
<Whether required :rules="[{ required: true, message:'请选择设备改造' }]" :value="formColumns.conEquipModiyName" @onConfirmTrueFalse="onConfirmTrueFalse" feildName="conEquipModiy" special="1" />
|
||||||
<!-- 改造方式 -->
|
<!-- 改造方式 -->
|
||||||
@@ -33,21 +33,16 @@
|
|||||||
/>
|
/>
|
||||||
<van-field v-show="conYear1" v-model="form.conIntellectModifyYear" label="增加主机智能化集中控制系统年份" required :rules="[{ required: conYear1, message:'请选择年份' }]" label-width="220" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('conIntellectModifyYear', 'SET_CON_YEAR')" />
|
<van-field v-show="conYear1" v-model="form.conIntellectModifyYear" label="增加主机智能化集中控制系统年份" required :rules="[{ required: conYear1, message:'请选择年份' }]" label-width="220" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('conIntellectModifyYear', 'SET_CON_YEAR')" />
|
||||||
<van-field v-show="conYear2" v-model="form.conModifyYear" label="更换高能效设备年份" required :rules="[{ required: conYear2, message:'请选择年份' }]" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('conModifyYear', 'SET_CON_YEAR')" />
|
<van-field v-show="conYear2" v-model="form.conModifyYear" label="更换高能效设备年份" required :rules="[{ required: conYear2, message:'请选择年份' }]" label-width="140" input-align="right" is-link placeholder="请选择" readonly @click="handelClickYear('conModifyYear', 'SET_CON_YEAR')" />
|
||||||
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.loadFactor" v-input.float label="负载系数" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runHours" v-input.maxDayHour label="每日运行时间(小时)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.runDays" v-input.maxYearDay label="年平均运行时间(天)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kW/平方米)" type="number" label-width="220" input-align="right" placeholder="请输入" />
|
<van-field v-model="form.coldPerArea" v-input.float label="单位面积冷量(kw/平方米)" type="number" required :rules="[{ required: true }]" label-width="220" input-align="right" placeholder="请输入" />
|
||||||
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
<van-field label="设备生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择设备生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
||||||
<van-field @blur="changeData('8', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.useExpl" v-input.num label="在用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
<van-field v-model="form.useExpl" v-input.num label="在用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
||||||
<van-field @blur="changeData('8', 'model', 'dieoutNum', 'form', 'refrigeNum')" v-model="form.backupExpl" v-input.num label="备用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
<van-field v-model="form.backupExpl" v-input.num label="备用台数(台)" type="number" required :rules="[{ required: true }]" input-align="right" placeholder="请输入"/>
|
||||||
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
<van-field label="设备能效等级" v-model="form.equipEfficiencyName" required :rules="[{ required: true }]" placeholder="请选择设备能效等级" input-align="right" is-link readonly @click="handelClickOptionShow('equipEfficiency')" />
|
||||||
<van-field v-input.num v-model="form.cumulativeRunHours" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.cumulativeRunHours" required :rules="[{ required: true }]" type="number" label="累计运行小时数" placeholder="请输入" label-width="200" input-align="right"/>
|
||||||
<van-field readonly v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" label-width="200" input-align="right"/>
|
<van-field v-input.num v-model="form.dieoutNum" type="number" label="淘汰设备数量" placeholder="请输入" required :rules="[{ required: true }]" label-width="200" input-align="right"/>
|
||||||
<van-field v-input.float v-model="form.saveElectricity" type="number" label="预期年节电量(千瓦时)" placeholder="请输入" label-width="220" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonEmissionFactor" type="number" label="区域碳排放因子" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.carbonReduction" type="number" label="预期减碳量(TCO₂)" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-input.float v-model="form.multiAirConditionerCop" type="number" label="多联式空调机组平均COP" placeholder="请输入" label-width="200" input-align="right"/>
|
|
||||||
<van-field v-model="form.totalConcatenatedCold" v-input.float label="总额定制冷功率(kW)" type="number" input-align="right" placeholder="请输入" label-width="200" />
|
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div v-if="form.refrigeNum">
|
<div v-if="form.refrigeNum">
|
||||||
<van-cell class="img-box box1" style="padding:10px 15px;" title="设备外观" :required="$store.getters.cityType"/>
|
<van-cell class="img-box box1" style="padding:10px 15px;" title="设备外观" :required="$store.getters.cityType"/>
|
||||||
@@ -132,11 +127,10 @@ import ModifyMode from '../common-vue/modifyMode.vue'
|
|||||||
import Whether from '../common-vue/whether.vue'
|
import Whether from '../common-vue/whether.vue'
|
||||||
import Year from '../common-vue/year.vue'
|
import Year from '../common-vue/year.vue'
|
||||||
import mixin from '@/mixins/mixin'
|
import mixin from '@/mixins/mixin'
|
||||||
import {dieoutMixin, modelValidatorMixin} from '@/mixins/dieoutMixin'
|
|
||||||
import Uploader from '../common-vue/uploader.vue'
|
import Uploader from '../common-vue/uploader.vue'
|
||||||
import Radio from '../common-vue/radio.vue'
|
import Radio from '../common-vue/radio.vue'
|
||||||
import { dataMode } from '../common'
|
import { dataMode } from '../common'
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import { pureDigital } from '../pattern'
|
import { pureDigital } from '../pattern'
|
||||||
import btnUploader from "../common-vue/btnUploader.vue";
|
import btnUploader from "../common-vue/btnUploader.vue";
|
||||||
|
|
||||||
@@ -150,7 +144,7 @@ export default {
|
|||||||
VanPickerNew,
|
VanPickerNew,
|
||||||
btnUploader
|
btnUploader
|
||||||
},
|
},
|
||||||
mixins: [mixin, dieoutMixin, modelValidatorMixin],
|
mixins: [mixin],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -171,7 +165,6 @@ export default {
|
|||||||
ratedPower: "",
|
ratedPower: "",
|
||||||
refrigeNum: '', //空调数量
|
refrigeNum: '', //空调数量
|
||||||
coolCapacity: '', //总额定制冷量
|
coolCapacity: '', //总额定制冷量
|
||||||
totalConcatenatedCold: '',
|
|
||||||
useYear: '', //设备最早投入使用年份
|
useYear: '', //设备最早投入使用年份
|
||||||
refrigeType: 8,
|
refrigeType: 8,
|
||||||
conIntellectModifyYear: '', //增加主机智能化集中控制系统年份
|
conIntellectModifyYear: '', //增加主机智能化集中控制系统年份
|
||||||
@@ -188,12 +181,7 @@ export default {
|
|||||||
equipEfficiency: '',
|
equipEfficiency: '',
|
||||||
cumulativeRunHours: '',
|
cumulativeRunHours: '',
|
||||||
produceDate:'',
|
produceDate:'',
|
||||||
dieoutNum: '',
|
dieoutNum: ''
|
||||||
saveElectricity: '',
|
|
||||||
carbonEmissionFactor:'',
|
|
||||||
carbonReduction:'',
|
|
||||||
multiAirConditionerCop:'',
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -342,29 +330,29 @@ export default {
|
|||||||
console.log(this.edgl, this.hyl);
|
console.log(this.edgl, this.hyl);
|
||||||
if (this.form.exteriorImage) {
|
if (this.form.exteriorImage) {
|
||||||
const list = this.form.exteriorImage.split(',')
|
const list = this.form.exteriorImage.split(',')
|
||||||
this.exteriorImage = list.map((ele) => {
|
this.exteriorImage = await Promise.all(list.map(async (ele) => {
|
||||||
return {
|
return {
|
||||||
url: `${downloadUrl}${ele}`,
|
url: await getImageBlobUrl(ele),
|
||||||
}
|
}
|
||||||
})
|
}))
|
||||||
console.log(this.exteriorImage,'123')
|
console.log(this.exteriorImage,'123')
|
||||||
}
|
}
|
||||||
if (this.form.tagImage) {
|
if (this.form.tagImage) {
|
||||||
const list = this.form.tagImage.split(',')
|
const list = this.form.tagImage.split(',')
|
||||||
this.tagImage = list.map((ele) => {
|
this.tagImage = await Promise.all(list.map(async (ele) => {
|
||||||
return {
|
return {
|
||||||
url: `${downloadUrl}${ele}`,
|
url: await getImageBlobUrl(ele),
|
||||||
}
|
}
|
||||||
})
|
}))
|
||||||
console.log(this.tagImage)
|
console.log(this.tagImage)
|
||||||
}
|
}
|
||||||
if (this.form.markImage) {
|
if (this.form.markImage) {
|
||||||
const list = this.form.markImage.split(',')
|
const list = this.form.markImage.split(',')
|
||||||
this.markImage = list.map((ele) => {
|
this.markImage = await Promise.all(list.map(async (ele) => {
|
||||||
return {
|
return {
|
||||||
url: `${downloadUrl}${ele}`,
|
url: await getImageBlobUrl(ele),
|
||||||
}
|
}
|
||||||
})
|
}))
|
||||||
console.log(this.markImage)
|
console.log(this.markImage)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -549,14 +537,9 @@ export default {
|
|||||||
},
|
},
|
||||||
//判断是否为对象格式
|
//判断是否为对象格式
|
||||||
ifObj(imgList) {
|
ifObj(imgList) {
|
||||||
imgList.forEach((v) => {
|
|
||||||
if(v instanceof Object && v.url.split('download/').length > 1) {
|
|
||||||
v.url = v.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = imgList.map((ele)=>{
|
const list = imgList.map((ele)=>{
|
||||||
if(ele instanceof Object) {
|
if(ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -592,28 +592,19 @@ export default {
|
|||||||
if(this.commonForm.nxzdRefrigeSystemDTO.length > 0) {
|
if(this.commonForm.nxzdRefrigeSystemDTO.length > 0) {
|
||||||
this.commonForm.nxzdRefrigeSystemDTO.forEach((v) => {
|
this.commonForm.nxzdRefrigeSystemDTO.forEach((v) => {
|
||||||
if (v.exteriorImage && v.exteriorImage instanceof Array) {
|
if (v.exteriorImage && v.exteriorImage instanceof Array) {
|
||||||
v.exteriorImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = v.exteriorImage.map((ele) => {
|
const list = v.exteriorImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
v.exteriorImage = list.join(',')
|
v.exteriorImage = list.join(',')
|
||||||
}
|
}
|
||||||
if (v.tagImage && v.tagImage instanceof Array) {
|
if (v.tagImage && v.tagImage instanceof Array) {
|
||||||
v.tagImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list1 = v.tagImage.map((ele) => {
|
const list1 = v.tagImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -621,14 +612,9 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (v.markImage && v.markImage instanceof Array) {
|
if (v.markImage && v.markImage instanceof Array) {
|
||||||
v.markImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list2 = v.markImage.map((ele) => {
|
const list2 = v.markImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -641,28 +627,19 @@ export default {
|
|||||||
if(this.commonForm.nxzdHeatSystemDTO.length > 0) {
|
if(this.commonForm.nxzdHeatSystemDTO.length > 0) {
|
||||||
this.commonForm.nxzdHeatSystemDTO.forEach((v)=> {
|
this.commonForm.nxzdHeatSystemDTO.forEach((v)=> {
|
||||||
if (v.exteriorImage && v.exteriorImage instanceof Array) {
|
if (v.exteriorImage && v.exteriorImage instanceof Array) {
|
||||||
v.exteriorImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list = v.exteriorImage.map((ele) => {
|
const list = v.exteriorImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
v.exteriorImage = list.join(',')
|
v.exteriorImage = list.join(',')
|
||||||
}
|
}
|
||||||
if (v.tagImage && v.tagImage instanceof Array) {
|
if (v.tagImage && v.tagImage instanceof Array) {
|
||||||
v.tagImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list1 = v.tagImage.map((ele) => {
|
const list1 = v.tagImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
@@ -670,14 +647,9 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (v.markImage && v.markImage instanceof Array) {
|
if (v.markImage && v.markImage instanceof Array) {
|
||||||
v.markImage.forEach((ev) => {
|
|
||||||
if (ev.url && ev.url.split('download/').length > 1) {
|
|
||||||
ev.url = ev.url.split('download/')[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const list2 = v.markImage.map((ele) => {
|
const list2 = v.markImage.map((ele) => {
|
||||||
if (ele instanceof Object) {
|
if (ele instanceof Object) {
|
||||||
return ele.url
|
return ele.fileId || ele.url
|
||||||
}
|
}
|
||||||
return ele
|
return ele
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -150,10 +150,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='fullreport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
localStorage.setItem('reportCustomerId', res.data.customerId)
|
||||||
|
|||||||
@@ -146,10 +146,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='fullreport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
localStorage.setItem('reportCustomerId', res.data.customerId)
|
||||||
|
|||||||
@@ -74,10 +74,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='fullreport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
localStorage.setItem('reportCustomerId', res.data.customerId)
|
||||||
|
|||||||
@@ -165,10 +165,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='fullreport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
localStorage.setItem('reportCustomerId', res.data.customerId)
|
||||||
|
|||||||
@@ -184,10 +184,6 @@ export default {
|
|||||||
async getLoginCustomer() {
|
async getLoginCustomer() {
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
try {
|
try {
|
||||||
let reportCustomerId = localStorage.getItem('reportCustomerId')
|
|
||||||
if(reportCustomerId&&this.$route.name=='fullreport'){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
localStorage.setItem('reportCustomerId', res.data.customerId)
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { downloadUrl } from '@/settings'
|
import { getImageBlobUrl } from '@/utils/index'
|
||||||
import commonTitle from './components/commonTitle.vue'
|
import commonTitle from './components/commonTitle.vue'
|
||||||
import electro from './components/electro.vue'
|
import electro from './components/electro.vue'
|
||||||
import refrom from './components/refrom.vue'
|
import refrom from './components/refrom.vue'
|
||||||
@@ -197,6 +197,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
signFile: '',
|
signFile: '',
|
||||||
|
imageUrlData: null,
|
||||||
signedtwo: '',
|
signedtwo: '',
|
||||||
value1: '',
|
value1: '',
|
||||||
loading2: false,
|
loading2: false,
|
||||||
@@ -228,6 +229,15 @@ export default {
|
|||||||
Loading
|
Loading
|
||||||
|
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
async signFile(val) {
|
||||||
|
if (val) {
|
||||||
|
this.imageUrlData = await getImageBlobUrl(val)
|
||||||
|
} else {
|
||||||
|
this.imageUrlData = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.outputPdf = this.outputPdf
|
window.outputPdf = this.outputPdf
|
||||||
this.userLevel()
|
this.userLevel()
|
||||||
@@ -247,11 +257,7 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
imageUrl() {
|
imageUrl() {
|
||||||
console.log(this.signFile);
|
return this.imageUrlData
|
||||||
if(this.signFile) {
|
|
||||||
return `${downloadUrl}${this.signFile}`
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
},
|
},
|
||||||
reportYear() {
|
reportYear() {
|
||||||
if (this.EnergyReportInfo.reportYear) {
|
if (this.EnergyReportInfo.reportYear) {
|
||||||
@@ -300,7 +306,6 @@ export default {
|
|||||||
const res = await getLoginCustomerAPI()
|
const res = await getLoginCustomerAPI()
|
||||||
// console.log(res.data.customerId);
|
// console.log(res.data.customerId);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
localStorage.setItem('reportCustomerId', res.data.customerId)
|
|
||||||
const data = {
|
const data = {
|
||||||
customerId: res.data.customerId,
|
customerId: res.data.customerId,
|
||||||
ai: sessionStorage.getItem('saikey')
|
ai: sessionStorage.getItem('saikey')
|
||||||
@@ -325,6 +330,20 @@ export default {
|
|||||||
sessionStorage.setItem('signIdtwo', res.data.id)
|
sessionStorage.setItem('signIdtwo', res.data.id)
|
||||||
this.EnergyReportInfo = res.data
|
this.EnergyReportInfo = res.data
|
||||||
this.setEnergyReportInfo(res.data)
|
this.setEnergyReportInfo(res.data)
|
||||||
|
if (res.data.energySituationRadar) {
|
||||||
|
this.radarOption.radar.indicator = JSON.parse(
|
||||||
|
res.data.energySituationRadar
|
||||||
|
)['indicator']
|
||||||
|
this.radarOption.series[0].data = []
|
||||||
|
this.radarOption.series[0].data.push(
|
||||||
|
JSON.parse(res.data.energySituationRadar)['seriesData'][0].dataList
|
||||||
|
)
|
||||||
|
this.createRadarChart()
|
||||||
|
} else {
|
||||||
|
this.radarOption.radar.indicator = []
|
||||||
|
this.radarOption.series[0].data = []
|
||||||
|
this.createRadarChart()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Notify({ type: 'danger', message: res.msg })
|
Notify({ type: 'danger', message: res.msg })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,12 +31,9 @@
|
|||||||
<van-dropdown-item v-model="value1" :options="option1" />
|
<van-dropdown-item v-model="value1" :options="option1" />
|
||||||
</van-dropdown-menu> -->
|
</van-dropdown-menu> -->
|
||||||
|
|
||||||
<div class="detail2-right-top-reset" @click="generateReport(false)" v-if="isLevel">
|
<div class="detail2-right-top-reset" @click="generateReport" v-if="isLevel">
|
||||||
重新生成
|
重新生成
|
||||||
</div>
|
</div>
|
||||||
<div class="detail2-right-top-reset" @click="generateReport(true)" v-if="isLevel&&isCq">
|
|
||||||
刷新
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detail2-right-bottom">
|
<div class="detail2-right-bottom">
|
||||||
{{userCode}}: <div>{{ EnergyReportInfo.consNo }}</div>
|
{{userCode}}: <div>{{ EnergyReportInfo.consNo }}</div>
|
||||||
@@ -240,9 +237,6 @@ export default {
|
|||||||
|
|
||||||
taskType() {
|
taskType() {
|
||||||
return this.$route.params.item? this.$route.params.item.taskType: 0
|
return this.$route.params.item? this.$route.params.item.taskType: 0
|
||||||
},
|
|
||||||
isCq(){
|
|
||||||
return process.env.VUE_APP_CITY_TYPE=='cq'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
@@ -258,8 +252,8 @@ export default {
|
|||||||
// },
|
// },
|
||||||
created() {
|
created() {
|
||||||
this.userLevel()
|
this.userLevel()
|
||||||
this.doDebounce = debounce(function (flag) {
|
this.doDebounce = debounce(function () {
|
||||||
this.getGenerateReport(flag)
|
this.getGenerateReport()
|
||||||
}, 5000, true)
|
}, 5000, true)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -442,15 +436,14 @@ export default {
|
|||||||
this.option1 = arr
|
this.option1 = arr
|
||||||
},
|
},
|
||||||
// 重新生成
|
// 重新生成
|
||||||
generateReport(flag){
|
generateReport(){
|
||||||
this.doDebounce(flag)
|
this.doDebounce()
|
||||||
},
|
},
|
||||||
async getGenerateReport(flag) {
|
async getGenerateReport() {
|
||||||
let data = {
|
let data = {
|
||||||
customerId:
|
customerId:
|
||||||
this.$route.params.customerId || JSON.parse(sessionStorage.getItem('tidCid')).customerId,
|
this.$route.params.customerId || JSON.parse(sessionStorage.getItem('tidCid')).customerId,
|
||||||
taskId: this.$route.params.taskId|| JSON.parse(sessionStorage.getItem('tidCid')).taskId,
|
taskId: this.$route.params.taskId|| JSON.parse(sessionStorage.getItem('tidCid')).taskId
|
||||||
refresh: flag
|
|
||||||
}
|
}
|
||||||
// this.$toast('正在重新生成,请稍后...')
|
// this.$toast('正在重新生成,请稍后...')
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
|
|||||||
+2
-2
@@ -133,14 +133,14 @@ module.exports = {
|
|||||||
|
|
||||||
"/admin": {
|
"/admin": {
|
||||||
// target: "http://121.28.84.19:9004",
|
// target: "http://121.28.84.19:9004",
|
||||||
target: "http://172.29.106.250:19012",
|
target: "http://172.29.69.38:19012",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/admin": "",
|
"^/admin": "",
|
||||||
},
|
},
|
||||||
}, "/energy-effcicency-net-service": {
|
}, "/energy-effcicency-net-service": {
|
||||||
// target: "http://121.28.84.19:9004",
|
// target: "http://121.28.84.19:9004",
|
||||||
target: "http://172.29.106.250:19012",
|
target: "http://172.29.69.38:19012",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/energy-effcicency-net-service": "",
|
"^/energy-effcicency-net-service": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user