From 9a6f61a093e1da9b269eb4f5aa9c240ed87f24bf Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Sun, 29 Mar 2020 15:51:14 +0800 Subject: [PATCH] 调查问卷bug修改 --- SunshineIns/src/fetch/_fetch.js | 2 +- SunshineIns/src/view/QuestionnairEditor/index.js | 27 +++++++++++++++++++++------ SunshineIns/src/page/QuestionnaireTablelist.jsx | 2 ++ SunshineIns/src/page/NewlyList.jsx | 6 +++++- SunshineIns/src/page/Newly.jsx | 3 +++ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/SunshineIns/src/fetch/_fetch.js b/SunshineIns/src/fetch/_fetch.js index c922b3f..059c54a 100644 --- a/SunshineIns/src/fetch/_fetch.js +++ b/SunshineIns/src/fetch/_fetch.js @@ -1,7 +1,7 @@ import fetch from 'hife/fetch'; // export const base = 'http://xnwj.gznsjc.gov.cn'; -// export const base = 'http://nsjc.vaiwan.com'; +// export const base = 'http://1p885086k1.iok.la'; export const base = 'http://nsjcy.hugeinfo.com.cn'; // export const base = 'http://1p885086k1.iok.la'; diff --git a/SunshineIns/src/page/Newly.jsx b/SunshineIns/src/page/Newly.jsx index 74d15da..7145473 100644 --- a/SunshineIns/src/page/Newly.jsx +++ b/SunshineIns/src/page/Newly.jsx @@ -171,6 +171,8 @@ this.setState({ btnLoading: true }) + console.log('questionDtos', questionDtos); + Fetch.saveQuestionTemp({ ...initData, title: extraData.questionnairTitle, @@ -184,6 +186,7 @@ }) if (res.code == 0) { message.success('问卷提交成功'); + this.props.history.push('/questionnaire/newlyList'); } }) } diff --git a/SunshineIns/src/page/NewlyList.jsx b/SunshineIns/src/page/NewlyList.jsx index 7b63719..5567029 100644 --- a/SunshineIns/src/page/NewlyList.jsx +++ b/SunshineIns/src/page/NewlyList.jsx @@ -31,7 +31,11 @@ return ( <div className="app-page"> <HeadView history={this.props.history} /> - <LinkView sed="问卷管理" local="问卷管理" /> + {/* <LinkView sed="问卷管理" local="问卷管理" /> + */} + <div className="link-view-main"> + 后台中心 /<span style={{ color: '#1790FF' }}>问卷管理</span> + </div> <QuestionnaireTablelist history={this.props.history} /> </div> diff --git a/SunshineIns/src/page/QuestionnaireTablelist.jsx b/SunshineIns/src/page/QuestionnaireTablelist.jsx index 10af0f4..1c88165 100644 --- a/SunshineIns/src/page/QuestionnaireTablelist.jsx +++ b/SunshineIns/src/page/QuestionnaireTablelist.jsx @@ -308,6 +308,8 @@ return <Badge count={'已发布'} style={{ background: '#87d068' }} /> case 4: return <Badge count={'已回收'} style={{ background: '#fadb14' }} /> + case 99: + return <Badge count={'不通过'} style={{ background: '#fadb14' }} /> default: return '暂无' } diff --git a/SunshineIns/src/view/QuestionnairEditor/index.js b/SunshineIns/src/view/QuestionnairEditor/index.js index 2696829..734af73 100644 --- a/SunshineIns/src/view/QuestionnairEditor/index.js +++ b/SunshineIns/src/view/QuestionnairEditor/index.js @@ -121,13 +121,13 @@ hasScore: [...hasScore] }); let scoresTemp = scores.concat(); - scoresTemp[index] = value; + scoresTemp[index] = value.replace(/\D/g, ''); //替换掉非数字部分 value = scoresTemp; } if (key == 'warnFlag') { let { warnFlag } = this.state.editor; let warnFlagTemp = warnFlag.concat(); - console.log('warnFlagTemp', warnFlagTemp) + console.log('warnFlagTemp', warnFlagTemp); warnFlagTemp[index] = checked; value = warnFlagTemp; } @@ -222,7 +222,8 @@ this.setState(prevState => ({ editor: { ...prevState.editor, - options: [...prevState.editor.options, ''] + options: [...prevState.editor.options, ''], + warnFlag: [...prevState.editor.warnFlag, false] } })); }; @@ -476,6 +477,7 @@ <div style={{ flex: '1', display: 'flex', alignItems: 'center' }}> <ShakeTransition shake={scoreShake[index]}> <Input + type="number" index={index} placeholder="分值" name={'scores'} @@ -643,7 +645,11 @@ return ( <label className="wowjoy-radio" - style={{ width: `${100 / parseInt(rows)}%`, marginBottom: 8, marginRight: 30 }} + style={{ + width: `${100 / parseInt(rows)}%`, + marginBottom: 8, + marginRight: 30 + }} key={uuid()} > <input @@ -690,7 +696,11 @@ <label className="wowjoy-checkbox" key={uuid()} - style={{ width: `${100 / parseInt(rows)}%`, marginBottom: 8 }} + style={{ + width: `${100 / parseInt(rows)}%`, + marginBottom: 8, + marginRight: 30 + }} > <input type="checkbox" @@ -929,7 +939,12 @@ <div className="subject-row"> <span>{index + 1}.</span> {'input' === type ? subCompletionEl : <span>{title}</span>} - {required && <span className="subject-title-require">*</span>} + {required == 'true' && ( + <span className="subject-title-require">*</span> + )} + + {type == 'checkbox' && <span>(多选题)</span>} + {type == 'radio' && <span>(单选题)</span>} </div> {remark && ( <div className="subject-row subject-remarks">{remarkText}</div> -- Gitblit v1.8.0