update firefighting

This commit is contained in:
lb
2024-02-02 13:15:25 +08:00
parent 4a68467d88
commit 49afcb7666
4 changed files with 54 additions and 21 deletions

View File

@@ -59,10 +59,11 @@
</base-dialog>
<!-- 设备 详情 - 编辑 -->
<!-- <EquipmentDrawer
<EquipmentDrawer
v-if="editVisible"
ref="drawer"
:mode="editMode"
:isFireEquipment="true"
@update-mode="editMode = $event"
:data-id="form.id"
:sections="[
@@ -108,7 +109,7 @@
]"
@refreshDataList="getList"
@cancel="cancelEdit"
@destroy="cancelEdit" /> -->
@destroy="cancelEdit" />
</div>
</template>
@@ -403,25 +404,41 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.form.id = row.id;
this.showUploadComponents = false;
this.editMode = 'edit';
const id = row.id;
getEquipment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '修改设备';
this.editVisible = true;
this.$nextTick(() => {
this.$refs['drawer'].init();
});
// this.reset();
// this.showUploadComponents = false;
// this.editMode = 'edit';
// const id = row.id;
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '修改设备';
// });
},
handleDetail(row) {
this.reset();
this.showUploadComponents = false;
const id = row.id;
this.editMode = 'detail';
getEquipment(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = '查看详情';
});
handleDetail(row, mode='detail') {
const {id} = row;
this.form.id = id;
// 打开抽屉
this.editMode = mode;
this.editVisible = true;
this.$nextTick(() => {
this.$refs['drawer'].init();
})
// this.reset();
// this.showUploadComponents = false;
// const id = row.id;
// this.editMode = 'detail';
// getEquipment(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = '查看详情';
// });
},
/** 提交按钮 */
submitForm() {