From c2027920d55249595152c4ca66fca46ec9007901 Mon Sep 17 00:00:00 2001
From: FrancisHu <2756004617@qq.com>
Date: Tue, 6 Aug 2024 09:33:18 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=81=E5=A4=8F=E9=A2=84=E6=8A=A5=E5=BA=9F?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apis/http.js | 2 +-
pages.json | 7 ++
pages/IOTBinding/IOTBinding.vue | 108 ++++++++++++++++++
pages/preCrashList/preCrashList.vue | 27 +++--
.../preCrashListDetail/preCrashListDetail.vue | 26 ++---
pages/workSpace/workSpace.vue | 9 +-
router.js | 7 ++
7 files changed, 163 insertions(+), 23 deletions(-)
create mode 100644 pages/IOTBinding/IOTBinding.vue
diff --git a/apis/http.js b/apis/http.js
index 3c189b5..1a7f7f7 100644
--- a/apis/http.js
+++ b/apis/http.js
@@ -170,7 +170,7 @@ class HttpConfig {
submitPreExam: '/scrap/forecastWasteAudit', //提交审核
},
preCrashList: {
- fetchPreSubList: '/scrap/getScrapTaskListApp', // 获取预报废提交列表
+ fetchPreSubList: '/scrap/getScrapTaskList', // 获取预报废提交列表
fetchDeptTree: '/user/deptTree', // 获取部门树状结构
submitCrashTask: '/scrap/submitScrapTask', // 预报废列表提交报废
},
diff --git a/pages.json b/pages.json
index b5c1807..b6a8efa 100644
--- a/pages.json
+++ b/pages.json
@@ -514,6 +514,13 @@
"navigationBarTitleText": "综合服务中心审核详情"
}
+ },
+ {
+ "path" : "pages/IOTBinding/IOTBinding",
+ "style" :
+ {
+ "navigationBarTitleText" : "IOT设备绑定"
+ }
}
],
"tabBar": {
diff --git a/pages/IOTBinding/IOTBinding.vue b/pages/IOTBinding/IOTBinding.vue
new file mode 100644
index 0000000..7150942
--- /dev/null
+++ b/pages/IOTBinding/IOTBinding.vue
@@ -0,0 +1,108 @@
+
+
+
+
+
+ 扫一扫
+
+
+
+ 扫一扫
+
+
+
+
+
+
+
+
+
diff --git a/pages/preCrashList/preCrashList.vue b/pages/preCrashList/preCrashList.vue
index aeab0d6..ead1472 100644
--- a/pages/preCrashList/preCrashList.vue
+++ b/pages/preCrashList/preCrashList.vue
@@ -60,7 +60,7 @@
@@ -228,6 +228,9 @@
export default {
data() {
return {
+ pageNum: 1,
+ pageSize: 10,
+ pageTotal: 0,
showLoading: false,
allChecked: false,
preCrashList: [],
@@ -240,19 +243,23 @@
},
methods: {
searchKeyword () {
- this.getSubList(this.subIpt)
+ this.preCrashList = []
+ this.getSubList()
},
- getSubList (keyword) {
+ getSubList () {
let that = this
that.$api.preCrashList.fetchPreSubList({
- keyword
+ pageNum: that.pageNum,
+ pageSize: that.pageSize,
+ keyword: that.subIpt
}).then(res => {
console.log(res);
+ that.pageTotal = res.data.total
if (res.data.code == 200) {
- res.data.data.forEach(item => {
+ res.data.rows.forEach(item => {
item.checked = false
})
- that.preCrashList = res.data.data
+ that.preCrashList = [...that.preCrashList, ...res.data.rows]
} else {
uni.showToast({
icon: 'none',
@@ -432,8 +439,14 @@
}
},
onShow() {
- this.getSubList('')
+ this.preCrashList = []
+ this.getSubList()
this.getDeptTree()
+ },
+ onReachBottom() {
+ if (this.preCrashList.length >= this.pageTotal) return;
+ this.pageNum++
+ this.getSubList()
}
}
diff --git a/pages/preCrashListDetail/preCrashListDetail.vue b/pages/preCrashListDetail/preCrashListDetail.vue
index e24603e..efb1d93 100644
--- a/pages/preCrashListDetail/preCrashListDetail.vue
+++ b/pages/preCrashListDetail/preCrashListDetail.vue
@@ -7,7 +7,7 @@
>
- {
console.log(res);
if (res.data.code == 200) {
- res.data.data.forEach(item => {
+ res.data.rows.forEach(item => {
if (item.fileUrl != null) {
item.fileUrl = item.fileUrl.split(',')
}
item.chooseStatus = ''
})
- that.preDetailList = res.data.data
+ that.preDetailList = res.data.rows
console.log(that.preDetailList);
}
}).catch(err => {
@@ -195,13 +195,13 @@
name: x.label,
id: x.id
}
-
+
const children = that.veri(x.children);
-
- if (children) {
+
+ if (children) {
model.children = children;
}
-
+
return model;
});
},
diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue
index 0c3dfc5..500638d 100644
--- a/pages/workSpace/workSpace.vue
+++ b/pages/workSpace/workSpace.vue
@@ -17,7 +17,7 @@
移动办公
-