|
@@ -16,6 +16,7 @@
|
|
|
<script>
|
|
|
import { Search } from 'vant'
|
|
|
import TabBar from './components/tabBar'
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
name: 'business',
|
|
@@ -24,39 +25,45 @@
|
|
|
TabBar
|
|
|
},
|
|
|
data () {
|
|
|
- return {
|
|
|
- navList: [
|
|
|
+ return {}
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ this.$refs.myNav.funInitTabIndex(this.$route.name === 'partnerAll' ? 1 : (this.$route.name === 'partnerSign' ? 2 : 3))
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ totalOf0: 'business/totalOf0',
|
|
|
+ totalOf1: 'business/totalOf1',
|
|
|
+ totalOf2: 'business/totalOf2'
|
|
|
+ }),
|
|
|
+ searChValue: {
|
|
|
+ get () {
|
|
|
+ return this.$store.getters['business/searchValue']
|
|
|
+ },
|
|
|
+ set (val) {
|
|
|
+ this.$store.dispatch('business/setSearchValue', val)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ navList () {
|
|
|
+ return [
|
|
|
{
|
|
|
id: 1,
|
|
|
name: '全部',
|
|
|
- value: '0'
|
|
|
+ value: this.totalOf0
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
name: '已签约',
|
|
|
- value: '0'
|
|
|
+ value: this.totalOf1
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
name: '未签约',
|
|
|
- value: '0'
|
|
|
+ value: this.totalOf2
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- activated () {
|
|
|
- this.$refs.myNav.funInitTabIndex(this.$route.name === 'partnerAll' ? 1 : (this.$route.name === 'partnerSign' ? 2 : 3))
|
|
|
- },
|
|
|
- computed: {
|
|
|
- searChValue: {
|
|
|
- get () {
|
|
|
- return this.$store.getters['business/searchValue']
|
|
|
- },
|
|
|
- set (val) {
|
|
|
- this.$store.dispatch('business/setSearchValue', val)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
funChange (id) {
|
|
|
const path = id === 1 ? '/partner/business' : (id === 2 ? '/partner/business/sign' : '/partner/business/unsigned')
|