control.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. <template>
  2. <div id="app" style="width: 100%">
  3. <div class="page-header">
  4. <div class="page-title">控制台</div>
  5. <div class="page-header-btn">
  6. 节点选择:
  7. <el-select size="mini" @change="chooseMediaChange" style="width: 18rem; margin-right: 8rem;"
  8. v-model="mediaServerChoose" placeholder="请选择" default-first-option>
  9. <el-option
  10. v-for="item in mediaServerList"
  11. :key="item.id"
  12. :label="item.id + '( ' + item.streamIp + ' )'"
  13. :value="item.id">
  14. </el-option>
  15. </el-select>
  16. <span>{{ loadCount }}</span>
  17. </div>
  18. <div class="page-header-btn">
  19. <el-popover placement="bottom" width="900" height="300" trigger="click">
  20. <div style="height: 600px; overflow:auto; padding: 20px">
  21. <el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border :column="1"
  22. style="margin-bottom: 1rem">
  23. <template slot="title">
  24. {{ key }}
  25. </template>
  26. <el-descriptions-item v-for="(value1, key1, index1) in serverConfig[key]" :key="key1">
  27. <template slot="label">
  28. {{ getMediaKeyNameFromKey(key1) }}
  29. </template>
  30. {{ value1 }}
  31. </el-descriptions-item>
  32. </el-descriptions>
  33. </div>
  34. <el-button type="primary" slot="reference" size="mini" @click="getServerConfig()">媒体服务器配置</el-button>
  35. </el-popover>
  36. <el-popover placement="bottom" width="900" height="300" trigger="click">
  37. <div style="height: 600px;overflow:auto; padding: 20px">
  38. <el-descriptions title="国标配置" border :column="1">
  39. <template slot="extra">
  40. <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"
  41. v-clipboard="JSON.stringify(wvpServerConfig.sip)|| ''"
  42. @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
  43. </template>
  44. <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip" :key="key">
  45. <template slot="label">
  46. {{ getNameFromKey(key) }}
  47. </template>
  48. {{ value }}
  49. </el-descriptions-item>
  50. </el-descriptions>
  51. <div style="margin-top: 1rem">
  52. <el-descriptions title="基础配置" border :column="1">
  53. <template slot="extra">
  54. <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"
  55. v-clipboard="JSON.stringify(wvpServerConfig.base)|| ''"
  56. @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
  57. </template>
  58. <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key">
  59. <template slot="label">
  60. {{ getNameFromKey(key) }}
  61. </template>
  62. <div v-if="key === 'interfaceAuthenticationExcludes'">
  63. <el-dropdown>
  64. <span class="el-dropdown-link">
  65. 查看<i class="el-icon-arrow-down el-icon--right"></i>
  66. </span>
  67. <el-dropdown-menu slot="dropdown">
  68. <el-dropdown-item
  69. v-for="(value, key, index) in wvpServerConfig.base.interfaceAuthenticationExcludes"
  70. :key="key">{{ value }}
  71. </el-dropdown-item>
  72. </el-dropdown-menu>
  73. </el-dropdown>
  74. </div>
  75. <div v-if="key !== 'interfaceAuthenticationExcludes'">
  76. <div v-if="value === true">
  77. 已启用
  78. </div>
  79. <div v-if="value === false">
  80. 未启用
  81. </div>
  82. <div v-if="value !== true && value !== false">
  83. {{ value }}
  84. </div>
  85. </div>
  86. </el-descriptions-item>
  87. </el-descriptions>
  88. </div>
  89. <div style="margin-top: 1rem">
  90. <el-descriptions title="版本信息" border :column="1">
  91. <template slot="extra">
  92. <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"
  93. v-clipboard="JSON.stringify(wvpServerVersion) || ''"
  94. @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>
  95. </template>
  96. <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key">
  97. <template slot="label">
  98. {{ getNameFromKey(key) }}
  99. </template>
  100. {{ value }}
  101. </el-descriptions-item>
  102. </el-descriptions>
  103. </div>
  104. </div>
  105. <el-button type="primary" slot="reference" size="mini" @click="getWVPServerConfig()">信令服务器配置</el-button>
  106. </el-popover>
  107. <el-button style="margin-left: 1rem;" type="danger" size="mini" @click="reStartServer()">重启媒体服务器</el-button>
  108. </div>
  109. </div>
  110. <!-- <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;">-->
  111. <!-- <span style="font-size: 1rem; font-weight: bold;">控制台</span>-->
  112. <!-- <div style="position: absolute; right: 17rem; top: 0.3rem;">-->
  113. <!-- 节点选择:-->
  114. <!-- <el-select size="mini" @change="chooseMediaChange" style="width: 18rem; margin-right: 8rem;"-->
  115. <!-- v-model="mediaServerChoose" placeholder="请选择" default-first-option>-->
  116. <!-- <el-option-->
  117. <!-- v-for="item in mediaServerList"-->
  118. <!-- :key="item.id"-->
  119. <!-- :label="item.id + '( ' + item.streamIp + ' )'"-->
  120. <!-- :value="item.id">-->
  121. <!-- </el-option>-->
  122. <!-- </el-select>-->
  123. <!-- <span>{{ loadCount }}</span>-->
  124. <!-- </div>-->
  125. <!-- <div style="position: absolute; right: 1rem; top: 0.3rem;">-->
  126. <!-- <el-popover placement="bottom" width="900" height="300" trigger="click">-->
  127. <!-- <div style="height: 600px; overflow:auto; padding: 20px">-->
  128. <!-- <el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border :column="1"-->
  129. <!-- style="margin-bottom: 1rem">-->
  130. <!-- <template slot="title">-->
  131. <!-- {{ key }}-->
  132. <!-- </template>-->
  133. <!-- <el-descriptions-item v-for="(value1, key1, index1) in serverConfig[key]" :key="key1">-->
  134. <!-- <template slot="label">-->
  135. <!-- {{ getMediaKeyNameFromKey(key1) }}-->
  136. <!-- </template>-->
  137. <!-- {{ value1 }}-->
  138. <!-- </el-descriptions-item>-->
  139. <!-- </el-descriptions>-->
  140. <!-- </div>-->
  141. <!-- <el-button type="primary" slot="reference" size="mini" @click="getServerConfig()">媒体服务器配置</el-button>-->
  142. <!-- </el-popover>-->
  143. <!-- <el-popover placement="bottom" width="900" height="300" trigger="click">-->
  144. <!-- <div style="height: 600px;overflow:auto; padding: 20px">-->
  145. <!-- <el-descriptions title="国标配置" border :column="1">-->
  146. <!-- <template slot="extra">-->
  147. <!-- <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"-->
  148. <!-- v-clipboard="JSON.stringify(wvpServerConfig.sip)|| ''"-->
  149. <!-- @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>-->
  150. <!-- </template>-->
  151. <!-- <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip" :key="key">-->
  152. <!-- <template slot="label">-->
  153. <!-- {{ getNameFromKey(key) }}-->
  154. <!-- </template>-->
  155. <!-- {{ value }}-->
  156. <!-- </el-descriptions-item>-->
  157. <!-- </el-descriptions>-->
  158. <!-- <div style="margin-top: 1rem">-->
  159. <!-- <el-descriptions title="基础配置" border :column="1">-->
  160. <!-- <template slot="extra">-->
  161. <!-- <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"-->
  162. <!-- v-clipboard="JSON.stringify(wvpServerConfig.base)|| ''"-->
  163. <!-- @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>-->
  164. <!-- </template>-->
  165. <!-- <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key">-->
  166. <!-- <template slot="label">-->
  167. <!-- {{ getNameFromKey(key) }}-->
  168. <!-- </template>-->
  169. <!-- <div v-if="key === 'interfaceAuthenticationExcludes'">-->
  170. <!-- <el-dropdown>-->
  171. <!-- <span class="el-dropdown-link">-->
  172. <!-- 查看<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
  173. <!-- </span>-->
  174. <!-- <el-dropdown-menu slot="dropdown">-->
  175. <!-- <el-dropdown-item-->
  176. <!-- v-for="(value, key, index) in wvpServerConfig.base.interfaceAuthenticationExcludes"-->
  177. <!-- :key="key">{{ value }}-->
  178. <!-- </el-dropdown-item>-->
  179. <!-- </el-dropdown-menu>-->
  180. <!-- </el-dropdown>-->
  181. <!-- </div>-->
  182. <!-- <div v-if="key !== 'interfaceAuthenticationExcludes'">-->
  183. <!-- <div v-if="value === true">-->
  184. <!-- 已启用-->
  185. <!-- </div>-->
  186. <!-- <div v-if="value === false">-->
  187. <!-- 未启用-->
  188. <!-- </div>-->
  189. <!-- <div v-if="value !== true && value !== false">-->
  190. <!-- {{ value }}-->
  191. <!-- </div>-->
  192. <!-- </div>-->
  193. <!-- </el-descriptions-item>-->
  194. <!-- </el-descriptions>-->
  195. <!-- </div>-->
  196. <!-- <div style="margin-top: 1rem">-->
  197. <!-- <el-descriptions title="版本信息" border :column="1">-->
  198. <!-- <template slot="extra">-->
  199. <!-- <el-button style="float: right;" type="primary" size="mini" icon="el-icon-document-copy" title="点击拷贝"-->
  200. <!-- v-clipboard="JSON.stringify(wvpServerVersion) || ''"-->
  201. <!-- @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></el-button>-->
  202. <!-- </template>-->
  203. <!-- <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key">-->
  204. <!-- <template slot="label">-->
  205. <!-- {{ getNameFromKey(key) }}-->
  206. <!-- </template>-->
  207. <!-- {{ value }}-->
  208. <!-- </el-descriptions-item>-->
  209. <!-- </el-descriptions>-->
  210. <!-- </div>-->
  211. <!-- </div>-->
  212. <!-- <el-button type="primary" slot="reference" size="mini" @click="getWVPServerConfig()">信令服务器配置</el-button>-->
  213. <!-- </el-popover>-->
  214. <!-- <el-button style="margin-left: 1rem;" type="danger" size="mini" @click="reStartServer()">重启媒体服务器</el-button>-->
  215. <!-- </div>-->
  216. <!-- </div>-->
  217. <el-row style="width: 100%">
  218. <el-col :span="12">
  219. <div class="control-table" id="ThreadsLoad" style="margin-right:10px;">table1</div>
  220. </el-col>
  221. <el-col :span="12">
  222. <div class="control-table" id="WorkThreadsLoad" style="margin-left:10px;">table2</div>
  223. </el-col>
  224. </el-row>
  225. <el-table :data="allSessionData" style="margin-top: 1rem;">
  226. <el-table-column prop="peer_ip" label="远端"></el-table-column>
  227. <el-table-column prop="local_ip" label="本地"></el-table-column>
  228. <el-table-column prop="typeid" label="类型"></el-table-column>
  229. <el-table-column align="right">
  230. <template slot="header" slot-scope="scope">
  231. <el-button icon="el-icon-refresh-right" circle @click="getAllSession()"></el-button>
  232. </template>
  233. <template slot-scope="scope">
  234. <el-button @click.native.prevent="deleteRow(scope.$index, allSessionData)" type="text" size="small">移除
  235. </el-button>
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. </template>
  241. <script>
  242. import uiHeader from '../layout/UiHeader.vue'
  243. import MediaServer from './service/MediaServer'
  244. import echarts from 'echarts';
  245. export default {
  246. name: 'app',
  247. components: {
  248. echarts,
  249. uiHeader
  250. },
  251. data() {
  252. return {
  253. tableOption: {
  254. // legend: {},
  255. xAxis: {},
  256. yAxis: {},
  257. label: {},
  258. tooltip: {},
  259. dataZoom: [],
  260. series: []
  261. },
  262. table1Option: {
  263. // legend: {},
  264. xAxis: {},
  265. yAxis: {},
  266. label: {},
  267. tooltip: {},
  268. series: []
  269. },
  270. mChart: null,
  271. mChart1: null,
  272. charZoomStart: 0,
  273. charZoomEnd: 100,
  274. chartInterval: 0, //更新图表统计图定时任务标识
  275. allSessionData: [],
  276. visible: false,
  277. wvpVisible: false,
  278. serverConfig: {},
  279. wvpServerConfig: {},
  280. wvpServerVersion: {},
  281. mediaServer: new MediaServer(),
  282. mediaServerChoose: null,
  283. loadCount: 0,
  284. mediaServerList: []
  285. };
  286. },
  287. mounted() {
  288. this.initTable()
  289. this.chartInterval = setInterval(this.updateData, 3000);
  290. this.mediaServer.getOnlineMediaServerList((data) => {
  291. this.mediaServerList = data.data;
  292. if (this.mediaServerList && this.mediaServerList.length > 0) {
  293. this.mediaServerChoose = this.mediaServerList[0].id
  294. this.loadCount = this.mediaServerList[0].count;
  295. this.updateData();
  296. }
  297. })
  298. },
  299. destroyed() {
  300. clearInterval(this.chartInterval); //释放定时任务
  301. },
  302. methods: {
  303. chooseMediaChange: function (val) {
  304. this.loadCount = 0
  305. this.initTable()
  306. this.updateData();
  307. },
  308. updateData: function () {
  309. this.getThreadsLoad();
  310. this.getLoadCount();
  311. this.getAllSession();
  312. },
  313. /**
  314. * 获取线程状态
  315. */
  316. getThreadsLoad: function () {
  317. let that = this;
  318. if (that.mediaServerChoose != null) {
  319. this.$axios({
  320. method: 'get',
  321. url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad'
  322. }).then(function (res) {
  323. if (res.data.code == 0) {
  324. that.tableOption.xAxis.data.push(new Date().toLocaleTimeString('chinese', {
  325. hour12: false
  326. }));
  327. that.table1Option.xAxis.data.push(new Date().toLocaleTimeString('chinese', {
  328. hour12: false
  329. }));
  330. for (var i = 0; i < res.data.data.length; i++) {
  331. if (that.tableOption.series[i] === undefined) {
  332. let data = {
  333. data: [],
  334. type: 'line'
  335. };
  336. let data1 = {
  337. data: [],
  338. type: 'line'
  339. };
  340. data.data.push(res.data.data[i].delay);
  341. data1.data.push(res.data.data[i].load);
  342. that.tableOption.series.push(data);
  343. that.table1Option.series.push(data1);
  344. } else {
  345. that.tableOption.series[i].data.push(res.data.data[i].delay);
  346. that.table1Option.series[i].data.push(res.data.data[i].load);
  347. }
  348. }
  349. that.tableOption.dataZoom[0].start = that.charZoomStart;
  350. that.tableOption.dataZoom[0].end = that.charZoomEnd;
  351. that.table1Option.dataZoom[0].start = that.charZoomStart;
  352. that.table1Option.dataZoom[0].end = that.charZoomEnd;
  353. //that.myChart = echarts.init(document.getElementById('ThreadsLoad'));
  354. that.myChart.setOption(that.tableOption, true);
  355. // that.myChart1 = echarts.init(document.getElementById('WorkThreadsLoad'));
  356. that.myChart1.setOption(that.table1Option, true);
  357. that.$nextTick(() => {
  358. that.myChart.resize()
  359. that.myChart1.resize()
  360. })
  361. }
  362. });
  363. }
  364. },
  365. getLoadCount: function () {
  366. let that = this;
  367. if (that.mediaServerChoose != null) {
  368. that.mediaServer.getMediaServer(that.mediaServerChoose, (data) => {
  369. if (data.code == 0) {
  370. that.loadCount = data.data.count
  371. }
  372. })
  373. }
  374. },
  375. initTable: function () {
  376. let that = this;
  377. this.tableOption.xAxis = {
  378. type: 'category',
  379. data: [], // x轴数据
  380. name: '时间', // x轴名称
  381. // x轴名称样式
  382. nameTextStyle: {
  383. fontWeight: 300,
  384. fontSize: 15
  385. }
  386. };
  387. this.tableOption.yAxis = {
  388. type: 'value',
  389. name: '延迟率', // y轴名称
  390. boundaryGap: [0, '100%'],
  391. max: 100,
  392. axisLabel: {
  393. show: true,
  394. interval: 'auto',
  395. formatter: '{value} %'
  396. },
  397. // y轴名称样式
  398. nameTextStyle: {
  399. fontWeight: 300,
  400. fontSize: 15
  401. }
  402. };
  403. this.tableOption.dataZoom = [{
  404. show: true,
  405. start: this.charZoomStart,
  406. end: this.charZoomEnd
  407. }];
  408. this.myChart = echarts.init(document.getElementById('ThreadsLoad'));
  409. this.myChart.setOption(this.tableOption);
  410. this.myChart.on('dataZoom', function (event) {
  411. if (event.batch) {
  412. that.charZoomStart = event.batch[0].start;
  413. that.charZoomEnd = event.batch[0].end;
  414. } else {
  415. that.charZoomStart = event.start;
  416. that.charZoomEnd = event.end;
  417. }
  418. });
  419. this.table1Option.xAxis = {
  420. type: 'category',
  421. data: [], // x轴数据
  422. name: '时间', // x轴名称
  423. // x轴名称样式
  424. nameTextStyle: {
  425. fontWeight: 300,
  426. fontSize: 15
  427. }
  428. };
  429. this.table1Option.yAxis = {
  430. type: 'value',
  431. name: '负载率', // y轴名称
  432. boundaryGap: [0, '100%'],
  433. max: 100,
  434. axisLabel: {
  435. show: true,
  436. interval: 'auto',
  437. formatter: '{value} %'
  438. },
  439. // y轴名称样式
  440. nameTextStyle: {
  441. fontWeight: 300,
  442. fontSize: 15
  443. }
  444. };
  445. this.table1Option.dataZoom = [{
  446. show: true,
  447. start: this.charZoomStart,
  448. end: this.charZoomEnd
  449. }];
  450. this.myChart1 = echarts.init(document.getElementById('WorkThreadsLoad'));
  451. this.myChart1.setOption(this.table1Option);
  452. this.myChart1.on('dataZoom', function (event) {
  453. if (event.batch) {
  454. that.charZoomStart = event.batch[0].start;
  455. that.charZoomEnd = event.batch[0].end;
  456. } else {
  457. that.charZoomStart = event.start;
  458. that.charZoomEnd = event.end;
  459. }
  460. });
  461. },
  462. getAllSession: function () {
  463. let that = this;
  464. that.allSessionData = [];
  465. this.$axios({
  466. method: 'get',
  467. url: '/zlm/' + that.mediaServerChoose + '/index/api/getAllSession'
  468. }).then(function (res) {
  469. res.data.data.forEach(item => {
  470. let data = {
  471. peer_ip: item.peer_ip,
  472. local_ip: item.local_ip,
  473. typeid: item.typeid,
  474. id: item.id
  475. };
  476. that.allSessionData.push(data);
  477. });
  478. });
  479. },
  480. getServerConfig: function () {
  481. let that = this;
  482. this.$axios({
  483. method: 'get',
  484. url: '/zlm/' + that.mediaServerChoose + '/index/api/getServerConfig'
  485. }).then(function (res) {
  486. let info = res.data.data[0];
  487. let serverInfo = {}
  488. for (let i = 0; i < Object.keys(info).length; i++) {
  489. let key = Object.keys(info)[i];
  490. let group = key.substring(0, key.indexOf("."))
  491. let itemKey = key.substring(key.indexOf(".") + 1)
  492. if (!serverInfo[group]) serverInfo[group] = {}
  493. serverInfo[group][itemKey] = info[key]
  494. }
  495. that.serverConfig = serverInfo;
  496. that.visible = true;
  497. });
  498. },
  499. getWVPServerConfig: function () {
  500. let that = this;
  501. this.$axios({
  502. method: 'get',
  503. url: '/api/server/config'
  504. }).then(function (res) {
  505. console.log(res)
  506. that.wvpServerConfig = res.data.data;
  507. that.wvpVisible = true;
  508. });
  509. this.$axios({
  510. method: 'get',
  511. url: '/api/server/version'
  512. }).then(function (res) {
  513. console.log(res)
  514. that.wvpServerVersion = res.data.data;
  515. that.wvpVisible = true;
  516. });
  517. },
  518. reStartServer: function () {
  519. let that = this;
  520. this.$confirm('此操作将重启媒体服务器, 是否继续?', '提示', {
  521. confirmButtonText: '确定',
  522. cancelButtonText: '取消',
  523. type: 'warning'
  524. }).then(() => {
  525. let that = this;
  526. this.$axios({
  527. method: 'get',
  528. url: '/zlm/' + that.mediaServerChoose + '/index/api/restartServer'
  529. }).then(function (res) {
  530. that.getAllSession();
  531. if (res.data.code == 0) {
  532. that.$message({
  533. type: 'success',
  534. message: '操作完成'
  535. });
  536. }
  537. });
  538. });
  539. },
  540. deleteRow: function (index, tabledata) {
  541. let that = this;
  542. this.$confirm('此操作将断开该通信链路, 是否继续?', '提示', {
  543. confirmButtonText: '确定',
  544. cancelButtonText: '取消',
  545. type: 'warning'
  546. })
  547. .then(() => {
  548. that.deleteSession(tabledata[index].id);
  549. })
  550. .catch(() => {
  551. console.log('id:' + JSON.stringify(tabledata[index]));
  552. this.$message({
  553. type: 'info',
  554. message: '已取消删除'
  555. });
  556. });
  557. console.log(JSON.stringify(tabledata[index]));
  558. },
  559. deleteSession: function (id) {
  560. let that = this;
  561. this.$axios({
  562. method: 'get',
  563. url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session?id=' + id
  564. }).then(function (res) {
  565. that.getAllSession();
  566. that.$message({
  567. type: 'success',
  568. message: '删除成功!'
  569. });
  570. });
  571. },
  572. getNameFromKey: function (key) {
  573. let nameData = {
  574. "waitTrack": "等待编码信息",
  575. "interfaceAuthenticationExcludes": "不进行鉴权的接口",
  576. "playTimeout": "点播超时时间",
  577. "autoApplyPlay": "自动点播",
  578. "recordPushLive": "推流录像",
  579. "redisConfig": "自动配置redis",
  580. "thirdPartyGBIdReg": "stream信息正则",
  581. "savePositionHistory": "保存轨迹信息",
  582. "interfaceAuthentication": "接口鉴权",
  583. "serverId": "服务ID",
  584. "logInDatebase": "日志存储进数据库",
  585. "seniorSdp": "扩展SDP",
  586. "password": "密码",
  587. "port": "端口号",
  588. "keepaliveTimeOut": "心跳超时",
  589. "domain": "国标域",
  590. "ip": "IP地址",
  591. "monitorIp": "监听IP",
  592. "alarm": "存储报警信息",
  593. "ptzSpeed": "云台控制速度",
  594. "id": "国标ID",
  595. "registerTimeInterval": "注册间隔",
  596. "artifactId": "模块名称",
  597. "version": "版本",
  598. "project": "工程",
  599. "git_Revision": "GIT修订版本",
  600. "git_BRANCH": "GIT分支",
  601. "git_URL": "GIT地址",
  602. "build_DATE": "构建时间",
  603. "create_By": "作者",
  604. "git_Revision_SHORT": "GIT修订版本(短)",
  605. "build_Jdk": "构建用JDK",
  606. };
  607. console.log(key + ": " + nameData[key])
  608. if (nameData[key]) {
  609. return nameData[key]
  610. } else {
  611. return key;
  612. }
  613. },
  614. getMediaKeyNameFromKey: function (key) {
  615. let nameData = {
  616. "waitTrack": "等待编码信息",
  617. "interfaceAuthenticationExcludes": "不进行鉴权的接口",
  618. "playTimeout": "点播超时时间",
  619. "autoApplyPlay": "自动点播",
  620. "recordPushLive": "推流录像",
  621. "redisConfig": "自动配置redis",
  622. "thirdPartyGBIdReg": "stream信息正则",
  623. "savePositionHistory": "保存轨迹信息",
  624. "interfaceAuthentication": "接口鉴权",
  625. "serverId": "服务ID",
  626. "logInDatebase": "日志存储进数据库",
  627. "seniorSdp": "扩展SDP",
  628. "password": "密码",
  629. "port": "端口号",
  630. "keepaliveTimeOut": "心跳超时",
  631. "domain": "国标域",
  632. "ip": "IP地址",
  633. "monitorIp": "监听IP",
  634. "alarm": "存储报警信息",
  635. "ptzSpeed": "云台控制速度",
  636. "id": "国标ID",
  637. "registerTimeInterval": "注册间隔",
  638. "artifactId": "模块名称",
  639. "version": "版本",
  640. "project": "工程",
  641. "git_Revision": "GIT修订版本",
  642. "git_BRANCH": "GIT分支",
  643. "git_URL": "GIT地址",
  644. "build_DATE": "构建时间",
  645. "create_By": "作者",
  646. "git_Revision_SHORT": "GIT修订版本(短)",
  647. "build_Jdk": "构建用JDK",
  648. };
  649. console.log(key + ": " + nameData[key])
  650. if (nameData[key]) {
  651. return nameData[key]
  652. } else {
  653. return key;
  654. }
  655. }
  656. }
  657. };
  658. </script>
  659. <style>
  660. #app {
  661. height: 100%;
  662. }
  663. .control-table {
  664. background-color: #ffffff;
  665. height: 25rem;
  666. }
  667. .table-c {
  668. border-right: 1px solid #dcdcdc;
  669. border-bottom: 1px solid #dcdcdc;
  670. }
  671. .table-c td {
  672. border-left: 1px solid #dcdcdc;
  673. border-top: 1px solid #dcdcdc;
  674. padding: 0.2rem;
  675. }
  676. .el-table {
  677. width: 99.9% !important;
  678. }
  679. </style>