用工平台小程序后端代码
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.

344 lines
12 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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.userName"></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. <a-input placeholder="请输入工人名" v-model="queryParam.workName"></a-input>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19. <a-form-item label="公司名称">
  20. <a-input placeholder="请输入公司名称" v-model="queryParam.companyName"></a-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="工人联系方式">
  25. <a-input placeholder="请输入工人联系方式" v-model="queryParam.phone"></a-input>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29. <a-form-item label="招聘方联系方式">
  30. <a-input placeholder="请输入招聘方联系方式" v-model="queryParam.bossPhone"></a-input>
  31. </a-form-item>
  32. </a-col>
  33. </template>
  34. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  35. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  36. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  37. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  38. <a @click="handleToggleSearch" style="margin-left: 8px">
  39. {{ toggleSearchStatus ? '收起' : '展开' }}
  40. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  41. </a>
  42. </span>
  43. </a-col>
  44. </a-row>
  45. </a-form>
  46. </div>
  47. <!-- 查询区域-END -->
  48. <!-- 操作按钮区域 -->
  49. <div class="table-operator">
  50. </div>
  51. <!-- table区域-begin -->
  52. <div>
  53. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  54. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
  55. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  56. </div>
  57. <a-table
  58. ref="table"
  59. size="middle"
  60. :scroll="{x:true}"
  61. bordered
  62. rowKey="id"
  63. :columns="columns"
  64. :dataSource="dataSource"
  65. :pagination="ipagination"
  66. :loading="loading"
  67. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  68. class="j-table-force-nowrap"
  69. @change="handleTableChange">
  70. <template slot="htmlSlot" slot-scope="text">
  71. <div v-html="text"></div>
  72. </template>
  73. <template slot="imgSlot" slot-scope="text,record">
  74. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  75. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  76. </template>
  77. <template slot="fileSlot" slot-scope="text">
  78. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  79. <a-button
  80. v-else
  81. :ghost="true"
  82. type="primary"
  83. icon="download"
  84. size="small"
  85. @click="downloadFile(text)">
  86. 下载
  87. </a-button>
  88. </template>
  89. <span slot="action" slot-scope="text, record">
  90. <a @click="handleEdit(record)">编辑</a>
  91. <a-divider type="vertical" />
  92. <a-dropdown>
  93. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  94. <a-menu slot="overlay">
  95. <a-menu-item>
  96. <a @click="handleDetail(record)">详情</a>
  97. </a-menu-item>
  98. <a-menu-item>
  99. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  100. <a>删除</a>
  101. </a-popconfirm>
  102. </a-menu-item>
  103. </a-menu>
  104. </a-dropdown>
  105. </span>
  106. </a-table>
  107. </div>
  108. <tb-task-modal ref="modalForm" @ok="modalFormOk"></tb-task-modal>
  109. </a-card>
  110. </template>
  111. <script>
  112. import '@/assets/less/TableExpand.less'
  113. import { mixinDevice } from '@/utils/mixin'
  114. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  115. import TbTaskModal from './modules/TbTaskModal'
  116. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  117. export default {
  118. name: 'TbTaskList',
  119. mixins:[JeecgListMixin, mixinDevice],
  120. components: {
  121. TbTaskModal
  122. },
  123. data () {
  124. return {
  125. description: 'tb_task管理页面',
  126. // 表头
  127. columns: [
  128. {
  129. title: '#',
  130. dataIndex: '',
  131. key:'rowIndex',
  132. width:60,
  133. align:"center",
  134. customRender:function (t,r,index) {
  135. return parseInt(index)+1;
  136. }
  137. },
  138. {
  139. title:'用户名',
  140. align:"center",
  141. dataIndex: 'userName'
  142. },
  143. {
  144. title:'工人名',
  145. align:"center",
  146. dataIndex: 'workName'
  147. },
  148. {
  149. title:'头像图片',
  150. align:"center",
  151. dataIndex: 'headPic',
  152. scopedSlots: {customRender: 'imgSlot'}
  153. },
  154. {
  155. title:'工作标题',
  156. align:"center",
  157. dataIndex: 'title'
  158. },
  159. {
  160. title:'公司名称',
  161. align:"center",
  162. dataIndex: 'companyName'
  163. },
  164. {
  165. title:'工人出发地址',
  166. align:"center",
  167. dataIndex: 'workerAddress'
  168. },
  169. {
  170. title:'出行方式',
  171. align:"center",
  172. dataIndex: 'travelType_dictText'
  173. },
  174. {
  175. title:'上班地址',
  176. align:"center",
  177. dataIndex: 'workAddress'
  178. },
  179. {
  180. title:'行业/工种',
  181. align:"center",
  182. dataIndex: 'industryName'
  183. },
  184. {
  185. title:'工人个人简介',
  186. align:"center",
  187. dataIndex: 'detail',
  188. scopedSlots: {customRender: 'htmlSlot'}
  189. },
  190. {
  191. title:'工作内容',
  192. align:"center",
  193. dataIndex: 'workDetail',
  194. scopedSlots: {customRender: 'htmlSlot'}
  195. },
  196. {
  197. title:'图片上传',
  198. align:"center",
  199. dataIndex: 'workPic',
  200. scopedSlots: {customRender: 'imgSlot'}
  201. },
  202. {
  203. title:'工人联系方式',
  204. align:"center",
  205. dataIndex: 'phone'
  206. },
  207. {
  208. title:'招聘方联系方式',
  209. align:"center",
  210. dataIndex: 'bossPhone'
  211. },
  212. {
  213. title:'角色',
  214. align:"center",
  215. dataIndex: 'role_dictText'
  216. },
  217. {
  218. title:'年龄',
  219. align:"center",
  220. dataIndex: 'age'
  221. },
  222. {
  223. title:'性别',
  224. align:"center",
  225. dataIndex: 'gender_dictText'
  226. },
  227. {
  228. title:'期望日薪',
  229. align:"center",
  230. dataIndex: 'dayMoney'
  231. },
  232. {
  233. title:'时间范围',
  234. align:"center",
  235. dataIndex: 'startTime'
  236. },
  237. {
  238. title:'时间范围',
  239. align:"center",
  240. dataIndex: 'endTime'
  241. },
  242. {
  243. title:'工作时长',
  244. align:"center",
  245. dataIndex: 'workTime'
  246. },
  247. {
  248. title:'期望薪资最小值',
  249. align:"center",
  250. dataIndex: 'moneymin'
  251. },
  252. {
  253. title:'期望薪资最大值',
  254. align:"center",
  255. dataIndex: 'moneymax'
  256. },
  257. {
  258. title:'审核状态',
  259. align:"center",
  260. dataIndex: 'auditStatus_dictText'
  261. },
  262. {
  263. title:'结算方式',
  264. align:"center",
  265. dataIndex: 'payType_dictText'
  266. },
  267. {
  268. title: '操作',
  269. dataIndex: 'action',
  270. align:"center",
  271. fixed:"right",
  272. width:147,
  273. scopedSlots: { customRender: 'action' }
  274. }
  275. ],
  276. url: {
  277. list: "/tbTask/tbTask/list",
  278. delete: "/tbTask/tbTask/delete",
  279. deleteBatch: "/tbTask/tbTask/deleteBatch",
  280. exportXlsUrl: "/tbTask/tbTask/exportXls",
  281. importExcelUrl: "tbTask/tbTask/importExcel",
  282. },
  283. dictOptions:{},
  284. superFieldList:[],
  285. }
  286. },
  287. created() {
  288. this.getSuperFieldList();
  289. },
  290. computed: {
  291. importExcelUrl: function(){
  292. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  293. },
  294. },
  295. methods: {
  296. initDictConfig(){
  297. },
  298. getSuperFieldList(){
  299. let fieldList=[];
  300. fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''})
  301. fieldList.push({type:'string',value:'workName',text:'工人名',dictCode:''})
  302. fieldList.push({type:'Text',value:'headPic',text:'头像图片',dictCode:''})
  303. fieldList.push({type:'string',value:'title',text:'工作标题',dictCode:''})
  304. fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
  305. fieldList.push({type:'string',value:'workerAddress',text:'工人出发地址',dictCode:''})
  306. fieldList.push({type:'int',value:'travelType',text:'出行方式 0出租车 1 网约车 2 公交地铁 3无',dictCode:'travel_type'})
  307. fieldList.push({type:'string',value:'workAddress',text:'上班地址',dictCode:''})
  308. fieldList.push({type:'string',value:'industryName',text:'行业/工种',dictCode:''})
  309. fieldList.push({type:'Text',value:'detail',text:'工人个人简介',dictCode:''})
  310. fieldList.push({type:'Text',value:'workDetail',text:'工作内容',dictCode:''})
  311. fieldList.push({type:'Text',value:'workPic',text:'图片上传',dictCode:''})
  312. fieldList.push({type:'string',value:'phone',text:'工人联系方式',dictCode:''})
  313. fieldList.push({type:'string',value:'bossPhone',text:'招聘方联系方式',dictCode:''})
  314. fieldList.push({type:'int',value:'role',text:'角色 0招聘方 1 求职方',dictCode:'user_role'})
  315. fieldList.push({type:'int',value:'age',text:'年龄',dictCode:''})
  316. fieldList.push({type:'int',value:'gender',text:'性别',dictCode:'sex'})
  317. fieldList.push({type:'int',value:'dayMoney',text:'期望日薪',dictCode:''})
  318. fieldList.push({type:'datetime',value:'startTime',text:'时间范围'})
  319. fieldList.push({type:'datetime',value:'endTime',text:'时间范围'})
  320. fieldList.push({type:'string',value:'workTime',text:'工作时长',dictCode:''})
  321. fieldList.push({type:'int',value:'moneymin',text:'期望薪资最小值',dictCode:''})
  322. fieldList.push({type:'int',value:'moneymax',text:'期望薪资最大值',dictCode:''})
  323. fieldList.push({type:'int',value:'auditStatus',text:'审核状态 0审核中 1 审核通过 2审核未通过',dictCode:'audit_status'})
  324. fieldList.push({type:'int',value:'payType',text:'结算方式 0提前支付 1 试用后支付',dictCode:'pay_type'})
  325. this.superFieldList = fieldList
  326. }
  327. }
  328. }
  329. </script>
  330. <style scoped>
  331. @import '~@assets/less/common.less';
  332. </style>