|
@@ -1,37 +1,40 @@
|
|
|
<template>
|
|
|
<view class="padding">
|
|
|
- <view style="width:100%;overflow:auto; height: calc(100vh - 156px);" >
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <uni-table stripe emptyText="暂无更多数据" >
|
|
|
- <!-- 表头行 -->
|
|
|
- <uni-tr>
|
|
|
- <uni-th align="center" style="width:200rpx">人员名称</uni-th>
|
|
|
- <uni-th align="center">联系方式</uni-th>
|
|
|
- <uni-th align="center">所在单位</uni-th>
|
|
|
- <uni-th align="center" width="100">角色权限</uni-th>
|
|
|
- </uni-tr>
|
|
|
- <!-- 表格数据行 -->
|
|
|
- <uni-tr v-for="(item,index) in getData" :key="index">
|
|
|
- <uni-td align="center">{{item.username}}</uni-td>
|
|
|
- <uni-td align="center">{{item.phone}}</uni-td>
|
|
|
- <uni-td align="center">{{item.owner_name}}</uni-td>
|
|
|
+ <view style="width:100%;overflow:auto; height: calc(100vh - 156px);">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <uni-table stripe emptyText="暂无更多数据">
|
|
|
+ <!-- 表头行 -->
|
|
|
+ <uni-tr>
|
|
|
+ <uni-th align="center" style="width:200rpx">人员名称</uni-th>
|
|
|
+ <uni-th align="center">联系方式</uni-th>
|
|
|
+ <uni-th align="center">所在单位</uni-th>
|
|
|
+ <uni-th align="center" width="100">角色权限</uni-th>
|
|
|
+ </uni-tr>
|
|
|
+ <!-- 表格数据行 -->
|
|
|
+ <uni-tr v-for="(item,index) in getData" :key="index">
|
|
|
+ <uni-td align="center">{{item.username}}</uni-td>
|
|
|
+ <uni-td align="center">{{item.phone}}</uni-td>
|
|
|
+ <uni-td align="center">{{item.owner_name}}</uni-td>
|
|
|
<uni-td align="center">{{item.statusid}}</uni-td>
|
|
|
- </uni-tr>
|
|
|
-
|
|
|
+ </uni-tr>
|
|
|
+
|
|
|
</uni-table>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<view class="btn-area submitBottomBtn bg-white">
|
|
|
- <view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
|
|
|
+ <view class="uni-pagination-box">
|
|
|
+ <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
|
|
|
+ @change="change" />
|
|
|
+ </view>
|
|
|
<button class="bg-blue round " @click="goAddPer()">新 增</button>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -39,7 +42,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- getData:[],
|
|
|
+ getData: [],
|
|
|
// 每页数据量
|
|
|
pageSize: 100,
|
|
|
// 当前页
|
|
@@ -49,64 +52,78 @@
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
|
- onShow:function(option){
|
|
|
- this.getDataList({'company_code':uni.getStorageSync('selectedCode'),'page':this.pageCurrent,"number":this.pageSize})
|
|
|
+ onShow: function(option) {
|
|
|
+ this.getDataList({
|
|
|
+ 'company_code': uni.getStorageSync('selectedCode'),
|
|
|
+ 'page': this.pageCurrent,
|
|
|
+ "number": this.pageSize
|
|
|
+ })
|
|
|
},
|
|
|
- onLoad:function(option){
|
|
|
- this.getDataList({'company_code':uni.getStorageSync('selectedCode'),'page':this.pageCurrent,"number":this.pageSize})
|
|
|
+ onLoad: function(option) {
|
|
|
+ this.getDataList({
|
|
|
+ 'company_code': uni.getStorageSync('selectedCode'),
|
|
|
+ 'page': this.pageCurrent,
|
|
|
+ "number": this.pageSize
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
// 列表数据请求
|
|
|
async getDataList(params = {}) {
|
|
|
const res = await this.$myRequest({
|
|
|
url: 'PermissionBinding/getPermissionBindingList',
|
|
|
- data:params,
|
|
|
+ data: params,
|
|
|
showLoading: true
|
|
|
})
|
|
|
- this.getData=res.data.data;
|
|
|
+ this.getData = res.data.data;
|
|
|
console.log(res.data.data[0])
|
|
|
console.log(res.data.data.length)
|
|
|
console.log(this.getData.length);
|
|
|
- this.total=res.data.total;
|
|
|
+ this.total = res.data.total;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 分页触发
|
|
|
change(e) {
|
|
|
console.log(e)
|
|
|
// this.$refs.table.clearSelection()
|
|
|
// this.selectedIndexs.length = 0
|
|
|
- this.getDataList({'company_code':uni.getStorageSync('selectedCode'),'page':e.current,"number":this.pageSize})
|
|
|
+ this.getDataList({
|
|
|
+ 'company_code': uni.getStorageSync('selectedCode'),
|
|
|
+ 'page': e.current,
|
|
|
+ "number": this.pageSize
|
|
|
+ })
|
|
|
// this.getDataList(e.current)
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
goAddPer() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/accountManage/perAdd/perAdd',
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- /deep/ .uni-pagination__btn{
|
|
|
- background-color:rgba(0,0,0,0)!important
|
|
|
- }
|
|
|
- /deep/ .uni-pagination-box{
|
|
|
- background:#fff;
|
|
|
- border-top:1px solid #ddd
|
|
|
+ /deep/ .uni-pagination__btn {
|
|
|
+ background-color: rgba(0, 0, 0, 0) !important
|
|
|
}
|
|
|
- .submitBottomBtn{
|
|
|
- padding:0px 32rpx 32rpx 32rpx
|
|
|
+
|
|
|
+ /deep/ .uni-pagination-box {
|
|
|
+ background: #fff;
|
|
|
+ border-top: 1px solid #ddd
|
|
|
}
|
|
|
- /deep/ .uni-pagination__num{
|
|
|
- height:80rpx
|
|
|
+
|
|
|
+ .submitBottomBtn {
|
|
|
+ padding: 0px 32rpx 32rpx 32rpx
|
|
|
}
|
|
|
|
|
|
+ /deep/ .uni-pagination__num {
|
|
|
+ height: 80rpx
|
|
|
+ }
|
|
|
</style>
|