当前位置:网站首页>[technical tutorial] national standard protocol platform easygbs cascading supports customized national standard channels
[technical tutorial] national standard protocol platform easygbs cascading supports customized national standard channels
2022-06-24 10:53:00 【Tsingsee green rhino video】
GB protocol video platform EasyGBS It can connect with the public security network 、 The national standard protocol video streaming media service of campus network , For many projects , The cascading function of GB protocol is a very practical function , Connecting the upper and lower platforms and realizing unified management are the requirements of many projects .
stay EasyGBS In the latest development process , We did EasyGBS Cascade custom GB channel , This article shares with you our implementation process and methods .
1. Create a new one InputTag.vue The custom component is used to edit custom cascading GB channels .
<template>
<div>
<el-input
class="input-new-tag"
v-if="inputVisible"
v-model="inputValue"
type="number"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button type="text" v-else class="button-new-tag" size="small" @click="showInput">{{channel.CustomID || channel.ID}}</el-button>
</div>
</template>
<script>
export default {
props: ['channel'],
data() {
return {
inputVisible: false,
inputValue: ''
};
},
methods: {
showInput() {
this.inputValue = this.channel.CustomID || this.channel.ID
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
let inputValue = this.inputValue;
let lodInputValue = this.channel.CustomID || this.channel.ID
if (inputValue&&lodInputValue!=inputValue) {
this.$emit('submit', this.channel, inputValue)
}
this.inputVisible = false;
}
}
}
</script>
<style lang="scss" >
.button-new-tag {
width: 100%;
text-align: left;
padding: 0 4px!important;
height: 32px;
font-size: 14px;
&:hover {
color: #FF4D23 !important;
background-color: transparent !important;
}
}
.input-new-tag {
height: 22px;
border: 1px solid #606266;
vertical-align: bottom;
.el-input__inner {
padding: 0 4px;
height: 20px;
}
}
</style>2. Import... In the components to be imported InputTag.vue Components .
import InputTag from "./InputTag.vue";
export default {
components: {
InputTag
}
}3. Add a column of custom edit channels to the table , And introduce a custom InputTag Components , Component has two properties , One channel Channel information required ,submit Submit the edited callback function .
<el-table-column label=" Custom channel national standard number " min-width="180" show-overflow-tooltip > <template slot-scope="props"> <div> <InputTag :channel="props.row" @submit="onCustomSubmit"/> </div> </template> </el-table-column>
4. When you click Customize ID The input box... Will be displayed , You can edit the channel by yourself , If you lose focus in the input box, it will be automatically uploaded to the server and saved .
The preview of the effect is as follows :
边栏推荐
- Can text pictures be converted to word? How to extract text from pictures
- Sort out interface performance optimization skills and kill slow code
- 栈题目:函数的独占时间
- How does easydss use go fastdfs distributed file servers to reduce service pressure?
- Suddenly I thought of the wooden house in my hometown
- What is recursion?
- Four methods of object merging and four methods of object merging in JS
- 使用Process Monitor工具监测进程对注册表和文件的操作
- Does the depth system work?
- 腾讯开源项目「应龙」成Apache顶级项目:前身长期服务微信支付,能hold住百万亿级数据流处理...
猜你喜欢

JMeter interface test tool foundation - use badboy to record JMeter script

88. merge ordered arrays
![[data analysis data source] coordinates of provinces, cities and administrative regions across the country (including boundary coordinate points and central coordinate points)](/img/a8/84088b1e61deaf62f22d85a007423b.png)
[data analysis data source] coordinates of provinces, cities and administrative regions across the country (including boundary coordinate points and central coordinate points)

线程运行原理

Today's sleep quality record 76 points

A group of skeletons flying canvas animation JS special effect
![[energy reports] International Conference on energy and environmental engineering in 2022 (cfeee 2022)](/img/48/11bd949fa3695452270c3625d63e6d.jpg)
[energy reports] International Conference on energy and environmental engineering in 2022 (cfeee 2022)

Flink checkpoint and savepoint

Canvas pipe animation JS special effect

Quick completion guide for mechanical arm (I): development overview of mechanical arm
随机推荐
pycharm快捷键大全
Tencent's open source project "Yinglong" has become a top-level project of Apache: the former long-term service wechat payment can hold a million billion level of data stream processing
Apple's legendary design team disbanded after jobs refused to obey cook
How does easydss use go fastdfs distributed file servers to reduce service pressure?
Flink checkpoint and savepoint
Use the process monitor tool to monitor process operations on registries and files
Wechat applet rich text picture width height adaptive method introduction (rich text)
[IEEE] International Conference on naturallanguageprocessing and information retrieval (ecnlpir 2022)
Canvas falling ball gravity JS special effect animation
Which map navigation is easy to use and accurate?
Shape change loader loads jsjs special effect code
Virtual CD-ROM function how to use and install virtual CD-ROM
How to convert an array to an object, and how to convert an object to an array
[resource sharing] 2022 International Conference on Environmental Engineering and Biotechnology (coeeb 2022)
服乔布斯不服库克,苹果传奇设计团队解散内幕曝光
多线程的应用 - 提升效率
Cookie 、Session、localstorage、Sessionstorage的区别
26. delete duplicates of ordered array
【IEEE】自然语言处理与信息检索国际会议(ECNLPIR 2022)
MYSQL_ Elaborate on database data types