|
|
|
|
@ -1,10 +1,16 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="page-container">
|
|
|
|
|
<NavBar :title="t('moldOperate.tabDown')">
|
|
|
|
|
<template #right>
|
|
|
|
|
<image class="nav-right-icon" src="/static/logo/history.png" mode="aspectFit" @click="goToHistory" />
|
|
|
|
|
</template>
|
|
|
|
|
</NavBar>
|
|
|
|
|
<!-- 顶部导航栏 -->
|
|
|
|
|
<view class="custom-nav">
|
|
|
|
|
<view class="nav-back" @click="goBack">
|
|
|
|
|
<u-icon name="arrow-left" color="#ffffff" size="20"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
<text class="nav-title">{{ t('moldOperate.tabDown') }}</text>
|
|
|
|
|
<view class="nav-right-btn" @click="goToHistory">
|
|
|
|
|
<uni-icons type="clock" size="22" color="#1f7cff"></uni-icons>
|
|
|
|
|
<text class="nav-right-text">{{ t('moldPressureNet.history') }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 操作按钮区 -->
|
|
|
|
|
<view class="action-row">
|
|
|
|
|
@ -102,8 +108,8 @@
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 未选设备 -->
|
|
|
|
|
<view v-else class="empty-mold-hint" @click="handleSelectDeviceFirst">
|
|
|
|
|
<text class="empty-mold-text">+ {{ t('moldOperate.clickSelectDeviceFirst') }}</text>
|
|
|
|
|
<view v-else class="empty-mold-hint">
|
|
|
|
|
<text class="empty-mold-text empty-gray">{{ t('moldOperate.clickSelectDeviceFirst') }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -142,7 +148,6 @@
|
|
|
|
|
import { computed, reactive, ref } from 'vue'
|
|
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
|
import NavBar from '@/components/common/NavBar.vue'
|
|
|
|
|
import { getLowerMoldList, getDeviceLedgerList, createMoldOperate } from '@/api/mes/moldoperate'
|
|
|
|
|
import { getDeviceLineTree } from '@/api/mes/deviceLine'
|
|
|
|
|
|
|
|
|
|
@ -437,14 +442,14 @@ function confirmLowerMoldSelection() {
|
|
|
|
|
|
|
|
|
|
function closeLowerMoldPicker() { lowerMoldPickerRef.value?.close() }
|
|
|
|
|
|
|
|
|
|
function handleSelectDeviceFirst() {
|
|
|
|
|
openDevicePicker()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function goToHistory() {
|
|
|
|
|
uni.navigateTo({ url: '/pages_function/pages/moldoperate/history?type=down' })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function goBack() {
|
|
|
|
|
uni.navigateBack({ fail: () => uni.switchTab({ url: '/pages/index/index' }) })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ---- 提交 ----
|
|
|
|
|
function validForm() {
|
|
|
|
|
if (!selectedDevice.value?.id) {
|
|
|
|
|
@ -503,9 +508,53 @@ onShow(async () => {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.nav-right-icon {
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
/* ====== 自定义导航栏 ====== */
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #374151;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-container {
|
|
|
|
|
@ -529,7 +578,7 @@ onShow(async () => {
|
|
|
|
|
gap: 12rpx;
|
|
|
|
|
height: 96rpx;
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
background: #2563eb;
|
|
|
|
|
background: #1f4b79;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
@ -571,7 +620,7 @@ onShow(async () => {
|
|
|
|
|
width: 6rpx;
|
|
|
|
|
height: 32rpx;
|
|
|
|
|
border-radius: 3rpx;
|
|
|
|
|
background: #2563eb;
|
|
|
|
|
background: #1f4b79;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
@ -697,6 +746,10 @@ onShow(async () => {
|
|
|
|
|
color: #2563eb;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty-gray {
|
|
|
|
|
color: #9ca3af;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ====== 底部操作栏 ====== */
|
|
|
|
|
.bottom-actions {
|
|
|
|
|
position: fixed;
|
|
|
|
|
@ -720,7 +773,7 @@ onShow(async () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.confirm-btn {
|
|
|
|
|
background: #2563eb;
|
|
|
|
|
background: #1f4b79;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|