From 4a76c06e7f754e232338ce7e075c08924cffe209 Mon Sep 17 00:00:00 2001
From: xuxj <hugeinfo123>
Date: Wed, 08 Apr 2020 11:52:38 +0800
Subject: [PATCH] 部分细节修改
---
SunshineIns/src/view/QuestionnairAnswer/index.js | 64 ++++++++++++++++++++++++--------
1 files changed, 48 insertions(+), 16 deletions(-)
diff --git a/SunshineIns/src/view/QuestionnairAnswer/index.js b/SunshineIns/src/view/QuestionnairAnswer/index.js
index 8454b92..d9af57f 100644
--- a/SunshineIns/src/view/QuestionnairAnswer/index.js
+++ b/SunshineIns/src/view/QuestionnairAnswer/index.js
@@ -1,23 +1,55 @@
import React from 'react';
+import { Table, Tag } from 'antd';
-const QuestionnairAnswer = ({
- answer
-}) => {
- console.log(answer)
+const QuestionnairAnswer = ({ answer, index }) => {
+ // console.log(answer);
+ // const columns = [
+ // {
+ // title: 'Name',
+ // dataIndex: 'name',
+ // key: 'name',
+ // render: text => <a>{text}</a>,
+ // },
+ // {
+ // title: 'Age',
+ // dataIndex: 'age',
+ // key: 'age',
+ // },
+ // {
+ // title: 'Address',
+ // dataIndex: 'address',
+ // key: 'address',
+ // },
return (
+ // {`${index + 1}.
<div style={{ minHeight: 60 }}>
- <div style={{ color: '#666' }}>{`${index + 1}.${answer.type === 'input' ? answer.completionForwards : answer.title + ':'}`}</div>
- <div style={{ paddingLeft: 12, color: '#151515' }}>{typeof answer.answer[answer.type] !== 'string' ? (
- typeof answer.answer[answer.type].optionValue !== 'string' ? (
- answer.answer[answer.type].optionValue.map((item, index) => {
- return (
- item && <span key={index} style={{ marginRight: 15 }}>{item}</span>
- )
- })
- ) : answer.answer[answer.type].optionValue
- ) : answer.answer[answer.type]}</div>
+ {answer.answer && (
+ <React.Fragment>
+ <div style={{ color: '#666' }}>
+ {index + 1}、
+ {answer.type === 'input'
+ ? answer.completionForwards
+ : answer.title + ':'}
+ </div>
+ <div style={{ paddingLeft: 12, color: '#151515' }}>
+ {typeof answer.answer[answer.type] !== 'string'
+ ? typeof answer.answer[answer.type].optionValue !== 'string'
+ ? answer.answer[answer.type].optionValue.map((item, index) => {
+ return (
+ item && (
+ <span key={index} style={{ marginRight: 15 }}>
+ {item}
+ </span>
+ )
+ );
+ })
+ : answer.answer[answer.type].optionValue
+ : answer.answer[answer.type]}
+ </div>
+ </React.Fragment>
+ )}
</div>
);
-}
+};
-export default QuestionnairAnswer;
\ No newline at end of file
+export default QuestionnairAnswer;
--
Gitblit v1.8.0