From e5a0527861ab86d7565dd1e402d313c9b4c46667 Mon Sep 17 00:00:00 2001 From: zx Date: Tue, 28 Apr 2026 15:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8C=E6=9C=9F=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E4=BB=A5=E5=8F=8A=E7=BB=BC=E5=90=88=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/home.js | 2 + api/uniqueCode.js | 2 +- pages.json | 36 +- pages/components/EquipmentInfo.vue | 91 ++-- pages/components/ProjectOverView.vue | 2 +- pages/intelligent/index.vue | 9 +- .../carbonFootprint/wasteCarbonFootprint.vue | 3 + .../carbonFootprint/wasteCloudControl.vue | 3 + .../integratedModeAssessment/results.vue | 508 ++++++++++++++++++ .../valueEvaluation.vue | 295 ++++++++++ .../activationRecovery.vue | 3 + .../conditionAssessment.vue | 3 + .../leadBatterySmartRepair/index.vue | 3 + pages/until.js | 8 + pages/utils/ws.js | 3 +- pages/warehousing/InventoryInfo/alert.vue | 3 + .../InventoryInfo/checkUniqueCode.vue | 3 + pages/warehousing/index.vue | 82 +++ static/recycling/carbonFootprint.png | Bin 0 -> 6031 bytes static/recycling/integratedModeAssessment.png | Bin 0 -> 3410 bytes static/recycling/leadBatteryCascadeUse.png | Bin 0 -> 5814 bytes static/recycling/leadBatterySmartRepair.png | Bin 0 -> 8244 bytes static/recycling/wasteCloudControlSystem.png | Bin 0 -> 9291 bytes 23 files changed, 1013 insertions(+), 46 deletions(-) create mode 100644 pages/recycling/carbonFootprint/wasteCarbonFootprint.vue create mode 100644 pages/recycling/carbonFootprint/wasteCloudControl.vue create mode 100644 pages/recycling/integratedModeAssessment/results.vue create mode 100644 pages/recycling/integratedModeAssessment/valueEvaluation.vue create mode 100644 pages/recycling/leadBatteryCascadeUse/activationRecovery.vue create mode 100644 pages/recycling/leadBatteryCascadeUse/conditionAssessment.vue create mode 100644 pages/recycling/leadBatterySmartRepair/index.vue create mode 100644 static/recycling/carbonFootprint.png create mode 100644 static/recycling/integratedModeAssessment.png create mode 100644 static/recycling/leadBatteryCascadeUse.png create mode 100644 static/recycling/leadBatterySmartRepair.png create mode 100644 static/recycling/wasteCloudControlSystem.png diff --git a/api/home.js b/api/home.js index ffcfdce..7353cdf 100644 --- a/api/home.js +++ b/api/home.js @@ -18,6 +18,8 @@ const listMqttEvent = (params) => { }; // 智能排风远程开关 const controlSocket = (data) => { + console.log(data,'controlSocket==>'); + const payload = { devEui: data.devEui, deviceId: data.deviceId, diff --git a/api/uniqueCode.js b/api/uniqueCode.js index 3a7d498..b855061 100644 --- a/api/uniqueCode.js +++ b/api/uniqueCode.js @@ -24,7 +24,7 @@ const delUniqueCode = (params) => { const detailUniqueCode = (params) => { return request(`/unique/code/${params.id}`, params, 'GET'); }; -// 详情:通过唯一码获取物料信息 +// 扫码:通过唯一码获取物料信息 const getMaterialUnique = (params) => { return request(`/unique/code/materialInfo/${params.code}`, params, 'GET'); }; diff --git a/pages.json b/pages.json index a545814..d84e89e 100644 --- a/pages.json +++ b/pages.json @@ -26,13 +26,47 @@ }, { "path": "pages/intelligent/index", - "style": { "navigationBarTitleText": "智能" } + "style": { "navigationBarTitleText": "智能", "navigationStyle": "custom" } }, { "path": "pages/my/index", "style": { "navigationBarTitleText": "我的" } }, + // 综合模式评估 recycling + { + "path": "pages/recycling/integratedModeAssessment/valueEvaluation", + "style": { "navigationBarTitleText": "危险废弃物回收多元价值评估" } + }, + { + "path": "pages/recycling/integratedModeAssessment/results", + "style": { "navigationBarTitleText": "危险废弃物回收多元价值评估结果" } + }, + // 智能处置 + { + "path": "pages/recycling/leadBatteryCascadeUse/conditionAssessment", + "style": { "navigationBarTitleText": "状态评估" } + }, + { + "path": "pages/recycling/leadBatteryCascadeUse/activationRecovery", + "style": { "navigationBarTitleText": "活化恢复" } + }, + // 废物云控体系 + { + "path": "pages/recycling/carbonFootprint/wasteCloudControl", + "style": { "navigationBarTitleText": "废物云控体系" } + }, + // 危废碳足迹 + { + "path": "pages/recycling/carbonFootprint/wasteCarbonFootprint", + "style": { "navigationBarTitleText": "危废碳足迹" } + }, + // 铅蓄智修样机 + { + "path": "pages/recycling/leadBatterySmartRepair/index", + "style": { "navigationBarTitleText": "铅蓄智修样机" } + }, + { "path": "pages/warehousing/uniqueCode/issueUniqueCode/index", "style": { diff --git a/pages/components/EquipmentInfo.vue b/pages/components/EquipmentInfo.vue index a4be363..81861d3 100644 --- a/pages/components/EquipmentInfo.vue +++ b/pages/components/EquipmentInfo.vue @@ -43,12 +43,9 @@ + @change="(e) => handleSocketControl1(item, e)" /> - + @@ -56,19 +53,20 @@ - {{ item.summary }}| + {{ item.summary }} + | {{ item.onlineText }} - + @@ -235,31 +233,47 @@ function patchRealtimeState(prev, next) { if (socket != null) res.switchStatus = res.socket_status = res.socketStatus = socket return res } - -async function handleSocketControl(e, item) { - console.log(e, item, '111'); - const action = e ? 'on' : 'off' - console.log(action, '111'); - if (action) { - const deviceId = item.id || item.deviceId - const devEui = item.devEui || item.devEUI || item.dev_eui - console.log('devEui', devEui); - - if (!devEui) return uni.showToast({ title: '未找到设备', icon: 'none' }) - const k = item.cardKey || String(deviceId) - if (controlLoadingMap[k]) return - controlLoadingMap[k] = true - try { - const status = action === 'on' ? 1 : 0 - console.log(status, action, 'status'); - - await controlSocket({ devEui, deviceId, status }) - syncSocketLocalState(item, status) - uni.showToast({ title: '指令已发送', icon: 'success' }) - } finally { - controlLoadingMap[k] = false - } +async function handleSocketControl(item, action) { + console.log(action, controlLoadingMap, 'action111'); + console.log(item, 'item111'); + const deviceId = item.id || item.deviceId + const devEui = item.devEui || item.devEUI || item.dev_eui + if (!devEui) return uni.showToast({ title: '未找到设备', icon: 'none' }) + const k = item.cardKey || String(deviceId) + console.log('devEui1', controlLoadingMap, k, controlLoadingMap[k]); + if (controlLoadingMap[k]) return + controlLoadingMap[k] = true + try { + const status = action === 'on' ? 1 : 0 + await controlSocket({ devEui, deviceId, status }) + syncSocketLocalState(item, status) + uni.showToast({ title: '指令已发送', icon: 'success' }) + } finally { + controlLoadingMap[k] = false } +} +async function handleSocketControl1(item, e) { + const action = e ? 'on' : 'off' + console.log(action, controlLoadingMap, 'action11133'); + console.log(item, 'item11133'); + const deviceId = item.id || item.deviceId + const devEui = item.devEui || item.devEUI || item.dev_eui + if (!devEui) return uni.showToast({ title: '未找到设备', icon: 'none' }) + const k = item.cardKey || String(deviceId) + console.log('devEui', controlLoadingMap, k, controlLoadingMap[k]); + if (controlLoadingMap[k]) return + console.log('controlLoadingMap[k]', controlLoadingMap[k]); + controlLoadingMap[k] = true + try { + const status = action === 'on' ? 1 : 0 + console.log(status, action, 'status===>'); + await controlSocket({ devEui, deviceId, status }) + syncSocketLocalState(item, status) + uni.showToast({ title: '指令已发送', icon: 'success' }) + } finally { + controlLoadingMap[k] = false + } + } @@ -709,10 +723,15 @@ onBeforeUnmount(() => { } .location { - font-size: 16px; + font-size: 14px; color: #666; } +.text { + font-size: 14px; + +} + .type-name { font-size: 16px; font-weight: 600; @@ -732,7 +751,7 @@ onBeforeUnmount(() => { display: flex; justify-content: space-between; gap: 16rpx; - margin-top: 10px; + margin-top: 20rpx; } .switch-actions { @@ -833,7 +852,7 @@ onBeforeUnmount(() => { .summary-card { - padding: 18px 20px; + padding: 36rpx 40rpx; border-radius: 18px; position: relative; overflow: hidden; @@ -844,7 +863,7 @@ onBeforeUnmount(() => { font-size: 13px; font-weight: 500; color: #334155; - margin-bottom: 6px; + margin-bottom: 12rpx; } .value { diff --git a/pages/components/ProjectOverView.vue b/pages/components/ProjectOverView.vue index 49c4a36..3b3e2c7 100644 --- a/pages/components/ProjectOverView.vue +++ b/pages/components/ProjectOverView.vue @@ -23,7 +23,6 @@ getMyWarehouseList()