黄伟杰 4 days ago
commit b00ba145c8

@ -403,7 +403,7 @@ onShow(async () => {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
padding: 16rpx 24rpx calc(16rpx + env(safe-area-inset-bottom)); padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom));
background: #fff; background: #fff;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06); box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
z-index: 99; z-index: 99;
@ -411,16 +411,16 @@ onShow(async () => {
.bottom-btn { .bottom-btn {
width: 100%; width: 100%;
height: 88rpx; height: 84rpx;
line-height: 88rpx; line-height: 84rpx;
text-align: center; text-align: center;
border-radius: 12rpx; border-radius: 16rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
} }
.confirm-btn { .confirm-btn {
background: #2563eb; background: #1f4b79;
color: #fff; color: #fff;
} }
</style> </style>

@ -1,16 +1,14 @@
<template> <template>
<view class="page-container"> <view class="page-container">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<view class="custom-nav"> <NavBar :title="t('moldOperate.tabDown')">
<view class="nav-back" @click="goBack"> <template #right>
<u-icon name="arrow-left" color="#ffffff" size="20"></u-icon> <view class="nav-right-btn" @click="goToHistory">
</view> <uni-icons type="clock" size="22" color="#1f7cff"></uni-icons>
<text class="nav-title">{{ t('moldOperate.tabDown') }}</text> <text class="nav-right-text">{{ t('moldPressureNet.history') }}</text>
<view class="nav-right-btn" @click="goToHistory"> </view>
<uni-icons type="clock" size="22" color="#1f7cff"></uni-icons> </template>
<text class="nav-right-text">{{ t('moldPressureNet.history') }}</text> </NavBar>
</view>
</view>
<!-- 操作按钮区 --> <!-- 操作按钮区 -->
<view class="action-row"> <view class="action-row">
@ -169,6 +167,7 @@
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<view class="bottom-actions"> <view class="bottom-actions">
<view class="bottom-btn cancel-btn" @click="handleCancel">{{ t('functionCommon.cancel') }}</view>
<view class="bottom-btn confirm-btn" @click="handleConfirm">{{ t('moldOperate.confirmDismount') }}</view> <view class="bottom-btn confirm-btn" @click="handleConfirm">{{ t('moldOperate.confirmDismount') }}</view>
</view> </view>
@ -202,6 +201,7 @@
import { computed, reactive, ref } from 'vue' import { computed, reactive, ref } from 'vue'
import { onShow } from '@dcloudio/uni-app' import { onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import NavBar from '@/components/common/NavBar.vue'
import { getLowerMoldList, getDeviceLedgerList, createMoldOperate } from '@/api/mes/moldoperate' import { getLowerMoldList, getDeviceLedgerList, createMoldOperate } from '@/api/mes/moldoperate'
import { getDeviceLineTree } from '@/api/mes/deviceLine' import { getDeviceLineTree } from '@/api/mes/deviceLine'
import { getSimpleUserList } from '@/api/system/user' import { getSimpleUserList } from '@/api/system/user'
@ -600,6 +600,13 @@ async function handleConfirm() {
} }
} }
function handleCancel() {
//
uni.navigateBack({
fail: () => uni.switchTab({ url: '/pages/work' })
})
}
onShow(async () => { onShow(async () => {
await Promise.allSettled([loadDevices(), loadLineTree(), loadOperators()]) await Promise.allSettled([loadDevices(), loadLineTree(), loadOperators()])
// globalData // globalData
@ -612,53 +619,21 @@ onShow(async () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/* ====== 自定义导航栏 ====== */ /* ====== 导航栏右侧按钮 ====== */
.custom-nav { .nav-right-btn {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; gap: 6rpx;
height: 88rpx; padding: 8rpx 18rpx;
padding: 0 24rpx; background: #ffffff;
background: #22486e; border-radius: 999rpx;
color: #fff; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
}
.nav-back {
position: absolute;
left: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-size: 34rpx;
font-weight: 600;
text-align: center;
}
.nav-right-btn {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
gap: 6rpx;
padding: 8rpx 18rpx;
background: #ffffff;
border-radius: 999rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
}
.nav-right-text { .nav-right-text {
font-size: 24rpx; font-size: 24rpx;
color: #374151; color: #374151;
font-weight: 500; font-weight: 500;
}
} }
.page-container { .page-container {
@ -983,18 +958,20 @@ onShow(async () => {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
padding: 16rpx 24rpx calc(16rpx + env(safe-area-inset-bottom)); display: flex;
gap: 18rpx;
padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom));
background: #fff; background: #fff;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06); box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
z-index: 99; z-index: 99;
} }
.bottom-btn { .bottom-btn {
width: 100%; flex: 1;
height: 88rpx; height: 84rpx;
line-height: 88rpx; line-height: 84rpx;
text-align: center; text-align: center;
border-radius: 12rpx; border-radius: 16rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
} }
@ -1004,6 +981,11 @@ onShow(async () => {
color: #fff; color: #fff;
} }
.cancel-btn {
background: #eef2f7;
color: #475569;
}
/* ====== 弹窗通用 ====== */ /* ====== 弹窗通用 ====== */
.picker-popup { .picker-popup {
background: #fff; background: #fff;

@ -1,12 +1,7 @@
<template> <template>
<view class="page-container"> <view class="page-container">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<view class="custom-nav"> <NavBar :title="pageTitle" />
<view class="nav-back" @click="goBack">
<u-icon name="arrow-left" color="#ffffff" size="20"></u-icon>
</view>
<text class="nav-title">{{ pageType ? (pageType === 'up' ? t('moldOperate.tabUp') : t('moldOperate.tabDown')) + t('moldOperate.historySuffix') : t('moldOperate.historyTitle') }}</text>
</view>
<!-- Tab 切换路由指定 type 时隐藏 --> <!-- Tab 切换路由指定 type 时隐藏 -->
<view v-if="!pageType" class="tab-bar"> <view v-if="!pageType" class="tab-bar">
@ -143,6 +138,7 @@
import { ref, computed, watch } from 'vue' import { ref, computed, watch } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import NavBar from '@/components/common/NavBar.vue'
import { getMoldOperatePage, deleteMoldOperate, getDeviceLedgerList } from '@/api/mes/moldoperate' import { getMoldOperatePage, deleteMoldOperate, getDeviceLedgerList } from '@/api/mes/moldoperate'
import { getDeviceLineTree } from '@/api/mes/deviceLine' import { getDeviceLineTree } from '@/api/mes/deviceLine'
@ -385,9 +381,11 @@ function handleDelete(item) {
}) })
} }
function goBack() { const pageTitle = computed(() => {
uni.navigateBack({ fail: () => uni.switchTab({ url: '/pages/index/index' }) }) if (!pageType.value) return t('moldOperate.historyTitle')
} const type = pageType.value === 'up' ? t('moldOperate.tabUp') : t('moldOperate.tabDown')
return type + t('moldOperate.historySuffix')
})
function formatDateTime(value) { function formatDateTime(value) {
if (!value) return '-' if (!value) return '-'
@ -424,39 +422,6 @@ onShow(async () => {
background: #f5f6f8; background: #f5f6f8;
} }
/* ====== 自定义导航栏 ====== */
.custom-nav {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
padding: 0 24rpx;
background: #22486e;
color: #fff;
.nav-back {
position: absolute;
left: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-size: 34rpx;
font-weight: 600;
text-align: center;
max-width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
/* ====== Tab 切换 ====== */ /* ====== Tab 切换 ====== */
.tab-bar { .tab-bar {
display: flex; display: flex;

@ -1,16 +1,14 @@
<template> <template>
<view class="page-container"> <view class="page-container">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<view class="custom-nav"> <NavBar :title="t('moldOperate.tabUp')">
<view class="nav-back" @click="goBack"> <template #right>
<u-icon name="arrow-left" color="#ffffff" size="20"></u-icon> <view class="nav-right-btn" @click="goToHistory">
</view> <uni-icons type="clock" size="22" color="#1f7cff"></uni-icons>
<text class="nav-title">{{ t('moldOperate.tabUp') }}</text> <text class="nav-right-text">{{ t('moldPressureNet.history') }}</text>
<view class="nav-right-btn" @click="goToHistory"> </view>
<uni-icons type="clock" size="22" color="#1f7cff"></uni-icons> </template>
<text class="nav-right-text">{{ t('moldPressureNet.history') }}</text> </NavBar>
</view>
</view>
<!-- ========== 上模 ========== --> <!-- ========== 上模 ========== -->
<!-- 操作按钮区 --> <!-- 操作按钮区 -->
@ -176,6 +174,7 @@
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { onShow } from '@dcloudio/uni-app' import { onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import NavBar from '@/components/common/NavBar.vue'
import { getDeviceLedgerList, createMoldOperate } from '@/api/mes/moldoperate' import { getDeviceLedgerList, createMoldOperate } from '@/api/mes/moldoperate'
import { getSimpleUserList } from '@/api/system/user' import { getSimpleUserList } from '@/api/system/user'
@ -452,10 +451,10 @@ function handleCancel() {
remarkText.value = '' remarkText.value = ''
selectedOperator.value = null selectedOperator.value = null
operatorIndex.value = -1 operatorIndex.value = -1
} //
uni.navigateBack({
function goBack() { fail: () => uni.switchTab({ url: '/pages/work' })
uni.navigateBack({ fail: () => uni.switchTab({ url: '/pages/index/index' }) }) })
} }
function goToHistory() { function goToHistory() {
@ -486,53 +485,21 @@ onShow(async () => {
padding-bottom: 140rpx; padding-bottom: 140rpx;
} }
/* ====== 自定义导航栏 ====== */ /* ====== 导航栏右侧按钮 ====== */
.custom-nav { .nav-right-btn {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; gap: 6rpx;
height: 88rpx; padding: 8rpx 18rpx;
padding: 0 24rpx; background: #ffffff;
background: #22486e; border-radius: 999rpx;
color: #fff; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
}
.nav-back {
position: absolute;
left: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-size: 34rpx;
font-weight: 600;
text-align: center;
}
.nav-right-btn {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
gap: 6rpx;
padding: 8rpx 18rpx;
background: #ffffff;
border-radius: 999rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
}
.nav-right-text { .nav-right-text {
font-size: 24rpx; font-size: 24rpx;
color: #374151; color: #374151;
font-weight: 500; font-weight: 500;
}
} }
/* ====== 操作按钮区 ====== */ /* ====== 操作按钮区 ====== */

@ -328,7 +328,7 @@ onShow(async () => {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
padding: 16rpx 24rpx calc(16rpx + env(safe-area-inset-bottom)); padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom));
background: #fff; background: #fff;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06); box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
z-index: 99; z-index: 99;
@ -336,16 +336,16 @@ onShow(async () => {
.bottom-btn { .bottom-btn {
width: 100%; width: 100%;
height: 88rpx; height: 84rpx;
line-height: 88rpx; line-height: 84rpx;
text-align: center; text-align: center;
border-radius: 12rpx; border-radius: 16rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
} }
.confirm-btn { .confirm-btn {
background: #2563eb; background: #1f4b79;
color: #fff; color: #fff;
} }
</style> </style>

Loading…
Cancel
Save