模块权限

duizhaopin_ui
cxw 2 years ago
parent 2a2cdfc8dc
commit f36a6ededf

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

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

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

@ -15,3 +15,11 @@ export function dangerous_db_list(data) {
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 /> <div />
</template> </template>
<script> <script>
import {
get_uhf_code,
} from '@/api/reagent/database'
export default { export default {
name: 'Scannner', name: 'Scannner',
// eslint-disable-next-line vue/require-prop-types // eslint-disable-next-line vue/require-prop-types
@ -14,10 +17,14 @@ export default {
nextTime: '', nextTime: '',
lastCode: '', lastCode: '',
nextCode: '', nextCode: '',
dtmainId: '' dtmainId: '',
timer: undefined,
} }
}, },
created() { created() {
this.timer = setInterval(() => {
this.uhf_code()
}, 2000)
// //
window.document.onkeypress = (e) => { window.document.onkeypress = (e) => {
if (window.event) { // IE if (window.event) { // IE
@ -66,7 +73,24 @@ export default {
// alert('' + code) // alert('' + code)
// } // }
this.codeValue = 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> </script>

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

Loading…
Cancel
Save