update 特种设备维修

This commit is contained in:
lb 2024-02-20 17:00:56 +08:00
parent 9f8d604456
commit eb0445f479
2 changed files with 262 additions and 58 deletions

View File

@ -13,7 +13,7 @@
v-loading="formLoading">
<el-row :gutter="20">
<!-- 维修单号 -->
<el-col :span="12">
<el-col :span="8">
<el-form-item
label="维修单号"
prop="repairOrderNumber"
@ -28,39 +28,37 @@
</el-form-item>
</el-col>
<!-- 维修工 -->
<el-col :span="12">
<el-form-item
label="维修工"
prop="repairman"
:rules="[
{ required: true, message: '维修工不能为空', trigger: 'blur' },
]">
<el-input
v-model="form.repairman"
@change="$emit('update', form)"
placeholder="请输入维修工"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- 设备大类 -->
<el-col :span="12">
<el-form-item
label="设备大类"
prop="equipmentCategory"
:rules="[
{ required: true, message: '设备大类不能为空', trigger: 'blur' },
]">
<!-- 产线名 -->
<el-col :span="8">
<el-form-item label="产线名" prop="lineId">
<el-select
v-model="form.equipmentCategory"
:placeholder="`请选择设备大类`"
v-model="formFilters.lineId"
:placeholder="`请选择产线`"
:disabled="disabled"
clearable
filterable
@change="handleEqTypeChange">
<el-option
v-for="opt in equipmentTypeOptions"
v-for="opt in lineOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<!-- 工段名 -->
<el-col :span="8">
<el-form-item label="工段名" prop="sectionId">
<el-select
v-model="formFilters.sectionId"
:placeholder="`请选择工段`"
:disabled="disabled"
clearable
filterable
@change="handleEqTypeChange">
<el-option
v-for="opt in sectionOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
@ -69,7 +67,7 @@
</el-col>
<!-- 设备名称 -->
<el-col :span="12">
<el-col :span="8">
<el-form-item
label="设备名称"
prop="equipmentId"
@ -93,7 +91,7 @@
</el-col>
<!-- 故障发生时间 -->
<el-col :span="12">
<el-col :span="8">
<el-form-item
label="故障发生时间"
prop="faultTime"
@ -117,7 +115,7 @@
</el-col>
<!-- 故障级别 -->
<el-col :span="12">
<el-col :span="8">
<el-form-item
label="故障级别"
prop="faultLevel"
@ -142,8 +140,98 @@
</el-form-item>
</el-col>
<!-- 故障类型 - 数据字典 -->
<el-col :span="8">
<el-form-item
label="故障类型"
prop="faultType"
:rules="[
{
required: true,
message: '故障类型不能为空',
trigger: 'blur',
},
]">
<el-select
v-model="form.faultType"
placeholder="故障类型"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.FAULT_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<!-- 维修开始时间 -->
<el-col :span="8">
<el-form-item
label="维修开始时间"
prop="maintenanceStartTime"
:rules="[
{
required: true,
message: '维修开始时间不能为空',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.maintenanceStartTime"
type="datetime"
:disabled="disabled"
:placeholder="`请选择维修开始时间`"
value-format="timestamp"
format="yyyy-MM-dd HH:mm:ss"
clearable
@change="$emit('update', form)" />
</el-form-item>
</el-col>
<!-- 维修结束时间 -->
<el-col :span="8">
<el-form-item
label="维修结束时间"
prop="maintenanceFinishTime"
:rules="[
{
required: true,
message: '维修结束时间不能为空',
trigger: 'blur',
},
]">
<el-date-picker
v-model="form.maintenanceFinishTime"
type="datetime"
:disabled="disabled"
:placeholder="`请选择维修结束时间`"
value-format="timestamp"
format="yyyy-MM-dd HH:mm:ss"
clearable
@change="$emit('update', form)" />
</el-form-item>
</el-col>
<!-- 维修工 -->
<el-col :span="8">
<el-form-item
label="维修工"
prop="repairman"
:rules="[
{ required: true, message: '维修工不能为空', trigger: 'blur' },
]">
<el-input
v-model="form.repairman"
@change="$emit('update', form)"
placeholder="请输入维修工"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- 联系方式 -->
<el-col :span="24">
<el-col :span="8">
<el-form-item
label="联系方式"
prop="repairmanPhone"
@ -157,6 +245,117 @@
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- 维修方式 - 数据字典 -->
<el-col :span="8">
<el-form-item
label="维修方式"
prop="repairMode"
:rules="[
{
required: true,
message: '维修方式不能为空',
trigger: 'blur',
},
]">
<el-select
v-model="form.repairMode"
placeholder="维修方式"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.FAULT_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<!-- 维修结果 - 数据字典 -->
<el-col :span="8">
<el-form-item
label="维修结果"
prop="maintenanceResult"
:rules="[
{
required: true,
message: '维修结果不能为空',
trigger: 'blur',
},
]">
<el-select
v-model="form.maintenanceResult"
placeholder="维修结果"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.FAULT_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<!-- 备注 -->
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
@change="$emit('update', form)"
placeholder="请输入备注"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- 故障明细 -->
<el-col :span="24">
<el-form-item
label="故障明细"
prop="faultDetail"
:rules="[
{
required: true,
message: '故障明细不能为空',
trigger: 'blur',
},
]"></el-form-item>
</el-col>
<!-- 维修描述 -->
<el-col :span="24">
<el-form-item label="维修描述" prop="maintenanceDetail"></el-form-item>
</el-col>
<!-- 维修附件 -->
<el-col :span="24">
<el-form-item label="维修附件" prop="files"></el-form-item>
</el-col>
<!-- 设备大类 -->
<!-- <el-col :span="8">
<el-form-item
label="设备大类"
prop="equipmentCategory"
:rules="[
{ required: true, message: '设备大类不能为空', trigger: 'blur' },
]">
<el-select
v-model="form.equipmentCategory"
:placeholder="`请选择设备大类`"
:disabled="disabled"
clearable
filterable
@change="handleEqTypeChange">
<el-option
v-for="opt in equipmentTypeOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col> -->
</el-row>
</el-form>
</template>
@ -189,6 +388,10 @@ export default {
allSpeicalEquipments: [],
uploadOpen: false,
form: {},
formFilters: {
lineId: null,
sectionId: null,
},
formLoading: true,
dataLoaded: false,
equipmentList: [],
@ -200,6 +403,8 @@ export default {
],
workerOptions: [],
planOptions: [],
sectionOptions: [],
lineOptions: [],
};
},
watch: {

View File

@ -51,7 +51,7 @@
v-model="form"
:disabled="mode == 'detail'" />
</base-dialog>
<CustomDialogForm
<DetailDrawer
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList"
@ -61,7 +61,7 @@
<script>
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import CustomDialogForm from './CustomDialogForm.vue';
import DetailDrawer from './CustomDialogForm.vue';
import {
deleteRepair,
exportRepairLogExcel,
@ -72,13 +72,13 @@ import DialogForm from './Repair--add.vue';
export default {
name: 'SpecialEquipmentRepair',
components: { CustomDialogForm, DialogForm },
components: { DetailDrawer, DialogForm },
mixins: [basicPageMixin],
data() {
return {
addOrUpdateVisible: false,
searchBarKeys: [
'maintenanceStatus',
'maintenanceResult',
'createTime',
'equipmentId',
'specialType',
@ -167,7 +167,6 @@ export default {
filter: (v) => (v != null ? ['成功', '失败'][v] : ''),
},
{ prop: 'maintenanceDetail', label: '维修描述', width: 110 },
{ prop: '_detail', label: '查看详情', width: 110 },
{
prop: 'remark',
label: '备注',
@ -207,19 +206,19 @@ export default {
// },
],
searchBarFormConfig: [
{
type: 'select',
label: '设备大类',
placeholder: '请选择设备大类',
param: 'specialType',
onchange: true,
selectOptions: [
{ id: 1, name: '安全设备' },
{ id: 2, name: '消防设备' },
{ id: 3, name: '特种设备' },
],
filterable: true,
},
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'specialType',
// onchange: true,
// selectOptions: [
// { id: 1, name: '' },
// { id: 2, name: '' },
// { id: 3, name: '' },
// ],
// filterable: true,
// },
{
type: 'select',
label: '设备',
@ -229,13 +228,12 @@ export default {
},
{
type: 'select',
label: '状态',
placeholder: '请选择状态',
param: 'maintenanceStatus',
label: '维修结果',
placeholder: '请选择维修结果',
param: 'maintenanceResult',
selectOptions: [
{ name: '未完成', id: '0' },
{ name: '完成', id: '1' },
{ name: '进行中', id: '2' },
{ name: '成功', id: '0' },
{ name: '失败', id: '1' },
],
},
//
@ -282,7 +280,8 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 10,
maintenanceStatus: null,
// maintenanceStatus: null,
maintenanceResult: null,
createTime: null,
equipmentId: null,
special: true,
@ -488,7 +487,7 @@ export default {
},
setSearchBarEquipmentList(eqList) {
this.$set(
this.searchBarFormConfig[1],
this.searchBarFormConfig[0],
'selectOptions',
eqList.map((item) => ({
name: item.name,