|
|
|
@ -9,11 +9,7 @@
|
|
|
|
|
>
|
|
|
|
|
<div class="topSearch">
|
|
|
|
|
<el-form-item label="电压" class="dybox">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formdata.dyId"
|
|
|
|
|
@change="getSearchxl"
|
|
|
|
|
filterable
|
|
|
|
|
>
|
|
|
|
|
<el-select v-model="formdata.dyId" @change="getSearchxl" filterable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in dyOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
@ -35,7 +31,6 @@
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -67,7 +62,6 @@
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -222,13 +216,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
|
|
cmdActlistApi,
|
|
|
|
|
getTerminalJoggle,
|
|
|
|
|
getActivityApi,
|
|
|
|
|
getProtocolList,
|
|
|
|
|
getSearchInfo,
|
|
|
|
|
exportTerminalApi
|
|
|
|
|
exportTerminalApi,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import tableMain from "./components/tableMain";
|
|
|
|
|
export default {
|
|
|
|
@ -256,9 +249,9 @@ export default {
|
|
|
|
|
{ id: 2, name: "未运维" },
|
|
|
|
|
], //是否运维
|
|
|
|
|
formdata: {
|
|
|
|
|
dyId:-1,
|
|
|
|
|
lineId:-1,
|
|
|
|
|
towerId:-1,
|
|
|
|
|
dyId: -1,
|
|
|
|
|
lineId: -1,
|
|
|
|
|
towerId: -1,
|
|
|
|
|
isonline: -1,
|
|
|
|
|
protocol: -1,
|
|
|
|
|
mntn: 1,
|
|
|
|
@ -271,7 +264,6 @@ export default {
|
|
|
|
|
cmaExclude: 0,
|
|
|
|
|
version: "",
|
|
|
|
|
versionExclude: 0,
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
dataList: [],
|
|
|
|
@ -287,7 +279,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
this.activityIdLoc =
|
|
|
|
|
JSON.parse(localStorage.getItem("activeId")) !== null
|
|
|
|
|
? JSON.parse(localStorage.getItem("activeId"))
|
|
|
|
@ -298,9 +289,9 @@ export default {
|
|
|
|
|
JSON.parse(localStorage.getItem("searchParams")) !== null
|
|
|
|
|
? JSON.parse(localStorage.getItem("searchParams"))
|
|
|
|
|
: {
|
|
|
|
|
dyId:-1,
|
|
|
|
|
lineId:-1,
|
|
|
|
|
towerId:-1,
|
|
|
|
|
dyId: -1,
|
|
|
|
|
lineId: -1,
|
|
|
|
|
towerId: -1,
|
|
|
|
|
isonline: -1,
|
|
|
|
|
protocol: -1,
|
|
|
|
|
mntn: 1,
|
|
|
|
@ -318,14 +309,15 @@ export default {
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getSearchdy();
|
|
|
|
|
this.getProtocol();
|
|
|
|
|
this.getactiveList()
|
|
|
|
|
this.getactiveList();
|
|
|
|
|
},
|
|
|
|
|
watch: {},
|
|
|
|
|
methods: {
|
|
|
|
|
//导出数据
|
|
|
|
|
exportTable(){let params = {
|
|
|
|
|
pageindex:1,
|
|
|
|
|
pagesize:10000,
|
|
|
|
|
exportTable() {
|
|
|
|
|
let params = {
|
|
|
|
|
pageindex: 1,
|
|
|
|
|
pagesize: 10000,
|
|
|
|
|
};
|
|
|
|
|
// 根据条件添加参数
|
|
|
|
|
if (this.formdata.dyId !== -1) {
|
|
|
|
@ -353,7 +345,7 @@ export default {
|
|
|
|
|
if (this.formdata.oid !== "") {
|
|
|
|
|
params.oid = this.formdata.oid;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.formdata.oidExclude)
|
|
|
|
|
console.log(this.formdata.oidExclude);
|
|
|
|
|
if (this.formdata.oidExclude !== 0) {
|
|
|
|
|
params.oidExclude = this.formdata.oidExclude;
|
|
|
|
|
}
|
|
|
|
@ -363,7 +355,7 @@ export default {
|
|
|
|
|
if (this.formdata.cmaExclude !== 0) {
|
|
|
|
|
params.cmaExclude = this.formdata.cmaExclude;
|
|
|
|
|
}
|
|
|
|
|
if (this.formdata.cmdid !=="") {
|
|
|
|
|
if (this.formdata.cmdid !== "") {
|
|
|
|
|
params.cmdid = this.formdata.cmdid;
|
|
|
|
|
}
|
|
|
|
|
if (this.formdata.cmdidExclude !== 0) {
|
|
|
|
@ -375,17 +367,17 @@ export default {
|
|
|
|
|
if (this.formdata.versionExclude !== 0) {
|
|
|
|
|
params.versionExclude = this.formdata.versionExclude;
|
|
|
|
|
}
|
|
|
|
|
console.log(params)
|
|
|
|
|
console.log(params);
|
|
|
|
|
exportTerminalApi(params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
console.log(res);
|
|
|
|
|
const now = this.$moment(new Date());
|
|
|
|
|
const formattedTime = now.format("YYYY年MM月DD日HH时mm分"); // 格式化时间字符串,例如 "2023-04-01_15_30_00"
|
|
|
|
|
const blob = new Blob([res])
|
|
|
|
|
const link = document.createElement('a')
|
|
|
|
|
link.href = window.URL.createObjectURL(blob)
|
|
|
|
|
link.download = `运维数据报表_${formattedTime}.xls`
|
|
|
|
|
link.click()
|
|
|
|
|
const blob = new Blob([res]);
|
|
|
|
|
const link = document.createElement("a");
|
|
|
|
|
link.href = window.URL.createObjectURL(blob);
|
|
|
|
|
link.download = `运维数据报表_${formattedTime}.xls`;
|
|
|
|
|
link.click();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -404,7 +396,7 @@ export default {
|
|
|
|
|
getSearchxl() {
|
|
|
|
|
getSearchInfo({ type: 2, id: this.formdata.dyId })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.xlOptions = [{ id: -1, name: "全部" }]
|
|
|
|
|
this.xlOptions = [{ id: -1, name: "全部" }];
|
|
|
|
|
this.xlOptions = this.xlOptions.concat(res.data.list);
|
|
|
|
|
this.formdata.lineId = this.xlOptions[0].id;
|
|
|
|
|
this.getSearchgt();
|
|
|
|
@ -415,7 +407,7 @@ export default {
|
|
|
|
|
getSearchgt() {
|
|
|
|
|
getSearchInfo({ type: 3, id: this.formdata.lineId })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.gtOptions = [{ id: -1, name: "全部" }]
|
|
|
|
|
this.gtOptions = [{ id: -1, name: "全部" }];
|
|
|
|
|
this.gtOptions = this.gtOptions.concat(res.data.list);
|
|
|
|
|
this.formdata.towerId = this.gtOptions[0].id;
|
|
|
|
|
})
|
|
|
|
@ -432,7 +424,7 @@ export default {
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//获取活动列表
|
|
|
|
|
getactiveList(){
|
|
|
|
|
getactiveList() {
|
|
|
|
|
getActivityApi()
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
@ -470,12 +462,11 @@ export default {
|
|
|
|
|
// 在这里执行接口请求的代码
|
|
|
|
|
this.fetchData();
|
|
|
|
|
}, interval);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
fetchData() {
|
|
|
|
|
let params = {
|
|
|
|
|
pageindex:1,
|
|
|
|
|
pagesize:10000,
|
|
|
|
|
pageindex: 1,
|
|
|
|
|
pagesize: 10000,
|
|
|
|
|
};
|
|
|
|
|
// 根据条件添加参数
|
|
|
|
|
if (this.formdata.dyId !== -1) {
|
|
|
|
@ -504,7 +495,7 @@ export default {
|
|
|
|
|
if (this.formdata.oid !== "") {
|
|
|
|
|
params.oid = this.formdata.oid;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.formdata.oidExclude)
|
|
|
|
|
console.log(this.formdata.oidExclude);
|
|
|
|
|
if (Number(this.formdata.oidExclude) !== 0) {
|
|
|
|
|
params.oidExclude = this.formdata.oidExclude;
|
|
|
|
|
}
|
|
|
|
@ -514,7 +505,7 @@ export default {
|
|
|
|
|
if (Number(this.formdata.cmaExclude) !== 0) {
|
|
|
|
|
params.cmaExclude = this.formdata.cmaExclude;
|
|
|
|
|
}
|
|
|
|
|
if (this.formdata.cmdid !=="") {
|
|
|
|
|
if (this.formdata.cmdid !== "") {
|
|
|
|
|
params.cmdid = this.formdata.cmdid;
|
|
|
|
|
}
|
|
|
|
|
if (Number(this.formdata.cmdidExclude) !== 0) {
|
|
|
|
@ -526,30 +517,35 @@ export default {
|
|
|
|
|
if (Number(this.formdata.versionExclude) !== 0) {
|
|
|
|
|
params.versionExclude = this.formdata.versionExclude;
|
|
|
|
|
}
|
|
|
|
|
console.log(params)
|
|
|
|
|
console.log(params);
|
|
|
|
|
localStorage.setItem("searchParams", JSON.stringify(params));
|
|
|
|
|
getTerminalJoggle(params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.dataList = res.data;
|
|
|
|
|
this.getCmdList();
|
|
|
|
|
this.onlineNum = this.dataList.filter(
|
|
|
|
|
(item) => item.onlinestatus ==1
|
|
|
|
|
(item) => item.onlinestatus == 1
|
|
|
|
|
).length;
|
|
|
|
|
this.offlineNum = this.dataList.length - this.onlineNum;
|
|
|
|
|
this.tableLoaidng = false;
|
|
|
|
|
this.noPicNum = this.dataList.filter(
|
|
|
|
|
(item) => item.mntnStatus.reportMap == null ||
|
|
|
|
|
(item) =>
|
|
|
|
|
item.mntnStatus.reportMap == null ||
|
|
|
|
|
item.mntnStatus.reportMap.pic == undefined ||
|
|
|
|
|
item.mntnStatus.reportMap.pic == 0 ||
|
|
|
|
|
item.mntnStatus.reportMap.pic == -1
|
|
|
|
|
).length;
|
|
|
|
|
|
|
|
|
|
this.freeNum = this.dataList.filter(item => {
|
|
|
|
|
this.freeNum = this.dataList.filter((item) => {
|
|
|
|
|
// 确保mntnStatus和reportMap存在,并且freeROM不是null或undefined
|
|
|
|
|
const freeROM = item.mntnStatus?.reportMap?.freeROM;
|
|
|
|
|
// 如果freeROM存在并且可以被转换为数字
|
|
|
|
|
if (freeROM !== null && freeROM !== undefined && !isNaN(parseInt(freeROM, 10))) {
|
|
|
|
|
if (
|
|
|
|
|
freeROM !== null &&
|
|
|
|
|
freeROM !== undefined &&
|
|
|
|
|
!isNaN(parseInt(freeROM, 10))
|
|
|
|
|
) {
|
|
|
|
|
// 转换为整数并检查是否小于50
|
|
|
|
|
return parseInt(freeROM, 10) < 50;
|
|
|
|
|
}
|
|
|
|
@ -557,8 +553,7 @@ export default {
|
|
|
|
|
return false;
|
|
|
|
|
}).length;
|
|
|
|
|
|
|
|
|
|
console.log("我已经加载完数据")
|
|
|
|
|
|
|
|
|
|
console.log("我已经加载完数据");
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -597,9 +592,9 @@ export default {
|
|
|
|
|
//重置
|
|
|
|
|
onReset() {
|
|
|
|
|
this.formdata = {
|
|
|
|
|
dyId:-1,
|
|
|
|
|
lineId:-1,
|
|
|
|
|
towerId:-1,
|
|
|
|
|
dyId: -1,
|
|
|
|
|
lineId: -1,
|
|
|
|
|
towerId: -1,
|
|
|
|
|
isonline: -1,
|
|
|
|
|
protocol: -1,
|
|
|
|
|
mntn: 1,
|
|
|
|
@ -664,7 +659,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.dybox{
|
|
|
|
|
.dybox {
|
|
|
|
|
.el-select {
|
|
|
|
|
width: 120px;
|
|
|
|
|
}
|
|
|
|
|