|
|
|
@ -16,6 +16,9 @@
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="onIssue">下发命令</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="sendMsg">发送短信</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="zzMsg">
|
|
|
|
@ -1082,6 +1085,34 @@
|
|
|
|
|
<el-button type="primary" @click="handleconfig">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 发送短信 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="发送短信"
|
|
|
|
|
:visible.sync="senMsgVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
width="504px"
|
|
|
|
|
class="senMsgDialog"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="sendForm" ref="sendFormref">
|
|
|
|
|
<el-form-item label="输入短息内容:" prop="msginfo">
|
|
|
|
|
<el-input
|
|
|
|
|
type="textarea"
|
|
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
v-model="sendForm.msginfo"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<ul>
|
|
|
|
|
<li v-for="(item, index) in sendOption" @click="handleSend(item)">
|
|
|
|
|
{{ item.name }}{{ item.value }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="senMsgVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="handlemsgSend">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -1091,6 +1122,7 @@ import {
|
|
|
|
|
getCmdActionApi,
|
|
|
|
|
upgradeListApi,
|
|
|
|
|
updCommentApi,
|
|
|
|
|
sendMsgApi,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import rowMsgDialog from "./rowMsgDialog.vue";
|
|
|
|
|
import htmlToExcel from "@/utils/htmlToExcel";
|
|
|
|
@ -1518,6 +1550,28 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
senMsgVisible: false,
|
|
|
|
|
sendForm: {
|
|
|
|
|
msginfo: "",
|
|
|
|
|
},
|
|
|
|
|
sendOption: [
|
|
|
|
|
{
|
|
|
|
|
name: "重启系统1:",
|
|
|
|
|
value: "yw-at-stw21=1",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "重启系统2:",
|
|
|
|
|
value: "at-stw21=1",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "重启MpApp:",
|
|
|
|
|
value: "at-restart=mpapp",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "重启MpMaster格式:",
|
|
|
|
|
value: "at-restart=mpmaster",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -1541,6 +1595,7 @@ export default {
|
|
|
|
|
// 数据发生变化时的处理逻辑
|
|
|
|
|
console.log("数据已更新:", newVal);
|
|
|
|
|
this.getNumber();
|
|
|
|
|
// this.$refs.ywMultipleTable.clearSelection();
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.startCountdown(); // 确保在 DOM 更新后执行
|
|
|
|
|
});
|
|
|
|
@ -1551,6 +1606,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getCmdOptionsFun();
|
|
|
|
|
// this.multipleSelection = [];
|
|
|
|
|
// this.idArray = [];
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//获取命令列表
|
|
|
|
@ -1559,7 +1616,6 @@ export default {
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.operateOptions = res.data;
|
|
|
|
|
//this.operateOptions = this.operateOptions.concat(res.data);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -2005,12 +2061,72 @@ export default {
|
|
|
|
|
return;
|
|
|
|
|
case 15:
|
|
|
|
|
console.log("推送大文件");
|
|
|
|
|
|
|
|
|
|
this.configVisible = true;
|
|
|
|
|
this.getconfigList();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//下发短信
|
|
|
|
|
sendMsg() {
|
|
|
|
|
if (this.multipleSelection.length == 1) {
|
|
|
|
|
console.log(this.multipleSelection);
|
|
|
|
|
|
|
|
|
|
this.senMsgVisible = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "只能选中一个设备",
|
|
|
|
|
type: "warning",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleSend(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
let params = {
|
|
|
|
|
termId: this.multipleSelection[0].id,
|
|
|
|
|
content: item.value,
|
|
|
|
|
};
|
|
|
|
|
sendMsgApi(params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$refs.ywMultipleTable.clearSelection();
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: item.name + "下发成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.senMsgVisible = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//自定义输入
|
|
|
|
|
handlemsgSend() {
|
|
|
|
|
let params = {
|
|
|
|
|
termId: this.multipleSelection[0].id,
|
|
|
|
|
content: this.sendForm.msginfo,
|
|
|
|
|
};
|
|
|
|
|
sendMsgApi(params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$refs.ywMultipleTable.clearSelection();
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "短信下发成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.senMsgVisible = false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//执行操作
|
|
|
|
|
changeIssue(params) {
|
|
|
|
|
cmdSendApi(params)
|
|
|
|
@ -2890,6 +3006,19 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.senMsgDialog {
|
|
|
|
|
ul {
|
|
|
|
|
li {
|
|
|
|
|
list-style: none;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
background-color: #b9e2dd;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.contenBoxMsg {
|
|
|
|
|
p {
|
|
|
|
|