| @@ -4,21 +4,35 @@ | |||||
| <van-tabbar route :placeholder="true" > | <van-tabbar route :placeholder="true" > | ||||
| <van-tabbar-item replace to="/lawEnforcement" icon="wap-home-o">首页</van-tabbar-item> | <van-tabbar-item replace to="/lawEnforcement" icon="wap-home-o">首页</van-tabbar-item> | ||||
| <van-tabbar-item replace to="/lawEnforcement/productsList" icon="shop-o">农用品</van-tabbar-item> | <van-tabbar-item replace to="/lawEnforcement/productsList" icon="shop-o">农用品</van-tabbar-item> | ||||
| <van-tabbar-item replace to="/lawEnforcement/caseList" icon="apps-o">案件</van-tabbar-item> | |||||
| <van-tabbar-item replace to="/lawEnforcement/caseList" icon="apps-o" v-if="tabShow">案件</van-tabbar-item> | |||||
| <van-tabbar-item replace to="/lawEnforcement/user" icon="contact">我的</van-tabbar-item> | <van-tabbar-item replace to="/lawEnforcement/user" icon="contact">我的</van-tabbar-item> | ||||
| </van-tabbar> | </van-tabbar> | ||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import { getUserProfile } from "@/api/lawEnforcement/index"; | |||||
| export default { | export default { | ||||
| name: "law", | name: "law", | ||||
| data() { | data() { | ||||
| return { | return { | ||||
| active: 0, | active: 0, | ||||
| tabShow: true, | |||||
| }; | }; | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| getUserProfile().then(response => { | |||||
| if (response.data.roles.length < 1){ | |||||
| this.tabShow = false; | |||||
| }else{ | |||||
| response.data.roles.forEach(res=>{ | |||||
| if(res.roleKey == 'personal_user' || res.roleKey == 'company_user'){ | |||||
| this.tabShow = false; | |||||
| }else{ | |||||
| this.tabShow = true; | |||||
| } | |||||
| }) | |||||
| } | |||||
| }); | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| @@ -46,7 +46,7 @@ | |||||
| </van-cell-group> | </van-cell-group> | ||||
| <van-cell-group class="listBox"> | <van-cell-group class="listBox"> | ||||
| <van-cell is-link :to="{name:loginType ? 'programme':''}" > | |||||
| <van-cell is-link :to="{name:loginType ? 'programme':''}" v-if="tabShow" > | |||||
| <template #title> | <template #title> | ||||
| <van-icon name="../../../static/images/lawEnforcement/icon/icon_fagl.png" size="20"></van-icon> | <van-icon name="../../../static/images/lawEnforcement/icon/icon_fagl.png" size="20"></van-icon> | ||||
| <span class="custom-title">方案管理</span> | <span class="custom-title">方案管理</span> | ||||
| @@ -101,6 +101,7 @@ export default { | |||||
| }, | }, | ||||
| loginType:false, | loginType:false, | ||||
| loginButton:false, | loginButton:false, | ||||
| tabShow: false, | |||||
| // 查询参数 | // 查询参数 | ||||
| queryParamsTask: { | queryParamsTask: { | ||||
| pageNum: 1, | pageNum: 1, | ||||
| @@ -156,6 +157,17 @@ export default { | |||||
| this.user = response.data; | this.user = response.data; | ||||
| this.roleGroup = response.roleGroup; | this.roleGroup = response.roleGroup; | ||||
| this.postGroup = response.postGroup; | this.postGroup = response.postGroup; | ||||
| if (response.data.roles.length < 1){ | |||||
| this.tabShow = false; | |||||
| }else{ | |||||
| response.data.roles.forEach(res=>{ | |||||
| if (res.roleKey == 'personal_user' || res.roleKey == 'company_user'){ | |||||
| this.tabShow = false; | |||||
| }else{ | |||||
| this.tabShow = true; | |||||
| } | |||||
| }) | |||||
| } | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }); | }); | ||||
| }, | }, | ||||