diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 5791db82c..c59b2fb68 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -554,28 +554,27 @@ export default class TPMsettings extends Component { } Deselectlittle=(value)=>{ - let {settingsData,shixun_service_configs,choice_small_type}=this.state; + let {shixun_service_configs,choice_small_type}=this.state; let newshixun_service_configs=shixun_service_configs; let newchoice_small_type=choice_small_type; - newchoice_small_type.some((items,keys)=> { - if (items === value) { - newchoice_small_type.splice(keys, 1) + + newshixun_service_configs.some((item,key)=> { + if (item.mirror_repository_id === value) { + newshixun_service_configs.splice(key, 1) + return true + } + } + ) + + newchoice_small_type.some((item,key)=> { + if (item === value) { + newchoice_small_type.splice(key, 1) return true } } ) - settingsData.shixun.small_type.some((items,keys)=> { - if (items.id === value) { - newshixun_service_configs.splice(keys+1, 1) - return true - } - } - ) - - - this.setState({ choice_small_type: newchoice_small_type, shixun_service_configs:newshixun_service_configs, @@ -691,10 +690,12 @@ export default class TPMsettings extends Component { opening_time,shixunmemoMDvalue,shixun_service_configlist } = this.state; - shixun_service_configlist.map((item,key)=>{ - delete item.name; - }) - + let newshixun_service_configlist = shixun_service_configlist.map(v => { + let v1 = Object.assign({},v); + delete v1.name; + return v1 + }); + let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1; const description_editormd = this.description_editormd.getValue(); @@ -788,7 +789,7 @@ export default class TPMsettings extends Component { shixun:{ name: name, webssh: webssh, - user_scope: use_scope, + use_scope: use_scope, can_copy: can_copy, vnc: vnc===null?undefined:vnc, test_set_permission: test_set_permission, @@ -799,7 +800,7 @@ export default class TPMsettings extends Component { forbid_copy: forbid_copy, multi_webssh:newmulti_webssh, opening_time:opening_time, - mirror_script_id:choice_standard_scriptssum, + mirror_script_id:choice_standard_scriptssum===undefined?choice_standard_scripts:choice_standard_scriptssum, }, shixun_info:{ description: description_editormd, @@ -808,7 +809,7 @@ export default class TPMsettings extends Component { main_type: choice_main_type, small_type: choice_small_type, scope_partment: scope_partment, - shixun_service_configs:shixun_service_configlist + shixun_service_configs:newshixun_service_configlist } axios.put(Url, data).then((response) => { @@ -1807,10 +1808,10 @@ export default class TPMsettings extends Component { {/*"request_limit": 10, # 内存要求*/} {/*"mirror_repository_id": 12, # 镜像id*/}
+

服务配置

{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{ return(
-

服务配置

{item.name}