|
@@ -27,30 +27,33 @@
|
|
|
<el-container style="padding: 0px;">
|
|
|
<el-aside :style="'overflow:auto;padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
|
|
|
<el-input v-model="groupSearch" size="small" placeholder="搜索分组" @input="startSearchGroup" style="margin-top:10px"/>
|
|
|
- <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup"></i></p>
|
|
|
+ <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup" v-if="projectCreatorId == user.id || projectInchargerId == user.id"></i></p>
|
|
|
<el-menu :default-active="defaultGroupId" ref="defaultMenu" class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
|
|
|
<el-menu-item :index="item.id" v-for="item in groupList" :key="item.id" class="group_style">
|
|
|
<div slot="title">
|
|
|
<span >{{item.name}}</span>
|
|
|
- <el-dropdown trigger="click" style="float:right;margin-right:-10px;">
|
|
|
+ <!-- <el-button size="mini" @click="test(item)">test</el-button> -->
|
|
|
+ <el-dropdown trigger="click" style="float:right;margin-right:-10px;" :disabled="user.id != item.inchargerId && user.id != projectCreatorId && user.id != projectInchargerId">
|
|
|
<i class="iconfont firerock-iconcaidan" ></i>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item @click.native="copyGroup(item)">
|
|
|
+ <el-dropdown-item @click.native="copyGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
|
|
|
<i class="el-icon-document-copy"></i>
|
|
|
复制分组</el-dropdown-item>
|
|
|
- <el-dropdown-item divided @click.native="renameGroup(item)">
|
|
|
+ <el-dropdown-item divided @click.native="renameGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
|
|
|
<i class="el-icon-edit"></i>
|
|
|
修改组名</el-dropdown-item>
|
|
|
- <el-dropdown-item divided @click.native="addToTemplate(item)">
|
|
|
+ <el-dropdown-item divided @click.native="addToTemplate(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
|
|
|
<i class="el-icon-plus"></i>
|
|
|
设为模板</el-dropdown-item>
|
|
|
- <el-dropdown-item divided @click.native="editIncharger(item)">
|
|
|
+ <el-dropdown-item divided @click.native="editIncharger(item)"
|
|
|
+ v-if="projectCreatorId == user.id || projectInchargerId == user.id">
|
|
|
<i class="el-icon-user"></i>
|
|
|
设负责人</el-dropdown-item>
|
|
|
- <el-dropdown-item divided @click.native="setupParticipants(item)">
|
|
|
+ <el-dropdown-item divided @click.native="setupParticipants(item)"
|
|
|
+ v-if="projectCreatorId == user.id || projectInchargerId == user.id || item.inchargerId == user.id">
|
|
|
<i class="iconfont firerock-iconusers"></i>
|
|
|
设参与人</el-dropdown-item>
|
|
|
- <el-dropdown-item divided @click.native="deleteGroup(item)">
|
|
|
+ <el-dropdown-item divided @click.native="deleteGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
|
|
|
<i class="el-icon-delete"></i>
|
|
|
删除分组</el-dropdown-item>
|
|
|
<!-- 设置参与人 0000 -->
|
|
@@ -458,7 +461,7 @@
|
|
|
highlight-current-row
|
|
|
v-loading="listLoading"
|
|
|
style="width: 100%;margin-top:10px;"
|
|
|
- @row-click="relationTaskClick">
|
|
|
+ @row-click.stop.native="relationTaskClick">
|
|
|
<el-table-column prop="taskStatus" label="完成" width="50" >
|
|
|
<template slot-scope="scope">
|
|
|
<el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)" @click.stop.native=""></el-checkbox>
|
|
@@ -466,14 +469,14 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="taskName" label="标题" >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;color:#409eff;">
|
|
|
<span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="130" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button @click="deleteRelationItem(scope.row.id)" size="mini">解除关联</el-button>
|
|
|
+ <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">解除关联</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -568,7 +571,7 @@
|
|
|
<el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" title="添加关联任务" width="800px" append-to-body>
|
|
|
<el-form ref="relationItemForm" label-width="100px">
|
|
|
<el-form-item label="选择任务" prop="taskType">
|
|
|
- <el-select v-model="relationvalue" multiple>
|
|
|
+ <el-select v-model="relationvalue" multiple style="width:80%">
|
|
|
<el-option
|
|
|
v-for="item in relationdata"
|
|
|
:key="item.id"
|
|
@@ -1030,7 +1033,10 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
},
|
|
|
chosenMembCount: 0,
|
|
|
ididid:null,
|
|
|
- alreadyPartArray: []
|
|
|
+ alreadyPartArray: [],
|
|
|
+
|
|
|
+ projectCreatorId: null,
|
|
|
+ projectInchargerId: null
|
|
|
};
|
|
|
|
|
|
},
|
|
@@ -1040,6 +1046,12 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ test(item){
|
|
|
+ // let pro = this.$route
|
|
|
+ console.log('test',this.projectList);
|
|
|
+
|
|
|
+ },
|
|
|
setParticipants(){
|
|
|
let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
|
|
|
let chose2 = chosenList.filter(item=>item.isUser == 1)
|
|
@@ -1051,12 +1063,22 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
idsJson: JSON.stringify(chose3)
|
|
|
},res => {
|
|
|
if(res.code == 'ok'){
|
|
|
-
|
|
|
+ this.participantsDialog = false
|
|
|
+ this.$message({
|
|
|
+ message: '设置成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
}else {
|
|
|
-
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
}
|
|
|
},error => {
|
|
|
-
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
// 设置项目参与人
|
|
@@ -1301,6 +1323,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
}
|
|
|
},
|
|
|
addRelation(){ //关联任务卡片
|
|
|
+ this.relationvalue = []
|
|
|
this.isRelationTab = true
|
|
|
this.getrelation()
|
|
|
|
|
@@ -1317,6 +1340,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
message: '添加成功',
|
|
|
type: 'success'
|
|
|
})
|
|
|
+ this.getRelationTaskList()
|
|
|
this.$forceUpdate()
|
|
|
}else {
|
|
|
this.$message({
|
|
@@ -2475,6 +2499,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
if (res.code == "ok") {
|
|
|
this.allGroupData = res.data;
|
|
|
this.groupList = res.data;
|
|
|
+ console.log(this.groupList,'grouplist');
|
|
|
if (this.groupList.length > 0) {
|
|
|
this.defaultGroupId = this.groupList[0].id;
|
|
|
this.selectedGroup = this.groupList[0];
|
|
@@ -2550,6 +2575,8 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.projectList = res.data;
|
|
|
+ console.log('getprojectlist',res.data);
|
|
|
+
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -2806,6 +2833,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.currentProject = res.data;
|
|
|
+ this.getjurisdictionIds(this.currentProject)
|
|
|
this.joinMembList = this.currentProject.participationList;
|
|
|
} else {
|
|
|
}
|
|
@@ -2818,6 +2846,10 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ getjurisdictionIds(pro){
|
|
|
+ this.projectCreatorId = pro.creatorId
|
|
|
+ this.projectInchargerId = pro.inchargerId
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
let height = window.innerHeight;
|
|
@@ -2835,10 +2867,13 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
|
|
|
this.curProjectId = parseInt(this.$route.params.id);
|
|
|
this.activeName = this.$route.path.split("/")[1];
|
|
|
this.getDetail();
|
|
|
+
|
|
|
this.getUsers();
|
|
|
this.getMyProjectList();
|
|
|
+
|
|
|
this.getInsideData();
|
|
|
this.getGroupTemplate();
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|