From 8da6f33d33dbf768a6dd5de2fa33fd6fb28cd195 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 27 Jun 2024 17:18:26 +0800
Subject: [PATCH] 代码优化
---
pages/statistics/index.vue | 8 ++++++++
pages/home/index.vue | 14 +++++++++++---
pages.json | 9 +++++----
subPackage/task/index.vue | 2 +-
subPackage/workbench/views/cshw.vue | 18 +++++++++---------
5 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/pages.json b/pages.json
index f1f7a38..73878f7 100644
--- a/pages.json
+++ b/pages.json
@@ -80,8 +80,9 @@
{
"path": "pages/home/selectSiteTwo",
"style": {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false
+ "navigationBarTitleText": "区域选择",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
}
}
],
@@ -1003,7 +1004,7 @@
]
},
- //居住证
+ //居住证
{
"root": "subPackage/reside",
"pages": [{
@@ -1410,4 +1411,4 @@
}
]
}
-}
\ No newline at end of file
+}
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 7d0e93c..9ecdd6b 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -1382,7 +1382,15 @@
} else if (path == '/subPackage/workbench/views/cscj') {
this.$u.func.globalNavigator(path, "navTo")
} else {
- this.$u.func.globalNavigator(`${path}&houseCode=${this.curHouseCode}`, "navTo")
+ if (this.curHouseCode) {
+ if (path.includes('?')) {
+ this.$u.func.globalNavigator(`${path}&houseCode=${this.curHouseCode}`, "navTo")
+ } else {
+ this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
+ }
+ } else {
+ this.$u.func.globalNavigator(`${path}`, "navTo")
+ }
}
} else {
uni.showToast({
@@ -1511,7 +1519,7 @@
})
},
- //场所任务跳转
+ //场所任务跳转
navToSiteList() {
let {
houseCode
@@ -1648,4 +1656,4 @@
<style lang="scss">
@import "./index.scss";
-</style>
\ No newline at end of file
+</style>
diff --git a/pages/statistics/index.vue b/pages/statistics/index.vue
index 921d738..6ac70be 100644
--- a/pages/statistics/index.vue
+++ b/pages/statistics/index.vue
@@ -392,6 +392,9 @@
}
},
getHouseHoldData() {
+ uni.showLoading({
+ title: '加载中'
+ })
statisticsModal.getHouseholdStatistics({
code: this.chilrenList.join(","),
roleType: this.getRoleType()
@@ -401,10 +404,14 @@
this.sexData = data.gender;
this.setPersonData(data.age)
this.setSexData(data.gender)
+ uni.hideLoading()
})
},
getHouseLabelData() {
+ uni.showLoading({
+ title: '加载中'
+ })
statisticsModal.getHouseLabelStatistic({
code: this.chilrenList.join(","),
roleType: this.getRoleType()
@@ -412,6 +419,7 @@
let data = res.data;
this.houseLabelData = data;
this.setHouseLabelData(data)
+ uni.hideLoading()
})
},
// 设置房屋标签
diff --git a/subPackage/task/index.vue b/subPackage/task/index.vue
index af98b2d..52658a8 100644
--- a/subPackage/task/index.vue
+++ b/subPackage/task/index.vue
@@ -232,7 +232,7 @@
} else if (i.name.trim() == "居住证申请") {
i.count = data.jzzsq;
} else if (i.name.trim() == "从业人员审核") {
- i.count = data.cssh;
+ i.count = data.cyrysh;
} else if (i.name.trim() == "无诈申请") {
i.count = data.wztj;
} else if (i.name.trim() == "校园安全隐患排查") {
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
index 868eb4b..149ba23 100644
--- a/subPackage/workbench/views/cshw.vue
+++ b/subPackage/workbench/views/cshw.vue
@@ -164,22 +164,22 @@
// 过滤掉待完善状态的
const isApp = 1;
let res = ""
- if (this.type == 2) {
- res = await getSiteMaintenanceData({
- ...params,
- roleName,
- isApp,
- ...this.pagingParams
- })
- } else {
+ if (this.type == 1) {
res = await getPlacePractitionerPage({
...params,
roleName,
isApp,
...this.pagingParams
})
+ } else {
+ res = await getSiteMaintenanceData({
+ ...params,
+ roleName,
+ isApp,
+ ...this.pagingParams
+ })
}
- console.log(res);
+ // console.log(res);
const {
code,
data: {
--
Gitblit v1.9.3