用工平台小程序后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

252 lines
8.4 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  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.phone"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <a-form-item label="审核状态">
  14. <j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.auditStatus" dictCode="audit_status"/>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  20. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  21. <a @click="handleToggleSearch" style="margin-left: 8px">
  22. {{ toggleSearchStatus ? '收起' : '展开' }}
  23. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  24. </a>
  25. </span>
  26. </a-col>
  27. </a-row>
  28. </a-form>
  29. </div>
  30. <!-- 查询区域-END -->
  31. <!-- 操作按钮区域 -->
  32. <div class="table-operator">
  33. </div>
  34. <!-- table区域-begin -->
  35. <div>
  36. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  37. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  38. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  39. </div>
  40. <a-table
  41. ref="table"
  42. size="middle"
  43. :scroll="{x:true}"
  44. bordered
  45. rowKey="id"
  46. :columns="columns"
  47. :dataSource="dataSource"
  48. :pagination="ipagination"
  49. :loading="loading"
  50. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  51. class="j-table-force-nowrap"
  52. @change="handleTableChange">
  53. <template slot="htmlSlot" slot-scope="text">
  54. <div v-html="text"></div>
  55. </template>
  56. <template slot="imgSlot" slot-scope="text,record">
  57. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  58. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  59. </template>
  60. <template slot="fileSlot" slot-scope="text">
  61. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  62. <a-button
  63. v-else
  64. :ghost="true"
  65. type="primary"
  66. icon="download"
  67. size="small"
  68. @click="downloadFile(text)">
  69. 下载
  70. </a-button>
  71. </template>
  72. <span slot="action" slot-scope="text, record">
  73. <a @click="handleEdit(record)">编辑</a>
  74. <a-divider type="vertical" />
  75. <a-dropdown>
  76. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  77. <a-menu slot="overlay">
  78. <a-menu-item>
  79. <a @click="handleDetail(record)">详情</a>
  80. </a-menu-item>
  81. <a-menu-item>
  82. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  83. <a>删除</a>
  84. </a-popconfirm>
  85. </a-menu-item>
  86. </a-menu>
  87. </a-dropdown>
  88. </span>
  89. </a-table>
  90. </div>
  91. <tb-user-role-modal ref="modalForm" @ok="modalFormOk"></tb-user-role-modal>
  92. </a-card>
  93. </template>
  94. <script>
  95. import '@/assets/less/TableExpand.less'
  96. import { mixinDevice } from '@/utils/mixin'
  97. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  98. import TbUserRoleModal from './modules/TbUserRoleModal'
  99. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  100. export default {
  101. name: 'TbUserRoleList',
  102. mixins:[JeecgListMixin, mixinDevice],
  103. components: {
  104. TbUserRoleModal
  105. },
  106. data () {
  107. return {
  108. description: 'tb_user_role管理页面',
  109. // 表头
  110. columns: [
  111. {
  112. title: '#',
  113. dataIndex: '',
  114. key:'rowIndex',
  115. width:60,
  116. align:"center",
  117. customRender:function (t,r,index) {
  118. return parseInt(index)+1;
  119. }
  120. },
  121. {
  122. title:'用户名',
  123. align:"center",
  124. dataIndex: 'userName'
  125. },
  126. {
  127. title:'地址',
  128. align:"center",
  129. dataIndex: 'address'
  130. },
  131. {
  132. title:'工种',
  133. align:"center",
  134. dataIndex: 'industryName'
  135. },
  136. {
  137. title:'个人简介',
  138. align:"center",
  139. dataIndex: 'detail'
  140. },
  141. {
  142. title:'身份证上传',
  143. align:"center",
  144. dataIndex: 'idCard',
  145. scopedSlots: {customRender: 'imgSlot'}
  146. },
  147. {
  148. title:'电话',
  149. align:"center",
  150. dataIndex: 'phone'
  151. },
  152. {
  153. title:'年龄',
  154. align:"center",
  155. dataIndex: 'age'
  156. },
  157. {
  158. title:'性别',
  159. align:"center",
  160. dataIndex: 'gender_dictText'
  161. },
  162. {
  163. title:'期望薪资最小值',
  164. align:"center",
  165. dataIndex: 'moneyMin'
  166. },
  167. {
  168. title:'期望薪资最大值',
  169. align:"center",
  170. dataIndex: 'moneyMax'
  171. },
  172. {
  173. title:'角色',
  174. align:"center",
  175. dataIndex: 'role_dictText'
  176. },
  177. {
  178. title:'审核状态',
  179. align:"center",
  180. dataIndex: 'auditStatus_dictText'
  181. },
  182. {
  183. title: '操作',
  184. dataIndex: 'action',
  185. align:"center",
  186. fixed:"right",
  187. width:147,
  188. scopedSlots: { customRender: 'action' }
  189. }
  190. ],
  191. url: {
  192. list: "/userRole/tbUserRole/list1",
  193. delete: "/userRole/tbUserRole/delete",
  194. deleteBatch: "/userRole/tbUserRole/deleteBatch",
  195. exportXlsUrl: "/userRole/tbUserRole/exportXls",
  196. importExcelUrl: "userRole/tbUserRole/importExcel",
  197. },
  198. dictOptions:{},
  199. superFieldList:[],
  200. }
  201. },
  202. created() {
  203. this.getSuperFieldList();
  204. },
  205. computed: {
  206. importExcelUrl: function(){
  207. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  208. },
  209. },
  210. methods: {
  211. initDictConfig(){
  212. },
  213. getSuperFieldList(){
  214. let fieldList=[];
  215. fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''})
  216. fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
  217. fieldList.push({type:'string',value:'companyAddress',text:'地址',dictCode:''})
  218. fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})
  219. fieldList.push({type:'string',value:'industryName',text:'行业/工种',dictCode:''})
  220. fieldList.push({type:'Text',value:'detail',text:'个人简介',dictCode:''})
  221. fieldList.push({type:'Text',value:'idCard',text:'身份证上传',dictCode:''})
  222. fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
  223. fieldList.push({type:'int',value:'age',text:'年龄',dictCode:''})
  224. fieldList.push({type:'int',value:'gender',text:'性别',dictCode:'sex'})
  225. fieldList.push({type:'int',value:'moneyMin',text:'期望薪资最小值',dictCode:''})
  226. fieldList.push({type:'int',value:'moneyMax',text:'期望薪资最大值',dictCode:''})
  227. fieldList.push({type:'int',value:'role',text:'角色',dictCode:'user_role'})
  228. fieldList.push({type:'Text',value:'businessLicense',text:'营业执照上传',dictCode:''})
  229. fieldList.push({type:'int',value:'auditStatus',text:'审核状态 0审核中 1 审核通过 2审核未通过',dictCode:'audit_status'})
  230. this.superFieldList = fieldList
  231. }
  232. }
  233. }
  234. </script>
  235. <style scoped>
  236. @import '~@assets/less/common.less';
  237. </style>