fix: getListHeadByDataList函数里面的兼容radio-nps (#89)
This commit is contained in:
parent
a6e88fa444
commit
b7a716778a
@ -31,7 +31,8 @@ export async function getSchemaBySurveyType(surveyType: string) {
|
|||||||
export function getListHeadByDataList(dataList) {
|
export function getListHeadByDataList(dataList) {
|
||||||
const listHead = dataList.map((question) => {
|
const listHead = dataList.map((question) => {
|
||||||
let othersCode;
|
let othersCode;
|
||||||
if (question.type === 'radio-star') {
|
const radioType = ['radio-star', 'radio-nps'];
|
||||||
|
if (radioType.includes(question.type)) {
|
||||||
const rangeConfigKeys = Object.keys(question.rangeConfig);
|
const rangeConfigKeys = Object.keys(question.rangeConfig);
|
||||||
if (rangeConfigKeys.length > 0) {
|
if (rangeConfigKeys.length > 0) {
|
||||||
othersCode = [{ code: `${question.field}_custom`, option: '填写理由' }];
|
othersCode = [{ code: `${question.field}_custom`, option: '填写理由' }];
|
||||||
|
Loading…
Reference in New Issue
Block a user