From 7e84f102a8424e9ac4f5bf52011cf6460f54306e Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 28 一月 2026 13:23:11 +0800
Subject: [PATCH] #
---
pages/listing/matnrPalletising.vue | 7 +
pages/login/index.vue | 286 +++++++++++++++++++++++++++++++++++++++++++++--
pages.json | 3
pages/AGV/StartInTask.vue | 6
common/request2.js | 6
common/request.js | 6
6 files changed, 297 insertions(+), 17 deletions(-)
diff --git a/common/request.js b/common/request.js
index 11c481a..fe76663 100644
--- a/common/request.js
+++ b/common/request.js
@@ -16,7 +16,11 @@
const token = uni.getStorageSync('token');
// const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
// const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
- const URL = 'http://127.0.0.1:8085/rsf-server/pda' + url;
+ let baseUrl = uni.getStorageSync('baseUrl');
+ if (!baseUrl) {
+ baseUrl = 'http://127.0.0.1:8085/rsf-server/pda';
+ }
+ const URL = baseUrl+'/pda' + url;
uni.request({
url: URL,
data: postData,
diff --git a/common/request2.js b/common/request2.js
index f374f63..fdf9a68 100644
--- a/common/request2.js
+++ b/common/request2.js
@@ -16,7 +16,11 @@
const token = uni.getStorageSync('token');
// const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
// const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
- const URL = 'http://127.0.0.1:8085/rsf-server' + url;
+ let baseUrl = uni.getStorageSync('baseUrl');
+ if (!baseUrl) {
+ baseUrl = 'http://127.0.0.1:8085/rsf-server/pda';
+ }
+ const URL = baseUrl + url;
uni.request({
url: URL,
data: postData,
diff --git a/pages.json b/pages.json
index e97a0c3..9d562b3 100644
--- a/pages.json
+++ b/pages.json
@@ -3,7 +3,8 @@
{
"path": "pages/login/index",
"style": {
- "navigationBarTitleText": "%page.login%"
+ "navigationBarTitleText": "%page.login%",
+ "navigationStyle": "custom"
}
},
{
diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index cbb8d8f..ab88a45 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -5,7 +5,11 @@
<view class="title">鎺ラ┏绔欑偣</view>
<input placeholder="璇锋壂鎻忔帴椹崇珯鐐规潯鐮�" v-model="agvStationInput" @input="checkAgvStation"></input>
<!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
- </view>
+ </view>
+ <view class="cu-form-group" v-if="agvStationName">
+ <view class="title">绔欑偣缂栫爜</view>
+ <text >{{agvStationName}}</text>
+ </view>
<view class="cu-form-group">
<view class="title">瀹瑰櫒鍙�</view>
<input placeholder="璇锋壂鎻忓鍣ㄧ紪鐮�" v-model="barcode" @input="search"></input>
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index aff62a0..255ac8e 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -253,6 +253,12 @@
/>
</view>
</view>
+ <view class="form-item" v-if="agvStationName">
+ <text class="form-label">绔欑偣鍚嶇О</text>
+ <view class="input-wrapper">
+ <view class="agv-input text-grey">{{agvStationName}}</view>
+ </view>
+ </view>
<view class="form-item">
<text class="form-label">鐩爣搴撳尯</text>
<view class="input-wrapper picker-wrapper">
@@ -755,6 +761,7 @@
.agv-input {
width: 100%;
height: 70rpx;
+ line-height: 70rpx;
font-size: 30rpx;
color: #333;
background-color: transparent;
diff --git a/pages/login/index.vue b/pages/login/index.vue
index c807b4b..4169310 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -1,5 +1,9 @@
<template>
+
<view class="bodyView">
+ <view>
+ <uni-nav-bar :fixed="true" :title="$t('page.login')" right-icon="gear" @clickRight="openSettings"></uni-nav-bar>
+ </view>
<view class="topView">
<image src="/static/img/login_top.png" mode="aspectFill">
</image>
@@ -39,25 +43,83 @@
</view>
</view>
<view class="langView">
- <!-- 璇█閫夋嫨涓嬫媺鑿滃崟 -->
- <view class="language-dropdown">
- <view class="selected-language" @click="toggleLanguageDropdown">
- <text>{{getCurrentLanguageText()}}</text>
- <uni-icons type="bottom" size="14" color="#707070"></uni-icons>
- </view>
- <view class="language-options" v-if="showLanguageDropdown">
- <view class="language-option" v-for="(item, index) in locales" :key="index" @click="onLocaleChange(item)">
- <text>{{item.text}}</text>
- <uni-icons type="checkmarkempty" size="14" color="#007AFF" v-if="item.code == applicationLocale"></uni-icons>
- </view>
- </view>
- </view>
+
</view>
</view>
<view class="itemView">
<button class="loadingButton" @click="onLogin()" :loading="loading">{{btnText}}</button>
</view>
</view>
+
+ <!-- 璁剧疆鑿滃崟 -->
+ <uni-popup ref="settingsMenu" type="bottom" background-color="#fff">
+ <view class="settings-menu">
+ <view class="settings-item" @click="openIpSetting">
+ <text>璁剧疆IP</text>
+ <uni-icons type="arrowright" size="16" color="#999"></uni-icons>
+ </view>
+ <view class="settings-item" @click="openLangSetting">
+ <text>鍥介檯鍖�</text>
+ <uni-icons type="arrowright" size="16" color="#999"></uni-icons>
+ </view>
+ <view class="settings-cancel" @click="closeSettingsMenu">鍙栨秷</view>
+ </view>
+ </uni-popup>
+
+ <!-- IP閰嶇疆寮圭獥 -->
+ <uni-popup ref="inputDialog" type="center" :mask-click="false">
+ <view class="modal-container">
+ <view class="modal-header">
+ <text class="cuIcon-settings" style="font-size: 48rpx; color: #0081ff"></text>
+ <text class="modal-title">閰嶇疆</text>
+ </view>
+ <view class="modal-body">
+ <view class="form-item">
+ <text class="form-label">IP</text>
+ <view class="modal-input-wrapper">
+ <input class="agv-input" type="text" v-model="url.ip" />
+ </view>
+ </view>
+ <view class="form-item">
+ <text class="form-label">绔彛</text>
+ <view class="modal-input-wrapper">
+ <input class="agv-input" type="text" v-model="url.port" />
+ </view>
+ </view>
+ <view class="form-item">
+ <text class="form-label">椤圭洰</text>
+ <view class="modal-input-wrapper">
+ <input class="agv-input" type="text" v-model="url.project" />
+ </view>
+ </view>
+ </view>
+ <view class="modal-footer">
+ <button class="modal-btn modal-btn-cancel" @click="closeIpDialog">鍙栨秷</button>
+ <button class="modal-btn modal-btn-confirm" @click="settingConfirm">纭</button>
+ </view>
+ </view>
+ </uni-popup>
+
+ <!-- 璇█璁剧疆寮圭獥 -->
+ <uni-popup ref="langDialog" type="center">
+ <view class="modal-container">
+ <view class="modal-header">
+ <text class="cuIcon-global" style="font-size: 48rpx; color: #0081ff"></text>
+ <text class="modal-title">閫夋嫨璇█</text>
+ </view>
+ <view class="modal-body">
+ <view class="language-list">
+ <view class="language-item" v-for="(item, index) in locales" :key="index" @click="onLocaleConfirm(item)">
+ <text>{{item.text}}</text>
+ <uni-icons type="checkmarkempty" size="20" color="#007AFF" v-if="item.code == applicationLocale"></uni-icons>
+ </view>
+ </view>
+ </view>
+ <view class="modal-footer">
+ <button class="modal-btn modal-btn-cancel" @click="closeLangDialog" style="width: 100%; border-right: none;">鍙栨秷</button>
+ </view>
+ </view>
+ </uni-popup>
</view>
</template>
@@ -80,6 +142,12 @@
userName: '',
password: '',
},
+ url: {
+ ip: '',
+ port: '',
+ project: ''
+ },
+ baseUrl: '',
}
},
computed:{
@@ -210,6 +278,46 @@
this.showLanguageDropdown = !this.showLanguageDropdown;
},
+ openSettings() {
+ this.$refs.settingsMenu.open()
+ },
+ openIpSetting() {
+ this.$refs.settingsMenu.close()
+ setTimeout(() => {
+ this.$refs.inputDialog.open()
+ }, 300)
+ },
+ openLangSetting() {
+ this.$refs.settingsMenu.close()
+ setTimeout(() => {
+ this.$refs.langDialog.open()
+ }, 300)
+ },
+ closeSettingsMenu() {
+ this.$refs.settingsMenu.close()
+ },
+ closeIpDialog() {
+ this.$refs.inputDialog.close()
+ },
+ closeLangDialog() {
+ this.$refs.langDialog.close()
+ },
+ settingConfirm() {
+ this.baseUrl = "http://" + this.url.ip + ':' + this.url.port + '/' + this.url.project
+ uni.setStorageSync('baseUrl', this.baseUrl);
+ uni.setStorageSync('url', this.url);
+ // uni.setStorageSync('project', 'tzsk')
+ this.$refs.inputDialog.close()
+ uni.showToast({
+ title: '閰嶇疆宸蹭繚瀛�',
+ icon: 'success'
+ })
+ },
+ onLocaleConfirm(item) {
+ this.onLocaleChange(item)
+ this.$refs.langDialog.close()
+ },
+
// 鑾峰彇褰撳墠閫夋嫨鐨勮瑷�鏂囨湰
getCurrentLanguageText() {
const currentLocale = this.locales.find(item => item.code === this.applicationLocale);
@@ -412,4 +520,156 @@
.language-option:active {
background-color: #f5f5f5;
}
+
+ /* Settings Menu */
+ .settings-menu {
+ background-color: #fff;
+ padding: 20rpx 0;
+ border-radius: 20rpx 20rpx 0 0;
+ }
+ .settings-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 30rpx 40rpx;
+ border-bottom: 1px solid #f0f0f0;
+ font-size: 32rpx;
+ color: #333;
+ }
+ .settings-item:active {
+ background-color: #f5f5f5;
+ }
+ .settings-cancel {
+ text-align: center;
+ padding: 30rpx;
+ margin-top: 20rpx;
+ border-top: 10rpx solid #f8f8f8;
+ font-size: 32rpx;
+ color: #333;
+ }
+
+ /* Custom Popup Styles */
+ /* 寮圭獥瀹瑰櫒 */
+ .modal-container {
+ width: 600rpx;
+ background-color: #ffffff;
+ border-radius: 24rpx;
+ overflow: hidden;
+ box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.15);
+ }
+
+ /* 寮圭獥澶撮儴 */
+ .modal-header {
+ padding: 40rpx 30rpx 20rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
+ }
+
+ .modal-title {
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #333;
+ margin-top: 16rpx;
+ }
+
+ /* 寮圭獥鍐呭 */
+ .modal-body {
+ padding: 30rpx;
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 24rpx;
+ }
+
+ .form-item:last-child {
+ margin-bottom: 0;
+ }
+
+ .form-label {
+ width: 100rpx;
+ font-size: 28rpx;
+ color: #333;
+ font-weight: 500;
+ margin-right: 20rpx;
+ text-align: right;
+ }
+
+ /* 杈撳叆妗嗗鍣� - 寮圭獥涓撶敤 */
+ .modal-input-wrapper {
+ flex: 1;
+ background-color: #f5f7fa;
+ border-radius: 12rpx;
+ padding: 10rpx;
+ border: 2rpx solid #e4e7ed;
+ transition: border-color 0.2s;
+ }
+
+ .modal-input-wrapper:focus-within {
+ border-color: #0081ff;
+ }
+
+ .agv-input {
+ width: 100%;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 30rpx;
+ color: #333;
+ background-color: transparent;
+ }
+
+ /* 寮圭獥搴曢儴鎸夐挳 */
+ .modal-footer {
+ display: flex;
+ border-top: 1rpx solid #eee;
+ }
+
+ .modal-btn {
+ flex: 1;
+ height: 100rpx;
+ line-height: 100rpx;
+ font-size: 32rpx;
+ border: none;
+ border-radius: 0;
+ background-color: #fff;
+ }
+
+ .modal-btn::after {
+ border: none;
+ }
+
+ .modal-btn-cancel {
+ color: #999;
+ border-right: 1rpx solid #eee;
+ }
+
+ .modal-btn-confirm {
+ color: #fff;
+ background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
+ font-weight: bold;
+ }
+
+ .modal-btn-confirm:active {
+ background: linear-gradient(135deg, #0070dd 0%, #1480e8 100%);
+ }
+
+ .modal-btn-cancel:active {
+ background-color: #f5f5f5;
+ }
+
+ /* Language List in Popup */
+ .language-list {
+ max-height: 200px;
+ overflow-y: auto;
+ }
+ .language-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 15px 0;
+ border-bottom: 1px solid #f0f0f0;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1