设备保养设备巡检
This commit is contained in:
@@ -41,9 +41,7 @@
|
||||
v-if="open"
|
||||
ref="form"
|
||||
v-model="form"
|
||||
:disabled="mode == 'detail'"
|
||||
:has-files="true"
|
||||
:rows="rows" />
|
||||
:disabled="mode == 'detail'" />
|
||||
</base-dialog>
|
||||
<CustomDialogForm
|
||||
v-if="addOrUpdateVisible"
|
||||
@@ -59,11 +57,12 @@ import CustomDialogForm from './CustomDialogForm.vue';
|
||||
import { deleteRepair, exportRepairLogExcel } from '@/api/equipment/base/repair'
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import htmls from './htmls.vue'
|
||||
import DialogForm from './Repair--add.vue';
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
export default {
|
||||
name: 'EquipmentRepair',
|
||||
components: { CustomDialogForm },
|
||||
components: { CustomDialogForm, DialogForm },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
@@ -107,7 +106,7 @@ export default {
|
||||
{ prop: 'lineName', label: '产线名' },
|
||||
{ prop: 'sectionName', label: '工段名' },
|
||||
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'faultDetail', label: '故障明细' },
|
||||
{ prop: 'faultDetail', label: '故障明细', subcomponent: htmls },
|
||||
// { prop: 'maintenanceDetail', label: '维修明细', subcomponent: htmls, minWidth: 100, showOverflowtooltip: true },
|
||||
{
|
||||
prop: 'maintenanceStartTime',
|
||||
@@ -126,7 +125,7 @@ export default {
|
||||
filter: (v) => (v != null ? ['成功', '失败'][v] : ''),
|
||||
},
|
||||
// { prop: 'maintenanceDuration', label: '维修时长(h)' },
|
||||
{ prop: 'remark', label: '维修描述' }, // 没有参数
|
||||
{ prop: 'maintenanceDetail', label: '维修描述', subcomponent: htmls }, // 没有参数
|
||||
// { prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
||||
// { prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true }
|
||||
@@ -187,71 +186,6 @@ export default {
|
||||
color: 'success',
|
||||
},
|
||||
],
|
||||
rows: [
|
||||
[
|
||||
{
|
||||
input: true,
|
||||
label: '维修单号',
|
||||
prop: 'repairOrderNumber',
|
||||
rules: [{ required: true, message: '维修单号不能为空', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
select: true,
|
||||
label: '设备名称',
|
||||
prop: 'equipmentId',
|
||||
// url: '/base/core-equipment/listAll',
|
||||
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
|
||||
bind: {
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
},
|
||||
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
// TODO: 和班组联动
|
||||
// select: true,
|
||||
input: true,
|
||||
label: '维修工',
|
||||
prop: 'repairman',
|
||||
// url: '/base/core-worker/listAll',
|
||||
// valueKey: 'name',
|
||||
bind: {
|
||||
filterable: true,
|
||||
clearable: true,
|
||||
// multiple: true,
|
||||
},
|
||||
// options: [{ label: 'test', value: 'test' }],
|
||||
rules: [{ required: true, message: '维修工不能为空', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: '联系方式',
|
||||
prop: 'repairmanPhone',
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
datetime: true,
|
||||
label: '故障发生时间',
|
||||
prop: 'faultTime',
|
||||
rules: [{ required: true, message: '故障发生时间不能为空', trigger: 'blur' }],
|
||||
bind: {
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
'value-format': 'timestamp',
|
||||
// 'value-format': 'yyyy-MM-dd HH:mm:ss',
|
||||
clearable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
select: true,
|
||||
label: '故障级别',
|
||||
prop: 'faultLevel', // 数据字典
|
||||
options: this.getDictDatas(this.DICT_TYPE.FAULT_LEVEL),
|
||||
},
|
||||
],
|
||||
],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
@@ -262,6 +196,7 @@ export default {
|
||||
maintenanceResult: null,
|
||||
createTime: null,
|
||||
equipmentId: null,
|
||||
special: false
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -387,7 +322,10 @@ export default {
|
||||
// }
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
this.put(this.form).then((response) => {
|
||||
this.put({
|
||||
...this.form,
|
||||
repairman: this.form.repairman.join(',')
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -395,7 +333,10 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.post(this.form).then((response) => {
|
||||
this.post({
|
||||
...this.form,
|
||||
repairman: this.form.repairman.join(',')
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
Reference in New Issue
Block a user