From 2146867f8278b6ba96f41453eca2504327b53b39 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Thu, 30 May 2024 10:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homePage/components/tableMain.vue | 8 +- src/views/homePage/index.vue | 56 ++++-- src/views/report/index.vue | 209 ++++++++++---------- 3 files changed, 147 insertions(+), 126 deletions(-) diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index b954865..42f277d 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -1029,8 +1029,8 @@ export default { yw_cmd_stop_frpc: "停止frpc", i1_cmd_stop_aging_test: "停止老化测试", del_file: "删除文件", - upload_file: "上传文件", - download_file: "下发文件", + pull_files: "拉取文件", + push_file: "推送文件", }, taskdrawer: false, drawer: false, @@ -1938,7 +1938,7 @@ export default { this.$refs.pullFileFormref.validate((valid) => { if (valid) { var params = { - action: "upload_file", + action: "pull_files", path: this.pullFileForm.pullFile, termIds: this.idArray, }; @@ -1981,7 +1981,7 @@ export default { this.$refs.pushFileFormref.validate((valid) => { if (valid) { var params = { - action: "download_file", + action: "push_file", path: this.pushFileForm.name, content: base64Data, termIds: this.idArray, diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue index 3b9588a..b6a1d4b 100644 --- a/src/views/homePage/index.vue +++ b/src/views/homePage/index.vue @@ -285,26 +285,40 @@ export default { : -1; //this.fetchData(); // 初始化时获取数据 //setInterval(this.fetchData, 60000); // 每10秒刷新数据 - this.formdata = - JSON.parse(localStorage.getItem("searchParams")) !== null - ? JSON.parse(localStorage.getItem("searchParams")) - : { - dyId: -1, - lineId: -1, - towerId: -1, - isonline: -1, - protocol: -1, - mntn: 1, - activityId: -1, - oid: "", - oidExclude: 0, - cmdid: "", - cmdidExclude: 0, - cma: "", - cmaExclude: 0, - version: "", - versionExclude: 0, - }; + let jsonSearch = JSON.parse(localStorage.getItem("searchParams")); + if (jsonSearch !== null) { + if (!jsonSearch.hasOwnProperty("isonline")) { + jsonSearch.isonline = -1; + } + if (!jsonSearch.hasOwnProperty("mntn")) { + jsonSearch.mntn = -1; + } + + this.formdata = jsonSearch; + console.log(this.formdata); + } else { + this.formdata = jsonSearch; + } + // this.formdata = + // JSON.parse(localStorage.getItem("searchParams")) !== null + // ? JSON.parse(localStorage.getItem("searchParams")) + // : { + // dyId: -1, + // lineId: -1, + // towerId: -1, + // isonline: -1, + // protocol: -1, + // mntn: 1, + // activityId: -1, + // oid: "", + // oidExclude: 0, + // cmdid: "", + // cmdidExclude: 0, + // cma: "", + // cmaExclude: 0, + // version: "", + // versionExclude: 0, + // }; }, mounted() { this.getSearchdy(); @@ -434,6 +448,7 @@ export default { name: item.title, })); this.activityOptions = this.activityOptions.concat(activeArr); + //this.formdata.activityId = this.activityOptions[0].id; this.formdata.activityId = JSON.parse(localStorage.getItem("activeId")) !== null @@ -444,6 +459,7 @@ export default { .catch((err) => {}); }, changeActive(val) { + console.log(this.activityOptions); console.log(val); localStorage.setItem("activeId", JSON.stringify(val)); }, diff --git a/src/views/report/index.vue b/src/views/report/index.vue index 87b534e..207875b 100644 --- a/src/views/report/index.vue +++ b/src/views/report/index.vue @@ -37,44 +37,42 @@ >
-
-

- {{ index + 1 }} - 时间:{{ item.createTime }} - 设备ID:{{ item.terminal.cmdid }} - apk版本:{{ item.cmdMap.fileName }} - 命令:{{ cmdCn[item.name] }} - - 命令预计拿走时间: +

+

+ {{ index + 1 }} + 时间:{{ item.createTime }} + 设备ID:{{ item.terminal.cmdid }} + apk版本:{{ item.cmdMap.fileName }} + 命令:{{ cmdCn[item.name] }} - {{ - $moment(item.estimatedPublishTime * 1000).format( - "MM-DD HH:mm:ss" - ) - }} - {{ remainingTime(item) }} - - -

-
-
-

暂无下发命令

+ 命令预计拿走时间: + + {{ + $moment(item.estimatedPublishTime * 1000).format( + "MM-DD HH:mm:ss" + ) + }} + {{ remainingTime(item) }} + + +

+
+
+

暂无下发命令

+
-
已下发终端 @@ -111,34 +109,38 @@ >
-
-

- - {{ index + 1 }} +

+ - - 下发时间:{{ item.publishTime }} - 设备ID:{{ item.terminal.cmdid }} - 命令:{{ cmdCn[item.name] }} - apk版本:{{ item.cmdMap.fileName }} - cmd:{{ item.cmdMap }} - -

+ {{ index + 1 }} + + 下发时间:{{ item.publishTime }} + 设备ID:{{ item.terminal.cmdid }} + 命令:{{ cmdCn[item.name] }} + apk版本:{{ item.cmdMap.fileName }} + cmd:{{ item.cmdMap }} + +

+
+
+

暂无已下发命令

+
-
-

暂无已下发命令

-
-

设备ID:{{ devCmdid }}

操作时间:{{ deveceMsg.createTime }}

-

待执行操作:{{cmdCn[deveceMsg.name]}} {{ deveceMsg.name }}

+

待执行操作:{{ cmdCn[deveceMsg.name] }} {{ deveceMsg.name }}

cmd:{{ deveceMsg.cmd }}