|
|
@ -3,25 +3,26 @@ |
|
|
|
<avue-tabs :option="option" |
|
|
|
<avue-tabs :option="option" |
|
|
|
@change="handleChange"></avue-tabs> |
|
|
|
@change="handleChange"></avue-tabs> |
|
|
|
<span v-if="type.prop==='information'"> |
|
|
|
<span v-if="type.prop==='information'"> |
|
|
|
<avue-crud :option="information_option" |
|
|
|
<avue-form :option="information_option" |
|
|
|
v-model="information_form" |
|
|
|
v-model="information_form" |
|
|
|
ref="information_from" |
|
|
|
ref="information_form" |
|
|
|
:class="frame_class"> |
|
|
|
:class="frame_class"> |
|
|
|
</avue-crud> |
|
|
|
</avue-form> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span v-else-if="type.prop==='result'"> |
|
|
|
<span v-else-if="type.prop==='results'"> |
|
|
|
<avue-crud :data="parameters_data" |
|
|
|
<div> |
|
|
|
|
|
|
|
<avue-crud :data="results_data" |
|
|
|
:table-loading="loading" |
|
|
|
:table-loading="loading" |
|
|
|
:option="optionParam" |
|
|
|
:option="optionResults" |
|
|
|
:permission="permissionList" |
|
|
|
:permission="permissionList" |
|
|
|
:before-open="beforeOpen" |
|
|
|
:before-open="beforeOpen" |
|
|
|
:header-cell-class-name="headerClass" |
|
|
|
:header-cell-class-name="headerClass" |
|
|
|
v-model="parameters_form" |
|
|
|
v-model="results_form" |
|
|
|
ref="crud" |
|
|
|
ref="crud" |
|
|
|
@row-del="parameters_rowDel" |
|
|
|
@row-del="results_rowDel" |
|
|
|
@row-update="parameters_rowUpdate" |
|
|
|
@row-update="results_rowUpdate"> |
|
|
|
@row-save="parameters_rowSave"> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<div class="container"> |
|
|
|
<div class="container"> |
|
|
|
<span > |
|
|
|
<span > |
|
|
@ -30,422 +31,454 @@ |
|
|
|
@click="handleFormSubmit" |
|
|
|
@click="handleFormSubmit" |
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
v-if="addUpdateShowButton"> |
|
|
|
确定</el-button> |
|
|
|
确定</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
@click="seachToUpdate" |
|
|
|
|
|
|
|
v-if="shouldShowButton"> |
|
|
|
|
|
|
|
修改</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</basic-container> |
|
|
|
</basic-container> |
|
|
|
|
|
|
|
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/inspection/inspectiontasks"; |
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/inspection/inspectiontasks"; |
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
|
|
|
import {auditing, reject} from "@/api/leger/equipmentledger"; |
|
|
|
|
|
|
|
import expUtil from "@/util/exportUtil"; |
|
|
|
|
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
name: "inspectiontasksDetail", |
|
|
|
import website from "@/config/website"; |
|
|
|
data() { |
|
|
|
import {readonly} from "vue"; |
|
|
|
return { |
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
frame_class: '', |
|
|
|
import request from "@/router/axios"; |
|
|
|
type: {}, |
|
|
|
export default { |
|
|
|
readonlyForm:{}, |
|
|
|
name: "inspectiontasksDetail", |
|
|
|
option: { |
|
|
|
data () { |
|
|
|
column: [{ |
|
|
|
return { |
|
|
|
label: '基本信息', |
|
|
|
frame_class: '', |
|
|
|
prop: 'information', |
|
|
|
type: {}, |
|
|
|
} |
|
|
|
shouldShowButton:{}, |
|
|
|
] |
|
|
|
addUpdateShowButton:{}, |
|
|
|
}, |
|
|
|
readonlyForm:{}, |
|
|
|
information_form: {}, |
|
|
|
document_form:{}, |
|
|
|
information_option: { |
|
|
|
option: { |
|
|
|
submitBtn: false, |
|
|
|
column: [{ |
|
|
|
emptyBtn: false, |
|
|
|
label: '基本信息', |
|
|
|
column: [ |
|
|
|
prop: 'information', |
|
|
|
{ |
|
|
|
} |
|
|
|
label: "任务编号", |
|
|
|
] |
|
|
|
prop: "id", |
|
|
|
}, |
|
|
|
span: 6, |
|
|
|
information_form: {}, |
|
|
|
maxlength: 20, |
|
|
|
information_option: { |
|
|
|
rules: [{ |
|
|
|
submitBtn: false, |
|
|
|
required: true, |
|
|
|
emptyBtn: false, |
|
|
|
message: "请输入主键", |
|
|
|
column: [ |
|
|
|
trigger: "blur" |
|
|
|
{ |
|
|
|
}] |
|
|
|
label: "任务编号", |
|
|
|
|
|
|
|
prop: "taskNo", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
disabled: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务名称", |
|
|
|
|
|
|
|
prop: "taskName", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入任务名称", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "场站", |
|
|
|
|
|
|
|
prop: "station", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
dicUrl: "/api/daf-system/dict/dictionary?code=station", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "dictValue", |
|
|
|
|
|
|
|
value: "dictKey" |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
rules: [{ |
|
|
|
label: "任务名称", |
|
|
|
required: true, |
|
|
|
prop: "taskName", |
|
|
|
message: "请输入场站", |
|
|
|
search: true, |
|
|
|
trigger: "blur" |
|
|
|
rules: [{ |
|
|
|
}] |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
message: "请输入任务名称", |
|
|
|
{ |
|
|
|
trigger: "blur" |
|
|
|
label: "责任人", |
|
|
|
}] |
|
|
|
prop: "responsiblePerson", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入责任人", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务生成日期", |
|
|
|
|
|
|
|
prop: "taskStartDate", |
|
|
|
|
|
|
|
type: "date", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
labelWidth: 120, |
|
|
|
|
|
|
|
format: 'yyyy年MM月dd日', |
|
|
|
|
|
|
|
valueFormat: "yyyyMMdd", |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入任务生成日期", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务完成日期", |
|
|
|
|
|
|
|
prop: "taskEndDate", |
|
|
|
|
|
|
|
type: "date", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
labelWidth: 120, |
|
|
|
|
|
|
|
format: 'yyyy年MM月dd日', |
|
|
|
|
|
|
|
valueFormat: "yyyyMMdd", |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入任务完成日期", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "对象编号", |
|
|
|
|
|
|
|
prop: "inspectionObjId", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入对象编号", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "对象名称", |
|
|
|
|
|
|
|
prop: "objectName", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
disabled: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "对象类型", |
|
|
|
|
|
|
|
prop: "objectType", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
disabled: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "路线编号", |
|
|
|
|
|
|
|
prop: "inspectionRouteId", |
|
|
|
|
|
|
|
span: 7, |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
cascaderItem: ['routeName','routeType'], |
|
|
|
|
|
|
|
dicUrl: "/api/inspection/inspectionRoute/getRouteList", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "routeNo", |
|
|
|
|
|
|
|
value: "routeNo", |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
event: { |
|
|
|
label: "场站", |
|
|
|
change: (val) => { |
|
|
|
prop: "station", |
|
|
|
if (!val) return |
|
|
|
search: true, |
|
|
|
if (val) { |
|
|
|
dicUrl: "/api/daf-system/dict/dictionary?code=station", |
|
|
|
request({ |
|
|
|
props: { |
|
|
|
url: '/api/inspection/inspectionRoute/getDetailList', |
|
|
|
label: "dictValue", |
|
|
|
method: 'get', |
|
|
|
value: "dictKey" |
|
|
|
params: { |
|
|
|
|
|
|
|
routeNo: val |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
|
|
const routeName = this.findObject(this.information_option.column, "routeName"); |
|
|
|
|
|
|
|
routeName.value = res.data.data.routeName; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入场站", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务生成日期", |
|
|
|
|
|
|
|
prop: "taskStartDate", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入任务生成日期", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务完成日期", |
|
|
|
|
|
|
|
prop: "taskEndDate", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入任务完成日期", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "责任人", |
|
|
|
|
|
|
|
prop: "responsiblePerson", |
|
|
|
|
|
|
|
search: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入责任人", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
rules: [{ |
|
|
|
label: "状态", |
|
|
|
required: true, |
|
|
|
prop: "taskStatus", |
|
|
|
message: "请输入路线编号", |
|
|
|
search: true, |
|
|
|
trigger: "blur" |
|
|
|
rules: [{ |
|
|
|
}] |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
message: "请输入任务状态", |
|
|
|
{ |
|
|
|
trigger: "blur" |
|
|
|
label: "路线名称", |
|
|
|
}] |
|
|
|
prop: "routeName", |
|
|
|
}, |
|
|
|
// dicUrl: "/api/inspection/inspectionRoute/getDetailList?routeNo={{key}}", |
|
|
|
{ |
|
|
|
span: 7, |
|
|
|
label: "取消原因", |
|
|
|
disabled: true, |
|
|
|
prop: "cancelReason", |
|
|
|
// cascaderIndex: 0, |
|
|
|
rules: [{ |
|
|
|
// props: { |
|
|
|
required: true, |
|
|
|
// value: "routeName", |
|
|
|
message: "请输入取消原因", |
|
|
|
// }, |
|
|
|
trigger: "blur" |
|
|
|
}, |
|
|
|
}] |
|
|
|
{ |
|
|
|
}, |
|
|
|
label: "路线类型", |
|
|
|
{ |
|
|
|
prop: "routeType", |
|
|
|
label: "巡检对象主键", |
|
|
|
span: 7, |
|
|
|
prop: "inspectionObjId", |
|
|
|
disabled: true, |
|
|
|
hide: true, |
|
|
|
}, |
|
|
|
rules: [{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
label: "计划编号", |
|
|
|
message: "请输入巡检对象主键", |
|
|
|
prop: "inspectionPlanId", |
|
|
|
trigger: "blur" |
|
|
|
span: 7, |
|
|
|
}] |
|
|
|
rules: [{ |
|
|
|
}, |
|
|
|
required: true, |
|
|
|
{ |
|
|
|
message: "请输入路线编号", |
|
|
|
label: "巡检路线主键", |
|
|
|
trigger: "blur" |
|
|
|
prop: "inspectionRouteId", |
|
|
|
}] |
|
|
|
hide: true, |
|
|
|
}, |
|
|
|
rules: [{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
label: "计划名称", |
|
|
|
message: "请输入巡检路线主键", |
|
|
|
prop: "planName", |
|
|
|
trigger: "blur" |
|
|
|
span: 7, |
|
|
|
}] |
|
|
|
disabled: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检计划主键", |
|
|
|
label: "计划类型", |
|
|
|
prop: "inspectionPlanId", |
|
|
|
prop: "planType", |
|
|
|
hide: true, |
|
|
|
span: 7, |
|
|
|
rules: [{ |
|
|
|
disabled: true, |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
message: "请输入巡检计划主键", |
|
|
|
{ |
|
|
|
trigger: "blur" |
|
|
|
label: "取消原因", |
|
|
|
}] |
|
|
|
prop: "cancelReason", |
|
|
|
}, |
|
|
|
span: 7, |
|
|
|
{ |
|
|
|
}, |
|
|
|
label: "对象名称", |
|
|
|
{ |
|
|
|
prop: "objectName", |
|
|
|
label: "状态", |
|
|
|
hide: true, |
|
|
|
prop: "taskStatus", |
|
|
|
rules: [{ |
|
|
|
type: "select", |
|
|
|
required: true, |
|
|
|
span: 7, |
|
|
|
message: "请输入对象名称", |
|
|
|
dicUrl: "/api/daf-system/dict/dictionary?code=task_status", |
|
|
|
trigger: "blur" |
|
|
|
props: { |
|
|
|
}] |
|
|
|
label: "dictValue", |
|
|
|
}, |
|
|
|
value: "dictKey" |
|
|
|
{ |
|
|
|
|
|
|
|
label: "对象类型", |
|
|
|
|
|
|
|
prop: "objectType", |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入对象类型", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "路线名称", |
|
|
|
|
|
|
|
prop: "routeName", |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入路线名称", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "路线类型", |
|
|
|
|
|
|
|
prop: "routeType", |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入路线类型", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "计划名称", |
|
|
|
|
|
|
|
prop: "planName", |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入计划名称", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "计划类型", |
|
|
|
|
|
|
|
prop: "planType", |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
rules: [{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请输入计划类型", |
|
|
|
|
|
|
|
trigger: "blur" |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
data: [] |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
...mapGetters(["permission"]), |
|
|
|
|
|
|
|
permissionList() { |
|
|
|
|
|
|
|
// this.option.column = this.option.column.filter(v => { |
|
|
|
|
|
|
|
// return this.permission['inspectiontasks_col_' + v.prop] |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
addBtn: false, |
|
|
|
|
|
|
|
viewBtn: false, |
|
|
|
|
|
|
|
delBtn: false, |
|
|
|
|
|
|
|
editBtn: false |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
ids() { |
|
|
|
|
|
|
|
let ids = []; |
|
|
|
|
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
|
|
|
|
ids.push(ele.id); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return ids.join(","); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
|
|
|
add(row).then(() => { |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
|
|
message: "操作成功!" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, error => { |
|
|
|
|
|
|
|
window.console.log(error); |
|
|
|
|
|
|
|
loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
rowDel(row) { |
|
|
|
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
return remove(row.id); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
|
|
message: "操作成功!" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleDetailAdd() { |
|
|
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
|
|
path: "/inspection/inspectiontasksDetail", |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
frameMode:"add" |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDetailSearch(row) { |
|
|
|
results_data: [], |
|
|
|
debugger |
|
|
|
optionResults: { |
|
|
|
this.$router.push({ |
|
|
|
align: 'center', |
|
|
|
path: "/inspection/inspectiontasksDetail", |
|
|
|
menuAlign: 'center', |
|
|
|
query: { |
|
|
|
height: 'auto', |
|
|
|
frameMode:"search", |
|
|
|
calcHeight: 210, |
|
|
|
id: row.id |
|
|
|
searchShow: true, |
|
|
|
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
|
|
|
tip: false, |
|
|
|
|
|
|
|
border: true, |
|
|
|
|
|
|
|
column: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "结果编码", |
|
|
|
|
|
|
|
prop: "resultNo", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
resultAdd(row) { |
|
|
|
label: "任务执行开始时间", |
|
|
|
this.$router.push({ |
|
|
|
prop: "executeStartDate", |
|
|
|
path: "/inspection/inspectionresult", |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
frameMode:"add", |
|
|
|
|
|
|
|
id: row.id |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
{ |
|
|
|
|
|
|
|
label: "任务执行结束时间", |
|
|
|
|
|
|
|
prop: "executeEndDate", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "巡检结果", |
|
|
|
|
|
|
|
prop: "inspectiontResult", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "巡检报告", |
|
|
|
|
|
|
|
prop: "inspectionReport", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDelete() { |
|
|
|
} |
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
}, |
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
computed: { |
|
|
|
return; |
|
|
|
...mapGetters(["permission"]), |
|
|
|
|
|
|
|
permissionList() { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
addBtn: false, |
|
|
|
|
|
|
|
viewBtn: false, |
|
|
|
|
|
|
|
delBtn: true, |
|
|
|
|
|
|
|
editBtn: true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
|
|
|
|
this.type = this.option.column[0]; |
|
|
|
|
|
|
|
if(this.$route.query.frameMode == "search"){ |
|
|
|
|
|
|
|
this.option.column.push({ label: '巡检结果', prop: 'results' }); |
|
|
|
|
|
|
|
this.readonlyForm=true; |
|
|
|
|
|
|
|
this.shouldShowButton=true; |
|
|
|
|
|
|
|
this.addUpdateShowButton=false; |
|
|
|
|
|
|
|
this.frame_class = 'frame_class1'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
const cancelReason = this.findObject(this.information_option.column, "cancelReason"); |
|
|
|
|
|
|
|
const taskStatus = this.findObject(this.information_option.column, "taskStatus"); |
|
|
|
|
|
|
|
cancelReason.display = false; |
|
|
|
|
|
|
|
taskStatus.display = false; |
|
|
|
|
|
|
|
this.readonlyForm=false; |
|
|
|
|
|
|
|
this.shouldShowButton=false; |
|
|
|
|
|
|
|
this.addUpdateShowButton=true; |
|
|
|
|
|
|
|
this.frame_class = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.SearchDetail(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
handleFormSubmit() { |
|
|
|
|
|
|
|
const form = this.$refs.information_form; |
|
|
|
|
|
|
|
form.validate((valid) => { |
|
|
|
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
this.Submit(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "warning", |
|
|
|
|
|
|
|
message: "请输入必要信息!" |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 处理表单提交 |
|
|
|
|
|
|
|
Submit() { |
|
|
|
|
|
|
|
if(this.$route.query.frameMode=="add"){ |
|
|
|
|
|
|
|
this.$confirm("是否新增所填数据?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
add(this.information_form).then(()=>{ |
|
|
|
return remove(this.ids); |
|
|
|
this.$router.push({ |
|
|
|
}) |
|
|
|
path: "/inspection/inspectiontasks", |
|
|
|
.then(() => { |
|
|
|
query: { |
|
|
|
this.onLoad(this.page); |
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!" |
|
|
|
message: "操作成功!" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
}).catch((error) => { |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleAction() { |
|
|
|
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm("是否将选择巡检任务启动?", { |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
return Action(this.ids); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "error", |
|
|
|
message: "操作成功!" |
|
|
|
message: "操作失败!" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}); |
|
|
|
handleStop() { |
|
|
|
}else { |
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
this.$confirm("是否修改所填数据?", "提示", { |
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm("是否将选择巡检任务停止?", { |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
update(this.information_form).then(() => { |
|
|
|
return reject(this.ids); |
|
|
|
this.$router.push({ |
|
|
|
}) |
|
|
|
path: "/inspection/inspectiontasks", |
|
|
|
.then(() => { |
|
|
|
query: {}, |
|
|
|
this.onLoad(this.page); |
|
|
|
}); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!" |
|
|
|
message: "操作成功!" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
}).catch((error) => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "error", |
|
|
|
|
|
|
|
message: "操作失败!" |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleExport() { |
|
|
|
|
|
|
|
this.$confirm("是否导出数据?", "提示", { |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning" |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
expUtil.excelExport(`/api/equipmentledger/export?daf-auth=${getToken()}`, this.search, ['station', 'userStatus']); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
beforeOpen(done, type) { |
|
|
|
}, |
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
seachToUpdate () { |
|
|
|
getDetail(this.form.id).then(res => { |
|
|
|
this.shouldShowButton=false; |
|
|
|
this.form = res.data.data; |
|
|
|
this.addUpdateShowButton=true; |
|
|
|
|
|
|
|
this.readonlyForm=false; |
|
|
|
|
|
|
|
this.frame_class = null; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleChange (column) { |
|
|
|
|
|
|
|
this.type = column |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 巡检结果 编辑按钮处理 |
|
|
|
|
|
|
|
results_rowUpdate (form, index, done, loading) { |
|
|
|
|
|
|
|
update(form).then(() => { |
|
|
|
|
|
|
|
done(form); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
|
|
message: "操作成功!" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, error => { |
|
|
|
|
|
|
|
window.console.log(error); |
|
|
|
|
|
|
|
loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 巡检结果 删除按钮处理 |
|
|
|
|
|
|
|
results_rowDel (form, index,done) { |
|
|
|
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
|
|
type: "warning" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
return remove(form.id); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: "success", |
|
|
|
|
|
|
|
message: "操作成功!" |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
searchReset() { |
|
|
|
|
|
|
|
this.query = {}; |
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
searchChange(params, done) { |
|
|
|
|
|
|
|
this.query = params; |
|
|
|
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
selectionChange(list) { |
|
|
|
|
|
|
|
this.selectionList = list; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
selectionClear() { |
|
|
|
|
|
|
|
this.selectionList = []; |
|
|
|
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
currentChange(currentPage){ |
|
|
|
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
sizeChange(pageSize){ |
|
|
|
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
|
|
|
this.page.total = data.total; |
|
|
|
|
|
|
|
this.data = data.records; |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
this.selectionClear(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
headerClass() { |
|
|
|
|
|
|
|
return 'header-class' |
|
|
|
SearchDetail() { |
|
|
|
} |
|
|
|
getDetail(this.$route.query.id).then(res => { |
|
|
|
} |
|
|
|
console.log(res); |
|
|
|
}; |
|
|
|
this.information_form = res.data.data; |
|
|
|
</script> |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
headerClass(){ |
|
|
|
|
|
|
|
return 'header-class' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onLoad(row, params = {}) { |
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
getListBylegerId(this.$route.query.id).then(res => { |
|
|
|
|
|
|
|
this.parameters_data = res.data.data; |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
<style> |
|
|
|
<style> |
|
|
|
.header-class{ |
|
|
|
.header-class{ |
|
|
|
background-color: #3366cc !important; |
|
|
|
background-color: #3366cc !important; |
|
|
|
color: #FFFFFF !important; |
|
|
|
color: #FFFFFF !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.frame_class1 input.el-input__inner { |
|
|
|
|
|
|
|
border: none; |
|
|
|
|
|
|
|
box-shadow: none; |
|
|
|
|
|
|
|
outline: none; |
|
|
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.frame_class1 .el-input__icon { |
|
|
|
|
|
|
|
display: none; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.frame_class1 .el-input--prefix .el-input__inner { |
|
|
|
|
|
|
|
padding-left: 15px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.container { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: flex-end; /* 将子元素推到容器的末端 */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.check_status_class { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: flex-end; /* 将子元素推到容器的末端 */ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.check_status_class input.el-input__inner { |
|
|
|
|
|
|
|
border: none; |
|
|
|
|
|
|
|
box-shadow: none; |
|
|
|
|
|
|
|
outline: none; |
|
|
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|