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

ok

parent 4e006a98
......@@ -40,8 +40,8 @@ export default {
type: String
},
disable: {
type: Boolean,
default: false
type: Number,
default: 0
},
},
......
......@@ -13,10 +13,12 @@
v-for="item in users"
:value="item.userId"
:key="item.userId"
:disabled="item.status==1"
:label="item.note"
:disabled="item.status==0"
>
<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>
</Option>
</Select>
......@@ -58,13 +60,13 @@ export default {
// codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", 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;
})
},
change(event) {
let name = "";
this.data.forEach((e) => {
this.users.forEach((e) => {
if (e.id == event) {
name = e.label;
}
......
......@@ -244,7 +244,7 @@ export default {
//新增保存或修改保存
save() {
this.cur.groupId = this.eid
if (!this.cur.userId) {
if (this.cur.userId==0||this.cur.userId==null) {
this.$Message.error("请选择人员");
return;
}
......@@ -255,14 +255,15 @@ export default {
this.$Message.error("此人已经选择");
return;
}
if (!this.cur.role ) {
if (this.cur.role===undefined) {
this.$Message.error("请选择人员角色");
return;
}
if (this.cur.authority == null || this.cur.authority == '') {
if (this.cur.authority ===undefined) {
this.$Message.error("请选择人员权限");
return;
}
if (this.cur.id && this.cur.id != '') { //人员修改
Api.update(this.cur).then((r) => {
this.disabled = false;
......
......@@ -16,6 +16,9 @@ export default {
update(params) {
return Api.post(`${material}/projectplan/update`, params);
},
sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params);
},
delete(id) {
return Api.delete(`${material}/projectplan/delete`, {
params: {
......
......@@ -102,7 +102,7 @@ export default {
oprate: "edit",
disable:params.row.status
},
on: { click: () => this.send(params.row.id) },
on: { click: () => this.send(params.row) },
},
),
h(
......@@ -249,6 +249,35 @@ export default {
this.detail = () => import("./add");
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) {
this.curId = id;
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