|
@@ -7,7 +7,7 @@
|
|
|
<div class="tree-wrap">
|
|
|
<el-tree
|
|
|
ref="tree"
|
|
|
- :data="vocationTree"
|
|
|
+ :data="vocationList"
|
|
|
node-key="code"
|
|
|
:default-checked-keys="[code]"
|
|
|
:default-expanded-keys="[code]"
|
|
@@ -172,13 +172,15 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import MxChart from '@/components/MxChart/index'
|
|
|
-import { vocationalPostsDetail, vocationalOverview, vocationalPosts,getAllVocation } from '@/api/webApi/vocation'
|
|
|
+import { vocationalPostsDetail, vocationalOverview, vocationalPosts } from '@/api/webApi/vocation'
|
|
|
+import MxVocationTranslateMixin from '@/components/Cache/modules/mx-vocation-translate-mixin'
|
|
|
|
|
|
export default {
|
|
|
name: "Detail",
|
|
|
components: {
|
|
|
MxChart
|
|
|
},
|
|
|
+ mixins:[MxVocationTranslateMixin],
|
|
|
data(){
|
|
|
return {
|
|
|
loading:false,
|
|
@@ -188,7 +190,6 @@ export default {
|
|
|
label: 'name'
|
|
|
},
|
|
|
tabActive: 0,
|
|
|
- vocationTree: [], // 职业树
|
|
|
vocationalPosts: [], // 就业岗位
|
|
|
vocationDetail:{}, // 职业概况
|
|
|
jobActiveName: '', // 激活状态的岗位
|
|
@@ -197,7 +198,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getAllVocation()
|
|
|
+ this.code = this.$route.query.code
|
|
|
+ this.getVocationalOverview();
|
|
|
},
|
|
|
computed:{
|
|
|
// 按工资分布
|
|
@@ -330,16 +332,6 @@ export default {
|
|
|
if(newVal == 1) this.getVocationalPosts();
|
|
|
}
|
|
|
},
|
|
|
- '$route':{
|
|
|
- immediate:true,
|
|
|
- handler(val){
|
|
|
- this.code=val.query.code;
|
|
|
- if(val.query.code){
|
|
|
- console.log(22222222222222222222)
|
|
|
- this.getVocationalOverview();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
methods:{
|
|
|
toMajorDetail(row) {
|
|
@@ -408,14 +400,6 @@ export default {
|
|
|
}).finally(_ => {
|
|
|
this.loading = false
|
|
|
})
|
|
|
- },
|
|
|
- getAllVocation() {
|
|
|
- getAllVocation({
|
|
|
- level: 1
|
|
|
- }).then(res => {
|
|
|
- console.log(res)
|
|
|
- this.vocationTree = res.data
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
}
|