jobIntention.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <view>
  3. <navBar title="求职意向" color="#000" />
  4. <view class="list flex justify-center">
  5. <view class="list-box">
  6. <view
  7. class="list-box-item flex justify-center"
  8. v-for="(item, index) in list"
  9. :key="index"
  10. >
  11. <view class="list-box-item-con flex justify-between align-center">
  12. <view class="flex flex-wrap list-box-item-con-l">
  13. <view class="list-box-item-con-l-title">
  14. {{ item.ruleClassifyName }}
  15. </view>
  16. <view class="list-box-item-con-l-label flex align-center flex-wrap">
  17. <view
  18. class=""
  19. style="
  20. padding: 10rpx 15rpx 10rpx 15rpx;
  21. background-color: #f6f6f6;
  22. border-radius: 8rpx;
  23. margin-right: 20rpx;
  24. margin-bottom: 20rpx;
  25. "
  26. >
  27. {{ item.postType }}
  28. </view>
  29. <view
  30. class=""
  31. style="
  32. padding: 10rpx 15rpx 10rpx 15rpx;
  33. background-color: #f6f6f6;
  34. border-radius: 8rpx;
  35. margin-right: 20rpx;
  36. margin-bottom: 20rpx;
  37. "
  38. >
  39. {{ item.citys }}
  40. </view>
  41. <view
  42. class=""
  43. style="
  44. padding: 10rpx 15rpx 10rpx 15rpx;
  45. background-color: #f6f6f6;
  46. border-radius: 8rpx;
  47. margin-right: 20rpx;
  48. margin-bottom: 20rpx;
  49. "
  50. >
  51. {{ item.salaryRange }}
  52. </view>
  53. </view>
  54. <view class="list-box-item-con-l-type flex align-center">
  55. <view class="" v-for="(ite, ind) in item.industry.split(',')" :key="ind">
  56. {{ ite }}
  57. <text
  58. style="margin-left: 20rpx; margin-right: 20rpx"
  59. v-if="ind + 1 != item.industry.split(',').length"
  60. >|</text
  61. >
  62. </view>
  63. </view>
  64. </view>
  65. <view class="list-box-item-con-r flex align-center">
  66. <u-icon
  67. name="trash"
  68. color="#999999"
  69. size="46"
  70. @click="deleteJob(item.intentionId)"
  71. ></u-icon>
  72. <text style="margin: 0 10rpx; color: #f2f2f2; font-size: 46rpx">|</text>
  73. <u-icon
  74. name="edit-pen"
  75. color="#016BF6"
  76. size="46"
  77. @click="upData(item.intentionId)"
  78. ></u-icon>
  79. </view>
  80. </view>
  81. </view>
  82. <empty v-if="list.length == 0" />
  83. </view>
  84. </view>
  85. <!-- add -->
  86. <view class="addBtn flex justify-center" v-if="list.length < 3">
  87. <view class="addBtn-box flex justify-center align-center" @tap="gotoNav()">
  88. 添加求职意向
  89. </view>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. import empty from "../../components/empty.vue";
  95. import navBar from "@/components/nav-bar/index.vue";
  96. export default {
  97. components: {
  98. empty,
  99. navBar,
  100. },
  101. data() {
  102. return {
  103. list: [],
  104. };
  105. },
  106. onLoad() {},
  107. onShow() {
  108. this.getMyList();
  109. },
  110. methods: {
  111. /**
  112. * @param {Object} intentionId
  113. * 删除求职意向
  114. */
  115. deleteJob(intentionId) {
  116. let that = this;
  117. uni.showModal({
  118. title: "提示",
  119. content: "确认删除此求职意向吗?",
  120. complete(ret) {
  121. if (ret.confirm) {
  122. that.$Request
  123. .postT("/app/intention/deleteIntention", {
  124. intentionId: intentionId,
  125. })
  126. .then((res) => {
  127. if (res.code == 0) {
  128. uni.showToast({
  129. title: "删除成功",
  130. });
  131. that.getMyList();
  132. } else {
  133. uni.showToast({
  134. title: res.msg,
  135. icon: "none",
  136. });
  137. }
  138. });
  139. }
  140. },
  141. });
  142. },
  143. /**
  144. * 获取我的求职意向列表
  145. */
  146. getMyList() {
  147. this.$Request.get("/app/intention/getIntentionList").then((res) => {
  148. if (res.code == 0) {
  149. this.list = res.data.records;
  150. }
  151. });
  152. },
  153. upData(intentionId) {
  154. uni.navigateTo({
  155. url: "./edit?intentionId=" + intentionId,
  156. });
  157. },
  158. //查询简历信息
  159. getResumesByUserId() {
  160. this.$Request.getT("/app/resumes/selectResumesByUserId").then((res) => {
  161. if (res.code == 0) {
  162. if (res.data) {
  163. uni.navigateTo({
  164. url: "./add",
  165. });
  166. } else {
  167. uni.showModal({
  168. title: "提示",
  169. content: "你还为添加简历,请添加简历后再添加求职意向",
  170. confirmColor: "#016BF6",
  171. confirmText: "添加简历",
  172. complete(ret) {
  173. if (ret.confirm) {
  174. uni.navigateTo({
  175. url: "/package/my/resume",
  176. });
  177. }
  178. },
  179. });
  180. }
  181. } else {
  182. uni.showToast({
  183. title: res.msg,
  184. icon: "none",
  185. });
  186. }
  187. });
  188. },
  189. gotoNav() {
  190. this.getResumesByUserId();
  191. },
  192. },
  193. };
  194. </script>
  195. <style lang="scss">
  196. page {
  197. background: #f2f2f7;
  198. }
  199. .list {
  200. width: 100%;
  201. height: auto;
  202. margin-top: 30rpx;
  203. .list-box {
  204. width: 686rpx;
  205. height: auto;
  206. .list-box-item {
  207. width: 100%;
  208. // height: 227rpx;
  209. background: #ffffff;
  210. border-radius: 24rpx;
  211. margin-bottom: 20rpx;
  212. }
  213. .list-box-item-con {
  214. width: 626rpx;
  215. height: 100%;
  216. padding-top: 20rpx;
  217. padding-bottom: 20rpx;
  218. .list-box-item-con-l {
  219. width: 80%;
  220. height: 100%;
  221. align-items: center;
  222. align-content: center;
  223. .list-box-item-con-l-title {
  224. width: 100%;
  225. color: #1f1f1f;
  226. font-size: 38rpx;
  227. font-weight: 800;
  228. }
  229. .list-box-item-con-l-label {
  230. width: 100%;
  231. margin-top: 20rpx;
  232. color: #666666;
  233. font-size: 28rpx;
  234. }
  235. .list-box-item-con-l-type {
  236. width: 100%;
  237. // margin-top: 20rpx;
  238. color: #999999;
  239. font-size: 28rpx;
  240. }
  241. }
  242. .list-box-item-con-r {
  243. // width: 46rpx;
  244. height: 46rpx;
  245. z-index: 9999;
  246. }
  247. }
  248. }
  249. }
  250. .addBtn {
  251. width: 100%;
  252. height: 88rpx;
  253. position: fixed;
  254. bottom: 100rpx;
  255. .addBtn-box {
  256. width: 686rpx;
  257. height: 100%;
  258. border-radius: 44rpx;
  259. background-color: #016bf6;
  260. color: #ffffff;
  261. font-size: 32rpx;
  262. font-weight: bold;
  263. }
  264. }
  265. </style>