Commit 73ecf1bc authored by wangdong's avatar wangdong

aaa

parent 194efd3f
<template> <template>
<div> <div>
<el-progress :percentage="process" :format="format" ></el-progress>
<el-popover <el-popover
placement="right" placement="right"
width="600" width="600"
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
资源利用率 \(U_A = {1 \over \sum\limits_1^n {RA_t^n}\cdot {PA_t^n} }=\){{utilization_a}}\(\rm{\% }\)</div> 资源利用率 \(U_A = {1 \over \sum\limits_1^n {RA_t^n}\cdot {PA_t^n} }=\){{utilization_a}}\(\rm{\% }\)</div>
</el-popover> </el-popover>
<!-- <div id='question-id' v-html="newlatex"> <!-- <div id='question-id' v-html="newlatex">
...@@ -57,6 +57,8 @@ export default { ...@@ -57,6 +57,8 @@ export default {
}, },
data() { data() {
return { return {
process:0,
requires:[],
hover: false, hover: false,
utilization_a:2, utilization_a:2,
questionToOptions: '', questionToOptions: '',
...@@ -99,6 +101,14 @@ export default { ...@@ -99,6 +101,14 @@ export default {
}, },
}, },
mounted() { mounted() {
for(let i1=0;i1<17;i1+=0.5)
for(let i2=0;i2<17;i2+=0.5)
for(let i3=0;i3<17;i3+=0.5){
if(i1+i2+i3<17 && i1>1.5&& i2>1.5&& i3>1.5){
this.requires.push([i1,i2,i3])
}
}
this.count()
}, },
methods: { methods: {
async getping(imsi) { async getping(imsi) {
...@@ -108,6 +118,21 @@ export default { ...@@ -108,6 +118,21 @@ export default {
}); });
}, 1000); }, 1000);
}, },
count() {
let i=0
this.timer_process = setInterval(() => {
if(this.process%100<0.084){
flexranAPI.SET_SLICE_RE({Require:this.requires[Math.floor(Math.random()*this.requires.length)]})
}
this.process+=(100/(120*1000)*100)
this.process=this.process%100
i++
}, 100);
},
format(percentage) {
return percentage === 100 ? '' : `${(120-percentage*120/100).toFixed(2)}`;
}
}, },
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -89,41 +89,41 @@ export default { ...@@ -89,41 +89,41 @@ export default {
name: "OAI_ENB", name: "OAI_ENB",
active: false, active: false,
url: url:
"http://202.204.54.185:2222/ssh/host/192.168.1.68?autologin=1&user=root&pass=123456", "http://cn1.ustb-oai.com:2222/ssh/host/nfapi0.ustb-oai.com?autologin=1&user=root&pass=123456",
}, },
{ {
name: "DroneFront", name: "DroneFront",
active: false, active: false,
url: url:
"http://202.204.54.185:2222/ssh/host/192.168.1.61?autologin=1&user=root&pass=123456", "http://cn1.ustb-oai.com:2222/ssh/host/cn1.ustb-oai.com?autologin=1&user=root&pass=123456",
}, },
{ {
name: "AI-Engine", name: "AI-Engine",
active: false, active: false,
url: url:
"http://202.204.54.185:2222/ssh/host/192.168.1.80?autologin=1&user=root&pass=199710", "http://cn1.ustb-oai.com:2222/ssh/host/ai.ustb-oai.com?autologin=1&user=root&pass=199710",
}, },
{ {
name: "CoreNet", name: "CoreNet",
active: false, active: false,
url: url:
"http://202.204.54.185:2222/ssh/host/192.168.1.61?autologin=1&user=root&pass=123456", "http://cn1.ustb-oai.com:2222/ssh/host/cn1.ustb-oai.com?autologin=1&user=root&pass=123456",
} }
, ,
{ {
name: "Video", name: "Video",
active: false, active: false,
url: url:
"http://202.204.54.185:82/oai/", "http://cn1.ustb-oai.com:82/oai/",
}, },
{ {
name: "OAI", name: "OAI",
active: false, active: false,
url: url:
"http://202.204.54.185:2222/ssh/host/192.168.1.55?autologin=1&user=root&pass=123456", "http://cn1.ustb-oai.com:2222/ssh/host/nafpi1.ustb-oai.com?autologin=1&user=root&pass=123456",
}], }],
srcs: [ srcs: [
{ name: "FlexRan", active: true, url: "http://202.204.54.185:81" }, { name: "FlexRan", active: true, url: "http://cn1.ustb-oai.com:81" },
], ],
menus: [ menus: [
{ name: "FlexRan", active: true }, { name: "FlexRan", active: true },
...@@ -144,12 +144,12 @@ export default { ...@@ -144,12 +144,12 @@ export default {
let returnCitySN = JSON.parse(res.split("= ")[1].split(";")[0]); let returnCitySN = JSON.parse(res.split("= ")[1].split(";")[0]);
let local = await flexranAPI.DETECT_LOCAL({}, returnCitySN["cip"]); let local = await flexranAPI.DETECT_LOCAL({}, returnCitySN["cip"]);
if (local.area == "北京科技大学") { if (local.area == "北京科技大学") {
this.src = `http://202.204.54.185:2224`; this.src = `http://cn1.ustb-oai.com:2224`;
} else { } else {
this.src = `http://ustb-oai.com:2224`; this.src = `http://ustb-oai.com:2224`;
} }
} catch (error) { } catch (error) {
this.src = `http://202.204.54.185:2224`; this.src = `http://cn1.ustb-oai.com:2224`;
} }
}, },
methods: { methods: {
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
import Vue from "vue"; import Vue from "vue";
import vueJsonTreeView from "vue-json-tree-view"; import vueJsonTreeView from "vue-json-tree-view";
import * as flexranAPI from "../../../utils/flexranAPI"; import * as flexranAPI from "../../../utils/flexranAPI";
let flag=1
export default { export default {
data() { data() {
return { return {
...@@ -152,7 +153,52 @@ export default { ...@@ -152,7 +153,52 @@ export default {
}, },
dataList: { dataList: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
this.littleDate=newValue.slice((this.currentPage-1)*4,(this.currentPage-1)*4+4) this.littleDate=newValue.slice((this.currentPage-1)*4,(this.currentPage-1)*4+4)
if(flag)
if(newValue.length>=4){
flexranAPI
.CHANGE_SLICE_ASSOC(
{
ueConfig: [
{
imsi: 208920100001111,
dlSliceId: 1,
},
{
imsi: 208920100001100,
dlSliceId: 2,
}, {
imsi: 208920100001101,
dlSliceId: 3,
}, {
imsi: 208920100001102,
dlSliceId: 0,
},
],
},
this.$store.state.bs_id
).then((res) => {
if (res.status == "Ok") {
flag=0
this.$message({
type: "success",
message: "切换成功!",
});
flag = 0
}
}
) .catch((err)=> {
// error
});;
}
}, },
deep: true, deep: true,
}, },
......
import { service, request } from './network_services' import { service, request } from './network_services'
let url = `ustb-oai.com` let url = `cn1.ustb-oai.com`
export function SET_URL (data = {}) { export function SET_URL (data = {}) {
// 接口请求 // 接口请求
url="202.204.54.185" url="cn1.ustb-oai.com"
} }
export function GET_URL (data = {}) { export function GET_URL (data = {}) {
// 接口请求 // 接口请求
...@@ -166,7 +166,12 @@ export function GET_URL (data = {}) { ...@@ -166,7 +166,12 @@ export function GET_URL (data = {}) {
data data
}) })
} }
export function SET_SLICE_RE (data = {}, ENB_ID) { /**
* @description Rate Requirment
* @param {"Require":[0,0,4]}
* @returns
*/
export function SET_SLICE_RE (data = {}) {
// 接口请求 // 接口请求
return request({ return request({
url: `http://${url}:8110/api/setRequire/`, url: `http://${url}:8110/api/setRequire/`,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment