<template>
|
<div class="app-container">
|
<el-row>
|
<el-col
|
:span="24"
|
style="height: 45px; text-align: left; margin-top: 20px"
|
>
|
<el-radio-group v-model="type" style="margin-right: 15px">
|
<el-radio-button label="时间段"></el-radio-button>
|
<el-radio-button label="单日"></el-radio-button>
|
<el-radio-button label="单月"></el-radio-button>
|
<el-radio-button label="年度"></el-radio-button>
|
</el-radio-group>
|
<span style="margin-right: 15px">
|
<el-date-picker
|
v-model="search.valueDay"
|
:type="
|
type == '时间段'
|
? 'date'
|
: type == '单月'
|
? 'month'
|
: type == '年度'
|
? 'year'
|
: 'date'
|
"
|
:placeholder="
|
type == '时间段'
|
? '选择日期'
|
: type == '单月'
|
? '选择月份'
|
: type == '年度'
|
? '选择年份'
|
: '选择日期'
|
"
|
clearable
|
style="width: 130px"
|
></el-date-picker>
|
</span>
|
<span v-show="type == '时间段'" style="margin-right: 15px">
|
<el-time-select
|
v-model="search.valueTime"
|
:picker-options="{
|
start: '00:00',
|
step: '00:30',
|
end: '23:30',
|
}"
|
placeholder="选择时间"
|
clearable
|
style="width: 130px"
|
></el-time-select>
|
</span>
|
<el-input
|
placeholder="查询广播"
|
suffix-icon="el-icon-service"
|
v-model="search.search_fm"
|
style="margin-right: 15px; width: 130px"
|
></el-input>
|
<el-select
|
v-model="determine"
|
placeholder="请选择判定结果"
|
@change="handleChange"
|
style="margin-right: 15px"
|
>
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
></el-option>
|
</el-select>
|
</el-col>
|
|
<el-col :span="24" class="Device" style="margin-top: 30px">
|
<el-table
|
:data="tableData"
|
:height="tableH"
|
v-loading="loading"
|
stripe
|
size="small"
|
class="detailTable"
|
>
|
<el-table-column type="index" label="#"></el-table-column>
|
<el-table-column label="频率" prop="frequencyValue"></el-table-column>
|
<el-table-column
|
label="总扫描次数"
|
prop="count_total"
|
></el-table-column>
|
<el-table-column label="合法频率" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_0)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_0 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="非法频点" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_1)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_1 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="误报" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_2)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_2 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="白名单" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_3)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_3 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="异地频点" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_4)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_4 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="疑似非法频点" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_5)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_5 }}</small>
|
</template>
|
</el-table-column>
|
<el-table-column label="其他" width="180">
|
<template slot-scope="scope">
|
<el-progress
|
:percentage="
|
percentage(scope.row.count_total, scope.row.count_status_6)
|
"
|
:text-inside="true"
|
:stroke-width="15"
|
:color="color"
|
style="width: 120px; display: inline-block"
|
></el-progress>
|
<small>{{ scope.row.count_status_6 }}</small>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="平均场强值" prop="avg_level">
|
</el-table-column>
|
|
<el-table-column label="操作" width="120">
|
<template slot-scope="scope">
|
<el-button size="mini" type="success" @click="lookAll(scope)"
|
>查看全部</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-col>
|
<el-col :span="24" style="margin-top: 5px">
|
<el-pagination
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
:current-page="pageNo"
|
:page-sizes="[10, 20, 30, 50]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="totalCount"
|
>
|
</el-pagination>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
<script>
|
import { originalColor } from "@/utils/chartCustomer.js";
|
|
import data from "@/utils/other.js";
|
|
export default {
|
watch: {
|
search: {
|
handler(n, o) {
|
if (this.timer) {
|
clearTimeout(this.timer);
|
}
|
this.timer = setTimeout(() => {
|
this.getInfo();
|
}, 300);
|
},
|
deep: true,
|
},
|
determine: {
|
handler(n, o) {
|
if (this.timer) {
|
clearTimeout(this.timer);
|
}
|
this.timer = setTimeout(() => {
|
this.getInfo();
|
}, 500);
|
},
|
deep: true,
|
},
|
type: {
|
handler(n, o) {
|
if (this.timer) {
|
clearTimeout(this.timer);
|
}
|
this.timer = setTimeout(() => {
|
this.getInfo();
|
}, 500);
|
},
|
deep: true,
|
},
|
},
|
data() {
|
return {
|
timer: null,
|
totalCount: 100,
|
pageNo: 1,
|
pageSize: 10,
|
tableData: [],
|
tableH: null,
|
otherAct: [{ item: "查看所有", id: "", type: "primary" }],
|
type: "年度",
|
options: [
|
{
|
value: "0",
|
label: "合法频率",
|
},
|
{
|
value: "1",
|
label: "非法频点",
|
},
|
{
|
value: "2",
|
label: "误报",
|
},
|
{
|
value: "3",
|
label: "白名单",
|
},
|
{
|
value: "4",
|
label: "异地频点",
|
},
|
{
|
value: "5",
|
label: "疑似非法频点",
|
},
|
{
|
value: "6",
|
label: "其他",
|
},
|
],
|
|
queryParams: {
|
page: 1,
|
size: 10,
|
VF: "",
|
table: "t_fm_scan_timestamp",
|
},
|
determine: "",
|
search: {
|
valueTime: new Date().getHours() + ":00",
|
valueDay: new Date(),
|
search_fm: "",
|
},
|
loading: false,
|
colors: originalColor,
|
color: [
|
{ color: "#9D96F5", percentage: 10 },
|
{ color: "#FF9F7F", percentage: 20 },
|
{ color: "#FB7293", percentage: 30 },
|
{ color: "#37A2DA", percentage: 40 },
|
{ color: "#67E0E3", percentage: 50 },
|
{ color: "#9FE6B8", percentage: 60 },
|
{ color: "#E690D1", percentage: 80 },
|
{ color: "#E7BCF3", percentage: 100 },
|
],
|
};
|
},
|
mounted() {
|
this.tableH = window.innerHeight - 135 + "px";
|
this.tableData = data.data;
|
this.getInfo();
|
},
|
methods: {
|
lookAll(scope) {
|
this.$router.push({
|
path: "/lookAllDetails",
|
query: { frequency: scope.row.frequencyValue },
|
});
|
},
|
getInfo() {
|
|
this.loading = true;
|
let typeValue = this.formatType(this.type);
|
|
let dateValue =
|
this.search.valueDay == ""
|
? "2021"
|
: this.formatDate(this.search.valueDay);
|
|
let tmeValue =
|
this.type == "时间段" ? this.search.valueTime.split(":")[0] : "";
|
let param = {
|
bid: "getStatSepctrum",
|
querymode: typeValue,
|
timevalue1: dateValue,
|
timevalue2: tmeValue,
|
statuvalue_: this.determine == "" ? 5 : this.determine,
|
frequency: this.search.search_fm,
|
pageno: this.pageNo,
|
pagesize: this.pageSize,
|
};
|
this.$getJSON(
|
window.backstageURL + "dataservice/getNoTokenData",
|
param
|
).then((res) => {
|
this.tableData = res.data.data[0];
|
this.totalCount = Number(res.data.data[1][0].counter);
|
this.loading = false
|
});
|
},
|
|
handleSizeChange(size) {
|
this.pageSize = size;
|
this.getInfo();
|
},
|
handleCurrentChange(page) {
|
this.pageNo = page;
|
this.getInfo();
|
},
|
handleChange(value) {
|
this.queryParams.determine = value;
|
},
|
handleSearch() {
|
this.getInfo();
|
},
|
|
formatType(type) {
|
if (type == "时间段") {
|
return "time";
|
} else if (type == "单日") {
|
return "day";
|
} else if (type == "单月") {
|
return "month";
|
} else if (type == "年度") {
|
return "year";
|
}
|
},
|
|
formatDate(date) {
|
if (date) {
|
let year = date.getFullYear();
|
let month = date.getMonth() + 1;
|
let day = date.getDate();
|
|
if (this.type == "年度") {
|
return year;
|
} else if (this.type == "单月") {
|
return year + "-" + this.add0(month);
|
} else if (this.type == "单日" || this.type == "时间段") {
|
return year + "-" + this.add0(month) + "-" + this.add0(day);
|
} else {
|
return "";
|
}
|
}
|
},
|
|
add0(val) {
|
return val < 10 ? "0" + val : val;
|
},
|
|
percentage(total, item) {
|
item = parseFloat(Number(item));
|
total = parseFloat(Number(total));
|
if (isNaN(item) || isNaN(total)) {
|
return "-";
|
}
|
return Math.round((item / total) * 10000) / 100.0;
|
},
|
getTagType(text) {
|
let color = "";
|
for (let k in this.colors) {
|
if (this.colors[k].name == text) {
|
color = this.colors[k].color;
|
}
|
}
|
if (color == "") {
|
color = "#212121";
|
}
|
return color;
|
},
|
},
|
};
|
</script>
|
<style lang="scss">
|
.app-container {
|
width: 96%;
|
margin-left: 2%;
|
}
|
.detailTable .el-progress-bar__innerText {
|
color: #000000 !important;
|
font-size: 10px;
|
padding: 0 5px;
|
}
|
|
small {
|
margin-left: 5px;
|
}
|
</style>
|