projects/mesxc-lb #205
@ -59,10 +59,11 @@
|
|||||||
</base-dialog>
|
</base-dialog>
|
||||||
|
|
||||||
<!-- 设备 详情 - 编辑 -->
|
<!-- 设备 详情 - 编辑 -->
|
||||||
<!-- <EquipmentDrawer
|
<EquipmentDrawer
|
||||||
v-if="editVisible"
|
v-if="editVisible"
|
||||||
ref="drawer"
|
ref="drawer"
|
||||||
:mode="editMode"
|
:mode="editMode"
|
||||||
|
:isFireEquipment="true"
|
||||||
@update-mode="editMode = $event"
|
@update-mode="editMode = $event"
|
||||||
:data-id="form.id"
|
:data-id="form.id"
|
||||||
:sections="[
|
:sections="[
|
||||||
@ -108,7 +109,7 @@
|
|||||||
]"
|
]"
|
||||||
@refreshDataList="getList"
|
@refreshDataList="getList"
|
||||||
@cancel="cancelEdit"
|
@cancel="cancelEdit"
|
||||||
@destroy="cancelEdit" /> -->
|
@destroy="cancelEdit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -403,25 +404,41 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.form.id = row.id;
|
||||||
this.showUploadComponents = false;
|
this.showUploadComponents = false;
|
||||||
this.editMode = 'edit';
|
this.editMode = 'edit';
|
||||||
const id = row.id;
|
this.editVisible = true;
|
||||||
getEquipment(id).then((response) => {
|
this.$nextTick(() => {
|
||||||
this.form = response.data;
|
this.$refs['drawer'].init();
|
||||||
this.open = true;
|
|
||||||
this.title = '修改设备';
|
|
||||||
});
|
});
|
||||||
|
// 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) {
|
handleDetail(row, mode='detail') {
|
||||||
this.reset();
|
const {id} = row;
|
||||||
this.showUploadComponents = false;
|
this.form.id = id;
|
||||||
const id = row.id;
|
// 打开抽屉
|
||||||
this.editMode = 'detail';
|
this.editMode = mode;
|
||||||
getEquipment(id).then((response) => {
|
this.editVisible = true;
|
||||||
this.form = response.data;
|
this.$nextTick(() => {
|
||||||
this.open = true;
|
this.$refs['drawer'].init();
|
||||||
this.title = '查看详情';
|
})
|
||||||
});
|
// 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() {
|
submitForm() {
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<EquipmentInfoForm
|
<EquipmentInfoForm
|
||||||
key="drawer-dialog-form"
|
key="drawer-dialog-form"
|
||||||
v-if="showForm"
|
v-if="showForm"
|
||||||
|
:isFireEquipment="isFireEquipment"
|
||||||
:disabled="mode.includes('detail')"
|
:disabled="mode.includes('detail')"
|
||||||
:sync-filelist="syncFileListFlag"
|
:sync-filelist="syncFileListFlag"
|
||||||
v-model="form" />
|
v-model="form" />
|
||||||
@ -149,7 +150,7 @@ const SmallTitle = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
components: { SmallTitle, DialogForm, EquipmentInfoForm },
|
||||||
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
props: ['sections', 'mode', 'dataId', 'isFireEquipment'], // dataId 作为一个通用的存放id的字段
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
@ -279,7 +280,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.btnLoading = false;
|
this.btnLoading = false;
|
||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList');
|
||||||
this.handleCancel();
|
this.handleCancel();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -121,6 +121,16 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<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-col :span="8">
|
||||||
<el-form-item label="生产日期" prop="productionTime" :rules="[]">
|
<el-form-item label="生产日期" prop="productionTime" :rules="[]">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -130,8 +140,8 @@
|
|||||||
placeholder="请选择生产日期"
|
placeholder="请选择生产日期"
|
||||||
value-format="timestamp"></el-date-picker>
|
value-format="timestamp"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="进场日期" prop="enterTime" :rules="[]">
|
<el-form-item label="进场日期" prop="enterTime" :rules="[]">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.enterTime"
|
v-model="form.enterTime"
|
||||||
@ -274,6 +284,10 @@ export default {
|
|||||||
default: null,
|
default: null,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
|
isFireEquipment: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -296,6 +310,7 @@ export default {
|
|||||||
description: '',
|
description: '',
|
||||||
assets: [],
|
assets: [],
|
||||||
pics: [],
|
pics: [],
|
||||||
|
dueDate: ''
|
||||||
},
|
},
|
||||||
rpList: [],
|
rpList: [],
|
||||||
dataLoaded: false,
|
dataLoaded: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user