master
fanluyan 2 years ago
parent d2cc0d6ee4
commit 6a6e6c41ff

File diff suppressed because one or more lines are too long

@ -211,7 +211,7 @@ export default {
line-height: 32px;
font-size: 12px;
&:hover {
color: #337ab7;
color: #169e8c;
}
}
.el-tabs--border-card {
@ -226,13 +226,13 @@ export default {
}
.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
color: #fff;
background-color: #337ab7;
background-color: #169e8c;
}
.el-tabs--border-card
> .el-tabs__header
.el-tabs__item:not(.is-disabled):hover {
color: #fff;
background-color: #337ab7;
background-color: #169e8c;
}
.el-tabs__item .el-icon-close {
transition: none;

@ -59,14 +59,21 @@ export default {
font-size: 14px;
margin-right: 32px;
a {
color: #6de1ff;
background-image: url(../assets/menu.png);
color: #fff;
//background: #e8f5f4;
height: 40px;
line-height: 40px;
padding: 0 12px;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
border-radius: 8px;
&:hover {
background: #128071;
}
}
.router-link-active {
background: #128071;
}
}
}

@ -84,7 +84,7 @@ export default {
width: 100%;
height: 52px;
box-sizing: border-box;
background: rgba(24, 75, 112, 1);
background: #169e8c;
-webkit-backdrop-filter: blur(0.41667vw);
backdrop-filter: blur(0.41667vw);
line-height: 52px;
@ -128,7 +128,7 @@ export default {
// border-radius: 50%;
// }
span {
color: #66e6ff;
color: #fff;
font-size: 14px;
margin-right: 8px;
}

@ -16,12 +16,99 @@
>
<el-table-column type="index" width="50" label="序号">
</el-table-column>
<el-table-column
prop="createTime"
label="时间"
width="180"
></el-table-column>
<el-table-column prop="content" label="接收消息" class-name="msgClass">
<el-table-column prop="createTime" label="时间"></el-table-column>
<el-table-column label="id">
<template slot-scope="scope">
{{ scope.row.raw_report.id }}
</template>
</el-table-column>
<el-table-column label="i1服务器">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.cma }}
</template>
</el-table-column>
<el-table-column label="心跳间隔" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.heartbeatDuration }}
</template>
</el-table-column>
<el-table-column label="电池">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.battery }}
</template>
</el-table-column>
<el-table-column label="电池温度" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.batteryTmp }}
</template>
</el-table-column>
<el-table-column label="主板温度" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.mainBoardTmp }}
</template>
</el-table-column>
<el-table-column label="系统重启" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.rebootTimes }}
</template>
</el-table-column>
<el-table-column label="i1重启" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.i1RebootTimes }}
</template>
</el-table-column>
<el-table-column label="收" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.recv }}
</template>
</el-table-column>
<el-table-column label="传图" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.pic }}
</template>
</el-table-column>
<el-table-column label="拍" width="60">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.photoTimes }}
</template>
</el-table-column>
<el-table-column label="成/败/传" width="70">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.success }}/{{
scope.row.raw_report.msgs.failure
}}/{{ scope.row.raw_report.msgs.uploads }}
</template>
</el-table-column>
<el-table-column label="心跳累计" width="80">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.numberOfHb }}
</template>
</el-table-column>
<el-table-column label="网络异常" width="80">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.networkError }}
</template>
</el-table-column>
<el-table-column label="信号1" width="60">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.signature1 }}
</template>
</el-table-column>
<el-table-column label="信号2" width="60">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.signature2 }}
</template>
</el-table-column>
<!-- <el-table-column label="其他">
<template slot-scope="scope">
{{ scope.row.raw_report.msgs.id }}
</template>
</el-table-column> -->
<el-table-column prop="content" label="其他" class-name="msgClass">
<template slot-scope="scope">
<el-tooltip
:open-delay="600"
@ -122,8 +209,8 @@ export default {
justify-items: center;
justify-content: center;
.el-dialog {
width: 1024px;
height: 632px;
width: 90%;
height: 83%;
margin-top: 0px !important;
.el-dialog__body {

@ -439,6 +439,9 @@
:value="item.path"
:title="item.title"
>
{{ item.fileName }}
<i class="title">{{ item.title }}</i
><i class="time">{{ item.createTime }}</i>
</el-option>
</el-select>
</el-form-item>
@ -567,12 +570,12 @@ export default {
multipleSelection: [],
nowTime: new Date().getTime() / 1000,
gycheck: true,
dccheck: false,
xtcheck: false,
gycheck: false,
dccheck: true,
xtcheck: true,
pzcheck: true,
wlcheck: false,
cqcheck: false,
wlcheck: true,
cqcheck: true,
cmacheck: false,
simcheck: false,
bbcheck: true,
@ -737,6 +740,7 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(this.multipleSelection);
this.idArray = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
this.idArray.push(this.multipleSelection[i].id);
}
@ -856,7 +860,7 @@ export default {
case 10:
console.log("停止老化测试");
var params = {
act: " stop-aging-test",
act: "stop-aging-test",
termIds: this.idArray.join("-"),
};
this.changeIssue(params);
@ -869,6 +873,7 @@ export default {
.then((res) => {
console.log(res);
this.$refs.ywMultipleTable.clearSelection();
this.idArray = [];
console.log(this.multipleSelection);
})
.catch((err) => {});
@ -1038,7 +1043,7 @@ export default {
.cell {
cursor: pointer;
&:hover {
color: #337ab7;
color: #169e8c;
text-decoration: underline;
}
}
@ -1047,7 +1052,7 @@ export default {
height: calc(100% - 40px) !important;
}
.el-table__row .picBg {
background: #337ab7 !important;
background: #169e8c !important;
color: #fff;
}
th.el-table__cell {
@ -1091,7 +1096,7 @@ export default {
left: 0px;
}
.el-table .ascending .sort-caret.ascending {
border-bottom-color: #337ab7;
border-bottom-color: #169e8c;
}
.el-table .sort-caret.descending {
border-top-color: #666;
@ -1099,7 +1104,7 @@ export default {
left: 0px;
}
.el-table .descending .sort-caret.descending {
border-top-color: #337ab7;
border-top-color: #169e8c;
}
.drawerBox {
@ -1145,4 +1150,11 @@ export default {
font-size: 14px;
}
}
.el-select-dropdown__item {
i {
margin-left: 8px;
font-size: 12px;
font-style: normal;
}
}
</style>

@ -427,12 +427,15 @@ export default {
font-weight:800;
}
}
.el-dialog__headerbtn .el-dialog__close{
font-size:20px;
&:hover{
background:#e2e2e2;
.el-dialog__headerbtn{
top:18px;
.el-dialog__close{
font-size:26px;
&:hover{
background:#e2e2e2;
}
}
}
}
</style>

@ -3,27 +3,53 @@
<div class="commandBox">
<div class="commandRunLeft commandClass">
<h3>待下发终端</h3>
<div class="commandList" v-loading="leftComLoading">
<div
class="commandList"
v-loading="leftComLoading"
v-if="runCommand.length != 0"
>
<p
class="comLi"
v-for="(item, index) in runCommand"
:key="index"
@click="handleShowCommand(item)"
@dblclick="handleShowCommand(item)"
>
<span class="indexClass">{{ index + 1 }}</span>
<span class="comMsg"
><b>时间{{ item.createTime }}</b>
<b>设备ID{{ item.cmdid }}</b>
<b>命令{{ item.cmdName }}</b></span
<b>命令{{ cmdCn[item.cmdName] }}</b></span
>
</p>
</div>
<div class="commandList">
<p>暂无下发命令</p>
</div>
</div>
<div class="commandRunRight commandClass">
<h3>已下发终端</h3>
<div class="commandList">
<p class="comLi" v-for="(item, index) in endCommand" :key="index">
{{ item }}
<el-tooltip
class="item"
effect="dark"
:open-delay="600"
:content="item.status == '1' ? '已下发' : '已取消'"
placement="top"
>
<span
class="indexClass"
:class="item.status == '1' ? 'normalClass' : 'cancelClass'"
>{{ index + 1 }}</span
>
</el-tooltip>
<span class="comMsg"
><b>下发时间{{ item.publishTime }}</b>
<b>设备ID{{ item.cmdid }}</b>
<b>命令{{ cmdCn[item.cmdName] }}</b>
<b>cmd{{ item.cmd }}</b></span
>
</p>
</div>
</div>
@ -40,6 +66,7 @@
<p>设备ID:{{ deveceMsg.cmdid }}</p>
<p>操作时间{{ deveceMsg.createTime }}</p>
<p>待执行操作{{ deveceMsg.cmdName }}</p>
<p>cmd{{ deveceMsg.cmd }}</p>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancel(deveceMsg.id)"></el-button>
@ -56,36 +83,38 @@ export default {
return {
leftComLoading: false, //loading
runCommand: [],
endCommand: [
{
name: "我是已完成的列表",
id: 1,
},
{
name: "我是已完成的列表",
id: 2,
},
{
name: "我是已完成的列表",
id: 3,
},
{
name: "我是已完成的列表",
id: 4,
},
],
endCommand: [],
commandShow: false,
deveceMsg: "",
cmdCn: {
yw_cmd_android_reboot: "重启",
yw_cmd_mcu_reboot: "重启装置",
i1_cmd_set_i1_server_ip_port: "设置I1服务器",
i1_cmd_set_xy_yw_ip_port: "设置运维服务器",
i1_cmd_set_i1_heart_beat_time: "设置心跳周期",
yw_cmd_upload_i1_zip_log: "上传日志",
upgrade: "升级",
yw_cmd_start_frpc: "开启frpc",
yw_cmd_stop_frpc: "停止frpc",
i1_cmd_stop_aging_test: "停止老化测试",
},
cmdtimer: null,
endtimer: null,
};
},
computed: {},
created() {
this.cmdtimer = setInterval(this.getCmdList, 60000); // 10
this.endtimer = setInterval(this.getEndList, 60000); // 10
},
mounted() {
// setInterval(this.getCmdList(), 1000); // 10
this.getCmdList();
this.getEndList();
},
methods: {
getCmdList() {
this.leftComLoading = true;
//this.leftComLoading = true;
getqueryCmdsApi({ p: 1, ps: 200 })
.then((res) => {
console.log(res);
@ -103,18 +132,53 @@ export default {
//
handleCancel(val) {
getdoActionApi({
action: "cancel",
act: "cancel",
id: val,
})
.then((res) => {
console.log(res);
this.commandShow = false;
this.getCmdList();
this.$confirm("确定取消该命令?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$message({
duration: 1500,
showClose: true,
message: "命令已取消",
type: "success",
});
this.commandShow = false;
this.getCmdList();
this.getEndList();
})
.catch(() => {
this.commandShow = false;
});
})
.catch((err) => {});
},
//
getEndList() {
getqueryCmdsApi({ qt: "his", p: 1, ps: 200 })
.then((res) => {
console.log(res);
this.endCommand = res.data;
// this.leftComLoading = false;
})
.catch((err) => {});
},
},
created() {},
beforeDestroy() {
//
clearInterval(this.cmdtimer);
clearInterval(this.endtimer);
this.cmdtimer = null;
this.endtimer = null;
},
};
</script>
<style lang="less">
@ -126,7 +190,7 @@ export default {
display: flex;
height: 100%;
.commandClass {
width: 40%;
width: 50%;
padding: 12px;
height: calc(100% - 24px);
border: 1px solid #dcdfe6;
@ -165,6 +229,12 @@ export default {
text-align: center;
margin-right: 8px;
}
.normalClass {
background: #d3d3d3;
}
.cancelClass {
background: #fde2e2;
}
.comMsg {
display: flex;
flex-wrap: wrap;
@ -181,9 +251,10 @@ export default {
.commandRunRight {
.commandList {
p {
background: rgb(225, 243, 216);
cursor: default;
background: #e1f3d8;
&:hover {
background: rgb(225, 243, 216);
background: #e1f3d8;
}
}
}

@ -53,7 +53,7 @@
></el-table-column>
<el-table-column prop="fileName" label="文件名称"> </el-table-column>
<el-table-column prop="title" label="备注"></el-table-column>
<el-table-column prop="path" label="文件路径"> </el-table-column>
<!-- <el-table-column prop="path" label="文件路径"> </el-table-column> -->
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-link

Loading…
Cancel
Save