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

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

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

@ -16,12 +16,99 @@
> >
<el-table-column type="index" width="50" label="序号"> <el-table-column type="index" width="50" label="序号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="createTime" label="时间"></el-table-column>
prop="createTime" <el-table-column label="id">
label="时间" <template slot-scope="scope">
width="180" {{ scope.row.raw_report.id }}
></el-table-column> </template>
<el-table-column prop="content" label="接收消息" class-name="msgClass"> </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"> <template slot-scope="scope">
<el-tooltip <el-tooltip
:open-delay="600" :open-delay="600"
@ -122,8 +209,8 @@ export default {
justify-items: center; justify-items: center;
justify-content: center; justify-content: center;
.el-dialog { .el-dialog {
width: 1024px; width: 90%;
height: 632px; height: 83%;
margin-top: 0px !important; margin-top: 0px !important;
.el-dialog__body { .el-dialog__body {

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

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

@ -3,27 +3,53 @@
<div class="commandBox"> <div class="commandBox">
<div class="commandRunLeft commandClass"> <div class="commandRunLeft commandClass">
<h3>待下发终端</h3> <h3>待下发终端</h3>
<div class="commandList" v-loading="leftComLoading"> <div
class="commandList"
v-loading="leftComLoading"
v-if="runCommand.length != 0"
>
<p <p
class="comLi" class="comLi"
v-for="(item, index) in runCommand" v-for="(item, index) in runCommand"
:key="index" :key="index"
@click="handleShowCommand(item)" @dblclick="handleShowCommand(item)"
> >
<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>设备ID{{ item.cmdid }}</b> <b>设备ID{{ item.cmdid }}</b>
<b>命令{{ item.cmdName }}</b></span <b>命令{{ cmdCn[item.cmdName] }}</b></span
> >
</p> </p>
</div> </div>
<div class="commandList">
<p>暂无下发命令</p>
</div>
</div> </div>
<div class="commandRunRight commandClass"> <div class="commandRunRight commandClass">
<h3>已下发终端</h3> <h3>已下发终端</h3>
<div class="commandList"> <div class="commandList">
<p class="comLi" v-for="(item, index) in endCommand" :key="index"> <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> </p>
</div> </div>
</div> </div>
@ -40,6 +66,7 @@
<p>设备ID:{{ deveceMsg.cmdid }}</p> <p>设备ID:{{ deveceMsg.cmdid }}</p>
<p>操作时间{{ deveceMsg.createTime }}</p> <p>操作时间{{ deveceMsg.createTime }}</p>
<p>待执行操作{{ deveceMsg.cmdName }}</p> <p>待执行操作{{ deveceMsg.cmdName }}</p>
<p>cmd{{ deveceMsg.cmd }}</p>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleCancel(deveceMsg.id)"></el-button> <el-button @click="handleCancel(deveceMsg.id)"></el-button>
@ -56,36 +83,38 @@ export default {
return { return {
leftComLoading: false, //loading leftComLoading: false, //loading
runCommand: [], runCommand: [],
endCommand: [ endCommand: [],
{
name: "我是已完成的列表",
id: 1,
},
{
name: "我是已完成的列表",
id: 2,
},
{
name: "我是已完成的列表",
id: 3,
},
{
name: "我是已完成的列表",
id: 4,
},
],
commandShow: false, commandShow: false,
deveceMsg: "", 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: {}, computed: {},
created() {
this.cmdtimer = setInterval(this.getCmdList, 60000); // 10
this.endtimer = setInterval(this.getEndList, 60000); // 10
},
mounted() { mounted() {
// setInterval(this.getCmdList(), 1000); // 10
this.getCmdList(); this.getCmdList();
this.getEndList();
}, },
methods: { methods: {
getCmdList() { getCmdList() {
this.leftComLoading = true; //this.leftComLoading = true;
getqueryCmdsApi({ p: 1, ps: 200 }) getqueryCmdsApi({ p: 1, ps: 200 })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -103,18 +132,53 @@ export default {
// //
handleCancel(val) { handleCancel(val) {
getdoActionApi({ getdoActionApi({
action: "cancel", act: "cancel",
id: val, id: val,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
this.$confirm("确定取消该命令?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$message({
duration: 1500,
showClose: true,
message: "命令已取消",
type: "success",
});
this.commandShow = false; this.commandShow = false;
this.getCmdList(); this.getCmdList();
this.getEndList();
})
.catch(() => {
this.commandShow = false;
});
}) })
.catch((err) => {}); .catch((err) => {});
}, },
//
getEndList() {
getqueryCmdsApi({ qt: "his", p: 1, ps: 200 })
.then((res) => {
console.log(res);
this.endCommand = res.data;
// this.leftComLoading = false;
})
.catch((err) => {});
},
},
beforeDestroy() {
//
clearInterval(this.cmdtimer);
clearInterval(this.endtimer);
this.cmdtimer = null;
this.endtimer = null;
}, },
created() {},
}; };
</script> </script>
<style lang="less"> <style lang="less">
@ -126,7 +190,7 @@ export default {
display: flex; display: flex;
height: 100%; height: 100%;
.commandClass { .commandClass {
width: 40%; width: 50%;
padding: 12px; padding: 12px;
height: calc(100% - 24px); height: calc(100% - 24px);
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
@ -165,6 +229,12 @@ export default {
text-align: center; text-align: center;
margin-right: 8px; margin-right: 8px;
} }
.normalClass {
background: #d3d3d3;
}
.cancelClass {
background: #fde2e2;
}
.comMsg { .comMsg {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -181,9 +251,10 @@ export default {
.commandRunRight { .commandRunRight {
.commandList { .commandList {
p { p {
background: rgb(225, 243, 216); cursor: default;
background: #e1f3d8;
&:hover { &:hover {
background: rgb(225, 243, 216); background: #e1f3d8;
} }
} }
} }

@ -53,7 +53,7 @@
></el-table-column> ></el-table-column>
<el-table-column prop="fileName" label="文件名称"> </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="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"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link

Loading…
Cancel
Save