From 59954beeca69e537442cc155f51df9702c913567 Mon Sep 17 00:00:00 2001 From: huangjp Date: Fri, 10 Oct 2025 09:27:34 +0800 Subject: [PATCH] =?UTF-8?q?207=E7=89=88=E6=9C=AC=EF=BC=9Acanvas=E7=94=B5?= =?UTF-8?q?=E6=B5=81=E6=B5=81=E5=90=91=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B5=B7?= =?UTF-8?q?=E5=A4=96=E8=87=AA=E5=AE=9A=E4=B9=89=E7=94=B5=E4=BB=B7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.api.js | 3 + common/locales/homePage/en.js | 5 +- common/locales/homePage/zh.js | 3 +- components/new-canvas/index.vue | 73 +- components/station-dropdow/index.vue | 2 +- locales/homePage/en.js | 2 + locales/homePage/zh.js | 3 + manifest.json | 63 +- .../device-detail/components/pack.vue | 4 +- pages/home-page/policy-management/index.vue | 4 +- pages/tabbar/components/topology/second.vue | 390 ++++++++- pages/tabbar/components/topology/standard.vue | 245 +++++- pages/tabbar/components/topology/third.vue | 776 ++++++++++++++---- pages/tabbar/dashboard.vue | 8 +- pages/tabbar/electricityPrice.vue | 284 ++++++- 15 files changed, 1567 insertions(+), 298 deletions(-) diff --git a/common/http.api.js b/common/http.api.js index 0e95070..a1a6122 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -462,6 +462,9 @@ const install = (Vue, vm) => { // 查询区域 GetIndustrialElecRegionList: (params = {}) => vm.$u.post(config.adminPath + "/business/industrialElecRegion/list", params), + /** 查询自定义电价*/ + GetCustomElecPricePage: (params = {}) => vm.$u.post(config.adminPath + + "/business/elecPriceCurve/all", params), /** 查询所有代理电价-分页*/ GetIndustrialElecPricePage: (params = {}) => vm.$u.post(config.adminPath + "/business/industrialElecPrice/page", params), diff --git a/common/locales/homePage/en.js b/common/locales/homePage/en.js index 5c26786..a51afad 100644 --- a/common/locales/homePage/en.js +++ b/common/locales/homePage/en.js @@ -30,6 +30,7 @@ export default { name:'China Station' },{ name:'Overseas Station' - }] - }, + }], + useElecPrice: 'Electricity prices' + } } \ No newline at end of file diff --git a/common/locales/homePage/zh.js b/common/locales/homePage/zh.js index 293abd0..44d6feb 100644 --- a/common/locales/homePage/zh.js +++ b/common/locales/homePage/zh.js @@ -30,6 +30,7 @@ export default { name:'中国站' },{ name:'海外站' - }] + }], + useElecPrice:'用电价格' } }; \ No newline at end of file diff --git a/components/new-canvas/index.vue b/components/new-canvas/index.vue index 708b0bc..197f040 100644 --- a/components/new-canvas/index.vue +++ b/components/new-canvas/index.vue @@ -64,14 +64,10 @@ methods: { getSystemInfo() { const self = this - // 获取屏幕尺寸 - uni.getSystemInfo({ - success: (res) => { - this.windowWidth = res.windowWidth - }, - }) uni.getSystemInfo({ success: function(res) { + // 获取屏幕尺寸 + self.windowWidth = res.windowWidth // const platform = res.hostName.toLowerCase() if (res.uniPlatform || res.uniPlatform === 'app') { self.type = 'app' @@ -87,20 +83,25 @@ }) }, clear() { + // if (this.type === 'wx') { + // this.ctx.globalCompositeOperation = 'destination-out'; + // this.ctx.beginPath(); + // this.ctx.fillStyle = 'red'; + // this.ctx.fillRect(0, 0, 8000, 80000); + // this.ctx.fill(); + // this.ctx.globalCompositeOperation = 'source-over'; + // // this.ctx.draw(); + // } else { + // // this.ctx.clearRect(2000, 2000, 2000, 2000); + // // this.ctx.fillStyle = '#ffffff' + // // this.ctx.draw(true); + // } if (this.type === 'wx') { - this.ctx.globalCompositeOperation = 'destination-out'; - this.ctx.beginPath(); - this.ctx.fillStyle = 'red'; - this.ctx.fillRect(0, 0, 8000, 80000); - this.ctx.fill(); - this.ctx.globalCompositeOperation = 'source-over'; - // this.ctx.draw(); + this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight); } else { - // this.ctx.clearRect(2000, 2000, 2000, 2000); - // this.ctx.fillStyle = '#ffffff' - // this.ctx.draw(true); + // App 平台 + this.ctx.clearRect(0, 0, 8000, 8000); } - }, //获取app的canvas DOM getAppDom() { @@ -216,22 +217,22 @@ }, countChineseAndEnglishCharacters(str, x) { - var chineseCount = str.match(/[\u4e00-\u9fa5]/g) - ? str.match(/[\u4e00-\u9fa5]/g).length - : 0; - var englishCount = str.match(/[a-zA-Z]/g) - ? str.match(/[a-zA-Z]/g).length - : 0; - var otherCount = str.length - chineseCount - englishCount; - const obj = { - otherCount: otherCount, - chineseCount: chineseCount, - englishCount: englishCount, - }; - return ( - obj.englishCount * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x - ); - }, + var chineseCount = str.match(/[\u4e00-\u9fa5]/g) ? + str.match(/[\u4e00-\u9fa5]/g).length : + 0; + var englishCount = str.match(/[a-zA-Z]/g) ? + str.match(/[a-zA-Z]/g).length : + 0; + var otherCount = str.length - chineseCount - englishCount; + const obj = { + otherCount: otherCount, + chineseCount: chineseCount, + englishCount: englishCount, + }; + return ( + obj.englishCount * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x + ); + }, drawText(draw) { draw.forEach((item, index) => { @@ -244,8 +245,10 @@ this.ctx.fontSize = item2.size } this.ctx.fillStyle = item2.color - const x = this.countChineseAndEnglishCharacters(item.font[0].text,item.coord[0][0]) - this.ctx.fillText(item2.text, this.fitSize( index2 === 1 ? x : item.coord[0][0]), this.fitSize(item.coord[0][1])) + const x = this.countChineseAndEnglishCharacters(item.font[0].text, item + .coord[0][0]) + this.ctx.fillText(item2.text, this.fitSize(index2 === 1 ? x : item.coord[0] + [0]), this.fitSize(item.coord[0][1])) this.ctx.closePath() }) } else { diff --git a/components/station-dropdow/index.vue b/components/station-dropdow/index.vue index 1ff7520..a9ba1ce 100644 --- a/components/station-dropdow/index.vue +++ b/components/station-dropdow/index.vue @@ -11,7 +11,7 @@ export default { data () { return { - stationName: '所有电站', + stationName: '', selectStaion: false, StationShow: [], defaultArr: [], diff --git a/locales/homePage/en.js b/locales/homePage/en.js index d9e2317..d35a81b 100644 --- a/locales/homePage/en.js +++ b/locales/homePage/en.js @@ -83,6 +83,7 @@ export default { elePriceQuery: 'Electricity Price Query', queryCriteria: 'Query criteria', sift: 'sift', + station: 'Station', provinceRegion: 'Province Region', selectProvinceRegion: 'Please select province region', customerType: 'Electricity Customer', @@ -96,6 +97,7 @@ export default { noData: 'No Data', eleLevel: 'Electricity Price Level', fsdd: 'The price of time-of-use electricity', + useElecPrice: 'Electricity prices', dietailUnit: '(RMB/kWh)', eleprice: 'The price of electricity and electricity', nonTime: 'Non-time-of-use Electricity Price', diff --git a/locales/homePage/zh.js b/locales/homePage/zh.js index c1ff449..d20ca82 100644 --- a/locales/homePage/zh.js +++ b/locales/homePage/zh.js @@ -83,6 +83,8 @@ export default { elePriceQuery: '电价查询', queryCriteria: '查询条件', sift: '筛选', + station: '电站', + selectStation: '请选择电站', provinceRegion: '省市区域', selectProvinceRegion: '请选择省市区域', customerType: '用电客户', @@ -96,6 +98,7 @@ export default { noData: '数据为空', eleLevel: '电价水平', fsdd: '分时电度用电价格', + useElecPrice:'用电价格', dietailUnit: '(元/千瓦时)', eleprice: '电度用电价格', nonTime: '非分时电价', diff --git a/manifest.json b/manifest.json index 53c4cb7..72308b6 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "StoraSmart", "appid" : "__UNI__86592F3", "description" : "Zetatech", - "versionName" : "2.0.0", - "versionCode" : 205, + "versionName" : "2.0.2", + "versionCode" : 207, "transformPx" : false, "app-plus" : { "compatible" : { @@ -15,6 +15,7 @@ }, "safearea" : { "bottom" : { + "bottom" : "auto", "offset" : "none" } }, @@ -55,33 +56,33 @@ }, "icons" : { "android" : { - "hdpi" : "C:/Users/46254/Desktop/mipmap-hdpi/72x72.png", - "xhdpi" : "C:/Users/46254/Desktop/mipmap-xhdpi/96x96.png", - "xxhdpi" : "C:/Users/46254/Desktop/mipmap-xxhdpi/144x144.png", - "xxxhdpi" : "C:/Users/46254/Desktop/mipmap-xxxhdpi/1024x1024.png" + "hdpi" : "D:/zhuomian/mipmap-hdpi/72x72.png", + "xhdpi" : "D:/zhuomian/mipmap-xhdpi/96x96.png", + "xxhdpi" : "D:/zhuomian/mipmap-xxhdpi/144x144.png", + "xxxhdpi" : "D:/zhuomian/mipmap-xxxhdpi/1024x1024.png" }, "ios" : { - "appstore" : "C:/Users/46254/Desktop/1/1024x1024.png", + "appstore" : "D:/zhuomian/1/1024x1024.png", "ipad" : { - "app" : "C:/Users/46254/Desktop/申请邓白氏编码资料表/mipmap-mdpi/76x76.png", - "app@2x" : "C:/Users/46254/Desktop/申请邓白氏编码资料表/mipmap-xhdpi/152x152.png", - "notification" : "C:/Users/46254/Desktop/mipmap-mdpi/20x20.png", - "notification@2x" : "C:/Users/46254/Desktop/mipmap-mdpi/40x40.png", - "proapp@2x" : "C:/Users/46254/Desktop/申请邓白氏编码资料表/mipmap-xhdpi/167x167.png", - "settings" : "C:/Users/46254/Desktop/mipmap-mdpi/29x29.png", - "settings@2x" : "C:/Users/46254/Desktop/mipmap-xhdpi/58x58.png", - "spotlight" : "C:/Users/46254/Desktop/mipmap-mdpi/40x40.png", - "spotlight@2x" : "C:/Users/46254/Desktop/mipmap-xxxhdpi/80x80.png" + "app" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-mdpi/76x76.png", + "app@2x" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-xhdpi/152x152.png", + "notification" : "D:/zhuomian/mipmap-mdpi/20x20.png", + "notification@2x" : "D:/zhuomian/mipmap-mdpi/40x40.png", + "proapp@2x" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-xhdpi/167x167.png", + "settings" : "D:/zhuomian/mipmap-mdpi/29x29.png", + "settings@2x" : "D:/zhuomian/mipmap-xhdpi/58x58.png", + "spotlight" : "D:/zhuomian/mipmap-mdpi/40x40.png", + "spotlight@2x" : "D:/zhuomian/mipmap-xxxhdpi/80x80.png" }, "iphone" : { - "app@2x" : "C:/Users/46254/Desktop/mipmap-xhdpi/120x120.png", - "app@3x" : "C:/Users/46254/Desktop/mipmap-xxhdpi/180x180.png", - "notification@2x" : "C:/Users/46254/Desktop/mipmap-xhdpi/40x40.png", - "notification@3x" : "C:/Users/46254/Desktop/mipmap-xxhdpi/60x60.png", - "settings@2x" : "C:/Users/46254/Desktop/mipmap-xhdpi/58x58.png", - "settings@3x" : "C:/Users/46254/Desktop/mipmap-xxhdpi/87x87.png", - "spotlight@2x" : "C:/Users/46254/Desktop/mipmap-xxxhdpi/80x80.png", - "spotlight@3x" : "C:/Users/46254/Desktop/mipmap-xhdpi/120x120.png" + "app@2x" : "D:/zhuomian/mipmap-xhdpi/120x120.png", + "app@3x" : "D:/zhuomian/mipmap-xxhdpi/180x180.png", + "notification@2x" : "D:/zhuomian/mipmap-xhdpi/40x40.png", + "notification@3x" : "D:/zhuomian/mipmap-xxhdpi/60x60.png", + "settings@2x" : "D:/zhuomian/mipmap-xhdpi/58x58.png", + "settings@3x" : "D:/zhuomian/mipmap-xxhdpi/87x87.png", + "spotlight@2x" : "D:/zhuomian/mipmap-xxxhdpi/80x80.png", + "spotlight@3x" : "D:/zhuomian/mipmap-xhdpi/120x120.png" } } }, @@ -89,9 +90,9 @@ "androidStyle" : "default", "androidTranslucent" : true, "android" : { - "hdpi" : "C:/Users/46254/Desktop/3.png", - "xhdpi" : "C:/Users/46254/Desktop/2.png", - "xxhdpi" : "C:/Users/46254/Desktop/1.png" + "hdpi" : "D:/zhuomian/3.png", + "xhdpi" : "D:/zhuomian/2.png", + "xxhdpi" : "D:/zhuomian/1.png" }, "iosStyle" : "common", "ios" : { @@ -145,7 +146,13 @@ "enable" : false } }, - "title" : "uView UI" + "title" : "uView UI", + "devServer" : { + "host" : "0.0.0.0", + "port" : 8080, + "useLocalIp" : true, + "disableHostCheck" : true + } }, "locale" : "en" } diff --git a/pages/home-page/device-detail/components/pack.vue b/pages/home-page/device-detail/components/pack.vue index 17eadd4..e5f66fe 100644 --- a/pages/home-page/device-detail/components/pack.vue +++ b/pages/home-page/device-detail/components/pack.vue @@ -190,10 +190,10 @@ .then((res) => { self.panelData = res.data?.packData self.initVolChart(res.data?.voltageList); - this.VolNumber = res.data.voltageList.length ? this.VolNumber + `(${res.data.voltageList.length})` : '单体电压柱状图' + this.VolNumber = res.data.voltageList.length ? this.VolNumber + `(${res.data.voltageList.length})` : this.VolNumber self.initTemChart(res.data?.temperatureList) - this.TemNumber = res.data.temperatureList.length ? this.TemNumber + `(${res.data.temperatureList.length})` : '单体温度柱状图' + this.TemNumber = res.data.temperatureList.length ? this.TemNumber + `(${res.data.temperatureList.length})` : this.TemNumber resolve(res); }) .finally((err) => { diff --git a/pages/home-page/policy-management/index.vue b/pages/home-page/policy-management/index.vue index 38c9d1a..e6a1a77 100644 --- a/pages/home-page/policy-management/index.vue +++ b/pages/home-page/policy-management/index.vue @@ -23,9 +23,9 @@ - - - +