|
@@ -11,10 +11,10 @@
|
|
|
:change-id="changeId"
|
|
:change-id="changeId"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="Book-content" v-if="currentTreeID">
|
|
|
|
|
|
|
+ <div v-if="currentTreeID" class="Book-content">
|
|
|
<div class="Big-Book-save">
|
|
<div class="Big-Book-save">
|
|
|
<el-button type="primary" @click="onSave">保 存</el-button>
|
|
<el-button type="primary" @click="onSave">保 存</el-button>
|
|
|
- <el-button type="danger" @click="onPreview" plain>预 览</el-button>
|
|
|
|
|
|
|
+ <el-button type="danger" plain @click="onPreview">预 览</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<el-tabs
|
|
<el-tabs
|
|
|
v-model="editableTabsValue"
|
|
v-model="editableTabsValue"
|
|
@@ -31,24 +31,23 @@
|
|
|
>
|
|
>
|
|
|
<div class="createTable">
|
|
<div class="createTable">
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ v-model="row"
|
|
|
maxlength="1"
|
|
maxlength="1"
|
|
|
style="width: 50px"
|
|
style="width: 50px"
|
|
|
- v-model="row"
|
|
|
|
|
type="text"
|
|
type="text"
|
|
|
@input="rowLine('row')"
|
|
@input="rowLine('row')"
|
|
|
/>*<el-input
|
|
/>*<el-input
|
|
|
- style="width: 50px"
|
|
|
|
|
v-model="line"
|
|
v-model="line"
|
|
|
|
|
+ style="width: 50px"
|
|
|
type="text"
|
|
type="text"
|
|
|
maxlength="1"
|
|
maxlength="1"
|
|
|
@input="rowLine('line')"
|
|
@input="rowLine('line')"
|
|
|
/>
|
|
/>
|
|
|
<el-button
|
|
<el-button
|
|
|
- @click="createTable"
|
|
|
|
|
style="margin-left: 10px"
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
- >增加题</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click="createTable"
|
|
|
|
|
+ >增加题</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
v-for="(topic, toindex) in item.cur_fn_data"
|
|
v-for="(topic, toindex) in item.cur_fn_data"
|
|
@@ -58,24 +57,24 @@
|
|
|
<div class="Big-Book-top">
|
|
<div class="Big-Book-top">
|
|
|
<span>正标题</span>
|
|
<span>正标题</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ v-model="topic.z_title"
|
|
|
style="width: 80%"
|
|
style="width: 80%"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
autosize
|
|
autosize
|
|
|
placeholder="请输入正标题"
|
|
placeholder="请输入正标题"
|
|
|
- v-model="topic.z_title"
|
|
|
|
|
@blur="onBlur(topic, 'z_title')"
|
|
@blur="onBlur(topic, 'z_title')"
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="Big-Book-top">
|
|
<div class="Big-Book-top">
|
|
|
<span>副标题</span>
|
|
<span>副标题</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
|
|
+ v-model="topic.f_title"
|
|
|
style="width: 80%"
|
|
style="width: 80%"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
autosize
|
|
autosize
|
|
|
placeholder="请输入副标题"
|
|
placeholder="请输入副标题"
|
|
|
- v-model="topic.f_title"
|
|
|
|
|
@blur="onBlur(topic, 'f_title')"
|
|
@blur="onBlur(topic, 'f_title')"
|
|
|
- ></el-input>
|
|
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="Big-Book-top">
|
|
<div class="Big-Book-top">
|
|
|
<span>是否有背景色</span>
|
|
<span>是否有背景色</span>
|
|
@@ -100,36 +99,36 @@
|
|
|
<template
|
|
<template
|
|
|
v-if="
|
|
v-if="
|
|
|
topicIitem.type == 'article_chs' ||
|
|
topicIitem.type == 'article_chs' ||
|
|
|
- (topicIitem.data &&
|
|
|
|
|
- topicIitem.data.type == 'article_chs')
|
|
|
|
|
|
|
+ (topicIitem.data &&
|
|
|
|
|
+ topicIitem.data.type == 'article_chs')
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<ArticleTemChs
|
|
<ArticleTemChs
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <ArticleView :curQue="topicIitem.data" />
|
|
|
|
|
|
|
+ <ArticleView :cur-que="topicIitem.data" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'sentence_segword_chs'">
|
|
<template v-if="topicIitem.type == 'sentence_segword_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<SentenceSegwordChs
|
|
<SentenceSegwordChs
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <ArticleView :curQue="topicIitem.data" />
|
|
|
|
|
|
|
+ <ArticleView :cur-que="topicIitem.data" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'dialogue_article_chs'">
|
|
<template v-if="topicIitem.type == 'dialogue_article_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<DialogueArticleChs
|
|
<DialogueArticleChs
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -138,9 +137,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'dialogue_answer_chs'">
|
|
<template v-if="topicIitem.type == 'dialogue_answer_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
- <DialogueAnswerViewChs
|
|
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ <DialogueAnswerChs
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -150,67 +149,67 @@
|
|
|
<template v-if="topicIitem.type == 'NewWord_chs'">
|
|
<template v-if="topicIitem.type == 'NewWord_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<Neword
|
|
<Neword
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <NewordPhraseview :curQue="topicIitem.data" />
|
|
|
|
|
|
|
+ <NewordPhraseview :cur-que="topicIitem.data" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'notes_chs'">
|
|
<template v-if="topicIitem.type == 'notes_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<Notes
|
|
<Notes
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <NewordPhraseview :curQue="topicIitem.data" />
|
|
|
|
|
|
|
+ <NewordPhraseview :cur-que="topicIitem.data" />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'input_record_chs'">
|
|
<template v-if="topicIitem.type == 'input_record_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<InputRecord
|
|
<InputRecord
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-else> </template>
|
|
|
|
|
|
|
+ <template v-else />
|
|
|
</template>
|
|
</template>
|
|
|
<template
|
|
<template
|
|
|
v-if="
|
|
v-if="
|
|
|
topicIitem.type == 'recordHZ_inputPY_chs' ||
|
|
topicIitem.type == 'recordHZ_inputPY_chs' ||
|
|
|
- topicIitem.type == 'inputItem_chs' ||
|
|
|
|
|
- topicIitem.type == 'sentence_input_chs' ||
|
|
|
|
|
- topicIitem.type == 'sentence_judge_chs' ||
|
|
|
|
|
- topicIitem.type == 'sentence_record_chs' ||
|
|
|
|
|
- topicIitem.type == 'sentence_input_record_chs'
|
|
|
|
|
|
|
+ topicIitem.type == 'inputItem_chs' ||
|
|
|
|
|
+ topicIitem.type == 'sentence_input_chs' ||
|
|
|
|
|
+ topicIitem.type == 'sentence_judge_chs' ||
|
|
|
|
|
+ topicIitem.type == 'sentence_record_chs' ||
|
|
|
|
|
+ topicIitem.type == 'sentence_input_record_chs'
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<Sentence
|
|
<Sentence
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:type="topicIitem.type"
|
|
:type="topicIitem.type"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-else> </template>
|
|
|
|
|
|
|
+ <template v-else />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'upload_control_chs'">
|
|
<template v-if="topicIitem.type == 'upload_control_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<UploadControl
|
|
<UploadControl
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:type="topicIitem.type"
|
|
:type="topicIitem.type"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<UploadControlView
|
|
<UploadControlView
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
@@ -218,40 +217,48 @@
|
|
|
<template v-if="topicIitem.type == 'sudoku_chs'">
|
|
<template v-if="topicIitem.type == 'sudoku_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<Sudoku
|
|
<Sudoku
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:type="topicIitem.type"
|
|
:type="topicIitem.type"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-else> </template>
|
|
|
|
|
|
|
+ <template v-else />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'NumberCombination_chs'">
|
|
<template v-if="topicIitem.type == 'NumberCombination_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<NumberCombination
|
|
<NumberCombination
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:type="topicIitem.type"
|
|
:type="topicIitem.type"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-else> </template>
|
|
|
|
|
|
|
+ <template v-else />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="topicIitem.type == 'toneSelect_chs'">
|
|
<template v-if="topicIitem.type == 'toneSelect_chs'">
|
|
|
<template v-if="topicIitem.is_edit">
|
|
<template v-if="topicIitem.is_edit">
|
|
|
<ToneSelect
|
|
<ToneSelect
|
|
|
- :curQue="topicIitem.data"
|
|
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
:type="topicIitem.type"
|
|
:type="topicIitem.type"
|
|
|
:fn_data="fn_data"
|
|
:fn_data="fn_data"
|
|
|
- :changeCurQue="changeCurQue"
|
|
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="topicIitem.type === 'voice_matrix'">
|
|
|
|
|
+ <template v-if="topicIitem.is_edit">
|
|
|
|
|
+ <voice-matrix
|
|
|
|
|
+ :cur-que="topicIitem.data"
|
|
|
|
|
+ :change-cur-que="changeCurQue"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-else> </template>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
- class="addoption"
|
|
|
|
|
v-if="topicIitem.data && topicIitem.is_edit"
|
|
v-if="topicIitem.data && topicIitem.is_edit"
|
|
|
|
|
+ class="addoption"
|
|
|
@click="
|
|
@click="
|
|
|
remoeModule(toindex, rowIndex, lineIndex, topicIitem)
|
|
remoeModule(toindex, rowIndex, lineIndex, topicIitem)
|
|
|
"
|
|
"
|
|
@@ -261,8 +268,8 @@
|
|
|
<div
|
|
<div
|
|
|
v-else-if="
|
|
v-else-if="
|
|
|
TopicIndex == toindex &&
|
|
TopicIndex == toindex &&
|
|
|
- RowIndex == rowIndex &&
|
|
|
|
|
- lineIndex == LineIndex
|
|
|
|
|
|
|
+ RowIndex == rowIndex &&
|
|
|
|
|
+ lineIndex == LineIndex
|
|
|
"
|
|
"
|
|
|
class="addoption"
|
|
class="addoption"
|
|
|
>
|
|
>
|
|
@@ -276,21 +283,19 @@
|
|
|
添加模板
|
|
添加模板
|
|
|
</div>
|
|
</div>
|
|
|
<template v-if="topicIitem.data">
|
|
<template v-if="topicIitem.data">
|
|
|
- <div class="Big-Book-save" v-if="topicIitem.is_edit">
|
|
|
|
|
|
|
+ <div v-if="topicIitem.is_edit" class="Big-Book-save">
|
|
|
<el-button
|
|
<el-button
|
|
|
type="success"
|
|
type="success"
|
|
|
size="small"
|
|
size="small"
|
|
|
@click="onSure(topicIitem)"
|
|
@click="onSure(topicIitem)"
|
|
|
- >确定</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ >确定</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="Big-Book-save" v-else>
|
|
|
|
|
|
|
+ <div v-else class="Big-Book-save">
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
@click.stop="editCurQue(topicIitem)"
|
|
@click.stop="editCurQue(topicIitem)"
|
|
|
- >编辑</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ >编辑</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
@@ -299,7 +304,7 @@
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="Book-function" v-if="currentTreeID">
|
|
|
|
|
|
|
+ <div v-if="currentTreeID" class="Book-function">
|
|
|
<ul class="function-list">
|
|
<ul class="function-list">
|
|
|
<li
|
|
<li
|
|
|
v-for="(item, index) in fn_data"
|
|
v-for="(item, index) in fn_data"
|
|
@@ -308,15 +313,14 @@
|
|
|
>
|
|
>
|
|
|
<el-dropdown v-if="item.list">
|
|
<el-dropdown v-if="item.list">
|
|
|
<span class="fn-name">
|
|
<span class="fn-name">
|
|
|
- {{ item.name }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
|
|
+ {{ item.name }}<i class="el-icon-arrow-down el-icon--right" />
|
|
|
</span>
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown" trigger="click">
|
|
<el-dropdown-menu slot="dropdown" trigger="click">
|
|
|
<el-dropdown-item
|
|
<el-dropdown-item
|
|
|
- @click.native="selectSmallModule(item, child, index, i)"
|
|
|
|
|
v-for="(child, i) in item.list"
|
|
v-for="(child, i) in item.list"
|
|
|
:key="i"
|
|
:key="i"
|
|
|
- >{{ child.name }}</el-dropdown-item
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ @click.native="selectSmallModule(item, child, index, i)"
|
|
|
|
|
+ >{{ child.name }}</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
<span v-else class="fn-name">{{ item.name }}</span>
|
|
<span v-else class="fn-name">{{ item.name }}</span>
|
|
@@ -335,7 +339,7 @@
|
|
|
<Preview
|
|
<Preview
|
|
|
:context="context"
|
|
:context="context"
|
|
|
:que-index="queIndex"
|
|
:que-index="queIndex"
|
|
|
- :fatherName="fatherName"
|
|
|
|
|
|
|
+ :father-name="fatherName"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -369,6 +373,8 @@ import Sentence from "@/components/Adult/inputModules/Sentence.vue";
|
|
|
import Sudoku from "@/components/Adult/inputModules/Sudoku.vue";
|
|
import Sudoku from "@/components/Adult/inputModules/Sudoku.vue";
|
|
|
import ToneSelect from "@/components/Adult/inputModules/ToneSelect.vue";
|
|
import ToneSelect from "@/components/Adult/inputModules/ToneSelect.vue";
|
|
|
import NumberCombination from "@/components/Adult/inputModules/NumberCombination.vue";
|
|
import NumberCombination from "@/components/Adult/inputModules/NumberCombination.vue";
|
|
|
|
|
+import DialogueAnswerChs from "@/components/Adult/inputModules/DialogueAnswerChs";
|
|
|
|
|
+import VoiceMatrix from "@/components/Adult/inputModules/VoiceMatrix.vue";
|
|
|
|
|
|
|
|
import Textdes from "@/components/Adult/inputModules/Textdes.vue";
|
|
import Textdes from "@/components/Adult/inputModules/Textdes.vue";
|
|
|
import Record from "@/components/Adult/inputModules/Record.vue";
|
|
import Record from "@/components/Adult/inputModules/Record.vue";
|
|
@@ -436,7 +442,8 @@ export default {
|
|
|
Sudoku,
|
|
Sudoku,
|
|
|
NumberCombination,
|
|
NumberCombination,
|
|
|
ToneSelect,
|
|
ToneSelect,
|
|
|
- DialogueAnswerViewChs,
|
|
|
|
|
|
|
+ DialogueAnswerChs,
|
|
|
|
|
+ VoiceMatrix
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -445,22 +452,22 @@ export default {
|
|
|
bookIndex: "",
|
|
bookIndex: "",
|
|
|
fn_data: [],
|
|
fn_data: [],
|
|
|
fn_type: "",
|
|
fn_type: "",
|
|
|
- cur_fn_data: null, //当前模块的数据结构
|
|
|
|
|
- cur_page_queIsEdit: [], //当前页数的某个题
|
|
|
|
|
|
|
+ cur_fn_data: null, // 当前模块的数据结构
|
|
|
|
|
+ cur_page_queIsEdit: [], // 当前页数的某个题
|
|
|
org_question_list: [
|
|
org_question_list: [
|
|
|
{
|
|
{
|
|
|
name: "tab1",
|
|
name: "tab1",
|
|
|
title: "第1页",
|
|
title: "第1页",
|
|
|
cur_fn_data: [],
|
|
cur_fn_data: [],
|
|
|
},
|
|
},
|
|
|
- ], //总的数据列表
|
|
|
|
|
|
|
+ ], // 总的数据列表
|
|
|
question_list: [
|
|
question_list: [
|
|
|
{
|
|
{
|
|
|
name: "tab1",
|
|
name: "tab1",
|
|
|
title: "第1页",
|
|
title: "第1页",
|
|
|
cur_fn_data: [],
|
|
cur_fn_data: [],
|
|
|
},
|
|
},
|
|
|
- ], //总的数据列表
|
|
|
|
|
|
|
+ ], // 总的数据列表
|
|
|
cur_page_que_index: 0,
|
|
cur_page_que_index: 0,
|
|
|
editableTabsValue: "tab1",
|
|
editableTabsValue: "tab1",
|
|
|
tabIndex: 0,
|
|
tabIndex: 0,
|
|
@@ -468,15 +475,15 @@ export default {
|
|
|
context: [],
|
|
context: [],
|
|
|
queIndex: 0,
|
|
queIndex: 0,
|
|
|
currentTreeID: null,
|
|
currentTreeID: null,
|
|
|
- row: null, //行
|
|
|
|
|
- line: null, //列
|
|
|
|
|
- TopicIndex: null, //第几题的索引
|
|
|
|
|
- RowIndex: null, //第几行
|
|
|
|
|
- LineIndex: null, //第几列
|
|
|
|
|
|
|
+ row: null, // 行
|
|
|
|
|
+ line: null, // 列
|
|
|
|
|
+ TopicIndex: null, // 第几题的索引
|
|
|
|
|
+ RowIndex: null, // 第几行
|
|
|
|
|
+ LineIndex: null, // 第几列
|
|
|
bgControlX: null, // 背景图插入模板的 x
|
|
bgControlX: null, // 背景图插入模板的 x
|
|
|
bgControlY: null, // 背景图插入模板的 y
|
|
bgControlY: null, // 背景图插入模板的 y
|
|
|
- bgControlIndex: null, //插入第几个
|
|
|
|
|
- DeletebgControlIndex: null, //删除第几个
|
|
|
|
|
|
|
+ bgControlIndex: null, // 插入第几个
|
|
|
|
|
+ DeletebgControlIndex: null, // 删除第几个
|
|
|
fatherName: "",
|
|
fatherName: "",
|
|
|
module_type: "",
|
|
module_type: "",
|
|
|
tmInde: "",
|
|
tmInde: "",
|
|
@@ -496,7 +503,28 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
- //方法集合
|
|
|
|
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.fn_data = fn.fnData;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ console.log(this.question_list);
|
|
|
|
|
+ // let question_list_str = localStorage.getItem("question_list");
|
|
|
|
|
+ // if (question_list_str) {
|
|
|
|
|
+ // this.question_list = JSON.parse(question_list_str);
|
|
|
|
|
+ // this.cur_page_que_index =
|
|
|
|
|
+ // this.question_list[this.tabIndex].cur_fn_data.length - 1;
|
|
|
|
|
+ // }
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeCreate() {}, // 生命周期 - 创建之前
|
|
|
|
|
+ beforeMount() {}, // 生命周期 - 挂载之前
|
|
|
|
|
+ beforeUpdate() {}, // 生命周期 - 更新之前
|
|
|
|
|
+ updated() {}, // 生命周期 - 更新之后
|
|
|
|
|
+ beforeDestroy() {}, // 生命周期 - 销毁之前
|
|
|
|
|
+ destroyed() {}, // 生命周期 - 销毁完成
|
|
|
|
|
+ activated() {},
|
|
|
|
|
+ // 方法集合
|
|
|
methods: {
|
|
methods: {
|
|
|
// 随意插入模板获取位置
|
|
// 随意插入模板获取位置
|
|
|
changeSite(x, y) {
|
|
changeSite(x, y) {
|
|
@@ -519,7 +547,7 @@ export default {
|
|
|
let arr = {
|
|
let arr = {
|
|
|
z_title: "",
|
|
z_title: "",
|
|
|
f_title: "",
|
|
f_title: "",
|
|
|
- is_bg: false, //是否有背景色
|
|
|
|
|
|
|
+ is_bg: false, // 是否有背景色
|
|
|
is_layout: false, // 是不是按背景图布局
|
|
is_layout: false, // 是不是按背景图布局
|
|
|
table_list: [],
|
|
table_list: [],
|
|
|
};
|
|
};
|
|
@@ -547,10 +575,10 @@ export default {
|
|
|
this.TopicIndex = topicIndex;
|
|
this.TopicIndex = topicIndex;
|
|
|
this.RowIndex = rowindex;
|
|
this.RowIndex = rowindex;
|
|
|
this.LineIndex = lineIndex;
|
|
this.LineIndex = lineIndex;
|
|
|
- this.question_list.forEach((page) => {
|
|
|
|
|
- page.cur_fn_data.forEach((pic) => {
|
|
|
|
|
- pic.table_list.forEach((row) => {
|
|
|
|
|
- row.forEach((col) => {
|
|
|
|
|
|
|
+ this.question_list.forEach(page => {
|
|
|
|
|
+ page.cur_fn_data.forEach(pic => {
|
|
|
|
|
+ pic.table_list.forEach(row => {
|
|
|
|
|
+ row.forEach(col => {
|
|
|
col.is_add_module = true;
|
|
col.is_add_module = true;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -600,14 +628,14 @@ export default {
|
|
|
};
|
|
};
|
|
|
console.log(this.question_list);
|
|
console.log(this.question_list);
|
|
|
getContent(MethodName, data)
|
|
getContent(MethodName, data)
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.question_list = res.content
|
|
this.question_list = res.content
|
|
|
? JSON.parse(res.content)
|
|
? JSON.parse(res.content)
|
|
|
: JSON.parse(JSON.stringify(this.org_question_list));
|
|
: JSON.parse(JSON.stringify(this.org_question_list));
|
|
|
this.cur_page_que_index =
|
|
this.cur_page_que_index =
|
|
|
this.question_list[this.tabIndex].cur_fn_data.length - 1;
|
|
this.question_list[this.tabIndex].cur_fn_data.length - 1;
|
|
|
})
|
|
})
|
|
|
- .catch((error) => {});
|
|
|
|
|
|
|
+ .catch(error => {});
|
|
|
},
|
|
},
|
|
|
handleTabsEdit(targetName, action) {
|
|
handleTabsEdit(targetName, action) {
|
|
|
if (action === "add") {
|
|
if (action === "add") {
|
|
@@ -633,7 +661,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
this.editableTabsValue = activeName;
|
|
this.editableTabsValue = activeName;
|
|
|
- let question_list = tabs.filter((tab) => tab.name !== targetName);
|
|
|
|
|
|
|
+ let question_list = tabs.filter(tab => tab.name !== targetName);
|
|
|
question_list.map((item, index) => {
|
|
question_list.map((item, index) => {
|
|
|
item.name = `tab${index + 1}`;
|
|
item.name = `tab${index + 1}`;
|
|
|
item.title = `第${index + 1}页`;
|
|
item.title = `第${index + 1}页`;
|
|
@@ -725,20 +753,20 @@ export default {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- //删除某页中一个部分
|
|
|
|
|
|
|
+ // 删除某页中一个部分
|
|
|
deleteCurQue(item, queIndex) {
|
|
deleteCurQue(item, queIndex) {
|
|
|
item.queList.splice(queIndex, 1);
|
|
item.queList.splice(queIndex, 1);
|
|
|
},
|
|
},
|
|
|
saveNewwordAndSentences() {
|
|
saveNewwordAndSentences() {
|
|
|
let question_list = this.question_list;
|
|
let question_list = this.question_list;
|
|
|
- let sentence_list = [],
|
|
|
|
|
- new_word_list = [];
|
|
|
|
|
- question_list.forEach((item) => {
|
|
|
|
|
- item.cur_fn_data.forEach((curItem) => {
|
|
|
|
|
- curItem.table_list.forEach((tabItem) => {
|
|
|
|
|
- tabItem.forEach((topicIitem) => {
|
|
|
|
|
|
|
+ let sentence_list = [];
|
|
|
|
|
+ let new_word_list = [];
|
|
|
|
|
+ question_list.forEach(item => {
|
|
|
|
|
+ item.cur_fn_data.forEach(curItem => {
|
|
|
|
|
+ curItem.table_list.forEach(tabItem => {
|
|
|
|
|
+ tabItem.forEach(topicIitem => {
|
|
|
if (topicIitem.type == "article_chs") {
|
|
if (topicIitem.type == "article_chs") {
|
|
|
- topicIitem.data.detail.forEach((item) => {
|
|
|
|
|
|
|
+ topicIitem.data.detail.forEach(item => {
|
|
|
sentence_list = sentence_list.concat(item.sentences);
|
|
sentence_list = sentence_list.concat(item.sentences);
|
|
|
});
|
|
});
|
|
|
} else if (topicIitem.type == "NewWord_chs") {
|
|
} else if (topicIitem.type == "NewWord_chs") {
|
|
@@ -749,8 +777,8 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
return {
|
|
return {
|
|
|
- new_word_list: new_word_list,
|
|
|
|
|
- sentence_list: sentence_list,
|
|
|
|
|
|
|
+ new_word_list,
|
|
|
|
|
+ sentence_list,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onSave() {
|
|
onSave() {
|
|
@@ -768,10 +796,10 @@ export default {
|
|
|
ui_type: "NPC",
|
|
ui_type: "NPC",
|
|
|
};
|
|
};
|
|
|
getContent(MethodName, data)
|
|
getContent(MethodName, data)
|
|
|
- .then((res) => {
|
|
|
|
|
|
|
+ .then(res => {
|
|
|
this.$message.success("保存成功!");
|
|
this.$message.success("保存成功!");
|
|
|
})
|
|
})
|
|
|
- .catch((error) => {});
|
|
|
|
|
|
|
+ .catch(error => {});
|
|
|
},
|
|
},
|
|
|
async onPreview() {
|
|
async onPreview() {
|
|
|
let _this = this;
|
|
let _this = this;
|
|
@@ -796,7 +824,7 @@ export default {
|
|
|
regConArr = questionStr.match(reg);
|
|
regConArr = questionStr.match(reg);
|
|
|
}
|
|
}
|
|
|
if (regConArr.length > 0) {
|
|
if (regConArr.length > 0) {
|
|
|
- regConArr = regConArr.map((item) => {
|
|
|
|
|
|
|
+ regConArr = regConArr.map(item => {
|
|
|
item = item.replace("[FID##", "").replace("##FID]", "");
|
|
item = item.replace("[FID##", "").replace("##FID]", "");
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|
|
@@ -806,7 +834,7 @@ export default {
|
|
|
const data = {
|
|
const data = {
|
|
|
file_id_list: regConArr,
|
|
file_id_list: regConArr,
|
|
|
};
|
|
};
|
|
|
- getStaticContent(MethodName, data).then((res) => {
|
|
|
|
|
|
|
+ getStaticContent(MethodName, data).then(res => {
|
|
|
const backData = res.url_map;
|
|
const backData = res.url_map;
|
|
|
for (const key in backData) {
|
|
for (const key in backData) {
|
|
|
const url = backData[key];
|
|
const url = backData[key];
|
|
@@ -839,7 +867,7 @@ export default {
|
|
|
// let question_list_str = JSON.stringify(this.question_list);
|
|
// let question_list_str = JSON.stringify(this.question_list);
|
|
|
// localStorage.setItem("question_list", question_list_str);
|
|
// localStorage.setItem("question_list", question_list_str);
|
|
|
},
|
|
},
|
|
|
- //编辑当前题型
|
|
|
|
|
|
|
+ // 编辑当前题型
|
|
|
editCurQue(curItem) {
|
|
editCurQue(curItem) {
|
|
|
curItem.is_edit = true;
|
|
curItem.is_edit = true;
|
|
|
// if (!curItem.isEdit) {
|
|
// if (!curItem.isEdit) {
|
|
@@ -860,28 +888,7 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
},
|
|
},
|
|
|
- },
|
|
|
|
|
- //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
|
- created() {
|
|
|
|
|
- this.fn_data = fn.fnData;
|
|
|
|
|
- },
|
|
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
|
- mounted() {
|
|
|
|
|
- console.log(this.question_list);
|
|
|
|
|
- // let question_list_str = localStorage.getItem("question_list");
|
|
|
|
|
- // if (question_list_str) {
|
|
|
|
|
- // this.question_list = JSON.parse(question_list_str);
|
|
|
|
|
- // this.cur_page_que_index =
|
|
|
|
|
- // this.question_list[this.tabIndex].cur_fn_data.length - 1;
|
|
|
|
|
- // }
|
|
|
|
|
- },
|
|
|
|
|
- beforeCreate() {}, //生命周期 - 创建之前
|
|
|
|
|
- beforeMount() {}, //生命周期 - 挂载之前
|
|
|
|
|
- beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
|
|
- updated() {}, //生命周期 - 更新之后
|
|
|
|
|
- beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
|
|
- destroyed() {}, //生命周期 - 销毁完成
|
|
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
|
|
|
+ }, // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|
|
@@ -1028,4 +1035,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|