|
@@ -52,18 +52,32 @@
|
|
|
:key="'col' + colIndex"
|
|
|
>
|
|
|
<div class="td">
|
|
|
- <span v-if="curQue.Isnumber">1</span>
|
|
|
- <div>
|
|
|
- <!-- <p
|
|
|
+ <span v-if="curQue.Isnumber">{{ col.number }}</span>
|
|
|
+ <div class="content">
|
|
|
+ <div
|
|
|
+ style="display: flex"
|
|
|
v-for="(item, i) in col.list"
|
|
|
- :key="'input' + i"
|
|
|
- ></p> -->
|
|
|
+ :key="'cont' + i"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(text, txIndex) in item.conList"
|
|
|
+ :key="'text' + txIndex"
|
|
|
+ style="display: flex"
|
|
|
+ >
|
|
|
+ <div v-if="text != '_'">
|
|
|
+ {{ text }}
|
|
|
+ </div>
|
|
|
+ <span v-else>
|
|
|
+ {{ text }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <img
|
|
|
+ v-if="curQue.IsRecord"
|
|
|
+ src="../../../assets/adult/mini.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <img
|
|
|
- v-if="curQue.IsRecord"
|
|
|
- src="../../../assets/adult/mini.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
</div>
|
|
|
<p>
|
|
|
<span @click="edit(col, rowIndex, colIndex)"> 编辑 </span>
|
|
@@ -75,7 +89,7 @@
|
|
|
<el-dialog
|
|
|
title="提示"
|
|
|
:visible.sync="dialogVisible"
|
|
|
- width="50%"
|
|
|
+ width="80%"
|
|
|
:before-close="handleClose"
|
|
|
>
|
|
|
<div class="Module" v-if="dialogData">
|
|
@@ -85,75 +99,118 @@
|
|
|
<el-radio label="拼音+中文">拼音+中文</el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
- <div v-for="(item, index) in dialogData.list" :key="'h' + index">
|
|
|
- <div class="adult-book-input-item">
|
|
|
- <span class="adult-book-lable">内容:</span>
|
|
|
- <el-input
|
|
|
- class="adult-book-input"
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 2 }"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="item.con"
|
|
|
- @blur="onBlur(item, 'con')"
|
|
|
- @change="changecon(item.con)"
|
|
|
- ></el-input>
|
|
|
- <img
|
|
|
- @click="deleterow(index)"
|
|
|
- class="close"
|
|
|
- src="../../../assets/adult/del-close.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="adult-book-input-item"
|
|
|
- v-if="dialogData.type == '拼音+中文'"
|
|
|
- >
|
|
|
- <span class="adult-book-lable">拼音:</span>
|
|
|
- <el-input
|
|
|
- class="adult-book-input"
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 2 }"
|
|
|
- placeholder="请输入拼音"
|
|
|
- v-model="item.pinyin"
|
|
|
- @blur="onBlur(item, 'pinyin')"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="adult-book-input-item"
|
|
|
- v-if="dialogData.type == '拼音+中文'"
|
|
|
- >
|
|
|
- <span class="adult-book-lable">拼音位置:</span>
|
|
|
- <el-radio-group v-model="dialogData.pinyinSite">
|
|
|
- <el-radio label="top">上</el-radio>
|
|
|
- <el-radio label="bottom">下</el-radio>
|
|
|
- <el-radio label="left">左</el-radio>
|
|
|
- <el-radio label="right">右</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ <div class="Modulemain">
|
|
|
+ <div>
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">内容:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="dialogData.leftCon"
|
|
|
+ @blur="onBlur(dialogData, 'leftCon')"
|
|
|
+ @change="changecon(dialogData)"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="adult-book-input-item"
|
|
|
+ v-if="dialogData.type == '拼音+中文'"
|
|
|
+ >
|
|
|
+ <span class="adult-book-lable">拼音:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入拼音"
|
|
|
+ v-model="dialogData.leftPinyin"
|
|
|
+ @blur="onBlur(dialogData, 'leftPinyin')"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="adult-book-input-item"
|
|
|
- v-for="(answ, anIndex) in item.answer"
|
|
|
- :key="'anw' + anIndex"
|
|
|
- >
|
|
|
- <span class="adult-book-lable">答案:</span>
|
|
|
- <el-input
|
|
|
- class="adult-book-input"
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 2 }"
|
|
|
- placeholder="请输入答案"
|
|
|
- v-model="answ.con"
|
|
|
- @blur="onBlur(answ, 'con')"
|
|
|
- ></el-input>
|
|
|
- <img
|
|
|
- @click="deleteAnswer(index, anIndex)"
|
|
|
- class="close"
|
|
|
- src="../../../assets/adult/del-close.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <div>
|
|
|
+ <div class="adult-book-input-item" v-if="curQue.Isnumber">
|
|
|
+ <span class="adult-book-lable">序号:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入标题"
|
|
|
+ v-model="dialogData.number"
|
|
|
+ @blur="onBlur(dialogData, 'number')"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-for="(item, index) in dialogData.list" :key="'h' + index">
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">内容:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="item.con"
|
|
|
+ @blur="onBlur(item, 'con')"
|
|
|
+ @change="changecon(item)"
|
|
|
+ ></el-input>
|
|
|
+ <img
|
|
|
+ @click="deleterow(index)"
|
|
|
+ class="close"
|
|
|
+ src="../../../assets/adult/del-close.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="adult-book-input-item"
|
|
|
+ v-if="dialogData.type == '拼音+中文'"
|
|
|
+ >
|
|
|
+ <span class="adult-book-lable">拼音:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入拼音"
|
|
|
+ v-model="item.pinyin"
|
|
|
+ @blur="onBlur(item, 'pinyin')"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="adult-book-input-item"
|
|
|
+ v-if="dialogData.type == '拼音+中文'"
|
|
|
+ >
|
|
|
+ <span class="adult-book-lable">拼音位置:</span>
|
|
|
+ <el-radio-group v-model="item.pinyinSite">
|
|
|
+ <el-radio label="top">上</el-radio>
|
|
|
+ <el-radio label="bottom">下</el-radio>
|
|
|
+ <el-radio label="left">左</el-radio>
|
|
|
+ <el-radio label="right">右</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="adult-book-input-item"
|
|
|
+ v-for="(answ, anIndex) in item.answer"
|
|
|
+ :key="'anw' + anIndex"
|
|
|
+ >
|
|
|
+ <span class="adult-book-lable">答案:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 2 }"
|
|
|
+ placeholder="请输入答案"
|
|
|
+ v-model="answ.con"
|
|
|
+ @blur="onBlur(answ, 'con')"
|
|
|
+ ></el-input>
|
|
|
+ <img
|
|
|
+ @click="deleteAnswer(index, anIndex)"
|
|
|
+ class="close"
|
|
|
+ src="../../../assets/adult/del-close.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="addoption" @click="addAnswer(index)">增加答案</div>
|
|
|
+ </div>
|
|
|
+ <div class="addoption" @click="addrowCol">增加</div>
|
|
|
</div>
|
|
|
- <div class="addoption" @click="addAnswer(index)">增加答案</div>
|
|
|
</div>
|
|
|
- <div class="addoption" @click="addrowCol">增加</div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
@@ -199,8 +256,11 @@ export default {
|
|
|
[
|
|
|
{
|
|
|
type: "英文", //英文还是拼音+中文
|
|
|
+ number: "",
|
|
|
list: [
|
|
|
{
|
|
|
+ leftCon: "",
|
|
|
+ leftPinyin: "",
|
|
|
con: "",
|
|
|
pinyin: "",
|
|
|
pinyinSite: "", //拼音的位置
|
|
@@ -249,8 +309,7 @@ export default {
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
changecon(value) {
|
|
|
- console.log(value);
|
|
|
- console.log(value.split(""));
|
|
|
+ value.conList = value.con.split("");
|
|
|
},
|
|
|
// 增加答案
|
|
|
addAnswer(index) {
|
|
@@ -553,7 +612,6 @@ export default {
|
|
|
margin: 0 4px;
|
|
|
.td {
|
|
|
width: 100%;
|
|
|
- display: flex;
|
|
|
background: #ffffff;
|
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
box-sizing: border-box;
|
|
@@ -561,10 +619,13 @@ export default {
|
|
|
min-height: 48px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- padding: 0 12px;
|
|
|
+ padding: 8px 12px;
|
|
|
> div {
|
|
|
margin: 0 8px;
|
|
|
flex: 1;
|
|
|
+ > :nth-child(1) {
|
|
|
+ margin-bottom: 8px;
|
|
|
+ }
|
|
|
}
|
|
|
> span {
|
|
|
display: inline-block;
|
|
@@ -588,6 +649,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .Module {
|
|
|
+ .Modulemain {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|