|
@@ -204,7 +204,6 @@ export default {
|
|
|
premissSubmit() {
|
|
|
if(this.permissionData.filter(item=>item.functionId == this.pdata.functionId)[0]){
|
|
|
if(this.pdata.data){
|
|
|
- // console.log(11)
|
|
|
this.permissionData.filter(item=>item.functionId == this.pdata.functionId)[0].data = this.pdata.data
|
|
|
}else{
|
|
|
// console.log(this.permissionData)
|
|
@@ -218,26 +217,19 @@ export default {
|
|
|
if (this.pdata.data) {
|
|
|
this.permissionData.push(this.pdata)
|
|
|
}
|
|
|
- // else {
|
|
|
- // this.permissionData.pop()
|
|
|
- // }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- console.log(this.permissionData)
|
|
|
+
|
|
|
this.permissVisible=false
|
|
|
},
|
|
|
getFunInfo(val) {
|
|
|
- console.log(val)
|
|
|
if(!this.checkList.includes(val)){
|
|
|
var index = this.permissionData.findIndex((item) => {
|
|
|
return item.functionId == val;
|
|
|
});
|
|
|
- console.log(index)
|
|
|
if (index!=-1) {
|
|
|
- // console.log(1121)
|
|
|
this.permissionData.splice(index,1)
|
|
|
}
|
|
|
- console.log(this.permissionData)
|
|
|
}else{
|
|
|
this.permissionData.push({
|
|
|
functionId:val,
|
|
@@ -275,7 +267,7 @@ export default {
|
|
|
this.checkList.push(row.permissionData[i].functionId)
|
|
|
}
|
|
|
this.permissionData = row.permissionData
|
|
|
- console.log(row)
|
|
|
+
|
|
|
},
|
|
|
addpremissVisibale(val) {
|
|
|
this.permissTitle = '添加数据权限管理'
|
|
@@ -295,7 +287,6 @@ export default {
|
|
|
|
|
|
premissClose() {
|
|
|
this.permissVisible = false
|
|
|
- console.log(this.functionId)
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.queryParams.current = val;
|
|
@@ -323,11 +314,6 @@ export default {
|
|
|
if (valid) {
|
|
|
// this.ruleForm.functions=[]
|
|
|
this.ruleForm.permissionData = this.permissionData
|
|
|
- // for(var i =0;i<this.ruleForm.function.length;i++){
|
|
|
- // var a =this.ruleForm.function[i].join(',')
|
|
|
- // this.ruleForm.functions.push(a)
|
|
|
- // }
|
|
|
- console.log(this.ruleForm)
|
|
|
this.btnLoading = true
|
|
|
if (this.ruleForm.id) {
|
|
|
this.$api.editRole(this.ruleForm).then(response => {
|