From 51c5992bdb5f7b8e988787fed7a883a18f71433e Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期日, 02 七月 2023 18:13:57 +0800 Subject: [PATCH] 第一次提交 --- config/index.js | 6 +++--- src/api/daping.js | 37 +++++++++++++++++++++++++++++++++++++ src/pages/show/showIndex/IndexMoudleBlock.vue | 6 ++++++ src/pages/show/showIndex/TimesLogs.vue | 6 ++++++ 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/config/index.js b/config/index.js index e1492c8..22ee030 100644 --- a/config/index.js +++ b/config/index.js @@ -11,8 +11,8 @@ assetsSubDirectory: 'static', // 缂栬瘧杈撳嚭鐨勪簩绾х洰褰� assetsPublicPath: '/', // 缂栬瘧鍙戝竷鐨勬牴鐩綍锛屽彲閰嶇疆涓鸿祫婧愭湇鍔″櫒鍩熷悕鎴� CDN 鍩熷悕 proxyTable: { - '/api': { - target: '', + '/': { + target: 'http://127.0.0.1:10000', changeOrigin: true, pathRewrite: { '^/api': '' @@ -21,7 +21,7 @@ }, // Various Dev Server settings - host: '0.0.0.0', // can be overwritten by process.env.HOST + host: 'localhost', // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, diff --git a/src/api/daping.js b/src/api/daping.js new file mode 100644 index 0000000..48d73f9 --- /dev/null +++ b/src/api/daping.js @@ -0,0 +1,37 @@ +import { getRequest, postRequest } from "../libs/axios"; + +//涓绘満 +export const getHost = params => { + return getRequest('/getHost', params); +} + +//鏁伴�氳澶� +export const getSnmp = params => { + return getRequest('/getSnmp', params); +} + +//宸℃浠诲姟 +export const getTask = params => { + return getRequest('/getTask', params); +} + +//宸℃浠诲姟璇︽儏 +export const getTaskInfoById = params => { + return getRequest('/getTaskInfoById', params); +} + +//UPS +export const getUps = params => { + return getRequest('/getUps', params); +} + +//绌鸿皟 +export const getKongtiao = params => { + return getRequest('/getKongtiao', params); +} + +//鍙宠竟寮傚父鏃ュ織 +export const getWarn = params => { + return getRequest('/getWarn', params); +} + diff --git a/src/pages/show/showIndex/IndexMoudleBlock.vue b/src/pages/show/showIndex/IndexMoudleBlock.vue index 01b7e76..a82a1fa 100644 --- a/src/pages/show/showIndex/IndexMoudleBlock.vue +++ b/src/pages/show/showIndex/IndexMoudleBlock.vue @@ -550,6 +550,7 @@ <script> import {animateShanFlash} from '@/utils/animateShanFlash' + import {getHost,getSnmp,getTask,getTaskInfoById,getUps,getKongtiao} from '@/api/daping' import countTo from "vue-count-to" export default { name: "IndexMoudleBlock", @@ -571,6 +572,11 @@ }, methods: { + getHost(){ + getHost().then(res =>{ + res.data; + }) + }, start() { this.$refs.countTo.start(); }, diff --git a/src/pages/show/showIndex/TimesLogs.vue b/src/pages/show/showIndex/TimesLogs.vue index a518015..a64e821 100644 --- a/src/pages/show/showIndex/TimesLogs.vue +++ b/src/pages/show/showIndex/TimesLogs.vue @@ -113,6 +113,7 @@ <script> import {animateShanFlash} from '@/utils/animateShanFlash' + import {getWarn} from '@/api/daping' export default { name: "TimesLogs", data() { @@ -152,6 +153,11 @@ this.loading() }, methods: { + getWarn(){ + getWarn().then(res => { + res.data; + }) + }, loading() { const tl = this.gsap.timeline({defaults: {duration: 0.8}}) animateShanFlash('.zhuangshi span',{ -- Gitblit v1.9.1