jiluUser.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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;" @click="goMaps(item)">
  39. <view class="" style="width: 25%;">
  40. 面试地点:
  41. </view>
  42. <view class="" style="width: 75%;">
  43. {{item.detailedAddress}}
  44. <u-icon name="map-fill" color="#00B88F" size="28"></u-icon>
  45. </view>
  46. </view>
  47. <view class="flex" style="margin-top: 10rpx;">
  48. <view class="" style="width: 25%;">
  49. 面试备注:
  50. </view>
  51. <view class="" style="width: 75%;">
  52. {{item.remarks}}
  53. </view>
  54. </view>
  55. </view>
  56. <view style="width: 100%;height: 1rpx;background: #EEEEEE;" v-if="item.status == 1"></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.postPushId)">岗位详情</view>
  60. </view>
  61. <view v-if="item.status == 1" class="flex align-center">
  62. <view class="btn" @click.stop="userUpdateInter(item.recordId,2)">拒绝</view>
  63. </view>
  64. <view v-if="item.status == 1" class="flex align-center">
  65. <view class="btn" @click.stop="userUpdateInter(item.recordId,1)">接受</view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <empty v-if="goods.length==0" />
  71. </view>
  72. </template>
  73. <script>
  74. import meTabs from "@/components/mescroll-uni/me-tabs/me-tabs.vue";
  75. import empty from '@/components/empty.vue'
  76. export default {
  77. components: {
  78. meTabs,
  79. empty
  80. },
  81. data() {
  82. return {
  83. count: 0,
  84. goods: [], // 数据列表
  85. tabs: [{
  86. name: '全部',
  87. status: 0
  88. }, {
  89. name: '待接受',
  90. status: 1
  91. }, {
  92. name: '已接受',
  93. status: 2
  94. }, {
  95. name: '已拒绝',
  96. status: 3
  97. }, {
  98. name: '已过期',
  99. status: 4
  100. }],
  101. tabIndex: 0, // tab下标
  102. page: 1,
  103. limit: 10,
  104. }
  105. },
  106. onLoad(option) {
  107. this.$queue.showLoading("加载中...");
  108. },
  109. onShow() {
  110. this.getlist()
  111. },
  112. methods: {
  113. //岗位详情
  114. goInfo(postPushId) {
  115. uni.navigateTo({
  116. url: '/pages/index/game/order?postPushId=' + postPushId
  117. })
  118. },
  119. userUpdateInter(recordId, type) {
  120. let content = ''
  121. let that = this
  122. if (type == 1) {
  123. content = '确定接受该面试邀请?'
  124. } else {
  125. content = '确定拒绝该面试邀请?'
  126. }
  127. uni.showModal({
  128. title: '提示',
  129. content: content,
  130. confirmColor: '#00b88f',
  131. complete(ret) {
  132. if (ret.confirm) {
  133. let data = {
  134. recordId: recordId,
  135. type: type
  136. }
  137. that.$Request.getT('/app/interviewRecord/userUpdateInter', data).then(res => {
  138. if (res.code == 0) {
  139. uni.showToast({
  140. title: type == 1 ? '已接受' : '已拒绝'
  141. })
  142. that.page == 1
  143. that.getlist()
  144. } else {
  145. uni.showToast({
  146. title: res.msg,
  147. icon: 'none'
  148. })
  149. }
  150. })
  151. }
  152. }
  153. })
  154. },
  155. //拉起导航
  156. goMaps(info) {
  157. uni.openLocation({
  158. latitude: info.lat,
  159. longitude: info.lng,
  160. address: info.detailedAddress,
  161. name: info.detailedAddress,
  162. complete(ret) {
  163. }
  164. })
  165. },
  166. getlist() {
  167. let data = {
  168. status: this.tabIndex == 0 ? '' : this.tabIndex,
  169. page: this.page,
  170. limit: this.limit,
  171. userId: uni.getStorageSync('userId')
  172. }
  173. this.$Request.getT('/app/interviewRecord/interviewList', data).then(res => {
  174. if (res.code == 0) {
  175. if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
  176. res.data.records.forEach(ret => {
  177. if (ret.status == 1) {
  178. ret.statusName = '待接受'
  179. } else if (ret.status == 2) {
  180. ret.statusName = '已接受'
  181. } else if (ret.status == 3) {
  182. ret.statusName = '已拒绝'
  183. } else if (ret.status == 4) {
  184. ret.statusName = '已过期'
  185. }
  186. this.goods.push(ret)
  187. })
  188. this.count = res.data.total
  189. }
  190. uni.hideLoading()
  191. })
  192. },
  193. // 切换菜单
  194. tabChange(e) {
  195. console.log(e)
  196. this.tabIndex = e
  197. this.goods = []; // 置空列表,显示加载进度条
  198. this.getlist()
  199. },
  200. goNav(url) {
  201. uni.navigateTo({
  202. url
  203. })
  204. }
  205. },
  206. onReachBottom: function() {
  207. if (this.goods.length == this.count) {
  208. uni.showToast({
  209. title: '已经到底了',
  210. icon: 'none'
  211. })
  212. } else {
  213. this.page = this.page + 1;
  214. this.getlist()
  215. }
  216. },
  217. onPullDownRefresh: function() {
  218. this.page = 1;
  219. this.getlist()
  220. }
  221. }
  222. </script>
  223. <style lang="scss">
  224. /*
  225. sticky生效条件:
  226. 1、父元素不能overflow:hidden或者overflow:auto属性。(mescroll-body设置:sticky="true"即可, mescroll-uni本身没有设置overflow)
  227. 2、必须指定top、bottom、left、right4个值之一,否则只会处于相对定位
  228. 3、父元素的高度不能低于sticky元素的高度
  229. 4、sticky元素仅在其父元素内生效,所以父元素必须是 mescroll
  230. */
  231. .sticky-tabs {
  232. z-index: 990;
  233. position: sticky;
  234. top: var(--window-top);
  235. // background-color: #fff;
  236. }
  237. page {
  238. background-color: #F7F7F7;
  239. }
  240. .bg {
  241. background-color: #FFFFFF;
  242. }
  243. .box {
  244. background: #FFFFFF;
  245. border-radius: 24upx;
  246. margin: 30upx;
  247. }
  248. .argrtn {
  249. background: #F6F6F6;
  250. color: #666666;
  251. font-size: 24upx;
  252. border-radius: 8upx;
  253. padding: 5upx 20upx;
  254. margin-right: 20upx;
  255. margin-bottom: 20upx;
  256. }
  257. .btn {
  258. border: 1px solid #00B88F;
  259. border-radius: 30px;
  260. color: #00B88F;
  261. padding: 14upx 35upx;
  262. margin-left: 20upx;
  263. }
  264. </style>