jcbranch
fanluyan 11 months ago
parent 87f4a05dc1
commit 24669278b6

@ -201,3 +201,12 @@ export function upgradeDeleteApi(data) {
},
});
}
//send发送短信
export function sendMsgApi(data) {
return request({
url: "/xymanager/sms/send",
method: "post",
data,
});
}

@ -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 {

@ -20,7 +20,7 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
//target: "http://61.169.135.146:40101/", //
// target: "http://61.169.135.146:40101/", //
target: "http://61.169.135.146:40085/", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {

Loading…
Cancel
Save