Browse Source

摄像头绑定

master
z_yu 2 years ago
parent
commit
11cc09a93c
  1. 10
      src/api/storeManage/deviceManage/device.js
  2. 11
      src/views/storeManage/warehouse3DConfig/index.vue

10
src/api/storeManage/deviceManage/device.js

@ -100,4 +100,12 @@ export function FetchInBorrowByQuCol(params) {
}) })
} }
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol }
export function unbind(data) {
return request({
url: 'api/displayconfig/unbind',
method: 'post',
data
})
}
export default { add, edit, del, getSupplier, getDeviceType, getDeviceById, getDesecabinetById, getRotarycabinetById, getDeviceList, FetchInBorrowByQuCol, unbind }

11
src/views/storeManage/warehouse3DConfig/index.vue

@ -7,7 +7,8 @@
</el-select> </el-select>
</div> </div>
<div> <div>
<el-button type="primary" class="iconfont icon-bangdingcanshu-fanbai" size="mini" :disabled="selections.length !== 1" @click="handleBindParam">绑定参数</el-button>
<el-button type="primary" class="iconfont icon-bangdingcanshu-fanbai" size="mini" :disabled="selections.length !== 1 || selections[0].bindState" @click="handleBindParam">绑定参数</el-button>
<el-button type="primary" class="iconfont icon-bangdingcanshu-fanbai" size="mini" :disabled="selections.length !== 1 || !selections[0].bindState" @click="handleUnbind">解除绑定</el-button>
</div> </div>
</div> </div>
<div class="app-container container-wrap"> <div class="app-container container-wrap">
@ -223,6 +224,11 @@ export default {
}) })
} }
}, },
handleUnbind() {
crudDevice.unbind({ id: this.selections[0].id }).then((data) => {
this.getDisplayConfigList()
})
},
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row) // this.$refs.table.toggleRowSelection(row) //
@ -240,6 +246,9 @@ export default {
this.form.deviceSpecParams = [] this.form.deviceSpecParams = []
this.form.deviceSpecParams.push(paramValue.self) this.form.deviceSpecParams.push(paramValue.self)
} }
if (this.form.deviceSpecParams === '') {
this.form.deviceSpecParams = []
}
} }
displayConfigApi.bind(this.form).then(() => { displayConfigApi.bind(this.form).then(() => {
this.$message.success('绑定成功 ') this.$message.success('绑定成功 ')

Loading…
Cancel
Save