diff --git a/src/views/DataAnalyse/kndiagram/questions/components/mxdLcDetail.vue b/src/views/DataAnalyse/kndiagram/questions/components/mxdLcDetail.vue index 8bbff122..6f834639 100644 --- a/src/views/DataAnalyse/kndiagram/questions/components/mxdLcDetail.vue +++ b/src/views/DataAnalyse/kndiagram/questions/components/mxdLcDetail.vue @@ -123,7 +123,7 @@ function handleExportXlsx (columns, data) { const obj = Object.create(null); p_columns.forEach((element) => { const value = item[element.key]; - obj[element.title] = value; + obj[element.title] = value; }); return obj; }); @@ -176,9 +176,9 @@ function handleExportXlsx (columns, data) { const raw_rows = zero_data.data.map((item, e) => { const obj = Object.create(null); if (e === 0) { - obj["BIC贝叶斯信息准则"] = column.fit; + obj["BIC贝叶斯信息准则"] = `${column.fit}%`; source.fit_chart.map((ee, ei) => { - obj[`${ee.name}人数占比`] = ee.value; + obj[`${ee.name}人数占比`] = `${ee.value}%`;; }); } //循环第二次表格 diff --git a/src/views/DataAnalyse/particulars/components/QuestionnaireDetail.vue b/src/views/DataAnalyse/particulars/components/QuestionnaireDetail.vue index f5079505..f884ed2e 100644 --- a/src/views/DataAnalyse/particulars/components/QuestionnaireDetail.vue +++ b/src/views/DataAnalyse/particulars/components/QuestionnaireDetail.vue @@ -533,8 +533,12 @@ async function getData(sn, id) { data.questions.map(el=>{ const newData =data.answer_infos.find(cel=>cel.question_index ===el.question_index) if(newData)el.answer = JSON.parse(newData.answer) + debugger; // MXD配置 - let mxd_version = data?.answer?.mxd_version?.find((cel) => el.question_index === cel.question_index)??{}; + var mxd_version_json = data?.answer?.mxd_version ? + (typeof(data?.answer?.mxd_version) === "string" ? JSON.parse(data?.answer?.mxd_version) + : data?.answer?.mxd_version ) : undefined ; + let mxd_version = mxd_version_json?.find((cel) => el.question_index === cel.question_index)??{}; el.version = mxd_version; // 表单验证通过,开始答题 // el.answer = questions.value.map((question) => ({ diff --git a/src/views/planetDesign/Design/fragement/footer/MaxdiffFooter.vue b/src/views/planetDesign/Design/fragement/footer/MaxdiffFooter.vue index 14228542..14a0c593 100644 --- a/src/views/planetDesign/Design/fragement/footer/MaxdiffFooter.vue +++ b/src/views/planetDesign/Design/fragement/footer/MaxdiffFooter.vue @@ -373,7 +373,7 @@ infoConfig.value.config[name] =560; // if (value < infoConfig.value.options?.[0]?.length) { // return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试"); // } - if (infoConfig.value.config.concept * infoConfig.value.config.task < 1.5 * infoConfig.value.options?.[0]?.length) { + if (infoConfig.value.config.concept * infoConfig.value.config.task <= 1.5 * infoConfig.value.options?.[0]?.length) { message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试"); return false; } diff --git a/src/views/planetDesign/Design/questions/maxdiff/Index.vue b/src/views/planetDesign/Design/questions/maxdiff/Index.vue index a7f5a1fa..2c71cee6 100644 --- a/src/views/planetDesign/Design/questions/maxdiff/Index.vue +++ b/src/views/planetDesign/Design/questions/maxdiff/Index.vue @@ -310,6 +310,8 @@ export default { /** 添加选项 */ const addOptionHandle = () => { +//选项验证 +// MTCheck(); const newOption = new Option(); copyInfo.value.last_option_index++; newOption.option = `
选项${getOptionName(optionList.value)}
`; @@ -324,6 +326,23 @@ export default { // ); emitInfo(true); }; + + + // const MTCheck = () => { + // // if (value < 2) { + // // return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试"); + // // } + // // if (value < infoConfig.value.options?.[0]?.length) { + // // return message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试"); + // // } + // if (copyInfo.value.config.concept * copyInfo.value.config.task <= 1.5 * copyInfo.value.options?.[0]?.length) { + // message.error("参数设置不合理,建议您放大随机任务数或每屏选项数试试"); + // return false; + // } + // return true; + // }; + + const onUpLoadChange = (value) => { console.log("onUpLoadChange", value); value.forEach((element) => {