From bd2eb4ce2abb247b63b53c269a0885709985af0f Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 13 May 2025 17:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E4=B8=8A=E4=BC=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- src/views/homePage/components/tableMain.vue | 387 ++++++++++++++++++-- src/views/msgAuth/index.vue | 66 +--- src/views/report/index.vue | 1 + 4 files changed, 363 insertions(+), 93 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 1ea4378..542e11c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,7 +8,7 @@ const service = axios.create({ // baseURL: '', // timeout: 5000 baseURL: "api", //把原来的项目地址,改成api,解决跨域问题 - timeout: 60000, + timeout: 600000, }); service.interceptors.request.use((config) => { diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index 56c89e6..dae20aa 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -22,6 +22,9 @@ 修改ICCID + + 日志设置 +
@@ -922,7 +925,105 @@ 确 定
- + + + + + + + {{ item.fileName }} + ({{ item.title }}{{ item.createTime }}) + + + + + + + {{ item.fileName }} + ({{ item.title }}{{ item.createTime }}) + + + + + + + {{ item.fileName }} + ({{ item.title }}{{ item.createTime }}) + + + + + + + {{ item.name }} + + + + + + + + 确 定 + + +
+
+
+

noSpecData

+ + +
+
+

mTime

+ + {{ logset.mTime / (60 * 60 * 24) }}天 + +
+
+ + 1天 + 2天 + 3天 + 4天 + +
+ +
@@ -1355,6 +1497,7 @@ export default { pull_files: "拉取文件", push_file: "推送文件", dl_file: "推送大文件", + yw_app_upd_ota: "App增量更新", }, taskdrawer: false, drawer: false, @@ -1471,7 +1614,42 @@ export default { ], }, upOptions: [], - + //增量升级apk + appVisible: false, + upgradationappform: { + oldVal: "", + patchVal: "", + upVal: "", + keyVal: "", + }, + keyOption: [ + { + name: "mpapp", + value: "mpapp", + }, + { + name: "mpmaster", + value: "mpmaster", + }, + ], + selectUpOldObj: {}, + selectUpPatchObj: {}, + selectUpObj: {}, + upgradationappRules: { + oldVal: [ + { required: true, message: "请选择升级文件", trigger: "change" }, + ], + patchVal: [ + { required: true, message: "请选择升级文件", trigger: "change" }, + ], + upVal: [ + { required: true, message: "请选择升级文件", trigger: "change" }, + ], + }, + upOldOptions: [], + upPatchOptions: [], + upUpOptions: [], + //升级ota upgradationVisibleOta: false, upgradationformOta: { upVal: "", @@ -1618,6 +1796,14 @@ export default { name: "/sdcard/com.xypower.mpapp/data/bc.json", desc: "电压电量配置", }, + { + name: "/sdcard/com.xypower.mpapp/data/schedules/1", + desc: "通道拍照时间表配置", + }, + { + name: "/sdcard/com.xypower.mpapp/data/schedules/2", + desc: "通道拍照时间表配置", + }, { name: "/sdcard/com.xypower.mpapp/data/channels/1.json", desc: "通道拍照配置", @@ -1658,12 +1844,20 @@ export default { name: "/sdcard/com.xypower.mpmaster/data/Master.json", desc: "运维配置文件", }, - ], - pullpathOption: [ { - name: "/sdcard/com.xypower.mpapp/data/App.json", - desc: "MpAPP全局配置", + name: "/sdcard/com.xypower.mpapp/data/App.db", + desc: "数据库app文件", + }, + { + name: "/sdcard/com.xypower.mpapp/data/stats", + desc: "统计数据stats文件", }, + ], + pullpathOption: [ + // { + // name: "/sdcard/com.xypower.mpapp/data/App.json", + // desc: "MpAPP全局配置", + // }, { name: "/sdcard/com.xypower.mpapp/data/recog.json", desc: "AI全局配置", @@ -1672,6 +1866,14 @@ export default { name: "/sdcard/com.xypower.mpapp/data/bc.json", desc: "电压电量配置", }, + { + name: "/sdcard/com.xypower.mpapp/data/schedules/1", + desc: "通道拍照时间表配置", + }, + { + name: "/sdcard/com.xypower.mpapp/data/schedules/2", + desc: "通道拍照时间表配置", + }, { name: "/sdcard/com.xypower.mpapp/data/channels/1.json", desc: "通道拍照配置", @@ -1712,6 +1914,14 @@ export default { name: "/sdcard/com.xypower.mpmaster/data/Master.json", desc: "运维配置文件", }, + { + name: "/sdcard/com.xypower.mpapp/data/App.db", + desc: "数据库app文件", + }, + { + name: "/sdcard/com.xypower.mpapp/data/stats", + desc: "统计数据stats文件", + }, ], checkedName: [], //上传文件base64 @@ -1809,8 +2019,22 @@ export default { ], //iccid弹窗 iccidVisible: false, + //日志设置 + logVisible: false, + logset: { + noSpecData: 0, + mTime: 345600, + }, }; }, + created() { + let logSetparam = JSON.parse(localStorage.getItem("logset")); + if (logSetparam !== null) { + this.logset = logSetparam; + } else { + this.logset = { noSpecData: 0, mTime: 345600 }; + } + }, mounted() { this.loadLocalStorage(); this.calculateHeight(this.showFlag); @@ -2309,7 +2533,7 @@ export default { if (logSetparam !== null) { console.log(logSetparam); } else { - logSetparam = { noSpecData: 0, mTime: 0 }; + logSetparam = { noSpecData: 0, mTime: 345600 }; } var params = { action: "yw_cmd_upload_i1_zip_log", @@ -2386,6 +2610,12 @@ export default { console.log("查看目录文件"); this.fileContentVisible = true; return; + case 17: + console.log("app增量更新"); + this.appVisible = true; + this.getUpgradeAppList(); + // this.getUpgradeList(); + return; } }, //下发短信 @@ -2547,20 +2777,11 @@ export default { upgradeListApi({ type: 0 }) .then((res) => { console.log(res); + console.log("aaaaaaaaaaaaaaaaaaaaaaa"); this.upOptions = res.data; }) .catch((err) => {}); }, - //获取Ota升级apkList - getUpgradeOtaList() { - upgradeListApi({ type: 1 }) - .then((res) => { - console.log(res); - this.upOptionsOta = res.data; - }) - .catch((err) => {}); - }, - selectChanged(val) { console.log(val); // 找到选中项的整个object对象 @@ -2569,15 +2790,6 @@ export default { }); console.log(this.selectUpObj); }, - selectChangedOta(val) { - console.log(val); - // 找到选中项的整个object对象 - this.selectUpObjOta = this.upOptionsOta.find((item) => { - return item["path"] === val; - }); - console.log(this.selectUpObj); - }, - //升级确定阿 handleupgradation() { this.$refs.upgradationRuleForm.validate((valid) => { @@ -2594,6 +2806,80 @@ export default { } }); }, + //获取升级增量升级apkList + getUpgradeAppList() { + upgradeListApi({ type: 0 }) + .then((res) => { + console.log(res); + + this.upOldOptions = res.data; + this.upPatchOptions = res.data; + this.upUpOptions = res.data; + }) + .catch((err) => {}); + }, + //old + selectoldChanged(val) { + console.log(val); + // 找到选中项的整个object对象 + this.selectUpOldObj = this.upOldOptions.find((item) => { + return item["path"] === val; + }); + console.log(this.selectUpOldObj); + }, + //pacth + selectPatchChanged(val) { + console.log(val); + // 找到选中项的整个object对象 + this.selectUpPatchObj = this.upPatchOptions.find((item) => { + return item["path"] === val; + }); + console.log(this.selectUpPatchObj); + }, + selectUpChanged(val) { + console.log(val); + // 找到选中项的整个object对象 + this.selectUpUpObj = this.upUpOptions.find((item) => { + return item["path"] === val; + }); + console.log(this.selectUpUpObj); + }, + handleupgradationApp() { + this.$refs.upgradationappRuleForm.validate((valid) => { + if (valid) { + var params = { + action: "yw_app_upd_ota", + oldurl: this.upgradationappform.oldVal, + appurl: this.upgradationappform.upVal, + otaurl: this.upgradationappform.patchVal, + md5: this.selectUpUpObj.md5, + key: this.upgradationappform.keyVal, + termIds: this.idArray, + }; + this.changeIssue(params); + this.appVisible = false; + } + }); + }, + //获取Ota升级apkList + getUpgradeOtaList() { + upgradeListApi({ type: 1 }) + .then((res) => { + console.log(res); + this.upOptionsOta = res.data; + }) + .catch((err) => {}); + }, + + selectChangedOta(val) { + console.log(val); + // 找到选中项的整个object对象 + this.selectUpObjOta = this.upOptionsOta.find((item) => { + return item["path"] === val; + }); + console.log(this.selectUpObj); + }, + //升级OTa确定阿 handleupgradationOta() { this.$refs.upgradationRuleFormOta.validate((valid) => { @@ -2806,7 +3092,14 @@ export default { } }); }, - + // 日志设置 + logSetClick() { + this.logVisible = true; + }, + saveLog() { + localStorage.setItem("logset", JSON.stringify(this.logset)); + this.logVisible = false; + }, saveLocalStorage() { localStorage.setItem("gycheck", this.gycheck); localStorage.setItem("dccheck", this.dccheck); @@ -3444,4 +3737,44 @@ export default { margin-right: 4px; } } +.logSetDialog { + .logSet { + // width: 300px; + // border: 1px solid #eee; + padding: 12px; + .logMain { + .top, + .bottom { + display: flex; + align-items: center; + h2 { + font-size: 14px; + font-weight: normal; + margin-right: 8px; + text-align: right; + width: 100px; + } + .el-input--small { + width: 296px; + } + .days { + margin-left: 12px; + } + } + .top { + margin-bottom: 20px; + } + .savebtn { + display: flex; + margin-top: 12px; + margin-left: auto; + } + } + .el-radio-group { + width: 100%; + margin-top: 20px; + text-align: center; + } + } +} diff --git a/src/views/msgAuth/index.vue b/src/views/msgAuth/index.vue index d570193..881c344 100644 --- a/src/views/msgAuth/index.vue +++ b/src/views/msgAuth/index.vue @@ -51,27 +51,6 @@ > -
-

日志设置

-
-
-

noSpecData

- - -
-
-

mTime

- - -
- 保存 -
-
@@ -202,32 +165,5 @@ export default { } } } - .logSet { - width: 300px; - border: 1px solid #eee; - padding: 12px; - .logMain { - .top, - .bottom { - display: flex; - align-items: center; - h2 { - font-size: 14px; - font-weight: normal; - margin-right: 8px; - text-align: right; - width: 100px; - } - } - .top { - margin-bottom: 20px; - } - .savebtn { - display: flex; - margin-top: 12px; - margin-left: auto; - } - } - } } diff --git a/src/views/report/index.vue b/src/views/report/index.vue index ce3dfb4..f89d150 100644 --- a/src/views/report/index.vue +++ b/src/views/report/index.vue @@ -274,6 +274,7 @@ export default { dl_file: "推送大文件", upd_cfg: "修改配置文件", list_files: "列出目录下的文件名", + yw_app_upd_ota: "App增量更新", }, cmdtimer: null, endtimer: null,