|
|
@@ -17,9 +17,9 @@
|
|
|
<el-select v-model="scan.tactics" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in tactics_options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Name"
|
|
|
+ :value="item.Id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
@@ -27,7 +27,7 @@
|
|
|
<el-col :span="24">
|
|
|
<el-col :span="6"><em class="label">无线协议</em></el-col>
|
|
|
<el-col :span="18">
|
|
|
- <el-select v-model="scan.agreement" multiple placeholder="请选择">
|
|
|
+ <el-select v-model="scan.agreement" multiple placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in agreement_options"
|
|
|
:key="item.value"
|
|
|
@@ -37,22 +37,22 @@
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="24" v-if="scopeState">
|
|
|
<el-col :span="6"><em class="label">起始频率</em></el-col>
|
|
|
<el-col :span="18">
|
|
|
- <el-input v-model="scan.begin" type="number" placeholder="请输入内容"></el-input>
|
|
|
+ <el-input v-model="scan.begin" type="number" placeholder="单位100K"></el-input>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="24" v-if="scopeState">
|
|
|
<el-col :span="6"><em class="label">截止频率</em></el-col>
|
|
|
<el-col :span="18">
|
|
|
- <el-input v-model="scan.end" placeholder="请输入内容"></el-input>
|
|
|
+ <el-input v-model="scan.end" placeholder="单位100K"></el-input>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-col :span="6"><em class="label">扫描距离</em></el-col>
|
|
|
<el-col :span="18">
|
|
|
- <el-select v-model="scan.distance" placeholder="请选择">
|
|
|
+ <el-select v-model="scan.distance" placeholder="请选择">
|
|
|
<el-option
|
|
|
v-for="item in distance_options"
|
|
|
:key="item.value"
|
|
|
@@ -62,45 +62,46 @@
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-col :span="6"><em class="label">检测周期</em></el-col>
|
|
|
- <el-col :span="18">
|
|
|
- <el-input v-model="scan.cycle" type="number" placeholder="请输入内容"></el-input>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-col :span="6"><em class="label_checked">
|
|
|
- <el-checkbox v-model="checked">信号录制</el-checkbox>
|
|
|
+ <el-checkbox v-model="isRecording">信号录制</el-checkbox>
|
|
|
</em></el-col>
|
|
|
<el-col :span="18">
|
|
|
<el-button type="primary" plain size="small" @click="startScan">开始扫描</el-button>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<ul class="scan_detail">
|
|
|
+ <li>
|
|
|
+ <em>运行状态: </em>
|
|
|
+ <span>{{taskText.IsStop |filterIsStop }}</span>
|
|
|
+ </li>
|
|
|
<li>
|
|
|
<em>开始时间: </em>
|
|
|
- <span>{{result.begin}}</span>
|
|
|
+ <span>{{taskText.BeginAt|filterBeginAt }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<em>持续时间: </em>
|
|
|
- <span>{{result.hold}}</span>
|
|
|
+ <span>{{taskText.Duration |filterDuration}}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
<em>数据大小: </em>
|
|
|
- <span>{{result.date}}</span>
|
|
|
+ <span>{{parseFloat(taskText.DataSize /1024).toFixed(2)}} MB</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-row>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import Global from "../Global"
|
|
|
+
|
|
|
+ let qs = require('qs');
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- checked: true,
|
|
|
+ scopeState: false,
|
|
|
+ isRecording: true,
|
|
|
scan: {
|
|
|
tactics: 0,
|
|
|
agreement: [],
|
|
|
@@ -108,24 +109,45 @@
|
|
|
end: 0,
|
|
|
distance: 1,
|
|
|
cycle: 0,
|
|
|
- },
|
|
|
- result: {
|
|
|
- begin: '',
|
|
|
- hold: '',
|
|
|
- date: '',
|
|
|
+
|
|
|
},
|
|
|
tactics_options: [
|
|
|
{
|
|
|
- value: 0,
|
|
|
- label: '自定义扫描'
|
|
|
+ Id: 0,
|
|
|
+ Name: '自定义扫描'
|
|
|
}
|
|
|
],
|
|
|
+ taskText:{
|
|
|
+ BeginAt:'',
|
|
|
+ DataSize:'0',
|
|
|
+ Duration:'',
|
|
|
+ IsStop:false,
|
|
|
+ },
|
|
|
agreement_options: WirelessType(),
|
|
|
distance_options: WirelessRange(),
|
|
|
value: ''
|
|
|
}
|
|
|
},
|
|
|
+ props: ['taskInfo','taskResult'],
|
|
|
watch: {
|
|
|
+ taskResult: {
|
|
|
+ handler(newName, oldName) {
|
|
|
+ this.taskText.BeginAt = newName.BeginAt;
|
|
|
+ this.taskText.DataSize = newName.DataSize;
|
|
|
+ this.taskText.Duration = newName.Duration;
|
|
|
+ this.taskText.IsStop = newName.IsStop;
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ taskInfo: {
|
|
|
+ handler(newName, oldName) {
|
|
|
+ if(!newName.length) return false;
|
|
|
+ this.tactics_options = newName;
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
scan: {
|
|
|
handler(newName, oldName) {
|
|
|
if (parseInt(newName.begin) > 6000) {
|
|
|
@@ -164,33 +186,77 @@
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- // ...
|
|
|
+ // 0-6G现实范围
|
|
|
+ if (newName.agreement.indexOf(13) > -1) {
|
|
|
+ this.scopeState = true
|
|
|
+ } else {
|
|
|
+ this.scopeState = false
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.init()
|
|
|
- },
|
|
|
methods: {
|
|
|
- init() {
|
|
|
- this.writeScanResult();
|
|
|
- },
|
|
|
// 扫描开始
|
|
|
startScan() {
|
|
|
- this.$message({
|
|
|
- message: '扫描已开始',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.writeScanResult();
|
|
|
+ let that = this;
|
|
|
+ let freq06G ={};
|
|
|
+ let signalList =[];
|
|
|
+ let token = localStorage.token;
|
|
|
+ if(that.scan.begin > 0){
|
|
|
+ freq06G = {
|
|
|
+ "begin": that.scan.begin,
|
|
|
+ "end": that.scan.end
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(that.scan.agreement.length == 0){
|
|
|
+ that.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '无线协议不能为空!',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ for(var i = 0; i < that.scan.agreement.length; i++) {
|
|
|
+ signalList[i] = {
|
|
|
+ "range": that.scan.distance,
|
|
|
+ "type": that.scan.agreement[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ let Rs = {
|
|
|
+ freq06G:freq06G,
|
|
|
+ isRecording:this.isRecording,
|
|
|
+ signalList:signalList,
|
|
|
+ token: token
|
|
|
+ };
|
|
|
+ this.$emit('GetScanClick', Rs);//触发事件
|
|
|
+ },
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ filterIsStop: function (value) {
|
|
|
+ if (value) {
|
|
|
+ return "扫描中"
|
|
|
+ } else {
|
|
|
+ return "已停止";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filterBeginAt: function (value) {
|
|
|
+ if (!value) {
|
|
|
+ return "未开始"
|
|
|
+ } else {
|
|
|
+ return filterTimeToString(value);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filterDuration: function (value) {
|
|
|
+ if (!value) {
|
|
|
+ return "未开始"
|
|
|
+ } else {
|
|
|
+ return filterTimeToShortString(value);
|
|
|
+ }
|
|
|
},
|
|
|
- // 渲染扫描状态
|
|
|
- writeScanResult() {
|
|
|
- this.result.begin = "2021-01-02 09:05:21";
|
|
|
- this.result.hold = "1小时23分21秒";
|
|
|
- this.result.date = "21G";
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -206,6 +272,7 @@
|
|
|
|
|
|
.regionList {
|
|
|
width: 100%;
|
|
|
+ height: 433px;
|
|
|
overflow: hidden;
|
|
|
display: block;
|
|
|
margin: 0 auto;
|