index.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <el-card shadow="never">
  3. <yun-table
  4. :columns="columns"
  5. search="nickname,mobile"
  6. toolbar="refresh,add,edit,del,recyclebin,more"
  7. ref="yuntable"
  8. :auth="auth"
  9. :extend="extend">
  10. </yun-table>
  11. </el-card>
  12. </template>
  13. <script>
  14. import table from "@components/Table.js";
  15. export default{
  16. components:{'YunTable':table},
  17. data:{
  18. auth:{
  19. add:Yunqi.auth.check('app\\admin\\controller\\user\\Index','add'),
  20. edit:Yunqi.auth.check('app\\admin\\controller\\user\\Index','edit'),
  21. del:Yunqi.auth.check('app\\admin\\controller\\user\\Index','del'),
  22. multi:Yunqi.auth.check('app\\admin\\controller\\user\\Index','multi'),
  23. recyclebin:Yunqi.auth.check('app\\admin\\controller\\user\\Index','recyclebin'),
  24. },
  25. extend:{
  26. index_url: 'user/index/index',
  27. add_url: 'user/index/add',
  28. edit_url: 'user/index/edit',
  29. del_url: 'user/index/del',
  30. multi_url: 'user/index/multi',
  31. download_url: 'user/index/download',
  32. recyclebin_url: 'user/index/recyclebin',
  33. },
  34. columns:[
  35. {checkbox: true},
  36. {field: 'id',title: __('ID'),width:80,sortable: true},
  37. {field: 'username',title: __('用户名'),operate:'='},
  38. {field: 'avatar', title: __('头像'), formatter: Yunqi.formatter.image, operate: false},
  39. {field: 'nickname',title: __('昵称'),operate: 'LIKE',formatter: Yunqi.formatter.tag},
  40. {field: 'sex', title: __('性别'),width:100,searchList: {1: __('男'), 2: __('女')},operate:false,formatter:Yunqi.formatter.select},
  41. {field: 'email',title: __('邮箱'),operate:'LIKE'},
  42. {field: 'mobile',title: __('手机'),operate: '='},
  43. {field: 'role', title: __('角色'),sortable: true,operate:'selects',searchList:{0:'录入员 ',1:'库管'}},
  44. {field: 'status', title: __('状态'),searchList: {'normal': __('正常'),'hidden': __('隐藏')},formatter:Yunqi.formatter.switch,operate:'select'},
  45. {field: 'createtime', title: __('创建时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},
  46. {
  47. field: 'operate',
  48. title: __('操作'),
  49. width:180,
  50. fixed:'right',
  51. action:{
  52. edit:true,
  53. del:true
  54. }
  55. }
  56. ]
  57. },
  58. methods: {
  59. // detail:function (row){
  60. // Yunqi.api.open({
  61. // url:'user/index/detail?ids='+row.id,
  62. // width:1000,
  63. // title:__('会员明细'),
  64. // icon:'fa fa-list'
  65. // });
  66. // },
  67. // recharge:function (row){
  68. // Yunqi.api.open({
  69. // url:'user/index/recharge?ids='+row.id,
  70. // title:__('会员充值'),
  71. // icon:'fa fa-plug',
  72. // close:()=>{
  73. // this.$refs.yuntable.reload();
  74. // }
  75. // });
  76. // }
  77. }
  78. }
  79. </script>
  80. <style>
  81. </style>