feat(dms): 添加维修内容和防护措施字段及开始维修功能

- 在故障报修详情页增加“维修内容”和“防护措施”表格列
- 新增“开始维修”对话框,支持输入维修人、维修内容和防护措施
- 表单验证维修人必填项- 路由配置新增故障报修详情页面,支持通过ID访问
-优化开始维修逻辑,调用接口传递新增字段信息
- 页面加载时支持根据知识库ID加载相关数据(待实现)
master
zangch@mesnac.com 1 month ago
parent 70bea5f740
commit a68a6c2d70

@ -408,6 +408,20 @@ export const dynamicRoutes = [
}, },
], ],
}, },
{
path: "/dms/dmsBillsFaultInstance",
component: Layout,
hidden: true,
permissions: ["dms:dmsBillsFaultInstance:query"],
children: [
{
path: "detail/:id",
component: () => import("@/views/dms/dmsBillsFaultInstance/detail"),
name: "DmsBillsFaultInstanceDetail",
meta: {title: "故障报修详情", activeMenu: "/dms/dmsBillsFaultInstance"},
},
],
},
] ]
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错

@ -232,6 +232,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理措施" align="center" prop="processHandleResolution" show-overflow-tooltip /> <el-table-column label="处理措施" align="center" prop="processHandleResolution" show-overflow-tooltip />
<el-table-column label="维修内容" align="center" prop="repairContent" show-overflow-tooltip />
<el-table-column label="防护措施" align="center" prop="protectedMethod" show-overflow-tooltip />
<el-table-column label="附件" align="center" width="100"> <el-table-column label="附件" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" @click="viewFiles(scope.row)" v-if="scope.row.fileCount > 0"> <el-button type="text" size="mini" @click="viewFiles(scope.row)" v-if="scope.row.fileCount > 0">
@ -272,6 +274,35 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 开始维修对话框 -->
<el-dialog title="开始维修" :visible.sync="startRepairDialogVisible" width="50%" append-to-body>
<el-form ref="startRepairForm" :model="startRepairForm" :rules="startRepairRules" label-width="100px">
<el-form-item label="维修人" prop="repairer">
<el-input v-model="startRepairForm.repairer" placeholder="请输入维修人" />
</el-form-item>
<el-form-item label="维修内容">
<el-input
v-model="startRepairForm.repairContent"
type="textarea"
:rows="3"
placeholder="请输入维修内容">
</el-input>
</el-form-item>
<el-form-item label="防护措施">
<el-input
v-model="startRepairForm.protectedMethod"
type="textarea"
:rows="2"
placeholder="请输入防护措施">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="startRepairDialogVisible = false"> </el-button>
<el-button type="primary" @click="confirmStartRepair"> </el-button>
</div>
</el-dialog>
<!-- 操作记录编辑对话框 --> <!-- 操作记录编辑对话框 -->
<el-dialog :title="recordDialogTitle" :visible.sync="recordDialogVisible" width="60%" append-to-body> <el-dialog :title="recordDialogTitle" :visible.sync="recordDialogVisible" width="60%" append-to-body>
<el-form ref="recordForm" :model="recordForm" :rules="recordRules" label-width="100px"> <el-form ref="recordForm" :model="recordForm" :rules="recordRules" label-width="100px">
@ -402,10 +433,24 @@ export default {
selectedKnowledge: null, selectedKnowledge: null,
tempSelectedKnowledge: null, tempSelectedKnowledge: null,
//
startRepairDialogVisible: false,
startRepairForm: {
repairer: '',
repairContent: '',
protectedMethod: ''
},
startRepairRules: {
repairer: [
{ required: true, message: '请输入维修人', trigger: 'blur' }
]
},
// //
recordDialogVisible: false, recordDialogVisible: false,
recordDialogTitle: '', recordDialogTitle: '',
recordForm: { recordForm: {
instanceActivityId: null,
processActivityName: '', processActivityName: '',
processHandleResolution: '', processHandleResolution: '',
fileList: [] fileList: []
@ -496,6 +541,14 @@ export default {
// //
this.billsStatus = data.billsStatus || null this.billsStatus = data.billsStatus || null
// ID
this.faultForm.knowledgeRepairId = data.knowledgeRepairId
// ID
if (data.knowledgeRepairId) {
// TODO: API selectedKnowledge
}
// //
if (data.knowledgeRepairId) { if (data.knowledgeRepairId) {
// TODO: // TODO:
@ -655,18 +708,36 @@ export default {
this.previewDialogVisible = true this.previewDialogVisible = true
}, },
/** 开始维修 */ /** 开始维修 - 打开对话框 */
onStartRepair() { onStartRepair() {
if (!this.repairInstanceId) { if (!this.repairInstanceId) {
return this.$message.warning('未找到工单ID无法开始维修') return this.$message.warning('未找到工单ID无法开始维修')
} }
this.startRepairForm = {
repairer: '',
repairContent: '',
protectedMethod: ''
}
this.startRepairDialogVisible = true
},
/** 确认开始维修 */
confirmStartRepair() {
this.$refs.startRepairForm.validate((valid) => {
if (valid) {
const payload = { const payload = {
repairInstanceId: this.repairInstanceId repairInstanceId: this.repairInstanceId,
repairer: this.startRepairForm.repairer,
repairContent: this.startRepairForm.repairContent,
protectedMethod: this.startRepairForm.protectedMethod
} }
startRepair(payload).then(() => { startRepair(payload).then(() => {
this.$modal.msgSuccess('已开始维修') this.$modal.msgSuccess('已开始维修')
this.startRepairDialogVisible = false
this.loadData() this.loadData()
}) })
}
})
}, },
/** 完成维修 */ /** 完成维修 */

Loading…
Cancel
Save