|
@@ -843,10 +843,25 @@
|
|
|
|
|
|
</el-table>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="default" :disabled="subProjectList.length == 0" @click="forSubProjectlist = list.filter(a=>a.id != currentProject.id);copySubPListVisible = true;" style="align:left;">复制到其他项目</el-button>
|
|
|
<el-button type="primary" @click="subProjectVisible = false" >{{ $t('Shutdown') }}</el-button>
|
|
|
<el-button type="primary" @click="addNewSubProject()" >{{ $t('addsubitems') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!--选择项目弹出框-->
|
|
|
+ <el-dialog title="选择要复制到的目标项目" v-if="copySubPListVisible" :visible.sync="copySubPListVisible" :close-on-click-modal="false" customClass="customWidth" width="700px">
|
|
|
+ <el-table ref="projectForSubCopy" border @cell-mouse-enter="hoverCall" @cell-mouse-leave="handCall" :cell-class-name="tableCellClassName" :data="forSubProjectlist" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedProlistForSub" @sort-change="tableSort">
|
|
|
+ <el-table-column type="selection" width="60" >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="projectCode" :label="$t('Itemno')" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="projectName" :label="$t('headerTop.projectName')" min-width="250">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click.native="copySubPListVisible = false">{{ $t('btn.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="submitCopySubProject()" >{{ $t('btn.submit') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
|
<!-- 新增子项目弹出框 -->
|
|
@@ -1378,6 +1393,8 @@ a {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ forSubProjectlist:[],
|
|
|
+ copySubPListVisible: false,
|
|
|
projectManagerEdit: false,
|
|
|
canOnlyModParticipator: false,
|
|
|
curChangeProject:null,
|
|
@@ -1499,7 +1516,7 @@ a {
|
|
|
},
|
|
|
statusClf:null,
|
|
|
permissionsObj: {},
|
|
|
-
|
|
|
+ checkedPForSubArr:[],
|
|
|
checkedProjectArr: [],
|
|
|
checkedWuduDialog: false,
|
|
|
checkedWuduArr: [],
|
|
@@ -1609,6 +1626,41 @@ a {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ submitCopySubProject() {
|
|
|
+ //获取选中的项目
|
|
|
+ if (this.checkedPForSubArr.length == 0) {
|
|
|
+ this.$message(this.$t('defaultText.pleaseSelectSnItem'))
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ var targetPIds = JSON.stringify(this.checkedPForSubArr.map((a)=>{return a.id}));
|
|
|
+ //http post请求提交
|
|
|
+ this.http.post('/sub-project/copyToProjects', {
|
|
|
+ projectId: this.currentProject.id,
|
|
|
+ targetProjectIds: targetPIds,
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.copySubPListVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
confirmChangeStage() {
|
|
|
let currentStageName = ''
|
|
|
for(var i in this.phaseList) {
|
|
@@ -2039,6 +2091,9 @@ a {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ checkedProlistForSub(e) {
|
|
|
+ this.checkedPForSubArr = e;
|
|
|
+ },
|
|
|
// 批量修改自定义维度
|
|
|
checkedWudulist(e){
|
|
|
// console.log(e);
|