u
This commit is contained in:
1 parent
78e3b1292b
commit
ce466130c0
10 files changed
+342
-56
No files matched your search
@@ -1,10 +1,10 @@
|
||||
#url=jdbc:sqlserver://118.89.70.199:1433;databaseName=G3BoxOCR
|
||||
#username=sa
|
||||
#password=zhang520..
|
||||
#driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
|
||||
|
||||
url=jdbc:sqlserver://127.0.0.1:1433;databaseName=G3BoxOCR
|
||||
url=jdbc:sqlserver://118.89.70.199:1433;databaseName=G3BoxOCR
|
||||
username=sa
|
||||
password=123456@aaa
|
||||
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
password=zhang520..
|
||||
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
|
||||
|
||||
#url=jdbc:sqlserver://127.0.0.1:1433;databaseName=G3BoxOCR
|
||||
#username=sa
|
||||
#password=123456@aaa
|
||||
#driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
@@ -0,0 +1,84 @@
|
||||
<!doctype html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<title>集装箱录入</title>
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-50 text-gray-900">
|
||||
<!-- Header -->
|
||||
<div class="px-4 pt-6 pb-2">
|
||||
<h1 class="text-xl font-semibold tracking-tight">集装箱录入</h1>
|
||||
<p class="text-sm text-gray-500 mt-1">拍照识别箱号并上传相关图片</p>
|
||||
</div>
|
||||
|
||||
<div class="px-4 pb-28 space-y-6">
|
||||
<!-- 箱号 -->
|
||||
<div class="space-y-2">
|
||||
<label class="text-sm font-medium">集装箱号</label>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="自动识别或手动输入"
|
||||
class="w-full h-11 px-3 rounded-lg border border-gray-200 bg-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 主照片 -->
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between items-center">
|
||||
<label class="text-sm font-medium">箱号主照片</label>
|
||||
<span class="text-xs text-gray-400">OCR识别</span>
|
||||
</div>
|
||||
|
||||
<div class="bg-white border border-gray-200 rounded-xl p-3">
|
||||
<div class="h-44 rounded-lg bg-gray-100 flex flex-col items-center justify-center text-gray-400">
|
||||
<div class="text-2xl">📷</div>
|
||||
<span class="text-xs mt-2">点击拍照或选择图片</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 其他照片 -->
|
||||
<div class="space-y-2">
|
||||
<label class="text-sm font-medium">其他照片</label>
|
||||
|
||||
<div class="grid grid-cols-3 gap-3">
|
||||
<!-- 图片 -->
|
||||
<div
|
||||
class="aspect-square bg-white border border-gray-200 rounded-lg flex items-center justify-center text-gray-400"
|
||||
>
|
||||
+
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="aspect-square bg-white border border-gray-200 rounded-lg flex items-center justify-center text-gray-400"
|
||||
>
|
||||
+
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="aspect-square bg-white border border-gray-200 rounded-lg flex items-center justify-center text-gray-400"
|
||||
>
|
||||
+
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 备注 -->
|
||||
<div class="space-y-2">
|
||||
<label class="text-sm font-medium">备注</label>
|
||||
<textarea
|
||||
placeholder="填写补充说明..."
|
||||
class="w-full min-h-[90px] p-3 rounded-lg border border-gray-200 bg-white text-sm resize-none focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部操作 -->
|
||||
<div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-4">
|
||||
<button class="w-full h-11 rounded-lg bg-black text-white text-sm font-medium">提交</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user