job.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <template>
  2. <div v-if="recruitData">
  3. <el-row>
  4. <el-col :span="12">
  5. <div class="title-wrapper">
  6. <div class="title">{{recruitData.title}}</div>
  7. <div class="status" :style="{color: recruitData.statusColor}">{{recruitData.statusName}}</div>
  8. </div>
  9. <div class="salary">薪酬范围:{{recruitData.salaryName}}</div>
  10. <div class="skill">
  11. 技能:
  12. <span v-for="(item,index) in recruitData.skills" :key="index">
  13. <span v-if="index>0">,</span>
  14. <span>{{item.name}}</span>
  15. </span>
  16. </div>
  17. <div class="experience">经验:{{recruitData.experienceName}}</div>
  18. <div class="experience">申请审核时间:{{recruitData.submitAuditAtFormat}}</div>
  19. </el-col>
  20. <el-col :span="12">
  21. <div class="title-wrapper">
  22. <div class="title">企业信息</div>
  23. </div>
  24. <div class="company-info salary" @click="handleCompanyClick()">
  25. <div>
  26. <img class="owner-img" :src="recruitData.companyInfo.logo || ''" alt />
  27. </div>
  28. <div style="margin-left: 10px">
  29. <div
  30. style="font-weight: 700"
  31. >{{recruitData.companyInfo.shortName ? recruitData.companyInfo.shortName : (recruitData.companyInfo.name ? recruitData.companyInfo.name : '')}}</div>
  32. <div class="description">{{recruitData.companyInfo.description || ''}}</div>
  33. </div>
  34. </div>
  35. <div class="actions">
  36. <template v-if="recruitData.status==='2'">
  37. <el-button
  38. type="primary"
  39. class="btn"
  40. @click.stop="handleApproveClick(recruitData.id)"
  41. >通过</el-button>
  42. <el-button type="danger" class="btn" @click.stop="handleRejectClick(recruitData.id)">不通过</el-button>
  43. </template>
  44. <template v-if="recruitData.status==='3'">
  45. <el-button type="danger" class="btn" @click.stop="handleRejectClick(recruitData.id)">不通过</el-button>
  46. </template>
  47. </div>
  48. </el-col>
  49. </el-row>
  50. <el-row style="margin-top: 20px">
  51. <el-col :span="24">
  52. <div class="title-wrapper">
  53. <div class="title">发布者信息</div>
  54. </div>
  55. <div style="margin: 20px 0px 0px 20px" @click="handleOwnerClick()">
  56. <img
  57. class="owner-img"
  58. :src="recruitData.ownerInfo && recruitData.ownerInfo.iconUrl || ''"
  59. alt
  60. />
  61. <div class="owner-name">{{recruitData.ownerInfo && recruitData.ownerInfo.nickname || ''}}</div>
  62. </div>
  63. </el-col>
  64. </el-row>
  65. <el-row style="margin-top: 20px">
  66. <el-col :span="24">
  67. <div class="title-wrapper">
  68. <div class="title">工作描述</div>
  69. </div>
  70. <div style="padding: 10px">{{recruitData.description}}</div>
  71. </el-col>
  72. </el-row>
  73. <el-row style="margin-top: 20px">
  74. <el-col :span="24">
  75. <div class="title-wrapper">
  76. <div class="title">招聘评价</div>
  77. </div>
  78. <div style="padding: 10px">
  79. <p>
  80. <span>{{recruitData.companyCommentAtStr || ''}}</span>
  81. {{recruitData.problemsName || ''}}
  82. </p>
  83. </div>
  84. </el-col>
  85. </el-row>
  86. <el-row style="margin-top: 20px">
  87. <el-col :span="18">
  88. <div class="title-wrapper">
  89. <div class="title">
  90. 招聘数据(已投递
  91. <span>{{recruitData.countApplied|| 0}}</span>人,沟通中
  92. <span>{{recruitData.countTalk || 0}}</span>
  93. 人,浏览{{recruitData.pv || 0}}人)
  94. </div>
  95. </div>
  96. <div class="description-content">
  97. <el-table :data="recruitDataList">
  98. <el-table-column label="UID">
  99. <template slot-scope="scope">
  100. <el-link type="primary" target="_blank" @click="openUser(scope.row.uid)">
  101. {{scope.row
  102. .uid}}
  103. </el-link>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="已投递">
  107. <template
  108. slot-scope="scope"
  109. >{{Number(scope.row.applicationState) === 0 ? '否' : scope.row.applicationTime}}</template>
  110. </el-table-column>
  111. <el-table-column label="沟通中">
  112. <template
  113. slot-scope="scope"
  114. >{{Number(scope.row.talkState) === 0 ? '否' : scope.row.lastTalkTime}}</template>
  115. </el-table-column>
  116. <el-table-column label="聊天开始时间">
  117. <template slot-scope="scope">{{scope.row.startTime}}</template>
  118. </el-table-column>
  119. </el-table>
  120. </div>
  121. <div style="margin-top: 10px">
  122. <el-pagination
  123. background
  124. @current-change="changePagination"
  125. layout="total, prev, pager, next"
  126. :current-page.sync="page"
  127. :page-size="pageSize"
  128. :total="total"
  129. ></el-pagination>
  130. </div>
  131. </el-col>
  132. </el-row>
  133. <el-row style="margin-top: 20px">
  134. <el-col :span="18">
  135. <div class="title-wrapper">
  136. <div class="title">审核记录</div>
  137. </div>
  138. <div style="margin-top:5px" v-for="item in recruitData.auditList" :key="item.id">
  139. <el-card shadow="never">
  140. <el-row>
  141. <el-col :span="12">
  142. <div style="font-weight: 700">{{item.status_name}}--{{item.is_auto?'系统自动审核':'人工审核'}}</div>
  143. </el-col>
  144. <el-col :span="10" :offset="2">
  145. <div @click="openUser(item.audit_uid)">{{item.nickname}} {{item.audit_date}}</div>
  146. </el-col>
  147. </el-row>
  148. <el-row style="margin-top: 10px" v-if="item.status == '3'">
  149. <el-col :span="12">
  150. <div style="font-weight: 700">拒绝理由:</div>
  151. <div style="padding: 5px">&nbsp;&nbsp;{{item.audit_data.reason || ''}}</div>
  152. </el-col>
  153. </el-row>
  154. </el-card>
  155. </div>
  156. </el-col>
  157. </el-row>
  158. <el-dialog title="请输入审核不通过的原因" :visible.sync="isDialogShow">
  159. <el-form :model="form">
  160. <el-form-item label>
  161. <el-input v-model="form.reason"></el-input>
  162. </el-form-item>
  163. </el-form>
  164. <div slot="footer" class="dialog-footer">
  165. <el-button @click="handleCancleClick()">取 消</el-button>
  166. <el-button type="primary" @click="handleComfirmClick()">确 定</el-button>
  167. </div>
  168. </el-dialog>
  169. </div>
  170. </template>
  171. <script>
  172. export default {
  173. data() {
  174. return {
  175. isDialogShow: false,
  176. recruitId: "",
  177. recruitData: {
  178. developers: [],
  179. companyInfo: {},
  180. auditList: [],
  181. },
  182. form: {
  183. reason: "",
  184. },
  185. recruitDataList: [],
  186. total: 0,
  187. pageSize: 20,
  188. page: 1,
  189. };
  190. },
  191. mounted() {
  192. this.recruitId = this.$route.query.id;
  193. this.getRecruit();
  194. this.getRecruitData();
  195. },
  196. methods: {
  197. async getRecruit() {
  198. const recruitId = this.recruitId;
  199. const data = {
  200. recruitId,
  201. };
  202. let res = await this.$post("/api/admin/recruit/getRecruit", data);
  203. if (res && res.status === 1) {
  204. this.recruitData = res.data;
  205. console.log(this.recruitData);
  206. }
  207. },
  208. async getRecruitData() {
  209. const recruitId = this.recruitId;
  210. let res = await this.$post("/api/admin/recruit/getRecruitData", {
  211. recruitId: recruitId,
  212. page: this.page,
  213. });
  214. this.recruitDataList = res.data.list;
  215. this.pageSize = res.data.size * 1;
  216. this.total = res.data.total * 1;
  217. },
  218. changePagination(page) {
  219. this.page = page;
  220. this.getRecruitData();
  221. },
  222. handleOwnerClick() {
  223. const recruitData = this.recruitData;
  224. // 前往老的后台
  225. window.open(
  226. this.$store.state.domainConfig.siteUrl +
  227. `/rooter/user/${recruitData.uid}`
  228. );
  229. },
  230. handleCompanyClick() {
  231. const recruitData = this.recruitData;
  232. window.open(
  233. this.$store.state.domainConfig.siteUrl + `/company/${recruitData.uid}`
  234. );
  235. },
  236. openUser(uid) {
  237. let url = window.location.href;
  238. let jumpUrl = "";
  239. jumpUrl = this.$store.state.domainConfig.siteUrl + `/wo/${uid}`;
  240. window.open(jumpUrl, "_black");
  241. },
  242. async handleApproveClick(recruitId) {
  243. const action = "approve";
  244. const data = {
  245. recruitId,
  246. action,
  247. };
  248. let res = await this.$post("/api/admin/recruit/audit", data);
  249. if (res && res.status === 1) {
  250. console.log(res);
  251. this.$message({
  252. message: res.info,
  253. type: "success",
  254. });
  255. await this.getRecruit();
  256. }
  257. },
  258. async handleRejectClick(recruitId) {
  259. this.recruitId = recruitId;
  260. this.isDialogShow = true;
  261. },
  262. handleCancleClick() {
  263. this.form = {
  264. reason: "",
  265. };
  266. this.isDialogShow = false;
  267. },
  268. async handleComfirmClick() {
  269. const recruitId = this.recruitId;
  270. const action = "reject";
  271. const reason = this.form.reason;
  272. const data = {
  273. recruitId,
  274. action,
  275. reason,
  276. };
  277. let res = await this.$post("/api/admin/recruit/audit", data);
  278. if (res && res.status === 1) {
  279. console.log(res);
  280. this.$message({
  281. message: res.info,
  282. type: "success",
  283. });
  284. await this.getRecruit();
  285. }
  286. this.form = {
  287. reason: "",
  288. };
  289. this.isDialogShow = false;
  290. },
  291. },
  292. };
  293. </script>
  294. <style lang="scss" scoped>
  295. .header {
  296. display: flex;
  297. }
  298. .title-wrapper {
  299. display: flex;
  300. align-items: center;
  301. }
  302. .title {
  303. line-height: 27px;
  304. font-weight: bold;
  305. font-size: 18px;
  306. color: #101010;
  307. }
  308. .status {
  309. margin-left: 6px;
  310. line-height: 20px;
  311. font-size: 14px;
  312. }
  313. .salary {
  314. margin-top: 13px;
  315. line-height: 24px;
  316. font-size: 16px;
  317. color: #101010;
  318. }
  319. .skill {
  320. margin-top: 8px;
  321. line-height: 24px;
  322. font-size: 16px;
  323. color: #101010;
  324. }
  325. .experience {
  326. margin-top: 8px;
  327. line-height: 24px;
  328. font-size: 16px;
  329. color: #101010;
  330. }
  331. .owner-wrapper {
  332. margin-left: 100px;
  333. text-align: center;
  334. }
  335. .owner-img {
  336. width: 53px;
  337. height: 53px;
  338. border-radius: 50%;
  339. }
  340. .owner-name {
  341. margin-top: 8px;
  342. line-height: 20px;
  343. font-size: 14px;
  344. color: #3f51b5;
  345. }
  346. .description-wrapper {
  347. margin-top: 50px;
  348. }
  349. .description-title {
  350. line-height: 27px;
  351. font-weight: bold;
  352. font-size: 18px;
  353. color: #101010;
  354. }
  355. .description-content {
  356. margin-top: 16px;
  357. line-height: 24px;
  358. font-size: 16px;
  359. color: #101010;
  360. }
  361. .company-info {
  362. display: flex;
  363. flex: 2;
  364. line-height: 2;
  365. }
  366. .company-info .description {
  367. overflow: hidden;
  368. height: 30px;
  369. max-width: 300px;
  370. word-wrap: normal;
  371. text-overflow: ellipsis;
  372. white-space: nowrap;
  373. word-break: keep-all;
  374. }
  375. .actions {
  376. display: flex;
  377. width: 180px;
  378. align-items: center;
  379. text-align: center;
  380. }
  381. </style>