main
zhangqun 2 years ago
parent 56756773f1
commit 364eaea1f9
  1. 1
      src/router/axios.js
  2. 19
      src/util/dispatch.js
  3. 5
      src/views/dispatch/index.vue
  4. 2
      vue.config.js

@ -35,6 +35,7 @@ axios.interceptors.request.use(config => {
//开启 progress bar
NProgress.start();
//地址为已经配置状态则不添加前缀
console.log(config)
if (!isURL(config.url) && !config.url.startsWith(baseUrl)) {
config.url = baseUrl + config.url
}

@ -65,12 +65,12 @@ client.serverConnectStateChanged.on((state) => {
});
export function regist() {
var ip = "http://192.168.1.134";//$("txtServerIP").value;
var port = "8081";////$("txtServerPort").value;
var businesPort = $("txtbusinesPort").value;
var userName = $("txtUsername").value;
var password = $("txtPassword").value;
var userType = $("cmbUserType").value;
var ip = "192.168.1.134";//$("txtServerIP").value;
var port = "7443";////$("txtServerPort").value;
var businesPort = '60002';//$("txtbusinesPort").value;
var userName = '2000';//$("txtUsername").value;
var password = '123456';//$("txtPassword").value;
var userType = '2';//$("cmbUserType").value;
// var options = { ip, port, businesPort, userName, password, userType, null: HTMLVideoElement, videoRemoteElement }
var resourceUrl = "";
@ -78,9 +78,10 @@ export function regist() {
// var resourceUrl = "softswitch";
// var businessResourceUrl = "dispatch";
var options = { ip, port, businesPort, userName, password, userType, resourceUrl, businessResourceUrl }
// var options = { ip, port, businesPort, userName, password, userType, resourceUrl, businessResourceUrl }
// var options = { ip, port, businesPort, userName, password, userType }
var options = { ip, port, businesPort, userName, password, userType }
console.log('register')
client.regist(options);
}
@ -89,7 +90,7 @@ export function unRegist() {
}
export function isRegisted() {
alert("已注册: " + client.isRegisted);
console.log("已注册: " + client.isRegisted);
}
// function onForceKickoutClick() {

@ -393,7 +393,7 @@
<script>
import {getGroupList,deleteUser,addUser} from "@/api/dispatch/dispatch"
import { client, isRegisted, mylog } from "../../util/dispatch"
import { client, regist , isRegisted, mylog } from "../../util/dispatch"
export default {
name: "alarmCenter",
@ -546,6 +546,9 @@ export default {
mounted() {
},
created(){
if(!isRegisted()) {
regist();
}
this.treeData.map(item =>{
this.defaultExpandIds.push(item.id)
})

@ -68,7 +68,7 @@ module.exports = {
target: "http://192.168.1.134:8081",
ws: true,
pathRewrite: {
"^/dispatchApi": "/api",
"^/dispatchApi": "/",
},
},
},

Loading…
Cancel
Save