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); } } }