| | |
| | | col.display=false |
| | | } |
| | | } |
| | | if (col.type === "select") { |
| | | if(col.data && col.data.length>0){ |
| | | if (col.type === "select" || col.type==='radio' || col.type==='checkbox') { |
| | | if (col.data && col.data.length > 0) { |
| | | col.dicData = col.data.map((d) => { |
| | | return { |
| | | label: d.key, |
| | | key: d.value, |
| | | value: d.value, |
| | | attributes:d.attributes |
| | | attributes: d.attributes |
| | | }; |
| | | }); |
| | | }else if(!validatenull(col.dictCode)) { |
| | | } else if (!validatenull(col.dictCode)) { |
| | | getDicts(col.dictCode).then((res) => { |
| | | if (res.data.success){ |
| | | if(res.data.data && res.data.obj == null){ |
| | | if (res.data.success) { |
| | | if (res.data.data && res.data.obj == null) { |
| | | res.data.obj = res.data.data |
| | | } |
| | | const dic = res.data.obj; |
| | |
| | | label: d.value, |
| | | key: d.key, |
| | | value: d.key, |
| | | attributes:d.attributes |
| | | attributes: d.attributes |
| | | }; |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | col.dicData = []; |
| | | } |
| | | } |
| | | if (col.type==='refer') { |