完善数据库结构调用
This commit is contained in:
@@ -206,7 +206,7 @@
|
||||
<div style="float: right;">
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button v-if="cancel" @click="cancelSubmit">取消</el-button>
|
||||
<el-button v-if="form.gbDeviceDbId" @click="reset">重置</el-button>
|
||||
<el-button v-if="form.dataType === 1" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
63
web_src/src/components/common/channelDataTypeSelect.vue
Normal file
63
web_src/src/components/common/channelDataTypeSelect.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div id="channelDataTypeSelect" >
|
||||
<el-select size="mini" @change="$emit('change', $event.target.value)" v-model="dataType" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option
|
||||
v-for="item in dataTypeArray"
|
||||
:key="item.key"
|
||||
:label="item.key"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "channelDataTypeSelect",
|
||||
model: {
|
||||
prop: 'dataType',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataTypeArray: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init: function (){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `/api/server/channel/datatype`,
|
||||
params: {}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.dataTypeArray = res.data.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.channel-form {
|
||||
display: grid;
|
||||
background-color: #FFFFFF;
|
||||
padding: 1rem 2rem 0 2rem;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -23,13 +23,7 @@
|
||||
<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="0"></el-option>
|
||||
<el-option label="推流设备" :value="1"></el-option>
|
||||
<el-option label="拉流代理" :value="2"></el-option>
|
||||
</el-select>
|
||||
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType"></channelDataTypeSelect>
|
||||
<el-button size="mini" :loading="getChannelListLoading"
|
||||
@click="getChannelList()">刷新</el-button>
|
||||
<el-button type="primary" size="mini" style="float: right" @click="onSubmit">确 定</el-button>
|
||||
@@ -49,9 +43,9 @@
|
||||
<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.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
<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>
|
||||
@@ -86,8 +80,11 @@
|
||||
|
||||
<script>
|
||||
|
||||
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
|
||||
|
||||
export default {
|
||||
name: "gbChannelSelect",
|
||||
components: {ChannelDataTypeSelect},
|
||||
props: ['dataType', "selected"],
|
||||
computed: {},
|
||||
data() {
|
||||
|
||||
@@ -22,13 +22,7 @@
|
||||
<el-option label="离线" value="false"></el-option>
|
||||
</el-select>
|
||||
类型:
|
||||
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="国标设备" :value="0"></el-option>
|
||||
<el-option label="推流设备" :value="1"></el-option>
|
||||
<el-option label="拉流代理" :value="2"></el-option>
|
||||
</el-select>
|
||||
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType"></channelDataTypeSelect>
|
||||
<el-button v-if="hasLink !=='true'" size="mini" type="primary" @click="add()">
|
||||
添加
|
||||
</el-button>
|
||||
@@ -56,9 +50,9 @@
|
||||
<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.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
<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>
|
||||
@@ -91,10 +85,11 @@
|
||||
<script>
|
||||
|
||||
import gbDeviceSelect from "./GbDeviceSelect.vue";
|
||||
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
|
||||
|
||||
export default {
|
||||
name: 'linkChannelRecord',
|
||||
components: {gbDeviceSelect},
|
||||
components: {ChannelDataTypeSelect, gbDeviceSelect},
|
||||
data() {
|
||||
return {
|
||||
dialogLoading: false,
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
<el-option label="离线" value="false"></el-option>
|
||||
</el-select>
|
||||
类型:
|
||||
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="国标设备" :value="0"></el-option>
|
||||
<el-option label="推流设备" :value="1"></el-option>
|
||||
<el-option label="拉流代理" :value="2"></el-option>
|
||||
</el-select>
|
||||
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType"></channelDataTypeSelect>
|
||||
<el-button v-if="hasShare !=='true'" size="mini" type="primary" @click="add()">
|
||||
添加
|
||||
</el-button>
|
||||
@@ -74,9 +68,9 @@
|
||||
<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.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
<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>
|
||||
@@ -107,10 +101,11 @@
|
||||
<script>
|
||||
|
||||
import gbDeviceSelect from "./GbDeviceSelect.vue";
|
||||
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
|
||||
|
||||
export default {
|
||||
name: 'shareChannelAdd',
|
||||
components: {gbDeviceSelect},
|
||||
components: {ChannelDataTypeSelect, gbDeviceSelect},
|
||||
props: [ 'platformId'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -28,14 +28,7 @@
|
||||
<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="0"></el-option>
|
||||
<el-option label="推流设备" :value="1"></el-option>
|
||||
<el-option label="拉流代理" :value="2"></el-option>
|
||||
</el-select>
|
||||
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType"></channelDataTypeSelect>
|
||||
<el-button size="mini" type="primary" @click="add()">
|
||||
添加通道
|
||||
</el-button>
|
||||
@@ -60,9 +53,9 @@
|
||||
<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.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
<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>
|
||||
@@ -97,10 +90,12 @@ import DeviceService from "./service/DeviceService";
|
||||
import GroupTree from "./common/GroupTree.vue";
|
||||
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
|
||||
import RegionTree from "./common/RegionTree.vue";
|
||||
import ChannelDataTypeSelect from "./common/channelDataTypeSelect.vue";
|
||||
|
||||
export default {
|
||||
name: 'channelList',
|
||||
components: {
|
||||
ChannelDataTypeSelect,
|
||||
RegionTree,
|
||||
GbChannelSelect,
|
||||
uiHeader,
|
||||
|
||||
@@ -28,13 +28,7 @@
|
||||
<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="0"></el-option>
|
||||
<el-option label="推流设备" :value="1"></el-option>
|
||||
<el-option label="拉流代理" :value="2"></el-option>
|
||||
</el-select>
|
||||
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType"></channelDataTypeSelect>
|
||||
<el-button size="mini" type="primary" @click="add()">
|
||||
添加通道
|
||||
</el-button>
|
||||
@@ -59,9 +53,9 @@
|
||||
<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.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="success" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" effect="plain" type="warning" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
<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>
|
||||
@@ -95,10 +89,12 @@ import uiHeader from '../layout/UiHeader.vue'
|
||||
import DeviceService from "./service/DeviceService";
|
||||
import RegionTree from "./common/RegionTree.vue";
|
||||
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
|
||||
import ChannelDataTypeSelect from "./common/channelDataTypeSelect.vue";
|
||||
|
||||
export default {
|
||||
name: 'channelList',
|
||||
components: {
|
||||
ChannelDataTypeSelect,
|
||||
GbChannelSelect,
|
||||
uiHeader,
|
||||
RegionTree,
|
||||
|
||||
Reference in New Issue
Block a user