jilu.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <!-- 菜单悬浮的原理: 通过给菜单添加position:sticky实现, 用法超简单, 仅APP端的低端机不兼容 https://caniuse.com/#feat=css-sticky -->
  2. <template>
  3. <view class="page-box">
  4. <navBar title="面试记录" color="#000" />
  5. <view class="page-content">
  6. <view class="sticky-tabs">
  7. <me-tabs
  8. v-model="tabIndex"
  9. nameKey="name"
  10. :tabs="tabs"
  11. @change="tabChange"
  12. ></me-tabs>
  13. </view>
  14. <view>
  15. <view class="box" v-for="(item, index) in goods" :key="index" @click="goNav('bossMianshiDetail?recordId='+item.recordId)">
  16. <view class="flex align-center justify-between padding-lr padding-tb-sm">
  17. <view style="color: #016bf6; font-size: 28rpx; font-weight: bold">{{
  18. item.statusName
  19. }}</view>
  20. <view class="text-sm" style="color: #999999">{{ item.createTime }}</view>
  21. </view>
  22. <view style="width: 100%; height: 1rpx; background: #eeeeee"></view>
  23. <view class="padding-lr padding-tb-sm">
  24. <view class="flex align-center justify-between">
  25. <view class="text-bold" style="color: #1f1f1f; font-size: 38rpx">
  26. {{ item.postPush ? item.postPush.stationName : "" }}
  27. </view>
  28. <view class="" style="color: #016bf6; font-size: 38rpx"
  29. ><text class="text-lg text-bold">{{
  30. item.postPush ? item.postPush.salaryRange : ""
  31. }}</text></view
  32. >
  33. </view>
  34. <view class="flex" style="margin-top: 20rpx">
  35. <view class="" style="width: 25%"> 面试人: </view>
  36. <view class="" style="width: 75%">
  37. {{ item.userEntity ? item.userEntity.userName : "" }}
  38. </view>
  39. </view>
  40. <view class="flex" style="margin-top: 10rpx">
  41. <view class="" style="width: 25%"> 面试时间: </view>
  42. <view class="" style="width: 75%">
  43. {{ item.interviewDateTime }}
  44. </view>
  45. </view>
  46. <view class="flex" style="margin-top: 10rpx">
  47. <view class="" style="width: 25%"> 面试地点: </view>
  48. <view class="" style="width: 75%">
  49. {{ item.detailedAddress }}
  50. </view>
  51. </view>
  52. <view class="flex" style="margin-top: 10rpx">
  53. <view class="" style="width: 25%"> 面试备注: </view>
  54. <view class="" style="width: 75%">
  55. {{ item.remarks }}
  56. </view>
  57. </view>
  58. </view>
  59. <view style="width: 100%; height: 1rpx; background: #eeeeee"> </view>
  60. <view class="flex align-center padding-tb justify-end padding-lr">
  61. <view class="flex align-center">
  62. <view class="btn" @click.stop="goInfo(item)"> 简历详情</view>
  63. </view>
  64. <view class="flex align-center">
  65. <view
  66. class="btn"
  67. v-if="item.status == 1 || item.status == 2"
  68. @click.stop="updataServeType(item)"
  69. >
  70. 修改内容</view
  71. >
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <empty v-if="goods.length == 0" />
  77. <u-popup
  78. v-model="mianshiShow"
  79. mode="bottom"
  80. z-index="998"
  81. :mask-close-able="false"
  82. border-radius="14"
  83. @close="cleanMs"
  84. :closeable="true"
  85. >
  86. <view class="mianshiTitle">面试邀请</view>
  87. <view class="mianshiTime flex justify-center">
  88. <view class="mianshiTime-box flex justify-between align-center">
  89. <view class=""> 面试时间 </view>
  90. <view class="flex align-center mianshiTime-box-ti">
  91. <u-input
  92. disabled
  93. v-model="miamshi.interviewDateTime"
  94. @click="msTime = true"
  95. type="text"
  96. placeholder="请选择面试时间"
  97. />
  98. <u-icon
  99. name="arrow-right"
  100. style="margin-left: 10rpx"
  101. color="#016BF6"
  102. size="28"
  103. @click="msTime = true"
  104. ></u-icon>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="mianshiTime flex justify-center">
  109. <view class="mianshiTime-box flex justify-between align-center">
  110. <view class=""> 面试地址 </view>
  111. <view class="flex align-center mianshiTime-box-ti">
  112. <u-input
  113. disabled
  114. @click="goMap()"
  115. v-model="miamshi.detailedAddress"
  116. type="text"
  117. placeholder="请选择面试地址"
  118. />
  119. <u-icon
  120. name="arrow-right"
  121. style="margin-left: 10rpx"
  122. @click="goMap()"
  123. color="#016BF6"
  124. size="28"
  125. ></u-icon>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="mianshiTime flex justify-center">
  130. <view class="mianshiTime-box" style="border: none">
  131. <view class=""> 备注 </view>
  132. <view class="flex align-center mianshiTime-box-ti">
  133. <u-input
  134. v-model="miamshi.remarks"
  135. type="textarea"
  136. input-align="left"
  137. style="
  138. padding: 10rpx;
  139. background-color: #f2f2f7;
  140. height: 200rpx;
  141. overflow: hidden;
  142. border-radius: 14rpx;
  143. width: 100%;
  144. "
  145. :auto-height="false"
  146. />
  147. </view>
  148. </view>
  149. </view>
  150. <view class="btnm flex justify-center">
  151. <view class="btn-box flex justify-around align-center">
  152. <view class="btn-close btnItem" @click="mianshiShow = false"> 取消 </view>
  153. <view class="btn-sub btnItem" @click="submitMs()"> 确认 </view>
  154. </view>
  155. </view>
  156. </u-popup>
  157. <u-toast ref="uToast" />
  158. <u-picker
  159. v-model="msTime"
  160. mode="time"
  161. :params="params"
  162. @confirm="mianshiConfirm"
  163. confirm-color="#016BF6"
  164. >
  165. </u-picker>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. import meTabs from "@/components/mescroll-uni/me-tabs/me-tabs.vue";
  171. import empty from "@/components/empty.vue";
  172. import navBar from "@/components/nav-bar/index.vue";
  173. export default {
  174. components: {
  175. meTabs,
  176. empty,
  177. navBar
  178. },
  179. data() {
  180. return {
  181. mianshiShow: false, //约面试弹窗
  182. msshow: false,
  183. params: {
  184. year: false,
  185. month: true,
  186. day: true,
  187. hour: true,
  188. minute: true,
  189. second: false,
  190. },
  191. msTime: false,
  192. miamshi: {
  193. interviewDateTime: "", //面试时间
  194. companyId: "", //公司id
  195. remarks: "", //面试备注
  196. userId: "", //面试者id
  197. postPushId: "", //岗位id
  198. province: "", //省
  199. city: "", //市
  200. county: "", //区
  201. lng: "", //经度
  202. lat: "", //纬度
  203. detailedAddress: "", //详细地址
  204. recordId: "", //id
  205. },
  206. count: 0,
  207. goods: [], // 数据列表
  208. tabs: [
  209. {
  210. name: "全部",
  211. status: 0,
  212. },
  213. {
  214. name: "待接受",
  215. status: 1,
  216. },
  217. {
  218. name: "已接受",
  219. status: 2,
  220. },
  221. {
  222. name: "已拒绝",
  223. status: 3,
  224. },
  225. {
  226. name: "已过期",
  227. status: 4,
  228. },
  229. ],
  230. tabIndex: 0, // tab下标
  231. page: 1,
  232. limit: 10,
  233. };
  234. },
  235. onLoad(option) {
  236. this.$queue.showLoading("加载中...");
  237. },
  238. onShow() {
  239. this.getlist();
  240. },
  241. methods: {
  242. goInfo(item) {
  243. console.log(item, "1111111111111");
  244. if (item && item.resumesId) {
  245. uni.navigateTo({
  246. url:'/pages/talentSearch/resumeDetail?resumesId='+item.resumesId+'&postPushId='+item.postPush.postPushId
  247. });
  248. } else {
  249. uni.showToast({
  250. title: "用户不存在",
  251. icon: "none",
  252. });
  253. }
  254. },
  255. updataServeType(item) {
  256. return uni.navigateTo({
  257. url:`/pages/msg/interviewInvitation?recordId=${item.recordId}&postPushId=${item.postPush.postPushId}&resumesId=${item.resumesId}&interviewerId=${item.userEntity.userId}`
  258. })
  259. this.miamshi = {
  260. interviewDateTime: item.interviewDateTime, //面试时间
  261. companyId: item.companyId, //公司id
  262. remarks: item.remarks, //面试备注
  263. userId: item.userId, //面试者id
  264. postPushId: item.postPushId, //岗位id
  265. province: item.province, //省
  266. city: item.city, //市
  267. county: item.county, //区
  268. lng: item.lng, //经度
  269. lat: item.lat, //纬度
  270. detailedAddress: item.detailedAddress, //详细地址
  271. recordId: item.recordId, //id
  272. };
  273. this.mianshiShow = true;
  274. },
  275. submitMs() {
  276. if (!this.miamshi.interviewDateTime) {
  277. this.$refs.uToast.show({
  278. title: "请选择面试时间",
  279. type: "default",
  280. position: "bottom",
  281. });
  282. return;
  283. }
  284. if (!this.miamshi.detailedAddress) {
  285. this.$refs.uToast.show({
  286. title: "请选择面试地点",
  287. type: "default",
  288. position: "bottom",
  289. });
  290. return;
  291. }
  292. let that = this;
  293. uni.showModal({
  294. title: "提示",
  295. content: "确定修改面试邀请吗?",
  296. confirmColor: "#016BF6",
  297. complete(ret) {
  298. if (ret.confirm) {
  299. that.$Request
  300. .postJson("/app/interviewRecord/saveInterview", that.miamshi)
  301. .then((res) => {
  302. if (res.code == 0) {
  303. uni.showToast({
  304. title: "面试邀请已修改",
  305. });
  306. that.mianshiShow = false;
  307. that.page = 1;
  308. that.getlist();
  309. } else {
  310. uni.showToast({
  311. title: res.msg,
  312. icon: "none",
  313. });
  314. }
  315. });
  316. }
  317. },
  318. });
  319. },
  320. // 点击调起地图选择位置
  321. goMap() {
  322. let that = this;
  323. uni.chooseLocation({
  324. success: function (res) {
  325. let arrress = res.address;
  326. let reg = /.+?(省|市|自治区|自治州|县|区)/g;
  327. let adds = arrress.match(reg);
  328. console.log(adds);
  329. that.miamshi.province = adds[0];
  330. that.miamshi.city = adds[1];
  331. that.miamshi.county = adds[2];
  332. that.miamshi.detailedAddress = res.address + "" + res.name;
  333. that.miamshi.lat = res.latitude;
  334. that.miamshi.lng = res.longitude;
  335. },
  336. });
  337. },
  338. //选择面试时间
  339. mianshiConfirm(e) {
  340. //获取当前时间的年份
  341. let date = new Date();
  342. let year = date.getFullYear();
  343. this.miamshi.interviewDateTime =
  344. year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":00";
  345. },
  346. //关闭弹窗的时候清空表单的值
  347. cleanMs() {
  348. this.miamshi = {
  349. interviewDateTime: "", //面试时间
  350. companyId: "", //公司id
  351. remarks: "", //面试备注
  352. userId: "", //面试者id
  353. postPushId: "", //岗位id
  354. province: "", //省
  355. city: "", //市
  356. county: "", //区
  357. lng: "", //经度
  358. lat: "", //纬度
  359. detailedAddress: "", //详细地址
  360. };
  361. },
  362. getlist() {
  363. let data = {
  364. status: this.tabIndex == 0 ? "" : this.tabIndex,
  365. page: this.page,
  366. limit: this.limit,
  367. companyId: uni.getStorageSync("companyId"),
  368. };
  369. this.$Request.getT("/app/interviewRecord/interviewList", data).then((res) => {
  370. if (res.code == 0) {
  371. if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
  372. res.data.records.forEach((ret) => {
  373. if (ret.status == 1) {
  374. ret.statusName = "待接受";
  375. } else if (ret.status == 2) {
  376. ret.statusName = "已接受";
  377. } else if (ret.status == 3) {
  378. ret.statusName = "已拒绝";
  379. } else if (ret.status == 4) {
  380. ret.statusName = "已过期";
  381. }
  382. this.goods.push(ret);
  383. });
  384. this.count = res.data.total;
  385. }
  386. uni.hideLoading();
  387. });
  388. },
  389. // 切换菜单
  390. tabChange(e) {
  391. console.log(e);
  392. this.tabIndex = e;
  393. this.goods = []; // 置空列表,显示加载进度条
  394. this.getlist();
  395. },
  396. goNav(url) {
  397. uni.navigateTo({
  398. url,
  399. });
  400. },
  401. },
  402. onReachBottom: function () {
  403. if (this.goods.length == this.count) {
  404. uni.showToast({
  405. title: "已经到底了",
  406. icon: "none",
  407. });
  408. } else {
  409. this.page = this.page + 1;
  410. this.getlist();
  411. }
  412. },
  413. onPullDownRefresh: function () {
  414. this.page = 1;
  415. this.getlist();
  416. },
  417. };
  418. </script>
  419. <style lang="scss" scoped>
  420. /*
  421. sticky生效条件:
  422. 1、父元素不能overflow:hidden或者overflow:auto属性。(mescroll-body设置:sticky="true"即可, mescroll-uni本身没有设置overflow)
  423. 2、必须指定top、bottom、left、right4个值之一,否则只会处于相对定位
  424. 3、父元素的高度不能低于sticky元素的高度
  425. 4、sticky元素仅在其父元素内生效,所以父元素必须是 mescroll
  426. */
  427. .sticky-tabs {
  428. z-index: 990;
  429. position: sticky;
  430. top: var(--window-top);
  431. // background-color: #fff;
  432. }
  433. .page-box {
  434. position: absolute;
  435. left: 0;
  436. bottom: 0;
  437. right: 0;
  438. top: 0;
  439. overflow: hidden;
  440. display: flex;
  441. flex-direction: column;
  442. .page-content {
  443. flex: 1;
  444. overflow: hidden;
  445. overflow-y: auto;
  446. }
  447. }
  448. .avatorm {
  449. width: 100%;
  450. // height: 100rpx;
  451. margin-top: 20rpx;
  452. color: #000;
  453. .avatorm-box {
  454. width: 90%;
  455. height: 100%;
  456. .avatorm-box-item {
  457. margin-bottom: 10rpx;
  458. .avatorm-box-item-t {
  459. width: 30%;
  460. }
  461. .avatorm-box-item-r {
  462. width: 70%;
  463. }
  464. }
  465. }
  466. }
  467. .mssTitle {
  468. width: 100%;
  469. margin-top: 30rpx;
  470. text-align: center;
  471. font-size: 30rpx;
  472. color: #000;
  473. font-weight: bold;
  474. }
  475. .btnm {
  476. width: 100%;
  477. margin-top: 20rpx;
  478. height: 80rpx;
  479. margin-bottom: 100rpx;
  480. .btn-box {
  481. width: 686rpx;
  482. height: 100%;
  483. .btnItem {
  484. display: flex;
  485. align-items: center;
  486. justify-content: center;
  487. width: 200rpx;
  488. height: 100%;
  489. border-radius: 14rpx;
  490. }
  491. .btn-close {
  492. color: #016bf6;
  493. border: 1rpx solid #016bf6;
  494. }
  495. .btn-sub {
  496. color: #ffffff;
  497. background-color: #016bf6;
  498. }
  499. }
  500. }
  501. .mianshiTime {
  502. width: 100%;
  503. margin-top: 20rpx;
  504. .mianshiTime-box {
  505. padding-bottom: 20rpx;
  506. width: 686rpx;
  507. height: 100%;
  508. color: #000000;
  509. border-bottom: 1rpx solid #f2f2f7;
  510. .mianshiTime-box-ti {
  511. height: 100%;
  512. margin-top: 20rpx;
  513. }
  514. }
  515. }
  516. .mianshiTitle {
  517. width: 100%;
  518. margin-top: 30rpx;
  519. font-size: 30rpx;
  520. text-align: center;
  521. font-weight: bold;
  522. color: #000000;
  523. }
  524. page {
  525. background-color: #f7f7f7;
  526. }
  527. .bg {
  528. background-color: #ffffff;
  529. }
  530. .box {
  531. background: #ffffff;
  532. border-radius: 24rpx;
  533. margin: 30rpx;
  534. }
  535. .argrtn {
  536. background: #f6f6f6;
  537. color: #666666;
  538. font-size: 24rpx;
  539. border-radius: 8rpx;
  540. padding: 5rpx 20rpx;
  541. margin-right: 20rpx;
  542. margin-bottom: 20rpx;
  543. }
  544. .btn {
  545. border: 1px solid #016bf6;
  546. border-radius: 30px;
  547. color: #016bf6;
  548. padding: 14rpx 35rpx;
  549. margin-left: 20rpx;
  550. }
  551. </style>