ProfessLib.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div>
  3. <el-row >
  4. <el-col>
  5. <el-card style="height:158px;margin: 10px auto;">
  6. <div style=" display: flex;justify-content: space-between;">
  7. <div style="width:400px;margin-left:52px;display: inline-block;">
  8. <p style="font-size:24px;font-weight: 600;color:#A6A6A6;text-transform: uppercase;margin-top:32px">Professional library</p>
  9. <p style="font-weight: 600;color: #414141;font-size:24px;margin: 10px 0;">专业库</p>
  10. <div style="width: 41px;height: 4px;background: #47C6A2;margin-top: 21px;"></div>
  11. </div>
  12. <el-image :src="require('@/assets/images/icon_pro.png')"></el-image>
  13. </div>
  14. </el-card>
  15. </el-col>
  16. <el-col>
  17. <el-card style="margin: 0 auto;" :style="height">
  18. <el-input style="width:300px;float: right;bottom:15px;right:24px;"
  19. placeholder="请输入搜索内容"
  20. suffix-icon="el-icon-search"
  21. v-model="input1">
  22. </el-input>
  23. <div style="margin-top:40px">
  24. <el-tabs v-model="activeName" type="card" @tab-click="ZBigCategClick">
  25. <el-tab-pane label="本科" name="first">
  26. <div class="eltabs">
  27. <div style="width:291px;height:56px;background: #47C6A2;color: #FFFFFF;line-height: 56px;font-weight: 400;font-size:14px;text-align: center">专业大类</div>
  28. <el-tabs tab-position="left" v-model="BigCategName" @tab-click="BigCategClick">
  29. <el-tab-pane v-for="i in BigCategData" :key="i.id" :name="i.code">
  30. <div slot="label" >{{i.name}}</div>
  31. <el-row :gutter="10">
  32. <el-col :span="7">
  33. <el-menu
  34. @close="handleClose"
  35. :default-openeds="opens"
  36. :default-active="active"
  37. @select="Prodetailclck"
  38. >
  39. <el-card>
  40. <el-submenu index="1" style="background:#fff">
  41. <template slot="title">
  42. <el-image style="filter: drop-shadow(#47C6A2 85px 0);position: relative;left: -57px;" :src="require('@/assets/images/icon_zhuanye.png')"></el-image>
  43. <span slot="title" style="height:33px ;font-size: 24px;color:#47C6A2;font-weight: 600;display: inline-block;margin-top: 20px;">专业类</span>
  44. <div style="width: 41px;height: 4px;background: #47C6A2;margin-top: 25px;margin-left: 30px;"></div>
  45. </template>
  46. <el-menu-item-group>
  47. <el-menu-item :index="i.code" v-for="i in ProCategoryData" :key="i.id">{{i.name}}</el-menu-item>
  48. </el-menu-item-group>
  49. </el-submenu>
  50. </el-card>
  51. </el-menu>
  52. </el-col>
  53. <el-col :span="17" style="padding-right:10px;">
  54. <el-table :data="ProDetailData" border>
  55. <el-table-column prop="name" label="专业名称" >
  56. </el-table-column>
  57. <el-table-column prop="code" label="专业代码" >
  58. </el-table-column>
  59. <el-table-column prop="id" label="专业详情" >
  60. <template slot-scope="scope">
  61. <div style="color:#FFA401;font-size: 14px;cursor:pointer;" @click="goDetail(scope.row.id)">查看>>></div>
  62. </template>
  63. </el-table-column>
  64. </el-table>
  65. </el-col>
  66. </el-row>
  67. </el-tab-pane>
  68. </el-tabs>
  69. </div>
  70. </el-tab-pane>
  71. <el-tab-pane label="高职专科" name="second">
  72. <div class="eltabs">
  73. <div style="width:291px;height:56px;background: #47C6A2;color: #FFFFFF;line-height: 56px;font-weight: 400;font-size:14px;text-align: center">专业大类</div>
  74. <el-tabs tab-position="left" v-model="ZBigCategName" @tab-click="getBigCategClick">
  75. <el-tab-pane v-for="i in ZBigCategData" :key="i.id" :name="i.code">
  76. <div slot="label">{{i.name}}</div>
  77. <el-row :gutter="10">
  78. <el-col :span="7">
  79. <el-menu
  80. class="elmenu"
  81. @close="handleClose"
  82. :default-openeds="opens"
  83. :default-active="Zactive"
  84. @select="ZProdetailclck"
  85. >
  86. <el-card>
  87. <el-submenu index="1" style="background:#fff">
  88. <template slot="title" >
  89. <el-image style="filter: drop-shadow(#47C6A2 85px 0);position: relative;left: -57px;" :src="require('@/assets/images/icon_zhuanye.png')"></el-image>
  90. <span slot="title" style="height:33px ;font-size: 24px;color:#47C6A2;font-weight: 600;display: inline-block;margin-top: 20px;">专业类</span>
  91. <div style="width: 41px;height: 4px;background: #47C6A2;margin-top: 25px;margin-left: 30px;"></div>
  92. </template>
  93. <el-menu-item-group>
  94. <el-menu-item :index="i.code" v-for="i in ZProCategoryData" :key="i.id">{{i.name}}</el-menu-item>
  95. </el-menu-item-group>
  96. </el-submenu>
  97. </el-card>
  98. </el-menu>
  99. </el-col>
  100. <el-col :span="17" style="padding-right:10px;">
  101. <el-table :data="ProDetailData" border>
  102. <el-table-column prop="name" label="专业名称" >
  103. </el-table-column>
  104. <el-table-column prop="code" label="专业代码" >
  105. </el-table-column>
  106. <el-table-column prop="id" label="专业详情" >
  107. <template slot-scope="scope">
  108. <div style="color:#FFA401;font-size: 14px;cursor:pointer;" @click="goDetail(scope.row.id)">查看>>></div>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. </el-col>
  113. </el-row>
  114. </el-tab-pane>
  115. </el-tabs>
  116. </div>
  117. </el-tab-pane>
  118. </el-tabs>
  119. </div>
  120. </el-card>
  121. </el-col>
  122. </el-row>
  123. <!--<BottomP></BottomP>-->
  124. </div>
  125. </template>
  126. <script>
  127. import {
  128. getProfesslibData
  129. } from "@/api/webApi/professlib"
  130. export default {
  131. name:'OldProfessLib',
  132. data() {
  133. return {
  134. input1:'',
  135. opens:[],
  136. height:'height:890px',
  137. iscollapse:false,
  138. activeName:'first',
  139. active:'51',
  140. BigCategName:'01',
  141. type:'本科',
  142. level:1,
  143. code: "0101",
  144. BigCategData:[],
  145. ProCategoryData:[],
  146. ProDetailData:[],
  147. types:'高职专科',
  148. levels:1,
  149. codes:'',
  150. Zactive:'5101',
  151. ZBigCategName:'51',
  152. ZBigCategData:[],
  153. ZProCategoryData:[],
  154. ZProDetailData:[]
  155. }
  156. },
  157. mounted() {
  158. this.getBigCategData()
  159. },
  160. methods: {
  161. handleClose(keyPath) {
  162. // this.$refs.menus.open(keyPath);
  163. this.opens = keyPath
  164. },
  165. //点击大类
  166. BigCategClick(tab) {
  167. this.level = 2
  168. this.getBigCategData(tab.name)
  169. },
  170. // 点击专业类
  171. Prodetailclck(data) {
  172. this.level = 3
  173. this.getBigCategData(data)
  174. },
  175. //专业大类
  176. getBigCategData(data) {
  177. getProfesslibData({
  178. type:this.type,
  179. level:this.level,
  180. code:data
  181. }).then(res => {
  182. if(res.rows.length != 0){
  183. if(res.rows[0].level == 1){
  184. this.BigCategData = res.rows
  185. }else if(res.rows[0].level == 2){
  186. this.ProCategoryData = res.rows
  187. }else if(res.rows[0].level == 3){
  188. this.ProDetailData = res.rows
  189. }
  190. }else {
  191. this.BigCategData = ''
  192. this.ProCategoryData = ''
  193. this.ProDetailData = ''
  194. }
  195. })
  196. },
  197. goDetail(id) {
  198. this.$router.push(
  199. {
  200. path: '/career/plan/ProfessLibDetail',
  201. query:
  202. {
  203. majorId: id
  204. }
  205. });
  206. },
  207. // 高职专科
  208. getzkdata() {
  209. getProfesslibData({
  210. type:this.types,
  211. level:this.levels,
  212. code:this.codes
  213. }).then(res => {
  214. if(res.rows.length != 0){
  215. if(res.rows[0].level == 1){
  216. this.ZBigCategData = res.rows
  217. }else if(res.rows[0].level == 2){
  218. this.ZProCategoryData = res.rows
  219. }else if(res.rows[0].level == 3){
  220. this.ProDetailData = res.rows
  221. }
  222. }else {
  223. this.ZBigCategData = []
  224. this.ZProCategoryData = []
  225. this.ProDetailData = []
  226. }
  227. })
  228. },
  229. ZBigCategClick(e) {
  230. if(e.label == "高职专科") {
  231. this.height = 'height:1300px;'
  232. this.getzkdata()
  233. }else {
  234. this.height = 'height:890px;'
  235. this.level = 3
  236. let code = this.ProCategoryData[0].code
  237. this.getBigCategData(code)
  238. }
  239. },
  240. //点击高职大类
  241. getBigCategClick(top) {
  242. console.log(top);
  243. this.levels = 2
  244. this.codes = top.name
  245. this.getzkdata()
  246. },
  247. //点击高职专业类
  248. ZProdetailclck(data) {
  249. this.levels = 3
  250. this.codes = data
  251. this.getzkdata()
  252. }
  253. },
  254. watch: {
  255. BigCategData(val) {
  256. if(val){
  257. this.level = 2
  258. let code = this.BigCategData[0].code
  259. this.getBigCategData(code)
  260. }
  261. },
  262. ProCategoryData(val) {
  263. if(val) {
  264. this.active = val[0].code
  265. this.level = 3
  266. let code = this.ProCategoryData[0].code
  267. this.getBigCategData(code)
  268. }
  269. },
  270. ZBigCategData(val) {
  271. if(val){
  272. this.levels = 2
  273. this.codes = this.ZBigCategData[0].code
  274. this.getzkdata()
  275. }
  276. },
  277. ZProCategoryData(val) {
  278. if(val) {
  279. this.Zactive = val[0].code
  280. this.levels = 3
  281. this.codes = this.ZProCategoryData[0].code
  282. this.getzkdata()
  283. }
  284. }
  285. }
  286. }
  287. </script>
  288. <style scoped>
  289. .el-card /deep/.el-card__body{
  290. padding: 0;
  291. }
  292. .el-card /deep/ .el-tabs--card > .el-tabs__header .el-tabs__nav {
  293. border: none;
  294. }
  295. .el-card /deep/.el-tabs__item.el-tabs__item.is-active {
  296. color: #fff;
  297. background: #47C6A2;
  298. border: none;
  299. }
  300. .el-card /deep/.el-tabs__item {
  301. background: #EEEEEE;
  302. }
  303. .el-card /deep/.el-tabs__item:hover {
  304. color: #fff;
  305. background: #47C6A2;
  306. }
  307. .el-card /deep/ .el-tabs--card > .el-tabs__header{
  308. border-bottom: 5px solid #47C6A2;
  309. }
  310. .el-input /deep/ .el-input__inner{
  311. border-radius: 30px;
  312. }
  313. /* 专业大类 */
  314. .eltabs /deep/ .el-tabs__header {
  315. width: 290px;
  316. }
  317. .eltabs /deep/.el-tabs__item {
  318. width: 240px;
  319. height: 56px;
  320. margin:5px 0 0 50px;
  321. color: #414141;;
  322. text-align: center;
  323. line-height: 56px;
  324. background: #FEFFF4;
  325. }
  326. .eltabs /deep/.el-menu-item {
  327. padding-left:50px !important;
  328. }
  329. .eltabs /deep/.el-tabs__active-bar {
  330. display: none;
  331. }
  332. .eltabs /deep/.el-tabs__item.el-tabs__item.is-active {
  333. width: 240px;
  334. margin-left: 50px;
  335. color: #fff;
  336. background: #47C6A2;
  337. border: none;
  338. }
  339. .eltabs /deep/.el-tabs__item:hover {
  340. width: 240px;
  341. margin-left: 50px;
  342. color: #fff;
  343. background: #47C6A2;
  344. }
  345. .eltabs /deep/ .el-tabs__nav{
  346. width: 290px;
  347. background: #FEFFF4;
  348. }
  349. .el-menu /deep/ .el-submenu .el-submenu__title .el-submenu__icon-arrow {
  350. visibility: hidden
  351. }
  352. .el-menu /deep/ .el-submenu .el-submenu__title{
  353. height: 120px;
  354. }
  355. .el-menu /deep/ .el-submenu .el-submenu__title:hover{
  356. background-color:#fff;
  357. cursor:default
  358. }
  359. .eltabs /deep/.el-image {
  360. left: 30px;
  361. }
  362. .eltabs /deep/ .is-active{
  363. background: #edf9f6;
  364. }
  365. .el-table /deep/.cell{
  366. text-align: center;
  367. }
  368. /* 高职 */
  369. .eltabs /deep/ .el-card {
  370. height: 1144px;
  371. }
  372. .elmenu /deep/ .is-active{
  373. background: #edf9f6;
  374. }
  375. </style>