Commit c9e37977c3e72a8d4ff32fd60de632241a1cca4d

Authored by zhangzzzz
1 parent f13007a6

自定义列名新增sDropDownData下拉配置;

src/components/Common/CommonElementEvent.js
... ... @@ -1643,23 +1643,18 @@ export default (ChildComponent) => {
1643 1643 const configObj = sColTitleNameIndex === undefined ? JSON.parse(sColTitleName) : JSON.parse(sColTitleName)[sColTitleNameIndex];
1644 1644 const gdsconfigformslaveNew = [];
1645 1645 if (commonUtils.isNotEmptyObject(configObj)) {
1646   - const { sDropDownData = {} } = configObj;
  1646 + const { extraConfig = {} } = configObj;
1647 1647 for (const key of Object.keys(configObj)) {
1648   - if (!['panelName', 'sDropDownData'].includes(key)) {
1649   - const configNew = {};
  1648 + if (!['panelName', 'extraConfig'].includes(key)) {
  1649 + let configNew = {};
1650 1650 configNew.sName = key;
1651 1651 configNew.sChinese = configObj[key];
1652 1652 configNew.bVisible = true;
1653 1653 configNew.iFitWidth = 80;
1654 1654 configNew.showName = configObj[key];
1655 1655 configNew.bReadonly = false;
1656   - if (sDropDownData[key]) {
1657   - configNew.sDropDownType = 'const';
1658   - configNew.showDropDown = JSON.stringify(sDropDownData[key].split(',').reduce((pre, item) => {
1659   - pre[item] = item;
1660   - return pre;
1661   - }, {}));
1662   - console.log('=====configNew', configNew);
  1656 + if (extraConfig[key]) {
  1657 + configNew = { ...configNew, ...extraConfig[key] };
1663 1658 }
1664 1659 gdsconfigformslaveNew.push(configNew);
1665 1660 }
... ...