|
@ -198,11 +198,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({ |
|
|
defaultButtons.defaultAddBtn(null), // 新增 |
|
|
hide: !userStore?.userSelfInfo?.posts?.some((item) => { |
|
|
|
|
|
return item.code == 'worker' |
|
|
|
|
|
}) |
|
|
|
|
|
}), // 新增 |
|
|
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
@ -248,8 +244,7 @@ const butttondata = (row) => { |
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
hide: !( |
|
|
hide: !( |
|
|
row.status == 'PENDING' && |
|
|
row.status == 'PENDING' |
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') |
|
|
|
|
|
) |
|
|
) |
|
|
}), // 接单 |
|
|
}), // 接单 |
|
|
defaultButtons.turnOrderBtn({ |
|
|
defaultButtons.turnOrderBtn({ |
|
@ -260,16 +255,14 @@ const butttondata = (row) => { |
|
|
}), // 维修 |
|
|
}), // 维修 |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
hide: !( |
|
|
hide: !( |
|
|
row.status == 'COMPLETED' && |
|
|
row.status == 'COMPLETED' |
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer') |
|
|
|
|
|
) |
|
|
) |
|
|
}), // 验证 |
|
|
}), // 验证 |
|
|
defaultButtons.finishOrderBtn({ |
|
|
defaultButtons.finishOrderBtn({ |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) |
|
|
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) |
|
|
}), // 完成 |
|
|
}), // 完成 |
|
|
defaultButtons.pictureBtn({ |
|
|
defaultButtons.pictureBtn({ |
|
|
hide: !(row.filePathList != null && row.filePathList.length > 0 && |
|
|
hide: !(row.filePathList != null && row.filePathList.length > 0) |
|
|
userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) |
|
|
|
|
|
}) // 预览报修图片 |
|
|
}) // 预览报修图片 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@ -302,6 +295,9 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'repair') { |
|
|
} else if (val == 'repair') { |
|
|
openDetail(row, '代码', row.number) |
|
|
openDetail(row, '代码', row.number) |
|
|
} else if (val == 'turnOrder') { |
|
|
} else if (val == 'turnOrder') { |
|
|
|
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'turnType' |
|
|
|
|
|
}).show = true |
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
DeviceMaintenanceMain.allSchemas.formSchema.find(item => { |
|
|
return item.field == 'type' |
|
|
return item.field == 'type' |
|
|
}).componentProps.options = deviceMoldTypeList |
|
|
}).componentProps.options = deviceMoldTypeList |
|
|