From 69d9692f6194d1e03ec81cf87ea8f0e7a62f7173 Mon Sep 17 00:00:00 2001
From: wangyimeng <421132955@qq.com>
Date: 星期三, 16 三月 2022 15:27:12 +0800
Subject: [PATCH] 删除重复字段
---
web_src/src/components/ParentPlatformList.vue | 85 ++++++++++++++++++++++++++----------------
1 files changed, 53 insertions(+), 32 deletions(-)
diff --git a/web_src/src/components/ParentPlatformList.vue b/web_src/src/components/ParentPlatformList.vue
index 39aeb3c..ff3de48 100644
--- a/web_src/src/components/ParentPlatformList.vue
+++ b/web_src/src/components/ParentPlatformList.vue
@@ -13,13 +13,13 @@
</div>
<!--璁惧鍒楄〃-->
<el-table :data="platformList" border style="width: 100%" :height="winHeight">
- <el-table-column prop="name" label="鍚嶇О" width="240" align="center"></el-table-column>
+ <el-table-column prop="name" label="鍚嶇О" align="center"></el-table-column>
<el-table-column prop="serverGBId" label="骞冲彴缂栧彿" width="180" align="center"></el-table-column>
<el-table-column label="鏄惁鍚敤" width="120" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable">宸插惎鐢�</el-tag>
- <el-tag size="medium" v-if="!scope.row.enable">鏈惎鐢�</el-tag>
+ <el-tag size="medium" type="info" v-if="!scope.row.enable">鏈惎鐢�</el-tag>
</div>
</template>
</el-table-column>
@@ -38,9 +38,19 @@
</div>
</template>
</el-table-column>
- <el-table-column prop="deviceGBId" label="璁惧鍥芥爣缂栧彿" width="240" align="center"></el-table-column>
+ <el-table-column prop="deviceGBId" label="璁惧鍥芥爣缂栧彿" width="200" align="center"></el-table-column>
<el-table-column prop="transport" label="淇′护浼犺緭妯″紡" width="120" align="center"></el-table-column>
- <el-table-column prop="channelCount" label="閫氶亾鏁�" align="center"></el-table-column>
+ <el-table-column prop="channelCount" label="閫氶亾鏁�" width="120" align="center"></el-table-column>
+ <el-table-column label="璁㈤槄淇℃伅" width="240" align="center" fixed="right">
+ <template slot-scope="scope">
+ <i v-if="scope.row.alarmSubscribe" style="font-size: 1.5rem;" title="鎶ヨ璁㈤槄" class="subscribe-on iconfont icon-gbaojings" ></i>
+ <i v-if="!scope.row.alarmSubscribe" style="font-size: 1.5rem;" title="鎶ヨ璁㈤槄" class="subscribe-off iconfont icon-gbaojings" ></i>
+ <i v-if="scope.row.catalogSubscribe" title="鐩綍璁㈤槄" class="subscribe-on iconfont icon-gjichus" ></i>
+ <i v-if="!scope.row.catalogSubscribe" title="鐩綍璁㈤槄" class="subscribe-off iconfont icon-gjichus" ></i>
+ <i v-if="scope.row.gpsSubscribe" title="浣嶇疆璁㈤槄" class="subscribe-on iconfont icon-gxunjians" ></i>
+ <i v-if="!scope.row.gpsSubscribe" title="浣嶇疆璁㈤槄" class="subscribe-off iconfont icon-gxunjians" ></i>
+ </template>
+ </el-table-column>
<el-table-column label="鎿嶄綔" width="300" align="center" fixed="right">
<template slot-scope="scope">
@@ -68,9 +78,9 @@
</template>
<script>
-import platformEdit from './platformEdit.vue'
+import platformEdit from './dialog/platformEdit.vue'
import uiHeader from './UiHeader.vue'
-import chooseChannelDialog from './gb28181/chooseChannel.vue'
+import chooseChannelDialog from './dialog/chooseChannel.vue'
export default {
name: 'app',
components: {
@@ -89,13 +99,12 @@
};
},
computed: {
-
+
getcurrentDeviceChannels: function() {
-
+
}
},
mounted() {
- this.$refs.chooseChannelDialog.openDialog()
this.initData();
this.updateLooper = setInterval(this.initData, 10000);
},
@@ -122,23 +131,24 @@
},
deletePlatformCommit: function(platform) {
var that = this;
- that.$axios.post(`/api/platforms/delete`, platform)
- .then(function (res) {
- if (res.data == "success") {
- that.$message({
- showClose: true,
- message: '鍒犻櫎鎴愬姛',
- type: 'success'
- });
- that.initData()
- }
- })
- .catch(function (error) {
- console.log(error);
- });
+ that.$axios({
+ method: 'delete',
+ url:`/api/platform/delete/${platform.serverGBId}`
+ }).then(function (res) {
+ if (res.data == "success") {
+ that.$message({
+ showClose: true,
+ message: '鍒犻櫎鎴愬姛',
+ type: 'success'
+ });
+ that.initData()
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
},
chooseChannel: function(platform) {
- this.$refs.chooseChannelDialog.openDialog()
+ this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, platform.name, platform.catalogId, this.initData)
},
initData: function() {
this.getPlatformList();
@@ -154,17 +164,28 @@
getPlatformList: function() {
let that = this;
- this.$axios.get(`/api/platforms/${that.count}/${that.currentPage - 1}`)
- .then(function (res) {
- that.total = res.data.total;
- that.platformList = res.data.list;
- })
- .catch(function (error) {
- console.log(error);
- });
+ this.$axios({
+ method: 'get',
+ url:`/api/platform/query/${that.count}/${that.currentPage}`
+ }).then(function (res) {
+ that.total = res.data.total;
+ that.platformList = res.data.list;
+ }).catch(function (error) {
+ console.log(error);
+ });
}
}
};
</script>
+<style>
+.subscribe-on{
+ color: #409EFF;
+ font-size: 1.3rem;
+}
+.subscribe-off{
+ color: #afafb3;
+ font-size: 1.3rem;
+}
+</style>
--
Gitblit v1.8.0