diff --git a/src/main.js b/src/main.js index f37b5c0..188b748 100644 --- a/src/main.js +++ b/src/main.js @@ -1,11 +1,10 @@ import Vue from "vue"; import App from "./App.vue"; import ElementUI from "element-ui"; -// import "./util/rem"; import router from "./router"; import "element-ui/lib/theme-chalk/index.css"; Vue.config.productionTip = false; -Vue.prototype.$fontSize = fontSize; +// Vue.prototype.$fontSize = fontSize; Vue.use(ElementUI); new Vue({ router, diff --git a/src/router/index.js b/src/router/index.js index 637d4a5..0af4979 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -22,6 +22,128 @@ const routes = [ name: "channelconfig", component: () => import("../views/ChannelConfig.vue"), }, + + // 刘龙龙新加的全部路由 + //db网关-ip配置-无线网关 + { + path: "/wirelessgatewayip", + name: "wirelessgatewayip", + component: () => import("../views/WirelessGatewayIP.vue"), + }, + //db网关-ip配置-有线网关 + { + path: "/wiredgatewayip", + name: "wiredgatewayip", + component: () => import("../views/WiredGatewayIP.vue"), + }, + //MQTT上云-MQTT1配置 + { + path: "/mqttconfig", + name: "mqttconfig", + component: () => import("../views/MqttConfig.vue"), + }, + //斥候工业网关-ip配置-无线网关 + { + path: "/chwirelessgatewayip", + name: "chwirelessgatewayip", + component: () => import("../views/ChWirelessGatewayIP.vue"), + }, + //斥候工业网关-ip配置-有线网关 + { + path: "/chwiredgatewayip", + name: "chwiredgatewayip", + component: () => import("../views/ChWiredGatewayIP.vue"), + }, + //斥候工业网关-数据采集配置-网关配置 + { + path: "/gatewayconfiguration", + name: "gatewayconfiguration", + component: () => import("../views/GatewayConfiguration.vue"), + }, + //斥候工业网关-数据采集配置-设备配置 + { + path: "/configuration", + name: "configuration", + component: () => import("../views/Configuration.vue"), + }, + //斥候工业网关-数据采集配置-采集点配置 + { + path: "collectionpoint", + name: "collectionpoint", + component: () => import("../views/CollectionPoint.vue"), + }, + //斥候工业网关-数据上云配置-MQTT上云 + { + path: "chmqtt", + name: "chmqtt", + component: () => import("../views/ChMqtt.vue"), + }, + //串口服务器-Ip配置 + { + path: "/ckipconfig", + name: "ckipconfig", + component: () => import("../views/CkIpConfig.vue"), + }, + //串口服务器-端口配置 + { + path: "/ckportconfig", + name: "ckportconfig", + component: () => import("../views/CkPortConfig.vue"), + }, + //串口服务器-485towifi-串口及网络协议设置 + { + path: "/towifi", + name: "towifi", + component: () => import("../views/ToWifi.vue"), + }, + //串口服务器-485towifi-网口配置 + { + path: "/cknet", + name: "cknet", + component: () => import("../views/CkNet.vue"), + }, + //串口服务器-485towifi-无线配置 + { + path: "/ckwireless", + name: "ckwireless", + component: () => import("../views/CkWireless.vue"), + }, + //工业网闸配置-网络管理 + { + path: "/networkmanagement", + name: "networkmanagement", + component: () => import("../views/NetworkManagement.vue"), + }, + //工业网闸配置-对象管理 + { + path: "/objmanagement", + name: "objmanagement", + component: () => import("../views/ObjManagement.vue"), + }, + //工业网闸配置-策略管理 + { + path: "/strategyManagement", + name: "strategyManagement", + component: () => import("../views/StrategyManagement.vue"), + }, + //工业网闸配置-策略管理-添加策略 + { + path: "/addstrategy", + name: "addstrategy", + component: () => import("../views/AddStrategy.vue"), + }, + //网络优化-网关配置 + { + path: "/ntconfig", + name: "ntconfig", + component: () => import("../views/NtConfig.vue"), + }, + //网络优化-网关维护 + { + path: "/ntmaintenance", + name: "ntmaintenance", + component: () => import("../views/NtMaintenance.vue"), + }, ], }, { diff --git a/src/util/request.js b/src/util/request.js index 8afead8..74647c6 100644 --- a/src/util/request.js +++ b/src/util/request.js @@ -1,35 +1,41 @@ -import axios from 'axios'; +import axios from "axios"; // import store from '@/store/index.js'; -import { Message } from 'element-ui'; +import { Message } from "element-ui"; // 创建 axios 实例 const service = axios.create({ - baseURL: process.env.BASE_API, // api 的 base_url - withCredentials: true, - // withCredentials: true, - timeout: 600000 + baseURL: process.env.BASE_API, // api 的 base_url + withCredentials: true, + // withCredentials: true, + timeout: 600000, }); // 请求拦截器 -service.interceptors.request.use(config => { +service.interceptors.request.use( + (config) => { // config.headers['authToken'] = store.state.authToken; - config.headers['ms_username'] = localStorage.getItem('ms_username'); + config.headers["ms_username"] = localStorage.getItem("ms_username"); return config; -}, error => { - console.log('request error', error); + }, + (error) => { + console.log("request error", error); return Promise.reject(error); -}); + } +); // 响应拦截器 -service.interceptors.response.use(response => { +service.interceptors.response.use( + (response) => { return response; -}, error => { - console.log('response error', error); + }, + (error) => { + console.log("response error", error); Message({ - message: error.message, - type: 'error' + message: error.message, + type: "error", }); return Promise.reject(error); -}); + } +); -export default service; \ No newline at end of file +export default service; diff --git a/src/views/AddStrategy.vue b/src/views/AddStrategy.vue new file mode 100644 index 0000000..e908384 --- /dev/null +++ b/src/views/AddStrategy.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/ChMqtt.vue b/src/views/ChMqtt.vue new file mode 100644 index 0000000..0ddaff5 --- /dev/null +++ b/src/views/ChMqtt.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/ChWiredGatewayIP.vue b/src/views/ChWiredGatewayIP.vue new file mode 100644 index 0000000..24cb8d6 --- /dev/null +++ b/src/views/ChWiredGatewayIP.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/ChWirelessGatewayIP.vue b/src/views/ChWirelessGatewayIP.vue new file mode 100644 index 0000000..f776c83 --- /dev/null +++ b/src/views/ChWirelessGatewayIP.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/CkIpConfig.vue b/src/views/CkIpConfig.vue new file mode 100644 index 0000000..5ed7903 --- /dev/null +++ b/src/views/CkIpConfig.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/CkNet.vue b/src/views/CkNet.vue new file mode 100644 index 0000000..865d5d5 --- /dev/null +++ b/src/views/CkNet.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/CkPortConfig.vue b/src/views/CkPortConfig.vue new file mode 100644 index 0000000..59b83a9 --- /dev/null +++ b/src/views/CkPortConfig.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/CkWireless.vue b/src/views/CkWireless.vue new file mode 100644 index 0000000..120eb4c --- /dev/null +++ b/src/views/CkWireless.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/CollectionPoint.vue b/src/views/CollectionPoint.vue new file mode 100644 index 0000000..a93d6fe --- /dev/null +++ b/src/views/CollectionPoint.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/Configuration.vue b/src/views/Configuration.vue new file mode 100644 index 0000000..5110dc9 --- /dev/null +++ b/src/views/Configuration.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/GatewayConfiguration.vue b/src/views/GatewayConfiguration.vue new file mode 100644 index 0000000..c6e40ff --- /dev/null +++ b/src/views/GatewayConfiguration.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/Index.vue b/src/views/Index.vue index bb280cc..62f68fe 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -1,9 +1,48 @@