|
@@ -87,8 +87,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <!-- <span v-if="multipleSelection">{{multipleSelection}}</span> -->
|
|
|
- <i v-if="checkList.filter(item=>item==scope.row.id)[0]" class="el-icon-plus" @click="premissVisibale">添加</i>
|
|
|
+ <span v-if="scope.row.pdata">{{scope.row.pdata}}</span>
|
|
|
+ <i v-if="checkList.filter(item=>item==scope.row.id)[0]" class="el-icon-plus" @click="premissVisibale(scope.row)">添加</i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -116,9 +116,8 @@
|
|
|
<el-dialog :title="permissTitle" :visible.sync="permissVisible" width="1100px" :before-close="premissClose" custom-class="permiss">
|
|
|
<div style="height: 500px;">
|
|
|
<DataPermission
|
|
|
- :functionId="functionId"
|
|
|
- :functionName="functionName"
|
|
|
- :functionInfo="functionInfo"
|
|
|
+ :fun="fun"
|
|
|
+
|
|
|
@getPremissData="getPremissData"
|
|
|
>
|
|
|
</DataPermission>
|
|
@@ -142,7 +141,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- functionId: '',
|
|
|
+ fun: '',
|
|
|
functionName: '',
|
|
|
functionInfo: [],
|
|
|
checkList:[],
|
|
@@ -160,6 +159,7 @@ export default {
|
|
|
dataList: [],
|
|
|
multipleSelection: [],
|
|
|
expands:[],
|
|
|
+ pdata:'',
|
|
|
queryParams: {
|
|
|
size: 10,
|
|
|
current: 1,
|
|
@@ -188,20 +188,33 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getPremissData(id, name, data) {
|
|
|
- if (this.functionInfo.length === 0) {
|
|
|
- this.functionInfo.push({
|
|
|
- 'functionId': id,
|
|
|
- 'functionName': name,
|
|
|
- 'dataPremiss': data
|
|
|
- })
|
|
|
- }
|
|
|
- else if (this.functionInfo.length > 0) {
|
|
|
- console.log(this.functionInfo.some(item => item.dataPremiss === data))
|
|
|
- }
|
|
|
- console.log(this.functionInfo)
|
|
|
+ console.log(id, name, data)
|
|
|
+ // for(var i = 0; i<this.functionList.length;i++){
|
|
|
+ // for(var j=0;j<this.functionList[i].children.length;j++){
|
|
|
+ // if(this.functionList[i].children[j].id==id){
|
|
|
+ // this.functionList[i].children[j].pdata = data.name
|
|
|
+ // }else{
|
|
|
+ // if(this.functionList[i].children[j].hasOwnProperty('children')){
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ this.pdata=data
|
|
|
+ // if (this.functionInfo.length === 0) {
|
|
|
+ // this.functionInfo.push({
|
|
|
+ // 'functionId': id,
|
|
|
+ // 'functionName': name,
|
|
|
+ // 'dataPremiss': data
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // else if (this.functionInfo.length > 0) {
|
|
|
+ // console.log(this.functionInfo.some(item => item.dataPremiss === data))
|
|
|
+ // }
|
|
|
+ // console.log(this.functionInfo)
|
|
|
},
|
|
|
getFunInfo(val) {
|
|
|
- this.functionId = val.id
|
|
|
+ this.fun = val
|
|
|
this.functionName = val.name
|
|
|
},
|
|
|
handleCheckedCitiesChange(value) {
|
|
@@ -239,6 +252,8 @@ export default {
|
|
|
this.visible = false
|
|
|
},
|
|
|
premissSubmit() {
|
|
|
+ this.fun.pdata = this.pdata.name
|
|
|
+
|
|
|
console.log('')
|
|
|
},
|
|
|
premissClose() {
|