理论题管理调整

This commit is contained in:
fan 2020-10-27 11:01:22 +08:00
parent 92eaa499ba
commit 02f5652141
3 changed files with 41 additions and 6 deletions

View File

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.169:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -22,6 +22,34 @@
</template>
</div>
</template>
<template v-else-if="checkType(form, 'multi')">
<div v-for="(el,i) in options" :key="i" class="option" :label="$str2number(el.id)">
<span>{{ $asc2chart(i+65) }}. </span>
<div class="ql-editor" style="display: inline; padding: 0" v-html="$escapeHTML(el.content)" />
</div>
<div class="answer">
:
<template v-for="(el,i) in options">
<span v-if="el.correct" :key="i">{{ $asc2chart(i+65) }} </span>
</template>
</div>
</template>
<template v-else-if="checkType(form, 'fill')">
<div class="answer">
:
<template v-for="(el,i) in options">
<span v-if="el.correct" :key="i">{{ el.content }} </span>
</template>
</div>
</template>
<template v-else-if="checkType(form, 'answer')">
<div class="answer">
:
<template v-for="(el,i) in options">
<span v-if="el.correct" :key="i">{{ el.content }} </span>
</template>
</div>
</template>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">关闭</el-button>
</span>

View File

@ -145,12 +145,19 @@ export default {
} else if (this.option.type === 'multi') {
this.option.optionList.forEach((el, i) => { el.correct = answer.includes(i); });
} else if (this.option.type === 'fill') {
this.option.optionList = [];
answer.forEach(item => {
this.option.optionList.push({ content: item, correct: true });
answer.forEach((item, index) => {
if (this.option.optionList[index]) {
this.option.optionList[index].content = item;
} else {
this.option.optionList[index] = { content: item, correct: true };
}
});
} else if (this.option.type === 'answer') {
this.option.optionList = [{content: answer, correct:true}];
if (this.option.optionList[0]) {
this.option.optionList[0].content = answer;
} else {
this.option.optionList[0] = [{content: answer, correct:true}];
}
}
},
onModify(node) {