| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="header">智云L-MES制造执行系统</view> |
| | | <view class="header">智云L-MES制造执行系统 |
| | | <view class="switch-button"> |
| | | <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="mains"> |
| | | <view class="box" v-for="(item,index) in itemData" :key="index" @tap="toUrl(item)"> |
| | | <view v-if="!canEdit" :hidden="item.hidden" class="box" v-for="(item,index) in itemData" :key="index" @tap="toUrl(item)"> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | <view :enable-hidden="item.hidden" v-if="canEdit" class="box edit" v-for="(item,index) in itemData" |
| | | :key="index" @tap="switchHidden(index)"> |
| | | <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <vers></vers> |
| | | </view> |
| | | </template> |
| | |
| | | import vers from './vers.vue'; |
| | | export default { |
| | | components: { |
| | | vers |
| | | vers, |
| | | }, |
| | | data() { |
| | | return { |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [{ |
| | | img: '../../static/icon/icon8.png', |
| | | text: '采购订单标签', |
| | | url: '/pages/caigoudingdan/caigoudingdan', |
| | | id: 1 |
| | | },{ |
| | | img: '../../static/icon/icon4.png', |
| | | text: '采购订单子标签', |
| | | url: '/pages/tiaomadaying/tiaomadaying', |
| | | id: 2, |
| | | },{ |
| | | img: '../../static/icon/icon11.png', |
| | | text: '收料通知单标签', |
| | | url: '/pages/shouliaotongzhi/table', |
| | | id: 3, |
| | | },{ |
| | | img: '../../static/icon/icon17.png', |
| | | text: '采购入库新增', |
| | | url: '/pages/caigouruku/form?OperationType=1', |
| | | id: 4, |
| | | },{ |
| | | img: '../../static/icon/icon20.png', |
| | | text: '采购退料新增', |
| | | url: '/pages/caigoutuiliao/form?OperationType=1', |
| | | id: 5, |
| | | },{ |
| | | img: '../../static/icon/icon32.png', |
| | | text: '直接调拨新增', |
| | | url: '/pages/zhijiediaobo/form?OperationType=1', |
| | | id: 6, |
| | | },{ |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料新增', |
| | | url: '/pages/shengchanlingliaoshengdan/form?OperationType=1', |
| | | id: 7, |
| | | },{ |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料新增', |
| | | url: '/pages/shengchanbuliao/form?OperationType=1', |
| | | id: 8, |
| | | },{ |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库新增', |
| | | url: '/pages/shengchanrukushengdan/form?OperationType=1', |
| | | id: 9, |
| | | },{ |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料新增', |
| | | url: '/pages/weiwailingliao/form?OperationType=1', |
| | | id: 10, |
| | | },{ |
| | | img: '../../static/icon/icon17.png', |
| | | text: '其他入库新增', |
| | | url: '/pages/qitaruku_v2/form?OperationType=1', |
| | | id: 11, |
| | | },{ |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库新增', |
| | | url: '/pages/qitachuku_v2/form?OperationType=1', |
| | | id: 12, |
| | | },{ |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库新增', |
| | | url: '/pages/xiaoshouchuku/form?OperationType=1', |
| | | id: 13, |
| | | },{ |
| | | img: '../../static/icon/icon19.png', |
| | | text: '销售退货新增', |
| | | url: '/pages/xiaoshoutuihuo/form?OperationType=1', |
| | | id: 14, |
| | | },{ |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料检验', |
| | | url: '/pages/shengchanlingliao/form?OperationType=1', |
| | | id: 15, |
| | | },{ |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料校验', |
| | | url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1', |
| | | id: 16, |
| | | },{ |
| | | img: '../../static/icon/icon32.png', |
| | | text: '生产调拨校验', |
| | | url: '/pages/shengchandiaobo/form?OperationType=1', |
| | | id: 17, |
| | | },{ |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库校验', |
| | | url: '/pages/qitachukujiaoyan/detail?OperationType=1', |
| | | id: 18, |
| | | },{ |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库校验', |
| | | url: '/pages/shengchanruku/form?OperationType=1', |
| | | id: 19, |
| | | },{ |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库校验', |
| | | url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1', |
| | | id: 20, |
| | | },{ |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料校验', |
| | | url: '/pages/weiwailingliaojiaoyan/form?OperationType=1', |
| | | id: 21, |
| | | }], |
| | | img: '../../static/icon/icon8.png', |
| | | text: '采购订单标签', |
| | | url: '/pages/caigoudingdan/caigoudingdan', |
| | | id: 1, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon4.png', |
| | | text: '采购订单子标签', |
| | | url: '/pages/tiaomadaying/tiaomadaying', |
| | | id: 2, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon11.png', |
| | | text: '收料通知单标签', |
| | | url: '/pages/shouliaotongzhi/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '采购入库新增', |
| | | url: '/pages/caigouruku/form?OperationType=1', |
| | | id: 4, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon20.png', |
| | | text: '采购退料新增', |
| | | url: '/pages/caigoutuiliao/form?OperationType=1', |
| | | id: 5, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '直接调拨新增', |
| | | url: '/pages/zhijiediaobo/form?OperationType=1', |
| | | id: 6, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料新增', |
| | | url: '/pages/shengchanlingliaoshengdan/form?OperationType=1', |
| | | id: 7, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料新增', |
| | | url: '/pages/shengchanbuliao/form?OperationType=1', |
| | | id: 8, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库新增', |
| | | url: '/pages/shengchanrukushengdan/form?OperationType=1', |
| | | id: 9, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料新增', |
| | | url: '/pages/weiwailingliao/form?OperationType=1', |
| | | id: 10, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '其他入库新增', |
| | | url: '/pages/qitaruku_v2/form?OperationType=1', |
| | | id: 11, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库新增', |
| | | url: '/pages/qitachuku_v2/form?OperationType=1', |
| | | id: 12, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库新增', |
| | | url: '/pages/xiaoshouchuku/form?OperationType=1', |
| | | id: 13, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon19.png', |
| | | text: '销售退货新增', |
| | | url: '/pages/xiaoshoutuihuo/form?OperationType=1', |
| | | id: 14, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料检验', |
| | | url: '/pages/shengchanlingliao/form?OperationType=1', |
| | | id: 15, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料校验', |
| | | url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1', |
| | | id: 16, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '生产调拨校验', |
| | | url: '/pages/shengchandiaobo/form?OperationType=1', |
| | | id: 17, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库校验', |
| | | url: '/pages/qitachukujiaoyan/detail?OperationType=1', |
| | | id: 18, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库校验', |
| | | url: '/pages/shengchanruku/form?OperationType=1', |
| | | id: 19, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库校验', |
| | | url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1', |
| | | id: 20, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料校验', |
| | | url: '/pages/weiwailingliaojiaoyan/form?OperationType=1', |
| | | id: 21, |
| | | hidden: false, |
| | | }], |
| | | // itemData: [{ |
| | | // img: '../../static/icon/icon1.png', |
| | | // text: '设备档案', |
| | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | this.getHiddenItem() |
| | | }, |
| | | methods: { |
| | | getHiddenItem() { |
| | | let itemCache = uni.getStorageSync('HIndexItemData') || '' |
| | | console.log('itemCache: ',itemCache); |
| | | if(itemCache !== '') { |
| | | this.itemData = itemCache |
| | | } |
| | | }, |
| | | async switchHidden(index) { |
| | | console.log(this.itemData[index].hidden) |
| | | this.itemData[index].hidden = !this.itemData[index].hidden |
| | | await this.$nextTick(() => { |
| | | uni.setStorageSync("HIndexItemData", this.itemData) |
| | | }) |
| | | }, |
| | | switchIconsModeHandler() { |
| | | this.canEdit = !this.canEdit |
| | | this.$forceUpdate() |
| | | }, |
| | | toUrl(item) { |
| | | if (item.url) { |
| | | uni.navigateTo({ |
| | |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title:'功能开发中。。。', |
| | | icon:'none' |
| | | title: '功能开发中。。。', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | |
| | | color: #FFFFFF; |
| | | text-align: center; |
| | | padding: 9vh 0 6vh 0; |
| | | position: relative; |
| | | } |
| | | |
| | | .switch-button { |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 0; |
| | | } |
| | | |
| | | .mains { |
| | |
| | | margin-top: .2vh; |
| | | } |
| | | } |
| | | |
| | | .edit { |
| | | position: relative; |
| | | } |
| | | |
| | | .edit-mark { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | view[enable-hidden] { |
| | | opacity: .4 !important; |
| | | } |
| | | view[hidden] { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |