目录代码整合

This commit is contained in:
aixianling
2022-05-10 20:02:37 +08:00
parent 71049f7f65
commit 036ee91533
324 changed files with 4 additions and 8321 deletions

View File

@@ -0,0 +1,105 @@
<template>
<ai-list v-if="!isShowDetail">
<template slot="title">
<ai-title title="招工就业" :isShowBottomBorder="false"></ai-title>
</template>
<template slot="tabs">
<el-tabs v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<AddJob v-else-if="componentName === 'AddJob' && isShowDetail" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></AddJob>
<Add v-else-if="componentName === 'Add' && isShowDetail" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Add>
</template>
<script>
import List from './components/List.vue'
import JobList from './components/JobList'
import Add from './components/Add'
import AddJob from './components/AddJob'
import { mapState } from 'vuex'
export default {
name: 'AppJob',
label: '招工就业',
components: {
JobList,
AddJob,
List,
Add
},
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
...mapState(['user']),
tabs () {
const tabList = [
{label: '找能人', name: 'List', comp: List, permission: ''},
{label: '找工作', name: 'Statistics', comp: JobList, permission: ''}
].filter(item => {
return true
})
return tabList
}
},
data () {
return {
activeName: 'List',
currIndex: '0',
componentName: '',
params: {},
isShowDetail: false
}
},
created () {
if (this.$route.query.id) {
this.componentName = this.$route.query?.type
this.params = {id: this.$route.query?.id}
this.isShowDetail = true
}
},
methods: {
onChange (data) {
if (data.type === 'List') {
this.componentName = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'Add') {
this.componentName = 'Add'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'JobList') {
this.componentName = 'JobList'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'AddJob') {
this.componentName = 'AddJob'
this.isShowDetail = true
this.params = data.params
}
}
}
}
</script>
<style lang="scss" scoped>
</style>