From 6ef6ce58b9a2dc3ef5c1dae1c6e0f97c78192a49 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 23 Jul 2024 09:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api/index.js | 11 +++++++++++ src/utils/request.js | 5 +++-- src/views/homePage/components/tableMain.vue | 16 +++++++++++++++- src/views/homePage/index.vue | 3 +++ src/views/report/index.vue | 4 ++-- vue.config.js | 4 +++- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 57e7640..114ea4e 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -210,3 +210,14 @@ export function sendMsgApi(data) { data, }); } +//查询短信 +export function msglistApi(data) { + return request({ + url: "/xymanager/sms/list", + method: "get", + params: data, + // headers: { + // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + // }, + }); +} diff --git a/src/utils/request.js b/src/utils/request.js index a5169b6..037f189 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -51,9 +51,10 @@ service.interceptors.response.use( duration: 1500, }); } - if (!res.code) { // 如果没有返回code,可能是下载excel + if (!res.code) { + // 如果没有返回code,可能是下载excel // return resolve(response.data, res); - return res + return res; } return Promise.reject(new Error(res.msg || "Error")); } else { diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue index b8fbc6b..4df9e7f 100644 --- a/src/views/homePage/components/tableMain.vue +++ b/src/views/homePage/components/tableMain.vue @@ -1143,6 +1143,7 @@
@@ -1155,6 +1156,7 @@ import { upgradeListApi, updCommentApi, sendMsgApi, + msglistApi, } from "@/utils/api/index"; import rowMsgDialog from "./rowMsgDialog.vue"; import htmlToExcel from "@/utils/htmlToExcel"; @@ -2126,7 +2128,7 @@ export default { this.$message({ duration: 1500, showClose: true, - message: item.name + "下发成功", + message: "短信下发成功", type: "success", }); @@ -2157,6 +2159,18 @@ export default { }) .catch((err) => {}); }, + //查询短信 + handlemsgList() { + msglistApi({ + termId: this.idArray[0], + }) + .then((res) => { + console.log(res); + if (res.code == 200) { + } + }) + .catch((err) => {}); + }, //执行操作 changeIssue(params) { cmdSendApi(params) diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue index 2343412..f085c54 100644 --- a/src/views/homePage/index.vue +++ b/src/views/homePage/index.vue @@ -298,6 +298,7 @@ export default { intervalId: null, // 用于存储定时器的ID activityIdLoc: "", runCommand: [], //获取命令列表 + scrollTop: 0, // 滚动条位置 }; }, created() { @@ -518,6 +519,7 @@ export default { }, interval); }, fetchData() { + console.log(this.$refs.tableRef); let params = { pageindex: 1, pagesize: 10000, @@ -577,6 +579,7 @@ export default { .then((res) => { console.log(res); this.dataList = res.data; + this.getCmdList(); this.onlineNum = this.dataList.filter( (item) => item.onlinestatus == 1 diff --git a/src/views/report/index.vue b/src/views/report/index.vue index 9085481..13466bb 100644 --- a/src/views/report/index.vue +++ b/src/views/report/index.vue @@ -271,7 +271,7 @@ export default { this.leftComLoading = true; let params = { pageNum: 1, - pageSize: 300, + pageSize: 500, }; console.log(this.operateL); // 根据条件添加参数 @@ -305,7 +305,7 @@ export default { this.rightComLoading = true; let params = { pageNum: 1, - pageSize: 300, + pageSize: 500, }; // 根据条件添加参数 if (this.operateR !== "all") { diff --git a/vue.config.js b/vue.config.js index 6dd67f0..5e96aa9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,7 +21,9 @@ module.exports = defineConfig({ "/api": { //表示拦截以/api开头的请求路径 // target: "http://61.169.135.146:40101/", // - target: "http://61.169.135.146:40085/", //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, //是否开启跨域 pathRewrite: { "^/api": "/api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的