add.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714
  1. <template>
  2. <div class="container">
  3. <skillCertHeader title="技术等级认证"></skillCertHeader>
  4. <flow :dataList="flowList"></flow>
  5. <skill-cert-activity></skill-cert-activity>
  6. <div class="description rule">
  7. <div class="col-title">
  8. <span class="label">评级细则</span>
  9. </div>
  10. <div class="rule-content">
  11. <div class="text" v-for="(item,index) in rules" :key="index">
  12. <p class="text-title">{{item.title}}</p>
  13. <a v-if="item.linkUrl" class="text-content text-content--a" :href="item.linkUrl" target="view_window">{{item.content}}</a>
  14. <p v-else class="text-content" v-html="item.content"></p>
  15. </div>
  16. </div>
  17. </div>
  18. <div class="description condition" style="display: none">
  19. <div class="col-title">
  20. <span class="label">申请条件</span>
  21. </div>
  22. <div class="item" v-for="(item,index) in conditions" :key="index">
  23. <span class="text">{{item.text}}</span>
  24. <a v-if="item.linkUrl" :click="cnzz('技术认证','等级对照表1')" class="action" :href="item.linkUrl" target="view_window">{{item.linkName}}</a>
  25. </div>
  26. </div>
  27. <!-- 技能认证:start -->
  28. <div class="col-title width-infinity">
  29. <span class="label">目标技术栈</span>
  30. </div>
  31. <div class="skill-cert width-infinity">
  32. <div class="field-selector skill-cert-status-main">
  33. <span class="selector-title">选择认证方向:</span>
  34. <div class="fields skill-cert-select">
  35. <occupation_direction @change="directionChange"/>
  36. </div>
  37. <div class="skill-cert-status">{{freeworkLevel == 0 ? '未认证':'技术'+freeworkLevel+"级"}}</div>
  38. </div>
  39. <div class="skill-cret-list">
  40. <skills></skills>
  41. </div>
  42. </div>
  43. <!-- 技能认证:end -->
  44. <div class="level-selector">
  45. <div class="col-title">
  46. <span class="label">选择认证等级</span>
  47. </div>
  48. <span class="action" @click="toLevelsDesc">等级对照表</span>
  49. <img class="icon" @click="toLevelsDesc" src="@/assets/img/skill_cert/icon_tips.png" alt=""/>
  50. </div>
  51. <div class="level-selector">
  52. <el-select v-model="level" placeholder="认证等级" clearable @change="handleLevelChange">
  53. <el-option
  54. v-for="dict in levels"
  55. :key="dict.item_id"
  56. :label="dict.name"
  57. :value="dict.item_id"
  58. />
  59. </el-select>
  60. </div>
  61. <p class="field-tips" style="padding-top: 15px">最终定级由面试表现协定;认证一般没有失败,除非您的技术能力低于最低要求</p>
  62. <p class="field-tips" style="margin-top: 10px">参与技术认证,赠送1个月<a href="/type/vip/developer" style="color:#4D81BF">开发者会员</a><span class="time-waring">(限时)</span></p>
  63. <p class="field-tips" v-show="currentFieldId" style="margin-top: 10px">认证收费将支付给面试官,而非平台,详情见等级对照表</p>
  64. <div v-show="imgShow" class="col-title width-infinity upload-title">
  65. <span class="label">上传薪资证明</span>
  66. </div>
  67. <p v-show="imgShow" class="field-tips">目标T5级(对标阿里P7),最低40W以上年薪</p>
  68. <p v-show="imgShow" class="field-tips">目标T6级(对标阿里P8),最低65W以上年薪</p>
  69. <div v-show="imgShow" class="width-infinity upload-action">
  70. <el-upload
  71. class="upload-demo"
  72. drag
  73. action="/upload_image"
  74. :on-success="handleSuccess"
  75. :on-error="handleError"
  76. :on-remove="handleRemove"
  77. :before-upload="beforeAvatarUpload"
  78. :on-preview="handlePreview"
  79. :file-list="fileList"
  80. list-type="picture"
  81. accept=".jpg,.jpeg,.png,.JPG,.PNG,.JPEG"
  82. with-credentials
  83. multiple>
  84. <i class="el-icon-upload"></i>
  85. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  86. <div class="el-upload__tip" slot="tip" style="display: flex;flex-direction: column">
  87. <span>支持5M以内的PNG、JPG、JPEG格式的图片,可上传多张</span>
  88. <br/>
  89. <a href="https://jishuin.proginn.com/p/763bfbd72778" target="view_window" style="font-size: 15px">查看常见薪水证明以及获取方式</a>
  90. </div>
  91. </el-upload>
  92. </div>
  93. <div class="price">
  94. <span class="text">¥{{price||'0.00'}}</span>
  95. <span class="unit"> /次</span>
  96. </div>
  97. <div class="buttons">
  98. <el-button class="submit" type="primary" @click="submit">确认提交</el-button>
  99. </div>
  100. <div class="skill-cert-pay">
  101. <div class="skill-cert-pay-switch">
  102. <el-switch
  103. v-model="value1"
  104. >
  105. </el-switch>
  106. <span class="skill-cert-pay-label">先认证,后付款</span>
  107. <span class="time-waring">(限时)</span>
  108. </div>
  109. <p>
  110. * 支付10元定金参与认证<span class="skill-cert-info">(后续可抵扣)</span> <br>
  111. * 成功接单后将扣除150%的认证费用<br>
  112. * 勾选后不再赠送会员
  113. </p>
  114. </div>
  115. <template v-if="!deviceType.ios && !deviceType.android">
  116. <div class="col-title width-infinity jiedan-title">
  117. <span class="label">他们正在接单</span>
  118. </div>
  119. <div class="job-member-area">
  120. <job-member-list></job-member-list>
  121. </div>
  122. </template>
  123. <el-dialog :visible.sync="dialogVisible">
  124. <img width="100%" :src="dialogImageUrl" alt="">
  125. </el-dialog>
  126. </div>
  127. </template>
  128. <script>
  129. import {mapState} from "vuex"
  130. import flow from "@/components/flow/flow";
  131. import skillCertHeader from "@/components/skill_cert_header/skill_cert_header";
  132. import occupation_direction from "@/components/public/occupation_direction";
  133. import skills from "./components/skills";
  134. import resume_improve from "./resume_improve";
  135. import skillCertActivity from "./components/skill-cert-activity.vue"
  136. import jobMemberList from "./components/job-member-list.vue"
  137. export default {
  138. name: "profile",
  139. components: {
  140. flow, skillCertHeader,skills,occupation_direction,resume_improve,skillCertActivity,jobMemberList
  141. },
  142. data() {
  143. return {
  144. value1:false,
  145. rules: [{
  146. title: '1、认证权益',
  147. content: '* 平台派单时,将第一优先考虑进行过技术认证的用户,技术等级越高,权重越高' +
  148. '<br/>' +
  149. '* 依据技术等级将有更高的参考薪酬' +
  150. '<br/>' +
  151. '* 认证4级以上用户有机会被内邀为面试官' +
  152. '<br/>' +
  153. // '* 面试过程中,将与高水平技术官的进行深层次沟通' +
  154. // '<br/>' +
  155. '* 享有技术专家标识,增加客户信任感',
  156. linkUrl: ''
  157. }, {
  158. title: '2、等级对照表',
  159. content: '《客栈技术等级对照表》',
  160. linkUrl: 'https://proginn.feishu.cn/docs/doccnFJSsH0KZ9cTfQNpSRrZ4Of'
  161. }, {
  162. title: '3、其他说明',
  163. content: '* 技术认证采用线上面试的方式进行,与高水平技术官深层次沟通' + '<br/>' +
  164. '* 可进行多领域认证,也可就已认证领域再次认证' ,
  165. linkUrl: ''
  166. },],
  167. dialogImageUrl: '',
  168. dialogVisible: false,
  169. imgShow: false,
  170. levels: [],
  171. conditions: [],
  172. fields: [],
  173. tagsSelected: [],
  174. tags_2: [],//普通标签
  175. tags_3: [],//应用标签
  176. tags_4: [],//行业标签
  177. flowList: [
  178. {
  179. active: true,
  180. label: '基础信息'
  181. }, {
  182. active: false,
  183. label: '完善简历'
  184. }, {
  185. active: false,
  186. label: '对接面试官'
  187. }, {
  188. active: false,
  189. label: '开始面试'
  190. }, {
  191. active: false,
  192. label: '结束认证'
  193. },
  194. ],
  195. tagText: '',
  196. form: {
  197. skill: [],
  198. pay_status: '1'
  199. },
  200. fileList: [],
  201. level: '',
  202. price: '',
  203. directionFirstLevelValue:"",
  204. directionSecondLevelValue:"",
  205. freeworkLevel:0,
  206. };
  207. },
  208. computed: {
  209. ...mapState(["deviceType"]),
  210. currentFieldId() {
  211. const field = this.fields.find((ele) => ele.selected);
  212. if (!field) {
  213. return null
  214. }
  215. return field.occupation_id;
  216. }
  217. },
  218. created() {
  219. let signLinkUrl;
  220. if (this.deviceType.ios || this.deviceType.android) {
  221. signLinkUrl = 'proginn://developer_sign';
  222. } else {
  223. signLinkUrl = '/sign/new';
  224. }
  225. this.conditions = [
  226. {
  227. text: '* 签约程序员客栈',
  228. linkName: "去签约",
  229. linkUrl: signLinkUrl,
  230. }, {
  231. text: '* 有助于面试官快速了解你',
  232. linkName: "完善简历",
  233. linkUrl: `/wo/${this.userinfo.uid}`,
  234. }, {
  235. text: '* 客栈头像为本人露脸照片',
  236. linkName: "",
  237. linkUrl: "",
  238. }
  239. ]
  240. },
  241. methods: {
  242. toLevelsDesc() {
  243. this.cnzz("技术认证","等级对照表2","")
  244. window.open(`https://proginn.feishu.cn/docs/doccnFJSsH0KZ9cTfQNpSRrZ4Of`)
  245. },
  246. handleLevelChange(value) {
  247. this.imgShow = value === '1105' || value === '1106';
  248. const res = this.levels.find((ele) => {
  249. return ele.item_id === value
  250. });
  251. this.price = res.price
  252. },
  253. handleSuccess(res, file) {
  254. this.fileList.push(file);
  255. },
  256. handleError(err) {
  257. console.log(err)
  258. },
  259. beforeAvatarUpload(file) {
  260. const isJPEG = file.type === 'image/jpeg';
  261. const isJPG = file.type === 'image/jpg';
  262. const isPNG = file.type === 'image/png';
  263. const isLt2M = file.size / 1024 / 1024 < 2;
  264. if (!(isJPG || isPNG || isJPEG)) {
  265. this.$message.error('上传图片只能是 PNG/JPG/JPEG 格式!');
  266. }
  267. if (!isLt2M) {
  268. this.$message.error('上传图片大小不能超过 2MB!');
  269. }
  270. return (isJPG || isJPEG || isPNG) && isLt2M;
  271. },
  272. handleRemove(file, fileList) {
  273. const index = this.fileList.indexOf(file);
  274. this.fileList.splice(index, 1);
  275. },
  276. handlePreview(file) {
  277. this.dialogImageUrl = file.url;
  278. this.dialogVisible = true;
  279. },
  280. directionChange(value) {
  281. let firstItem = value[0]
  282. let secondItem = value[1]
  283. this.directionFirstLevelValue = firstItem.value;
  284. this.directionSecondLevelValue = secondItem.value;
  285. this.freeworkLevel = secondItem.freework_level
  286. },
  287. submit() {
  288. const form = {
  289. product_type: 12,
  290. item_id: this.level,
  291. occupation_id: this.directionFirstLevelValue,//一级方向
  292. direction_id: this.directionSecondLevelValue,//二级方向
  293. file: this.fileList.map((ele) => ele.response.filename).join(','),
  294. id: this.form.id || ''
  295. };
  296. this.$axios.$post(`/uapi/cert/add`, form).then((value) => {
  297. if (value.status === 1) {
  298. // 1未支付,2已支付
  299. if (parseInt(this.form.pay_status) === 1) {
  300. const productId = form.item_id;
  301. const next = '/frontend/skill_cert/profile';
  302. if (this.deviceType.ios || this.deviceType.android) {
  303. location.href = `proginn://pay?product_type=12&product_id=${productId}&next=${next}`
  304. } else {
  305. location.href = `/pay?product_type=12&product_id=${productId}&next=${next}`;
  306. }
  307. } else if (parseInt(this.form.pay_status) === 2) {
  308. this.$parent.set_step(2);
  309. }
  310. }
  311. });
  312. this.cnzz("技术认证","第一步(确认提交)","");
  313. },
  314. async getLevels() {
  315. let res = await this.$axios.$post(`/uapi/pub/freeworklevel`, {occupation_id: 0});
  316. this.levels = res.data.list.map((ele) => {
  317. ele.name += ` ¥${ele.price}`;
  318. ele.name += ele.memo ? ` 【${ele.memo}】` : '';
  319. return ele
  320. });
  321. if (!this.level && this.levels.length) {
  322. this.level = `${this.levels[0].item_id}`
  323. }
  324. this.price = this.levels.find((ele) => {
  325. return ele.item_id === this.level;
  326. }).price;
  327. },
  328. async getDetail() {
  329. let res = await this.$axios.$post(`/uapi/cert/info`);
  330. this.form = res.data;
  331. }
  332. },
  333. async mounted() {
  334. await this.getDetail();
  335. await this.getLevels();
  336. this.cnzz("技术认证","第一步","");
  337. }
  338. }
  339. </script>
  340. <style lang="scss" scoped>
  341. .container {
  342. display: flex;
  343. width: 100%;
  344. max-width: 1200px;
  345. margin: 10px auto;
  346. background: #ffffff;
  347. border-radius: 10px;
  348. padding: 0 25px;
  349. @media(max-width: 900px) {
  350. padding: 0 15px;
  351. }
  352. box-sizing: border-box;
  353. }
  354. .width-infinity {
  355. width: 100%;
  356. }
  357. .description {
  358. width: 100%;
  359. background: #f4f5f9;
  360. border-radius: 8px;
  361. padding-bottom: 32px;
  362. }
  363. .rule {
  364. margin-top: 20px;
  365. margin-bottom: 10px;
  366. .rule-content {
  367. display: flex;
  368. flex-direction: column;
  369. margin: 16px 14px 0 14px;
  370. .text {
  371. display: flex;
  372. flex-direction: column;
  373. &:not(:first-child) {
  374. margin-top: 17px;
  375. }
  376. .text-title {
  377. font-size: 15px;
  378. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  379. font-weight: 600;
  380. color: #222222;
  381. line-height: 24px;
  382. }
  383. .text-content {
  384. margin-top: 5px;
  385. font-size: 15px;
  386. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  387. font-weight: 400;
  388. color: #222222;
  389. line-height: 24px;
  390. &--a {
  391. color: var(--linkColor)
  392. }
  393. }
  394. }
  395. }
  396. }
  397. .condition {
  398. .item {
  399. display: flex;
  400. flex-wrap: wrap;
  401. margin-top: 17px;
  402. .text {
  403. margin-left: 14px;
  404. font-size: 15px;
  405. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  406. font-weight: 400;
  407. text-align: left;
  408. color: #222222;
  409. line-height: 24px;
  410. }
  411. .action {
  412. margin-left: 28px;
  413. margin-right: 14px;
  414. font-size: 15px;
  415. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  416. font-weight: 600;
  417. text-align: left;
  418. color: #308eff;
  419. line-height: 24px;
  420. }
  421. }
  422. }
  423. .col-title {
  424. display: inline-flex;
  425. align-items: center;
  426. height: 43px;
  427. &::before {
  428. content: '';
  429. width: 2px;
  430. height: 14px;
  431. background: #308eff;
  432. border-radius: 2px;
  433. }
  434. .label {
  435. font-size: 16px;
  436. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  437. font-weight: 600;
  438. color: #222222;
  439. padding: 0 10px;
  440. }
  441. }
  442. .field-tips {
  443. width: 100%;
  444. margin-top: 5px;
  445. font-size: 15px;
  446. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  447. font-weight: 400;
  448. color: #222222;
  449. line-height: 24px;
  450. }
  451. .field-selector {
  452. display: flex;
  453. align-items: center;
  454. flex-wrap: wrap;
  455. width: 100%;
  456. margin-top: 33px;
  457. }
  458. .tag-selector {
  459. display: flex;
  460. align-items: center;
  461. flex-wrap: wrap;
  462. width: 100%;
  463. margin-top: 23px;
  464. margin-bottom: 12px;
  465. .tag-input {
  466. width: 200px;
  467. margin-bottom: 10px;
  468. }
  469. }
  470. .selector-title {
  471. font-size: 14px;
  472. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  473. font-weight: 600;
  474. text-align: left;
  475. color: #222222;
  476. line-height: 20px;
  477. margin-right: 16px;
  478. margin-bottom: 10px;
  479. }
  480. .tag {
  481. display: flex;
  482. justify-content: center;
  483. align-items: center;
  484. height: 38px;
  485. background: #308eff;
  486. border-radius: 4px;
  487. padding: 0 10px;
  488. margin-right: 7px;
  489. margin-bottom: 10px;
  490. cursor: pointer;
  491. &--disabled {
  492. cursor: not-allowed;
  493. }
  494. &--unchecked {
  495. opacity: 0.8;
  496. background: #f4f5f9;
  497. border-radius: 4px;
  498. }
  499. .text {
  500. font-size: 14px;
  501. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  502. font-weight: 400;
  503. color: #ffffff;
  504. &--unchecked {
  505. opacity: 0.8;
  506. font-size: 14px;
  507. font-weight: 400;
  508. color: #666666;
  509. line-height: 20px;
  510. }
  511. }
  512. .icon {
  513. width: 16px;
  514. height: 16px;
  515. margin-left: 6px;
  516. }
  517. }
  518. .tags {
  519. display: flex;
  520. align-content: flex-start;
  521. flex-wrap: wrap;
  522. width: 100%;
  523. background: #ffffff;
  524. border: 1px solid #d7dfe8;
  525. border-radius: 8px;
  526. padding: 20px;
  527. margin-bottom: 10px;
  528. }
  529. .level-selector {
  530. display: flex;
  531. align-items: center;
  532. width: 100%;
  533. margin-top: 12px;
  534. .action {
  535. margin-left: 15px;
  536. font-size: 14px;
  537. font-family: PingFangSC, PingFangSC-Medium, sans-serif;
  538. font-weight: 500;
  539. color: #308eff;
  540. line-height: 20px;
  541. cursor: pointer;
  542. }
  543. .icon {
  544. width: 16px;
  545. height: 16px;
  546. cursor: pointer;
  547. }
  548. }
  549. .upload-title {
  550. margin-top: 21px;
  551. }
  552. .upload-action {
  553. margin-top: 20px;
  554. }
  555. .price {
  556. display: flex;
  557. align-items: baseline;
  558. width: 100%;
  559. margin-top: 42px;
  560. margin-bottom: 20px;
  561. .text {
  562. font-size: 30px;
  563. font-family: DIN Alternate, sans-serif;
  564. font-weight: 600;
  565. color: #ff6600;
  566. }
  567. .unit {
  568. font-size: 16px;
  569. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  570. font-weight: 600;
  571. color: #ff6600;
  572. }
  573. }
  574. .buttons {
  575. width: 100%;
  576. .submit {
  577. margin-bottom: 30px;
  578. width: 267px;
  579. height: 58px;
  580. background: #308eff;
  581. border-radius: 8px;
  582. font-size: 18px;
  583. font-family: PingFangSC, PingFangSC-Medium, sans-serif;
  584. font-weight: 500;
  585. color: #ffffff;
  586. line-height: 26px;
  587. }
  588. }
  589. .skill_cert{
  590. header{
  591. display: flex;
  592. justify-content: space-between;
  593. align-items: center;
  594. padding: 13px 20px;
  595. border-bottom: 1px solid #ebeef5;
  596. }
  597. .skill-cert-status-main{
  598. display: flex;
  599. align-items: center;
  600. justify-content:center;
  601. }
  602. }
  603. .skill-cert-status-main{
  604. .selector-title{
  605. margin-bottom: 0;
  606. }
  607. }
  608. .skill-cert-select{
  609. flex:1;
  610. margin-right: 20px;
  611. }
  612. .skill-cert-pay{
  613. width: 100%;
  614. p{
  615. font-size: 15px;
  616. font-family: PingFangSC-Regular, PingFang SC;
  617. font-weight: 400;
  618. color: #0B121A;
  619. line-height: 24px;
  620. }
  621. }
  622. .skill-cert-pay-switch{
  623. display: flex;
  624. // align-items: center;
  625. font-size: 15px;
  626. font-family: PingFangSC-Regular, PingFang SC;
  627. font-weight: 400;
  628. color: #0B121A;
  629. line-height: 21px;
  630. margin-bottom: 15px;
  631. }
  632. .skill-cert-pay-label{
  633. margin-left: 10px;
  634. }
  635. .time-waring{
  636. color:#FF4E28;margin-left:10px
  637. }
  638. .skill-cert-info{
  639. color:#3B94FF
  640. }
  641. .jiedan-title{
  642. margin-top: 35px;
  643. }
  644. .job-member-area{
  645. width: 100%;
  646. }
  647. </style>