|
@@ -71,8 +71,9 @@
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<!--列表-->
|
|
<!--列表-->
|
|
- <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
|
- <el-table-column type="index" width="60">
|
|
|
|
|
|
+ <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
|
|
|
|
+ <el-table-column type="selection" width="60" v-if="user.timeType.customDegreeActive && permissions.projectManagement"></el-table-column>
|
|
|
|
+ <el-table-column type="index" width="60" v-else>
|
|
<template slot-scope="scope" >
|
|
<template slot-scope="scope" >
|
|
{{scope.$index+1+(page-1)*size}}
|
|
{{scope.$index+1+(page-1)*size}}
|
|
</template>
|
|
</template>
|
|
@@ -171,6 +172,10 @@
|
|
|
|
|
|
<!--工具条-->
|
|
<!--工具条-->
|
|
<el-col :span="24" class="toolbar">
|
|
<el-col :span="24" class="toolbar">
|
|
|
|
+ <template v-if="user.timeType.customDegreeActive && permissions.projectManagement">
|
|
|
|
+ <el-button size="small" @click="batchSetWudulistBtn1">取消</el-button>
|
|
|
|
+ <el-button size="small" type="primary" @click="batchSetWudulistBtn2">批量设置{{user.timeType.customDegreeName}}</el-button>
|
|
|
|
+ </template>
|
|
<el-pagination
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
@@ -545,13 +550,19 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- <el-dialog title="提示" v-if="deleteReconfirmDialog" :visible.sync="deleteReconfirmDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
|
- <p>{{deleteAlertMsg}}</p>
|
|
|
|
|
|
+ <el-dialog title="批量修改" :visible.sync="checkedWuduDialog" v-if="checkedWuduDialog" width="40%">
|
|
|
|
+ <el-form model="" label-width="20%">
|
|
|
|
+ <el-form-item :label="'设置' + user.timeType.customDegreeName">
|
|
|
|
+ <el-select v-model="checkedWuduArr" value-key="id" :placeholder="'请选择' + user.timeType.customDegreeName" multiple style="width: 100%">
|
|
|
|
+ <el-option v-for="item in ause" :key="item.id" :label="item.name" :value="item"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click="deleteReconfirmDialog = false" >取消</el-button>
|
|
|
|
- <el-button type="primary" @click="forceDeletePro" >确认并删除</el-button>
|
|
|
|
|
|
+ <el-button @click="checkedWuduDialog = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="batchSetWudulistBtn3">确定</el-button>
|
|
</div>
|
|
</div>
|
|
- </el-dialog> -->
|
|
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
<style scoped>
|
|
<style scoped>
|
|
@@ -672,6 +683,10 @@ a {
|
|
addClf:{name:'',id:''},
|
|
addClf:{name:'',id:''},
|
|
statusClf:null,
|
|
statusClf:null,
|
|
permissionsObj: {},
|
|
permissionsObj: {},
|
|
|
|
+
|
|
|
|
+ checkedProjectArr: [],
|
|
|
|
+ checkedWuduDialog: false,
|
|
|
|
+ checkedWuduArr: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
// 过滤器
|
|
// 过滤器
|
|
@@ -701,6 +716,66 @@ a {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 批量修改自定义维度
|
|
|
|
+ checkedWudulist(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ this.checkedProjectArr = e
|
|
|
|
+ },
|
|
|
|
+ batchSetWudulistBtn1(){
|
|
|
|
+ this.$refs.projectlistOfWudulist.clearSelection()
|
|
|
|
+ this.checkedWuduArr = []
|
|
|
|
+ },
|
|
|
|
+ batchSetWudulistBtn2(){
|
|
|
|
+ if(this.checkedProjectArr.length == 0){
|
|
|
|
+ this.$message('请选择项目')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.checkedWuduDialog = true
|
|
|
|
+ },
|
|
|
|
+ batchSetWudulistBtn3(){
|
|
|
|
+ if(this.checkedWuduArr.length == 0){
|
|
|
|
+ this.$message('请选择' + this.user.timeType.customDegreeName)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ let projectIds = []
|
|
|
|
+ for(let i=0; i<this.checkedProjectArr.length; i++){
|
|
|
|
+ projectIds.push(this.checkedProjectArr[i].id)
|
|
|
|
+ }
|
|
|
|
+ let degreeIds = []
|
|
|
|
+ let degreeNames = []
|
|
|
|
+ for(let s=0; s<this.checkedWuduArr.length; s++){
|
|
|
|
+ degreeIds.push(this.checkedWuduArr[s].id)
|
|
|
|
+ degreeNames.push(this.checkedWuduArr[s].name)
|
|
|
|
+ }
|
|
|
|
+ this.http.post('/project/saveBatchAccoDegrees',{
|
|
|
|
+ ids: JSON.stringify(projectIds),
|
|
|
|
+ associateDegrees: degreeIds.toString(),
|
|
|
|
+ associateDegreeNames: degreeNames.toString()
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.checkedWuduDialog = false
|
|
|
|
+ this.batchSetWudulistBtn1()
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '设置成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ this.getList()
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
filterNode(value, data) {
|
|
filterNode(value, data) {
|
|
if (!value) return true;
|
|
if (!value) return true;
|
|
return data.label.indexOf(value) !== -1;
|
|
return data.label.indexOf(value) !== -1;
|