Commit 5df4c3fd authored by wangdng's avatar wangdng

sss

parent 73ecf1bc
<template>
<div>
{{getterRE}}
{{JSON.stringify(slice_info)}}
<!-- <iframe id="show-iframe" style="height:500px;width:100%" frameborder=0 name="showHere" scrolling=auto :src="src"></iframe> -->
</div>
</template>
<script>
import Vue from "vue";
import vueJsonTreeView from "vue-json-tree-view";
// 渲染进程接收主进程的传参
const { ipcRenderer } = require("electron");
Vue.use(vueJsonTreeView);
export default {
data() {
return {
dataList: [],
color_arrs:["info","danger","warning","success"],
slices_getter: "a",
};
},
computed: {
slice_info(){
return this.$store.state.slice_info
},
getterSlice(){
return this.$store.getters.getterSlice
}
,
getterRE(){
return this.$store.state.re
}
},
watch:{
// slice_info:{
// function(val, oldVal) {console.log(val,oldVal)},
// deep: true
// }
}
,
mounted() {
let a = {
dl: {
algorithm: "DDQN",
slices: [
{
id: 0,
label: "Besteffort",
ddqn: {
typeid: 0,
arb: 0,
mrb: 0,
},
},
],
},
};
ipcRenderer.on("eNB", (event, arg) => {
if (arg) {
flexranAPI.START_ENB({});
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
setTimeout(() => {
flexranAPI.ADD_SLICE(a, -1);
loading.close();
this.$message({
message: "成功启动OAI基站",
type: "success",
});
}, 4000);
}
});
ipcRenderer.on("eNBl2", (event, arg) => {
if (arg) {
flexranAPI.START_ENB_L2({});
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
setTimeout(() => {
flexranAPI.ADD_SLICE(a, -1);
loading.close();
this.$message({
message: "成功启动OAI基站",
type: "success",
});
}, 2000);
}
});
ipcRenderer.on("addUE", (event, arg) => {
if (arg) {
this.$prompt('请输入激活UE数目', 'L2-nFAPI', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[0-9]$|^[0-2][0-9]$|^3[0-2]$/,
inputErrorMessage: 'MAX_UE=32'
}).then(({ value }) => {
flexranAPI.START_ENB_L2({ues:value});
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
setTimeout(() => {
loading.close();
this.$message({
message: "成功启动OAI基站",
type: "success",
});
}, 2000);
setTimeout(()=>{
flexranAPI.ADD_SLICE(a, -1);
},4000)
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
});
// flexranAPI.ADD_UE({ueid:this.$store.state.ue_nums});
// console.log(arg)
// this.$store.commit("addUes", {});
}
});
},
};
</script>
<style scoped>
html,
body,
#app {
height: 100%;
}
.title {
color: #888;
font-size: 18px;
font-weight: initial;
letter-spacing: 0.25px;
margin-top: 10px;
}
.items {
margin-top: 8px;
}
.item {
display: flex;
margin-bottom: 6px;
}
.item .name {
color: #6a6a6a;
margin-right: 6px;
}
.item .value {
color: #35495e;
font-weight: bold;
}
</style>
......@@ -35,7 +35,7 @@
>
资源利用率 \(U_A = {1 \over \sum\limits_1^n {RA_t^n}\cdot {PA_t^n} }=\){{utilization_a}}\(\rm{\% }\)</div>
</el-popover>
<cal-page></cal-page>
<!-- <div id='question-id' v-html="newlatex">
......@@ -50,7 +50,7 @@
<script>
import * as flexranAPI from "../../../utils/flexranAPI";
import globalVariable from '../../../utils/globalVariable'
import CalPage from "./CalPage"
export default {
props: {
latex:String
......@@ -72,20 +72,9 @@ export default {
return `${this.latex}`
}
},
watch: {
newlatex: {
handler(newValue, oldValue) {
console.log(newValue)
this.$nextTick(function () {
if(globalVariable.isMathjaxConfig){
globalVariable.initMathjaxConfig();
}
globalVariable.MathQueue("question-id");
})
},
deep: true,
},
components: { "cal-page": CalPage },
watch:{
hover: {
handler(newValue, oldValue) {
console.log(this.hover);
......
......@@ -47,7 +47,6 @@
</el-table-column> -->
</el-table>
</el-card>
{{getterRE}}
<flex-ran></flex-ran>
......
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