| | |
| | | <view class="">
|
| | | <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder
|
| | | @leftClick="selectBoxShow = !selectBoxShow">
|
| | |
|
| | | <view slot="left" class="top flex">
|
| | | <view class="top-text f-30 fw">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
|
| | | </view>
|
| | | <u-icon name="/static/icon/change-icon.png"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | </u-navbar>
|
| | | <view class="content">
|
| | | <view class="swiper">
|
| | |
| | | </view>
|
| | |
|
| | | <view class="block flex a-i-c j-c-s-b" v-if="roleType == 1">
|
| | | <view class="block-item">
|
| | | <view @click="scan" class="block-item">
|
| | | <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
|
| | | <view class="block-item-box flex a-i-c ">
|
| | | <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
|
| | |
| | | </view>
|
| | | </view>
|
| | | <u-grid :border="false" col="4">
|
| | | <u-grid-item v-for="(item, index) in jobList" :index="index" :key="index"
|
| | | :customStyle="{paddingTop:20+'rpx'}">
|
| | | <u-grid-item @click="navigatorPage(item)" v-for="(item, index) in jobList" :index="index"
|
| | | :key="index" :customStyle="{paddingTop:20+'rpx'}">
|
| | | <view class="grid-item flex f-d-c a-i-c" :style="{background:item.style.background}">
|
| | | <u-icon :name="item.icon" width="60rpx" height="60rpx"></u-icon>
|
| | | <text class="grid-text f-24 mt-10">{{item.text}}</text>
|
| | |
| | |
|
| | | navTo() {
|
| | | this.$u.func.globalNavigator("/subPackage/bs/views/zhsb", "navTo")
|
| | | },
|
| | |
|
| | | navigatorPage() {
|
| | | let url = "/subPackage/workbench/views/cscj"
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | },
|
| | |
|
| | | scan() {
|
| | | const that = this
|
| | | uni.scanCode({
|
| | | success: function(res) {
|
| | | console.log(res)
|
| | |
|
| | |
|
| | | console.log('条码类型:' + res.scanType);
|
| | | console.log('条码内容:' + res.result);
|
| | |
|
| | |
|
| | | let obj = that.getUrlParams(res.result)
|
| | | console.log(obj)
|
| | |
|
| | | let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
|
| | | console.log(url)
|
| | | that.$u.func.globalNavigator(url, "navTo")
|
| | |
|
| | |
|
| | | }
|
| | | });
|
| | | },
|
| | |
|
| | | getUrlParams(url) {
|
| | | // 通过 ? 分割获取后面的参数字符串
|
| | | let urlStr = url.split('?')[1]
|
| | | // 创建空对象存储参数
|
| | | let obj = {};
|
| | | // 再通过 & 将每一个参数单独分割出来
|
| | | let paramsArr = urlStr.split('&')
|
| | | for (let i = 0, len = paramsArr.length; i < len; i++) {
|
| | | // 再通过 = 将每一个参数分割为 key:value 的形式
|
| | | let arr = paramsArr[i].split('=')
|
| | | obj[arr[0]] = arr[1];
|
| | | }
|
| | | return obj
|
| | | }
|
| | |
|
| | | }
|