巡检任务

main
Dayu 12 months ago
parent 44349d3483
commit 9a87d835b3
  1. 7
      src/api/inspection/inspectionresult.js
  2. 11
      src/views/inspection/inspectiontasks.vue
  3. 6
      src/views/inspection/inspectiontasksDetail.vue

@ -32,14 +32,11 @@ export const remove = (ids) => {
}) })
} }
export const add = (row, taskNo) => { export const add = (row) => {
return request({ return request({
url: '/api/inspection/inspectionresult/submit', url: '/api/inspection/inspectionresult/submit',
method: 'post', method: 'post',
params:{ data: row
row,
taskNo,
}
}) })
} }

@ -50,7 +50,7 @@
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">详情</el-button> <el-button @click="handleDetailSearch(row,index)" type="text">详情</el-button>
<el-button @click="resultAdd()" type="text">上传巡检结果</el-button> <el-button @click="resultAdd(row)" type="text">上传巡检结果</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" type="text">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
@ -88,6 +88,7 @@
search:{}, search:{},
loading: true, loading: true,
resultBox: false, resultBox: false,
currTaskNo: null,
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -405,15 +406,17 @@
}, },
}); });
}, },
resultAdd() { resultAdd(row) {
this.resultBox = true; this.resultBox = true;
this.currTaskNo = row.taskNo;
}, },
submitResult(row, done, loading) { submitResult(row, done, loading) {
this.resultForm.taskNo = this.currTaskNo;
console.log(this.currTaskNo)
const form = this.$refs.resultForm; const form = this.$refs.resultForm;
form.validate((valid) => { form.validate((valid) => {
if (valid) { if (valid) {
add(this.resultForm,row.taskNo).then(() => { add(this.resultForm).then(() => {
this.resultBox = false; this.resultBox = false;
this.resultForm.executeStartDate= ''; this.resultForm.executeStartDate= '';
this.resultForm.executeEndDate= ''; this.resultForm.executeEndDate= '';

@ -185,8 +185,8 @@ export default {
routeNo: val routeNo: val
} }
}).then((res) => { }).then((res) => {
const routeName = this.findObject(this.information_option.column, "routeName"); console.log(123)
routeName.value = res.data.data.routeName; this.information_option.routeType = res.data.data.routeName;
}) })
} }
}, },
@ -212,7 +212,7 @@ export default {
label: "路线类型", label: "路线类型",
prop: "routeType", prop: "routeType",
span: 7, span: 7,
disabled: true, // disabled: true,
}, },
{ {
label: "计划编号", label: "计划编号",

Loading…
Cancel
Save