on: function (data) { // 更新结果到表单 var values = []; var parentValues = [];

                    data.arr.forEach(function (item) {
                        values.push(item.value);

                        if (item.parent != 0) {
                            parentValues.push(item.parent);
                        }
                    });

                    var uniqueValues = Array.from(new Set(values));
                    var uniqueParentValues = Array.from(new Set(parentValues));

                    var combinedValues = uniqueValues.concat(uniqueParentValues).join(',');

                    $('#industry').val(combinedValues);
                },
                getText: function () {
                    return $('#industry').val();
on function data 更新结果到表单 var ids = ; var parentIds = ; dataarrforEachfunction item

原文地址: http://www.cveoy.top/t/topic/izvN 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录