|  | @@ -1175,7 +1175,7 @@
 | 
	
		
			
				|  |  |              <div class="numberinput lefttext ">
 | 
	
		
			
				|  |  |                <el-form>
 | 
	
		
			
				|  |  |                <!-- CST -->
 | 
	
		
			
				|  |  | -              <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick">
 | 
	
		
			
				|  |  | +              <el-tabs tab-position="left" class="demo-tabs" v-model="activeadf" @tab-click="adfhandleClick2">
 | 
	
		
			
				|  |  |                <el-tab-pane label="CST" name="CST">
 | 
	
		
			
				|  |  |                  <csts ref="Cstref"/>
 | 
	
		
			
				|  |  |                </el-tab-pane>
 | 
	
	
		
			
				|  | @@ -1189,7 +1189,7 @@
 | 
	
		
			
				|  |  |              <template #footer>
 | 
	
		
			
				|  |  |                <div class="dialog-footer">
 | 
	
		
			
				|  |  |                  <el-button @click="dialog.cstffd = false">取消</el-button>
 | 
	
		
			
				|  |  | -                <el-button type="primary" @click="ok()">
 | 
	
		
			
				|  |  | +                <el-button type="primary" @click="getCstFfdsave(activeadf);dialog.cstffd = false">
 | 
	
		
			
				|  |  |                    确定
 | 
	
		
			
				|  |  |                  </el-button>
 | 
	
		
			
				|  |  |                </div>
 | 
	
	
		
			
				|  | @@ -1581,13 +1581,13 @@
 | 
	
		
			
				|  |  |                                </el-table-column>
 | 
	
		
			
				|  |  |                                <el-table-column prop="upper" label="上限值">
 | 
	
		
			
				|  |  |                                  <template #default="{ row }">
 | 
	
		
			
				|  |  | -                                  <el-input type="text" v-model.Number="row.upper" oninput="value=value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1')"
 | 
	
		
			
				|  |  | +                                  <el-input type="text" v-model.Number="row.upper" oninput="value=value.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^-(?=\.)/, '')"
 | 
	
		
			
				|  |  |                                      @change="handleEdit(row)" />
 | 
	
		
			
				|  |  |                                  </template>
 | 
	
		
			
				|  |  |                                </el-table-column>
 | 
	
		
			
				|  |  |                                <el-table-column prop="lower" label="下限值">
 | 
	
		
			
				|  |  |                                  <template #default="{ row }">
 | 
	
		
			
				|  |  | -                                  <el-input v-model.Number="row.lower" oninput="value=value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1')"
 | 
	
		
			
				|  |  | +                                  <el-input v-model.Number="row.lower" oninput="value=value.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^-(?=\.)/, '')"
 | 
	
		
			
				|  |  |                                      @change="handleEdit(row)" />
 | 
	
		
			
				|  |  |                                  </template>
 | 
	
		
			
				|  |  |                                </el-table-column>
 | 
	
	
		
			
				|  | @@ -1640,13 +1640,13 @@
 | 
	
		
			
				|  |  |                                  <template #default="{ row }">
 | 
	
		
			
				|  |  |                                    <el-input v-model.Number="row.upper" 
 | 
	
		
			
				|  |  |                                      
 | 
	
		
			
				|  |  | -                                    oninput="value=value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1')"
 | 
	
		
			
				|  |  | +                                  oninput="value=value.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^-(?=\.)/, '')"
 | 
	
		
			
				|  |  |                                      @change="handleEdit(row)" />
 | 
	
		
			
				|  |  |                                  </template>
 | 
	
		
			
				|  |  |                                </el-table-column>
 | 
	
		
			
				|  |  |                                <el-table-column prop="lower" label="下限值">
 | 
	
		
			
				|  |  |                                  <template #default="{ row }">
 | 
	
		
			
				|  |  | -                                  <el-input v-model.Number="row.lower" oninput="value=value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1')"
 | 
	
		
			
				|  |  | +                                  <el-input v-model.Number="row.lower" oninput="value=value.replace(/[^0-9.-]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^-(?=\.)/, '')"
 | 
	
		
			
				|  |  |                                      @change="handleEdit(row)" />
 | 
	
		
			
				|  |  |                                  </template>
 | 
	
		
			
				|  |  |                                </el-table-column>
 | 
	
	
		
			
				|  | @@ -2595,6 +2595,9 @@ const initcstffds = () => {
 | 
	
		
			
				|  |  |    ]).then(([res1, res2]) => {
 | 
	
		
			
				|  |  |      console.log('1:', res1.checked);
 | 
	
		
			
				|  |  |      console.log('2:', res2.checked);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    Cstref.value.getcstAssign(res1);
 | 
	
		
			
				|  |  | +    Ffdref.value.getffdsAssign(res2);
 | 
	
		
			
				|  |  |      
 | 
	
		
			
				|  |  |      // 根据返回值来设置 activeadf
 | 
	
		
			
				|  |  |      if (res1.checked === 1) {
 | 
	
	
		
			
				|  | @@ -3157,23 +3160,7 @@ const getmub = () => {
 | 
	
		
			
				|  |  |        ElMessage.error(err.returnMsg)
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -const cstok=()=>{
 | 
	
		
			
				|  |  | - // cstnum.value='';
 | 
	
		
			
				|  |  | - if(Cstref.value){
 | 
	
		
			
				|  |  | -  Cstref.value.getcstsave();
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -  dialog.value.CSTt = false;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -const ffdok=()=>{
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -   if(Ffdref.value){
 | 
	
		
			
				|  |  | -    Ffdref.value.getffdsave();
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    dialog.value.ffdt = false;
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  |  //对象数组转化字符串
 | 
	
		
			
				|  |  |  const getarr = (name, arrays) => {
 | 
	
		
			
				|  |  |    console.log(arrays)
 | 
	
	
		
			
				|  | @@ -3205,16 +3192,20 @@ const getarr = (name, arrays) => {
 | 
	
		
			
				|  |  |    return name;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -const convertToStringArray = (result,Data) => {
 | 
	
		
			
				|  |  | +const convertToStringArray = (result, Data) => {
 | 
	
		
			
				|  |  | +  console.log('Data:', Data);
 | 
	
		
			
				|  |  |    result = Data.map(row => {
 | 
	
		
			
				|  |  |      // 获取每一列的数据,排除带有 'id' 的字段
 | 
	
		
			
				|  |  |      return Object.keys(row)
 | 
	
		
			
				|  |  |        .filter(key => !key.includes('id'))  // 过滤掉包含 'id' 的字段
 | 
	
		
			
				|  |  | -      .map(key => row[key] || ' ')      // 获取每个字段的值,空值替换为 ' '
 | 
	
		
			
				|  |  | -      .join(',');                          // 将每个字段的值用逗号连接
 | 
	
		
			
				|  |  | -  }).join(';');  
 | 
	
		
			
				|  |  | -    return result;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | +      .map(key => {
 | 
	
		
			
				|  |  | +        const value = row[key];
 | 
	
		
			
				|  |  | +        return (value === null || value === undefined || value === '') ? ' ' : value; // 处理 null、undefined 和空字符串
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +      .join(',');  // 将每个字段的值用逗号连接
 | 
	
		
			
				|  |  | +  }).join(';');
 | 
	
		
			
				|  |  | +  return result;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  //保存优化问题
 | 
	
		
			
				|  |  |  const onokItem = () => {
 | 
	
	
		
			
				|  | @@ -3704,7 +3695,7 @@ const selectTab2=(index)=>{
 | 
	
		
			
				|  |  |    currentTab2.value = index;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  const adfhandleClick=(tab,event)=>{
 | 
	
		
			
				|  |  | -  console.log(tab.props.label);
 | 
	
		
			
				|  |  | +  console.log('表单切换',tab.props.label);
 | 
	
		
			
				|  |  |    activeadf.value=tab.props.label;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    if(tab.props.name === '进化优化器'){
 | 
	
	
		
			
				|  | @@ -3750,6 +3741,7 @@ const getTaddsave = () => {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  const getSave = (ref) => {
 | 
	
		
			
				|  |  |    if (ref == '进化优化器'){
 | 
	
		
			
				|  |  |      getaddsave();
 | 
	
	
		
			
				|  | @@ -3760,6 +3752,58 @@ const getSave = (ref) => {
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +// 参数化
 | 
	
		
			
				|  |  | +const adfhandleClick2=(tab,event)=>{
 | 
	
		
			
				|  |  | +  console.log('表单切换',tab.props.label);
 | 
	
		
			
				|  |  | +  activeadf.value=tab.props.label;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  if(tab.props.name === 'CST'){
 | 
	
		
			
				|  |  | +    nextTick(() => {
 | 
	
		
			
				|  |  | +      // 确保 ref 已经初始化
 | 
	
		
			
				|  |  | +      if (Cstref.value) {
 | 
	
		
			
				|  |  | +        Cstref.value.getcst(pid.value);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +  }else if(tab.props.name === 'FFD'){
 | 
	
		
			
				|  |  | +    nextTick(() => {
 | 
	
		
			
				|  |  | +      // 确保 ref 已经初始化
 | 
	
		
			
				|  |  | +      if (Ffdref.value) {
 | 
	
		
			
				|  |  | +        Ffdref.value.getffds(pid.value);
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +// 单独cst保存
 | 
	
		
			
				|  |  | +const cstok=()=>{
 | 
	
		
			
				|  |  | + // cstnum.value='';
 | 
	
		
			
				|  |  | + if(Cstref.value){
 | 
	
		
			
				|  |  | +  Cstref.value.getcstsave();
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  dialog.value.CSTt = false;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// 单独ffd保存
 | 
	
		
			
				|  |  | +const ffdok=()=>{
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +   if(Ffdref.value){
 | 
	
		
			
				|  |  | +    Ffdref.value.getffdsave();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    dialog.value.ffdt = false;
 | 
	
		
			
				|  |  | +  
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +// cstffd保存
 | 
	
		
			
				|  |  | +const getCstFfdsave = (activeadf) => {
 | 
	
		
			
				|  |  | +  if (activeadf == 'CST') {
 | 
	
		
			
				|  |  | +    cstok();
 | 
	
		
			
				|  |  | +  } else if (activeadf == 'FFD') {
 | 
	
		
			
				|  |  | +    ffdok();
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss" scoped>
 | 
	
		
			
				|  |  |  .conter_flex {
 |