From 63709b414da70dbdd49bb41612b991e49ae8e011 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 16 Apr 2026 09:41:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E5=8D=95=E5=85=83=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=BB=84=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading-unit/components/ReadingRules.vue | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/views/trials/trials-panel/setting/reading-unit/components/ReadingRules.vue b/src/views/trials/trials-panel/setting/reading-unit/components/ReadingRules.vue index bb5be704..39388075 100644 --- a/src/views/trials/trials-panel/setting/reading-unit/components/ReadingRules.vue +++ b/src/views/trials/trials-panel/setting/reading-unit/components/ReadingRules.vue @@ -34,30 +34,22 @@ + !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])" @change="handleReadingToolListChange"> {{ $t(`${tool.i18nKey}`) }} - - + - + !hasPermi(['trials:trials-panel:setting:reading-unit:edit']) + "> + - + @@ -432,6 +424,7 @@ {{ $t('common:button:new') }} + @@ -766,19 +759,19 @@ export default { if (!name) return false let index = row.$index this.form.DefaultSegmentName.SegmentNameList.splice(index, 1, name) - this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",") + this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join("|") }, delSegment(row) { console.log(row) let index = row.$index this.form.DefaultSegmentName.SegmentNameList.splice(index, 1) - this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",") + this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join("|") }, async addSegment() { let name = await this.customPrompt() if (!name) return false this.form.DefaultSegmentName.SegmentNameList.push(name) - this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join(",") + this.form.SegmentNameListStr = this.form.DefaultSegmentName.SegmentNameList.join("|") }, async customPrompt(name = null) { try { @@ -796,6 +789,8 @@ export default { inputValidator: (value) => { if (!value) { return that.$t("trials:reading:Segmentations:message:notName") + } else if (value === name) { + return true } else if (that.form.DefaultSegmentName.SegmentNameList.includes(value)) { return that.$t("trials:reading:Segmentations:message:nameIsHas") } else { @@ -1067,7 +1062,7 @@ export default { }) }, handleReadingToolListChange(v) { - if(!v.includes('FixedRadiusCircleROI')) { + if (!v.includes('FixedRadiusCircleROI')) { this.form.CircleRadius = null } }, @@ -1076,9 +1071,9 @@ export default { this.form[field] = '' return } - + let val = value.toString() - + // 1. 清除“数字”和“.”以外的字符 val = val.replace(/[^\d.]/g, '') // 2. 保证第一个字符不能是“.”