jcbranch
fanluyan 1 year ago
parent c7fe72bf3b
commit 2146867f82

@ -1029,8 +1029,8 @@ export default {
yw_cmd_stop_frpc: "停止frpc", yw_cmd_stop_frpc: "停止frpc",
i1_cmd_stop_aging_test: "停止老化测试", i1_cmd_stop_aging_test: "停止老化测试",
del_file: "删除文件", del_file: "删除文件",
upload_file: "上传文件", pull_files: "拉取文件",
download_file: "下发文件", push_file: "推送文件",
}, },
taskdrawer: false, taskdrawer: false,
drawer: false, drawer: false,
@ -1938,7 +1938,7 @@ export default {
this.$refs.pullFileFormref.validate((valid) => { this.$refs.pullFileFormref.validate((valid) => {
if (valid) { if (valid) {
var params = { var params = {
action: "upload_file", action: "pull_files",
path: this.pullFileForm.pullFile, path: this.pullFileForm.pullFile,
termIds: this.idArray, termIds: this.idArray,
}; };
@ -1981,7 +1981,7 @@ export default {
this.$refs.pushFileFormref.validate((valid) => { this.$refs.pushFileFormref.validate((valid) => {
if (valid) { if (valid) {
var params = { var params = {
action: "download_file", action: "push_file",
path: this.pushFileForm.name, path: this.pushFileForm.name,
content: base64Data, content: base64Data,
termIds: this.idArray, termIds: this.idArray,

@ -285,26 +285,40 @@ export default {
: -1; : -1;
//this.fetchData(); // //this.fetchData(); //
//setInterval(this.fetchData, 60000); // 10 //setInterval(this.fetchData, 60000); // 10
this.formdata = let jsonSearch = JSON.parse(localStorage.getItem("searchParams"));
JSON.parse(localStorage.getItem("searchParams")) !== null if (jsonSearch !== null) {
? JSON.parse(localStorage.getItem("searchParams")) if (!jsonSearch.hasOwnProperty("isonline")) {
: { jsonSearch.isonline = -1;
dyId: -1, }
lineId: -1, if (!jsonSearch.hasOwnProperty("mntn")) {
towerId: -1, jsonSearch.mntn = -1;
isonline: -1, }
protocol: -1,
mntn: 1, this.formdata = jsonSearch;
activityId: -1, console.log(this.formdata);
oid: "", } else {
oidExclude: 0, this.formdata = jsonSearch;
cmdid: "", }
cmdidExclude: 0, // this.formdata =
cma: "", // JSON.parse(localStorage.getItem("searchParams")) !== null
cmaExclude: 0, // ? JSON.parse(localStorage.getItem("searchParams"))
version: "", // : {
versionExclude: 0, // 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() { mounted() {
this.getSearchdy(); this.getSearchdy();
@ -434,6 +448,7 @@ export default {
name: item.title, name: item.title,
})); }));
this.activityOptions = this.activityOptions.concat(activeArr); this.activityOptions = this.activityOptions.concat(activeArr);
//this.formdata.activityId = this.activityOptions[0].id; //this.formdata.activityId = this.activityOptions[0].id;
this.formdata.activityId = this.formdata.activityId =
JSON.parse(localStorage.getItem("activeId")) !== null JSON.parse(localStorage.getItem("activeId")) !== null
@ -444,6 +459,7 @@ export default {
.catch((err) => {}); .catch((err) => {});
}, },
changeActive(val) { changeActive(val) {
console.log(this.activityOptions);
console.log(val); console.log(val);
localStorage.setItem("activeId", JSON.stringify(val)); localStorage.setItem("activeId", JSON.stringify(val));
}, },

@ -37,12 +37,7 @@
></el-button> ></el-button>
</div> </div>
<div class="mlbpox" v-loading="leftComLoading"> <div class="mlbpox" v-loading="leftComLoading">
<div <div class="commandList" v-if="leftCommand.length != 0">
class="commandList"
v-if="leftCommand.length != 0"
>
<p <p
class="comLi" class="comLi"
v-for="(item, index) in leftCommand" v-for="(item, index) in leftCommand"
@ -52,10 +47,13 @@
<span class="indexClass">{{ index + 1 }}</span> <span class="indexClass">{{ index + 1 }}</span>
<span class="comMsg" <span class="comMsg"
><b>时间{{ item.createTime }}</b> ><b>时间{{ item.createTime }}</b>
<b v-if="item.terminal && item.terminal.cmdid">ID{{ item.terminal.cmdid }}</b> <b v-if="item.terminal && item.terminal.cmdid"
<b v-if="item.cmdMap &&item.cmdMap.fileName">apk{{ item.cmdMap.fileName }}</b> >设备ID{{ item.terminal.cmdid }}</b
<b>命令{{ cmdCn[item.name] }}</b
> >
<b v-if="item.cmdMap && item.cmdMap.fileName"
>apk版本{{ item.cmdMap.fileName }}</b
>
<b>命令{{ cmdCn[item.name] }}</b>
<b v-if="item.estimatedPublishTime * 1000 - newupdatatime > 0" <b v-if="item.estimatedPublishTime * 1000 - newupdatatime > 0"
>命令预计拿走时间 >命令预计拿走时间
@ -128,9 +126,13 @@
</el-tooltip> </el-tooltip>
<span class="comMsg" <span class="comMsg"
><b>下发时间{{ item.publishTime }}</b> ><b>下发时间{{ item.publishTime }}</b>
<b v-if="item.terminal && item.terminal.cmdid">ID{{ item.terminal.cmdid }}</b> <b v-if="item.terminal && item.terminal.cmdid"
>设备ID{{ item.terminal.cmdid }}</b
>
<b>命令{{ cmdCn[item.name] }}</b> <b>命令{{ cmdCn[item.name] }}</b>
<b v-if="item.cmdMap &&item.cmdMap.fileName">apk{{ item.cmdMap.fileName }}</b> <b v-if="item.cmdMap && item.cmdMap.fileName"
>apk版本{{ item.cmdMap.fileName }}</b
>
<b v-else>cmd{{ item.cmdMap }}</b> <b v-else>cmd{{ item.cmdMap }}</b>
</span> </span>
</p> </p>
@ -162,7 +164,12 @@
</div> </div>
</template> </template>
<script> <script>
import { cmdSendApi,getCmdActionApi,cmdActlistApi,cmdActHislistApi } from "@/utils/api/index"; import {
cmdSendApi,
getCmdActionApi,
cmdActlistApi,
cmdActHislistApi,
} from "@/utils/api/index";
export default { export default {
name: "report", name: "report",
components: {}, components: {},
@ -176,7 +183,7 @@ export default {
rightCommand: [], rightCommand: [],
commandShow: false, commandShow: false,
deveceMsg: {}, deveceMsg: {},
devCmdid:'', devCmdid: "",
cmdCn: { cmdCn: {
yw_cmd_android_reboot: "重启设备", yw_cmd_android_reboot: "重启设备",
yw_cmd_mcu_reboot: "MCU单片机重启", yw_cmd_mcu_reboot: "MCU单片机重启",
@ -190,19 +197,17 @@ export default {
yw_cmd_stop_frpc: "停止frpc", yw_cmd_stop_frpc: "停止frpc",
i1_cmd_stop_aging_test: "停止老化测试", i1_cmd_stop_aging_test: "停止老化测试",
del_file: "删除文件", del_file: "删除文件",
upload_file: "上传文件", pull_files: "拉取文件",
download_file: "下发文件", push_file: "推送文件",
}, },
cmdtimer: null, cmdtimer: null,
endtimer: null, endtimer: null,
updateTime: null, updateTime: null,
newupdatatime: null, newupdatatime: null,
// //
operateOptions: [ operateOptions: [{ id: 0, key: "all", desc: "全部" }],
{id: 0, key: "all", desc: "全部"} operateL: "all",
], operateR: "all",
operateL: 'all',
operateR: 'all',
leftcmdVal: "", leftcmdVal: "",
rightcmdVal: "", rightcmdVal: "",
intervalId: null, // setIntervalID intervalId: null, // setIntervalID
@ -216,7 +221,7 @@ export default {
mounted() { mounted() {
this.getCmdList(); this.getCmdList();
this.getEndList(); this.getEndList();
this.getCmdOptionsFun() this.getCmdOptionsFun();
this.startCountdown(); // this.startCountdown(); //
}, },
@ -267,9 +272,9 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 300, pageSize: 300,
}; };
console.log(this.operateL) console.log(this.operateL);
// //
if (this.operateL!=='all') { if (this.operateL !== "all") {
params.action = this.operateL; params.action = this.operateL;
} }
if (this.leftcmdVal !== "") { if (this.leftcmdVal !== "") {
@ -291,7 +296,7 @@ export default {
this.commandShow = true; this.commandShow = true;
console.log(this.commandShow); console.log(this.commandShow);
this.deveceMsg = val; this.deveceMsg = val;
this.devCmdid = val.terminal.cmdid this.devCmdid = val.terminal.cmdid;
}, },
// //
@ -302,7 +307,7 @@ export default {
pageSize: 300, pageSize: 300,
}; };
// //
if (this.operateR!== 'all') { if (this.operateR !== "all") {
params.action = this.operateR; params.action = this.operateR;
} }
if (this.rightcmdVal !== "") { if (this.rightcmdVal !== "") {
@ -322,23 +327,23 @@ export default {
}, },
// //
selectLeftChanged() { selectLeftChanged() {
this.getCmdList() this.getCmdList();
}, },
leftInputChange() { leftInputChange() {
console.log(this.leftcmdVal); console.log(this.leftcmdVal);
this.getCmdList() this.getCmdList();
}, },
// //
selectRightChanged() { selectRightChanged() {
this.getEndList() this.getEndList();
}, },
rightInputChange() { rightInputChange() {
this.getEndList() this.getEndList();
}, },
// //
handleCancel(val) { handleCancel(val) {
console.log(val) console.log(val);
cmdSendApi({ cmdSendApi({
action: "cancel", action: "cancel",
id: val, id: val,

Loading…
Cancel
Save