From 1a0abf4788e8b1ee17d5a3a9834385bbc6b8f14b Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期四, 07 十二月 2023 17:38:53 +0800
Subject: [PATCH] 备份
---
GoldC/pages/prorepwx/prorepwx.js | 56 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/GoldC/pages/prorepwx/prorepwx.js b/GoldC/pages/prorepwx/prorepwx.js
index d2da333..ab8d692 100644
--- a/GoldC/pages/prorepwx/prorepwx.js
+++ b/GoldC/pages/prorepwx/prorepwx.js
@@ -58,18 +58,17 @@
time: info.appointmentTime,
deviceIndex: 0,
deviceList2: [info.device.deviceName],
- erectoIndex: 0,
- erectoList2: [info.erectoName],
+ // erectoIndex: 0,
+ // erectoList2: [info.erectoName],
view:info.imgUrl?true:false
})
wx.setNavigationBarTitle({
- title: this.data.form.device.deviceName
+ title:'ID'+this.data.form.id+' | '+this.data.form.device.deviceName
})
- } else {
- this.getErectoList()
- this.getDeviceList()
}
+ this.getErectoList()
+ this.getDeviceList()
},
changeUserName(e) {
this.data.form.userName = e.detail.value
@@ -286,7 +285,7 @@
"Access-Control-Allow-Headers": 'token',
Authorization: `Bearer ${wx.getStorageSync('token')}`
},
- params: data,
+ data: data,
success: (res, header) => {
if (res.data.code != 200) {
wx.showToast({
@@ -312,7 +311,7 @@
let data = {
pageNum: 1,
pageSize: 10000,
- deptId: wx.setStorageSync('deptId'),
+ deptId: wx.getStorageSync('deptId'),
isAuthentication: 1
}
wx.request({
@@ -322,7 +321,7 @@
"Access-Control-Allow-Headers": 'token',
Authorization: `Bearer ${wx.getStorageSync('token')}`
},
- params: data,
+ data: data,
success: (res, header) => {
if (res.data.code != 200) {
wx.showToast({
@@ -330,20 +329,35 @@
icon: 'none'
});
} else {
- let data = []
+ console.log(res);
+
+ res.data.rows.unshift({
+ nickName:'鏈寚娲�',
+ erectoId:-1
+ })
+ let data1 = []
for (let i = 0; i < res.data.rows.length; i++) {
- data.push(res.data.rows[i].nickName)
+ data1.push(res.data.rows[i].nickName)
}
- data.unshift(
- '鏈寚娲�'
- )
this.setData({
erectoList1: res.data.rows,
- erectoList2: data
+ erectoList2: data1
})
-
- this.data.form.erectoId = -1
- this.data.form.erectoName = '鏈寚娲�'
+
+ if (this.data.showJD) {
+ console.log(11111111111);
+ for (let i = 0; i < this.data.erectoList1.length; i++) {
+ if (this.data.erectoList1[i].userId == this.data.paramsInfo.erectoId) {
+ console.log(i);
+ this.setData({
+ erectoIndex: i,
+ })
+ }
+ }
+ } else {
+ this.data.form.erectoId = -1
+ this.data.form.erectoName = '鏈寚娲�'
+ }
}
}
})
@@ -376,8 +390,8 @@
this.setData({
form: item
})
- this.data.form.erectoId = this.data.erectoList1[Number(e.detail.value)-1].userId
- this.data.form.erectoName = this.data.erectoList1[Number(e.detail.value)-1].nickName
+ this.data.form.erectoId = this.data.erectoList1[Number(e.detail.value)].userId
+ this.data.form.erectoName = this.data.erectoList1[Number(e.detail.value)].nickName
}
},
@@ -612,7 +626,7 @@
this.setData({
multiArray: loadPickerData,//picker鏁扮粍璧嬪�硷紝鏍煎紡 [years, months, days, hours, minutes]
multiIndex: GetMultiIndex,//璁剧疆pickerIndex锛孾0,0,0,0,0]
- time: year + '-' + month + '-' + day + ' ' + hour + '-' + minute, //璁剧疆褰撳墠鏃堕棿 锛宑urrentYears+'-'+mm+'-'+dd+' '+hh+':'+min
+ time: year + '-' + month + '-' + day + ' ' + hour + ':' + minute, //璁剧疆褰撳墠鏃堕棿 锛宑urrentYears+'-'+mm+'-'+dd+' '+hh+':'+min
year: year,//璁板綍閫夋嫨鐨勫勾
month: month,//璁板綍閫夋嫨鐨勬湀
day: day,//璁板綍閫夋嫨鐨勬棩
--
Gitblit v1.8.0