|
|
|
@ -29,6 +29,22 @@ |
|
|
|
|
> |
|
|
|
|
</avue-form> |
|
|
|
|
</span> |
|
|
|
|
<span v-else-if="type.prop==='task'"> |
|
|
|
|
<div> |
|
|
|
|
<avue-crud :data="task_data" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:option="optionTask" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
:before-open="beforeOpen" |
|
|
|
|
:header-cell-class-name="headerClass" |
|
|
|
|
v-model="task_form" |
|
|
|
|
ref="crud"> |
|
|
|
|
<template #menu="{row,index,size}"> |
|
|
|
|
<el-button size="small" type="text" @click="getResult(row)">查看巡检结果</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
</div> |
|
|
|
|
</span> |
|
|
|
|
<span v-else-if="type.prop==='inspection'"> |
|
|
|
|
<div> |
|
|
|
|
<avue-crud :data="inspection_data" |
|
|
|
@ -117,6 +133,15 @@ |
|
|
|
|
删除</el-button> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<el-dialog title="巡检结果" |
|
|
|
|
append-to-body |
|
|
|
|
:visible.sync="resultVisible"> |
|
|
|
|
<avue-crud :option="resultDia" |
|
|
|
|
v-model="resultForm" |
|
|
|
|
:data="result_data" |
|
|
|
|
ref="diaForm"> |
|
|
|
|
</avue-crud> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> |
|
|
|
|
</template> |
|
|
|
@ -141,10 +166,12 @@ import { |
|
|
|
|
document_remove, |
|
|
|
|
document_tools_getListBylegerId |
|
|
|
|
} from "@/api/leger/inventorydocument"; |
|
|
|
|
import {task_getListByToolsCodeId} from "@/api/inspection/inspectiontasks"; |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
import website from "@/config/website"; |
|
|
|
|
import {readonly} from "vue"; |
|
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
|
import {getListByTaskNo} from "@/api/inspection/inspectionresult"; |
|
|
|
|
export default { |
|
|
|
|
name: "equipmentledgerDetail", |
|
|
|
|
data () { |
|
|
|
@ -308,6 +335,76 @@ export default { |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
task_data: [], |
|
|
|
|
optionTask: { |
|
|
|
|
delBtn: false, |
|
|
|
|
editBtn: false, |
|
|
|
|
align: 'center', |
|
|
|
|
menuAlign: 'center', |
|
|
|
|
height: 'auto', |
|
|
|
|
calcHeight: 210, |
|
|
|
|
tip: false, |
|
|
|
|
border: true, |
|
|
|
|
indexLabel: "序号", |
|
|
|
|
index: true, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "检验周期开始时间", |
|
|
|
|
prop: "taskStartDate", |
|
|
|
|
type: "date", |
|
|
|
|
format: "yyyy/MM/dd" |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "检验周期结束时间", |
|
|
|
|
prop: "taskEndDate", |
|
|
|
|
type: "date", |
|
|
|
|
format: "yyyy/MM/dd" |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "路线类型", |
|
|
|
|
prop: "routeType" |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "计划类型", |
|
|
|
|
prop: "planType" |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
resultVisible: false, |
|
|
|
|
resultForm: {}, |
|
|
|
|
result_data: [], |
|
|
|
|
resultDia: { |
|
|
|
|
addBtn: false, |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
|
menu: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "任务执行开始时间", |
|
|
|
|
prop: "executeStartDate", |
|
|
|
|
type: "datetime", |
|
|
|
|
format: 'yyyy/MM/dd HH:mm', |
|
|
|
|
disabled: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "任务执行结束时间", |
|
|
|
|
prop: "executeEndDate", |
|
|
|
|
type: "datetime", |
|
|
|
|
format: 'yyyy/MM/dd HH:mm', |
|
|
|
|
disabled: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "巡检结果", |
|
|
|
|
prop: "inspectiontResult", |
|
|
|
|
disabled: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "巡检报告", |
|
|
|
|
prop: "inspectionReport", |
|
|
|
|
disabled: true |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
inspection_data: [], |
|
|
|
|
optionInspection: { |
|
|
|
|
align: 'center', |
|
|
|
@ -516,7 +613,7 @@ export default { |
|
|
|
|
created () { |
|
|
|
|
this.type = this.option.column[0]; |
|
|
|
|
if(this.$route.query.frameMode == "search"){ |
|
|
|
|
this.option.column.push({ label: '检验标准', prop: 'inspection' },{ label: '技术参数', prop: 'parameters' },{ label: '文档清册', prop: 'document' }); |
|
|
|
|
this.option.column.push({ label: '检验周期', prop: 'task' },{ label: '检验标准', prop: 'inspection' },{ label: '技术参数', prop: 'parameters' },{ label: '文档清册', prop: 'document' }); |
|
|
|
|
this.readonlyForm=true; |
|
|
|
|
this.shouldShowButton=true; |
|
|
|
|
this.addUpdateShowButton=false; |
|
|
|
@ -631,6 +728,10 @@ export default { |
|
|
|
|
}if (column.prop == 'information'){ |
|
|
|
|
this.UpdateShowButton=true; |
|
|
|
|
} |
|
|
|
|
if (column.prop == 'task') { |
|
|
|
|
this.UpdateShowButton=false; |
|
|
|
|
this.task_onLoad(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 检验标准 新增按钮处理 |
|
|
|
|
inspection_rowSave (form, done, loading) { |
|
|
|
@ -846,6 +947,20 @@ export default { |
|
|
|
|
headerClass() { |
|
|
|
|
return 'head-style' |
|
|
|
|
}, |
|
|
|
|
getResult(row) { |
|
|
|
|
this.resultVisible = true; |
|
|
|
|
getListByTaskNo(row.taskNo).then(res => { |
|
|
|
|
this.result_data = res.data.data; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
task_onLoad(row, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
task_getListByToolsCodeId(this.tab1_form.toolsCodeId).then(res => { |
|
|
|
|
this.task_data = res.data.data; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
inspection_onLoad(row, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
inspection_getListBylegerId(this.$route.query.id).then(res => { |
|
|
|
|