模块权限

duizhaopin_ui
cxw 2 years ago
parent 2a2cdfc8dc
commit f36a6ededf

@ -2,5 +2,5 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API = 'http://127.0.0.1:5000'
VUE_APP_BASE_API = 'http://192.168.1.114:9001'
VUE_APP_FACE_API = 'http://192.168.1.114:5000'

@ -2,6 +2,6 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API ='http://127.0.0.1:5000'
VUE_APP_BASE_API = 'http://192.168.1.114:9001'
VUE_APP_FACE_API ='http://192.168.1.114:5000'

@ -4,6 +4,6 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API='http://127.0.0.1:5000'
VUE_APP_BASE_API = 'http://192.168.1.114:9001'
VUE_APP_FACE_API='http://192.168.1.114:5000'

@ -15,3 +15,11 @@ export function dangerous_db_list(data) {
data
})
}
export function get_uhf_code() {
return request({
url: '/drug/get_uhf_code',
method: 'get',
baseURL: process.env.VUE_APP_FACE_API
})
}

@ -2,6 +2,9 @@
<div />
</template>
<script>
import {
get_uhf_code,
} from '@/api/reagent/database'
export default {
name: 'Scannner',
// eslint-disable-next-line vue/require-prop-types
@ -14,10 +17,14 @@ export default {
nextTime: '',
lastCode: '',
nextCode: '',
dtmainId: ''
dtmainId: '',
timer: undefined,
}
},
created() {
this.timer = setInterval(() => {
this.uhf_code()
}, 2000)
//
window.document.onkeypress = (e) => {
if (window.event) { // IE
@ -66,7 +73,24 @@ export default {
// alert('' + code)
// }
this.codeValue = code
},
uhf_code(){
get_uhf_code().then(res => {
if (res.status === 0) {
console.log(res)
if (res.data !=''){
this.parseQRCode(res.data)
}
} else {
this.$message.error(res.msg)
}
})
}
}
},
beforeDestroy() {
if (this.timer) {
clearInterval(this.timer)
}
},
}
</script>

@ -89,7 +89,7 @@ const reagentRouter = [
path: '/reagent/warehousing',
component: Layout,
redirect: '/reagent/warehousing/index',
meta: { classification: 'reagent', module_code: 'DataReportIndex' },
meta: { classification: 'reagent', module_code: 'DrugTemplatelndex' },
children: [
{
path: 'index',
@ -159,7 +159,7 @@ const reagentRouter = [
path: '/reagent/weightregistration',
component: Layout,
redirect: '/reagent/weightregistration/index',
meta: { classification: 'reagent', module_code: 'CreateApplyView' },
meta: { classification: 'reagent', module_code: 'WeightRegistration' },
children: [
{
path: 'index',
@ -197,26 +197,26 @@ const reagentRouter = [
// }
// ]
// },
// {
// path: '/reagent/database',
// component: Layout,
// redirect: '/reagent/database/msds',
// meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent', module_code: 'ChemicalDB' },
// children: [
// {
// path: 'msds',
// name: 'MSDS',
// component: () => import('@/views/reagent/database/index'),
// meta: { title: 'MSDS数据库', classification: 'reagent' }
// },
// {
// path: 'dangerous',
// name: 'Dangerous',
// component: () => import('@/views/reagent/database/index'),
// meta: { title: '危化品数据库', classification: 'reagent' }
// }
// ]
// },
{
path: '/reagent/database',
component: Layout,
redirect: '/reagent/database/msds',
meta: { title: '化学品数据库', icon: '化学品数据库', classification: 'reagent', module_code: 'ChemicalDB' },
children: [
{
path: 'msds',
name: 'MSDS',
component: () => import('@/views/reagent/database/index'),
meta: { title: 'MSDS数据库', classification: 'reagent' }
},
{
path: 'dangerous',
name: 'Dangerous',
component: () => import('@/views/reagent/database/index'),
meta: { title: '危化品数据库', classification: 'reagent' }
}
]
},
{
path: '/reagent/management',
component: Layout,

Loading…
Cancel
Save