From 8d5764b9a0ed7bd9c0473dddcbe5acc5f64e7e6a Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期日, 30 一月 2022 15:58:15 +0800 Subject: [PATCH] 优化信令配置展示界面 --- web_src/src/components/control.vue | 122 ++++++++++++++++++++++++++++++++++------ 1 files changed, 103 insertions(+), 19 deletions(-) diff --git a/web_src/src/components/control.vue b/web_src/src/components/control.vue index b5990da..71872fc 100644 --- a/web_src/src/components/control.vue +++ b/web_src/src/components/control.vue @@ -30,27 +30,68 @@ </div> <el-button type="primary" slot="reference" size="mini" @click="getServerConfig()">濯掍綋鏈嶅姟鍣ㄩ厤缃�</el-button> </el-popover> - <el-popover placement="bottom" width="750" height="300" trigger="click"> - <div style="height: 600px;overflow:auto;"> - <div v-for="(value, key, index) in wvpServerConfig"> - {{ key }}锛� - <table v-if="key != 'server.port'" class="table-c" cellspacing="0"> - <tr v-for="(subValue, subKey, subIndex) in value"> - <td style="width: 18rem; text-align: right;">{{ subKey }}</td> - <td style="width: 33rem; text-align:left">{{ subValue }}</td> - </tr> - </table> - <span v-if="key == 'server.port'">{{ value }}</span> - </div> + <el-popover placement="bottom" width="900" height="300" trigger="click"> + <div style="height: 600px;overflow:auto; padding: 20px"> + <el-descriptions title="鍩虹閰嶇疆" border> + <template slot="extra"> + <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="鐐瑰嚮鎷疯礉" v-clipboard="JSON.stringify(wvpServerConfig.base)" @success="$message({type:'success', message:'鎴愬姛鎷疯礉鍒扮矘璐存澘'})"></el-button> + </template> + <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base"> + <template slot="label" > + {{ getNameFromKey(key) }} + </template> + <div v-if="key === 'interfaceAuthenticationExcludes'"> + <el-dropdown> + <span class="el-dropdown-link"> + 鏌ョ湅<i class="el-icon-arrow-down el-icon--right"></i> + </span> + <el-dropdown-menu slot="dropdown"> + <el-dropdown-item v-for="(value, key, index) in wvpServerConfig.base.interfaceAuthenticationExcludes">{{value}}</el-dropdown-item> + </el-dropdown-menu> + </el-dropdown> + </div> + <div v-if="key !== 'interfaceAuthenticationExcludes'"> + <div v-if="value === true"> + 宸插惎鐢� + </div> + <div v-if="value === false"> + 鏈惎鐢� + </div> + <div v-if="value !== true && value !== false"> + {{ value }} + </div> + </div> + + </el-descriptions-item> + </el-descriptions> <div style="margin-top: 1rem"> - 鐗堟湰淇℃伅锛� - <table class="table-c" cellspacing="0"> - <tr v-for="(value, key, index) in wvpServerVersion"> - <td style="width: 18rem; text-align: right;">{{ key }}</td> - <td style="width: 33rem; text-align:left">{{ value }}</td> - </tr> - </table> + <el-descriptions title="鍥芥爣閰嶇疆" border> + <template slot="extra"> + <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="鐐瑰嚮鎷疯礉" v-clipboard="JSON.stringify(wvpServerConfig.sip)" @success="$message({type:'success', message:'鎴愬姛鎷疯礉鍒扮矘璐存澘'})"></el-button> + </template> + <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip"> + <template slot="label"> + {{ getNameFromKey(key) }} + </template> + {{ value }} + </el-descriptions-item> + </el-descriptions> + </div> + <div style="margin-top: 1rem"> + <el-descriptions title="鐗堟湰淇℃伅" border> + <template slot="extra"> + <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="鐐瑰嚮鎷疯礉" v-clipboard="JSON.stringify(wvpServerVersion)" @success="$message({type:'success', message:'鎴愬姛鎷疯礉鍒扮矘璐存澘'})"></el-button> + </template> + <el-descriptions-item v-for="(value, key, index) in wvpServerVersion"> + <template slot="label"> + {{ getNameFromKey(key) }} + </template> + {{ value }} + </el-descriptions-item> + </el-descriptions> + + </div> </div> <el-button type="primary" slot="reference" size="mini" @click="getWVPServerConfig()">淇′护鏈嶅姟鍣ㄩ厤缃�</el-button> @@ -410,6 +451,49 @@ message: '鍒犻櫎鎴愬姛!' }); }); + }, + getNameFromKey: function(key) { + let nameData = { + "waitTrack": "绛夊緟缂栫爜淇℃伅", + "interfaceAuthenticationExcludes": "涓嶈繘琛岄壌鏉冪殑鎺ュ彛", + "playTimeout": "鐐规挱瓒呮椂鏃堕棿", + "autoApplyPlay": "鑷姩鐐规挱", + "recordPushLive": "鎺ㄦ祦褰曞儚", + "redisConfig": "鑷姩閰嶇疆redis", + "thirdPartyGBIdReg": "stream淇℃伅姝e垯", + "savePositionHistory": "淇濆瓨杞ㄨ抗淇℃伅", + "interfaceAuthentication": "鎺ュ彛閴存潈", + "serverId": "鏈嶅姟ID", + "logInDatebase": "鏃ュ織瀛樺偍杩涙暟鎹簱", + "seniorSdp": "鎵╁睍SDP", + "password": "瀵嗙爜", + "port": "绔彛鍙�", + "keepaliveTimeOut": "蹇冭烦瓒呮椂", + "domain": "鍥芥爣鍩�", + "ip": "IP鍦板潃", + "monitorIp": "鐩戝惉IP", + "alarm": "瀛樺偍鎶ヨ淇℃伅", + "ptzSpeed": "浜戝彴鎺у埗閫熷害", + "id": "鍥芥爣ID", + "registerTimeInterval": "娉ㄥ唽闂撮殧", + "artifactId": "妯″潡鍚嶇О", + "version": "鐗堟湰", + "project": "宸ョ▼", + "git_Revision": "GIT淇鐗堟湰", + "git_BRANCH": "GIT鍒嗘敮", + "git_URL": "GIT鍦板潃", + "build_DATE": "鏋勫缓鏃堕棿", + "create_By": "浣滆��", + "git_Revision_SHORT": "GIT淇鐗堟湰锛堢煭锛�", + "build_Jdk": "鏋勫缓鐢↗DK", + }; + console.log(key + ": " + nameData[key]) + + if (nameData[key]) { + return nameData[key] + }else { + return key; + } } } }; -- Gitblit v1.8.0