From ef6135a9e45277c2df98c9f15e9f48ac90dfb2b5 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 5 Jun 2024 11:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=83=A8=E4=BD=8D=E6=96=B0=E5=BB=BA=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8B=BE=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trial-config/components/logicalConfig.vue | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue b/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue index a578d910..010ded2d 100644 --- a/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue +++ b/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue @@ -952,7 +952,7 @@ export default { this.selectedBodyParts = val; }, // 获取检查部位 - async getTrialBodyPartList() { + async getTrialBodyPartList(data) { try { let params = { TrialId: this.$route.query.trialId, @@ -960,15 +960,16 @@ export default { let res = await getTrialBodyPartList(params); if (res.IsSuccess) { this.trialBodyPartList = res.Result; - if (this.$refs.bodyPartTable) { - this.$nextTick(() => { - var a = this.trialBodyPartList.filter((v) => { - return !!this.form.BodyPartTypeList.find((v1) => { - return v1 === v.Name; - }); + if (data) { + if (this.$refs.bodyPartTable) { + this.$nextTick(() => { + let obj = this.trialBodyPartList.filter( + (item) => item.Code === data.Code + ); + console.log(obj); + this.$refs.bodyPartTable.toggleRowSelection(obj[0]); }); - this.toggleBodyPartSelection(a); - }); + } } } } catch (err) { @@ -990,7 +991,7 @@ export default { }; let res = await addOrUpdateTrialBodyPart(data); if (res.IsSuccess) { - this.getTrialBodyPartList(); + this.getTrialBodyPartList(data); this.$message.success( this.$t("trials:seeting:message:addBodyPartSuccess") );