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

ok

parent 4e006a98
...@@ -40,8 +40,8 @@ export default { ...@@ -40,8 +40,8 @@ export default {
type: String type: String
}, },
disable: { disable: {
type: Boolean, type: Number,
default: false default: 0
}, },
}, },
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
v-for="item in users" v-for="item in users"
:value="item.userId" :value="item.userId"
:key="item.userId" :key="item.userId"
:disabled="item.status==1" :label="item.note"
:disabled="item.status==0"
> >
<div class="user"> <div class="user">
<State v-show="item.authority" code="project.group.authority" :value="item.authority" class="mr10"/> {{item.note}} <User :value="item.userId"/></span><Tag>{{item.role}}</Tag> <State code="project.group.authority" :value="item.authority" class="mr10" type="tag"/> {{item.note}}
<State code="project.group.role" :value="item.role" class="mr10" type="tag"/>
</div> </div>
</Option> </Option>
</Select> </Select>
...@@ -58,13 +60,13 @@ export default { ...@@ -58,13 +60,13 @@ export default {
// codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}] // codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}]
codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}] codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}]
} }
this.$api.post(`${material}/projectplan/list`, params).then(r=>{ this.$api.post(`${material}/projectgroupuser/list`, params).then(r=>{
this.users=r.result; this.users=r.result;
}) })
}, },
change(event) { change(event) {
let name = ""; let name = "";
this.data.forEach((e) => { this.users.forEach((e) => {
if (e.id == event) { if (e.id == event) {
name = e.label; name = e.label;
} }
......
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
//新增保存或修改保存 //新增保存或修改保存
save() { save() {
this.cur.groupId = this.eid this.cur.groupId = this.eid
if (!this.cur.userId) { if (this.cur.userId==0||this.cur.userId==null) {
this.$Message.error("请选择人员"); this.$Message.error("请选择人员");
return; return;
} }
...@@ -255,14 +255,15 @@ export default { ...@@ -255,14 +255,15 @@ export default {
this.$Message.error("此人已经选择"); this.$Message.error("此人已经选择");
return; return;
} }
if (!this.cur.role ) { if (this.cur.role===undefined) {
this.$Message.error("请选择人员角色"); this.$Message.error("请选择人员角色");
return; return;
} }
if (this.cur.authority == null || this.cur.authority == '') { if (this.cur.authority ===undefined) {
this.$Message.error("请选择人员权限"); this.$Message.error("请选择人员权限");
return; return;
} }
if (this.cur.id && this.cur.id != '') { //人员修改 if (this.cur.id && this.cur.id != '') { //人员修改
Api.update(this.cur).then((r) => { Api.update(this.cur).then((r) => {
this.disabled = false; this.disabled = false;
......
...@@ -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);
}, },
sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params);
},
delete(id) { delete(id) {
return Api.delete(`${material}/projectplan/delete`, { return Api.delete(`${material}/projectplan/delete`, {
params: { params: {
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
oprate: "edit", oprate: "edit",
disable:params.row.status disable:params.row.status
}, },
on: { click: () => this.send(params.row.id) }, on: { click: () => this.send(params.row) },
}, },
), ),
h( h(
...@@ -249,6 +249,35 @@ export default { ...@@ -249,6 +249,35 @@ export default {
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
send(row){
console.log(row);
if(!row.startDate){
this.$Message.error("未设置开始时间");
return
}
if(!row.endDate){
this.$Message.error("未设置结束时间");
return
}
if(!row.executor){
this.$Message.error("为设置执行人");
return
}
delete row.chlidren;
delete row.parent;
console.warn(row)
var data=JSON.parse(JSON.stringify(row));
data.status=1;
Api.sendtask({
id:row.id,
}).then(r=>{
if(r.result){
this.$Message.info("任务派发成功!");
this.search();
}
})
},
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
......
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