fix:修复部分bug
This commit is contained in:
@@ -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}%`;;
|
||||
});
|
||||
}
|
||||
//循环第二次表格
|
||||
|
||||
@@ -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) => ({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -310,6 +310,8 @@ export default {
|
||||
|
||||
/** 添加选项 */
|
||||
const addOptionHandle = () => {
|
||||
//选项验证
|
||||
// MTCheck();
|
||||
const newOption = new Option();
|
||||
copyInfo.value.last_option_index++;
|
||||
newOption.option = `<p>选项${getOptionName(optionList.value)}</p>`;
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user