|
|
@@ -7,9 +7,10 @@
|
|
|
<el-col :span="11" style="margin-right:16px">
|
|
|
<div class="handle">
|
|
|
<search @searchActive="searchActive" @clearData="clearData"></search>
|
|
|
- <el-select size="small" clearable @clear="clearCategory" v-model="power.content.where.systemclientname" :placeholder="$t(`筛选端口`)" @change="categoryChange()">
|
|
|
+ <el-select class="inline-16" size="small" clearable @clear="clearCategory" v-model="power.content.where.systemclientname" :placeholder="$t(`筛选端口`)" @change="categoryChange()">
|
|
|
<el-option v-for="(item,index) in selectList" :label="$t(item)" :value="item" :key="index"></el-option>
|
|
|
</el-select>
|
|
|
+<!-- <auth :new_set="true" :roleid="power.content.roleid" @setAuth="searchActive"></auth>-->
|
|
|
</div>
|
|
|
<table-layout :layout="tablecols" :data="powerList" @rowClick="rowClick"></table-layout>
|
|
|
<div class="page">
|
|
|
@@ -20,7 +21,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-row>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="12">
|
|
|
<div class="power-block">
|
|
|
<div class="title" @click="aaa = true">{{$t(`功能`)}}</div>
|
|
|
<el-checkbox-group v-model="checkList" @change="groupChange" class="padd">
|
|
|
@@ -36,16 +37,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
+ <el-col :span="12">
|
|
|
<div class="power-block">
|
|
|
<p class="title">{{$t(`隐藏字段`)}}</p>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <div class="power-block">
|
|
|
- <p class="title">{{$t('基础数据')}}</p>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
+<!-- <el-col :span="8">-->
|
|
|
+<!-- <div class="power-block">-->
|
|
|
+<!-- <p class="title">{{$t('基础数据')}}</p>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </el-col>-->
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -56,6 +57,7 @@
|
|
|
import search from '@/components/search/index'
|
|
|
import pagination from '@/components/pagination/Pagination'
|
|
|
import tableLayout from '@/components/dynamic-table/index'
|
|
|
+import auth from '@/HManagement/roleManage/modules/auth_list'
|
|
|
import { log } from '@antv/g2plot/lib/utils';
|
|
|
export default {
|
|
|
name: 'RolePowerSelect',
|
|
|
@@ -68,7 +70,7 @@ export default {
|
|
|
"method": "query_appselect_web",
|
|
|
"content": {
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 10,
|
|
|
+ "pageSize": 50,
|
|
|
"roleid": parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')).roleid,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
@@ -77,8 +79,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//当前选中的row
|
|
|
- currentItem: 0,
|
|
|
- total: 2,
|
|
|
+ // currentItem: 0,
|
|
|
+ total: 0,
|
|
|
//应用表数据
|
|
|
powerList: [],
|
|
|
//端口分类列表
|
|
|
@@ -96,7 +98,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
props: [],
|
|
|
- components: { search, pagination, tableLayout },
|
|
|
+ components: { search, pagination, tableLayout, auth },
|
|
|
computed: {
|
|
|
//是否选中
|
|
|
isCheck () {
|
|
|
@@ -117,11 +119,11 @@ export default {
|
|
|
watch: {
|
|
|
},
|
|
|
created () {
|
|
|
- this.getAllHavePower()
|
|
|
+ // this.getAllHavePower()
|
|
|
},
|
|
|
mounted () {
|
|
|
this.tablecols = this.tool.tabelCol('roleManagent').roleTable.tablecols
|
|
|
-
|
|
|
+ this.getAllHavePower()
|
|
|
},
|
|
|
methods: {
|
|
|
//当编辑逻辑时 拉取所有数据 储存所有已授权数据
|
|
|
@@ -137,7 +139,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- let data = res.data.filter(item => item.optionids.length > 0)
|
|
|
+ console.log(res.data,'数据1111')
|
|
|
+ let data = res.data && res.data.length > 0 ? res.data.filter(item => item.optionids.length > 0):[]
|
|
|
let result
|
|
|
this.tempPowerList.forEach((item, index) => {
|
|
|
result = data.find(item2 => item2.systemappid == item.systemappid)
|
|
|
@@ -151,14 +154,21 @@ export default {
|
|
|
//获取授权列表
|
|
|
async getPowerList () {
|
|
|
let res = await this.$api.requested(this.power)
|
|
|
- this.selectList = res.tips.client
|
|
|
- this.powerList = res.data
|
|
|
- this.handleHavePower()
|
|
|
- this.calcHavePower(this.powerList)
|
|
|
- this.currentItem = this.powerList[0]
|
|
|
- this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
|
|
|
- this.refreshItem(this)
|
|
|
- this.total = res.total
|
|
|
+ if (res.code == 0){
|
|
|
+ this.tool.showMessage(res,()=>{})
|
|
|
+ }else {
|
|
|
+ if (res.data && res.data.length > 0){
|
|
|
+ this.selectList = res.tips.client
|
|
|
+ this.powerList = res.data
|
|
|
+ this.handleHavePower()
|
|
|
+ this.calcHavePower(this.powerList)
|
|
|
+ this.currentItem = this.powerList[0]
|
|
|
+ this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
|
|
|
+ this.refreshItem(this)
|
|
|
+ this.total = res.total
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.powerList,'输出数据powerList')
|
|
|
},
|
|
|
//抓取所有操作过的数据
|
|
|
handleHavePower () {
|