|
@@ -6,7 +6,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="" size="small" @click="getList">查询</el-button>
|
|
|
- <el-button type="primary" size="small" @click="handleAdd(0)">新增</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="handleAdd(func.fun.id)">新增</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table
|
|
@@ -38,8 +38,8 @@
|
|
|
</el-table>
|
|
|
<el-dialog :title="title" :visible.sync="visible" width="900px" :before-close="close" :append-to-body="true">
|
|
|
<el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" label-position="left">
|
|
|
- <el-form-item label="所属功能" prop="function">
|
|
|
- <el-input v-model="ruleForm.function" size="small" :readonly="true" placeholder="请输入所属功能"></el-input>
|
|
|
+ <el-form-item label="所属功能" prop="func">
|
|
|
+ <el-input v-model="func.fun.name" size="small" :readonly="true" placeholder="请输入所属功能"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="数据权限名称" prop="function">
|
|
|
<el-input v-model="ruleForm.name" size="small" placeholder="请输入数据权限名称"></el-input>
|
|
@@ -232,14 +232,14 @@ export default {
|
|
|
mounted() {
|
|
|
this.getList()
|
|
|
this.getFunctionList()
|
|
|
- console.log(this.fun)
|
|
|
+ // console.log(this.fun)
|
|
|
// this.func=this.fun
|
|
|
// this.funId = 6
|
|
|
// this.$emit('getPremissData', this.funId)
|
|
|
},
|
|
|
computed: {
|
|
|
dictionaries() {
|
|
|
- console.log(this.$store.state.admin.dictionaries)
|
|
|
+ // console.log(this.$store.state.admin.dictionaries)
|
|
|
return this.$store.state.admin.dictionaries
|
|
|
},
|
|
|
userinfo() {
|
|
@@ -247,10 +247,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
|
- fun(val,oldval){
|
|
|
- console.log(val,oldval)
|
|
|
+ fun(val){
|
|
|
+ // console.log(val)
|
|
|
// this.$refs.dataTable.clearSelection()
|
|
|
- this.func = val
|
|
|
+ this.func = val
|
|
|
this.getList()
|
|
|
|
|
|
},
|
|
@@ -287,7 +287,7 @@ export default {
|
|
|
}
|
|
|
this.multipleSelection = selection[0]
|
|
|
this.$emit('getPremissData', this.fun.fun.id, this.fun.fun.name,this.multipleSelection)
|
|
|
- console.log(this.multipleSelection)
|
|
|
+ // console.log(this.multipleSelection)
|
|
|
|
|
|
},
|
|
|
// getDataList(){
|
|
@@ -323,7 +323,7 @@ export default {
|
|
|
a[i].logicOpr = this.list[i].logicOpr
|
|
|
}
|
|
|
}
|
|
|
- console.log(a)
|
|
|
+ // console.log(a)
|
|
|
this.ruleForm.rule = JSON.stringify(a[a.length-1])
|
|
|
},
|
|
|
TreeToList(data){
|
|
@@ -375,7 +375,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
s(i)
|
|
|
- console.log(a)
|
|
|
+ // console.log(a)
|
|
|
this.list= a
|
|
|
},
|
|
|
getNode(node){
|
|
@@ -387,8 +387,8 @@ export default {
|
|
|
label: node.name,
|
|
|
}
|
|
|
},
|
|
|
- handleAdd(updepartmentId,row) {
|
|
|
- // console.log(row)
|
|
|
+ handleAdd(id) {
|
|
|
+ // console.log(id)
|
|
|
this.title = '新增数据权限'
|
|
|
this.visible = true
|
|
|
this.ruleForm={}
|
|
@@ -416,7 +416,7 @@ export default {
|
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
if(this.func.permission){
|
|
|
- console.log(this.func)
|
|
|
+ // console.log(this.func)
|
|
|
// this.toggleSelection([this.func.permission])
|
|
|
this.$refs.dataTable.toggleRowSelection(this.tableData.find(item=>{
|
|
|
return this.func.permission.id == item.id;
|
|
@@ -450,7 +450,7 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
this.ruleForm.tenant=this.userinfo.tenantId
|
|
|
- console.log(this.ruleForm)
|
|
|
+ // console.log(this.ruleForm)
|
|
|
this.$api.addData(this.ruleForm).then(response => {
|
|
|
this.$message.success('新增成功')
|
|
|
this.btnLoading = false
|
|
@@ -461,7 +461,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
- console.log('error submit!!');
|
|
|
+ // console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|