occdb_search_industry.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. <template>
  2. <div class="occdb_search_industry">
  3. <head-component :headinfo=headinfo ref="headinfoRef"></head-component>
  4. <div class="page-content">
  5. <div class="content-left">
  6. <div class="tab-box">
  7. <div :class="[onePage?'item-box-active':'item-box']" @click="showPage(1)">
  8. <img v-if="onePage" src="@/assets/images/environment/career/01-active.png">
  9. <img v-else src="@/assets/images/environment/career/01.png">
  10. 行业分类查询
  11. </div>
  12. <div :class="[twoPage?'item-box-active':'item-box']" @click="showPage(2)">
  13. <img v-if="twoPage" src="@/assets/images/environment/career/02-active.png">
  14. <img v-else src="@/assets/images/environment/career/02.png">
  15. 霍兰徳码查询
  16. </div>
  17. <div :class="[threePage?'item-box-active':'item-box']" @click="showPage(3)">
  18. <img v-if="threePage" src="@/assets/images/environment/career/03-active.png">
  19. <img v-else src="@/assets/images/environment/career/03.png">
  20. 关键字查询
  21. </div>
  22. </div>
  23. </div>
  24. <div class="content-right">
  25. <div class="one-page" v-show="onePage">
  26. <div class="top">
  27. 行业分类是把从事国民经济生产和服务的单位或个体,按生产同类产品或具有相同工艺或提供同类服务的经济活动类别,划分的结构体系。未来社会需要各式各样的人才,在每个行业领域都能为社会做出贡献,实现自己的人生价值。
  28. <div class="search-btn">
  29. <img @click="jumpTo('/xjc-integratedmachine/environment/occdb_search_industry_list')" style="z-index:10" src="@/assets/images/environment/search-btn.png">
  30. </div>
  31. </div>
  32. </div>
  33. <div class="one-page" v-show="twoPage">
  34. <div class="top">
  35. 心理学家霍兰德归纳了六种职业兴趣类型:现实型(R)、研究型(I)、艺术型(A)、社会型(S)、企业型(E)常规型(C)。个体完成职业兴趣测评后,可査询与霍兰德代码(一码、二码、三码)相对应的职业,详细了解相关的职业信息。(注:点击顺序即为霍兰德代码顺序,请按兴趣强弱依次选择类型)-->
  36. <div class="search-btn">
  37. <img @click="jumpTo('/xjc-integratedmachine/environment/occdb_interestcode')" style="z-index:10" src="@/assets/images/environment/search-btn.png">
  38. </div>
  39. </div>
  40. </div>
  41. <div class="one-page" v-show="threePage">
  42. <div class="input-component">
  43. <div class="input-search">
  44. <el-input
  45. v-model="form.name"
  46. style="width: 1392px;height: 84px"
  47. placeholder="请输入关键字"
  48. @input="byKeyWord"
  49. >
  50. <template #suffix>
  51. <span @click="clearResult"
  52. style="font-size: 38px;color: #444040;margin-left: 37px;">
  53. X
  54. </span>
  55. </template>
  56. </el-input>
  57. <div @click="byKeyWord">
  58. 开始查询
  59. </div>
  60. </div>
  61. </div>
  62. <div class="result-box">
  63. <div class="two-page-result">
  64. <div v-for="(item,index) in data_list"
  65. :class="[item.selected?'item-result-box-active':'item-result-box']"
  66. @click="toDetail(item)">
  67. <div v-html="item.name"></div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <drag_component></drag_component>
  74. </div>
  75. <div>
  76. <!--院校属地-->
  77. <el-dialog v-model="showAreaChoose" width="1000px" append-to-body>
  78. <div class="dialog-box">
  79. <div v-for="dict in gk_province" :key="dict.value" @click="chooseArea(dict)">
  80. <p>
  81. {{ dict.label }}
  82. </p>
  83. </div>
  84. </div>
  85. </el-dialog>
  86. </div>
  87. <div>
  88. <!--学历层次-->
  89. <el-dialog v-model="showEducationlevel" width="1000px" append-to-body>
  90. <div class="dialog-box dialog-box2">
  91. <div v-for="dict in educationlevel" :key="dict.value" @click="chooseEducationlevel(dict)">
  92. <p>
  93. {{ dict.label }}
  94. </p>
  95. </div>
  96. </div>
  97. </el-dialog>
  98. </div>
  99. <div>
  100. <!--特色-->
  101. <el-dialog v-model="showCharacteristic" width="1000px" append-to-body>
  102. <div class="dialog-box">
  103. <div v-for="dict in characteristic" :key="dict.value" @click="chooseCharacteristic(dict)">
  104. <p>
  105. {{ dict.label }}
  106. </p>
  107. </div>
  108. </div>
  109. </el-dialog>
  110. </div>
  111. </div>
  112. </template>
  113. <script setup>
  114. import headComponent from '@/views/xjc-integratedmachine/components/head_component.vue'
  115. import Drag_component from "@/views/xjc-integratedmachine/components/drag_component.vue";
  116. import {ref} from "vue";
  117. import {getUniversityByKeyword} from "@/api/xjc-integratedmachine/environment/university.js";
  118. import {getOccupationByKeyword} from "@/api/xjc-integratedmachine/environment/occupation.js";
  119. const router = useRouter()
  120. const onePage = ref(true)
  121. const twoPage = ref(false)
  122. const threePage = ref(false)
  123. const form = ref({
  124. areaid: null,
  125. areaname: null,
  126. educationlevel: null,
  127. educationlevelName: null,
  128. characteristic: null,
  129. characteristicName: null,
  130. name: null
  131. })
  132. const keyInput = ref(false);
  133. const headinfo = ref({})
  134. const headinfoRef = ref(null);
  135. function setHeadinfo() {
  136. headinfo.value = {
  137. title: '职业信息查询',
  138. user: {
  139. avatar: '头像路径',
  140. nickName: '张三'
  141. },
  142. backUrl: '/xjc-integratedmachine/environment/index',
  143. backUrlUse:true,
  144. homeUrl: '/xjc-integratedmachine/environment/index',
  145. contrast:true,
  146. contrastType:3
  147. }
  148. }
  149. //切换tabs
  150. const showPage = (val) => {
  151. if (val === 1) {
  152. onePage.value = true;
  153. twoPage.value = false;
  154. threePage.value = false;
  155. } else if (val === 2) {
  156. onePage.value = false;
  157. twoPage.value = true;
  158. threePage.value = false;
  159. } else if (val === 3) {
  160. onePage.value = false;
  161. twoPage.value = false;
  162. threePage.value = true;
  163. }
  164. }
  165. function jumpTo(path) {
  166. router.push({
  167. path: path,
  168. query: {name: 123}
  169. })
  170. let flag = sessionStorage.getItem('conditionsStr') || false;
  171. if(flag){
  172. sessionStorage.removeItem('conditionsStr');
  173. }
  174. }
  175. onMounted(() => {
  176. setHeadinfo()
  177. setTimeout(() => {
  178. if (headinfoRef.value) {
  179. headinfoRef.value.getCompareSizeData(3); // 调用子组件的 sayHello 函数
  180. }
  181. }, 800)
  182. })
  183. const universityList = ref([])
  184. // 定义一个函数,用于将关键词变为红色
  185. function highlightKeywords(text, keywords) {
  186. // 遍历关键词列表
  187. keywords.forEach(keyword => {
  188. // 使用正则表达式匹配关键词,并替换为带有红色样式的HTML标签
  189. // 这里使用全局匹配标志'g',以确保替换所有出现的关键词
  190. console.log("keywords", keywords)
  191. let regex = new RegExp(keyword, 'g');
  192. text = text.replace(regex, `<span style="color: #0DE6A1;">${keyword}</span>`);
  193. console.log("text", text)
  194. });
  195. return text;
  196. }
  197. const data_list = ref([])
  198. function byKeyWord() {
  199. getOccupationByKeyword(form.value).then(resp =>{
  200. console.log("sss",resp)
  201. data_list.value = resp.list
  202. })
  203. }
  204. function toDetail(item){
  205. router.push({
  206. path : '/xjc-integratedmachine/environment/occ_details_video',
  207. query :{
  208. id : item.id
  209. }
  210. })
  211. }
  212. const tab = ref("tj")
  213. function changeTab(path) {
  214. tab.value = path
  215. }
  216. const showAreaChoose = ref(false)
  217. const showEducationlevel = ref(false)
  218. const showCharacteristic = ref(false)
  219. const {proxy} = getCurrentInstance()
  220. const {gk_province, educationlevel, characteristic} = proxy.useDict('gk_province', 'educationlevel', 'characteristic')
  221. function showAreaChooseHandler() {
  222. showAreaChoose.value = true
  223. }
  224. function chooseArea(item) {
  225. form.value.areaid = item.value
  226. form.value.areaname = item.label
  227. showAreaChoose.value = false
  228. }
  229. function showEducationlevelHandler() {
  230. showEducationlevel.value = true
  231. }
  232. function chooseEducationlevel(item) {
  233. form.value.educationlevel = item.value
  234. form.value.educationlevelName = item.label
  235. showEducationlevel.value = false
  236. }
  237. function showCharacteristicHandler() {
  238. showCharacteristic.value = true
  239. }
  240. function chooseCharacteristic(item) {
  241. form.value.characteristic = item.value
  242. form.value.characteristicName = item.label
  243. showCharacteristic.value = false
  244. }
  245. function search() {
  246. router.push({
  247. path: '/xjc-integratedmachine/environment/university_list',
  248. query: form.value
  249. })
  250. }
  251. function clearResult(item) {
  252. form.value.name = '';
  253. byKeyword();
  254. }
  255. </script>
  256. <style scoped lang="scss">
  257. .occdb_search_industry {
  258. background: url('@/assets/images/login/login-home-background.png') no-repeat;
  259. background-size: 1920px 1080px;
  260. z-index: 10;
  261. width: 100%;
  262. height: 1080px;
  263. .page-content {
  264. width: 100%;
  265. position: absolute;
  266. top: 100px;
  267. bottom: 0;
  268. display: flex;
  269. justify-content: space-between;
  270. .content-left {
  271. width: 244px;
  272. height: 957px;
  273. background: rgba(255, 255, 255, 0.26);
  274. ::v-deep .el-menu-item .is-active {
  275. background: red !important;
  276. }
  277. .item-box {
  278. width: 244px;
  279. height: 80px;
  280. color: #B3B3B3;
  281. display: flex;
  282. align-items: center;
  283. margin-right: 5px;
  284. font-weight: bold;
  285. font-size: 20px;
  286. background: #C8FFED;
  287. img {
  288. width: 28px;
  289. height: 28px;
  290. margin-right: 10px;
  291. margin-left: 40px;
  292. }
  293. }
  294. .item-box-active {
  295. width: 244px;
  296. height: 80px;
  297. background: #1EC590;
  298. font-weight: bold;
  299. font-size: 20px;
  300. display: flex;
  301. color: #FFFFFF;
  302. line-height: 40px;
  303. margin-right: 5px;
  304. align-items: center;
  305. img {
  306. width: 28px;
  307. height: 28px;
  308. margin-right: 10px;
  309. margin-left: 40px;
  310. }
  311. }
  312. }
  313. .content-right {
  314. width: 1615px;
  315. height: 926px;
  316. background: #FFFFFF;
  317. border-radius: 35px 35px 35px 35px;
  318. margin-top: 13px;
  319. margin-right: 24px;
  320. .one-page {
  321. .top {
  322. font-weight: 400;
  323. font-size: 30px;
  324. color: #333333;
  325. line-height: 52px;
  326. margin:46px 40px 40px;
  327. text-indent: 2em;
  328. }
  329. .search-btn {
  330. display: flex;
  331. align-items: center;
  332. flex-direction: column;
  333. justify-content: space-around;
  334. margin-top: 613px;
  335. img {
  336. width: 244px;
  337. height: 100px;
  338. }
  339. p{
  340. }
  341. span{
  342. margin-left: 3px;
  343. }
  344. }
  345. .input-component {
  346. display: flex;
  347. flex-direction: column;
  348. align-items: center;
  349. .input-search {
  350. display: flex;
  351. margin-top: 57px;
  352. ::v-deep .el-input__inner {
  353. font-size: 24px;
  354. margin-left: 34px;
  355. }
  356. ::v-deep .el-input__suffix {
  357. font-size: 100px;
  358. width: 100px;
  359. height: 100px;
  360. }
  361. ::v-deep .el-input__wrapper {
  362. background: #E2E2E2;
  363. box-shadow: none;
  364. height: 84px;
  365. width: 1484px;
  366. }
  367. div {
  368. width: 170px;
  369. height: 84px;
  370. background: linear-gradient(180deg, #73EE71 0%, #0ACB63 100%);
  371. border-radius: 0px 5px 5px 0px;
  372. font-weight: 400;
  373. font-size: 24px;
  374. color: #FFFFFF;
  375. display: flex;
  376. align-items: center;
  377. justify-content: center;
  378. }
  379. }
  380. }
  381. }
  382. .two-page {
  383. display: flex;
  384. flex-direction: column;
  385. align-items: center;
  386. .two-page-search {
  387. margin-top: 57px;
  388. font-weight: 400;
  389. font-size: 30px;
  390. color: #333333;
  391. line-height: 52px;
  392. margin-left:40px;
  393. margin-top:100px;
  394. text-indent:2em;
  395. ::v-deep .el-input__inner {
  396. width: 1300px;
  397. height: 84px;
  398. font-size: 24px;
  399. margin-left: 34px;
  400. }
  401. ::v-deep .el-input__suffix {
  402. font-size: 100px;
  403. width: 100px;
  404. height: 100px;
  405. }
  406. ::v-deep .el-input__wrapper {
  407. background: #F5F9FA;
  408. box-shadow: none;
  409. }
  410. }
  411. .result-box {
  412. width: 1484px;
  413. height: 750px;
  414. overflow: auto;
  415. .two-page-result {
  416. display: flex;
  417. flex-wrap: wrap;
  418. justify-content: space-between;
  419. align-items: center;
  420. .item-result-box-active {
  421. min-width: 320px;
  422. height: 92px;
  423. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  424. box-shadow: inset 0px -2px 7px 0px #1E410E;
  425. border-radius: 5px 5px 5px 5px;
  426. border: 1px solid #A2F57F;
  427. font-weight: 400;
  428. font-size: 30px;
  429. color: #0DE6A1;
  430. line-height: 90px;
  431. text-align: center;
  432. margin-left: 50px;
  433. margin-right: 50px;
  434. margin-top: 32px;
  435. padding-left: 20px;
  436. padding-right: 20px;
  437. }
  438. .item-result-box {
  439. min-width: 320px;
  440. height: 92px;
  441. background: #E0EEF4;
  442. border-radius: 5px 5px 5px 5px;
  443. font-weight: 400;
  444. font-size: 30px;
  445. color: #000000;
  446. line-height: 90px;
  447. text-align: center;
  448. margin-left: 50px;
  449. margin-right: 50px;
  450. margin-top: 32px;
  451. padding-left: 20px;
  452. padding-right: 20px;
  453. }
  454. .item-result-box:hover {
  455. min-width: 320px;
  456. height: 92px;
  457. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  458. box-shadow: inset 0px -2px 7px 0px #1E410E;
  459. border-radius: 5px 5px 5px 5px;
  460. border: 1px solid #A2F57F;
  461. font-weight: 400;
  462. font-size: 30px;
  463. color: #000000;
  464. line-height: 90px;
  465. text-align: center;
  466. margin-left: 50px;
  467. margin-top: 32px;
  468. padding-left: 20px;
  469. padding-right: 20px;
  470. }
  471. }
  472. }
  473. }
  474. .result-box {
  475. width: 1484px;
  476. height: 750px;
  477. overflow: auto;
  478. .two-page-result {
  479. display: flex;
  480. flex-wrap: wrap;
  481. justify-content: space-between;
  482. align-items: center;
  483. .item-result-box-active {
  484. min-width: 320px;
  485. height: 92px;
  486. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  487. box-shadow: inset 0px -2px 7px 0px #1E410E;
  488. border-radius: 5px 5px 5px 5px;
  489. border: 1px solid #A2F57F;
  490. font-weight: 400;
  491. font-size: 30px;
  492. color: #0DE6A1;
  493. line-height: 90px;
  494. text-align: center;
  495. margin-left: 50px;
  496. margin-right: 50px;
  497. margin-top: 32px;
  498. padding-left: 20px;
  499. padding-right: 20px;
  500. }
  501. .item-result-box {
  502. min-width: 320px;
  503. height: 92px;
  504. background: #E0EEF4;
  505. border-radius: 5px 5px 5px 5px;
  506. font-weight: 400;
  507. font-size: 30px;
  508. color: #000000;
  509. line-height: 90px;
  510. text-align: center;
  511. margin-left: 50px;
  512. margin-right: 50px;
  513. margin-top: 32px;
  514. padding-left: 20px;
  515. padding-right: 20px;
  516. }
  517. .item-result-box:hover {
  518. min-width: 320px;
  519. height: 92px;
  520. background: linear-gradient(180deg, #B6FFEF 0%, #C5EEFF 100%);
  521. box-shadow: inset 0px -2px 7px 0px #1E410E;
  522. border-radius: 5px 5px 5px 5px;
  523. border: 1px solid #A2F57F;
  524. font-weight: 400;
  525. font-size: 30px;
  526. color: #000000;
  527. line-height: 90px;
  528. text-align: center;
  529. margin-left: 50px;
  530. margin-top: 32px;
  531. padding-left: 20px;
  532. padding-right: 20px;
  533. }
  534. }
  535. }
  536. }
  537. }
  538. }
  539. .dialog-box {
  540. display: flex;
  541. flex-wrap: wrap;
  542. justify-content: space-between;
  543. div {
  544. //border: 1px solid;
  545. }
  546. p {
  547. min-width: 120px;
  548. padding-left: 10px;
  549. padding-right:10px;
  550. height: 60px;
  551. margin-left: 10px;
  552. margin-right: 10px;
  553. border: 1px solid;
  554. font-weight: 400;
  555. font-size: 30px;
  556. color: #333333;
  557. text-align: center;
  558. line-height: 60px;
  559. border-radius: 10px;
  560. }
  561. }
  562. .dialog-box2{
  563. display: flex;
  564. justify-content: space-around;
  565. }
  566. </style>