update special equipment management

This commit is contained in:
lb 2024-02-02 13:20:33 +08:00
parent 49afcb7666
commit 3a3e33db0e

View File

@ -59,7 +59,7 @@
</base-dialog>
<!-- 设备 详情 - 编辑 -->
<!-- <EquipmentDrawer
<EquipmentDrawer
v-if="editVisible"
ref="drawer"
:mode="editMode"
@ -108,7 +108,7 @@
]"
@refreshDataList="getList"
@cancel="cancelEdit"
@destroy="cancelEdit" /> -->
@destroy="cancelEdit" />
</div>
</template>
@ -388,25 +388,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() {