fix:资源管理编辑页面,如果是cmdb过来且配置了资源类型的,需要回填数据,禅道#1428
Showing
1 changed file
with
4 additions
and
0 deletions
@@ -220,6 +220,10 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | @@ -220,6 +220,10 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | ||
220 | //当从cmdb同步数据,且没有配置采集协议是,可以调整资源类型 | 220 | //当从cmdb同步数据,且没有配置采集协议是,可以调整资源类型 |
221 | if (bean.recordWay == 'cmdb_sync' && !bean.collProtocol){ | 221 | if (bean.recordWay == 'cmdb_sync' && !bean.collProtocol){ |
222 | $('#slt-res-manage-add-restype').parents('.layui-form-item').removeClass('hide'); | 222 | $('#slt-res-manage-add-restype').parents('.layui-form-item').removeClass('hide'); |
223 | + //如果有资源类型,则回填 joke add 20230317 | ||
224 | + if (bean.resType) { | ||
225 | + initValue = [bean.resType]; | ||
226 | + } | ||
223 | }else{ | 227 | }else{ |
224 | if (bean.resType) { | 228 | if (bean.resType) { |
225 | initValue = [bean.resType]; | 229 | initValue = [bean.resType]; |
-
Please register or login to post a comment