feat: 更新UI主题和样式,优化页面布局和交互
- 将侧边栏主题从深色改为浅色 - 移除多个组件的背景色和金属风格样式 - 调整按钮、表格和分页组件的样式和间距 - 新增easycode扫码功能页面 - 更新基础URL配置和应用版本号 - 优化登录后跳转逻辑和登出功能 - 调整滚动条和菜单项的样式
This commit is contained in:
60
apps/hand-factory/pages/easycode/easycode.vue
Normal file
60
apps/hand-factory/pages/easycode/easycode.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<view>
|
||||
<button v-for='item in types' @click="handleScan(item.dictValue)">
|
||||
{{ item.dictLabel }}
|
||||
</button>
|
||||
|
||||
<button @click='handleLogout'>
|
||||
退出登录
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import { getGenerateRecord } from '@/api/wms/code.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
types: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleLogout() {
|
||||
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {}).finally(() => {
|
||||
this.$tab.reLaunch('/pages/login')
|
||||
})
|
||||
})
|
||||
},
|
||||
handleScan(type) {
|
||||
// 1. 扫码
|
||||
uni.scanCode({
|
||||
success(res) {
|
||||
const result = res.result;
|
||||
// 2. 解析二维码的content,获取enter_coil_no、current_coil_no和coil_id
|
||||
const qrcodeRecord = qrcodeRes.data;
|
||||
const content = JSON.parse(qrcodeRecord.content);
|
||||
const enterCoilNo = content.enter_coil_no;
|
||||
const currentCoilNo = content.current_coil_no;
|
||||
const coilId = content.coil_id && content.coil_id !== 'null' ? content.coil_id : null;
|
||||
|
||||
// 3. 调用创建待操作记录的API
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 获取字典
|
||||
getDicts('easycode_type').then(res => {
|
||||
console.log(res)
|
||||
this.types = res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user