diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 870841d..5a8372d 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -37,7 +37,10 @@ export default { path: "/activity", name: "活动列表", }, - + { + path: "/msgAuth", + name: "短信授权", + }, // { // path: "/deviceConfig", // name: "设备配置", diff --git a/src/router/index.js b/src/router/index.js index c2fab26..67bef07 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -70,6 +70,15 @@ const routes = [ keepAlive: true, }, }, + { + path: "/msgAuth", + component: () => import("../views/msgAuth/index.vue"), + name: "msgAuth", + meta: { + title: "短信授权", + keepAlive: true, + }, + }, { path: "/deviceConfig", component: () => import("../views/deviceConfig/index.vue"), diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 114ea4e..0f3cce2 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -216,8 +216,23 @@ export function msglistApi(data) { url: "/xymanager/sms/list", method: "get", params: data, - // headers: { - // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", - // }, + }); +} + +//查询授权 +export function getAuthApi(data) { + return request({ + url: "/xymanager/sms/getAuth", + method: "get", + params: data, + }); +} + +//提交授权 +export function updateAuthApi(data) { + return request({ + url: "/xymanager/sms/updateAuth", + method: "post", + data, }); } diff --git a/src/views/homePage/components/msglist.vue b/src/views/homePage/components/msglist.vue new file mode 100644 index 0000000..494ba1e --- /dev/null +++ b/src/views/homePage/components/msglist.vue @@ -0,0 +1,232 @@ + + + diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index 4df9e7f..f1025a7 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -1142,10 +1142,19 @@ + + + @@ -1159,6 +1168,7 @@ import { msglistApi, } from "@/utils/api/index"; import rowMsgDialog from "./rowMsgDialog.vue"; +import msgList from "./msglist.vue"; import htmlToExcel from "@/utils/htmlToExcel"; import { saveAs } from "file-saver"; import XLSX from "xlsx"; @@ -1173,6 +1183,7 @@ export default { ], components: { rowMsgDialog, + msgList, }, data() { //判断ip @@ -1606,6 +1617,15 @@ export default { value: "at-restart=mpmaster", }, ], + msgListData: [], //短信记录 + msgCompany: "", //公司厂家 + msgtype: "", //类型 + companyMap: { + 1: "大汉移动", + 2: "公田移动rabchase", + 3: "公田m2m10086", + 4: "安徽", + }, }; }, mounted() { @@ -2116,26 +2136,7 @@ export default { }, handleSend(item) { console.log(item); - let params = { - termIdList: this.idArray, - 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: "短信下发成功", - type: "success", - }); - - this.senMsgVisible = false; - } - }) - .catch((err) => {}); + this.sendForm.msginfo = item.value; }, //自定义输入 handlemsgSend() { @@ -2167,6 +2168,26 @@ export default { .then((res) => { console.log(res); if (res.code == 200) { + if (res.data !== null) { + this.msgListData = res.data.data; + this.msgCompany = this.companyMap[res.data.type]; + this.msgtype = res.data.type; + this.$refs.msglistRef.display(); + } else { + this.$message({ + duration: 1500, + showClose: true, + message: this.companyMap[res.data.type] + "暂无短信记录", + type: "warning", + }); + } + } else { + this.$message({ + duration: 1500, + showClose: true, + message: res.msg, + type: "error", + }); } }) .catch((err) => {}); diff --git a/src/views/msgAuth/index.vue b/src/views/msgAuth/index.vue new file mode 100644 index 0000000..e47d57e --- /dev/null +++ b/src/views/msgAuth/index.vue @@ -0,0 +1,168 @@ + + + diff --git a/src/views/report/index.vue b/src/views/report/index.vue index 13466bb..e45f4d5 100644 --- a/src/views/report/index.vue +++ b/src/views/report/index.vue @@ -260,8 +260,8 @@ export default { const minutes = Math.floor(difference / 60000); const seconds = Math.floor((difference % 60000) / 1000); if (minutes == 0 && seconds == 0) { - this.getCmdList(); - this.getEndList(); + // this.getCmdList(); + // this.getEndList(); return `命令已下发`; } else { return ` 预估剩余:${minutes} 分钟 ${seconds} 秒`; diff --git a/vue.config.js b/vue.config.js index 5e96aa9..2cfd103 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,7 +21,7 @@ module.exports = defineConfig({ "/api": { //表示拦截以/api开头的请求路径 // target: "http://61.169.135.146:40101/", // - //target: "http://61.169.135.146:40080/", //dell + // target: "http://61.169.135.146:40080/", //dell target: "http://61.169.135.146:40085/", //运维 //target: "http://192.168.50.197:8093/", //java本地后端 changOrigin: true, //是否开启跨域