|
|
|
|
@ -232,6 +232,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<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">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" size="mini" @click="viewFiles(scope.row)" v-if="scope.row.fileCount > 0">
|
|
|
|
|
@ -272,6 +274,35 @@
|
|
|
|
|
</div>
|
|
|
|
|
</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-form ref="recordForm" :model="recordForm" :rules="recordRules" label-width="100px">
|
|
|
|
|
@ -402,10 +433,24 @@ export default {
|
|
|
|
|
selectedKnowledge: null,
|
|
|
|
|
tempSelectedKnowledge: null,
|
|
|
|
|
|
|
|
|
|
// 开始维修对话框
|
|
|
|
|
startRepairDialogVisible: false,
|
|
|
|
|
startRepairForm: {
|
|
|
|
|
repairer: '',
|
|
|
|
|
repairContent: '',
|
|
|
|
|
protectedMethod: ''
|
|
|
|
|
},
|
|
|
|
|
startRepairRules: {
|
|
|
|
|
repairer: [
|
|
|
|
|
{ required: true, message: '请输入维修人', trigger: 'blur' }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 操作记录对话框
|
|
|
|
|
recordDialogVisible: false,
|
|
|
|
|
recordDialogTitle: '',
|
|
|
|
|
recordForm: {
|
|
|
|
|
instanceActivityId: null,
|
|
|
|
|
processActivityName: '',
|
|
|
|
|
processHandleResolution: '',
|
|
|
|
|
fileList: []
|
|
|
|
|
@ -496,6 +541,14 @@ export default {
|
|
|
|
|
// 工单状态
|
|
|
|
|
this.billsStatus = data.billsStatus || null
|
|
|
|
|
|
|
|
|
|
// 知识库ID
|
|
|
|
|
this.faultForm.knowledgeRepairId = data.knowledgeRepairId
|
|
|
|
|
|
|
|
|
|
// 如果有知识库ID,加载知识库信息(可选)
|
|
|
|
|
if (data.knowledgeRepairId) {
|
|
|
|
|
// TODO: 调用知识库API获取详情并赋值给 selectedKnowledge
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 知识库
|
|
|
|
|
if (data.knowledgeRepairId) {
|
|
|
|
|
// TODO: 加载知识库详情
|
|
|
|
|
@ -655,18 +708,36 @@ export default {
|
|
|
|
|
this.previewDialogVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 开始维修 */
|
|
|
|
|
/** 开始维修 - 打开对话框 */
|
|
|
|
|
onStartRepair() {
|
|
|
|
|
if (!this.repairInstanceId) {
|
|
|
|
|
return this.$message.warning('未找到工单ID,无法开始维修')
|
|
|
|
|
}
|
|
|
|
|
this.startRepairForm = {
|
|
|
|
|
repairer: '',
|
|
|
|
|
repairContent: '',
|
|
|
|
|
protectedMethod: ''
|
|
|
|
|
}
|
|
|
|
|
this.startRepairDialogVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 确认开始维修 */
|
|
|
|
|
confirmStartRepair() {
|
|
|
|
|
this.$refs.startRepairForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const payload = {
|
|
|
|
|
repairInstanceId: this.repairInstanceId
|
|
|
|
|
repairInstanceId: this.repairInstanceId,
|
|
|
|
|
repairer: this.startRepairForm.repairer,
|
|
|
|
|
repairContent: this.startRepairForm.repairContent,
|
|
|
|
|
protectedMethod: this.startRepairForm.protectedMethod
|
|
|
|
|
}
|
|
|
|
|
startRepair(payload).then(() => {
|
|
|
|
|
this.$modal.msgSuccess('已开始维修')
|
|
|
|
|
this.startRepairDialogVisible = false
|
|
|
|
|
this.loadData()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 完成维修 */
|
|
|
|
|
|