<template>
|
<div class="bot" v-if="showtool" id="move3">
|
<div class="top1">
|
<span class="botcon">
|
<span class="icon"></span>
|
<span class="text">监测网覆盖能力评估</span>
|
</span>
|
<span class="close" @click="close">x</span>
|
</div>
|
<div class="next">
|
<el-form ref="form" :model="form" label-width="250px">
|
<!-- <el-form-item label="监测站:">
|
<el-button @click="ClickName()">选中</el-button>
|
<span class="clicktext">{{ chooseJCZ }}</span>
|
</el-form-item> -->
|
|
<el-form-item label="传播模型" prop="name">
|
<el-select
|
v-model="form.propModel"
|
@change="chosepopModel"
|
style="width: 100%"
|
>
|
<el-option
|
label="OKumura-Hata 模型(150MHz~1500MHz)"
|
value="1"
|
></el-option>
|
<el-option
|
label="COST231 Hata 模型(1500MHz~2400MHz)"
|
value="12"
|
></el-option>
|
<el-option label="ITU 1546模型(30MHz~3GHz)" value="2"></el-option>
|
<el-option
|
label="ITU 452微波模型(100MHz~50GHz)"
|
value="41"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
<!-- <el-form-item label="分析类型" prop="name">
|
<el-select v-model="form.analysisType" placeholder="请选择活动区域">
|
<el-option label="单次分析" value="shanghai"></el-option>
|
<el-option label="多次分析" value="shanghai"></el-option>
|
</el-select>
|
</el-form-item> -->
|
<el-form-item label="设备类型" prop="equtype">
|
<el-select
|
v-model="form.sbtype"
|
placeholder="请选择活动区域"
|
@change="selSBtype"
|
style="width: 100%"
|
>
|
<el-option label="黑广播" value="0"></el-option>
|
<el-option label="其他" value="1"></el-option>
|
<el-option label="伪基站" value="2"></el-option>
|
<el-option label="对讲机" value="3"></el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="发射高度:">
|
<el-input v-model="form.txAntHeight">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">m</i>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="发射频率:">
|
<el-input v-model="form.txFrequency">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">MHz</i>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="发射功率:">
|
<el-input v-model="form.txPower">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">dBm</i>
|
</el-input>
|
</el-form-item>
|
|
<el-form-item label="发射增益:">
|
<el-input v-model="form.txAntGain">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">dBi</i>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="接收灵敏度:">
|
<el-input v-model="form.coverageThreshold">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">dBm</i>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="接收增益:">
|
<el-input v-model="form.rxAntGain">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px">dBi</i>
|
</el-input>
|
</el-form-item>
|
<el-form-item label="选择区域:">
|
<el-button type="primary" @click="kx">框选</el-button>
|
<el-input
|
type="textarea"
|
v-model="form.desc"
|
style="width: 84%"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="选择台站:">
|
<el-row>
|
<el-button type="primary" @click="SelectTZ">选择</el-button>
|
<el-input v-model="form.selecttz" style="width: 60%">
|
<i slot="suffix" style="margin-right: 10px; font-size: 35px"></i>
|
</el-input>
|
</el-row>
|
</el-form-item>
|
</el-form>
|
<div class="btns">
|
<span @click="analyse">分析</span>
|
<span @click="clear">重置</span>
|
<!-- <span style="">生成报告</span> -->
|
</div>
|
</div>
|
<div class="bottable" v-if="isFX" >
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { createPic, stationCover, getbounds } from "../../api/http";
|
import { drawPolygon } from "../../utils/work";
|
import bus from "../../utils/bus";
|
|
let Base64 = require("js-base64").Base64;
|
export default {
|
data() {
|
return {
|
form: {
|
frequency: "",
|
txAntHeight: 20,
|
txFrequency: 100,
|
txPower: 50,
|
txAntGain: 0,
|
rxAntHeight: 50,
|
coverageThreshold: "-90",
|
rxAntGain: 0,
|
monFrequency: "",
|
propModel: 2,
|
modelName: "",
|
monstationGuid: "2",
|
analysisType: "sw",
|
freqPoint: 100,
|
sbtype: "黑广播",
|
selecttz: "",
|
desc: "",
|
selecttzid: "",
|
},
|
formData: [],
|
smadata: {},
|
imageid: null,
|
showtool: false,
|
offgain: null,
|
isFX: false,
|
};
|
},
|
mounted() {
|
bus.$on("showdio", (e) => {
|
this.showtool = e == 6;
|
});
|
bus.$emit("newData", (e) => {
|
this.smadata = e;
|
});
|
bus.$on("ismonstationGuid", (e) => {
|
let str;
|
e.forEach((item) => {
|
str ? (str = str + "," + item.name) : (str = item.name);
|
});
|
this.form.selecttz = str;
|
});
|
bus.$on("isdp", (e) => {
|
this.form.desc = e;
|
});
|
bus.$on("clearEve", (e) => {
|
this.clear();
|
});
|
},
|
methods: {
|
close() {
|
this.showtool = false;
|
// window.showtable = false;
|
//重置
|
// if (this.imageid) {
|
// window.Viewer.entities.removeById(this.imageid);
|
// this.imageid = null;
|
// }
|
},
|
clear() {
|
this.form = {
|
frequency: "",
|
txAntHeight: 20,
|
txFrequency: 100,
|
txPower: 50,
|
txAntGain: 0,
|
rxAntHeight: 50,
|
coverageThreshold: "-90",
|
rxAntGain: 0,
|
monFrequency: "",
|
propModel: "2",
|
modelName: "",
|
monstationGuid: "2",
|
analysisType: "sw",
|
freqPoint: 100,
|
sbtype: "黑广播",
|
desc: [],
|
selecttz: "",
|
|
//areaResult: 6207.2001,
|
};
|
//重置
|
if (this.imageid) {
|
window.Viewer.entities.removeById(this.imageid);
|
this.imageid = null;
|
}
|
window.datatype && viewer.entities.remove(window.datatype);
|
// window.showtable = false;
|
},
|
|
func(a, b) {
|
return parseInt(a) - parseInt(b);
|
},
|
analyse() {
|
// this.close();
|
let that = this;
|
if (that.imageid) {
|
window.Viewer.entities.removeById(that.imageid);
|
that.imageid = null;
|
}
|
// window.showtable = true;
|
window.objform = that.form;
|
if (window.monstationGuidList.length > 0) {
|
let arr = [];
|
window.monstationGuidList.forEach((item) => {
|
arr.push(item.id);
|
});
|
arr = arr.sort(that.func);
|
that.formData = [
|
{
|
//分析频率:
|
txFrequency: window.objform.txFrequency, //发射高度:
|
txAntHeight: window.objform.txAntHeight, //发射功率:
|
txPower: window.objform.txPower, //发射增益:
|
txAntGain: window.objform.txAntGain, //接收高度
|
rxAntHeight: window.objform.rxAntHeight, //接收灵敏度
|
coverageThreshold: parseInt(window.objform.coverageThreshold), //接收增益
|
rxAntGain: window.objform.rxAntGain, //传播模型:
|
propModel: 2, // 监测站ID列表
|
monStations: arr, // 分析类型(默认1)
|
analysisType: window.objform.analysisType,
|
// points: "[[30.9491747,121.446167],[31.222192,121.446167],[31.222192,121.7625732],[30.9491747,121.7625732]]",
|
points: JSON.stringify(window.objform.desc),
|
value: [],
|
propModelName: "",
|
tableData: [],
|
},
|
];
|
const loading = that.$loading({
|
lock: true,
|
text: "计算中",
|
spinner: "el-icon-loading",
|
background: "rgba(0, 0, 0, 0.7)",
|
});
|
stationCover(that.formData)
|
.then((res) => {
|
if (res.message === "Success") {
|
let points = res.data.imgBounds;
|
getbounds({ file: Base64.encode(res.data.url) }).then((res1) => {
|
let points = res1.data.points;
|
let data = {
|
colorSchemes: 1,
|
file: Base64.encode(res.data.url),
|
jsonStr: "1_2_3_;227A71_E3EA71_FF0000_",
|
showBounds: JSON.stringify(that.form.desc) ,
|
};
|
createPic(data).then((res2) => {
|
let rectangle = sgworld.Creator.addSimpleGraphic(
|
"rectangle",
|
{
|
removeEdit: true,
|
coordinates: Cesium.Rectangle.fromDegrees(
|
points[0].x,
|
points[0].y,
|
points[1].x,
|
points[1].y
|
),
|
color: "rgba(255,255,255,0.5)",
|
image:
|
"http://221.224.53.36:9081/calc/picurl?file=" +
|
Base64.encode(res2.data),
|
}
|
);
|
if (that.imageid) {
|
window.Viewer.entities.removeById(that.imageid);
|
that.imageid = null;
|
}
|
that.imageid = rectangle.id;
|
|
loading.close();
|
that.$message({
|
message: "计算成功",
|
type: "success",
|
});
|
that.isFX = true;
|
});
|
});
|
|
}
|
})
|
.catch((error) => {
|
loading.close();
|
});
|
}
|
},
|
selSBtype(param) {
|
switch (param) {
|
//黑广播
|
case "0":
|
this.form.txAntHeight = 10;
|
this.form.txFrequency = 100;
|
this.form.txPower = 50;
|
this.form.txAntGain = 0;
|
this.form.coverageThreshold = "-90";
|
this.form.rxAntGain = 0;
|
break;
|
//其他
|
case "1":
|
this.form.txAntHeight = 3;
|
this.form.txFrequency = 900;
|
this.form.txPower = 30;
|
this.form.txAntGain = 0;
|
this.form.coverageThreshold = "-90";
|
this.form.rxAntGain = 0;
|
break;
|
//伪基站
|
case "2":
|
this.form.txAntHeight = 10;
|
this.form.txFrequency = 954;
|
this.form.txPower = 40;
|
this.form.txAntGain = 0;
|
this.form.coverageThreshold = "-90";
|
this.form.rxAntGain = 0;
|
break;
|
//对讲机
|
case "3":
|
this.form.txAntHeight = 2;
|
this.form.txFrequency = 450;
|
this.form.txPower = 30;
|
this.form.txAntGain = 0;
|
this.form.coverageThreshold = -90;
|
this.form.rxAntGain = 0;
|
break;
|
}
|
},
|
chosepopModel(param) {
|
this.form.propModel = param;
|
},
|
|
//选择台站
|
SelectTZ() {
|
window.allowClick = true;
|
if (window.monstationGuidList.length > 0) {
|
window.monstationGuidList = [];
|
this.form.selecttz = "";
|
this.form.selecttzid = [];
|
}
|
},
|
//创建面
|
kx() {
|
drawPolygon();
|
},
|
},
|
};
|
</script>
|
|
<style scoped>
|
.bot {
|
width: 1000px;
|
transform: translate(1800px, 200px);
|
height: 1400px;
|
background: url(~@/assets/image/test/22.png);
|
background-size: 100% 100%;
|
background-repeat: no-repeat;
|
position: absolute;
|
left: 2120px;
|
top: 280px;
|
}
|
.top1 {
|
width: 95%;
|
height: 10%;
|
font-size: 45px;
|
font-weight: bold;
|
margin: 0px auto;
|
border-bottom: 2px solid #fff;
|
color: #fff;
|
letter-spacing: 3px;
|
}
|
.icon {
|
position: absolute;
|
left: 60px;
|
width: 40px;
|
height: 40px;
|
top: 50px;
|
background-size: 100% 100% !important;
|
background-repeat: no-repeat !important;
|
background-position: center !important;
|
background: url(~@/assets/image/subject/题标.png);
|
}
|
.text {
|
display: inline-block;
|
margin-left: 90px;
|
}
|
.close {
|
position: absolute;
|
font-size: 65px;
|
right: 60px;
|
font-weight: 400;
|
top: 25px;
|
}
|
.close:hover {
|
color: red;
|
transition: color 1s;
|
cursor: pointer;
|
}
|
.next {
|
width: 99%;
|
height: 84%;
|
margin: 0 auto;
|
overflow: auto;
|
}
|
.next >>> .el-form-item {
|
margin-top: 40px;
|
}
|
.next >>> .el-input {
|
width: 84%;
|
}
|
.next >>> .el-date-editor {
|
width: 390px;
|
}
|
.next >>> .el-form-item__label {
|
color: #fff;
|
font-size: 40px;
|
}
|
.next >>> .el-select {
|
width: 640px;
|
}
|
.next >>> .el-input__inner {
|
font-size: 35px;
|
}
|
.next >>> .el-form-item__error {
|
font-size: 30px;
|
font-weight: 700;
|
}
|
.botcon {
|
display: inline-block;
|
margin-top: 34px;
|
}
|
.btns {
|
margin-top: 50px;
|
width: 100%;
|
height: 70px;
|
transform: translateX(-0px);
|
display: flex;
|
justify-content: center;
|
}
|
.btns > span {
|
display: block;
|
width: 200px;
|
height: 70px;
|
border: 1px solid #000;
|
text-align: center;
|
font-size: 35px;
|
line-height: 70px;
|
margin: 0 40px;
|
cursor: pointer;
|
}
|
.btns > span:nth-child(3) {
|
color: #fff;
|
background-image: linear-gradient(#76c2f6, #6a9cf1);
|
}
|
.btns > span:nth-child(-n + 2) {
|
color: #000;
|
background: #cadaea;
|
}
|
.clicktext {
|
font-size: 40px;
|
margin-left: 20px;
|
color: #fff;
|
}
|
.bottable {
|
position: absolute;
|
width: 240px;
|
height: 350px;
|
border: 5px solid #fff;
|
top: 1390px;
|
right: 100px;
|
background-size: 100% 100% !important;
|
background: url(~@/assets/image/subject/jcw.png);
|
background-repeat: no-repeat;
|
background-position: center;
|
}
|
#small,
|
#small1 {
|
width: 137px;
|
}
|
#small1 {
|
background: red;
|
}
|
.toptable {
|
width: 1010px;
|
height: 60px;
|
position: absolute;
|
top: -65px;
|
font-size: 40px;
|
letter-spacing: 5px;
|
text-align: center;
|
background: #0aafc9;
|
transform: translateX(-5px);
|
}
|
</style>
|