This commit is contained in:
lb 2024-02-05 11:17:19 +08:00
parent ae7b13695a
commit 9f82aac931
2 changed files with 100 additions and 208 deletions

View File

@ -29,16 +29,11 @@
</el-col>
<el-col :span="12">
<el-form-item
label="保养计划名称"
prop="name"
:rules="[
{ required: true, message: '请输入保养计划名称', trigger: 'blur' },
]">
<el-form-item label="保养计划名称" prop="name">
<el-input
v-model="form.name"
:placeholder="`请输入保养计划名称`"
:disabled="disabled" />
disabled
:placeholder="`请输入保养计划名称`" />
</el-form-item>
</el-col>
@ -101,114 +96,27 @@
:value="opt.value" />
</el-select>
</el-form-item>
<!-- <el-form-item
label="设备"
prop="equipmentId"
:rules="[{ required: true, message: '请选择设备', trigger: 'blur' }]">
<el-select
v-model="form.equipmentId"
:placeholder="`请选择设备`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in equipmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="保养频率(天/次)"
prop="maintenancePeriod"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
]">
<el-input
v-model="form.maintenancePeriod"
@change="$emit('update', form)"
:placeholder="`请输入保养频率`"
:disabled="disabled" />
<el-form-item label="计划保养人员" prop="maintainer">
<el-input v-model="form.maintainer" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="确认时限(h)"
prop="confirmTimeLimit"
:rules="[
{ required: true, message: '请输入确认时限', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.confirmTimeLimit"
@change="$emit('update', form)"
:placeholder="`请输入确认时限(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="保养类型" prop="maintainType">
<el-select
v-model="form.maintainType"
:placeholder="`请选择保养类型`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.MAINTAIN_TYPE)"
:key="opt.value"
:label="opt.label"
:value="+opt.value" />
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="保养时长(h)"
prop="maintainDuration"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.maintainDuration"
@change="$emit('update', form)"
:placeholder="`请输入保养时长(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="首次保养时间"
label="计划开始时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择首次保养时间', trigger: 'blur' },
{ required: true, message: '请选择计划开始时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
:placeholder="`请选择首次保养时间`"
placeholder="请选择计划开始时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
@ -216,10 +124,61 @@
<el-col :span="12">
<el-form-item
label="计划保养人员"
label="计划结束时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择计划结束时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
placeholder="请选择计划结束时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际开始时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际开始时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际结束时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际结束时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际保养人员"
prop="maintainer"
:rules="[
{ required: true, message: '请选择计划保养人员', trigger: 'blur' },
{ required: true, message: '请选择实际保养人员', trigger: 'blur' },
]">
<el-select
v-model="form.maintainer"

View File

@ -29,16 +29,8 @@
</el-col>
<el-col :span="12">
<el-form-item
label="保养计划名称"
prop="name"
:rules="[
{ required: true, message: '请输入保养计划名称', trigger: 'blur' },
]">
<el-input
v-model="form.name"
:placeholder="`请输入保养计划名称`"
:disabled="disabled" />
<el-form-item label="保养计划名称" prop="name">
<span>---</span>
</el-form-item>
</el-col>
@ -101,114 +93,38 @@
:value="opt.value" />
</el-select>
</el-form-item>
<!-- <el-form-item
label="设备"
prop="equipmentId"
:rules="[{ required: true, message: '请选择设备', trigger: 'blur' }]">
<el-select
v-model="form.equipmentId"
:placeholder="`请选择设备`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in equipmentOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="保养频率(天/次)"
prop="maintenancePeriod"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
]">
<el-input
v-model="form.maintenancePeriod"
@change="$emit('update', form)"
:placeholder="`请输入保养频率`"
:disabled="disabled" />
<el-form-item label="计划保养人员" prop="maintainer">
<span>---</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划开始时间" prop="firstMaintenanceTime">
<span>---</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划结束时间" prop="firstMaintenanceTime">
<span>---</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="确认时限(h)"
prop="confirmTimeLimit"
:rules="[
{ required: true, message: '请输入确认时限', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.confirmTimeLimit"
@change="$emit('update', form)"
:placeholder="`请输入确认时限(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="保养类型" prop="maintainType">
<el-select
v-model="form.maintainType"
:placeholder="`请选择保养类型`"
:disabled="disabled"
@change="$emit('update', form)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.MAINTAIN_TYPE)"
:key="opt.value"
:label="opt.label"
:value="+opt.value" />
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="保养时长(h)"
prop="maintainDuration"
:rules="[
{
type: 'number',
message: '请输入正确的数字',
trigger: 'blur',
transform: (val) => Number(val),
},
]">
<el-input
v-model="form.maintainDuration"
@change="$emit('update', form)"
:placeholder="`请输入保养时长(小时)`"
:disabled="disabled" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="首次保养时间"
label="实际开始时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择首次保养时间', trigger: 'blur' },
{ required: true, message: '请选择实际开始时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
:placeholder="`请选择首次保养时间`"
placeholder="请选择实际开始时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
@ -216,10 +132,27 @@
<el-col :span="12">
<el-form-item
label="计划保养人员"
label="实际结束时间"
prop="firstMaintenanceTime"
:rules="[
{ required: true, message: '请选择实际结束时间', trigger: 'blur' },
]">
<el-date-picker
v-model="form.firstMaintenanceTime"
type="datetime"
:disabled="edit"
placeholder="请选择实际结束时间"
@change="$emit('update', form)"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="实际保养人员"
prop="maintainer"
:rules="[
{ required: true, message: '请选择计划保养人员', trigger: 'blur' },
{ required: true, message: '请选择实际保养人员', trigger: 'blur' },
]">
<el-select
v-model="form.maintainer"