add.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  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="cert_type"
  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. cert_type: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. cert_type:this.cert_type ? "2": "1"
  296. };
  297. this.$axios.$post(`/uapi/cert/add`, form).then((value) => {
  298. if (value.status === 1) {
  299. // 1未支付,2已支付
  300. if (parseInt(this.form.pay_status) === 1) {
  301. const productId = form.item_id;
  302. const next = '/frontend/skill_cert/profile';
  303. if (this.deviceType.ios || this.deviceType.android) {
  304. location.href = `proginn://pay?product_type=12&product_id=${productId}&next=${next}`
  305. } else {
  306. location.href = `/pay?product_type=12&product_id=${productId}&next=${next}`;
  307. }
  308. } else if (parseInt(this.form.pay_status) === 2) {
  309. this.$parent.set_step(2);
  310. }
  311. }
  312. });
  313. this.cnzz("技术认证","第一步(确认提交)","");
  314. },
  315. async getLevels() {
  316. let res = await this.$axios.$post(`/uapi/pub/freeworklevel`, {occupation_id: 0});
  317. this.levels = res.data.list.map((ele) => {
  318. ele.name += ` ¥${ele.price}`;
  319. ele.name += ele.memo ? ` 【${ele.memo}】` : '';
  320. return ele
  321. });
  322. if (!this.level && this.levels.length) {
  323. this.level = `${this.levels[0].item_id}`
  324. }
  325. this.price = this.levels.find((ele) => {
  326. return ele.item_id === this.level;
  327. }).price;
  328. },
  329. async getDetail() {
  330. let res = await this.$axios.$post(`/uapi/cert/info`);
  331. this.form = res.data;
  332. }
  333. },
  334. async mounted() {
  335. await this.getDetail();
  336. await this.getLevels();
  337. this.cnzz("技术认证","第一步","");
  338. }
  339. }
  340. </script>
  341. <style lang="scss" scoped>
  342. .container {
  343. display: flex;
  344. width: 100%;
  345. max-width: 1200px;
  346. margin: 10px auto;
  347. background: #ffffff;
  348. border-radius: 10px;
  349. padding: 0 25px;
  350. @media(max-width: 900px) {
  351. padding: 0 15px;
  352. }
  353. box-sizing: border-box;
  354. }
  355. .width-infinity {
  356. width: 100%;
  357. }
  358. .description {
  359. width: 100%;
  360. background: #f4f5f9;
  361. border-radius: 8px;
  362. padding-bottom: 32px;
  363. }
  364. .rule {
  365. margin-top: 20px;
  366. margin-bottom: 10px;
  367. .rule-content {
  368. display: flex;
  369. flex-direction: column;
  370. margin: 16px 14px 0 14px;
  371. .text {
  372. display: flex;
  373. flex-direction: column;
  374. &:not(:first-child) {
  375. margin-top: 17px;
  376. }
  377. .text-title {
  378. font-size: 15px;
  379. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  380. font-weight: 600;
  381. color: #222222;
  382. line-height: 24px;
  383. }
  384. .text-content {
  385. margin-top: 5px;
  386. font-size: 15px;
  387. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  388. font-weight: 400;
  389. color: #222222;
  390. line-height: 24px;
  391. &--a {
  392. color: var(--linkColor)
  393. }
  394. }
  395. }
  396. }
  397. }
  398. .condition {
  399. .item {
  400. display: flex;
  401. flex-wrap: wrap;
  402. margin-top: 17px;
  403. .text {
  404. margin-left: 14px;
  405. font-size: 15px;
  406. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  407. font-weight: 400;
  408. text-align: left;
  409. color: #222222;
  410. line-height: 24px;
  411. }
  412. .action {
  413. margin-left: 28px;
  414. margin-right: 14px;
  415. font-size: 15px;
  416. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  417. font-weight: 600;
  418. text-align: left;
  419. color: #308eff;
  420. line-height: 24px;
  421. }
  422. }
  423. }
  424. .col-title {
  425. display: inline-flex;
  426. align-items: center;
  427. height: 43px;
  428. &::before {
  429. content: '';
  430. width: 2px;
  431. height: 14px;
  432. background: #308eff;
  433. border-radius: 2px;
  434. }
  435. .label {
  436. font-size: 16px;
  437. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  438. font-weight: 600;
  439. color: #222222;
  440. padding: 0 10px;
  441. }
  442. }
  443. .field-tips {
  444. width: 100%;
  445. margin-top: 5px;
  446. font-size: 15px;
  447. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  448. font-weight: 400;
  449. color: #222222;
  450. line-height: 24px;
  451. }
  452. .field-selector {
  453. display: flex;
  454. align-items: center;
  455. flex-wrap: wrap;
  456. width: 100%;
  457. margin-top: 33px;
  458. }
  459. .tag-selector {
  460. display: flex;
  461. align-items: center;
  462. flex-wrap: wrap;
  463. width: 100%;
  464. margin-top: 23px;
  465. margin-bottom: 12px;
  466. .tag-input {
  467. width: 200px;
  468. margin-bottom: 10px;
  469. }
  470. }
  471. .selector-title {
  472. font-size: 14px;
  473. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  474. font-weight: 600;
  475. text-align: left;
  476. color: #222222;
  477. line-height: 20px;
  478. margin-right: 16px;
  479. margin-bottom: 10px;
  480. }
  481. .tag {
  482. display: flex;
  483. justify-content: center;
  484. align-items: center;
  485. height: 38px;
  486. background: #308eff;
  487. border-radius: 4px;
  488. padding: 0 10px;
  489. margin-right: 7px;
  490. margin-bottom: 10px;
  491. cursor: pointer;
  492. &--disabled {
  493. cursor: not-allowed;
  494. }
  495. &--unchecked {
  496. opacity: 0.8;
  497. background: #f4f5f9;
  498. border-radius: 4px;
  499. }
  500. .text {
  501. font-size: 14px;
  502. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  503. font-weight: 400;
  504. color: #ffffff;
  505. &--unchecked {
  506. opacity: 0.8;
  507. font-size: 14px;
  508. font-weight: 400;
  509. color: #666666;
  510. line-height: 20px;
  511. }
  512. }
  513. .icon {
  514. width: 16px;
  515. height: 16px;
  516. margin-left: 6px;
  517. }
  518. }
  519. .tags {
  520. display: flex;
  521. align-content: flex-start;
  522. flex-wrap: wrap;
  523. width: 100%;
  524. background: #ffffff;
  525. border: 1px solid #d7dfe8;
  526. border-radius: 8px;
  527. padding: 20px;
  528. margin-bottom: 10px;
  529. }
  530. .level-selector {
  531. display: flex;
  532. align-items: center;
  533. width: 100%;
  534. margin-top: 12px;
  535. .action {
  536. margin-left: 15px;
  537. font-size: 14px;
  538. font-family: PingFangSC, PingFangSC-Medium, sans-serif;
  539. font-weight: 500;
  540. color: #308eff;
  541. line-height: 20px;
  542. cursor: pointer;
  543. }
  544. .icon {
  545. width: 16px;
  546. height: 16px;
  547. cursor: pointer;
  548. }
  549. }
  550. .upload-title {
  551. margin-top: 21px;
  552. }
  553. .upload-action {
  554. margin-top: 20px;
  555. }
  556. .price {
  557. display: flex;
  558. align-items: baseline;
  559. width: 100%;
  560. margin-top: 42px;
  561. margin-bottom: 20px;
  562. .text {
  563. font-size: 30px;
  564. font-family: DIN Alternate, sans-serif;
  565. font-weight: 600;
  566. color: #ff6600;
  567. }
  568. .unit {
  569. font-size: 16px;
  570. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  571. font-weight: 600;
  572. color: #ff6600;
  573. }
  574. }
  575. .buttons {
  576. width: 100%;
  577. .submit {
  578. margin-bottom: 30px;
  579. width: 267px;
  580. height: 58px;
  581. background: #308eff;
  582. border-radius: 8px;
  583. font-size: 18px;
  584. font-family: PingFangSC, PingFangSC-Medium, sans-serif;
  585. font-weight: 500;
  586. color: #ffffff;
  587. line-height: 26px;
  588. }
  589. }
  590. .skill_cert{
  591. header{
  592. display: flex;
  593. justify-content: space-between;
  594. align-items: center;
  595. padding: 13px 20px;
  596. border-bottom: 1px solid #ebeef5;
  597. }
  598. .skill-cert-status-main{
  599. display: flex;
  600. align-items: center;
  601. justify-content:center;
  602. }
  603. }
  604. .skill-cert-status-main{
  605. .selector-title{
  606. margin-bottom: 0;
  607. }
  608. }
  609. .skill-cert-select{
  610. flex:1;
  611. margin-right: 20px;
  612. }
  613. .skill-cert-pay{
  614. width: 100%;
  615. p{
  616. font-size: 15px;
  617. font-family: PingFangSC-Regular, PingFang SC;
  618. font-weight: 400;
  619. color: #0B121A;
  620. line-height: 24px;
  621. }
  622. }
  623. .skill-cert-pay-switch{
  624. display: flex;
  625. // align-items: center;
  626. font-size: 15px;
  627. font-family: PingFangSC-Regular, PingFang SC;
  628. font-weight: 400;
  629. color: #0B121A;
  630. line-height: 21px;
  631. margin-bottom: 15px;
  632. }
  633. .skill-cert-pay-label{
  634. margin-left: 10px;
  635. }
  636. .time-waring{
  637. color:#FF4E28;margin-left:10px
  638. }
  639. .skill-cert-info{
  640. color:#3B94FF
  641. }
  642. .jiedan-title{
  643. margin-top: 35px;
  644. }
  645. .job-member-area{
  646. width: 100%;
  647. }
  648. </style>