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

pda2手机端调整

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