60ca8412ce2097f68af354ffecf026cb-js.php 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php /*a:2:{s:58:"D:\phpEnv\www\SCM-API\app\admin\view\user\index\index.html";i:1750736984;s:52:"D:\phpEnv\www\SCM-API\app\admin\view\layout\vue.html";i:1750736984;}*/ ?>
  2. import table from "http://yun.cn/assets/js/components/Table.js";
  3. export default{
  4. components:{'YunTable':table},
  5. data:{
  6. auth:{
  7. add:Yunqi.auth.check('app\\admin\\controller\\user\\Index','add'),
  8. edit:Yunqi.auth.check('app\\admin\\controller\\user\\Index','edit'),
  9. del:Yunqi.auth.check('app\\admin\\controller\\user\\Index','del'),
  10. multi:Yunqi.auth.check('app\\admin\\controller\\user\\Index','multi'),
  11. recyclebin:Yunqi.auth.check('app\\admin\\controller\\user\\Index','recyclebin'),
  12. },
  13. extend:{
  14. index_url: 'user/index/index',
  15. edit_url: 'user/index/edit',
  16. del_url: 'user/index/del',
  17. multi_url: 'user/index/multi',
  18. download_url: 'user/index/download',
  19. recyclebin_url: 'user/index/recyclebin',
  20. },
  21. columns:[
  22. {checkbox: true},
  23. {field: 'id',title: __('ID'),width:80,sortable: true},
  24. {field: 'username',title: __('用户名'),operate:'='},
  25. {field: 'avatar', title: __('头像'), formatter: Yunqi.formatter.image, operate: false},
  26. {field: 'nickname',title: __('昵称'),operate: 'LIKE',formatter: Yunqi.formatter.tag},
  27. {field: 'sex', title: __('性别'),width:100,searchList: {1: __('男'), 2: __('女')},operate:'select',formatter:Yunqi.formatter.select},
  28. {field: 'email',title: __('邮箱'),operate:'LIKE'},
  29. {field: 'mobile',title: __('手机'),operate: '='},
  30. {field: 'level', title: __('等级'),sortable: true,operate:'selects',searchList:{0:'普通',1:'1级',2:'2级',3:'3级',4:'4级'}},
  31. {field: 'score', title: __('积分'),sortable: true,operate:'between'},
  32. {field: 'balance', title: __('余额'),sortable: true,operate:'between'},
  33. {field: 'status', title: __('状态'),searchList: {'normal': __('正常'),'hidden': __('隐藏')},formatter:Yunqi.formatter.switch,operate:'select'},
  34. {field: 'createtime', title: __('创建时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},
  35. {
  36. field: 'operate',
  37. title: __('操作'),
  38. width:180,
  39. fixed:'right',
  40. action:{
  41. recharge:{
  42. tooltip:true,
  43. icon:'fa fa-plug',
  44. type:'warning',
  45. text:__('会员充值'),
  46. method:'recharge'
  47. },
  48. detail:{
  49. tooltip:true,
  50. icon:'fa fa-list',
  51. type:'info',
  52. text:__('会员明细'),
  53. method:'detail'
  54. },
  55. edit:true,
  56. del:true
  57. }
  58. }
  59. ]
  60. },
  61. methods: {
  62. detail:function (row){
  63. Yunqi.api.open({
  64. url:'user/index/detail?ids='+row.id,
  65. width:1000,
  66. title:__('会员明细'),
  67. icon:'fa fa-list'
  68. });
  69. },
  70. recharge:function (row){
  71. Yunqi.api.open({
  72. url:'user/index/recharge?ids='+row.id,
  73. title:__('会员充值'),
  74. icon:'fa fa-plug',
  75. close:()=>{
  76. this.$refs.yuntable.reload();
  77. }
  78. });
  79. }
  80. }
  81. }