能效诊断

This commit is contained in:
jiangyinzhi
2024-07-10 10:25:32 +08:00
parent b7aa6f87f1
commit 04f0606430
262 changed files with 58693 additions and 1 deletions
+149
View File
@@ -0,0 +1,149 @@
export default {
routes: state => state.app.routes,
token: state => state.user.token,
ai: state => state.user.ai,
platform: state => state.user.platform,
userid: state => state.user.userid,
username: state => state.user.username,
realname: state => state.user.realname,
mobile: state => state.user.mobile,
uno: state => state.user.uno,
//能效
uid: state => state.user.uid,
userType: state => state.user.userType,
//需求响应
duid: state => state.user.duid,
staticUrl: state => state.user.staticUrl,
getIsEncrypt: state => state.user.isEncrypt,
role: state => state.user.role,
sgcode: state => state.user.sgcode,
deptid: state => state.user.deptid,
isEnergyUser: state => state.user.isEnergyUser,
//根目录路由
to: state => state.user.to,
//客户还是客户经理
userLevel: state => state.user.userLevel,
// 当前环境是不是安徽环境===安徽设备外观必填
cityType: state => state.user.cityType,
cityIsNx: state => state.user.cityIsNx,
imageRecognition: state => state.user.imageRecognition,
validate: state => state.user.validate,
/**
* 询问的数据
*/
//配电系统
distributeEnquireDevIds: state => state.search.distributeEnquireDevIds, //设备类
distributeEnquireIds: state => state.search.distributeEnquireIds, //运营类
/**
* 照明系统
*/
lightEnquireDevIds: state => state.search.lightEnquireDevIds, // 设备类
lightEnquireIds: state => state.search.lightEnquireIds, // 运营类
/**
* 生活热水
*/
hotWaterEnquireDevIds: state => state.search.hotWaterEnquireDevIds, // 设备类
hotWaterEnquireIds: state => state.search.hotWaterEnquireIds, // 运营类
/**
* 采暖
*/
heatEnquireDevIds: state => state.search.heatEnquireDevIds, // 设备类
heatEnquireIds: state => state.search.heatEnquireIds, // 运营类
heatIntellectModifyYear: state => state.search.heatIntellectModifyYear, //集中控制系统改造年份
heatEquipModiy: state => state.search.heatEquipModiy, //否进行过设备改造
heatModifyYear: state => state.search.heatModifyYear, //更换高能效设备改造年份
pumpTotalPower: state => state.search.pumpTotalPower, //输送泵组总功率
heatType: state => state.search.heatType, //采暖设备类型
heatMode: state => state.search.heatMode, //采暖方式
pumpYear: state => state.search.pumpYear, //输送泵组设备年份
pumpNum: state => state.search.pumpNum, //输送泵组台数
/**
* 集中式空调
*/
cenEnquireDevIds: state => state.search.cenEnquireDevIds, // 设备类
cenEnquireIds: state => state.search.cenEnquireIds, // 运营类
cenIntellectModifyYear: state => state.search.cenIntellectModifyYear, // 智能化集中控制系统改造年份
cenWaterModifyYear: state => state.search.cenWaterModifyYear, //水泵增加智能变频控制改造年份
cenModifyYear: state => state.search.cenModifyYear, //高能效设备改造年份
cenEquipModiy: state => state.search.cenEquipModiy, //是否进行过设备改造
/**
* 多联式空调
*/
conEnquireDevIds: state => state.search.conEnquireDevIds, // 设备类
conEnquireIds: state => state.search.conEnquireIds, // 运营类
conIntellectModifyYear: state => state.search.conIntellectModifyYear, // 智能化集中控制系统改造年份
conEquipModiy: state => state.search.conEquipModiy, //是否进行过设备改造
conModifyYear: state => state.search.conModifyYear, //高能效设备改造年份
fac: state => state.search.fac,
/**
* 空调form
*/
cenForm: state => state.search.cenForm, //多联式
conForm: state => state.search.conForm, //多联式
fisForm: state => state.search.fisForm, //分体式
/**
* 路径
*/
takPath: state => state.path.takPath,
/**
* 当前页面填写数据
*/
//集中式
cenData: state => state.pageData.cenData,
//多联式
conData: state => state.pageData.conData,
//分体式
fisData: state => state.pageData.fisData,
//采暖
heaData: state => state.pageData.heaData,
//照明
illData: state => state.pageData.illData,
//配电
dirData: state => state.pageData.dirData,
//生活
hotData: state => state.pageData.hotData,
//问询数据
searchInfo: state => state.pageData.searchInfo,
//当前页面回显数据
editData: state => state.pageData.editData,
//报告页面的签名图片
imageUrl: state => state.pageData.imageUrl,
checkboxList: state => state.pageData.checkboxList,
/**
* 点击后获取当前空调页面所填数据
*/
cenClickData: state => state.pageData.cenClickData,
conClickData: state => state.pageData.conClickData,
fisClickData: state => state.pageData.fisClickData,
// operDetailCode: state => state.pageData.operDetailCode,
foc: state => state.pageData.foc,
mul: state => state.pageData.mul,
fis: state => state.pageData.fis,
het: state => state.pageData.het,
dis: state => state.pageData.dis,
ill: state => state.pageData.ill,
hot: state => state.pageData.hot,
/**
* 存储机组新增或修改后的数据
*/
//空调
airConditioningUnitList: state => state.saveList.airConditioningUnitList,
//冷却塔
coolingTowerUnitList: state => state.saveList.coolingTowerUnitList,
//采暖
heatingUnitList: state => state.saveList.heatingUnitList,
//字典字段
notUsedResidueEnergyOption: state => state.zdTable.notUsedResidueEnergyOption,
residueHotTempOption: state => state.zdTable.residueHotTempOption,
residueHotTimeOption: state => state.zdTable.residueHotTimeOption,
heatDemandOption: state => state.zdTable.heatDemandOption,
EnergyReportInfo: state => state.report.EnergyReportInfo
}
+25
View File
@@ -0,0 +1,25 @@
import Vue from 'vue'
import Vuex from 'vuex'
import user from './module/user'
import search from './module/search'
import path from './module/path'
import pageData from './module/pageData'
import saveList from './module/saveList'
import report from './module/report'
import zdTable from './module/zdTable' // 处理字典的
import getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
user,
path,
search,
report,
zdTable,
saveList,
pageData,
},
getters
})
+146
View File
@@ -0,0 +1,146 @@
const getDefaultState = () => ({
//页面填完后的data数据
/**
* 集中式空调页面此时所填数据
*/
cenData: {},
/**
* 多联式空调此时所填数据
*/
conData: {},
/**
* 分体式空调此时所填数据
*/
fisData: {},
/**
* 采暖页面此时所填数据
*/
heaData: {},
/**
* 照明页面此时所填数据
*/
illData: {},
/**
* 配电页面此时所填数据
*/
dirData: {},
/**
* 生活热水页面此时所填数据
*/
hotData: {},
/**
* 点击后获取当前空调页面所填数据
*/
cenClickData: {},
conClickData: {},
fisClickData: {},
/**
* 获取问询数据
*/
searchInfo: {},
/**
* 回显数据
*/
editData: {},
//报告页面生成的签名图片url
imageUrl: '',
//页面中选择列表
checkboxList: [],
fos: '',
mul: '',
fis: '',
het: '',
dis: '',
ill: '',
hot: '',
})
const state = getDefaultState()
const mutations = {
//集中式空调页面此时所填数据
CURRENT_CEN_DATA: (state, data) => {
state.cenData = data
},
//再点击空调时获取当前页面所填数据
CURRENT_CEN_CLICK_DATA: (state, data) => {
state.cenClickData = data
},
//多联式空调此时所填数据
CURRENT_CON_DATA: (state, data) => {
state.conData = data
},
//再点击空调时获取当前页面所填数据
CURRENT_CONCLICK_DATA: (state, data) => {
state.conClickData = data
},
//分体式空调此时所填数据
CURRENT_FIS_DATA: (state, data) => {
state.fisData = data
},
//再点击空调时获取当前页面所填数据
CURRENT_FIS_CLICK_DATA: (state, data) => {
state.fisClickData = data
},
//采暖页面此时所填数据
CURRENT_HEA_DATA: (state, data) => {
state.heaData = data
},
//照明页面此时所填数据
CURRENT_ILL_DATA: (state, data) => {
state.illData = data
},
//配电页面此时所填数据
CURRENT_DIR_DATA: (state, data) => {
state.dirData = data
},
//生活热水页面此时所填数据
CURRENT_HOT_DATA: (state, data) => {
state.hotData = data
},
//获取问询数据
GET_SEARCHINFO: (state, data) => {
state.searchInfo = data
},
//当前页面回显数据
GET_EDITDATA: (state, data) => {
state.editData = data
},
GET_USER_PIC: (state, data) => {
state.imageUrl = data
},
GET_CHECKBOXLIST: (state, data) => {
state.checkboxList = data
},
GET_FOC: (state, data) => {
console.log(data);
state.foc = data
},
GET_MUL: (state, data) => {
state.mul = data
},
GET_FIS: (state, data) => {
state.fis = data
},
GET_HET: (state, data) => {
state.het = data
},
GET_DIS: (state, data) => {
state.dis = data
},
GET_ILL: (state, data) => {
state.ill = data
},
GET_HOT: (state, data) => {
state.hot = data
}
}
const actions = {}
export default {
namespaced: true,
state,
mutations,
actions
}
+29
View File
@@ -0,0 +1,29 @@
const getDefaultState = () => ({
/**
* 返回时所需路径
*/
takPath: {},
})
const state = getDefaultState()
const mutations = {
/**
* 返回时所需路径
*/
SET_PATH: (state, data) => {
console.log(data);
state.takPath = data
},
}
const actions = {
}
export default {
namespaced: true,
state,
mutations,
actions
}
+14
View File
@@ -0,0 +1,14 @@
const state = {
EnergyReportInfo: { }
}
const mutations = {
setEnergyReportInfo(state, newVal) {
console.log(newVal,222);
state.EnergyReportInfo = newVal
}
}
export default {
namespaced: true,
state,
mutations
}
+48
View File
@@ -0,0 +1,48 @@
const getDefaultState = () => ({
//存储机组新增后或修改后的数据
/**
* 空调机组
*/
airConditioningUnitList: [],
/**
* 冷却塔机组
*/
coolingTowerUnitList: [],
/**
* 采暖机组
*/
heatingUnitList: []
})
const state = getDefaultState()
const mutations = {
SET_AIR(state, data) {
state.airConditioningUnitList = data
},
SET_COO(state, data) {
console.log(data);
state.coolingTowerUnitList = data
},
SET_HEA(state, data) {
state.heatingUnitList = data
}
}
const actions = {
getAir({ commit }, data) {
commit('SET_AIR', data)
},
getCoo({ commit }, data) {
commit('SET_COO', data)
},
getHea({ commit }, data) {
commit('SET_HEA', data)
}
}
export default {
namespaced: true,
state,
mutations,
actions
}
+174
View File
@@ -0,0 +1,174 @@
// import vm from '@/utils/bus'
const getDefaultState = () => ({
/**
* 配电
*/
distributeEnquireDevIds: '',
distributeEnquireIds: '',
/**
* 照明
*/
lightEnquireDevIds: '',
lightEnquireIds: '',
/**
* 生活热水
*/
hotWaterEnquireDevIds: '',
hotWaterEnquireIds: '',
/**
* 采暖
*/
heatEnquireDevIds: '',
heatEnquireIds: '',
heatEquipModiy: '',
heatIntellectModifyYear: '',
heatMode: '',
heatModifyYear: '',
heatType: '',
pumpNum: '',
pumpTotalPower: '',
pumpYear: '',
/**
* 集中式空调
*/
cenEnquireDevIds: '',
cenEnquireIds: '',
cenEquipModiy: '',
cenIntellectModifyYear: '',
cenModifyYear: '',
cenWaterModifyYear: '',
/**
* 多联式空调
*/
conEnquireDevIds: '',
conEnquireIds: '',
conEquipModiy: '',
conIntellectModifyYear: '',
conModifyYear: '',
cenForm: {},//集中式空调form
conForm: {},//多联式空调form
fisForm: {},//分体式空调form
fac: {},
})
const state = getDefaultState()
const mutations = {
/**
* 配电
*/
SET_DISTR: (state, data) => {
state.distributeEnquireDevIds = data.distributeEnquireDevIds
state.distributeEnquireIds = data.distributeEnquireIds
},
/**
* 照明
*/
SET_LIGHT: (state, data) => {
state.lightEnquireDevIds = data.lightEnquireDevIds
state.lightEnquireIds = data.lightEnquireIds
},
/**
* 生活热水
*/
SET_HOT: (state, data) => {
state.hotWaterEnquireDevIds = data.hotWaterEnquireDevIds
state.hotWaterEnquireIds = data.hotWaterEnquireIds
},
/**
* 采暖
*/
SET_HEAT: (state, data) => {
state.heatEnquireDevIds = data.heatEnquireDevIds
state.heatEnquireIds = data.heatEnquireIds
},
/**
* 采暖 -- 方式,设备类型
*/
SET_HEAT_CHANGE: (state, data) => {
state[data.type] = data.data
},
/**
* 采暖 -- 数字类型
*/
SET_NUM: (state, data) => {
state[data.type] = data.data
},
/**
* 采暖 -- 日期
*/
SET_HEAT_YEAR: (state, data) => {
state.heatIntellectModifyYear = data.heatIntellectModifyYear
state.heatModifyYear = data.heatModifyYear
state.pumpYear = data.pumpYear
},
/**
* 集中式空调
*/
SET_CENDATA: (state, data) => {
state.cenEnquireDevIds = data.cenEnquireDevIds
state.cenEnquireIds = data.cenEnquireIds
},
/**
* 集中式空调 -- 日期
*/
SET_CEN_YEAR: (state, data) => {
state.cenIntellectModifyYear = data.cenIntellectModifyYear
state.cenModifyYear = data.cenModifyYear
state.cenWaterModifyYear = data.cenWaterModifyYear
},
/**
* 多联式空调
*/
SET_CON: (state, data) => {
state.conEnquireDevIds = data.conEnquireDevIds
state.conEnquireIds = data.conEnquireIds
},
/**
* 多联式空调 -- 日期
*/
SET_CON_YEAR: (state, data) => {
state.conIntellectModifyYear = data.conIntellectModifyYear
state.conModifyYear = data.conModifyYear
},
/**
* 获取空调form
*/
//集中式
SET_CEN_FORM: (state, data) => {
state.cenForm = data
},
//多联式
SET_CON_FORM: (state, data) => {
state.conForm = data
},
//分体式
SET_FIS_FORM: (state, data) => {
state.fisForm = data
},
/**
* 是否进行过设备改造
*/
SET_EQUIPMODIY: (state, data) => {
state[data.field] = data.info.value
},
SET_FACIL: (state, data) => {
state.fac = data
// sessionStorage.setItem("facilityManage", JSON.stringify(data));
}
}
const actions = {
}
export default {
namespaced: true,
state,
mutations,
actions
}
+196
View File
@@ -0,0 +1,196 @@
// import vm from '@/utils/bus'
import { getLoginInfoByGrsg, getUserInfo, getUserLevel } from '@/api/common.js'
const tokenKey = 'stk',
platformKey = 'pfk',
// unoKey = 'suno',
uidKey = 'suid',
userTypeKey = 'sut',
duidKey = 'sduid',
sak = 'saikey'
const getValueByKey = key => {
return sessionStorage.getItem(key) ? sessionStorage.getItem(key) : ''
}
const getDefaultState = () => ({
token: getValueByKey(tokenKey),
ai: getValueByKey(sak),
platform: getValueByKey(platformKey),
userid: '',
username: '',
realname: '',
mobile: '',
uno: '', //0500024691
//能效
uid: getValueByKey(uidKey),
userType: getValueByKey(userTypeKey),
//需求响应
duid: getValueByKey(duidKey),
staticUrl: process.env.STATIC_RESOURCE_URL,
isEncrypt: true,
role: '1', //1: 运维员,2:班组长,3:用能客户
sgcode: '',
deptid: '',
isEnergyUser: true,
userLevel: '',
to: {
path: ''
},
cityType: process.env.VUE_APP_CITY_TYPE=='sx', //外观图片必填
cityIsNx: process.env.VUE_APP_CITY_TYPE=='sx', //位置必填
imageRecognition: process.env.VUE_APP_CITY_TYPE=='ah', // 图像识别
validate: process.env.VUE_APP_CITY_TYPE=='ah', // 大区间校验
})
const state = getDefaultState()
const mutations = {
GET_USER_LEVEL:(state, data)=>{
state.userLevel = data
sessionStorage.setItem('level', data)
// getUserLevel().then((res)=>{
// if(res.code == 0) {
// state.userLevel = res.data
// sessionStorage.setItem('level', res.data)
// }
// })
},
RESET_STATE: (state) => {
Object.assign(state, getDefaultState())
},
SET_TOKEN: (state, data) => {
console.log(data);
state.token = data
// state.platform = platform
if(data instanceof Object) {
sessionStorage.setItem(tokenKey, JSON.stringify(data))
sessionStorage.setItem('__TOKEN', data.token)
} else {
sessionStorage.setItem(tokenKey, data)
sessionStorage.setItem('__TOKEN', data)
}
// sessionStorage.setItem(platformKey, platform)
},
SET_AI: (state, ai) => {
state.ai = ai
sessionStorage.setItem(sak, ai)
},
SET_PATH: (state, data) => {
state.to.path = data.path
sessionStorage.setItem('path', data.path)
},
SET_USER_ID: (state, userid) => {
state.userid = userid
sessionStorage.setItem('userId', userid)
},
SET_USER_NAME: (state, username) => {
state.username = username
},
SET_REALNAME: (state, realname) => {
state.realname = realname
},
SET_MOBILE: (state, mobile) => {
state.mobile = mobile
},
SET_USER_CONST_NO: (state, uno) => {
state.uno = uno
},
SET_USER_CONST_INFO: (state, { uid, userType }) => {
state.uid = uid
state.userType = userType
sessionStorage.setItem(uidKey, uid)
sessionStorage.setItem(userTypeKey, userType)
},
SET_DEMAND_USER_CONST_INFO(state, duid) {
state.duid = duid
sessionStorage.setItem(duidKey, duid)
},
SET_ROLE(state, role) {
state.role = role
},
SET_SG_CODE(state, sgcode) {
state.sgcode = sgcode
},
SET_DEPT_ID: (state, deptid) => {
state.deptid = deptid
},
SET_ENERGY_TYPE(state, user_category_code) {
//user_category_code 3:用能客户 2:能源服务商
state.isEnergyUser = user_category_code == 3
}
}
const actions = {
getLoginInfo({ commit, state }) {
// const ai = sessionStorage.getItem('ai')
return new Promise(resolve => {
let params = {
ai: state.ai,
login_source: "5",
appCode: ["NXGL"]
}
// const str = JSON.stringify(params)
// alert(str)
getLoginInfoByGrsg(params).then(res => {
// console.log(res);
// const result = JSON.stringify(res)
// alert(result)
if (res.code == 0) {
console.log(res,'125');
commit('SET_TOKEN', {
token: res.data.access_token,
platform: 'grsg'
})
// commit('SET_AI', ai)
resolve(true)
} else {
resolve(false)
}
})
})
},
getUserInfo({ commit }) {
console.log(this);
return new Promise((resolve) => {
getUserInfo().then(res => {
// if (res.code == vm.$StatusCode.SUCCESS) {
if(res.code == 0) {
console.log(res);
const { data } = res
let {
user_name,
real_name,
mobile_phone,
user_id,
account_card,
gw_yc_code, dept_id,
user_category_code
} = data.user_info
commit('SET_USER_ID', user_id)
commit('SET_USER_CONST_NO', account_card)
commit('SET_USER_NAME', user_name)
commit('SET_REALNAME', real_name)
commit('SET_MOBILE', mobile_phone)
commit('SET_SG_CODE', gw_yc_code)
commit('SET_DEPT_ID', dept_id)
commit('SET_ENERGY_TYPE', user_category_code)
// commit('GET_USER_LEVEL')
resolve(true)
} else {
resolve(false)
}
// }
})
}).catch(error => {
console.log(error)
})
},
}
export default {
namespaced: true,
state,
mutations,
actions
}
+36
View File
@@ -0,0 +1,36 @@
import { getCode } from '@/api/common.js'
const zdTable = {
state: {
notUsedResidueEnergyOption: [],
residueHotTempOption: [],
residueHotTimeOption: [],
heatDemandOption: [],
},
mutations: {
SET_TABLE: (state, data) => {
state[data.option] = data.data
},
},
actions: {
setzdTable({ commit, state }, params) {
// 如果已经调用过字段就不需要再次调用了
if(state.notUsedResidueEnergyOption.length) return
return new Promise((resolve) => {
const info = {
codeSortId: params.id,
codeType: params.type
}
getCode(info).then(res => {
res.data.forEach((v) => {
v.text = v.name
})
commit('SET_TABLE', { data: res.data, option: params.option })
})
resolve(true)
})
}
}
}
export default zdTable