| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | page: '/pagesTask/create-normal' |
| | | }, |
| | | |
| | | { |
| | | type: 'welfare', |
| | | name: '福祉车', |
| | | icon: 'car', |
| | | color: '#F37B1D', |
| | | description: '老年人、残疾人等特殊群体用车服务', |
| | | taskType: 'WELFARE', |
| | | page: '/pagesTask/create-welfare' |
| | | } |
| | | // { |
| | | // type: 'welfare', |
| | | // name: '福祉车', |
| | | // icon: 'car', |
| | | // color: '#F37B1D', |
| | | // description: '老年人、残疾人等特殊群体用车服务', |
| | | // taskType: 'WELFARE', |
| | | // page: '/pagesTask/create-welfare' |
| | | // } |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | canCreateTask: state => state.user.canCreateTask |
| | | }) |
| | | }, |
| | | methods: { |
| | | selectTaskCategory(category) { |
| | | // 检查是否有创建任务的权限 |
| | | if (this.canCreateTask !== '1') { |
| | | this.$modal.msgError('您没有权限创建任务') |
| | | return |
| | | } |
| | | |
| | | // 跳转到对应的任务创建页面 |
| | | uni.navigateTo({ |
| | | url: `${category.page}?categoryName=${category.name}&categoryType=${category.type}&taskType=${category.taskType}` |