| | |
| | | <template> |
| | | <view> |
| | | <u-button @click="applyPulicy">执法申请</u-button> |
| | | <u-button v-if="isJudge">执法审批</u-button> |
| | | <u-button>执法结果上报</u-button> |
| | | <u-button>记录查询</u-button> |
| | | <u-button>数据看板</u-button> |
| | | <view class="padding-bottom"> |
| | | <policyIndexVue v-if="activeNumber == 0" :isJudge="isJudge" :userType="userInfo.userType" :userAuth="userAuth"></policyIndexVue> |
| | | <minePage v-if="activeNumber == 1" :userInfo="userInfo" :roleGroup="roleGroup"></minePage> |
| | | <tabsCom :activeNumber.sync="activeNumber"></tabsCom> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getInfo } from '@/api/auth.js' |
| | | import tabsCom from '@/policy/components/tabs.vue' |
| | | import policyIndexVue from '@/policy/components/index.vue' |
| | | import minePage from '@/policy/components/mine.vue' |
| | | export default { |
| | | components: { |
| | | tabsCom, |
| | | policyIndexVue, |
| | | minePage |
| | | }, |
| | | data() { |
| | | return { |
| | | isJudge: false |
| | | isJudge: false, |
| | | activeNumber: 0, |
| | | userInfo: {}, |
| | | roleGroup: '', |
| | | userAuth: false |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | methods: { |
| | | getInfo() { |
| | | getInfo().then(val =>{ |
| | | // console.log() |
| | | this.isJudge = val.data.roles.some(item => item.includes('check_enforce')) |
| | | |
| | | this.userInfo = val.data |
| | | |
| | | if(val.data.roles) { |
| | | this.isJudge = val.data.roles.some(item => item.includes('check_enforce')) |
| | | const value = val.data.roles.filter(item => !item.includes('check_enforce')) |
| | | if(value.length) { |
| | | this.userAuth = true |
| | | } else { |
| | | this.userAuth = false |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | applyPulicy() { |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | page{ |
| | | background-color: #F7F7F7; |
| | | } |
| | | </style> |
| | | <style scoped lang="scss"> |
| | | @import "./policyIndex.scss"; |
| | | </style> |