diff --git a/components.d.ts b/components.d.ts
index 87ef437..e30d6db 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -9,6 +9,7 @@ declare module 'vue' {
export interface GlobalComponents {
ChartFullscreen: typeof import('./src/components/other/chartFullscreen.vue')['default']
CustomNavigationBar: typeof import('./src/components/custom-navigation-bar/index.vue')['default']
+ DataQuery: typeof import('./src/components/other/dataQuery.vue')['default']
Fish: typeof import('./src/components/other/fish.vue')['default']
NutBadge: typeof import('@nutui/nutui-taro')['Badge']
NutButton: typeof import('@nutui/nutui-taro')['Button']
diff --git a/src/app.config.ts b/src/app.config.ts
index bdf1ca3..d2454d3 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -6,6 +6,7 @@ export default defineAppConfig({
'pages/msg/index',
'pages/main/my',
'components/other/chartFullscreen',
+ 'components/other/dataQuery',
],
requiredPrivateInfos: [
"getLocation", "chooseLocation"
diff --git a/src/components/other/dataQuery.config.ts b/src/components/other/dataQuery.config.ts
new file mode 100644
index 0000000..0f230f3
--- /dev/null
+++ b/src/components/other/dataQuery.config.ts
@@ -0,0 +1,5 @@
+export default definePageConfig({
+ navigationStyle: 'custom',
+ pageOrientation: 'landscape',
+ disableScroll: true,
+})
diff --git a/src/components/other/dataQuery.vue b/src/components/other/dataQuery.vue
new file mode 100644
index 0000000..3cc043a
--- /dev/null
+++ b/src/components/other/dataQuery.vue
@@ -0,0 +1,617 @@
+
+
+
+
+
+
+
+
+
+ 开始时间
+
+ {{ startDate || '请选择' }}
+
+
+
+ 结束时间
+
+ {{ endDate || '请选择' }}
+
+
+
+ 查询
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/other/index.vue b/src/components/other/index.vue
index b297556..a8b9890 100644
--- a/src/components/other/index.vue
+++ b/src/components/other/index.vue
@@ -335,6 +335,37 @@
+
+
+
+
+
+ 设备属性
+
+
+ 报警设置
+
+
+ 数据查询
+
+
+
+
@@ -1850,6 +1881,72 @@ function submit() {
state.show = true;
});
}
+// 跳转到设备信息页面(设备属性)
+function goDeviceInfo() {
+ const currentDevice = doList.value.find(
+ (item: any) => item.id === doDev.value
+ );
+
+ if (!currentDevice) {
+ state.show = true;
+ state.msg = '设备信息不存在';
+ state.type = 'fail';
+ return;
+ }
+
+ // 跳转到 wqm 页面,带上 deviceInfo 参数表示跳到设备信息区域
+ Taro.navigateTo({
+ url: `/home/wqm?id=${currentDevice.id}&name=${currentDevice.deviceName}&page=home§ion=deviceInfo`,
+ });
+}
+
+// 跳转到报警设置页面(溶解氧配置)
+function goAlarmSettings() {
+ const currentDevice = doList.value.find(
+ (item: any) => item.id === doDev.value
+ );
+
+ if (!currentDevice) {
+ state.show = true;
+ state.msg = '设备信息不存在';
+ state.type = 'fail';
+ return;
+ }
+
+ // 跳转到 wqm 页面,带上 alarmSettings 参数表示跳到溶解氧配置区域
+ Taro.navigateTo({
+ url: `/home/wqm?id=${currentDevice.id}&name=${currentDevice.deviceName}&page=home§ion=alarmSettings`,
+ });
+}
+
+// 跳转到数据查询页面
+function goDataQuery() {
+ const currentDevice = doList.value.find(
+ (item: any) => item.id === doDev.value
+ );
+
+ if (!currentDevice) {
+ state.show = true;
+ state.msg = '设备信息不存在';
+ state.type = 'fail';
+ return;
+ }
+
+ // 获取设备序列号
+ const serialNum = currentDevice.serialNum || currentDevice.serialNumber || currentDevice.deviceSerialNum || currentDevice.sn;
+
+ if (!serialNum) {
+ state.show = true;
+ state.msg = '设备序列号不存在';
+ state.type = 'fail';
+ return;
+ }
+
+ // 跳转到数据查询页面(横屏显示)
+ Taro.navigateTo({
+ url: `/components/other/dataQuery?serialNum=${serialNum}&dataType=${prDev.value}&deviceName=${currentDevice.deviceName}&oxyWarnLower=${oxyWarnLower.value || ''}&tempWarnUpper=${tempWarnUpper.value || ''}&tempWarnLower=${tempWarnLower.value || ''}`,
+ });
+}
/** -----------------method end------------------- */
defineExpose({
getDeviceList,
@@ -2050,4 +2147,42 @@ defineExpose({
.nut-grid-item__content {
background: #fff;
}
+
+// 功能按钮区域样式
+.action-buttons {
+ margin-top: 20rpx;
+ padding: 0;
+ width: 100%;
+
+ .nut-col {
+ padding: 0 !important;
+ }
+
+ .button-wrapper {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 20rpx;
+ padding: 0 20rpx;
+
+ .action-btn {
+ flex: 0 0 auto;
+ width: 180rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ border-radius: 8rpx;
+ background: linear-gradient(135deg, #09b8c2 0%, #06a0a9 100%);
+ border: none;
+ color: #fff;
+ font-weight: 500;
+ box-shadow: 0 4rpx 12rpx rgba(9, 184, 194, 0.3);
+ transition: all 0.3s ease;
+
+ &:active {
+ transform: scale(0.95);
+ box-shadow: 0 2rpx 8rpx rgba(9, 184, 194, 0.4);
+ }
+ }
+ }
+}
diff --git a/src/home/wqm.vue b/src/home/wqm.vue
index ddf0350..9f2b885 100644
--- a/src/home/wqm.vue
+++ b/src/home/wqm.vue
@@ -5,7 +5,8 @@
-
+
+
设备信息
@@ -63,10 +64,29 @@
+
+
+ 解除绑定
+
-
+
+
溶解氧配置
@@ -336,40 +356,6 @@
-
-
- 解除绑定
-
@@ -687,6 +673,7 @@ const instance = Taro.getCurrentInstance();
const id = instance.router.params.id;
const name = instance.router.params.name;
const page = instance.router.params.page;
+const section = instance.router.params.section; // 获取区域参数
// const name = undefined
Taro.setNavigationBarTitle({
title: "水质检测仪设置",