123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <view style="height: 100vh;background-color: white;">
- <u-swiper :list="swaiperList"></u-swiper>
- <!-- 宫格组件 -->
- <uni-section title="功能" type="line"></uni-section>
- <view class="cu-list grid" :class="['col-4','no-border']">
- <view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<4*2" v-show="item.showFlag||adminType">
- <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" @click="click(item)" >
- </view>
- <text>{{item.name}}</text>
- </view>
- </view>
- <view v-show="adminType">
- <uni-section title="系统管理" type="line"></uni-section>
- <view class="cu-list grid" :class="['col-4','no-border']">
- <view class="cu-item" v-for="(item,index) in sysManageList" :key="index" v-if="index<4*2"
- @click="click(item)">
- <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
- </view>
- <text>{{item.name}}</text>
- </view>
- </view>
- </view>
- <u-toast ref="uToast" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- cuIconList: [{
- cuIcon: 'writefill',
- color: 'red',
- name: '建档',
- url: '/pages/filing/list',
- showFlag:true
- }, {
- cuIcon: 'pullleft',
- color: 'red',
- name: '领活',
- url: '/pages/receive/list',
- showFlag:true
- }, {
- cuIcon: 'pullright',
- color: 'red',
- name: '送活',
- url: '/pages/back/list',
- showFlag:true
- }, {
- cuIcon: 'home',
- color: 'red',
- name: '库存',
- url: '/pages/stock/index',
- showFlag:true
- }, {
- cuIcon: 'rank',
- color: 'red',
- badge: 0,
- name: '计划排产',
- url: '/pages/plan/list',
- showFlag:false
- }, {
- cuIcon: 'text',
- color: 'red',
- badge: 0,
- name: '报表',
- url: '/pages/report/index',
- showFlag:true
- }],
- modalName: null,
- sysManageList: [{
- cuIcon: 'friendadd',
- color: 'red',
- name: '新增用户',
- url: '/pages/user/add'
- }, {
- cuIcon: 'friendfill',
- color: 'red',
- name: '用户管理',
- url:'/pages/user/list'
- }, {
- cuIcon: 'home',
- color: 'red',
- name: '车间管理',
- url:'/pages/workshop/list'
- }, {
- cuIcon: 'paint',
- color: 'red',
- name: '班组管理',
- url:'/pages/team/list'
- }],
- swaiperList: [
- '/static/swaiper_pic/work_space/20181112085705180.jpg',
- '/static/swaiper_pic/work_space/sy_xialapic.jpg',
- '/static/swaiper_pic/work_space/20150211145332520.jpg',
- '/static/swaiper_pic/work_space/sec2_lilianbg.jpg',
- ],
- adminType: false
- }
- },
- methods: {
- click(item) {
- console.log(item.url)
- uni.navigateTo({
- url: item.url
- })
- }
- },
- onLoad(){
- this.adminType = this.$store.state.user.adminType
- }
- }
- </script>
- <style lang="scss">
- .grid-text {
- font-size: 14px;
- color: #909399;
- padding: 10rpx 0 20rpx 0rpx;
- /* #ifndef APP-PLUS */
- box-sizing: border-box;
- /* #endif */
- }
- </style>
|