This commit is contained in:
shilixia 2021-04-28 14:03:31 +08:00
parent 3d9c0c8d98
commit c26b10604f
1 changed files with 22 additions and 29 deletions

View File

@ -32,7 +32,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="warning" <el-button type="warning" v-if="
scope.row.state == 待检查
"
@click="handleStartup(scope)">开始检查</el-button> @click="handleStartup(scope)">开始检查</el-button>
<el-button type="primary" <el-button type="primary"
@ -95,18 +97,8 @@
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
v-if=" <el-button
scope.row.checked == true
"
type="warning"
size="small"
@click="handcheckupdate(scope)"
>编辑</el-button
>
<el-button v-if="
scope.row.checked == false
"
@click="handleCheck(scope)">提交结果</el-button> @click="handleCheck(scope)">提交结果</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -197,7 +189,7 @@ export default {
leaders:[], leaders:[],
dialogType: "new", dialogType: "new",
listQuery:{}, listQuery:{},
inspectrecord:[], inspectrecord:null,
require:"", require:"",
upHeaders: upHeaders(), upHeaders: upHeaders(),
upUrl: upUrl(), upUrl: upUrl(),
@ -223,10 +215,13 @@ export default {
this.id = this.$route.params.id; this.id = this.$route.params.id;
this.getsubinspecttaskdep();//主任务信息 this.getsubinspecttaskdep();//主任务信息
}, },
methods: { methods: {
checkPermission, checkPermission,
//巡检的公司 //巡检的公司
getsubinspecttaskdep() { getsubinspecttaskdep() {
@ -238,7 +233,6 @@ export default {
}, },
//点击组织弹出清单 //点击组织弹出清单
getinspectrecordlist() { getinspectrecordlist() {
@ -255,26 +249,25 @@ export default {
this.listQuery = {pageoff:true, subtask: this.id, dept:scope.row.dept} this.listQuery = {pageoff:true, subtask: this.id, dept:scope.row.dept}
this.getinspectrecordlist(); this.getinspectrecordlist();
}, },
handcheckupdate(scope)
{
this.dialog=true;
console.log(this.recordid)
getinspectrecord(scope.row.id).then((res) => {
this.inspectrecord = res.data;
})
},
handleCheck(scope) handleCheck(scope)
{ {
this.dialog=true; this.dialog=true;
this.recordid=scope.row.id this.recordid=scope.row.id
this.fileList=[];
console.log(this.recordid) console.log(this.recordid)
getinspectrecord(this.recordid).then((res) => { getinspectrecord(this.recordid).then((res) => {
this.inspectrecord = res.data;
this.inspectrecord = res.data;
console.log(this.inspectrecord.imgs_)
for (var i = 0; i < this.inspectrecord.imgs_.length; i++) {
this.fileList.push({
id: this.inspectrecord.imgs_[i].id,
name: this.inspectrecord.imgs_[i].name,
path: this.inspectrecord.imgs_[i].path,
});
}
}) })
}, },