diff --git a/src/api/iot/device.js b/src/api/iot/device.js
new file mode 100644
index 0000000..edc3e6b
--- /dev/null
+++ b/src/api/iot/device.js
@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+export function getIotDevicePage(params = {}) {
+ return request({
+ url: '/admin-api/iot/device/page',
+ method: 'get',
+ params
+ })
+}
+
+export function getDeviceRunOverview(params = {}) {
+ return request({
+ url: '/admin-api/iot/device-operation-record/runOverview',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/pages.json b/src/pages.json
index f382966..815b755 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -351,6 +351,22 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "overview/device/index",
+ "style": {
+ "navigationBarTitleText": "\u8bbe\u5907\u603b\u89c8",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "overview/device/list",
+ "style": {
+ "navigationBarTitleText": "\u8bbe\u5907\u5217\u8868",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true
+ }
+ },
{
"path": "spare/index",
"style": {
diff --git a/src/pages_function/pages/materialMove/index.vue b/src/pages_function/pages/materialMove/index.vue
index b640273..7487b9e 100644
--- a/src/pages_function/pages/materialMove/index.vue
+++ b/src/pages_function/pages/materialMove/index.vue
@@ -38,40 +38,26 @@
更多筛选
-
-
- 调拨信息
-
-
-
- 创建人
-
+
+
+ 创建人
+
+
{{ selectedCreatorLabel }}
-
-
- {{ item.label }}
- ✓
-
-
-
-
- 调拨时间
-
-
-
+
+
+
+ 调拨时间
+
+
@@ -164,7 +150,6 @@ const filterPopupRef = ref(null)
const selectedCreator = ref(null)
const moveTimeFilter = ref([])
const creatorOptions = ref([])
-const creatorPanelOpen = ref(false)
const categoryType = ref(2)
const categoryNameMap = {
@@ -197,7 +182,16 @@ const selectedCreatorLabel = computed(() => {
const found = creatorOptions.value.find((item) => item.value === selectedCreator.value)
return found ? found.label : '创建人'
})
-
+const creatorPickerOptions = computed(() => [
+ { label: '全部创建人', value: null },
+ ...creatorOptions.value
+])
+const creatorPickerLabels = computed(() => creatorPickerOptions.value.map((item) => item.label))
+const creatorPickerIndex = computed(() => {
+ if (!selectedCreator.value) return 0
+ const index = creatorPickerOptions.value.findIndex((item) => String(item.value) === String(selectedCreator.value))
+ return index >= 0 ? index : 0
+})
const list = ref([])
const loading = ref(false)
const loadingMore = ref(false)
@@ -315,13 +309,12 @@ function confirmFilterDrawer() {
filterPopupRef.value?.close()
fetchList(true)
}
-function toggleCreatorPanel() {
- creatorPanelOpen.value = !creatorPanelOpen.value
-}
-function selectCreator(item) {
- selectedCreator.value = selectedCreator.value === item.value ? null : item.value
- creatorPanelOpen.value = false
+function onCreatorPickerChange(event) {
+ const index = Number(event?.detail?.value || 0)
+ const option = creatorPickerOptions.value[index]
+ selectedCreator.value = option?.value || null
}
+
async function loadCreatorOptions() {
if (creatorOptions.value.length) return
try {
@@ -440,24 +433,18 @@ onUnload(() => {
.drawer-action { flex: 1; height: 72rpx; display: flex; align-items: center; justify-content: center; font-size: 28rpx; font-weight: 600; border: 2rpx solid #174b78; box-sizing: border-box; }
.drawer-action.reset { border-radius: 12rpx 0 0 12rpx; background: #ffffff; color: #174b78; }
.drawer-action.confirm { border-radius: 0 12rpx 12rpx 0; background: #174b78; color: #ffffff; }
-.drawer-section { margin-bottom: 18rpx; padding: 28rpx 28rpx 30rpx; border-radius: 24rpx; background: #ffffff; box-sizing: border-box; }
-.drawer-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24rpx; }
-.drawer-section-title { font-size: 32rpx; line-height: 1.3; color: #1f2937; font-weight: 700; }
-.drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22rpx 20rpx; }
-.drawer-field { min-width: 0; }
-.drawer-field-wide { grid-column: 1 / -1; }
-.drawer-label { display: block; margin-bottom: 12rpx; font-size: 24rpx; line-height: 1.3; color: #4b5563; font-weight: 500; }
-.drawer-picker { width: 100%; min-height: 74rpx; border-radius: 8rpx; background: #f7f8fb; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 0 18rpx; gap: 8rpx; }
-.drawer-picker-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 26rpx; color: #111827; text-align: center; }
+.drawer-section { margin-bottom: 18rpx; padding: 8rpx 28rpx; border-radius: 24rpx; background: #ffffff; box-sizing: border-box; }
+.drawer-fields { display: flex; flex-direction: column; }
+.drawer-field { min-width: 0; min-height: 98rpx; display: flex; align-items: center; gap: 20rpx; border-bottom: 1rpx solid #eceff3; box-sizing: border-box; }
+.drawer-field:last-child { border-bottom: 0; }
+.drawer-field-wide { grid-column: auto; }
+.drawer-label { width: 160rpx; flex: 0 0 160rpx; font-size: 24rpx; line-height: 1.3; color: #4b5563; font-weight: 500; }
+.drawer-picker-host { min-width: 0; flex: 1; display: block; }
+.drawer-picker, .drawer-date { min-width: 0; flex: 1; width: 100%; min-height: 74rpx; border-radius: 8rpx; background: #f7f8fb; box-sizing: border-box; }
+.drawer-picker { display: flex; align-items: center; justify-content: flex-end; padding: 0 18rpx; gap: 8rpx; }
+.drawer-picker-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 26rpx; color: #111827; text-align: right; }
.drawer-picker-text.placeholder { color: #9ca3af; }
-.drawer-option-panel { max-height: 360rpx; margin-top: 12rpx; border-radius: 12rpx; background: #f7f8fb; overflow: hidden; }
-.drawer-option-item { min-height: 72rpx; padding: 0 24rpx; display: flex; align-items: center; justify-content: space-between; border-bottom: 1rpx solid #eceff3; box-sizing: border-box; }
-.drawer-option-item:last-child { border-bottom: 0; }
-.drawer-option-item.active { background: rgba(23, 75, 120, 0.1); }
-.drawer-option-item.active .drawer-option-text { color: #174b78; font-weight: 600; }
-.drawer-option-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 26rpx; color: #1f2937; }
-.drawer-option-check { flex-shrink: 0; font-size: 28rpx; color: #174b78; margin-left: 16rpx; }
-.drawer-date { width: 100%; min-height: 74rpx; border-radius: 8rpx; background: #f7f8fb; box-sizing: border-box; display: flex; align-items: center; padding: 0 12rpx; }
+.drawer-date { display: flex; align-items: center; padding: 0 12rpx; }
.drawer-date :deep(.uni-date), .drawer-date :deep(.uni-date-editor), .drawer-date :deep(.uni-date-editor--x), .drawer-date :deep(.uni-date-x) { width: 100%; }
.drawer-date :deep(.uni-date-editor--x), .drawer-date :deep(.uni-date-x) { border: 0; padding: 0; background: transparent; }
diff --git a/src/pages_function/pages/overview/device/index.vue b/src/pages_function/pages/overview/device/index.vue
new file mode 100644
index 0000000..f3d0010
--- /dev/null
+++ b/src/pages_function/pages/overview/device/index.vue
@@ -0,0 +1,748 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.value }}
+ {{ item.label }}
+
+
+
+
+
+ 刷新数据
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+ {{ formatPercentValue(item.value) }}
+ %
+
+
+ 较昨日
+
+ {{ item.change >= 0 ? '↑' : '↓' }} {{ formatPercentValue(Math.abs(item.change)) }}%
+
+
+
+
+
+
+
+ 状态占比(汇总)
+
+
+
+
+ 总时长
+ {{ formatHour(operationOverview.summaryTotalHours) }}h
+
+
+
+
+
+
+
+ {{ item.label }}
+
+ {{ formatPercentValue(item.percent) }}% ({{ formatHour(item.hours) }}h)
+
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('functionCommon.loadFailed') }}
+
+
+
+
+
+
diff --git a/src/pages_function/pages/overview/device/list.vue b/src/pages_function/pages/overview/device/list.vue
new file mode 100644
index 0000000..46cc2d6
--- /dev/null
+++ b/src/pages_function/pages/overview/device/list.vue
@@ -0,0 +1,512 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 采集协议
+ {{ textValue(item.protocol) }}
+
+
+ 采集时间
+ {{ formatDateTime(item.collectionTime) }}
+
+
+ 是否启用
+
+ {{ isEnabled(item) ? '已启用' : '未启用' }}
+
+
+
+
+
+ {{ t('functionCommon.loading') }}
+ 暂无设备数据
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMore') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/utils/permissionMenu.js b/src/utils/permissionMenu.js
index 19913cc..ef87f75 100644
--- a/src/utils/permissionMenu.js
+++ b/src/utils/permissionMenu.js
@@ -87,6 +87,9 @@ const MENU_ROUTE_MAP = {
molddismount: '/pages_function/pages/moldoperate/dismount',
mold: '/pages_function/pages/mold/index',
equipment: '/pages_function/pages/equipment/index',
+ '\u8bbe\u5907\u603b\u89c8': '/pages_function/pages/overview/device/index',
+ deviceoverview: '/pages_function/pages/overview/device/index',
+ overviewdevice: '/pages_function/pages/overview/device/index',
spare: '/pages_function/pages/spare/index',
sparepartInbound: '/pages_function/pages/sparepartInbound/index',
productInbound: '/pages_function/pages/productInbound/index',