This commit is contained in:
oneao committed 2026-03-27 22:03:07 +08:00
1 parent 78e3b1292b
commit ce466130c0
10 files changed
+342 -56

No files matched your search

+8 -7
View File
@@ -1,20 +1,21 @@
<script setup lang="ts">
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
import { loadTianDiTu } from '@/utils/tdl-loader'
import { useUserStore } from './store'
// const userStore = useUserStore()
const userStore = useUserStore()
onLaunch(() => {
// userStore.requireLogin()
// uni.hideTabBar()
uni.onTabBarMidButtonTap(() => {
uni.navigateTo({
url: '/pages-sub/upload/index',
})
})
})
onLoad(async (options) => {
// options 会包含 orgid 和 bid
const { orgid, bid } = options
onLoad(async (options) => {
console.log(options)
})
onMounted(() => {
@@ -1,4 +1,8 @@
<script lang="ts" setup>
import { toast } from 'sard-uniapp'
import { ref } from 'vue'
const current = ref(0)
</script>
<template>
@@ -8,6 +12,105 @@
<sar-dialog-agent />
<sar-notify-agent />
<view>123</view>
<!-- <view class="custom-tabbar">
<view class="tabbar-container" @touchmove.stop.prevent>
<view style="height: 50px;">
<sar-tabbar v-model:current="current">
<sar-tabbar-item
:name="0"
icon="house-door-fill"
icon-family="demo-icons"
text="首页"
/>
<sar-tabbar-item @click="toast('点击了添加按钮')">
<view class="bulge">
<view class="cover" />
<view class="button">
<sar-icon name="plus" size="96rpx" />
</view>
</view>
<text class="text">
添加
</text>
</sar-tabbar-item>
<sar-tabbar-item
:name="3"
icon="person-fill"
icon-family="demo-icons"
text="我的"
/>
</sar-tabbar>
</view>
</view>
<view class="tabbar-pb" />
</view> -->
</view>
</template>
<style lang="scss" scoped>
.custom-tabbar {
height: 50px;
padding-bottom: var(--safe-area-inset-bottom);
}
.tabbar-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
border-top: 1px solid #eee;
box-sizing: border-box;
background-color: #fff;
}
.tabbar-pb {
padding-bottom: var(--safe-area-inset-bottom);
}
.bulge {
position: absolute;
top: 0;
transform-origin: top center;
transform: scale(0.5) translateY(-33%);
display: flex;
justify-content: center;
align-items: center;
width: 192rpx;
height: 192rpx;
border-radius: 50%;
background-color: var(--sar-tabbar-bg);
box-shadow: inset 0 0 0 1px var(--sar-border-color);
&:active {
opacity: 0.8;
}
}
.cover {
position: absolute;
top: 33%;
width: 100%;
height: 70%;
transform: translateY(1px);
background-color: var(--sar-tabbar-bg);
}
.button {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 152rpx;
height: 152rpx;
border-radius: 50%;
background-color: var(--sar-primary);
color: var(--sar-white);
}
.text {
position: relative;
margin-top: auto;
margin-bottom: 10rpx;
}
</style>
@@ -56,8 +56,7 @@ async function onSubmit() {
icon: 'success',
})
uni.navigateTo({
// url: '/pages-sub/upload/index',
uni.switchTab({
url: '/pages/home/index',
})
}
@@ -317,12 +317,103 @@ async function continueAdd() {
<template>
<view class="g3-container">
<template v-if="!showResult">
<view class="g3-content">
<wd-cell-group custom-class="group" title="集装箱号(OCR识别)" border use-slot>
<template #title>
<sar-icon name="close" size="32rpx" style="margin-right: 16rpx;"/>
<text>
集装箱号(OCR识别)
</text>
</template>
<view class="step-content box">
<view v-if="ocrFinish" class="header">
<sar-alert
v-if="!isError"
type="success"
show-icon
closable
:root-style="{
width: '100%',
}"
>
识别成功,请检查箱号是否正确!
<view>
准确率:{{ computedOcrScore }}
</view>
</sar-alert>
<sar-alert
v-else
type="danger"
show-icon
closable
:root-style="{
width: '100%',
}"
>
识别失败,请检查手动填写集装箱号
</sar-alert>
</view>
<view class="box-main">
<view v-if="!boxImage" class="box-placeholder" @click="handleChooseBox">
<sar-icon name="plus" size="156rpx" color="#999" />
</view>
<view v-else class="box-image">
<wd-img
:src="boxImage.path"
width="100%"
height="100%"
:enable-preview="true"
/>
<view class="delete-btn" @click="handleDeleteBoxImage()">
<sar-icon name="close" size="20rpx" color="#fff" />
</view>
</view>
</view>
<view class="box-input">
<view class="header">
<view class="label-container">
<view>集装箱号</view>
<view class="required-asterisk">
*
</view>
</view>
<view class="format">
格式: 4字母 + 7数字
</view>
</view>
<sar-input
v-model="form.containerNo"
placeholder="请输入箱号"
/>
</view>
</view>
</wd-cell-group>
<wd-cell-group custom-class="group" title="其他图片" border style="margin-top: 32rpx;">
<view class="step-content">
<sar-upload
v-model="subFileList"
multiple
:after-read="afterRead"
:before-read="beforeRead"
:before-remove="beforeRemove"
@item-click="onItemClick"
@remove="onRemove"
/>
</view>
</wd-cell-group>
<!-- <view class="g3-content">
<view class="step">
<view class="step-header">
<sar-tag theme="primary" mark="right" size="large">
1、集装箱号识别(OCR自动识别)
<sar-tag theme="primary" size="large">
1
</sar-tag>
<view>集装箱号识别(OCR自动识别)</view>
</view>
<view class="step-content box">
@@ -422,7 +513,7 @@ async function continueAdd() {
确认上传
</view>
</view>
</view>
</view> -->
</template>
<view v-else class="g3-result">
@@ -444,6 +535,10 @@ async function continueAdd() {
</template>
<style lang="scss" scoped>
page {
background-color: #f8f9fa;
}
.g3-result {
height: 100%;
display: flex;
@@ -487,20 +582,17 @@ async function continueAdd() {
align-items: center;
margin-bottom: 24rpx;
}
}
.step-content {
padding: 0rpx 32rpx;
}
.step-content {
padding: 32rpx;
}
.box {
display: flex;
flex-direction: column;
.box-main {
height: 326rpx;
border: 1px dashed #ddd;
border-radius: 16rpx;
}
.box-placeholder {
@@ -509,7 +601,8 @@ async function continueAdd() {
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #ecedee;
background: var(--sar-upload-select-bg);
border-radius: var(--sar-upload-select-border-radius);
.placeholder-text {
color: #999;
+31 -24
View File
@@ -14,30 +14,37 @@
"^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
}
},
// "tabBar": {
// "color": "#A0A3A6",
// "selectedColor": "#0052d9",
// "backgroundColor": "#ffffff",
// "borderStyle": "white",
// "height": "50px",
// "fontSize": "10px",
// "iconWidth": "24px",
// "spacing": "3px",
// "list": [
// {
// "iconPath": "static/tabbar/home.png",
// "selectedIconPath": "static/tabbar/homeHL.png",
// "pagePath": "pages/home/index",
// "text": "首页"
// },
// {
// "iconPath": "static/tabbar/account.png",
// "selectedIconPath": "static/tabbar/accountHL.png",
// "pagePath": "pages/account/index",
// "text": "我的"
// }
// ]
// },
"tabBar": {
"custom": true,
"color": "#A0A3A6",
"selectedColor": "#0052d9",
"backgroundColor": "#ffffff",
"borderStyle": "white",
"height": "50px",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"list": [
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"pagePath": "pages/home/index",
"text": "首页"
},
{
"iconPath": "static/tabbar/account.png",
"selectedIconPath": "static/tabbar/accountHL.png",
"pagePath": "pages/account/index",
"text": "我的"
}
],
"midButton": {
"iconPath": "/static/tabbar/add.png",
"width": "70px",
"height": "70px",
"iconWidth": "54px"
}
},
"pages": [
{
"path": "pages/home/index",
@@ -1,4 +1,3 @@
{
// "g3hd": "http://ser369.g3soft.cn:80/api",
"g3hd": "http://192.168.1.137:80/api"
"g3hd": "http://192.168.5.6:80/api"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Whitespace-only changes.