From b44bb07a03ac75d401f143498b3a6c3dfa76099b Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 23 Apr 2024 09:10:35 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: java110 <928255095@qq.com> --- .../editComplaintType/editComplaintType.js | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/public/pages/complaint/editComplaintType/editComplaintType.js b/public/pages/complaint/editComplaintType/editComplaintType.js index df2179d91..2fc4bb98d 100644 --- a/public/pages/complaint/editComplaintType/editComplaintType.js +++ b/public/pages/complaint/editComplaintType/editComplaintType.js @@ -12,7 +12,7 @@ }, _initMethod: function () { $that.editComplaintTypeInfo.typeCd = vc.getParam('typeCd'); - vc.emit('selectStaffs', 'setStaffs', $that.editComplaintTypeInfo.staffs); + // vc.emit('selectStaffs', 'setStaffs', $that.editComplaintTypeInfo.staffs); $that._loadComplaintType(); @@ -37,25 +37,23 @@ param, function (json, res) { let _json = JSON.parse(json); - + let staffs = _json.data[0].staffs; + _json.data[0].staffs = [];; vc.copyObject(_json.data[0], $that.editComplaintTypeInfo); + staffs.forEach(_t=>{ + _t.userId = _t.staffId; + _t.name = _t.staffName; + _t.userName = _t.staffName - vc.emit('selectStaffs', 'setStaffs', $that.editComplaintTypeInfo.staffs); + }) + vc.emit('selectStaffs', 'setStaffs', staffs); - let _staffs = _json.data[0].staffs; - if (!_staffs || _staffs.length < 1) { + if (!staffs || staffs.length < 1) { return; } - - _staffs.forEach(_staff => { - $that.editComplaintTypeInfo.staffs.push({ - userId:_staff.staffId, - name:_staff.staffName, - userName:_staff.staffName, - }) - }); + $that.editComplaintTypeInfo.staffs = staffs; }, function (errInfo, error) {