支持展示行政区划节点异常的通道数据
This commit is contained in:
183
web_src/src/components/dialog/UnusualRegionChannelSelect.vue
Normal file
183
web_src/src/components/dialog/UnusualRegionChannelSelect.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div id="gbChannelSelect" v-loading="getChannelListLoading">
|
||||
<el-dialog
|
||||
title="异常挂载通道"
|
||||
width="60%"
|
||||
top="2rem"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="showDialog"
|
||||
:destroy-on-close="true"
|
||||
append-to-body
|
||||
@close="close()"
|
||||
>
|
||||
<div class="page-header" style="width: 100%">
|
||||
<div class="page-header-btn" style="width: 100%; text-align: left">
|
||||
搜索:
|
||||
<el-input @input="getChannelList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
|
||||
prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
|
||||
在线状态:
|
||||
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="online" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="在线" value="true"></el-option>
|
||||
<el-option label="离线" value="false"></el-option>
|
||||
</el-select>
|
||||
类型:
|
||||
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></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-button size="mini" type="primary" :loading="getChannelListLoading" :disabled="multipleSelection.length ===0"
|
||||
@click="clearUnusualRegion()">清除</el-button>
|
||||
<el-button size="mini" :loading="getChannelListLoading"
|
||||
@click="clearUnusualRegion()">全部清除</el-button>
|
||||
<el-button size="mini" :loading="getChannelListLoading"
|
||||
@click="getChannelList()">刷新</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--通道列表-->
|
||||
<el-table size="small" ref="channelListTable" :data="channelList" :height="winHeight" style="width: 100%;"
|
||||
header-row-class-name="table-header" @selection-change="handleSelectionChange" >
|
||||
<el-table-column type="selection" width="55" >
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbName" label="名称" min-width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbDeviceId" label="编号" min-width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbManufacturer" label="厂家" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbCivilCode" label="行政区划" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" min-width="100">
|
||||
<template v-slot:default="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium" effect="plain" v-if="scope.row.dataType === 1">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-else-if="scope.row.dataType === 2" >推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-else-if="scope.row.dataType === 3">拉流代理</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" min-width="100">
|
||||
<template v-slot:default="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium" v-if="scope.row.gbStatus === 'ON'">在线</el-tag>
|
||||
<el-tag size="medium" type="info" v-if="scope.row.gbStatus !== 'ON'">离线</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="140" fixed="right">
|
||||
<template v-slot:default="scope">
|
||||
<el-button
|
||||
size="medium"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="addRegion(scope.row)"
|
||||
>
|
||||
添加行政区划
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr">
|
||||
<div style="text-align: left; line-height: 32px">
|
||||
<i class="el-icon-info"></i>清除后通道可正常添加到行政区划,添加行政区划可以自动添加对应的行政区划节点。
|
||||
</div>
|
||||
<el-pagination
|
||||
style="text-align: right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="currentChange"
|
||||
:current-page="currentPage"
|
||||
:page-size="count"
|
||||
:page-sizes="[10, 25, 35, 50, 200, 1000, 50000]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
name: "UnusualRegionChannelSelect",
|
||||
props: [],
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
showDialog: false,
|
||||
channelList: [], //设备列表
|
||||
searchSrt: "",
|
||||
online: null,
|
||||
channelType: "",
|
||||
winHeight: 580,
|
||||
currentPage: 1,
|
||||
count: 10,
|
||||
total: 0,
|
||||
getChannelListLoading: false,
|
||||
multipleSelection: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
initData: function () {
|
||||
this.getChannelList();
|
||||
},
|
||||
currentChange: function (val) {
|
||||
this.currentPage = val;
|
||||
this.getChannelList();
|
||||
},
|
||||
handleSizeChange: function (val) {
|
||||
this.count = val;
|
||||
this.getChannelList();
|
||||
},
|
||||
handleSelectionChange: function (val){
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
getChannelList: function () {
|
||||
this.getChannelListLoading = true;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `/api/common/channel/civilCode/unusual/list`,
|
||||
params: {
|
||||
page: this.currentPage,
|
||||
count: this.count,
|
||||
channelType: this.channelType,
|
||||
query: this.searchSrt,
|
||||
online: this.online,
|
||||
}
|
||||
}).then( (res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.total = res.data.data.total;
|
||||
this.channelList = res.data.data.list;
|
||||
}
|
||||
}).catch( (error)=> {
|
||||
console.error(error);
|
||||
}).finally(()=>{
|
||||
this.getChannelListLoading = false;
|
||||
})
|
||||
|
||||
},
|
||||
openDialog: function () {
|
||||
console.log(2222)
|
||||
this.showDialog = true;
|
||||
this.initData();
|
||||
},
|
||||
close: function () {
|
||||
this.showDialog = false;
|
||||
},
|
||||
clearUnusualRegion: function () {
|
||||
|
||||
},
|
||||
addRegion: function (row) {
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -41,6 +41,9 @@
|
||||
<el-button v-bind:disabled="multipleSelection.length === 0" size="mini" type="danger" @click="remove()">
|
||||
移除通道
|
||||
</el-button>
|
||||
<el-button plain size="mini" type="warning" @click="showUnusualChanel()">
|
||||
异常挂载通道
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-right" circle size="mini" @click="getChannelList()"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,6 +90,7 @@
|
||||
</el-main>
|
||||
</el-container>
|
||||
<GbChannelSelect ref="gbChannelSelect" dataType="civilCode"></GbChannelSelect>
|
||||
<UnusualRegionChannelSelect ref="unusualRegionChannelSelect" ></UnusualRegionChannelSelect>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -95,6 +99,7 @@ import uiHeader from '../layout/UiHeader.vue'
|
||||
import DeviceService from "./service/DeviceService";
|
||||
import RegionTree from "./common/RegionTree.vue";
|
||||
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
|
||||
import UnusualRegionChannelSelect from "./dialog/UnusualRegionChannelSelect.vue";
|
||||
|
||||
export default {
|
||||
name: 'channelList',
|
||||
@@ -102,6 +107,7 @@ export default {
|
||||
GbChannelSelect,
|
||||
uiHeader,
|
||||
RegionTree,
|
||||
UnusualRegionChannelSelect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -269,6 +275,9 @@ export default {
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
showUnusualChanel: function () {
|
||||
this.$refs.unusualRegionChannelSelect.openDialog()
|
||||
},
|
||||
getSnap: function (row) {
|
||||
let baseUrl = window.baseUrl ? window.baseUrl : "";
|
||||
return ((process.env.NODE_ENV === 'development') ? process.env.BASE_API : baseUrl) + '/api/device/query/snap/' + this.deviceId + '/' + row.deviceId;
|
||||
|
||||
Reference in New Issue
Block a user