add.vue 17 KB

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