|
|
|
|
@ -58,9 +58,9 @@ const searchClick = (page = 1) => {
|
|
|
|
|
}
|
|
|
|
|
const select_option = {
|
|
|
|
|
value: [
|
|
|
|
|
{ content: 'A. ', type: 'items', items: [], questions: [] },
|
|
|
|
|
{ content: 'B. ', type: 'items', items: [], questions: [] },
|
|
|
|
|
{ content: 'C. ', type: 'items', items: [], questions: [] }
|
|
|
|
|
{ content: 'A. ', type: 'items', items: [], questions: [], score: 0 },
|
|
|
|
|
{ content: 'B. ', type: 'items', items: [], questions: [], score: 0 },
|
|
|
|
|
{ content: 'C. ', type: 'items', items: [], questions: [], score: 0 }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
const input_option = {
|
|
|
|
|
@ -284,40 +284,48 @@ onMounted(() => {
|
|
|
|
|
>
|
|
|
|
|
<el-option label="项目" value="items"></el-option>
|
|
|
|
|
<el-option label="题目" value="questions"></el-option>
|
|
|
|
|
<el-option label="分数" value="score"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<span style="margin-right: 10px"
|
|
|
|
|
>{{
|
|
|
|
|
edit_data.option.select.value[k].type === 'items'
|
|
|
|
|
? edit_data.option.select.value[k].items.length
|
|
|
|
|
: edit_data.option.select.value[k].questions.length
|
|
|
|
|
}}个{{
|
|
|
|
|
edit_data.option.select.value[k].type === 'items' ? '项目' : '题目'
|
|
|
|
|
}}</span
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" size="small" @click="editItemClick(k)">
|
|
|
|
|
编辑{{ edit_data.option.select.value[k].type === 'items' ? '项目' : '题目' }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="k === 0"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="moveQuestionClick(k, -1)"
|
|
|
|
|
>↑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="k === edit_data.option.select.value.length - 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="moveQuestionClick(k, 1)"
|
|
|
|
|
>↓
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="edit_data.option.select.value.length === 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="delQuestionClick(k)"
|
|
|
|
|
>X
|
|
|
|
|
</el-button>
|
|
|
|
|
<template v-if="edit_data.option.select.value[k].type === 'score'">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="edit_data.option.select.value[k].score"
|
|
|
|
|
></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<span style="margin-right: 10px"
|
|
|
|
|
>{{
|
|
|
|
|
edit_data.option.select.value[k].type === 'items'
|
|
|
|
|
? edit_data.option.select.value[k].items.length
|
|
|
|
|
: edit_data.option.select.value[k].questions.length
|
|
|
|
|
}}个{{
|
|
|
|
|
edit_data.option.select.value[k].type === 'items' ? '项目' : '题目'
|
|
|
|
|
}}</span
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" size="small" @click="editItemClick(k)">
|
|
|
|
|
编辑{{ edit_data.option.select.value[k].type === 'items' ? '项目' : '题目' }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="k === 0"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="moveQuestionClick(k, -1)"
|
|
|
|
|
>↑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="k === edit_data.option.select.value.length - 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="moveQuestionClick(k, 1)"
|
|
|
|
|
>↓
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
:disabled="edit_data.option.select.value.length === 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="delQuestionClick(k)"
|
|
|
|
|
>X
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" size="small" @click="addQuestionClick()"
|
|
|
|
|
@ -383,11 +391,16 @@ onMounted(() => {
|
|
|
|
|
>
|
|
|
|
|
<span style="margin-right: 10px; width: 400px">{{ i.content }}</span>
|
|
|
|
|
<span class="title_wrapper">带出:</span>
|
|
|
|
|
<span>{{ scope.row.option.select.value[k].type === 'items' ? '项目' : '题目' }}</span>
|
|
|
|
|
<span style="margin: 0 5px">{{
|
|
|
|
|
<span v-if="scope.row.option.select.value[k].type === 'items'">项目</span>
|
|
|
|
|
<span v-else-if="scope.row.option.select.value[k].type === 'questions'">题目</span>
|
|
|
|
|
<span v-else-if="scope.row.option.select.value[k].type === 'score'">分数</span>
|
|
|
|
|
<span v-if="scope.row.option.select.value[k].type === 'score'" style="margin: 0 5px">{{
|
|
|
|
|
scope.row.option.select.value[k][scope.row.option.select.value[k].type]
|
|
|
|
|
}}</span>
|
|
|
|
|
<span v-else style="margin: 0 5px">{{
|
|
|
|
|
scope.row.option.select.value[k][scope.row.option.select.value[k].type].length
|
|
|
|
|
}}</span>
|
|
|
|
|
<span>个</span>
|
|
|
|
|
<span>{{ scope.row.option.select.value[k].type === 'score' ? '分' : '个' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|