dev_forum
杨树明 5 years ago
parent ba9a6b768c
commit 477f3979d6

@ -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*/}
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">服务配置</p>
{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{
return(
<div key={key}>
<p className="color-grey-6 font-16 mb30">服务配置</p>
<div id="5">
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
<div className="clearfix mb5">

Loading…
Cancel
Save