Browse Source

1. 修改control.vue 报Invalid prop: type check failed for prop "column". Expected Number with value 1, got String with value "1".

2. 修改control.vue Error: [vue-clipboards] Invalid value. Please use a valid value.
3. 修改DeviceList.vue 刷新时报
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "loading"
pull/413/head
mk1990 3 years ago
parent
commit
a1b6e56427
  1. 8
      web_src/src/components/DeviceList.vue
  2. 14
      web_src/src/components/control.vue

8
web_src/src/components/DeviceList.vue

@ -57,7 +57,7 @@
<el-table-column label="操作" width="450" align="center" fixed="right">
<template slot-scope="scope">
<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>
<el-button size="mini" :loading="scope.row.loading" v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新</el-button>
<el-button-group>
<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>
<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 @@
refDevice: function(itemData) {
console.log("刷新对应设备:" + itemData.deviceId);
var that = this;
that.$refs[itemData.deviceId + 'refbtn' ].loading = true;
that.$set(itemData,"loading", true);
this.$axios({
method: 'post',
url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
@ -224,7 +224,7 @@
});
}
that.initData()
that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
that.$set(itemData,"loading", true);
}).catch(function(e) {
console.error(e)
that.$message({
@ -232,7 +232,7 @@
message: e,
type: 'error'
});
that.$refs[itemData.deviceId + 'refbtn' ].loading = false;
that.$set(itemData,"loading", true);
});
},
//

14
web_src/src/components/control.vue

@ -21,7 +21,7 @@
<div style="position: absolute; right: 1rem; top: 0.3rem;">
<el-popover placement="bottom" width="900" height="300" trigger="click">
<div style="height: 600px; overflow:auto; padding: 20px">
<el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border column="1" style="margin-bottom: 1rem">
<el-descriptions v-for="(value, key, index) in serverConfig" :key="key" border :column="1" style="margin-bottom: 1rem">
<template slot="title">
{{key}}
</template>
@ -37,9 +37,9 @@
</el-popover>
<el-popover placement="bottom" width="900" height="300" trigger="click">
<div style="height: 600px;overflow:auto; padding: 20px">
<el-descriptions title="国标配置" border column="1">
<el-descriptions title="国标配置" border :column="1">
<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>
<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">
@ -50,9 +50,9 @@
</el-descriptions>
<div style="margin-top: 1rem">
<el-descriptions title="基础配置" border column="1">
<el-descriptions title="基础配置" border :column="1">
<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>
<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" :key="key">
<template slot="label" >
@ -84,9 +84,9 @@
</el-descriptions>
</div>
<div style="margin-top: 1rem">
<el-descriptions title="版本信息" border column="1">
<el-descriptions title="版本信息" border :column="1">
<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>
<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" :key="key">
<template slot="label">

Loading…
Cancel
Save