|
@@ -415,6 +415,12 @@
|
|
|
<el-button size="small" type="primary" @click="batchSetWudulistBtn2(true)">{{ $t('volumeset') }} {{user.timeType.customDegreeName}}</el-button>
|
|
|
<el-button size="small" type="primary" @click="batchSetWudulistBtn2(false)">{{ $t('pi-liang-tian-jia') }} {{user.timeType.customDegreeName}}</el-button>
|
|
|
</template>
|
|
|
+ <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
+ <el-button size="small" type="primary" @click="addTaskGroup()" >{{'批量增加任务分组'}}</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
+ <el-button size="small" type="primary" @click="setGroupIncharger()" >{{'批量设置分组负责人'}}</el-button>
|
|
|
+ </template>
|
|
|
<template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
<el-button size="small" type="primary" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">{{ $t('groupparticipantsinbatches') }}</el-button>
|
|
|
</template>
|
|
@@ -1542,6 +1548,46 @@
|
|
|
<el-button type="primary" @click="submitWorkContext()">{{ $t('btn.determine') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 批量增加任务分组 -->
|
|
|
+ <el-dialog :title="'批量增加任务分组'" v-if="addTaskGroupDig" :visible.sync="addTaskGroupDig" width="40%">
|
|
|
+ <el-form label-width="20%">
|
|
|
+ <el-form-item :label="'分组名称:'">
|
|
|
+ <el-input v-model="batchAddTaskGroupName" placeholder="请输入内容"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="addTaskGroupDig = false,this.batchAddTaskGroupName=null">{{ $t('btn.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="batchAddTaskGroup()">{{ $t('btn.determine') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 批量设置任务分组负责人 -->
|
|
|
+ <el-dialog :title="'批量设置任务分组负责人'" v-if="addTaskGroupInchargerDig" :visible.sync="addTaskGroupInchargerDig" width="40%">
|
|
|
+ <el-form label-width="20%">
|
|
|
+ <el-form-item :label="'分组名称:'">
|
|
|
+ <el-select v-model="hasSetGroupName" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in hasSetGroupList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="'分组负责人:'">
|
|
|
+ <el-select v-if="user.userNameNeedTranslate != '1'" v-model="hasSetGroupInchargerId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 80%" filterable clearable>
|
|
|
+ <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ <span style="float: left">{{item.name}}</span>
|
|
|
+ <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="addTaskGroupInchargerDig = false,this.hasSetGroupInchargerId=null,this.hasSetGroupName=null">{{ $t('btn.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="batchSetGroupIncharger()">{{ $t('btn.determine') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style scoped>
|
|
@@ -1827,6 +1873,12 @@ a {
|
|
|
functionalId:null,
|
|
|
workContextList:[],
|
|
|
oldValue:null,
|
|
|
+ addTaskGroupDig:false,
|
|
|
+ batchAddTaskGroupName:null,
|
|
|
+ hasSetGroupName:null,
|
|
|
+ hasSetGroupInchargerId:null,
|
|
|
+ hasSetGroupList:[],
|
|
|
+ addTaskGroupInchargerDig:false,
|
|
|
};
|
|
|
},
|
|
|
// 过滤器
|
|
@@ -2455,6 +2507,124 @@ a {
|
|
|
test(row){
|
|
|
// console.log(row);
|
|
|
},
|
|
|
+ //批量增加任务分组
|
|
|
+ addTaskGroup(){
|
|
|
+ if(this.checkedProjectArr.length == 0){
|
|
|
+ this.$message(this.$t('defaultText.pleaseSelectSnItem'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.addTaskGroupDig=true
|
|
|
+ },
|
|
|
+ batchAddTaskGroup(){
|
|
|
+ if(!this.batchAddTaskGroupName){
|
|
|
+ this.$message({
|
|
|
+ message: '请填写分组名称',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let proArr = []
|
|
|
+ for(let i=0;i<this.checkedProjectArr.length;i++){
|
|
|
+ proArr.push(this.checkedProjectArr[i].id)
|
|
|
+ }
|
|
|
+ this.http.post("/task-group/batchSaveTaskGroup",{
|
|
|
+ taskGroupName:this.batchAddTaskGroupName,
|
|
|
+ projectIds:proArr.join(",")
|
|
|
+ },res=>{
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.addTaskGroupDig=false
|
|
|
+ this.batchAddTaskGroupName=null
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err=>{
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //批量设置分组负责人
|
|
|
+ setGroupIncharger(){
|
|
|
+ let proArr = []
|
|
|
+ for(let i=0;i<this.checkedProjectArr.length;i++){
|
|
|
+ proArr.push(this.checkedProjectArr[i].id)
|
|
|
+ }
|
|
|
+ if(this.checkedProjectArr.length == 0){
|
|
|
+ this.$message(this.$t('defaultText.pleaseSelectSnItem'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.addTaskGroupInchargerDig=true
|
|
|
+ this.http.post("/task-group/getAllHadGroup",{
|
|
|
+ projectIds:proArr.join(",")
|
|
|
+ },res=>{
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.hasSetGroupList=res.data
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err=>{
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ batchSetGroupIncharger(){
|
|
|
+ if(!this.hasSetGroupName){
|
|
|
+ this.$message({
|
|
|
+ message: '请选择任务分组',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.hasSetGroupInchargerId){
|
|
|
+ this.$message({
|
|
|
+ message: '请选择分组负责人',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let proArr = []
|
|
|
+ for(let i=0;i<this.checkedProjectArr.length;i++){
|
|
|
+ proArr.push(this.checkedProjectArr[i].id)
|
|
|
+ }
|
|
|
+ this.http.post("/task-group/batchSetGroupIncharger",{
|
|
|
+ taskGroupName:this.hasSetGroupName,
|
|
|
+ projectIds:proArr.join(","),
|
|
|
+ inchargerId:this.hasSetGroupInchargerId
|
|
|
+ },res=>{
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.addTaskGroupInchargerDig=false
|
|
|
+ this.hasSetGroupInchargerId=null
|
|
|
+ this.hasSetGroupName=null
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err=>{
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 批量添加分组参与人员
|
|
|
addGroupPerson(){
|
|
|
let proArr = []
|