| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <el-card shadow="never">
- <yun-table
- :columns="columns"
- search="nickname,mobile"
- toolbar="refresh,add,edit,del,recyclebin,more"
- ref="yuntable"
- :auth="auth"
- :extend="extend">
- </yun-table>
- </el-card>
- </template>
- <script>
- import table from "@components/Table.js";
- export default{
- components:{'YunTable':table},
- data:{
- auth:{
- add:Yunqi.auth.check('app\\admin\\controller\\user\\Index','add'),
- edit:Yunqi.auth.check('app\\admin\\controller\\user\\Index','edit'),
- del:Yunqi.auth.check('app\\admin\\controller\\user\\Index','del'),
- multi:Yunqi.auth.check('app\\admin\\controller\\user\\Index','multi'),
- recyclebin:Yunqi.auth.check('app\\admin\\controller\\user\\Index','recyclebin'),
- },
- extend:{
-
- index_url: 'user/index/index',
- add_url: 'user/index/add',
- edit_url: 'user/index/edit',
- del_url: 'user/index/del',
- multi_url: 'user/index/multi',
- download_url: 'user/index/download',
- recyclebin_url: 'user/index/recyclebin',
- },
- columns:[
- {checkbox: true},
- {field: 'id',title: __('ID'),width:80,sortable: true},
- {field: 'username',title: __('用户名'),operate:'='},
- {field: 'avatar', title: __('头像'), formatter: Yunqi.formatter.image, operate: false},
- {field: 'nickname',title: __('昵称'),operate: 'LIKE',formatter: Yunqi.formatter.tag},
- {field: 'sex', title: __('性别'),width:100,searchList: {1: __('男'), 2: __('女')},operate:false,formatter:Yunqi.formatter.select},
- {field: 'email',title: __('邮箱'),operate:'LIKE'},
- {field: 'mobile',title: __('手机'),operate: '='},
- {field: 'role', title: __('角色'),sortable: true,operate:'selects', formatter(value, row, index) {
- var role = "";
- console.log(value, "====")
- if(value.indexOf("1") > -1) role =role+"录入员";
- if(value.indexOf("2") > -1) role =role+"-库管";
- if(value.indexOf("3") > -1) role =role+"-记账";
- return role;
- }},
- {field: 'status', title: __('状态'),searchList: {'normal': __('正常'),'hidden': __('隐藏')},formatter:Yunqi.formatter.switch,operate:'select'},
- {field: 'createtime', title: __('创建时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},
- {
- field: 'operate',
- title: __('操作'),
- width:180,
- fixed:'right',
- action:{
- edit:true,
- del:true
- }
- }
- ]
- },
- methods: {
- // detail:function (row){
- // Yunqi.api.open({
- // url:'user/index/detail?ids='+row.id,
- // width:1000,
- // title:__('会员明细'),
- // icon:'fa fa-list'
- // });
- // },
- // recharge:function (row){
- // Yunqi.api.open({
- // url:'user/index/recharge?ids='+row.id,
- // title:__('会员充值'),
- // icon:'fa fa-plug',
- // close:()=>{
- // this.$refs.yuntable.reload();
- // }
- // });
- // }
- }
- }
- </script>
- <style>
- </style>
|