Commit d7038a49 authored by 周远喜's avatar 周远喜

批量设置功能完成

parent 0e19d11e
......@@ -16,6 +16,9 @@ export default {
update(params) {
return Api.post(`${material}/projectplan/update`, params);
},
batchUpdate(params) {
return Api.post(`${material}/projectplan/updatepartbatch`, params);
},
sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params);
},
......
......@@ -52,7 +52,7 @@
<template slot="batch">
<span v-width="300" style="color:#333">
<DateRange v-model="dateEntity" edit v-width="260"></DateRange>
<Button type="primary">设置2计划日期</Button>
<Button type="primary" @click="setDate()">设置日期</Button>
</span>
<span>
<UserGroup
......@@ -61,7 +61,7 @@
:projectId="eid"
v-width="300"
></UserGroup>
<Button type="primary">设置执行人</Button>
<Button type="primary" @click="setExecutor()">设置执行人</Button>
</span>
<Button type="primary" @click="bacthRemove()">批量删除</Button>
</template>
......@@ -361,6 +361,33 @@ export default {
this.list = data;
});
},
setDate(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
startDate:this.dateEntity.startDate,
endDate:this.dateEntity.endDate,
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
setExecutor(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
executor:this.executors
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
add(row) {
if (row) {
this.curId = row.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment