xunjianrenwu
This commit is contained in:
parent
eb23199d31
commit
647f6e17a2
|
@ -69,4 +69,18 @@ export function deleteQualityinspect(id, data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function creatInspectdept(data){
|
||||||
|
return request({
|
||||||
|
url: '/quality/inspectdept/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deleteInspectdept(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/quality/inspectdept/${id}/`,
|
||||||
|
method: 'delete',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDo(scope) {
|
handleDo(scope) {
|
||||||
this.$router.push({name: "InpectTaskdo", params: { id: scope.row.id }, })
|
this.$router.push({name: "InpectTaskdo", params: { inpecttask: scope.row.id }, })
|
||||||
},
|
},
|
||||||
handleEdit(scope) {
|
handleEdit(scope) {
|
||||||
this.task = Object.assign({}, scope.row); // copy obj
|
this.task = Object.assign({}, scope.row); // copy obj
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择组织" prop="leader">
|
<el-form-item label="选择组织" prop="depts">
|
||||||
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="inspecttask.depts"
|
v-model="inspecttask.depts"
|
||||||
|
@ -261,7 +261,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.task.id = this.$route.params.id;
|
this.task.id = this.$route.params.inpecttask;
|
||||||
this.getinspecttask();//主任务信息
|
this.getinspecttask();//主任务信息
|
||||||
|
|
||||||
this.getUserList();//组员
|
this.getUserList();//组员
|
||||||
|
@ -279,7 +279,7 @@ export default {
|
||||||
},
|
},
|
||||||
//子任务信息
|
//子任务信息
|
||||||
getsubinspecttasklist(){
|
getsubinspecttasklist(){
|
||||||
getsubinspecttasklist({pageoff:true}).then((res)=>{
|
getsubinspecttasklist({pageoff:true,inpecttask:this.$route.params.inpecttask}).then((res)=>{
|
||||||
this.subinsecttask=res.data;
|
this.subinsecttask=res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -321,7 +321,7 @@ export default {
|
||||||
//创建子任务
|
//创建子任务
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
|
|
||||||
this.inspecttask.inspecttask=this.$route.params.id;
|
this.inspecttask.inspecttask=this.$route.params.inpecttask;
|
||||||
|
|
||||||
createsubinspecttask(this.inspecttask).then((res) => {
|
createsubinspecttask(this.inspecttask).then((res) => {
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card style="float:left;width: 45%;">
|
<el-card style="float:left;width: 45%;">
|
||||||
|
<el-button type="primary" @click="dialogVisibles=true">增加组织</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
:data="recordList"
|
:data="recordList"
|
||||||
|
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@row-click="deptClick"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="组织名称"
|
label="组织名称"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link @click="recorclickRow(scope)" type="primary"> {{ scope.row.dept__name }}</el-link>
|
{{ scope.row.dept__name }}
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -29,13 +29,17 @@
|
||||||
</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="danger"
|
||||||
|
@click="handleDelete(scope)"
|
||||||
|
>删除</el-button>
|
||||||
<el-button type="warning" v-if="
|
<el-button type="warning" v-if="
|
||||||
scope.row.state == '待检查'
|
scope.row.state == '待检查'
|
||||||
"
|
"
|
||||||
@click="handleStartup(scope)">开始检查</el-button>
|
@click="handleStartup(scope)">开始检查</el-button>
|
||||||
|
|
||||||
<el-button type="primary" v-if="
|
<el-button type="primary" v-if="
|
||||||
scope.row.state == '检测中'
|
scope.row.state == '检查中'
|
||||||
"
|
"
|
||||||
@click="handleCheckup(scope)">组长提交</el-button>
|
@click="handleCheckup(scope)">组长提交</el-button>
|
||||||
|
|
||||||
|
@ -53,6 +57,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
|
@ -145,7 +150,41 @@
|
||||||
<el-button type="primary" @click="sendconfirm('Forms')">确认</el-button>
|
<el-button type="primary" @click="sendconfirm('Forms')">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisibles"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Formss"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:model="inspectDept"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="选择组织" prop="leader">
|
||||||
|
<el-select
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
allow-create
|
||||||
|
v-model="inspectDept.dept"
|
||||||
|
default-first-option
|
||||||
|
placeholder="请选择组织">
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="addDept('Formss')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
title="任务检查"
|
title="任务检查"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
|
@ -210,6 +249,9 @@
|
||||||
<script>
|
<script>
|
||||||
import {getsubinspecttaskdep,getinspectrecordlist,updateinspectrecord,getinspectrecord,upinspectdept,gettaskdepstart,addappoint} from "@/api/subinspecttask";
|
import {getsubinspecttaskdep,getinspectrecordlist,updateinspectrecord,getinspectrecord,upinspectdept,gettaskdepstart,addappoint} from "@/api/subinspecttask";
|
||||||
|
|
||||||
|
import { genTree } from "@/utils";
|
||||||
|
import { getOrgList } from "@/api/org";
|
||||||
|
import {deleteInspectdept,creatInspectdept} from "@/api/qualityinspect"
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
@ -218,6 +260,9 @@ import checkPermission from "@/utils/permission";
|
||||||
const mbersData = {
|
const mbersData = {
|
||||||
checker:""
|
checker:""
|
||||||
}
|
}
|
||||||
|
const inspectdept = {
|
||||||
|
dept:null,
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination},
|
components: { Pagination},
|
||||||
|
|
||||||
|
@ -226,10 +271,12 @@ export default {
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialog:false,
|
dialog:false,
|
||||||
recordList:[],
|
recordList:[],
|
||||||
|
dialogVisibles:false,
|
||||||
dialogFormVisible:false,
|
dialogFormVisible:false,
|
||||||
inspectitemList:[],
|
inspectitemList:[],
|
||||||
deptOptions:[],
|
deptOptions:[],
|
||||||
leaders:[],
|
leaders:[],
|
||||||
|
inspectDept:inspectdept,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
listQuery:{},
|
listQuery:{},
|
||||||
inspectrecord:null,
|
inspectrecord:null,
|
||||||
|
@ -259,7 +306,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.id = this.$route.params.id;
|
this.id = this.$route.params.id;
|
||||||
this.leaders = this.$route.params.leaders;
|
this.leaders = this.$route.params.leaders;
|
||||||
console.log(this.leaders)
|
this.getOrgList();
|
||||||
this.getsubinspecttaskdep();//主任务信息
|
this.getsubinspecttaskdep();//主任务信息
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -280,15 +327,23 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//组织列表
|
||||||
|
getOrgList() {
|
||||||
|
getOrgList({can_supervision:true}).then((res) => {
|
||||||
|
this.deptOptions = genTree(res.data);
|
||||||
|
|
||||||
|
});
|
||||||
recorclickRow(scope) {
|
},
|
||||||
|
//点击组织弹出检查项
|
||||||
|
deptClick(row){
|
||||||
this.listLoading2 = true;
|
this.listLoading2 = true;
|
||||||
this.listQuery = {pageoff:true, subtask: this.id, dept:scope.row.dept}
|
this.listQuery = {pageoff:true, subtask: row.subtask, dept:row.dept}
|
||||||
|
|
||||||
this.getinspectrecordlist();
|
this.getinspectrecordlist();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//点击组织弹出清单
|
//点击组织弹出清单
|
||||||
getinspectrecordlist() {
|
getinspectrecordlist() {
|
||||||
getinspectrecordlist(this.listQuery)
|
getinspectrecordlist(this.listQuery)
|
||||||
|
@ -408,7 +463,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
this.mbersData.records=this.ids
|
this.mbersData.records=this.ids
|
||||||
console.log()
|
console.log(this.mbersData)
|
||||||
addappoint(this.mbersData).then((res) => {
|
addappoint(this.mbersData).then((res) => {
|
||||||
|
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
|
@ -426,10 +481,38 @@ export default {
|
||||||
this.getsubinspecttaskdep()
|
this.getsubinspecttaskdep()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await deleteInspectdept(scope.row.id);
|
||||||
|
this.getsubinspecttaskdep()
|
||||||
|
this.$message.success("成功");
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//增加待巡检的公司
|
||||||
|
addDept(){
|
||||||
|
console.log(this.inspectDept);
|
||||||
|
this.inspectDept.subtask=this.$route.params.id;
|
||||||
|
|
||||||
|
creatInspectdept(this.inspectDept).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getsubinspecttaskdep();
|
||||||
|
this.dialogVisibles = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue