7/13 水电表解绑房屋
This commit is contained in:
@@ -129,9 +129,18 @@
|
||||
>
|
||||
<!-- <el-button link type="primary" @click="handleUpdate(scope.row.deviceCode)">最新抄表记录</el-button> -->
|
||||
|
||||
<el-button link type="primary" @click="handleOpenDialog('UpdateHouse', scope.row)" v-has-permi="['equipment:edithouse:waterdevice']"
|
||||
<el-button
|
||||
v-if="!scope.row.houseName"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleOpenDialog('UpdateHouse', scope.row)"
|
||||
v-has-permi="['equipment:edithouse:waterdevice']"
|
||||
>绑定房屋</el-button
|
||||
>
|
||||
<el-button v-else link type="primary" @click="handleUnbind(scope.row)" v-has-permi="['equipment:edithouse:waterdevice']"
|
||||
>解绑房屋</el-button
|
||||
>
|
||||
|
||||
<!-- <el-dropdown style="vertical-align: text-top">
|
||||
<el-button link type="primary">
|
||||
<div>
|
||||
@@ -309,7 +318,8 @@ import {
|
||||
WaterDeviceMakerQrcode,
|
||||
updateWaterDevice,
|
||||
WaterDeviceUpdateBin,
|
||||
latestRecord
|
||||
latestRecord,
|
||||
waterDeviceUnbind
|
||||
} from '@/api/system/SdbWaterDevice';
|
||||
import { WaterDeviceVO } from '@/api/system/SdbWaterDevice/type';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
@@ -637,6 +647,17 @@ function handleUpdate(id: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// 解绑房屋
|
||||
function handleUnbind(data: WaterDeviceVO) {
|
||||
waterDeviceUnbind(data.deviceCode)
|
||||
.then(() => {
|
||||
ElMessage.success('解绑成功');
|
||||
})
|
||||
.finally(() => {
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
if (dialogType.value === 'usedWater') {
|
||||
|
||||
Reference in New Issue
Block a user