提交修改
This commit is contained in:
parent
12e0972f8d
commit
65e2f1f8b3
@ -142,7 +142,7 @@ export const apiGetTCounts = data => {
|
||||
|
||||
// 新增盘点次数
|
||||
export const apiAddTCounts = () => {
|
||||
return http({url: `/lz_management/modules/count/newStart`, method: 'get',})
|
||||
return http({url: `/lz_management/modules/count/newStart`, method: 'get'})
|
||||
}
|
||||
|
||||
// 删除盘点次数
|
||||
|
||||
@ -5,95 +5,105 @@
|
||||
v-loading.fullscreen.lock="loading"
|
||||
element-loading-text="拼命加载中">
|
||||
<template v-if="!loading">
|
||||
<main-navbar />
|
||||
<main-sidebar />
|
||||
<main-navbar/>
|
||||
<main-sidebar/>
|
||||
<div class="site-content__wrapper" :style="{ 'min-height': documentClientHeight + 'px' }">
|
||||
<main-content v-if="!$store.state.common.contentIsNeedRefresh" />
|
||||
<main-content v-if="!$store.state.common.contentIsNeedRefresh"/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MainNavbar from './main-navbar'
|
||||
import MainSidebar from './main-sidebar'
|
||||
import MainContent from './main-content'
|
||||
import { apiGetUserInfo } from '@/api/api_sys'
|
||||
import MainNavbar from './main-navbar'
|
||||
import MainSidebar from './main-sidebar'
|
||||
import MainContent from './main-content'
|
||||
import {apiGetUserInfo} from '@/api/api_sys'
|
||||
|
||||
export default {
|
||||
provide () {
|
||||
return {
|
||||
// 刷新
|
||||
refresh () {
|
||||
this.$store.commit('common/updateContentIsNeedRefresh', true)
|
||||
this.$nextTick(() => {
|
||||
this.$store.commit('common/updateContentIsNeedRefresh', false)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
MainNavbar,
|
||||
MainSidebar,
|
||||
MainContent
|
||||
},
|
||||
computed: {
|
||||
documentClientHeight: {
|
||||
get () { return this.$store.state.common.documentClientHeight },
|
||||
set (val) { this.$store.commit('common/updateDocumentClientHeight', val) }
|
||||
},
|
||||
sidebarFold: {
|
||||
get () { return this.$store.state.common.sidebarFold }
|
||||
},
|
||||
userId: {
|
||||
get () { return this.$store.state.user.id },
|
||||
set (val) { this.$store.commit('user/updateId', val) }
|
||||
},
|
||||
userName: {
|
||||
get () {
|
||||
return this.$store.state.user.userName
|
||||
},
|
||||
set (val) { this.$store.commit('user/updateName', val) }
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.handleGetUserInfo()
|
||||
},
|
||||
mounted () {
|
||||
this.resetDocumentClientHeight()
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 重置窗口可视高度
|
||||
resetDocumentClientHeight () {
|
||||
this.documentClientHeight = document.documentElement['clientHeight']
|
||||
window.onresize = () => {
|
||||
this.documentClientHeight = document.documentElement['clientHeight']
|
||||
}
|
||||
},
|
||||
// 获取当前登录用户的信息
|
||||
handleGetUserInfo () {
|
||||
apiGetUserInfo({}, '').then(res => {
|
||||
if (res && res.code === 0) {
|
||||
this.loading = false
|
||||
this.userId = res.user && res.user.id
|
||||
this.userName = res.user && res.user.userName
|
||||
this.mobile = res.user.mobile
|
||||
this.realName = res.user && res.user.realName
|
||||
this.$store.state.user = res.user && res.user
|
||||
this.$watermark.set(res.user.realName + ' ' + this.mobile.substr(7, 4))
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
export default {
|
||||
provide () {
|
||||
return {
|
||||
// 刷新
|
||||
refresh () {
|
||||
this.$store.commit('common/updateContentIsNeedRefresh', true)
|
||||
this.$nextTick(() => {
|
||||
this.$store.commit('common/updateContentIsNeedRefresh', false)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
MainNavbar,
|
||||
MainSidebar,
|
||||
MainContent
|
||||
},
|
||||
computed: {
|
||||
documentClientHeight: {
|
||||
get () {
|
||||
return this.$store.state.common.documentClientHeight
|
||||
},
|
||||
set (val) {
|
||||
this.$store.commit('common/updateDocumentClientHeight', val)
|
||||
}
|
||||
},
|
||||
sidebarFold: {
|
||||
get () {
|
||||
return this.$store.state.common.sidebarFold
|
||||
}
|
||||
},
|
||||
userId: {
|
||||
get () {
|
||||
return this.$store.state.user.id
|
||||
},
|
||||
set (val) {
|
||||
this.$store.commit('user/updateId', val)
|
||||
}
|
||||
},
|
||||
userName: {
|
||||
get () {
|
||||
return this.$store.state.user.userName
|
||||
},
|
||||
set (val) {
|
||||
this.$store.commit('user/updateName', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.handleGetUserInfo()
|
||||
},
|
||||
mounted () {
|
||||
this.resetDocumentClientHeight()
|
||||
},
|
||||
methods: {
|
||||
// 重置窗口可视高度
|
||||
resetDocumentClientHeight () {
|
||||
this.documentClientHeight = document.documentElement['clientHeight']
|
||||
window.onresize = () => {
|
||||
this.documentClientHeight = document.documentElement['clientHeight']
|
||||
}
|
||||
},
|
||||
// 获取当前登录用户的信息
|
||||
handleGetUserInfo () {
|
||||
apiGetUserInfo({}, '').then(res => {
|
||||
if (res && res.code === 0) {
|
||||
this.loading = false
|
||||
this.userId = res.user && res.user.id
|
||||
this.userName = res.user && res.user.userName
|
||||
this.mobile = res.user.mobile
|
||||
this.realName = res.user && res.user.realName
|
||||
this.$store.state.user = res.user && res.user
|
||||
this.$watermark.set(res.user.realName + ' ' + this.mobile.substr(7, 4))
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './lzstaffrole-add-or-update'
|
||||
import {apiGetRoleList,apiDelete} from '@/api/api_staff_role'
|
||||
import {apiGetRoleList, apiDelete} from '@/api/api_staff_role'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user