From 1d73755a438c9b8143fbcf6522d37c68b5bbcb00 Mon Sep 17 00:00:00 2001 From: guanj Date: Mon, 29 Jun 2026 11:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 1 + common/api/feedback.js | 1 + common/js/config.js | 1 + common/js/mqtt.js | 5 +- common/js/request.js | 5 +- common/js/update.js | 4 +- common/js/util.js | 30 - components/Cn-qianTree/Cn-qianTree.vue | 2 +- .../components/hover-menu/hover-menu.vue | 423 ++++---- manifest.json | 3 +- pages.json | 13 +- pages/device/APF/comp/IO.vue | 299 +++--- pages/device/APF/comp/basic.vue | 450 +++++---- pages/device/APF/comp/oscillogram.vue | 236 ++--- pages/device/APF/comp/power.vue | 374 +++++--- pages/device/APF/comp/xieBo.vue | 45 +- pages/device/APF/detail.vue | 13 +- pages/device/DVR/detail.vue | 4 +- pages/device/edit.vue | 2 +- pages/device/list.vue | 2 +- pages/device/new.vue | 4 +- pages/device/realTime/index.vue | 53 +- pages/engineering/list.vue | 43 +- pages/engineering/new.vue | 364 +++---- pages/engineering/setting.vue | 12 +- pages/gateway/new.vue | 436 ++++----- pages/gateway/newDevice.vue | 804 ++++++++-------- pages/home/feedback.vue | 9 +- pages/index/comp/apply.vue | 4 +- pages/index/comp/device.vue | 2 +- pages/index/comp/monitoringPoint.vue | 49 +- pages/index/comp/steadyState.vue | 5 +- pages/index/comp/targetInfo.vue | 33 +- pages/index/comp/transient.vue | 5 +- pages/index/index.vue | 4 +- pages/index/message1.vue | 1 + pages/index/mine.vue | 6 +- pages/message/feedbackDetail.vue | 34 +- pages/message1/alarm.vue | 2 +- pages/message1/comp/steadyStateDetails.vue | 2 +- pages/message1/comp/transientDetails.vue | 46 +- pages/message1/run.vue | 2 +- pages/message1/steadyState.vue | 2 +- pages/message1/transient.vue | 14 +- pages/mine/feedback.vue | 168 ++-- pages/mine/setup.vue | 2 +- pages/mine/setupMessage.vue | 42 +- pages/mine/transientSetting.vue | 129 --- pages/mine/userDetail.vue | 154 +-- pages/project/new.vue | 908 +++++++++--------- pages/user/changeName.vue | 2 +- pages/user/forget.vue | 36 +- pages/user/register.vue | 50 +- .../uni-file-picker/choose-and-upload-file.js | 2 +- .../uni-file-picker/uni-file-picker.vue | 17 +- .../components/uni-file-picker/utils.js | 218 ++--- 56 files changed, 2875 insertions(+), 2702 deletions(-) delete mode 100644 pages/mine/transientSetting.vue diff --git a/App.vue b/App.vue index 44e7001..2116817 100644 --- a/App.vue +++ b/App.vue @@ -72,4 +72,5 @@ export default { // .uni-page-refresh__icon { // fill: #007aff !important; /* 改成你想要的颜色,比如红色 #ff0000 */ // } + diff --git a/common/api/feedback.js b/common/api/feedback.js index 74b8ad6..e90ade0 100644 --- a/common/api/feedback.js +++ b/common/api/feedback.js @@ -11,6 +11,7 @@ export function addFeedBack(params) { console.log(files.length); let data = JSON.parse(JSON.stringify(params)); delete data.files + console.log("🚀 ~ addFeedBack ~ files.length:", files.length) if (files.length) { return uni.uploadFile({ url: config.domain + '/cs-system-boot/feedback/addFeedBack', //仅为示例,非真实的接口地址 diff --git a/common/js/config.js b/common/js/config.js index ad3033a..d028cad 100644 --- a/common/js/config.js +++ b/common/js/config.js @@ -2,6 +2,7 @@ const debug = true // true 是连地服务端本地,false 是连接线上 const development = { domain: 'http://192.168.1.103:10215', + // domain: 'http://192.168.1.102:27707/api', } const production = { diff --git a/common/js/mqtt.js b/common/js/mqtt.js index c736771..659692c 100644 --- a/common/js/mqtt.js +++ b/common/js/mqtt.js @@ -1,5 +1,6 @@ -// export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt -export const MQTT_IP = '192.168.1.103:38083/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt +export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt +// export const MQTT_IP = '192.168.1.103:38083/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt +// export const MQTT_IP = '192.168.1.103:38083/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt const MQTT_USERNAME = 't_user'//mqtt用户名 const MQTT_PASSWORD = 'njcnpqs'//密码 diff --git a/common/js/request.js b/common/js/request.js index 286df41..932f255 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -83,7 +83,10 @@ function errHandler(res) { break default: uni.showToast({ - title: res.message || res.msg || '网络异常,请稍后再试', + title: + res.message.substring(res.message.indexOf(',') + 1) || + res.msg.substring(msg.indexOf(',') + 1) || + '网络异常,请稍后再试', duration: 2000, icon: 'none', }) diff --git a/common/js/update.js b/common/js/update.js index 01cfe1e..1d81cef 100644 --- a/common/js/update.js +++ b/common/js/update.js @@ -34,7 +34,7 @@ const isCustomDebugBase = (appName = '') => { export const checkAppUpdate = () => { // #ifndef APP-PLUS - return + // return // #endif // 开发环境跳过检查 @@ -225,7 +225,7 @@ const downloadAndInstallApk = (url) => { const percent = ((task.downloadedSize / task.totalSize) * 100).toFixed(0) console.log('🚀 ~ downloadAndInstallApk ~ percent:', percent) // 直接更新 waiting 的标题,不会闪烁 - progressWaiting.setTitle(`正在下载更新 ${percent}%`) + progressWaiting.setTitle(`正在下载更新...`) } }) diff --git a/common/js/util.js b/common/js/util.js index 33c1f79..f617d4c 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -183,35 +183,6 @@ const validatePhoneNumber = (phone) => { return testReg.test(phone) } -const getUserLocation = (call) => { - uni.getLocation({ - type: 'wgs84', - success: function (address) { - call(address) - }, - fail: (err) => { - uni.showModal({ - title: '提示', - content: '定位失败,请打开定位权限', - success: function (res) { - if (res.confirm) { - uni.openSetting({ - success: (resSett) => { - if (resSett.authSetting['scope.userLocation']) { - uni.getLocation({ - success: (address) => { - call && call(address) - }, - }) - } - }, - }) - } - }, - }) - }, - }) -} // 加载用户配置 var globalConfigIsLoading = false, @@ -349,7 +320,6 @@ export default { formatTime, parseTime, h5Helper, - getUserLocation, loadConfig, prePage, loginSuccess, diff --git a/components/Cn-qianTree/Cn-qianTree.vue b/components/Cn-qianTree/Cn-qianTree.vue index 12974b1..2c28da2 100644 --- a/components/Cn-qianTree/Cn-qianTree.vue +++ b/components/Cn-qianTree/Cn-qianTree.vue @@ -12,7 +12,7 @@ :style="{ color: confirmColor }" hover-class="hover-c" @tap="_confirm" - >确定完成 diff --git a/hover-menu/components/hover-menu/hover-menu.vue b/hover-menu/components/hover-menu/hover-menu.vue index 463e5dc..9132393 100644 --- a/hover-menu/components/hover-menu/hover-menu.vue +++ b/hover-menu/components/hover-menu/hover-menu.vue @@ -1,201 +1,222 @@ - - - - - + + + + + diff --git a/manifest.json b/manifest.json index c46f855..2cc9eff 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "灿能物联", "appid" : "__UNI__88BC25B", "description" : "", - "versionName" : "1.6.82", + "versionName" : "1.6.83", "versionCode" : 170, "transformPx" : false, "sassImplementationName" : "node-sass", @@ -143,6 +143,7 @@ "/api" : { "https" : true, // "target" : "https://pqmcn.com:8092/api", + // "target" : "http://192.168.1.102:27707/api", "target" : "http://192.168.1.103:10215", "changOrigin" : true, "pathRewrite" : { diff --git a/pages.json b/pages.json index dfffeab..9c3d5bc 100644 --- a/pages.json +++ b/pages.json @@ -125,7 +125,7 @@ { "path": "pages/index/comp/monitoringPoint", "style": { - "navigationBarTitleText": "监测点电能质量信息", + "navigationBarTitleText": "关键指标概览", "enablePullDownRefresh": true, "pullToRefresh": { "support":true, @@ -234,13 +234,13 @@ { "path": "pages/device/APF/about", "style": { - "navigationBarTitleText": "关于" + "navigationBarTitleText": "详情" } }, { "path": "pages/device/DVR/about", "style": { - "navigationBarTitleText": "关于" + "navigationBarTitleText": "详情" } }, { @@ -446,12 +446,7 @@ "navigationBarTitleText": "服务内容配置" } }, - { - "path": "pages/mine/transientSetting", - "style": { - "navigationBarTitleText": "暂态事件配置" - } - }, + { "path": "pages/user/erweima", "style": { diff --git a/pages/device/APF/comp/IO.vue b/pages/device/APF/comp/IO.vue index 665e7e1..82e94a1 100644 --- a/pages/device/APF/comp/IO.vue +++ b/pages/device/APF/comp/IO.vue @@ -1,86 +1,70 @@ - diff --git a/pages/device/APF/comp/oscillogram.vue b/pages/device/APF/comp/oscillogram.vue index 0f38c52..48e4337 100644 --- a/pages/device/APF/comp/oscillogram.vue +++ b/pages/device/APF/comp/oscillogram.vue @@ -1,119 +1,119 @@ - - - - - - \ No newline at end of file diff --git a/pages/device/APF/comp/power.vue b/pages/device/APF/comp/power.vue index 6e536fa..544c04b 100644 --- a/pages/device/APF/comp/power.vue +++ b/pages/device/APF/comp/power.vue @@ -1,64 +1,92 @@ - diff --git a/pages/device/APF/comp/xieBo.vue b/pages/device/APF/comp/xieBo.vue index 3412c4d..c9aae52 100644 --- a/pages/device/APF/comp/xieBo.vue +++ b/pages/device/APF/comp/xieBo.vue @@ -1,24 +1,14 @@ - + + + diff --git a/pages/engineering/setting.vue b/pages/engineering/setting.vue index 5ccb3aa..6a49b33 100644 --- a/pages/engineering/setting.vue +++ b/pages/engineering/setting.vue @@ -25,11 +25,8 @@ @@ -74,8 +71,9 @@ export default { init() { this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo) queryAllEnginner().then((res) => { - this.list = res.data - console.log(this.list) + this.list = (res.data || []).slice().sort((a, b) => + (a.engineerName || '').localeCompare(b.engineerName || '', 'zh', { sensitivity: 'accent' }), + ) this.selectList = res.data.filter((item) => item.isSelect === '1').map((item) => item.engineerId) console.log(this.selectList) this.loading = false diff --git a/pages/gateway/new.vue b/pages/gateway/new.vue index f12e3b4..cba1513 100644 --- a/pages/gateway/new.vue +++ b/pages/gateway/new.vue @@ -1,219 +1,219 @@ - - - \ No newline at end of file diff --git a/pages/gateway/newDevice.vue b/pages/gateway/newDevice.vue index 3844310..7143967 100644 --- a/pages/gateway/newDevice.vue +++ b/pages/gateway/newDevice.vue @@ -1,403 +1,403 @@ - - - \ No newline at end of file diff --git a/pages/home/feedback.vue b/pages/home/feedback.vue index 64fd767..09e9f34 100644 --- a/pages/home/feedback.vue +++ b/pages/home/feedback.vue @@ -8,10 +8,10 @@ --> - + - + @@ -23,9 +23,9 @@ 提交 - + @@ -83,6 +83,7 @@ export default { }) return } + console.log("🚀 ~ this.formData:", this.formData) addFeedBack(this.formData).then(res => { console.log(res) console.log(this.formData.files.length) diff --git a/pages/index/comp/apply.vue b/pages/index/comp/apply.vue index 8ff34f0..cd781b0 100644 --- a/pages/index/comp/apply.vue +++ b/pages/index/comp/apply.vue @@ -9,11 +9,11 @@ - + 已选择 {{ checkedTotal }} 条事件 申请报告 diff --git a/pages/index/comp/device.vue b/pages/index/comp/device.vue index a07d9e5..f04e8bc 100644 --- a/pages/index/comp/device.vue +++ b/pages/index/comp/device.vue @@ -4,7 +4,7 @@ - {{ diff --git a/pages/index/comp/monitoringPoint.vue b/pages/index/comp/monitoringPoint.vue index ed0de0b..7b259ea 100644 --- a/pages/index/comp/monitoringPoint.vue +++ b/pages/index/comp/monitoringPoint.vue @@ -63,7 +63,9 @@ {{ point.pointName }} - + + {{ point.runStatus == 1 ? '离线' : '在线' }} + 项目:{{ point.projectName }} @@ -82,7 +84,7 @@ {{ child.T - }} + }} @@ -397,16 +399,12 @@ export default { this.saveSelectedIndicators() this.closeIndicatorPopup() }, - // 跳转指标详情页;治理测点展示全部指标,普通测点展示未选中的指标 + // 跳转指标详情页,展示该监测点全部指标 onMoreIndicators(point) { uni.setStorageSync('monitorPointDetail', { ...point, engineeringName: this.engineeringName, - selectedIndicators: - point.lineType === 0 - ? [...GOVERNANCE_DEFAULT_INDICATORS] - : [...this.selectedIndicators], - showAllIndicators: point.lineType === 0, + showAllIndicators: true, }) uni.navigateTo({ url: '/pages/index/comp/targetInfo', @@ -424,14 +422,9 @@ export default { this.selectedIndicators.some((name) => this.matchIndicator(child.name, name)), ) }, - // 治理测点存在默认四项以外的指标时显示「更多指标」 + // 有指标数据时显示「更多指标」 shouldShowMoreBtn(point) { - if (point.lineType !== 0) return true - const children = point.children || [] - return children.some( - (child) => - !GOVERNANCE_DEFAULT_INDICATORS.some((name) => this.matchIndicator(child.name, name)), - ) + return (point.children || []).length > 0 }, // 将指标列表按每行两个分组 @@ -477,7 +470,7 @@ export default { align-items: center; justify-content: center; box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); - z-index: 99; + z-index: 1; } .card { @@ -691,7 +684,7 @@ export default { } .point-name { - flex: 1; + // flex: 1; min-width: 0; font-size: 30rpx; font-weight: 700; @@ -710,7 +703,7 @@ export default { .meta-row { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: 1fr; gap: 6rpx 12rpx; } @@ -867,4 +860,24 @@ export default { background: #376cf310; } } + +.event-tag { + font-size: 22rpx; + padding: 2rpx 10rpx; + border-radius: 8rpx; + margin-top: 5rpx; + margin-left: 10rpx; + // height: 38rpx; +} + +// 在线 +.zx-tag { + background-color: #10b98120; + color: #10b981; +} + +.lx-tag { + background-color: #ff3b3020; + color: #ff3b30; +} diff --git a/pages/index/comp/steadyState.vue b/pages/index/comp/steadyState.vue index f8a500a..9fa089e 100644 --- a/pages/index/comp/steadyState.vue +++ b/pages/index/comp/steadyState.vue @@ -384,6 +384,9 @@ export default { align-items: center; justify-content: center; box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); - z-index: 99; + z-index: 1; +} +/deep/ .segmented-control__text { + line-height: 60rpx !important; } diff --git a/pages/index/comp/targetInfo.vue b/pages/index/comp/targetInfo.vue index cd0b4b6..4f74981 100644 --- a/pages/index/comp/targetInfo.vue +++ b/pages/index/comp/targetInfo.vue @@ -56,7 +56,7 @@ - + @@ -77,24 +77,13 @@ export default { }, computed: { moreChildren() { - const children = this.pointInfo.children || [] - // 治理测点「更多指标」页展示全部 - if (this.pointInfo.lineType === 0 && this.pointInfo.showAllIndicators) { - return children - } - const selected = this.getSelectedIndicators() - return children.filter( - (child) => !selected.some((name) => this.matchIndicator(child.name, name)), - ) + return this.pointInfo.children || [] }, }, onLoad() { const point = uni.getStorageSync('monitorPointDetail') if (point) { - this.pointInfo = { - ...point, - selectedIndicators: this.getSelectedIndicatorsFromStorage(point.selectedIndicators), - } + this.pointInfo = { ...point } if (point.pointName) { uni.setNavigationBarTitle({ title: point.pointName }) } @@ -104,22 +93,6 @@ export default { uni.removeStorageSync('monitorPointDetail') }, methods: { - getSelectedIndicatorsFromStorage(fallback = []) { - const cached = uni.getStorageSync(this.$cacheKey.monitorSelectedIndicators) - if (Array.isArray(cached) && cached.length) { - return cached - } - return Array.isArray(fallback) ? fallback : [] - }, - getSelectedIndicators() { - return this.getSelectedIndicatorsFromStorage(this.pointInfo.selectedIndicators) - }, - matchIndicator(name, selected) { - if (!name || !selected) return false - const base = (name || '').replace(/\(.*\)/, '').trim() - const selectedBase = (selected || '').replace(/\(.*\)/, '').trim() - return base === selectedBase - }, hasTPhaseData(child) { return child.T !== undefined && child.T !== null && child.T !== '-' }, diff --git a/pages/index/comp/transient.vue b/pages/index/comp/transient.vue index b849063..a2a1939 100644 --- a/pages/index/comp/transient.vue +++ b/pages/index/comp/transient.vue @@ -416,6 +416,9 @@ export default { align-items: center; justify-content: center; box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); - z-index: 99; + z-index: 1; +} +/deep/ .segmented-control__text { + line-height: 60rpx !important; } diff --git a/pages/index/index.vue b/pages/index/index.vue index fb7b8f0..370ad16 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -363,7 +363,7 @@ export default { padding: 4rpx 20rpx; // margin-left: 20rpx; // margin-bottom: 20rpx; - line-height: 38rpx; + line-height: 40rpx; font-size: 24rpx; border-radius: 8rpx; background: #ebeaec; @@ -394,6 +394,6 @@ export default { align-items: center; justify-content: center; box-shadow: 0 4rpx 16rpx rgba(55, 108, 243, 0.35); - z-index: 99; + z-index: 1; } diff --git a/pages/index/message1.vue b/pages/index/message1.vue index ac014d6..20aa021 100644 --- a/pages/index/message1.vue +++ b/pages/index/message1.vue @@ -343,4 +343,5 @@ export default { // white-space: nowrap; line-height: 1; } + diff --git a/pages/index/mine.vue b/pages/index/mine.vue index 83af413..bed4a79 100644 --- a/pages/index/mine.vue +++ b/pages/index/mine.vue @@ -82,11 +82,7 @@ 关注工程配置 - + 设置 diff --git a/pages/message/feedbackDetail.vue b/pages/message/feedbackDetail.vue index cbd5e19..03aeaaa 100644 --- a/pages/message/feedbackDetail.vue +++ b/pages/message/feedbackDetail.vue @@ -6,34 +6,33 @@ {{ pageData.title }} {{ pageData.createTime }} {{ pageData.description }} - + 进度 - - - - - - - - + + + + v-for="(item, index) in pageData.csFeedbackChatPOList" :key="index" /> - - + + @@ -41,7 +40,7 @@ - \ No newline at end of file diff --git a/pages/mine/setup.vue b/pages/mine/setup.vue index 93e9c58..8fbce97 100644 --- a/pages/mine/setup.vue +++ b/pages/mine/setup.vue @@ -48,7 +48,7 @@ 版本信息 - 当前版本V{{ version }} + V{{ version }} diff --git a/pages/mine/setupMessage.vue b/pages/mine/setupMessage.vue index f159d2d..fa24804 100644 --- a/pages/mine/setupMessage.vue +++ b/pages/mine/setupMessage.vue @@ -1,41 +1,25 @@