candidateList.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <!--
  2. * @Description: create
  3. * @Version: 1.0
  4. * @Autor: XuTongZhang
  5. * @Date: 2020-07-28 15:25:06
  6. * @LastEditors: XuTongZhang
  7. * @LastEditTime: 2020-08-02 16:48:59
  8. -->
  9. <template>
  10. <div class="indexPage">
  11. <v-input :btn="btn" :list="list" @del="delAll" @search="search"></v-input>
  12. <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
  13. <el-radio-button :label="1">已通过候选人</el-radio-button>
  14. <el-radio-button :label="2">已淘汰候选人</el-radio-button>
  15. </el-radio-group>
  16. <v-table
  17. :key="isCollapse"
  18. :table="table"
  19. :tableList="tableList"
  20. :sortType="true"
  21. :queryData="queryData"
  22. :form="form"
  23. @details="details"
  24. @update="update"
  25. @selection-change="selection"
  26. id=""
  27. ></v-table>
  28. <v-pager @page="callPage" :total="totalrecords"></v-pager>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. data () {
  34. return {
  35. tableList: [],
  36. page: 1,
  37. sortRule: {},
  38. isCollapse: 1,
  39. totalrecords: 0,
  40. pickList: [],
  41. form: {},
  42. list: [
  43. {
  44. placeholder: '请输入关键字查询',
  45. props: ''
  46. },
  47. {
  48. type: 'select',
  49. placeholder: '性别',
  50. props: '',
  51. options: [{ label: '男', value: 1 }, { label: '女', value: 0 }]
  52. },
  53. {
  54. type: 'select',
  55. placeholder: '来源',
  56. props: '',
  57. options: []
  58. },
  59. {
  60. type: 'select',
  61. placeholder: '投递职位',
  62. props: '',
  63. options: []
  64. },
  65. {
  66. type: 'select',
  67. placeholder: '应聘职位',
  68. props: '',
  69. options: []
  70. },
  71. {
  72. type: 'date'
  73. }
  74. ],
  75. btn: [
  76. {
  77. name: '确定',
  78. type: 'primary',
  79. method: ''
  80. }
  81. ],
  82. table: {
  83. selection: true,
  84. column: [
  85. {
  86. label: '编号',
  87. props: ''
  88. },
  89. {
  90. label: '姓名',
  91. props: ''
  92. },
  93. {
  94. label: '简历来源',
  95. props: ''
  96. },
  97. {
  98. label: '简历投递时间',
  99. props: ''
  100. },
  101. {
  102. label: '简历投递职位',
  103. props: ''
  104. },
  105. {
  106. label: '工作年限',
  107. props: ''
  108. },
  109. {
  110. label: '学历',
  111. props: ''
  112. },
  113. {
  114. label: '联系电话',
  115. props: ''
  116. }
  117. ],
  118. handle: [
  119. {
  120. title: '查看简历',
  121. method: '',
  122. type: 'info'
  123. },
  124. {
  125. title: '通知面试',
  126. method: '',
  127. type: 'info'
  128. },
  129. {
  130. title: '标记通过',
  131. method: '',
  132. type: 'info'
  133. },
  134. {
  135. title: '标记淘汰',
  136. method: '',
  137. type: 'warning'
  138. }
  139. ]
  140. }
  141. }
  142. },
  143. mounted () {
  144. // this.queryData()
  145. },
  146. methods: {
  147. queryData (form = { conditions: '' }, sort = {}) {
  148. let page = this.page
  149. this.sortRule = sort
  150. this.form = form
  151. let reqdata = Object.assign({}, form, sort)
  152. this.$api
  153. .post('', {
  154. reqdata,
  155. page
  156. })
  157. .then((res) => {
  158. this.totalrecords = res.totalrecords
  159. this.tableList = res.list.map((item) => {
  160. item.ctx = item.infoContent
  161. ? item.infoContent.length > 15
  162. ? item.infoContent.replace(/<[^>]+>/g, '').slice(0, 15) + '...'
  163. : item.infoContent.replace(/<[^>]+>/g, '').slice(0, 15)
  164. : ''
  165. return item
  166. })
  167. })
  168. },
  169. search (form, sortRule) {
  170. this.queryData(form, sortRule)
  171. },
  172. details (row) {
  173. this.dialogVisible = true
  174. this.querydetail(row.infoId)
  175. },
  176. update (row) {
  177. this.type = 1
  178. this.querydetail(row.infoId)
  179. this.openDiaLog()
  180. },
  181. querydetail (infoId) {
  182. this.$api
  183. .post('/platform/information/platformGetInformation', {
  184. reqdata: {
  185. infoId
  186. }
  187. })
  188. .then((res) => {
  189. let obj = res.object
  190. // obj.createtime = this.$utils.format(res.object.createtime)
  191. this.info = obj
  192. })
  193. },
  194. del (row, type = false) {
  195. let id = type ? row : [row.infoId]
  196. this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
  197. confirmButtonText: '确定',
  198. cancelButtonText: '取消',
  199. type: 'warning'
  200. })
  201. .then(() => {
  202. this.$api
  203. .post('/platform/information/platformDeleteInformation', {
  204. reqdata: {
  205. id
  206. }
  207. })
  208. .then((res) => {
  209. this.queryData(this.form, this.sortRule)
  210. this.$message({
  211. type: 'success',
  212. message: '删除成功!'
  213. })
  214. })
  215. })
  216. .catch(() => {
  217. this.$message({
  218. type: 'info',
  219. message: '已取消删除'
  220. })
  221. })
  222. },
  223. delAll () {
  224. this.pickList.length
  225. ? this.del(this.pickList, true)
  226. : this.$message({ type: 'info', message: '请选择需要删除的内容' })
  227. },
  228. selection (val) {
  229. this.pickList = val
  230. },
  231. callPage (val) {
  232. this.page = val
  233. this.queryData(this.form, this.sortRule)
  234. }
  235. }
  236. }
  237. </script>