| <template> | 
|     <view class="content"> | 
|         <view class="content_head" :style="{backgroundImage: 'url(' + backgroundImg + ')'}"> | 
|             <text>{{userInfo.company.name}}</text> | 
|             <text>当前在保:{{num}}人</text> | 
|         </view> | 
|         <view class="content_box"> | 
|             <view class="content_box_list"> | 
|                 <view class="content_box_list_left" @click="jump(1)" :style="{backgroundImage: 'url(' + backgroundImg1 + ')'}"> | 
|                     <text>投保申请</text> | 
|                     <text>简单便捷</text> | 
|                 </view> | 
|                 <view class="content_box_list_right"> | 
|                     <view class="content_box_list_right_row" @click="jump(2)" :style="{backgroundImage: 'url(' + backgroundImg2 + ')'}"> | 
|                         <text>我的保单</text> | 
|                         <text>全面管保单</text> | 
|                     </view> | 
|                     <view class="content_box_list_right_row" @click="jump(3)" :style="{backgroundImage: 'url(' + backgroundImg3 + ')'}"> | 
|                         <text>在线报案</text> | 
|                         <text>方便迅速</text> | 
|                     </view> | 
|                 </view> | 
|             </view> | 
|             <view class="content_box_list1"> | 
|                 <view class="content_box_list1_item" @click="jump(4)" :style="{backgroundImage: 'url(' + backgroundImg4 + ')'}"> | 
|                     <text>加减保申请</text> | 
|                     <text>增加/减少投保人</text> | 
|                 </view> | 
|                 <view class="content_box_list1_item" @click="jump(5)" :style="{backgroundImage: 'url(' + backgroundImg5 + ')'}"> | 
|                     <text>加减保记录</text> | 
|                     <text>查看记录</text> | 
|                 </view> | 
|                 <view class="content_box_list1_item" @click="jump(6)" :style="{backgroundImage: 'url(' + backgroundImg6 + ')'}"> | 
|                     <text>更换派遣\n单位</text> | 
|                     <!-- <text>更换派遣单位</text> --> | 
|                 </view> | 
|                 <view class="content_box_list1_item" @click="jump(7)" :style="{backgroundImage: 'url(' + backgroundImg7 + ')'}"> | 
|                     <text>更换派遣\n单位记录</text> | 
|                     <!-- <text>查看记录</text> --> | 
|                 </view> | 
|                 <view class="content_box_list1_item" @click="jump(8)" :style="{backgroundImage: 'url(' + backgroundImg8 + ')'}"> | 
|                     <text>员工管理</text> | 
|                     <text>查看人员投保信息</text> | 
|                 </view> | 
|             </view> | 
|         </view> | 
|         <view class="content_loginout"> | 
|             <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="退出登录" @click="loginOut"></u-button> | 
|         </view> | 
|     </view> | 
| </template> | 
|   | 
| <script> | 
|     import { mapState } from 'vuex' | 
|     export default { | 
|         computed: { | 
|             ...mapState(['userInfo', 'cookies']) | 
|         }, | 
|         data() { | 
|             return { | 
|                 num: 0, | 
|                 backgroundImg: require('@/static/background/home_bg@2x.png'), | 
|                 backgroundImg1: require('@/static/background/home_ic_toubao@2x.png'), | 
|                 backgroundImg2: require('@/static/background/home_ic_baodan@2x.png'), | 
|                 backgroundImg3: require('@/static/background/home_ic_baoan@2x.png'), | 
|                 backgroundImg4: require('@/static/background/home_ic_jiajianbao@2x.png'), | 
|                 backgroundImg5: require('@/static/background/home_ic_jiajianbaojilu@2x.png'), | 
|                 backgroundImg6: require('@/static/background/home_ic_huanchang@2x.png'), | 
|                 backgroundImg7: require('@/static/background/home_ic_huanchangjilu@2x.png'), | 
|                 backgroundImg8: require('@/static/background/home_ic_yuangong@2x.png'), | 
|             } | 
|         }, | 
|         onShow() { | 
|             this.getNum() | 
|         }, | 
|         methods: { | 
|             getNum() { | 
|                 this.$u.api.guaranteeNum() | 
|                     .then(res => { | 
|                         if (res.code === 200) { | 
|                             this.num = res.data | 
|                         } | 
|                     }) | 
|             }, | 
|             loginOut() { | 
|                 this.$u.api.logout() | 
|                     .then(res => { | 
|                         if (res.code === 200) { | 
|                             this.$store.commit('empty') | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/login/login' | 
|                             }) | 
|                         } | 
|                     }) | 
|             }, | 
|             jump(type) { | 
|                 if (!this.cookies || !this.userInfo) { | 
|                     uni.navigateTo({ | 
|                         url: '/pages/login/login' | 
|                     }) | 
|                 } | 
|                 switch(type) { | 
|                     case 1: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:insuranceapply:query').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/insuranceApplication/insuranceApplication' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 2: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:myPolicy:query').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/myPolicy/myPolicy' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 3: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:onlineReporting:create').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/online_reporting/online_reporting' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 4: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:addsubtract:apply').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/addition_subtraction_application/addition_subtraction_application' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 5: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:addsubtractInsuranceRecords:query').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/add_subtract_insurance/add_subtract_insurance' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 6: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:factoryChange:create').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/factoryChange/factoryChange' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 7: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'business:factoryChange:query').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/dispatch_unit_records/dispatch_unit_records' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                     case 8: | 
|                         // if (this.userInfo.permissions.filter(item => item === 'system:user:query').length > 0) { | 
|                             uni.navigateTo({ | 
|                                 url: '/pages/employee_management/employee_management' | 
|                             }) | 
|                         // } else { | 
|                         //     uni.showToast({ | 
|                         //         title: '您没有权限', | 
|                         //         icon: 'none' | 
|                         //     }) | 
|                         // } | 
|                         break | 
|                 } | 
|             } | 
|         } | 
|     } | 
| </script> | 
|   | 
| <style lang="scss" scoped> | 
|     .content { | 
|         width: 100%; | 
|         .content_loginout { | 
|             width: 200rpx; | 
|             // margin: 0 auto; | 
|             left: 50%; | 
|             transform: translate(-50%, 0); | 
|             position: fixed; | 
|             bottom: calc(env(safe-area-inset-bottom) + 40rpx); | 
|         } | 
|         .content_head { | 
|             width: 100%; | 
|             height: 292rpx; | 
|             padding: 40rpx; | 
|             box-sizing: border-box; | 
|             background-repeat: no-repeat; | 
|             background-size: 100% 100%; | 
|             display: flex; | 
|             flex-direction: column; | 
|             position: relative; | 
|             text { | 
|                 &:nth-child(1) { | 
|                     width: 100%; | 
|                     overflow: hidden; | 
|                     white-space: nowrap; | 
|                     text-overflow: ellipsis; | 
|                     font-weight: 600; | 
|                     font-size: 44rpx; | 
|                     color: #FFFFFF; | 
|                     font-style: normal; | 
|                 } | 
|                 &:nth-child(2) { | 
|                     font-weight: 500; | 
|                     font-size: 28rpx; | 
|                     color: #FFFFFF; | 
|                     font-style: normal; | 
|                     margin-top: 24rpx; | 
|                 } | 
|             } | 
|         } | 
|         .content_box { | 
|             width: 100%; | 
|             padding: 0 30rpx; | 
|             box-sizing: border-box; | 
|             position: relative; | 
|             top: -100rpx; | 
|             left: 0; | 
|             .content_box_list1 { | 
|                 width: 100%; | 
|                 margin-top: 20rpx; | 
|                 display: flex; | 
|                 align-items: center; | 
|                 justify-content: space-between; | 
|                 flex-wrap: wrap; | 
|                 .content_box_list1_item { | 
|                     width: 336rpx; | 
|                     height: 160rpx; | 
|                     margin-right: 18rpx; | 
|                     margin-bottom: 20rpx; | 
|                     padding: 24rpx 28rpx; | 
|                     box-sizing: border-box; | 
|                     background-repeat: no-repeat; | 
|                     background-size: 100% 100%; | 
|                     display: flex; | 
|                     flex-direction: column; | 
|                     &:nth-child(2n) { | 
|                         margin-right: 0 !important; | 
|                     } | 
|                     text { | 
|                         &:nth-child(1) { | 
|                             font-weight: 500; | 
|                             font-size: 32rpx; | 
|                             color: #222222; | 
|                             font-style: normal; | 
|                         } | 
|                         &:nth-child(2) { | 
|                             font-weight: 400; | 
|                             font-size: 24rpx; | 
|                             color: #768188; | 
|                             font-style: normal; | 
|                             text-transform: uppercase; | 
|                         } | 
|                     } | 
|                 } | 
|             } | 
|             .content_box_list { | 
|                 width: 100%; | 
|                 height: 336rpx; | 
|                 display: flex; | 
|                 align-items: center; | 
|                 justify-content: space-between; | 
|                 .content_box_list_left { | 
|                     width: 336rpx; | 
|                     height: 100%; | 
|                     background-repeat: no-repeat; | 
|                     background-size: 100% 100%; | 
|                     display: flex; | 
|                     flex-direction: column; | 
|                     padding: 24rpx 28rpx; | 
|                     box-sizing: border-box; | 
|                     text { | 
|                         &:nth-child(1) { | 
|                             font-weight: 500; | 
|                             font-size: 32rpx; | 
|                             color: #222222; | 
|                             font-style: normal; | 
|                         } | 
|                         &:nth-child(2) { | 
|                             font-weight: 400; | 
|                             font-size: 24rpx; | 
|                             color: #768188; | 
|                             font-style: normal; | 
|                             text-transform: uppercase; | 
|                         } | 
|                     } | 
|                 } | 
|                 .content_box_list_right { | 
|                     width: 336rpx; | 
|                     height: 100%; | 
|                     display: flex; | 
|                     flex-direction: column; | 
|                     justify-content: space-between; | 
|                     .content_box_list_right_row { | 
|                         width: 100%; | 
|                         height: 160rpx; | 
|                         padding: 24rpx 28rpx; | 
|                         box-sizing: border-box; | 
|                         background-repeat: no-repeat; | 
|                         background-size: 100% 100%; | 
|                         display: flex; | 
|                         flex-direction: column; | 
|                         text { | 
|                             &:nth-child(1) { | 
|                                 font-weight: 500; | 
|                                 font-size: 32rpx; | 
|                                 color: #222222; | 
|                                 font-style: normal; | 
|                             } | 
|                             &:nth-child(2) { | 
|                                 font-weight: 400; | 
|                                 font-size: 24rpx; | 
|                                 color: #768188; | 
|                                 font-style: normal; | 
|                                 text-transform: uppercase; | 
|                             } | 
|                         } | 
|                     } | 
|                 } | 
|             } | 
|         } | 
|     } | 
| </style> |