PositionList.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline">
  6. <a-row :gutter="24">
  7. <a-col :md="6" :sm="8">
  8. <a-form-item label="公司名称">
  9. <a-input placeholder="请输入公司名称" v-model="queryParam.enterpriseName"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="8">
  13. <a-form-item label="职位名称">
  14. <a-input placeholder="请输入职位名称" v-model="queryParam.positionName"></a-input>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :md="6" :sm="8">
  19. <a-form-item label="全职职位类别">
  20. <j-dict-select-tag v-model="queryParam.fulltimePositionType" placeholder="请选择职位类别"
  21. dictCode="fulltime_position_type"/>
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-item label="兼职职位类别">
  26. <j-dict-select-tag v-model="queryParam.parttimePositionType" placeholder="请选择职位类别"
  27. dictCode="parttime_position_type"/>
  28. </a-form-item>
  29. </a-col>
  30. <a-col :md="6" :sm="8">
  31. <a-form-item label="发布时间" :labelCol="{span: 10}" :wrapperCol="{span: 32, offset: 0}">
  32. <j-date v-model="queryParam.createTime" :showTime="true" date-format="YYYY-MM-DD"
  33. placeholder="请选择发布时间"></j-date>
  34. </a-form-item>
  35. </a-col>
  36. <a-col :md="6" :sm="8">
  37. <a-form-item label="更新时间" :labelCol="{span: 10}" :wrapperCol="{span: 16, offset: 0}">
  38. <j-date v-model="queryParam.updateTime" :showTime="true" date-format="YYYY-MM-DD"
  39. placeholder="请选择更新时间"></j-date>
  40. </a-form-item>
  41. </a-col>
  42. <a-col :md="6" :sm="8">
  43. <a-form-item label="认证状态">
  44. <j-dict-select-tag v-model="queryParam.authenticationStatus" placeholder="请选择认证状态"
  45. dictCode="authenticationStatus"/>
  46. </a-form-item>
  47. </a-col>
  48. </template>
  49. <a-col :md="6" :sm="8">
  50. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  51. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  52. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  53. <a @click="handleToggleSearch" style="margin-left: 8px">
  54. {{ toggleSearchStatus ? '收起' : '展开' }}
  55. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  56. </a>
  57. </span>
  58. </a-col>
  59. </a-row>
  60. </a-form>
  61. </div>
  62. <!-- 操作按钮区域 -->
  63. <!--<div class="table-operator">-->
  64. <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
  65. <!--<a-button type="primary" icon="download" @click="handleExportXls('职位审核')">导出</a-button>-->
  66. <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
  67. <!--<a-button type="primary" icon="import">导入</a-button>-->
  68. <!--</a-upload>-->
  69. <!--<a-dropdown v-if="selectedRowKeys.length > 0">-->
  70. <!--<a-menu slot="overlay">-->
  71. <!--<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
  72. <!--</a-menu>-->
  73. <!--<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
  74. <!--</a-dropdown>-->
  75. <!--</div>-->
  76. <!-- table区域-begin -->
  77. <div>
  78. <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
  79. <!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
  80. <!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
  81. <!--</div>-->
  82. <a-table
  83. ref="table"
  84. size="middle"
  85. bordered
  86. rowKey="id"
  87. :columns="columns"
  88. :dataSource="dataSource"
  89. :pagination="ipagination"
  90. :loading="loading"
  91. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  92. @change="handleTableChange">
  93. <span slot="action" slot-scope="text, record">
  94. <a href="javascript:;" @click="handleDetail(record)">查看</a>
  95. <a-divider type="vertical"/>
  96. <a href="javascript:;" @click="confirm1(record)">审核</a>
  97. <a-divider type="vertical"/>
  98. <a href="javascript:;" @click="deleteOK(record)">删除</a>
  99. </span>
  100. </a-table>
  101. </div>
  102. <!-- table区域-end -->
  103. <!-- 表单区域 -->
  104. <position-modal ref="modalForm" @ok="modalFormOk"></position-modal>
  105. </a-card>
  106. </template>
  107. <script>
  108. import PositionModal from './modules/PositionModal'
  109. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  110. import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
  111. const auditHpUser = (params) => putAction('/hpposition/position/changeAuth', params)
  112. const deleteOK = (params) => putAction('/hpposition/position/deleteOK', params)
  113. import JDate from '@/components/jeecg/JDate'
  114. export default {
  115. name: 'PositionList',
  116. mixins: [JeecgListMixin],
  117. components: {
  118. PositionModal,
  119. JDate
  120. },
  121. data() {
  122. return {
  123. description: '职位审核管理页面',
  124. // 表头
  125. columns: [
  126. // {
  127. // title: '#',
  128. // dataIndex: '',
  129. // key:'rowIndex',
  130. // width:60,
  131. // align:"center",
  132. // customRender:function (t,r,index) {
  133. // return parseInt(index)+1;
  134. // }
  135. // },
  136. {
  137. title: '公司名称',
  138. align: 'center',
  139. dataIndex: 'enterpriseName'
  140. },
  141. {
  142. title: '职位名称',
  143. align: 'center',
  144. dataIndex: 'positionName'
  145. },
  146. {
  147. title: '职位类型',
  148. align: 'center',
  149. dataIndex: 'positionCategory_dictText'
  150. },
  151. {
  152. title: '职位类别',
  153. align: 'center',
  154. dataIndex: '',
  155. customRender: function(record) {
  156. if (record.positionCategory == 0) {
  157. return record.fulltimePositionType_dictText
  158. } else {
  159. return record.parttimePositionType_dictText
  160. }
  161. }
  162. },
  163. {
  164. title: '发布时间',
  165. align: 'center',
  166. dataIndex: 'createTime'
  167. },
  168. {
  169. title: '更新时间',
  170. align: 'center',
  171. dataIndex: 'updateTime'
  172. },
  173. {
  174. title: '认证状态',
  175. align: 'center',
  176. dataIndex: 'authenticationStatus_dictText'
  177. },
  178. {
  179. title: '操作',
  180. dataIndex: 'action',
  181. align: 'center',
  182. scopedSlots: { customRender: 'action' }
  183. }
  184. ],
  185. url: {
  186. list: '/hpposition/position/list1',
  187. delete: '/hpposition/position/delete',
  188. deleteBatch: '/hpposition/position/deleteBatch',
  189. exportXlsUrl: 'hpposition/position/exportXls',
  190. importExcelUrl: 'hpposition/position/importExcel'
  191. }
  192. }
  193. },
  194. computed: {
  195. importExcelUrl: function() {
  196. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  197. }
  198. },
  199. methods: {
  200. //审核确认
  201. confirm1(record) {
  202. let that = this
  203. const modal = that.$confirm({
  204. title: '审核',
  205. closable: true,
  206. keyboard: false,
  207. maskClosable: true,
  208. content: record.positionName,
  209. okText: '通过',
  210. cancelText: '不通过',
  211. onOk: function() {
  212. auditHpUser({ id: record.id, authenticationStatus: 3 }).then((res) => {
  213. if (res.success) {
  214. that.$message.success(res.message)
  215. that.loadData()
  216. } else {
  217. that.$message.warning(res.message)
  218. }
  219. })
  220. },
  221. onCancel(e) {
  222. if (e.triggerCancel) {
  223. return
  224. } else {
  225. modal.destroy()
  226. auditHpUser({ id: record.id, authenticationStatus: 2 }).then((res) => {
  227. if (res.success) {
  228. that.$message.success(res.message)
  229. that.loadData()
  230. } else {
  231. that.$message.warning(res.message)
  232. }
  233. })
  234. }
  235. }
  236. })
  237. },
  238. //逻辑删除
  239. deleteOK(record) {
  240. let that = this
  241. that.$confirm({
  242. title: '是否确定删除',
  243. content: record.positionName,
  244. okText: '删除',
  245. cancelText: '取消',
  246. onOk: function() {
  247. deleteOK({ id: record.id }).then((res) => {
  248. if (res.success) {
  249. that.$message.success(res.message)
  250. that.loadData()
  251. } else {
  252. that.$message.warning(res.message)
  253. }
  254. })
  255. },
  256. onCancel() {
  257. }
  258. })
  259. }
  260. }
  261. }
  262. </script>
  263. <style scoped>
  264. @import '~@assets/less/common.less'
  265. </style>