interviewInvitation.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <template>
  2. <view class="container">
  3. <view class="detail-bg"></view>
  4. <nav-bar title="面试邀约"></nav-bar>
  5. <view class="content">
  6. <view class="detail-title">邀请面试</view>
  7. <view class="card-box">
  8. <view class="cell">
  9. <view class="cell-label">面试类型</view>
  10. <u-radio-group v-model="radioValue">
  11. <u-radio name="0">线下面试</u-radio>
  12. <u-radio name="1">线上面试</u-radio>
  13. </u-radio-group>
  14. </view>
  15. <view class="cell">
  16. <view class="cell-label">面试职位</view>
  17. <view class="cell-input" hover-class="cell-hover" @click="position = true">
  18. <view class="m-ellipsis">
  19. {{ selectedJob ? selectedJob.title + ' · ' + selectedJob.salary : '请选择职位' }}</view>
  20. <image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
  21. </view>
  22. </view>
  23. <view class="cell" v-if="radioValue == 0">
  24. <view class="cell-label">面试地址</view>
  25. <view class="cell-input" hover-class="cell-hover" @click="goPage('address')">
  26. <view class="m-ellipsis">{{selectedAddress || '请选择地址'}}</view>
  27. <image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
  28. </view>
  29. </view>
  30. <view class="cell" v-if="radioValue == 1">
  31. <view class="cell-label">面试方式</view>
  32. <view class="cell-input" hover-class="cell-hover" @click="method = true">
  33. <view class="m-ellipsis">{{selecteMethodText || '请选择面试方式'}}</view>
  34. <image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
  35. </view>
  36. </view>
  37. <view class="cell">
  38. <view class="cell-label">联系人</view>
  39. <view class="cell-input" hover-class="cell-hover" @click="person = true">
  40. <view class="m-ellipsis">{{personText || '请选择联系人'}}</view>
  41. <image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
  42. </view>
  43. </view>
  44. <view class="explanation">为保证求职者联系到面试企业,求职者接受面试后,可查看职位发布人&联系人的电话</view>
  45. </view>
  46. <view class="card-box" style="padding: 0;">
  47. <view class="note">
  48. <view class="note-label note-time">面试日期</view>
  49. <uni-calendar class="uni-calendar--hook" :showMonth="false" @change="change"
  50. @monthSwitch="monthSwitch" />
  51. </view>
  52. </view>
  53. <!-- 选择时间 -->
  54. <view class="card-box">
  55. <view class="cell" style="margin-bottom: 0;">
  56. <view class="cell-label">开始时间</view>
  57. <view class="cell-input flex-end" hover-class="cell-hover" @click="isShowTime = true">
  58. <view class="m-ellipsis">{{selectedTime || '请选择时间' }}</view>
  59. <image class="cell-icon" src="/static/images/msg/down_arrow.svg" mode="aspectFit"></image>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="card-box">
  64. <view class="note">
  65. <view class="note-label">备注事项</view>
  66. <view class="textarea-wrapper">
  67. <textarea v-model="textareaValue" placeholder-class="placeholder-text"
  68. placeholder="请输入告知求职者的其他内容,例如具体路线,所需材料等。" @input="updateLength" :maxlength="140">
  69. </textarea>
  70. <view class="word-count"><text style="color: #016BF6;">{{ textareaLength }}</text>/140</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <u-button class="btn" @click="rules = true">发送面试邀请</u-button>
  76. <!-- 面试职位 -->
  77. <u-popup v-model="position" mode="bottom" border-radius="40">
  78. <view class="pop-content">
  79. <view class="pop-title">选择面试职位</view>
  80. <view class="pop-card">
  81. <view class="pop-card-item" v-for="(item, index) in jobList" :key="index" @click="chooseJob(item)">
  82. <u-radio-group v-model="popRadioValue">
  83. <u-radio :name="item.id"></u-radio>
  84. </u-radio-group>
  85. <view>{{ item.title }}</view>
  86. <view class="pop-tag">
  87. {{ item.city }}
  88. <u-line color="#999999" direction="col" length="20rpx" margin="10rpx"></u-line>
  89. {{ item.edu }}
  90. <u-line color="#999999" direction="col" length="20rpx" margin="10rpx"></u-line>
  91. {{ item.salary }}
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </u-popup>
  97. <!-- 选择联系人 -->
  98. <u-popup v-model="person" mode="bottom" border-radius="40">
  99. <view class="pop-content">
  100. <view class="pop-title">
  101. <view>选择联系人</view>
  102. <view class="note">您可填写其他面试联系人电话,请保证已获得其授权同意,求职者接受面试后可以查看该号码</view>
  103. </view>
  104. <view class="pop-card">
  105. <view class="person-item" v-for="(item,index) in personList" :key="item.id"
  106. @click="selectPerson(item)">
  107. <view>{{item.name}}</view>
  108. <view class="pop-phone">{{item.phone}}</view>
  109. <image class="pop-icon" src="/static/images/msg/edit.svg" mode="aspectFit"
  110. @click="goPage('editPerson',item)"></image>
  111. </view>
  112. </view>
  113. <u-button class="pop-btn" @click="goPage('addPerson')">新增联系人</u-button>
  114. </view>
  115. </u-popup>
  116. <!-- 选择面试方式 -->
  117. <u-popup v-model="method" mode="bottom" border-radius="40">
  118. <view class="pop-content">
  119. <view class="pop-title">选择面试方式</view>
  120. <view class="pop-method">
  121. <view
  122. v-for="(item,i) in methodList"
  123. :key="i"
  124. class="method-item"
  125. :class="methodActiveIndex == i?'active-item':''" @click="changeMethod(i,item)">{{ item }}
  126. </view>
  127. <view class="method-text">
  128. <textarea placeholder-class="pop-placeholder-text" placeholder="粘贴会议邀请信息">
  129. </textarea>
  130. </view>
  131. </view>
  132. <u-button class="btn btn-m" @click="method = false">确定</u-button>
  133. </view>
  134. </u-popup>
  135. <!-- 选择时间 -->
  136. <u-popup v-model="isShowTime" mode="bottom" border-radius="40">
  137. <view class="pop-content">
  138. <view class="pop-title">请选择面试开始时间</view>
  139. <picker-view :value="timeValue" @change="bindChange" class="picker-view">
  140. <picker-view-column>
  141. <view class="item" v-for="(item,index) in hours" :key="index">{{ item }}</view>
  142. </picker-view-column>
  143. <picker-view-column>
  144. <view class="item" v-for="(item,index) in minutes" :key="index">{{ item }}</view>
  145. </picker-view-column>
  146. <picker-view-column>
  147. <view class="item" v-for="(item,index) in meridiem" :key="index">{{ item }}</view>
  148. </picker-view-column>
  149. </picker-view>
  150. <u-button class="pop-time-btn" @click="changeBtn">确定</u-button>
  151. </view>
  152. </u-popup>
  153. <!-- 原则 -->
  154. <u-popup v-model="rules" mode="center" border-radius="40">
  155. <view class="pop-rules">
  156. <view class="pop-text">
  157. <view class="pop-rules-title">约面试诚信原则</view>
  158. <view v-if="isCancel">1.面试前3小时,双方可以申请取消<br />
  159. 2.如不取消,请按时出席,不要爽约<br />
  160. 3.对方爽约,可在平台内投诉<br />
  161. 4.为了方便联系,约面试后上双方自动交换手机联系方式
  162. </view>
  163. <view v-else>请及时关注面试时间,以免忘记面试</view>
  164. </view>
  165. <view class="rules-btn" v-if="isCancel">
  166. <u-button class="cancel" @click="rules = false">思考片刻再决定</u-button>
  167. <u-button class="guarantee" @click="isCancel = false">保证不爽约</u-button>
  168. </view>
  169. <view v-else>
  170. <u-button class="confirm" @click="confirmRules">确认</u-button>
  171. </view>
  172. </view>
  173. </u-popup>
  174. </view>
  175. </template>
  176. <script>
  177. import navBar from "@/components/nav-bar/index.vue";
  178. export default {
  179. data() {
  180. return {
  181. radioValue: 0, //类型
  182. position: false,
  183. textareaValue: '',
  184. textareaLength: 0,
  185. popRadioValue: '',
  186. jobList: [{
  187. id: 1,
  188. title: '亚马逊运营',
  189. city: '深圳',
  190. edu: '本科',
  191. salary: '24-36k·16薪'
  192. },
  193. {
  194. id: 2,
  195. title: '跨境电商专员',
  196. city: '广州',
  197. edu: '大专',
  198. salary: '15-25k·14薪'
  199. },
  200. {
  201. id: 3,
  202. title: '亚马逊运营',
  203. city: '深圳',
  204. edu: '本科',
  205. salary: '24-36k·16薪'
  206. },
  207. {
  208. id: 4,
  209. title: '跨境电商专员',
  210. city: '广州',
  211. edu: '大专',
  212. salary: '15-25k·14薪'
  213. },
  214. {
  215. id: 5,
  216. title: '亚马逊运营',
  217. city: '深圳',
  218. edu: '本科',
  219. salary: '24-36k·16薪'
  220. },
  221. {
  222. id: 6,
  223. title: '跨境电商专员',
  224. city: '广州',
  225. edu: '大专',
  226. salary: '15-25k·14薪'
  227. }
  228. ],
  229. selectedJob: '',
  230. selectedAddress: '',
  231. person: false,
  232. personList: [{
  233. id: 0,
  234. name: '宋先生',
  235. phone: '18888888888'
  236. }],
  237. personText: '',
  238. method: false,
  239. selected: [],
  240. // 选择时间
  241. isShowTime: false,
  242. selectedTime:'',
  243. timeValue: [0, 0, 0],
  244. hours: Array.from({length: 12}, (_, i) => i + 1),
  245. minutes: Array.from({length: 60}, (_, i) => i),
  246. meridiem: ['AM', 'PM'],
  247. methodList:['腾讯会议','钉钉','微信视频','电话面试'],
  248. methodActiveIndex:0,
  249. selecteMethodText:'',
  250. rules:false,
  251. isCancel:true
  252. };
  253. },
  254. components: {
  255. navBar
  256. },
  257. methods: {
  258. change(e) {
  259. console.log('change 返回:', e)
  260. },
  261. monthSwitch(e) {
  262. console.log('monthSwitchs 返回:', e)
  263. },
  264. updateLength(e) {
  265. this.textareaLength = e.target.value.length
  266. },
  267. chooseJob(item) {
  268. this.selectedJob = item;
  269. this.popRadioValue = item.id;
  270. this.position = false;
  271. },
  272. // 选择地址 联系人 以及编辑联系人
  273. goPage(type, item) {
  274. uni.navigateTo({
  275. url: `/pages/msg/selectInterview?type=${type}`,
  276. success: (res) => {
  277. res.eventChannel.emit('sendData', {
  278. type,
  279. item,
  280. callback: (data) => {
  281. console.log(data)
  282. if (type === 'address') {
  283. this.selectedAddress = data.address + data.floor
  284. } else if (type === 'addPerson') {
  285. this.personList.push(data)
  286. } else if (type === 'editPerson') {
  287. const index = this.personList.findIndex(p => p.id === data.id)
  288. if (index !== -1) this.personList.splice(index, 1, data);
  289. this.personText = data.name;
  290. }
  291. }
  292. })
  293. }
  294. })
  295. },
  296. selectPerson(item) {
  297. this.personText = item.name;
  298. this.person = false;
  299. },
  300. bindChange(e) {
  301. this.timeValue = e.detail.value
  302. },
  303. changeBtn(){
  304. const val = this.timeValue
  305. const hour = this.hours[val[0]]
  306. const minute = this.minutes[val[1]]
  307. const ampm = this.meridiem[val[2]]
  308. this.selectedTime = `${hour}:${minute < 10 ? '0' + minute : minute} ${ampm}`
  309. this.isShowTime = false;
  310. },
  311. changeMethod(i,val){
  312. this.methodActiveIndex = i
  313. this.selecteMethodText = val
  314. },
  315. confirmRules(){
  316. this.rules = false;
  317. setTimeout(() => {
  318. this.isCancel = true;
  319. }, 200);
  320. },
  321. }
  322. };
  323. </script>
  324. <style scoped lang="scss">
  325. @import "./css/interviewInvitation.scss";
  326. </style>