123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <view class="padding">
- <view style="width:100%;overflow:auto; height: calc(100vh - 156px);" >
- <!-- <table style="width:200%;text-align:center" >
- <tr>
- <th>人员名称</th>
- <th>联系方式</th>
- <th>所在单位</th>
- <th>角色权限</th>
- </tr>
- <tr v-for="(item,index) in getData" :key="index">
- <td>{{item.username}}</td>
- <td>{{item.phone}}</td>
- <td>{{item.owner_name}}</td>
- <td>{{item.statusid}}</td>
- </tr>
- </table> -->
-
- <view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
-
- <uni-table border stripe emptyText="暂无更多数据" >
- <!-- 表头行 -->
- <uni-tr>
- <uni-th align="center">人员名称</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-table>
-
- </view>
-
-
-
- <view class="btn-area submitBottomBtn padding-lr-sm">
- <button class="bg-blue round margin-top" @click="goAddPer()">新 增</button>
- </view>
-
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- getData:[],
- // 每页数据量
- pageSize: 100,
- // 当前页
- pageCurrent: 1,
- // 数据总量
- total: '',
- loading: false
- }
- },
- 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,
- showLoading: true
- })
- 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;
- },
-
- // 分页触发
- 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(e.current)
- },
-
-
-
- goAddPer() {
- uni.navigateTo({
- url: '/pages/accountManage/perAdd/perAdd',
-
- });
- },
-
- }
- }
- </script>
- <style>
- </style>
|