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

批量设置功能完成

parent 0e19d11e
...@@ -16,6 +16,9 @@ export default { ...@@ -16,6 +16,9 @@ export default {
update(params) { update(params) {
return Api.post(`${material}/projectplan/update`, params); return Api.post(`${material}/projectplan/update`, params);
}, },
batchUpdate(params) {
return Api.post(`${material}/projectplan/updatepartbatch`, params);
},
sendtask(params) { sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params); return Api.post(`${material}/projectplan/sendtask`, params);
}, },
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<template slot="batch"> <template slot="batch">
<span v-width="300" style="color:#333"> <span v-width="300" style="color:#333">
<DateRange v-model="dateEntity" edit v-width="260"></DateRange> <DateRange v-model="dateEntity" edit v-width="260"></DateRange>
<Button type="primary">设置2计划日期</Button> <Button type="primary" @click="setDate()">设置日期</Button>
</span> </span>
<span> <span>
<UserGroup <UserGroup
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
:projectId="eid" :projectId="eid"
v-width="300" v-width="300"
></UserGroup> ></UserGroup>
<Button type="primary">设置执行人</Button> <Button type="primary" @click="setExecutor()">设置执行人</Button>
</span> </span>
<Button type="primary" @click="bacthRemove()">批量删除</Button> <Button type="primary" @click="bacthRemove()">批量删除</Button>
</template> </template>
...@@ -361,6 +361,33 @@ export default { ...@@ -361,6 +361,33 @@ export default {
this.list = data; 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) { add(row) {
if (row) { if (row) {
this.curId = row.id; 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