| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | color: '#E54D42', |
| | | description: '紧急医疗转运任务', |
| | | taskType: 'EMERGENCY_TRANSFER', |
| | | page: '/pages/task/create-emergency' |
| | | page: '/pagesTask/create-emergency' |
| | | }, |
| | | { |
| | | type: 'normal', |
| | |
| | | color: '#007AFF', |
| | | description: '设备维修、保养等日常任务', |
| | | taskType: 'MAINTENANCE', |
| | | page: '/pages/task/create-normal' |
| | | page: '/pagesTask/create-normal' |
| | | }, |
| | | { |
| | | type: 'normal', |
| | |
| | | color: '#1AAD19', |
| | | description: '车辆加油等任务', |
| | | taskType: 'FUEL', |
| | | page: '/pages/task/create-normal' |
| | | page: '/pagesTask/create-normal' |
| | | }, |
| | | |
| | | { |
| | | type: 'welfare', |
| | | name: '福祉车', |
| | | icon: 'car', |
| | | color: '#F37B1D', |
| | | description: '老年人、残疾人等特殊群体用车服务', |
| | | taskType: 'WELFARE', |
| | | page: '/pages/task/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}` |