|
@@ -389,8 +389,34 @@
|
|
|
|
|
|
<!--工具条-->
|
|
<!--工具条-->
|
|
<el-col :span="24" class="toolbar">
|
|
<el-col :span="24" class="toolbar">
|
|
- <el-button size="small" @click="batchSetWudulistBtn1" v-if="(user.timeType.customDegreeActive || user.company.packageProject) && (showColumnWidth != '0' || permissions.projectManagement)">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
- <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
|
|
+ <el-button size="small" @click="batchSetWudulistBtn1" v-if="(user.timeType.customDegreeActive || user.company.packageProject) && (showColumnWidth != '0' || permissions.projectManagement)">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
+ <el-dropdown>
|
|
|
|
+ <el-button type="primary" size="small">
|
|
|
|
+ {{ $t('piLiangCaoZuo') }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="batchSetWudulistBtn2(true)">{{ $t('volumeset') }} {{user.timeType.customDegreeName}}</el-button></el-dropdown-item>
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="batchSetWudulistBtn2(false)">{{ $t('pi-liang-tian-jia') }} {{user.timeType.customDegreeName}}</el-button></el-dropdown-item>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="addTaskGroup()" >{{ $t('piLiangZengJiaRenWuFenZu') }}</el-button></el-dropdown-item>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="setGroupIncharger()" >{{ $t('piLiangSheZhiFenZuFuZeRen') }}</el-button></el-dropdown-item>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="user.company.packageProject && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="addGroupPerson()" :loading="addGroupPersonBtnLoading">{{ $t('groupparticipantsinbatches') }}</el-button></el-dropdown-item>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="(showColumnWidth != '0' || permissions.projectManagement)">
|
|
|
|
+ <el-dropdown-item><el-button type="text" @click="addProPreson()">{{ $t('projectparticipantsinbatches') }}</el-button></el-dropdown-item>
|
|
|
|
+ <el-dropdown-item><el-button type="text" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button></el-dropdown-item>
|
|
|
|
+ <el-dropdown-item><el-button type="text" v-if="user.company.packageProject" @click="batchProjectStage()">{{ $t('piLiangXiuGaiXiangMuJieDuan') }}</el-button></el-dropdown-item>
|
|
|
|
+ <el-dropdown-item><el-button type="text" v-if="user.roleName=($t('role.superAdministrator'))" @click="batchDelete()" :loading="isDeleting">{{ $t('Batchdelete') }}</el-button></el-dropdown-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ <!-- <template v-if="user.timeType.customDegreeActive && (showColumnWidth != '0' || permissions.projectManagement)">
|
|
<el-button size="small" type="primary" @click="batchSetWudulistBtn2(true)">{{ $t('volumeset') }} {{user.timeType.customDegreeName}}</el-button>
|
|
<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>
|
|
<el-button size="small" type="primary" @click="batchSetWudulistBtn2(false)">{{ $t('pi-liang-tian-jia') }} {{user.timeType.customDegreeName}}</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -408,6 +434,9 @@
|
|
<el-button size="small" type="primary" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button>
|
|
<el-button size="small" type="primary" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button>
|
|
<el-button size="small" type="primary" v-if="user.roleName=($t('role.superAdministrator'))" @click="batchDelete()" :loading="isDeleting">{{ $t('Batchdelete') }}</el-button>
|
|
<el-button size="small" type="primary" v-if="user.roleName=($t('role.superAdministrator'))" @click="batchDelete()" :loading="isDeleting">{{ $t('Batchdelete') }}</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-if="showColumnWidth != '0' && user.company.packageProject == 1">
|
|
|
|
+ <el-button size="small" type="primary" @click="batchProjectStage()">{{ $t('piLiangXiuGaiXiangMuJieDuan') }}</el-button>
|
|
|
|
+ </template> -->
|
|
|
|
|
|
<el-pagination :key="projectListPageComponentKey"
|
|
<el-pagination :key="projectListPageComponentKey"
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
@@ -1431,8 +1460,8 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog :title="$t('xiu-gai-xiang-mu-dang-qian-jie-duan')" v-if="changeStageDialogVisible" :visible.sync="changeStageDialogVisible" width="300px">
|
|
|
|
- <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="margin: 0 auto;">
|
|
|
|
|
|
+ <el-dialog :title="$t('xiu-gai-xiang-mu-dang-qian-jie-duan')" v-if="changeStageDialogVisible" :visible.sync="changeStageDialogVisible" width="500px">
|
|
|
|
+ <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="width: 100%;">
|
|
<el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
|
|
<el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<div slot="footer" class="dialog-footer" style="text-algin:center;">
|
|
<div slot="footer" class="dialog-footer" style="text-algin:center;">
|
|
@@ -1440,6 +1469,15 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <el-dialog :title="$t('piLiangXiuGaiXiangMuJieDuan')" v-if="batchChangeStageDialogVisible" :visible.sync="batchChangeStageDialogVisible" width="500px">
|
|
|
|
+ <el-select v-model="curChangeProject.curStageId" filterable :placeholder="$t('pleaseselecttheprojectphase')" style="width: 100%">
|
|
|
|
+ <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <div slot="footer" class="dialog-footer" style="text-algin:center;">
|
|
|
|
+ <el-button type="primary" @click="editBatchProjectStage()" :loading="batchChangeStageLoading">{{ $t('btn.determine') }}</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<el-dialog append-to-body :title="$t('projectimportresult')" v-if="showImportResult" :visible.sync="showImportResult" width="40%">
|
|
<el-dialog append-to-body :title="$t('projectimportresult')" v-if="showImportResult" :visible.sync="showImportResult" width="40%">
|
|
<div >
|
|
<div >
|
|
{{importResultMsg}}
|
|
{{importResultMsg}}
|
|
@@ -2044,6 +2082,8 @@ a {
|
|
changeParticipation:false,
|
|
changeParticipation:false,
|
|
participatorVisible: false,
|
|
participatorVisible: false,
|
|
participatorValue: [],
|
|
participatorValue: [],
|
|
|
|
+ batchChangeStageDialogVisible: false,
|
|
|
|
+ batchChangeStageLoading: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 过滤器
|
|
// 过滤器
|
|
@@ -2222,6 +2262,55 @@ a {
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ // 批量修改项目阶段
|
|
|
|
+ batchProjectStage() {
|
|
|
|
+ if (this.checkedProjectArr.length == 0) {
|
|
|
|
+ this.$message(this.$t('defaultText.pleaseSelectSnItem'))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const projectManagement = this.permissions.projectManagement
|
|
|
|
+ const userId = this.user.id
|
|
|
|
+ const list = this.checkedProjectArr.filter((item) => {
|
|
|
|
+ return item.inchargerId != userId && item.creatorId != userId
|
|
|
|
+ })
|
|
|
|
+ if(!projectManagement && list.length > 0) {
|
|
|
|
+ const promptText = list.map(item => item.projectName)
|
|
|
|
+ this.$message(`${this.$t('other.project')}[${promptText.join(',')}]${this.$t('buShuYuNingDeQuanXianNei')}`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.curChangeProject = { projectId: '', curStageId: '' }
|
|
|
|
+ this.batchChangeStageDialogVisible = true
|
|
|
|
+ },
|
|
|
|
+ editBatchProjectStage() {
|
|
|
|
+ const projectIdList = this.checkedProjectArr.map(a => a.id)
|
|
|
|
+ const stageId = this.curChangeProject.curStageId
|
|
|
|
+ const stage = this.phaseList.find(item => item.id == stageId)
|
|
|
|
+ this.batchChangeStageLoading = true
|
|
|
|
+ this.http.post('/project/batchChangeStage', {
|
|
|
|
+ projectIdArray: JSON.stringify(projectIdList),
|
|
|
|
+ stageId: stageId,
|
|
|
|
+ stageName: stage.projectStageName
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ this.batchChangeStageLoading = false
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.getList()
|
|
|
|
+ this.batchChangeStageDialogVisible = false;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.batchChangeStageLoading = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
confirmChangeStage() {
|
|
confirmChangeStage() {
|
|
let currentStageName = ''
|
|
let currentStageName = ''
|
|
for(var i in this.phaseList) {
|
|
for(var i in this.phaseList) {
|
|
@@ -2778,6 +2867,7 @@ a {
|
|
}
|
|
}
|
|
this.addTaskGroupDig=true
|
|
this.addTaskGroupDig=true
|
|
},
|
|
},
|
|
|
|
+
|
|
// 重新定义了 addGroup 方法
|
|
// 重新定义了 addGroup 方法
|
|
addGroup(formName) {
|
|
addGroup(formName) {
|
|
// return
|
|
// return
|