diff --git a/.env.production b/.env.production index a255385..4033a7a 100644 --- a/.env.production +++ b/.env.production @@ -6,7 +6,7 @@ NODE_ENV=production # 测试0 生产1 VUE_APP_ENV = '1' # 定义变量 -VUE_APP_CITY_TYPE = 'xj' +VUE_APP_CITY_TYPE = 'sx' # base api VUE_APP_BASE_API = '' diff --git a/public/index.html b/public/index.html index 0ce3ad7..eea6118 100644 --- a/public/index.html +++ b/public/index.html @@ -18,9 +18,9 @@ content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"> - diff --git a/src/api/api.js b/src/api/api.js index 6d9cb9d..091a587 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -282,7 +282,9 @@ export function getPositionData(params) { // 获取配电信息 export function getNxzdPower(params) { return myAxios({ - url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getNxzdPower?customerId=${params}`, + url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getNxzdPower`, + // ?customerId=${params} method: 'get', + params: { "customerId": params } }) } diff --git a/src/api/common.js b/src/api/common.js index 47593e9..29082ec 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -2,6 +2,7 @@ import myAxios from "./axios"; import myAxios2 from "./axios2"; const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':'' +const sxAdmin = process.env.VUE_APP_CITY_TYPE == 'sx'?'/admin/grsg2':'/thirdpart/grsg' /** * 查询系统码表 @@ -39,7 +40,7 @@ export function getUserInfo(params) { //获取ai export function getLoginInfoByGrsg(params) { return myAxios({ - url: `/thirdpart/grsg/loginGrsg`, //后端接口路由 + url: `${sxAdmin}/loginGrsg`, //后端接口路由 method: 'post', data: params }) @@ -63,21 +64,5 @@ export function getUserLevel() { } -//获取返回base64 -export function downReportTime(data) { - return myAxios2({ - url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/downReportTime`, //后端接口路由 - method: 'post', - data - }) -} -// 保存日志 -export function saveLog(data) { - return myAxios({ - url: `${sx}/energy-effcicency-net-service/log/saveLog`, //后端接口路由 - method: 'post', - data - }) -} diff --git a/src/api/config.js b/src/api/config.js index 5c56d12..36be298 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') { // baseURL = '' // 本地 打包以后只需要空路径就行 // baseURL = '/proxy-ah' //安徽 打包以后的路径 // baseURL = '/proxy-nx' //宁夏 打包以后的路径 - baseURL = '/proxy-xj' //新疆 打包以后的路径 - // baseURL = '/proxy-sx' //山西 打包以后的路径 + // baseURL = '/proxy-xj' //新疆 打包以后的路径 + baseURL = '/proxy-sx' //山西 打包以后的路径 } diff --git a/src/api/customer.js b/src/api/customer.js index 205a85a..ec4a45d 100644 --- a/src/api/customer.js +++ b/src/api/customer.js @@ -43,15 +43,3 @@ export function getSingleTaskInfo(id) { -/** - * 查询客户用电户号列表 - * @param data - */ -// nxzdCustomerBasicInfoNet -export function getUseele(data) { - return myAxios({ - url: `${sx}/energy-effcicency-net-service/nxzdCConsNet/list`, //后端接口路由 - method: 'post', - data - }) -} \ No newline at end of file diff --git a/src/api/universalEnergy.js b/src/api/universalEnergy.js index f84d1bc..b9e7e3e 100644 --- a/src/api/universalEnergy.js +++ b/src/api/universalEnergy.js @@ -264,19 +264,3 @@ export function enterprisEdit(params) { data: params }) } -// 新增保存企业通用能源系统信息主 -export function systemInfoAdd(params) { - return myAxios({ - url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/add`, - method: 'POST', - data: params - }) -} -// 修改保存企业通用能源系统信息主 -export function systemInfoEdit(params) { - return myAxios({ - url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/edit`, - method: 'POST', - data: params - }) -} diff --git a/src/router/router.js b/src/router/router.js index e792c3f..b094a7d 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -303,16 +303,7 @@ export default [ component: () => import('@/views/enterprise/customer.vue') }, - // 工业企业-用电户号 - { - path: '/useele', - name: 'useele', - meta: { - title: '用电户号', - keepAlive: true - }, - component: () => import('@/views/enterprise/useEle.vue') - }, + // 工业企业-部分报告 { path: '/partialreport', diff --git a/src/settings.js b/src/settings.js index ed75c64..7e5c490 100644 --- a/src/settings.js +++ b/src/settings.js @@ -12,7 +12,7 @@ module.exports = { menuExclude: [], // ${process.env.VUE_APP_BASE_API} // https://portal.xt.nfjbill.ren:30004 - downloadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/download/`, + downloadUrl: `${process.env.VUE_APP_BASE_API}/proxy-sx/file/minio/download/`, // downloadUrl: `https://www.greensgcc.com/proxy-xj/file/minio/download/`, // downloadUrl: `http://172.29.69.38:19012/proxy-sx/file/minio/download/`, uploadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/upload/`, diff --git a/src/store/module/user.js b/src/store/module/user.js index b5d9293..80bc03d 100644 --- a/src/store/module/user.js +++ b/src/store/module/user.js @@ -6,7 +6,9 @@ const tokenKey = 'stk', uidKey = 'suid', userTypeKey = 'sut', duidKey = 'sduid', - sak = 'saikey' + sak = 'saikey', + useridKey= 'userId', + username= 'username' const getValueByKey = key => { return sessionStorage.getItem(key) ? sessionStorage.getItem(key) : '' } @@ -15,8 +17,8 @@ const getDefaultState = () => ({ token: getValueByKey(tokenKey), ai: getValueByKey(sak), platform: getValueByKey(platformKey), - userid: '', - username: '', + userid: getValueByKey(useridKey), + username: getValueByKey(username), realname: '', mobile: '', uno: '', //0500024691 @@ -85,6 +87,7 @@ const mutations = { }, SET_USER_NAME: (state, username) => { state.username = username + sessionStorage.setItem('username', username) }, SET_REALNAME: (state, realname) => { state.realname = realname @@ -152,7 +155,7 @@ const actions = { getUserInfo({ commit }) { console.log(this); return new Promise((resolve) => { - getUserInfo().then(res => { + getUserInfo({t: new Date().getTime()}).then(res => { // if (res.code == vm.$StatusCode.SUCCESS) { if(res.code == 0) { console.log(res); diff --git a/src/utils/htmlToPdf.js b/src/utils/htmlToPdf.js index 03c1e76..bba5ff6 100644 --- a/src/utils/htmlToPdf.js +++ b/src/utils/htmlToPdf.js @@ -1,7 +1,6 @@ import html2Canvas from 'html2canvas' import JsPDF from 'jspdf' import { buildPDF } from '@/utils/dsbridge.js' -// import { downReportTime } from '@/api/common.js' //前端不作不分页 var getPdf = async function(title, date) { @@ -47,10 +46,6 @@ export default getPdf -// // var getBase64 = async function (data) { -// // const res = await downReportTime(data) - -// // } //前端作分页 // var getPdf = async function(title, id) { @@ -175,10 +170,5 @@ export default getPdf // let formData = new FormData() // let fileOfBlob = new File([u8Arr], fileName + '.jpg', options) //返回文件流 // formData.append('file', fileOfBlob) -// const res = await downReportTime(formData) -// if(res.code == 0) { -// const ba64 = `filename=${fileName}.pdf;base64,` + res.data -// buildPDF(ba64) -// } // } \ No newline at end of file diff --git a/src/views/energyEfficiency/archivalInformation.vue b/src/views/energyEfficiency/archivalInformation.vue index 9ad319e..de95f24 100644 --- a/src/views/energyEfficiency/archivalInformation.vue +++ b/src/views/energyEfficiency/archivalInformation.vue @@ -438,10 +438,7 @@ export default { customerTypeSure() {}, //所属区域点击确认 provOrgSure() {}, - //用电户号点击操作 - // goUseele() { - // this.$router.push('/useele') - // } + } } diff --git a/src/views/energyEfficiency/constructionInfo.vue b/src/views/energyEfficiency/constructionInfo.vue index 92cee1b..630d919 100644 --- a/src/views/energyEfficiency/constructionInfo.vue +++ b/src/views/energyEfficiency/constructionInfo.vue @@ -57,9 +57,9 @@ - + -
光伏总建设面积+可利用屋面面积<总建筑面积
+
光伏已建设面积+可利用屋面面积<总建筑面积
50×光伏已建设面积/1000<光伏总装机容量<200×光伏已建设面积/1000
@@ -296,7 +296,6 @@ import Year from '@/views/facilityManage/common-vue/year.vue' import mixin from '@/mixins/mixin' // import { Toast } from 'vant' -// saveLog import { getCode } from '@/api/common.js' import { addEnergyEquip } from '@/api/energyConsumption' import { downloadUrl } from '@/settings' @@ -500,7 +499,7 @@ export default { purchasePower: '1', // 购电方式 basicCharge: '1', // 基本电费 valleyElectricityPrices: '2', // 是否享受峰谷平电价 - photovoltaicArea: '0', // 光伏总建设面积 + photovoltaicArea: '0', // 光伏已建设面积 photovoltaicPhotovoltaic: '0', // 光伏总装机容量 reclaimedWater: '2', // 是否采用再生水 reclaimedWaterType: '', // 再生水类型 @@ -837,19 +836,7 @@ export default { }) }, - //保存绿网传来的数据 - // async saveGreenComeData(content) { - // const tidCid = JSON.parse(sessionStorage.getItem('tidCid')) - // console.log(tidCid); - // const data = { - // businessKey: "buildBusinessKey", - // content: content, - // customerId: tidCid.customerId - // } - // const res = await saveLog(data) - // console.log(res); - // }, - + //点击选择日期时只展示年份 handelOpen() { this.datePopup = !this.showForm; @@ -2021,7 +2008,7 @@ export default { purchasePower: '1', // 购电方式 basicCharge: '1', // 基本电费 valleyElectricityPrices: '2', // 是否享受峰谷平电价 - photovoltaicArea: '', // 光伏总建设面积 + photovoltaicArea: '', // 光伏已建设面积 photovoltaicPhotovoltaic: '', // 光伏总装机容量 reclaimedWater: '2', // 是否采用再生水 reclaimedWaterType: '', // 再生水类型 diff --git a/src/views/energyEfficiency/index.vue b/src/views/energyEfficiency/index.vue index 9ffca20..6554e55 100644 --- a/src/views/energyEfficiency/index.vue +++ b/src/views/energyEfficiency/index.vue @@ -275,7 +275,7 @@ export default { // this.init() }, mounted() { - this.getAi() + // this.getAi() if(this.$route.query.type == 2) { this.handleSelect('2') } else { @@ -283,30 +283,30 @@ export default { } }, methods: { - //获取到ai - async getAi() { - const params = sessionStorage.getItem('saikey') - const res = await getAi({ai: params}) - if(res.code == 0 && !res.data) { - return - } - this.ai = res.data - // Dialog.confirm({ - // title: '标题', - // message: `${res.data}`, - //}).then(() => { - // var cInput = document.createElement("input"); - // cInput.value = res.data; - // document.body.appendChild(cInput); - // cInput.select(); // 选取文本框内容 - // // 执行浏览器复制命令 - // // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签) - // // Input要在正常的编辑状态下原生复制方法才会生效 - // document.execCommand("copy"); - // document.body.removeChild(cInput); - // // on confirm - //}) - }, + // //获取到ai + // async getAi() { + // const params = sessionStorage.getItem('saikey') + // const res = await getAi({ai: params}) + // if(res.code == 0 && !res.data) { + // return + // } + // this.ai = res.data + // // Dialog.confirm({ + // // title: '标题', + // // message: `${res.data}`, + // //}).then(() => { + // // var cInput = document.createElement("input"); + // // cInput.value = res.data; + // // document.body.appendChild(cInput); + // // cInput.select(); // 选取文本框内容 + // // // 执行浏览器复制命令 + // // // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签) + // // // Input要在正常的编辑状态下原生复制方法才会生效 + // // document.execCommand("copy"); + // // document.body.removeChild(cInput); + // // // on confirm + // //}) + // }, // 搜索 async searchEveryItem() { if (!this.searchValue) { diff --git a/src/views/enterprise/useEle.vue b/src/views/enterprise/useEle.vue deleted file mode 100644 index 78581dd..0000000 --- a/src/views/enterprise/useEle.vue +++ /dev/null @@ -1,237 +0,0 @@ - - - - - diff --git a/src/views/facilityManage/bursting/burstingDetail.vue b/src/views/facilityManage/bursting/burstingDetail.vue index 581dfae..27e36f2 100644 --- a/src/views/facilityManage/bursting/burstingDetail.vue +++ b/src/views/facilityManage/bursting/burstingDetail.vue @@ -1,9 +1,9 @@