|
@@ -1,5 +1,6 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { DESIGN_HEIGHT, DESIGN_WIDTH } from '@/utils/kb'
|
|
import { DESIGN_HEIGHT, DESIGN_WIDTH } from '@/utils/kb'
|
|
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
import rhsummary from './rhkb/rhsummary.vue'
|
|
import rhsummary from './rhkb/rhsummary.vue'
|
|
|
import deviceType from './rhkb/deviceType.vue'
|
|
import deviceType from './rhkb/deviceType.vue'
|
|
@@ -25,6 +26,8 @@ const pageTabs = [
|
|
|
{ label: '生产日报', value: 'device' }
|
|
{ label: '生产日报', value: 'device' }
|
|
|
] as const
|
|
] as const
|
|
|
|
|
|
|
|
|
|
+const selectedDate = ref(dayjs().subtract(1, 'day').format('YYYY-MM-DD'))
|
|
|
|
|
+
|
|
|
const wrapperRef = ref<HTMLDivElement>()
|
|
const wrapperRef = ref<HTMLDivElement>()
|
|
|
const scale = ref(1)
|
|
const scale = ref(1)
|
|
|
|
|
|
|
@@ -32,6 +35,7 @@ let resizeObserver: ResizeObserver | null = null
|
|
|
let resizeRaf = 0
|
|
let resizeRaf = 0
|
|
|
|
|
|
|
|
provide('rhKbScale', scale)
|
|
provide('rhKbScale', scale)
|
|
|
|
|
+provide('rhKbInventoryDate', selectedDate)
|
|
|
|
|
|
|
|
const targetWrapperStyle = computed(() => ({
|
|
const targetWrapperStyle = computed(() => ({
|
|
|
width: `${DESIGN_WIDTH * scale.value}px`,
|
|
width: `${DESIGN_WIDTH * scale.value}px`,
|
|
@@ -102,6 +106,15 @@ onUnmounted(() => {
|
|
|
{{ tab.label }}
|
|
{{ tab.label }}
|
|
|
</button>
|
|
</button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-if="activePage === 'home'" class="page-filters">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="selectedDate"
|
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
|
+ :clearable="false"
|
|
|
|
|
+ class="page-date-picker" />
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div v-if="activePage === 'home'" class="kb-home-page">
|
|
<div v-if="activePage === 'home'" class="kb-home-page">
|
|
|
<rhsummary class="kb-stage-card kb-stage-card--1" />
|
|
<rhsummary class="kb-stage-card kb-stage-card--1" />
|
|
@@ -152,6 +165,29 @@ onUnmounted(() => {
|
|
|
gap: calc(12px * var(--kb-scale));
|
|
gap: calc(12px * var(--kb-scale));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.page-filters {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: calc(10px * var(--kb-scale));
|
|
|
|
|
+ right: calc(20px * var(--kb-scale));
|
|
|
|
|
+ z-index: 3;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.page-date-picker {
|
|
|
|
|
+ width: calc(132px * var(--kb-scale));
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-input__wrapper) {
|
|
|
|
|
+ min-height: calc(28px * var(--kb-scale));
|
|
|
|
|
+ padding: 0 calc(8px * var(--kb-scale));
|
|
|
|
|
+ background: rgb(255 255 255 / 88%);
|
|
|
|
|
+ border-radius: calc(5px * var(--kb-scale));
|
|
|
|
|
+ box-shadow: 0 0 0 1px rgb(31 91 184 / 28%) inset;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ :deep(.el-input__inner) {
|
|
|
|
|
+ font-size: calc(13px * var(--kb-scale));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.page-tab {
|
|
.page-tab {
|
|
|
height: calc(28px * var(--kb-scale));
|
|
height: calc(28px * var(--kb-scale));
|
|
|
min-width: calc(82px * var(--kb-scale));
|
|
min-width: calc(82px * var(--kb-scale));
|