修改必填,隐藏模块

main
jwg 8 months ago
parent 012ccfffaf
commit 20d4a10e4b

File diff suppressed because it is too large Load Diff

@ -4,13 +4,11 @@
<van-col span="8"> <van-col span="8">
<div class="user-box"> <div class="user-box">
<!-- <van-image width="50" class="img-box" height="50" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> --> <!-- <van-image width="50" class="img-box" height="50" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> -->
<span class="ml-5">{{userInfo.nickname}}</span> <span class="ml-5">{{ userInfo.nickname }}</span>
</div> </div>
</van-col> </van-col>
<van-col span="8"> <van-col span="8">
<div class="tt-box"> <div class="tt-box">财务数字一体化</div>
财务数字一体化
</div>
</van-col> </van-col>
<van-col span="8" class="rt-box" @click="handleToWait"> <van-col span="8" class="rt-box" @click="handleToWait">
<div class="msg-box"> <div class="msg-box">
@ -27,21 +25,24 @@
</van-row> </van-row>
<van-row type="flex" justify="space-between" align="center"> <van-row type="flex" justify="space-between" align="center">
<van-col span="24" class="rt-box" @click="loginOut"> <van-col span="24" class="rt-box" @click="loginOut">
<div class="tt-box" style="margin-top:1rem"> <div class="tt-box" style="margin-top: 1rem">退出</div>
退出
</div>
</van-col> </van-col>
</van-row> </van-row>
<div class="home-content"> <div class="home-content">
<div class="item-home" v-for="(item,index) in roterList" :key="index"> <div class="item-home" v-for="(item, index) in roterList" :key="index">
<div class="item-tt" v-if="item.row.length">{{item.title}}</div> <div class="item-tt" v-if="item.row.length">{{ item.title }}</div>
<div class="item-box"> <div class="item-box">
<van-row type="flex"> <van-row type="flex">
<van-col class="ct-cl" span="8" v-for="(nt,ni) in item.row" :key="ni"> <van-col
class="ct-cl"
span="8"
v-for="(nt, ni) in item.row"
:key="ni"
>
<div class="cl-box" @click="handelTo(nt.route)"> <div class="cl-box" @click="handelTo(nt.route)">
<van-icon :name="nt.icon" size="2rem" /> <van-icon :name="nt.icon" size="2rem" />
<div class="cl-tt"> <div class="cl-tt">
{{nt.title}} {{ nt.title }}
</div> </div>
</div> </div>
</van-col> </van-col>
@ -55,7 +56,7 @@
<script> <script>
import { checkPermission } from '@/utils' import { checkPermission } from '@/utils'
import { getMyNotifyMessagePage } from "@/api/bs/waitToDo"; import { getMyNotifyMessagePage } from '@/api/bs/waitToDo'
import { Dialog } from 'vant' import { Dialog } from 'vant'
export default { export default {
name: 'home-index', name: 'home-index',
@ -65,7 +66,7 @@ export default {
props: { props: {
applyShow: { applyShow: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
}, },
computed: { computed: {
@ -103,8 +104,10 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 999, pageSize: 999,
}).then((res) => { }).then((res) => {
let resList = (res.data && res.data.list || []) let resList = (res.data && res.data.list) || []
let newArr = resList.filter(item => !filterArr.includes(item.billType)) let newArr = resList.filter(
(item) => !filterArr.includes(item.billType)
)
if (newArr.length) { if (newArr.length) {
this.isDot = true this.isDot = true
} else { } else {
@ -120,7 +123,7 @@ export default {
handleFilterList() { handleFilterList() {
this.roterList = [] this.roterList = []
let arr = [ let arr = [
{ /* {
row: [ row: [
{ {
route: '/mySupplier', route: '/mySupplier',
@ -148,7 +151,7 @@ export default {
}, },
], ],
title: '合同审批' title: '合同审批'
}, }, */
{ {
row: [ row: [
// { // {
@ -194,36 +197,38 @@ export default {
show: checkPermission('bs/invoice/index'), show: checkPermission('bs/invoice/index'),
}, },
], ],
title: '企业办公' title: '企业办公',
} },
] ]
this.roterList = arr.map(item => { this.roterList = arr.map((item) => {
return { return {
...item, ...item,
row: item.row.filter(n => n.show) row: item.row.filter((n) => n.show),
} }
}) })
}, },
checkPermission, checkPermission,
handelTo(route) { handelTo(route) {
if (route) { if (route) {
if (['/trips', '/claim', '/supplier', '/custom', '/pay'].includes(route)) { if (
['/trips', '/claim', '/supplier', '/custom', '/pay'].includes(route)
) {
this.$router.push({ this.$router.push({
path: route, path: route,
query: { query: {
type: 'add' type: 'add',
} },
}) })
} else { } else {
this.$router.push({ this.$router.push({
path: route path: route,
}) })
} }
} else { } else {
this.$fm('模块正在中...') this.$fm('模块正在中...')
} }
} },
} },
} }
</script> </script>

Loading…
Cancel
Save