diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 75c11b41..f0c324ea 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -21,11 +21,13 @@ v-model="form[col.prop]" @change="$emit('update', form)" :placeholder="`请输入${col.label}`" + :disabled="disabled" v-bind="col.bind" /> @@ -33,6 +35,7 @@ v-if="col.select" v-model="form[col.prop]" :placeholder="`请选择${col.label}`" + :disabled="disabled" @change="$emit('update', form)" v-bind="col.bind"> @@ -81,6 +87,7 @@ :headers="uploadHeaders" :show-file-list="false" icon="el-icon-upload2" + :disabled="disabled" :before-upload="beforeUpload" :on-success="handleUploadSuccess" v-bind="col.bind"> @@ -100,7 +107,7 @@ v-for="file in form[col.prop] || []" :file="file" :key="file.fileUrl" - @delete="handleDeleteFile(file)" /> + @delete="!disabled && handleDeleteFile(file)" /> diff --git a/src/utils/dict.js b/src/utils/dict.js index 0174516c..ecaafb16 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -103,6 +103,7 @@ export const DICT_TYPE = { // ============== EQUIPMENT - 设备模块 ============= MAINTAIN_TYPE: 'maintain_type', + FAULT_LEVEL: 'fault-level', } /** diff --git a/src/views/equipment/base/maintain/Monitor/index.vue b/src/views/equipment/base/maintain/Monitor/index.vue index de7db8af..82c04e9b 100644 --- a/src/views/equipment/base/maintain/Monitor/index.vue +++ b/src/views/equipment/base/maintain/Monitor/index.vue @@ -92,7 +92,7 @@ const btn = { }, methods: { handleClick() { - this.$emit('emitData', { type: this.injectData.label }); + this.$emit('emitData', { action: this.injectData.label, value: null }); }, }, render: function (h) { @@ -220,6 +220,17 @@ export default { ); }); }, + handleEmitFun({action, value}) { + switch (action) { + // 查看详情 + case '设备保养': + alert('设备保养'); + break; + case '保养记录': + alert('保养记录'); + break; + } + }, /** 查询列表 */ getList() { this.loading = true; diff --git a/src/views/equipment/base/maintain/Record/index.vue b/src/views/equipment/base/maintain/Record/index.vue new file mode 100644 index 00000000..c2ffe53e --- /dev/null +++ b/src/views/equipment/base/maintain/Record/index.vue @@ -0,0 +1,452 @@ + + + diff --git a/src/views/equipment/base/repair/CustomDialogForm.vue b/src/views/equipment/base/repair/CustomDialogForm.vue new file mode 100644 index 00000000..f674e88d --- /dev/null +++ b/src/views/equipment/base/repair/CustomDialogForm.vue @@ -0,0 +1,216 @@ + + + + + + + diff --git a/src/views/equipment/base/repair/index.vue b/src/views/equipment/base/repair/index.vue new file mode 100644 index 00000000..b5ff9f62 --- /dev/null +++ b/src/views/equipment/base/repair/index.vue @@ -0,0 +1,383 @@ + + + diff --git a/src/views/equipment/base/spareParts/index.vue b/src/views/equipment/base/spareParts/index.vue new file mode 100644 index 00000000..382e7fc6 --- /dev/null +++ b/src/views/equipment/base/spareParts/index.vue @@ -0,0 +1,363 @@ + + +