jilu.vue 13 KB

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