diff --git a/components/searchSelect/index.js b/components/searchSelect/index.js
index 947f2ef..b27bdb6 100644
--- a/components/searchSelect/index.js
+++ b/components/searchSelect/index.js
@@ -25,7 +25,6 @@ Component({
observers: {
"show,type,filterBind": function(newShow, newType) {
if (newShow && newType) {
- console.log("newShow", newShow,"newType", newType)
this.onSearch()
}
}
@@ -68,7 +67,6 @@ Component({
},
onConfirm(event) {
const { index } = event.detail;
- console.log("index", index)
const { list = [], type } = this.data;
const item = list[index];
if (!item) {
diff --git a/components/searchSelectWrapper/index.js b/components/searchSelectWrapper/index.js
index 842547d..923f040 100644
--- a/components/searchSelectWrapper/index.js
+++ b/components/searchSelectWrapper/index.js
@@ -20,6 +20,7 @@ Component({
hideBorder: Boolean,
required: Boolean,
transparent: Boolean,
+ allowClear: Boolean,
},
/**
@@ -42,12 +43,14 @@ Component({
},
onChangeText(e) {
this.setData({ text: e.detail });
- console.log("----------")
this.triggerEvent("changeText", e.detail)
},
onSearchKeyword() {
this.triggerEvent("searchKeyword", this.data.keyword)
this.setData({ keyword: "" })
+ },
+ onClear() {
+ this.triggerEvent("clear")
}
}
})
\ No newline at end of file
diff --git a/components/searchSelectWrapper/index.wxml b/components/searchSelectWrapper/index.wxml
index c82c385..548d684 100644
--- a/components/searchSelectWrapper/index.wxml
+++ b/components/searchSelectWrapper/index.wxml
@@ -4,7 +4,7 @@
{{placeholder}}
{{text}}
-
+
diff --git a/pages/login/index.js b/pages/login/index.js
index 2dcd977..5e6b8c5 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -58,7 +58,6 @@ Page({
const { token, ...user } = data
wx.setStorageSync('user', user)
wx.setStorageSync('token', data?.token)
- console.log("user.workStatus", user.workStatus)
if (user.workStatus) {
wx.redirectTo({
url: '/pages/workBenchNew/index',
diff --git a/pages/workBenchNew/components/installMeter/index.js b/pages/workBenchNew/components/installMeter/index.js
index a657f45..91f3904 100644
--- a/pages/workBenchNew/components/installMeter/index.js
+++ b/pages/workBenchNew/components/installMeter/index.js
@@ -14,6 +14,7 @@ Page({
data: {
time: "",
area: "",
+ placeholder: "",
},
/**
@@ -151,7 +152,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
- console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({
@@ -293,6 +293,30 @@ Page({
}
this.onCancel();
},
+ clearCard() {
+ this.setData({
+ card: null,
+ cardName: null,
+ })
+ },
+ clearCollectionA() {
+ this.setData({
+ collectionA: null,
+ collectionAName: null,
+ })
+ },
+ clearCollectionB() {
+ this.setData({
+ collectionB: null,
+ collectionBName: null,
+ })
+ },
+ clearCollectionC() {
+ this.setData({
+ collectionC: null,
+ collectionCName: null,
+ })
+ },
changeAddress(e) {
this.setData({
address: e.detail
diff --git a/pages/workBenchNew/components/installMeter/index.wxml b/pages/workBenchNew/components/installMeter/index.wxml
index 39fc91d..e3aafef 100644
--- a/pages/workBenchNew/components/installMeter/index.wxml
+++ b/pages/workBenchNew/components/installMeter/index.wxml
@@ -85,24 +85,32 @@
placeholder="请选择卡绑定(选填)"
text="{{cardName}}"
bind:search="onBindCard"
+ allowClear="{{true}}"
+ bind:clear="clearCard"
/>
diff --git a/pages/workBenchNew/components/uninstallMeter/index.js b/pages/workBenchNew/components/uninstallMeter/index.js
index 0d14347..38f91fb 100644
--- a/pages/workBenchNew/components/uninstallMeter/index.js
+++ b/pages/workBenchNew/components/uninstallMeter/index.js
@@ -171,7 +171,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
- console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({
diff --git a/pages/workBenchNew/components/workBenchMeterControl/index.js b/pages/workBenchNew/components/workBenchMeterControl/index.js
index da7e9f3..28ab80a 100644
--- a/pages/workBenchNew/components/workBenchMeterControl/index.js
+++ b/pages/workBenchNew/components/workBenchMeterControl/index.js
@@ -114,6 +114,7 @@ Page({
await that.init();
this.setData({
mode: null,
+ modeName: null,
days: null,
reason: null,
url: null,
@@ -130,7 +131,6 @@ Page({
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: async function(res) {
- console.log("res", res)
const path = res.tempFiles?.[0]?.tempFilePath.toLowerCase()
if (!/(\.jpg|\.png|\.jpeg)$/.test(path)) {
wx.showToast({
diff --git a/pages/workBenchNew/components/workBenchReading/index.js b/pages/workBenchNew/components/workBenchReading/index.js
index b19578d..7cda274 100644
--- a/pages/workBenchNew/components/workBenchReading/index.js
+++ b/pages/workBenchNew/components/workBenchReading/index.js
@@ -93,7 +93,6 @@ Page({
alertError(message)
return;
}
- console.log("data", data, "num", num)
if (!data) {
wx.showModal({
title: '提示',
@@ -146,10 +145,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
- const { parkName } = this.data;
- if (!parkName) {
- return
- }
this.init()
},
diff --git a/pages/workBenchNew/components/workBenchReading/index.wxml b/pages/workBenchNew/components/workBenchReading/index.wxml
index 2d6a964..f153059 100644
--- a/pages/workBenchNew/components/workBenchReading/index.wxml
+++ b/pages/workBenchNew/components/workBenchReading/index.wxml
@@ -23,9 +23,8 @@
bindcancel="onConcal"
/>
-
-
+
{
+ loadingFunc(async () => {
+ await that.init()
+ })
+ })
+},
+onClearMeter() {
+ const that = this;
+ this.setData({ meter: null, meterName: null }, () => {
+ loadingFunc(async () => {
+ await that.init()
+ })
+ })
+},
+onClearType() {
+ const that = this;
+ this.setData({ noticeFlowType: null, noticeFlowTypeName: null }, () => {
+ loadingFunc(async () => {
+ await that.init()
+ })
+ })
+},
+onClearStatus() {
+ const that = this;
+ this.setData({ noticeFlowStatus: null, noticeFlowStatusName: null }, () => {
+ loadingFunc(async () => {
+ await that.init()
+ })
+ })
+},
hideActionMenu() {
this.setData({
currentActionSheet: null
@@ -173,11 +202,11 @@ onMenuSelect(e) {
return;
}
this.setData({
- list: data?.map(item => {
+ list: Array.isArray(data) ? data?.map(item => {
item.time = item?.created_at?.slice(0, 10)
item.address = item?.target?.meter_data?.address;
return item;
- }),
+ }) : [],
totalPage: Math.ceil(total / size),
})
},
diff --git a/pages/workBenchTodoList/index.wxml b/pages/workBenchTodoList/index.wxml
index 9fb0913..e0d8955 100644
--- a/pages/workBenchTodoList/index.wxml
+++ b/pages/workBenchTodoList/index.wxml
@@ -6,6 +6,8 @@
placeholder="请选择园区"
text="{{parkName}}"
bind:search="onParkFocus"
+ allowClear="{{true}}"
+ bind:clear="onClearPark"
/>
@@ -52,7 +60,7 @@
{{ item.address }}
- {{ item.flow_status === 1 ? "处理中" : "已确认" }}
+ {{ item.current_user_audit_status === 0 ? "处理中" : "已确认" }}
diff --git a/pages/workOrderDetail/index.js b/pages/workOrderDetail/index.js
index 646709d..e514826 100644
--- a/pages/workOrderDetail/index.js
+++ b/pages/workOrderDetail/index.js
@@ -47,9 +47,12 @@ Page({
}
alertSuccess("确认成功")
const that = this;
- loadingFunc(async () => {
- that.getDetail(id)
- })
+ setTimeout(() => {
+ loadingFunc(async () => {
+ await that.getDetail(id)
+ })
+ }, 300)
+
},
async getDetail(id) {
const { code, data ,message } = await getNoticeFlowDetail(id)
diff --git a/project.private.config.json b/project.private.config.json
index 485a980..6409ae4 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -23,6 +23,13 @@
"condition": {
"miniprogram": {
"list": [
+ {
+ "name": "pages/workBenchNew/components/installMeter/index",
+ "pathName": "pages/workBenchNew/components/installMeter/index",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
+ },
{
"name": "pages/workBenchTodoList/index",
"pathName": "pages/workBenchTodoList/index",
diff --git a/utils/index.js b/utils/index.js
index 6d79893..037debd 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -45,10 +45,10 @@ export function getConfigByEnv() {
switch (envVersion) {
// 开发版
case 'develop':
- api = "http://localhost:8000"
+ // api = "http://localhost:8000"
// api = "https://zgd.hbhcbn.com/api3"
// TODO: 发布正式时使用此路径
- // api = "https://zgd.hbhcbn.com/wxApi"
+ api = "https://zgd.hbhcbn.com/wxApi"
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
break;
// 体验版