From e50a322314045b5006217ceb19a0c6e216674b56 Mon Sep 17 00:00:00 2001 From: Guo XIn <371864209@qq.com> Date: Sat, 26 Aug 2023 17:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E7=BD=AE=E6=A0=87?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=89=8D=E7=AB=AF=E6=B8=B2=E6=9F=93=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=85=B6=E4=BB=96=E6=A0=87=E7=AD=BE=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=98=AF=E5=90=A6=E5=8F=AA=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/common/layui/extend/datalabel.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shandan-common/src/main/resources/static/js/common/layui/extend/datalabel.js b/shandan-common/src/main/resources/static/js/common/layui/extend/datalabel.js index c32430d..05b90fb 100644 --- a/shandan-common/src/main/resources/static/js/common/layui/extend/datalabel.js +++ b/shandan-common/src/main/resources/static/js/common/layui/extend/datalabel.js @@ -249,8 +249,8 @@ layui.define(['globalTree'], function (exports) { }); } - function addOtherLabel(value) { - let template = `
`; + function addOtherLabel(value, readonly) { + let template = `
`; $('.other-label-item').append(template); let cid = _KEY + _CACHE.size, component = new Component(cid, $('.label-set-component.other-label:last')); @@ -272,15 +272,16 @@ layui.define(['globalTree'], function (exports) { function setData(dataArr = []) { for (let data of dataArr) { - let find = false; + let find = false, readonly = false; for (let component of _CACHE.values()) { + readonly = component.isReadOnly(); if (data.fieldTitle !== '其他标签' && data.fieldTitle === component.fieldTitle) { component.setData(data); find = true; } } if (!find) { - addOtherLabel(data); + addOtherLabel(data, readonly); } } }