UserShiftList.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="用户姓名">
  9. <a-input placeholder="请输入用户姓名" v-model="queryParam.realname"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. <a @click="handleToggleSearch" style="margin-left: 8px">
  17. {{ toggleSearchStatus ? '收起' : '展开' }}
  18. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  19. </a>
  20. </span>
  21. </a-col>
  22. </a-row>
  23. </a-form>
  24. </div>
  25. <div class="table-operator" style="border-top: 5px">
  26. <a-button @click="handleAdd()" type="primary" icon="plus" v-has="'user:add'" >添加用户</a-button>
  27. </div>
  28. <!-- 操作按钮区域 -->
  29. <div class="table-operator">
  30. </div>
  31. <!-- table区域-begin -->
  32. <div>
  33. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  34. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  35. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  36. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  37. </div>
  38. <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
  39. :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
  40. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange">
  41. <span slot="action" slot-scope="text, record">
  42. <a @click="handleEdit(record)">排班</a>
  43. <a-divider type="vertical" />
  44. <a-dropdown>
  45. <a class="ant-dropdown-link">更多
  46. <a-icon type="down" />
  47. </a>
  48. <a-menu slot="overlay">
  49. <!-- <a-menu-item>
  50. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  51. <a>删除</a>
  52. </a-popconfirm>
  53. </a-menu-item> -->
  54. <a-menu-item >
  55. </a-menu-item>
  56. </a-menu>
  57. </a-dropdown>
  58. </span>
  59. </a-table>
  60. </div>
  61. <!-- table区域-end -->
  62. <!-- 表单区域 -->
  63. <userShift-modal ref="modalForm" @ok="modalFormOk"></userShift-modal>
  64. </a-card>
  65. </template>
  66. <script>
  67. import '@/assets/less/TableExpand.less'
  68. import UserShiftModal from './modules/UserShiftModal'
  69. import {
  70. JeecgListMixin
  71. } from '@/mixins/JeecgListMixin'
  72. import moment from "moment"
  73. export default {
  74. name: "UserShiftList",
  75. mixins: [JeecgListMixin],
  76. components: {
  77. UserShiftModal
  78. },
  79. data() {
  80. return {
  81. description: '员工排班管理页面',
  82. // 表头
  83. columns: [
  84. /*{
  85. title: '#',
  86. dataIndex: '',
  87. key:'rowIndex',
  88. width:60,
  89. align:"center",
  90. customRender:function (t,r,index) {
  91. return parseInt(index)+1;
  92. }
  93. },*/
  94. {
  95. title: '用户账号',
  96. align: "center",
  97. dataIndex: 'username',
  98. width: 120,
  99. sorter: true
  100. },
  101. {
  102. title: '用户姓名',
  103. align: "center",
  104. width: 100,
  105. dataIndex: 'realname',
  106. },
  107. {
  108. title: '性别',
  109. align: "center",
  110. width: 80,
  111. dataIndex: 'sex_dictText',
  112. sorter: true
  113. },
  114. {
  115. title: '生日',
  116. align: "center",
  117. width: 100,
  118. dataIndex: 'birthday'
  119. },
  120. {
  121. title: '手机号码',
  122. align: "center",
  123. width: 120,
  124. dataIndex: 'phone'
  125. },
  126. {
  127. title: '邮箱',
  128. align: "center",
  129. width: 120,
  130. dataIndex: 'email'
  131. },
  132. {
  133. title: '部门',
  134. align: "center",
  135. width: 120,
  136. dataIndex: 'orgCodeTxt'
  137. },
  138. {
  139. title: '操作',
  140. dataIndex: 'action',
  141. scopedSlots: {customRender: 'action'},
  142. align: "center",
  143. width: 170
  144. }
  145. ],
  146. url: {
  147. list: "/sys/user/list",
  148. delete: "/userShift/userShift/delete",
  149. deleteBatch: "/userShift/userShift/deleteBatch",
  150. exportXlsUrl: "userShift/userShift/exportXls",
  151. importExcelUrl: "userShift/userShift/importExcel",
  152. },
  153. }
  154. },
  155. computed: {
  156. importExcelUrl: function() {
  157. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  158. }
  159. },
  160. methods: {
  161. getAvatarView: function (avatar) {
  162. return getFileAccessHttpUrl(avatar)
  163. },
  164. }
  165. }
  166. </script>
  167. <style scoped>
  168. @import '~@assets/less/common.less';
  169. </style>