Commit 729fa5e6 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/xiangwei/educationstu into master

# Conflicts:
#	src/components/subject/SortingProblem.vue
parents 6083728c e9a49d89
......@@ -36,6 +36,7 @@
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseNum">{{index2+1}}</view>
<view class="chooseName">
<input
type="text"
......@@ -172,13 +173,8 @@ export default {
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
margin-right: 25rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
......
......@@ -33,6 +33,7 @@
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseNum">{{index2+1}}</view>
<view class="chooseName">
<input
type="text"
......@@ -178,13 +179,8 @@ export default {
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
margin-right: 25rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
......
......@@ -27,8 +27,9 @@
:key="index2"
class="flex item2 flex_start_center"
>
<view class="chooseNum">{{index2+1}}</view>
<view class="chooseName">
<input type="text" v-model="item2.Content" class="input" />
<input type="text" v-model="item2.Content" :placeholder="'请填写第 '+(index2+1)+' 空答案'" class="input" />
</view>
</view>
</view>
......@@ -152,13 +153,10 @@ export default {
}
.chooseNum {
width: 40rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
border-radius: 50%;
border: 1px solid #e2e2e2;
margin-right: 30rpx;
margin-right: 25rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: bold;
......
......@@ -120,8 +120,6 @@
this.$forceUpdate();
},
onSelect(e,item3){
console.log(e,'e');
console.log(item3,'item3');
item3.isShow = false;
item3.Name = e.detail.name;
},
......
......@@ -31,16 +31,52 @@
<view>{{ index1 + 1 }}</view>
<view class="num" v-html="item1.Title"></view>
</view>
<view class="chooseName">
<textarea
type="text"
v-model="item1.myAnswer"
class="input textarea"
placeholder="请填写答案"
placeholder-style="textarea-placeholder"
:maxlength="-1"
/>
</view>
<template
v-if="
item1.QuestionContentObj[0] &&
item1.QuestionContentObj[0].length > 0
"
>
<view
v-for="(item2, index2) in item1.QuestionContentObj[0]"
:key="index2"
>
<view class="flex item2 flex_start_center">
<view class="num">{{ item2.Name }}</view>
<view
style="margin-left: 5px"
class="chooseName"
v-html="item2.Content"
></view>
</view>
</view>
</template>
<template
v-if="
item1.QuestionContentObj[1] &&
item1.QuestionContentObj[1].length > 0
"
>
<view
v-for="(item3, index3) in item1.QuestionContentObj[1]"
:key="index3"
style="margin-bottom: 20px"
>
<van-button
type="primary"
size="small"
@click="alertMenu(item3)"
>
{{ item3.Name == "" ? "请选择" : item3.Name }}
</van-button>
<van-action-sheet
:show="item3.isShow"
@click-overlay="hideVan(item3)"
:actions="getSelect(item1.QuestionContentObj[0])"
@select="onSelect($event, item3)"
/>
</view>
</template>
</view>
</swiper-item>
<swiper-item v-if="sortIndex != sortTotal"></swiper-item>
......@@ -72,9 +108,13 @@ export default {
},
setup(props, context) {
let { ctx } = getCurrentInstance();
props.paperData.DetailsList.forEach((item, index) => {
item.myAnswer = "";
});
if (props.paperData.DetailsList && props.paperData.DetailsList.length > 0) {
props.paperData.DetailsList[0].QuestionContentObj[1].forEach(
(item, index) => {
item.isShow = false;
}
);
}
let data = reactive({
data: props.paperData,
autoplay: false,
......@@ -107,6 +147,32 @@ export default {
this.$emit("getBeforeTopic");
}
},
alertMenu(item) {
item.isShow = true;
this.$forceUpdate();
console.log(item, "item");
},
//点击背景隐藏
hideVan(item) {
item.isShow = false;
this.$forceUpdate();
},
onSelect(e, item3) {
item3.isShow = false;
item3.Name = e.detail.name;
},
getSelect(item) {
let Array = [];
if (item && item.length > 0) {
item.forEach((x) => {
let obj = {
name: x.Name,
};
Array.push(obj);
});
}
return Array;
},
};
onMounted(() => {
if (props.isLast) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment