|
@@ -118,7 +118,7 @@ class ScaleTable extends React.Component{
|
|
|
}
|
|
|
|
|
|
handleFormula(data){//得分计算
|
|
|
- const {tableId,getResult,parentId,scaleInfo,parentIndex} = this.props;
|
|
|
+ const {tableId,parentId,scaleInfo,parentIndex} = this.props;
|
|
|
const {valueData} = this.state;
|
|
|
this.setState({
|
|
|
start:true
|
|
@@ -178,14 +178,16 @@ class ScaleTable extends React.Component{
|
|
|
}
|
|
|
componentWillUnmount(){
|
|
|
// 储存计算结果和选择后的data
|
|
|
- const {tableId,getResult,parentId,parentIndex,scaleInfo} = this.props;
|
|
|
+ const {tableId,getResult,parentId,parentIndex,scaleInfo,saveScaleData} = this.props;
|
|
|
const {valueData,scaleResult1} = this.state;
|
|
|
// 替换表格内容
|
|
|
let allDatas = scaleInfo[tableId]?JSON.parse(JSON.stringify(scaleInfo[tableId])):'' ;
|
|
|
if(allDatas){
|
|
|
allDatas[1].content = JSON.stringify(valueData);
|
|
|
+ // 需求:未点计算,直接点确定、关闭也保存选中数据 4-30
|
|
|
+ saveScaleData&&saveScaleData({id:tableId,data:allDatas});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(scaleResult1){
|
|
|
const params = {
|
|
|
type:1,
|
|
@@ -193,7 +195,7 @@ class ScaleTable extends React.Component{
|
|
|
id:tableId,
|
|
|
pIndex:parentIndex
|
|
|
}
|
|
|
- getResult&&getResult({params,allDatas});
|
|
|
+ getResult&&getResult(params);
|
|
|
}
|
|
|
}
|
|
|
getContent(){
|
|
@@ -213,7 +215,7 @@ class ScaleTable extends React.Component{
|
|
|
<p className={style['miniName']}>{item.name}</p>
|
|
|
{item.details&&item.details.map((vv,ii)=>{
|
|
|
return <div className={style['item']}>
|
|
|
- <Radio label={vv.detailName}
|
|
|
+ <Radio label={vv.detailName+'('+vv.score+')'}
|
|
|
isSelect={vv.select==1||selecteds[item.name]==vv.detailName}
|
|
|
handleClick={this.handleRadio.bind(this,v.groupName,item.name,vv)}>
|
|
|
</Radio>
|