Merge branch 'master' of https://e.coding.net/ctcdevteam/cma_search
This commit is contained in:
commit
ae9d715bdd
|
@ -52,7 +52,7 @@
|
|||
|
||||
<el-card style="margin-top: 2px">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="dialogVisible = true"
|
||||
<el-button type="primary" icon="el-icon-plus" @click="createChildtask()"
|
||||
>创建子任务</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -64,7 +64,6 @@
|
|||
stripe
|
||||
highlight-current-row
|
||||
max-height="300"
|
||||
@row-click="clickRow"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column align="center" label="子任务">
|
||||
|
@ -96,7 +95,8 @@
|
|||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
<el-button @click="handleClick(scope)" type="primary">执行</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-edit"
|
||||
|
@ -113,133 +113,7 @@
|
|||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card style="float:left;width: 30%;margin-top:4px">
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="adddept">增加巡检组织</el-button> -->
|
||||
<el-table
|
||||
:data="recordList"
|
||||
max-height="300"
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
@row-click="recorclickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="组织名称">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ scope.row.dept__name }}
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检查状态">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-tag size="medium">{{ scope.row.state }}</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="float:right;width: 70%;margin-top:4px;">
|
||||
<el-button type="primary" @click="dialogFormVisible=true">指派任务</el-button>
|
||||
<el-table
|
||||
:data="inspectitemList"
|
||||
max-height="300"
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检查类别">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ scope.row.item_.cate_name }}
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检查要点">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ scope.row.item_.name }}
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检查类型">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ scope.row.item_.type }}
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="检查人">
|
||||
<template slot-scope="scope" v-if="scope.row.checker_">
|
||||
|
||||
{{ scope.row.checker_.name }}
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否检查">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.checked" effect="plain">是</el-tag>
|
||||
<el-tag type="danger" effect="plain" v-else>否</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible"
|
||||
:title="dialogType === 'edit' ? '编辑任务' : '指派人员'"
|
||||
>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="mbersData"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
>
|
||||
|
||||
<el-form-item label="负责人" prop="checker">
|
||||
<el-select
|
||||
v-model="mbersData.checker"
|
||||
style="width: 100%"
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="请选择组长">
|
||||
<el-option
|
||||
v-for="item in leaders"
|
||||
:key="item.member"
|
||||
:label="item.member__name"
|
||||
:value="item.member">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="sendconfirm('Forms')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
|
@ -364,9 +238,7 @@ const defaulttask = {
|
|||
members:"",
|
||||
depts:"",
|
||||
};
|
||||
const mbersData = {
|
||||
checker:""
|
||||
}
|
||||
|
||||
export default {
|
||||
components: { Pagination},
|
||||
|
||||
|
@ -382,19 +254,16 @@ export default {
|
|||
ids:[],
|
||||
subinsecttask:[],
|
||||
memberOptions:[],
|
||||
inspectitemList:[],
|
||||
mbersData:mbersData,
|
||||
deptOptions:[],
|
||||
leaders:[],
|
||||
dialogType: "new",
|
||||
data: {},
|
||||
listQuery:{},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.task.id = this.$route.params.id;
|
||||
this.getinspecttask();//主任务信息
|
||||
//this.getTypeAll();//组长
|
||||
|
||||
this.getUserList();//组员
|
||||
this.getOrgList();//组织
|
||||
this.getsubinspecttasklist();//子任务名
|
||||
|
@ -414,13 +283,7 @@ export default {
|
|||
this.subinsecttask=res.data;
|
||||
});
|
||||
},
|
||||
//组长列表
|
||||
getTypeAll() {
|
||||
getUserList({pageoff:true, roles__name:'质量巡查成员'}).then((res) => {
|
||||
this.leaderOptions = genTree(res.data);
|
||||
this.memberOptions = genTree(res.data);
|
||||
});
|
||||
},
|
||||
|
||||
//组员列表
|
||||
getUserList() {
|
||||
getUserList({pageoff:true, roles__name:'质量巡查成员'}).then((res) => {
|
||||
|
@ -457,7 +320,7 @@ export default {
|
|||
},
|
||||
//创建子任务
|
||||
async confirm(form) {
|
||||
console.log(this.inspecttask)
|
||||
|
||||
this.inspecttask.inspecttask=this.$route.params.id;
|
||||
|
||||
createsubinspecttask(this.inspecttask).then((res) => {
|
||||
|
@ -498,65 +361,29 @@ export default {
|
|||
})
|
||||
|
||||
},
|
||||
|
||||
createChildtask()
|
||||
{
|
||||
|
||||
this.inspecttask = Object.assign({}, defaulttask);
|
||||
this.dialogVisible = true;
|
||||
|
||||
},
|
||||
clickRow(row, col, e) {
|
||||
this.listLoading2 = true;
|
||||
this.id = row.id;
|
||||
this.subtask=row.id;
|
||||
|
||||
this.getsubinspecttaskdep();
|
||||
|
||||
this.leaders = row.members;
|
||||
|
||||
this.$router.push({name: "myTaskdos", params: { id: this.id,leaders:row.members }, })
|
||||
|
||||
|
||||
},
|
||||
//增加巡检组织
|
||||
adddept()
|
||||
{
|
||||
|
||||
|
||||
},
|
||||
//点击组织弹出清单
|
||||
getinspectrecordlist() {
|
||||
getinspectrecordlist(this.listQuery)
|
||||
.then((res) => {
|
||||
this.inspectitemList = res.data;
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
recorclickRow(row, col, e) {
|
||||
handleClick(scope) {
|
||||
this.listLoading2 = true;
|
||||
this.listQuery = {pageoff:true, subtask: this.subtask, dept: row.dept }
|
||||
this.getinspectrecordlist();
|
||||
this.$router.push({name: "myTaskdos", params: { id: scope.row.id,leaders:scope.row.members }, })
|
||||
},
|
||||
|
||||
handleSelectionChange(val){
|
||||
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
sendconfirm(){
|
||||
|
||||
|
||||
const lengths = this.multipleSelection.length;
|
||||
for (let i = 0; i < lengths; i++) {
|
||||
this.ids.push(this.multipleSelection[i].id);
|
||||
}
|
||||
console.log(lengths)
|
||||
//let data = { records: this.ids };//检查项ID
|
||||
|
||||
|
||||
this.mbersData.records=this.ids
|
||||
console.log(this.mbersData)
|
||||
addappoint(this.mbersData).then((res) => {
|
||||
|
||||
this.dialogFormVisible = false;
|
||||
this.getinspectrecordlist();
|
||||
this.$message.success("成功");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -12,7 +12,7 @@
|
|||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column align="center" label="父级任务">
|
||||
<el-table-column align="center" label="批级任务">
|
||||
<template slot-scope="scope">{{ scope.row.inspecttask_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开始巡查时间">
|
||||
|
@ -26,7 +26,8 @@
|
|||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="任务状态">
|
||||
<template slot-scope="scope">{{ scope.row.state }}</template>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.state }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="巡查公司数">
|
||||
<template slot-scope="scope">{{ scope.row.depts_count }}</template>
|
||||
|
@ -107,7 +108,7 @@ export default {
|
|||
});
|
||||
},
|
||||
handleClick(scope){
|
||||
this.$router.push({name: "myTaskdos", params: { id: scope.row.id }, })
|
||||
this.$router.push({name: "myTaskdos", params: { id: scope.row.id,leaders:scope.row.members }, })
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
|
|
|
@ -36,7 +36,9 @@
|
|||
"
|
||||
@click="handleStartup(scope)">开始检查</el-button>
|
||||
|
||||
<el-button type="primary"
|
||||
<el-button type="primary" v-if="
|
||||
scope.row.state == '检测中'
|
||||
"
|
||||
@click="handleCheckup(scope)">组长提交</el-button>
|
||||
|
||||
|
||||
|
@ -46,18 +48,24 @@
|
|||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" style="float:right;width: 55%;">
|
||||
|
||||
<el-button type="primary" @click="dialogFormVisible=true">指派任务</el-button>
|
||||
<el-table
|
||||
:data="inspectitemList"
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
style="width: 100%">
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column
|
||||
label="检查要点"
|
||||
width="280">
|
||||
width="230">
|
||||
<template slot-scope="scope">
|
||||
|
||||
{{ scope.row.item_.name }}
|
||||
|
@ -103,6 +111,42 @@
|
|||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible"
|
||||
:title="dialogType === 'edit' ? '编辑任务' : '指派人员'"
|
||||
>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="mbersData"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
>
|
||||
|
||||
<el-form-item label="负责人" prop="checker">
|
||||
<el-select
|
||||
v-model="mbersData.checker"
|
||||
style="width: 100%"
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="请选择组长">
|
||||
<el-option
|
||||
v-for="item in leaders"
|
||||
:key="item.member"
|
||||
:label="item.member__name"
|
||||
:value="item.member">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="sendconfirm('Forms')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer
|
||||
title="任务检查"
|
||||
|
@ -166,7 +210,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getsubinspecttaskdep,getinspectrecordlist,updateinspectrecord,getinspectrecord,upinspectdept,gettaskdepstart} from "@/api/subinspecttask";
|
||||
import {getsubinspecttaskdep,getinspectrecordlist,updateinspectrecord,getinspectrecord,upinspectdept,gettaskdepstart,addappoint} from "@/api/subinspecttask";
|
||||
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
@ -183,6 +228,7 @@ export default {
|
|||
listLoading: true,
|
||||
dialog:false,
|
||||
recordList:[],
|
||||
dialogFormVisible:false,
|
||||
inspectitemList:[],
|
||||
deptOptions:[],
|
||||
leaders:[],
|
||||
|
@ -190,6 +236,8 @@ export default {
|
|||
listQuery:{},
|
||||
inspectrecord:null,
|
||||
require:"",
|
||||
ids:[],
|
||||
mbersData:mbersData,
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList: [],
|
||||
|
@ -212,6 +260,8 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.leaders = this.$route.params.leaders;
|
||||
console.log(this.leaders)
|
||||
this.getsubinspecttaskdep();//主任务信息
|
||||
},
|
||||
|
||||
|
@ -341,8 +391,35 @@ export default {
|
|||
|
||||
upinspectdept(scope.row.id).then((res) => {
|
||||
this.$message.success("提交成功");
|
||||
this.getinspectrecordlist();
|
||||
this.getsubinspecttaskdep()
|
||||
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val){
|
||||
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
//组长指派人员
|
||||
sendconfirm(){
|
||||
|
||||
|
||||
const lengths = this.multipleSelection.length;
|
||||
for (let i = 0; i < lengths; i++) {
|
||||
this.ids.push(this.multipleSelection[i].id);
|
||||
}
|
||||
|
||||
|
||||
this.mbersData.records=this.ids
|
||||
console.log()
|
||||
addappoint(this.mbersData).then((res) => {
|
||||
|
||||
this.dialogFormVisible = false;
|
||||
this.getinspectrecordlist();
|
||||
this.$message.success("成功");
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
//组长提交开始检查
|
||||
handleStartup(scope){
|
||||
|
@ -351,7 +428,8 @@ export default {
|
|||
this.getinspectrecordlist();
|
||||
this.getsubinspecttaskdep()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue