projects/mesxc-lb #205
@ -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() {
|
||||
|
@ -37,6 +37,7 @@
|
||||
<EquipmentInfoForm
|
||||
key="drawer-dialog-form"
|
||||
v-if="showForm"
|
||||
:isFireEquipment="isFireEquipment"
|
||||
:disabled="mode.includes('detail')"
|
||||
:sync-filelist="syncFileListFlag"
|
||||
v-model="form" />
|
||||
@ -149,7 +150,7 @@ const SmallTitle = {
|
||||
|
||||
export default {
|
||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
||||
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
||||
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId 作为一个通用的存放id的字段
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@ -279,7 +280,7 @@ export default {
|
||||
}
|
||||
|
||||
this.btnLoading = false;
|
||||
this.$emit('refreshDataList')
|
||||
this.$emit('refreshDataList');
|
||||
this.handleCancel();
|
||||
});
|
||||
},
|
||||
|
@ -121,6 +121,16 @@
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col v-if="isFireEquipment" :span="12">
|
||||
<el-form-item label="有效期至" prop="dueDate" :rules="[]">
|
||||
<el-date-picker
|
||||
v-model="form.dueDate"
|
||||
:disabled="disabled"
|
||||
type="datetime"
|
||||
placeholder="请选择生产日期"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="productionTime" :rules="[]">
|
||||
<el-date-picker
|
||||
@ -130,8 +140,8 @@
|
||||
placeholder="请选择生产日期"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="进场日期" prop="enterTime" :rules="[]">
|
||||
<el-date-picker
|
||||
v-model="form.enterTime"
|
||||
@ -274,6 +284,10 @@ export default {
|
||||
default: null,
|
||||
required: false,
|
||||
},
|
||||
isFireEquipment: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -296,6 +310,7 @@ export default {
|
||||
description: '',
|
||||
assets: [],
|
||||
pics: [],
|
||||
dueDate: ''
|
||||
},
|
||||
rpList: [],
|
||||
dataLoaded: false,
|
||||
|
Loading…
Reference in New Issue
Block a user