Commit 12aed116014045df3c0195096d9e181abdce52ae
1 parent
48f962ae
fix:DEFECT-879 客户创建场景联动时,先选部分,然后选全部显示未找到该资源
Showing
2 changed files
with
34 additions
and
30 deletions
| @@ -139,21 +139,23 @@ | @@ -139,21 +139,23 @@ | ||
| 139 | if (e) { | 139 | if (e) { |
| 140 | //fengtao | 140 | //fengtao |
| 141 | if (e == 'ALL') { | 141 | if (e == 'ALL') { |
| 142 | - const data = await getAttribute(orgId, null); | ||
| 143 | - //fengtao | ||
| 144 | - const options = data.map((m) => { | ||
| 145 | - return { | ||
| 146 | - label: m, | ||
| 147 | - value: m, | ||
| 148 | - }; | ||
| 149 | - }); | ||
| 150 | - updateSchema({ | ||
| 151 | - field: 'type2', | ||
| 152 | - componentProps: { | ||
| 153 | - placeholder: '请选择属性', | ||
| 154 | - options, | ||
| 155 | - }, | ||
| 156 | - }); | 142 | + if (orgId) { |
| 143 | + const data = await getAttribute(orgId, null); | ||
| 144 | + //fengtao | ||
| 145 | + const options = data.map((m) => { | ||
| 146 | + return { | ||
| 147 | + label: m, | ||
| 148 | + value: m, | ||
| 149 | + }; | ||
| 150 | + }); | ||
| 151 | + updateSchema({ | ||
| 152 | + field: 'type2', | ||
| 153 | + componentProps: { | ||
| 154 | + placeholder: '请选择属性', | ||
| 155 | + options, | ||
| 156 | + }, | ||
| 157 | + }); | ||
| 158 | + } | ||
| 157 | } else { | 159 | } else { |
| 158 | const getT = getFieldsValue(); | 160 | const getT = getFieldsValue(); |
| 159 | const entityId = getT.entityId; | 161 | const entityId = getT.entityId; |
| @@ -179,21 +179,23 @@ | @@ -179,21 +179,23 @@ | ||
| 179 | if (e) { | 179 | if (e) { |
| 180 | //fengtao | 180 | //fengtao |
| 181 | if (e == 'ALL') { | 181 | if (e == 'ALL') { |
| 182 | - const data = await getAttribute(props.provideOrgid || orgId.value, null); | ||
| 183 | - //fengtao | ||
| 184 | - const options = data.map((m) => { | ||
| 185 | - return { | ||
| 186 | - label: m, | ||
| 187 | - value: m, | ||
| 188 | - }; | ||
| 189 | - }); | ||
| 190 | - updateSchema({ | ||
| 191 | - field: 'type2', | ||
| 192 | - componentProps: { | ||
| 193 | - placeholder: '请选择属性', | ||
| 194 | - options, | ||
| 195 | - }, | ||
| 196 | - }); | 182 | + if (props.provideOrgid || orgId.value) { |
| 183 | + const data = await getAttribute(props.provideOrgid || orgId.value, null); | ||
| 184 | + //fengtao | ||
| 185 | + const options = data.map((m) => { | ||
| 186 | + return { | ||
| 187 | + label: m, | ||
| 188 | + value: m, | ||
| 189 | + }; | ||
| 190 | + }); | ||
| 191 | + updateSchema({ | ||
| 192 | + field: 'type2', | ||
| 193 | + componentProps: { | ||
| 194 | + placeholder: '请选择属性', | ||
| 195 | + options, | ||
| 196 | + }, | ||
| 197 | + }); | ||
| 198 | + } | ||
| 197 | } else { | 199 | } else { |
| 198 | const getT = getFieldsValue(); | 200 | const getT = getFieldsValue(); |
| 199 | const entityId = getT.entityId; | 201 | const entityId = getT.entityId; |