add.vue 17 KB

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