Commit ee490f5b9382285bcd48f834e6e0a1c700e88bdf

Authored by 648540858
Committed by GitHub
2 parents 0de634cd c23a5292

Merge pull request #413 from mk1990/wvp-28181-2.0

修改前端control.vue和DeviceList.vue控制台错误和警告
web_src/src/components/DeviceList.vue
... ... @@ -57,7 +57,7 @@
57 57  
58 58 <el-table-column label="操作" width="450" align="center" fixed="right">
59 59 <template slot-scope="scope">
60   - <el-button size="mini" :ref="scope.row.deviceId + 'refbtn' " v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新</el-button>
  60 + <el-button size="mini" :loading="scope.row.loading" v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新</el-button>
61 61 <el-button-group>
62 62 <el-button size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" type="primary" @click="showChannelList(scope.row)">通道</el-button>
63 63 <el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary" @click="showDevicePosition(scope.row)">定位</el-button>
... ... @@ -204,7 +204,7 @@
204 204 refDevice: function(itemData) {
205 205 console.log("刷新对应设备:" + itemData.deviceId);
206 206 var that = this;
207   - that.$refs[itemData.deviceId + 'refbtn' ].loading = true;
  207 + that.$set(itemData,"loading", true);
208 208 this.$axios({
209 209 method: 'post',
210 210 url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
... ... @@ -224,7 +224,7 @@
224 224 });
225 225 }
226 226 that.initData()
227   - that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
  227 + that.$set(itemData,"loading", true);
228 228 }).catch(function(e) {
229 229 console.error(e)
230 230 that.$message({
... ... @@ -232,7 +232,7 @@
232 232 message: e,
233 233 type: 'error'
234 234 });
235   - that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
  235 + that.$set(itemData,"loading", true);
236 236 });
237 237 },
238 238 //通知设备上传媒体流
... ...
web_src/src/components/control.vue
... ... @@ -21,7 +21,7 @@
21 21 <div style="position: absolute; right: 1rem; top: 0.3rem;">
22 22 <el-popover placement="bottom" width="900" height="300" trigger="click">
23 23 <div style="height: 600px; overflow:auto; padding: 20px">
24   - <el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border column="1" style="margin-bottom: 1rem">
  24 + <el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border :column="1" style="margin-bottom: 1rem">
25 25 <template slot="title">
26 26 {{key}}
27 27 </template>
... ... @@ -37,9 +37,9 @@
37 37 </el-popover>
38 38 <el-popover placement="bottom" width="900" height="300" trigger="click">
39 39 <div style="height: 600px;overflow:auto; padding: 20px">
40   - <el-descriptions title="国标配置" border column="1">
  40 + <el-descriptions title="国标配置" border :column="1">
41 41 <template slot="extra">
42   - <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>
  42 + <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>
43 43 </template>
44 44 <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip">
45 45 <template slot="label">
... ... @@ -50,9 +50,9 @@
50 50 </el-descriptions>
51 51  
52 52 <div style="margin-top: 1rem">
53   - <el-descriptions title="基础配置" border column="1">
  53 + <el-descriptions title="基础配置" border :column="1">
54 54 <template slot="extra">
55   - <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>
  55 + <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>
56 56 </template>
57 57 <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key">
58 58 <template slot="label" >
... ... @@ -84,9 +84,9 @@
84 84 </el-descriptions>
85 85 </div>
86 86 <div style="margin-top: 1rem">
87   - <el-descriptions title="版本信息" border column="1">
  87 + <el-descriptions title="版本信息" border :column="1">
88 88 <template slot="extra">
89   - <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>
  89 + <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>
90 90 </template>
91 91 <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key">
92 92 <template slot="label">
... ...