user.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>管理员列表</title>
  5. #parse("sys/header.html")
  6. </head>
  7. <body>
  8. <div id="rrapp" v-cloak>
  9. <div v-show="showList">
  10. <Row :gutter="16">
  11. <div class="search-group">
  12. <i-col span="8">
  13. <div style="display: inline-block;">
  14. <i-input v-model="q.username" @on-enter="query" placeholder="用户名"/>
  15. </div>
  16. <div style="display: inline-block;">
  17. <i-button @click="query">查询</i-button>
  18. </div>
  19. </i-col>
  20. </div>
  21. <div class="buttons-group">
  22. #if($shiro.hasPermission("sys:user:save"))
  23. <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
  24. #end
  25. #if($shiro.hasPermission("sys:user:update"))
  26. <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
  27. #end
  28. #if($shiro.hasPermission("sys:user:delete"))
  29. <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
  30. #end
  31. </div>
  32. </Row>
  33. <table id="jqGrid"></table>
  34. <div id="jqGridPager"></div>
  35. </div>
  36. <Modal
  37. v-model="modal1"
  38. title="添加店铺关联"
  39. @on-ok="ok"
  40. @on-cancel="cancel">
  41. <!--
  42. <CheckboxGroup v-model="social" @on-change="checkAllGroupChange">
  43. <Checkbox :label="brand.name" v-for="(brand,idx) in brandsList" :key='idx'>
  44. <span>{{brand.name}}</span>
  45. </Checkbox>
  46. </CheckboxGroup> -->
  47. <div class="checkbox-item" @click="clickCheck(brand,idx)" v-for="(brand,idx) in brandsList" :key='idx'>
  48. <span class="checkbox-kuang"></span>
  49. <img v-if="brand.checked" src="http://4d-tjw.oss-cn-shenzhen.aliyuncs.com/images/fdsq-click.png" alt="">
  50. <span>{{brand.name}}</span>
  51. </div>
  52. <Page style="margin-top: 20px;" :total="brandTotal" @on-change="pageChange" :page-size='brandPerPage' :current='brandPage' size="small" />
  53. </Modal>
  54. <Card v-show="!showList">
  55. <p slot="title">{{title}}</p>
  56. <i-form ref="formValidate" :model="user" :rules="ruleValidate" :label-width="80">
  57. <div style="width: 100%;">
  58. <Form-item label="用户名" prop="username">
  59. <div class="c-winput">
  60. <i-input v-model="user.username" placeholder="登录账号"/>
  61. </div>
  62. </Form-item>
  63. <Form-item label="所属部门" prop="deptName">
  64. <div class="c-winput">
  65. <i-input type="text" v-model="user.deptName" icon="eye" readonly="readonly"
  66. @on-click="deptTree" readonly="readonly" placeholder="所属部门"/>
  67. </div>
  68. </Form-item>
  69. <Form-item label="邮箱" prop="email">
  70. <div class="c-winput">
  71. <i-input v-model="user.email" placeholder="邮箱"/>
  72. </div>
  73. </Form-item>
  74. <Form-item label="手机号" prop="mobile">
  75. <div class="c-winput">
  76. <i-input v-model="user.mobile" placeholder="手机号"/>
  77. </div>
  78. </Form-item>
  79. <Form-item label="店铺关联">
  80. <i-button @click="getBrandList">添加店铺</i-button>
  81. <div v-if="user.brandList">
  82. <span style="margin-right: 20px;" v-for="(item,i) in user.brandList" :key="i">{{item.brandName||item.name}}</span>
  83. </div>
  84. </Form-item>
  85. <Form-item label="角色" prop="roleIdList">
  86. <Checkbox-group v-model="user.roleIdList">
  87. <Checkbox :label="role.roleId" v-for="role in roleList">{{role.roleName}}</Checkbox>
  88. </Checkbox-group>
  89. </Form-item>
  90. <Form-item label="状态" prop="status">
  91. <Radio-group v-model="user.status">
  92. <Radio label="0">
  93. <span>禁用</span>
  94. </Radio>
  95. <Radio label="1">
  96. <span>正常</span>
  97. </Radio>
  98. </Radio-group>
  99. </Form-item>
  100. <Form-item>
  101. <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
  102. <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
  103. <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
  104. </Form-item>
  105. </div>
  106. </i-form>
  107. </Card>
  108. </div>
  109. <!-- 选择部门 -->
  110. <div id="deptLayer" style="display: none;padding:10px;">
  111. <ul id="deptTree" class="ztree"></ul>
  112. </div>
  113. <script src="${rc.contextPath}/js/sys/user.js?_${date.systemTime}"></script>
  114. </body>
  115. </html>