|
|
|
@ -25,7 +25,7 @@ export type TableListItem = {
|
|
|
|
|
// React.forwardRef 接受渲染函数作为参数。React 将使用 props 和 ref 作为参数来调用此函数。此函数应返回 React 节点。
|
|
|
|
|
const ScoreSetter = (props: any, ref: any) => {
|
|
|
|
|
const {questionTypeValues, passScore: passScoreValue } = props
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [flag, setFlag] = useState<any>([]) // 分数变更标记
|
|
|
|
|
const [typeScore, setTypeScore] = useState(questionTypeValues.map((item: { code: number; score: number; score_harf: number; })=>({question_type:item.code, score: item.score, score_harf: item.score_harf}))) ; // 题型分数数组 [{"question_type": "0","score": "3","score_harf": "0"},]
|
|
|
|
|
//const type = history.location.pathname === '/questionbank/attestation' ? 1 : 0 ; // 题库类型
|
|
|
|
@ -109,7 +109,6 @@ const ScoreSetter = (props: any, ref: any) => {
|
|
|
|
|
dataIndex: 'score_sum',
|
|
|
|
|
//key: 'age',
|
|
|
|
|
width: 80,
|
|
|
|
|
defaultValue:()=>{ return 123},
|
|
|
|
|
render: (_text: any, _: any, index: number) => {
|
|
|
|
|
return <>
|
|
|
|
|
{flag?.indexOf(index) === -1 ?
|
|
|
|
|