Commit c7f46af8 authored by 张伯涛's avatar 张伯涛

pda2手机端调整

parent 27040a15
<template>
<div class="navbar">
<div class="title-box">
<!-- <hamburger-->
<!-- :is-active="sidebar.opened"-->
<!-- class="hamburger-container"-->
<!-- @toggleClick="toggleSideBar"-->
<!-- />-->
<hamburger
:is-active="menuState"
class="hamburger-container"
@toggleClick="toggleSideBar"
/>
<!-- <el-dropdown-->
<!-- class="change-sys"-->
<!-- @command="handleCommand"-->
......@@ -72,6 +72,7 @@ export default {
},
data() {
return {
menuState: false,
appList: [],
userName: this.$store.state.user.name,
specialTag: this.$store.state.user.specialTag
......@@ -109,7 +110,8 @@ export default {
// })
// },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
this.menuState = !this.menuState
this.$store.dispatch('app/menuState', this.menuState)
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
......
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div class="nav-container fixed-header">
<sidebar class="sidebar-container" :style="{display:sidebarType ? 'block':'none'}" />
<div class="main-container" :style="{marginLeft:sidebarType ? '54px':'0px'}">
<div class="nav-container fixed-header" :style="{width:sidebarType ? 'calc(100% - 63px)':'calc(100% - 12px)'}">
<Header />
</div>
<div class="nav-container-two">
<div class="placeholder"></div>
<div class="placeholder" />
<tags-view />
<navbar />
</div>
......@@ -38,6 +38,9 @@ export default {
},
mixins: [ResizeMixin],
computed: {
sidebarType() {
return this.$store.state.app.menuState
},
sidebar() {
return this.$store.state.app.sidebar
},
......
......@@ -6,6 +6,7 @@ const state = {
opened: false,
withoutAnimation: false
},
menuState: false,
device: 'desktop',
loadingCount: 0
}
......@@ -30,6 +31,9 @@ const mutations = {
},
SET_LOADING_COUNT: (state, countNum) => {
state.loadingCount = countNum
},
MENU_STATE: (state, flag) => {
state.menuState = flag
}
}
......@@ -37,6 +41,9 @@ const actions = {
toggleSideBar({ commit }) {
commit('TOGGLE_SIDEBAR')
},
menuState({ commit }, flag) {
commit('MENU_STATE', flag)
},
closeSideBar({ commit }, { withoutAnimation }) {
commit('CLOSE_SIDEBAR', withoutAnimation)
},
......
......@@ -26,7 +26,7 @@ html {
#app {
height: 100%;
overflow-x: hidden;
min-width: 768px;
min-width: 300px;
}
*,
......
<template>
<div class="setup_module">
<!-- <div class="button_row">-->
<div class="button_row">
<el-button type="primary" @click="handleOpenScan">扫码</el-button>
</div>
<div class="button_row">
<el-button type="primary" @click="handleTakePhotos">拍照</el-button>
<el-button type="primary" @click="handleTakePhotosAlbum">拍照取相册</el-button>
</div>
<div class="button_row">
<el-button type="primary" @click="handleOutbound">出库</el-button>
<el-button type="primary">入库</el-button>
<el-button type="primary" @click="handleTakePhotosAlbum">拍照取相册</el-button>
</div>
<div>扫码获取:<span>{{ scanCode }}</span></div>
<div style="margin-top: 50px">拍照获取: <img :src="imgUrlForm.url" class="sidebar-logo"></div>
<!-- </div>-->
<!-- <div class="button_row">-->
<!-- <el-button type="primary" @click="handleOutbound">出库</el-button>-->
<!-- <el-button type="primary">入库</el-button>-->
<!-- </div>-->
<div>扫码获取:</div>
<div>{{ scanCode }}</div>
<div style="margin-top: 50px">拍照获取:</div>
<div><img :src="imgUrlForm.url" class="sidebar-logo"></div>
</div>
</template>
<script>
import { getToken } from '@/utils/auth'
import {openCameraStorage} from "@/utils/WebViewContact";
import { openCameraStorage } from '@/utils/WebViewContact'
export default {
name: 'Index',
data() {
......@@ -47,6 +55,8 @@ export default {
tokenMsg: getToken()
}
this.$WebView.openCamera(params).then(res => {
console.log('11111', res)
console.log('22222', JSON.parse(res))
this.imgUrlForm = JSON.parse(res)
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment