|
|
@ -10,7 +10,7 @@ |
|
|
|
<view class="item-num">{{ index + 1 }}</view> |
|
|
|
<text class="item-content">{{ item.title }}</text> |
|
|
|
<view v-show="item.complete + 1" class="item-infor"> |
|
|
|
<text v-if="!datalist.companyId">请填写</text> |
|
|
|
<text v-if="companyId === 0">请填写</text> |
|
|
|
<text v-else>已填写</text> |
|
|
|
</view> |
|
|
|
<view v-show="item.leader + 1" class="item-infor"> |
|
|
@ -27,7 +27,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import { mapState,mapMutations } from 'vuex'; |
|
|
|
import { competeTime } from 'api/competeTime' |
|
|
|
import { overview } from 'api/overview' |
|
|
|
export default { |
|
|
@ -51,7 +51,6 @@ import { overview } from 'api/overview' |
|
|
|
project: 0 |
|
|
|
}], |
|
|
|
projectId: 0, |
|
|
|
companyId: 0, |
|
|
|
datalist: { |
|
|
|
guideNum:0, |
|
|
|
coachNum:0, |
|
|
@ -84,8 +83,9 @@ import { overview } from 'api/overview' |
|
|
|
that.query() |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: mapState('project',['type']), |
|
|
|
computed: mapState('project',['type','companyId']), |
|
|
|
methods: { |
|
|
|
...mapMutations('project',['setCompanyId']), |
|
|
|
async query () { |
|
|
|
const that = this |
|
|
|
try{ |
|
|
@ -105,19 +105,15 @@ import { overview } from 'api/overview' |
|
|
|
} |
|
|
|
} |
|
|
|
const datalist = await overview(params) |
|
|
|
if (datalist.companyId) { |
|
|
|
that.companyId = datalist.companyId |
|
|
|
} |
|
|
|
// console.log(datalist.companyId) |
|
|
|
if (datalist && datalist.companyId) { |
|
|
|
that.setCompanyId(datalist.companyId) |
|
|
|
that.datalist = datalist |
|
|
|
that.$store.state.project.companyId = datalist.companyId |
|
|
|
// console.log(that.$store.state.project.companyId) |
|
|
|
} |
|
|
|
} |
|
|
|
}catch(e){ |
|
|
|
//TODO handle the exception |
|
|
|
if (e === 'error') { |
|
|
|
uni.showToast({ |
|
|
|
title: '提交失败', |
|
|
|
title: '查询单位信息失败,请重新登录', |
|
|
|
icon: 'none', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
@ -132,7 +128,7 @@ import { overview } from 'api/overview' |
|
|
|
}, |
|
|
|
jump (num) { |
|
|
|
const that = this |
|
|
|
if (that.$store.state.project.companyId) { |
|
|
|
if (that.companyId) { |
|
|
|
if (num === 0) { |
|
|
|
uni.navigateTo({ |
|
|
|
url:`../Basics/Basics?id=${that.projectId}&companyId=${that.companyId}` |
|
|
|