特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.1 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
3 months ago
6 months ago
  1. <template>
  2. <!-- 我发布的招工 -->
  3. <view class="page">
  4. <navbar title="我的找活"
  5. :title="role ? '我的招工' : '我的找活'"
  6. bgColor="#3796F8"
  7. leftClick
  8. color="#fff"
  9. @leftClick="$utils.navigateBack"/>
  10. <statisticsNumber :title="role ? '您当前的招工' : '您当前的找活'" :num="total"/>
  11. <workListSwipe
  12. :options="options"
  13. v-if="role"
  14. @clickSwipeAction="clickSwipeAction"
  15. :list="list"/>
  16. <userListSwipe
  17. :options="options"
  18. v-else
  19. @clickSwipeAction="clickSwipeAction"
  20. :list="list"/>
  21. <uv-empty mode="list" v-if="list.length == 0"></uv-empty>
  22. </view>
  23. </template>
  24. <script>
  25. import userListSwipe from '@/components/list/userList/userListSwipe.vue'
  26. import workListSwipe from '@/components/list/workList/workListSwipe.vue'
  27. import statisticsNumber from '../components/statistics/statisticsNumber.vue'
  28. import mixinList from '@/mixins/list.js'
  29. import { mapState } from 'vuex'
  30. export default {
  31. mixins : [mixinList],
  32. components : {
  33. userListSwipe,
  34. statisticsNumber,
  35. workListSwipe
  36. },
  37. data() {
  38. return {
  39. options: [
  40. {
  41. text: '修改',
  42. style: {
  43. backgroundColor: '#ffa12c'
  44. }
  45. },
  46. {
  47. text: '删除',
  48. style: {
  49. backgroundColor: '#FA5A0A'
  50. }
  51. },
  52. ],
  53. mixinsListApi : 'employeeQueryResumeByUserId',
  54. }
  55. },
  56. computed : {
  57. ...mapState([
  58. 'role',
  59. ]),
  60. },
  61. onLoad() {
  62. this.mixinsListApi = this.role ? 'bossQueryJobListByUserId' : 'employeeQueryResumeByUserId'
  63. },
  64. methods: {
  65. clickSwipeAction({e, item}){
  66. console.log(e, item);
  67. this[['update', 'del'][e.index]](item)
  68. },
  69. update(item){
  70. uni.navigateTo({
  71. url: '/pages_order/work/jobPosting?jobId=' + item.id
  72. })
  73. },
  74. del(item){
  75. uni.showModal({
  76. title: '确认删除该招工吗',
  77. success : (r) => {
  78. if(r.confirm){
  79. this.$api('deleteJob', {
  80. jobId : item.id
  81. }, res => {
  82. this.getData();
  83. })
  84. }
  85. }
  86. })
  87. },
  88. }
  89. }
  90. </script>
  91. <style scoped lang="scss">
  92. .page{
  93. /deep/ .uv-swipe-action{
  94. width: 100%;
  95. }
  96. }
  97. </style>