From 326bdb73c590cb669af344cfdc4ee6f02bf1b0a8 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 27 May 2020 10:16:11 +0800
Subject: [PATCH] 链接指纹是杯页面
---
SunshineIns/src/view/QuestionnairAnswer/index.js | 63 ++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 15 deletions(-)
diff --git a/SunshineIns/src/view/QuestionnairAnswer/index.js b/SunshineIns/src/view/QuestionnairAnswer/index.js
index 1e75f8a..d9af57f 100644
--- a/SunshineIns/src/view/QuestionnairAnswer/index.js
+++ b/SunshineIns/src/view/QuestionnairAnswer/index.js
@@ -1,22 +1,55 @@
import React from 'react';
+import { Table, Tag } from 'antd';
-const QuestionnairAnswer = ({
- 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