Commit ee490f5b9382285bcd48f834e6e0a1c700e88bdf
Committed by
GitHub
Merge pull request #413 from mk1990/wvp-28181-2.0
修改前端control.vue和DeviceList.vue控制台错误和警告
Showing
2 changed files
with
11 additions
and
11 deletions
web_src/src/components/DeviceList.vue
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | 57 | ||
| 58 | <el-table-column label="操作" width="450" align="center" fixed="right"> | 58 | <el-table-column label="操作" width="450" align="center" fixed="right"> |
| 59 | <template slot-scope="scope"> | 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 | <el-button-group> | 61 | <el-button-group> |
| 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> | 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 | <el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary" @click="showDevicePosition(scope.row)">定位</el-button> | 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,7 +204,7 @@ | ||
| 204 | refDevice: function(itemData) { | 204 | refDevice: function(itemData) { |
| 205 | console.log("刷新对应设备:" + itemData.deviceId); | 205 | console.log("刷新对应设备:" + itemData.deviceId); |
| 206 | var that = this; | 206 | var that = this; |
| 207 | - that.$refs[itemData.deviceId + 'refbtn' ].loading = true; | 207 | + that.$set(itemData,"loading", true); |
| 208 | this.$axios({ | 208 | this.$axios({ |
| 209 | method: 'post', | 209 | method: 'post', |
| 210 | url: '/api/device/query/devices/' + itemData.deviceId + '/sync' | 210 | url: '/api/device/query/devices/' + itemData.deviceId + '/sync' |
| @@ -224,7 +224,7 @@ | @@ -224,7 +224,7 @@ | ||
| 224 | }); | 224 | }); |
| 225 | } | 225 | } |
| 226 | that.initData() | 226 | that.initData() |
| 227 | - that.$refs[itemData.deviceId + 'refbtn' ].loading = false; | 227 | + that.$set(itemData,"loading", true); |
| 228 | }).catch(function(e) { | 228 | }).catch(function(e) { |
| 229 | console.error(e) | 229 | console.error(e) |
| 230 | that.$message({ | 230 | that.$message({ |
| @@ -232,7 +232,7 @@ | @@ -232,7 +232,7 @@ | ||
| 232 | message: e, | 232 | message: e, |
| 233 | type: 'error' | 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,7 +21,7 @@ | ||
| 21 | <div style="position: absolute; right: 1rem; top: 0.3rem;"> | 21 | <div style="position: absolute; right: 1rem; top: 0.3rem;"> |
| 22 | <el-popover placement="bottom" width="900" height="300" trigger="click"> | 22 | <el-popover placement="bottom" width="900" height="300" trigger="click"> |
| 23 | <div style="height: 600px; overflow:auto; padding: 20px"> | 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 | <template slot="title"> | 25 | <template slot="title"> |
| 26 | {{key}} | 26 | {{key}} |
| 27 | </template> | 27 | </template> |
| @@ -37,9 +37,9 @@ | @@ -37,9 +37,9 @@ | ||
| 37 | </el-popover> | 37 | </el-popover> |
| 38 | <el-popover placement="bottom" width="900" height="300" trigger="click"> | 38 | <el-popover placement="bottom" width="900" height="300" trigger="click"> |
| 39 | <div style="height: 600px;overflow:auto; padding: 20px"> | 39 | <div style="height: 600px;overflow:auto; padding: 20px"> |
| 40 | - <el-descriptions title="国标配置" border column="1"> | 40 | + <el-descriptions title="国标配置" border :column="1"> |
| 41 | <template slot="extra"> | 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 | </template> | 43 | </template> |
| 44 | <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip"> | 44 | <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.sip"> |
| 45 | <template slot="label"> | 45 | <template slot="label"> |
| @@ -50,9 +50,9 @@ | @@ -50,9 +50,9 @@ | ||
| 50 | </el-descriptions> | 50 | </el-descriptions> |
| 51 | 51 | ||
| 52 | <div style="margin-top: 1rem"> | 52 | <div style="margin-top: 1rem"> |
| 53 | - <el-descriptions title="基础配置" border column="1"> | 53 | + <el-descriptions title="基础配置" border :column="1"> |
| 54 | <template slot="extra"> | 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 | </template> | 56 | </template> |
| 57 | <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key"> | 57 | <el-descriptions-item v-for="(value, key, index) in wvpServerConfig.base" :key="key"> |
| 58 | <template slot="label" > | 58 | <template slot="label" > |
| @@ -84,9 +84,9 @@ | @@ -84,9 +84,9 @@ | ||
| 84 | </el-descriptions> | 84 | </el-descriptions> |
| 85 | </div> | 85 | </div> |
| 86 | <div style="margin-top: 1rem"> | 86 | <div style="margin-top: 1rem"> |
| 87 | - <el-descriptions title="版本信息" border column="1"> | 87 | + <el-descriptions title="版本信息" border :column="1"> |
| 88 | <template slot="extra"> | 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 | </template> | 90 | </template> |
| 91 | <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key"> | 91 | <el-descriptions-item v-for="(value, key, index) in wvpServerVersion" :key="key"> |
| 92 | <template slot="label"> | 92 | <template slot="label"> |