|
@@ -1,60 +1,31 @@
|
|
|
<template>
|
|
|
<div class="main_right_height">
|
|
|
- <el-row>
|
|
|
- <el-col :span="1"> </el-col>
|
|
|
- <el-col :span="22">
|
|
|
- <div style="display: flex">
|
|
|
- <i
|
|
|
- class="el-icon-arrow-left"
|
|
|
- style="cursor: pointer; line-height: 1.5"
|
|
|
- @click="goBack()"
|
|
|
- ></i>
|
|
|
- <span class="musicTitle">量表详情</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-divider></el-divider>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1"> </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="1"> </el-col>
|
|
|
- <el-col :span="22" class="scala_pro">
|
|
|
- <el-progress
|
|
|
- class="main_progress"
|
|
|
- :text-inside="true"
|
|
|
- :stroke-width="16"
|
|
|
- :color="color_p"
|
|
|
- :percentage="setItemProgress(scale_index, scale_all)"
|
|
|
- v-if="!isNaN(parseInt((scale_index / scale_all) * 100))"
|
|
|
- :format="setItemText(scale_index, scale_all)"
|
|
|
- ></el-progress
|
|
|
- ></el-col>
|
|
|
- <el-col :span="1"> </el-col>
|
|
|
- </el-row>
|
|
|
+ <TopDes :flag="true" topDesFont="量表详情"></TopDes>
|
|
|
<el-row>
|
|
|
<el-col :span="1"> </el-col>
|
|
|
<el-col :span="22" style="margin-top: 10px">
|
|
|
- <span
|
|
|
- style="
|
|
|
- width: 338px;
|
|
|
- height: 28px;
|
|
|
- font-size: 20px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 600;
|
|
|
- line-height: 28px;
|
|
|
- color: #101010;
|
|
|
- opacity: 1;
|
|
|
- "
|
|
|
- >{{ scale_index + 1 }}.{{ scale_infos[scale_index].answer }}</span
|
|
|
- >
|
|
|
-
|
|
|
+ <p class="question_index">
|
|
|
+ {{ scale_index + 1 }}/{{ scale_infos.length }}
|
|
|
+ </p>
|
|
|
+ <p class="question_desc">
|
|
|
+ {{ scale_index + 1 }}.{{ scale_infos[scale_index].answer }}
|
|
|
+ </p>
|
|
|
<!-- 单选题答案区域 -->
|
|
|
<div
|
|
|
class="answer"
|
|
|
v-if="this.scale_infos[scale_index].questionType == '0'"
|
|
|
>
|
|
|
- <div>
|
|
|
- <el-radio
|
|
|
+ <div class="answer_list">
|
|
|
+ <div
|
|
|
+ class="answer_item"
|
|
|
+ v-for="(item, index) in scale_checkItems"
|
|
|
+ :key="index"
|
|
|
+ @click="choiceTriger(item, index)"
|
|
|
+ :class="{'active': item.index === activeIndex}"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </div>
|
|
|
+ <!-- <el-radio
|
|
|
class="scala_detail_radio"
|
|
|
style="
|
|
|
height: 50px;
|
|
@@ -72,19 +43,12 @@
|
|
|
@change="choiceTriger(item)"
|
|
|
border
|
|
|
><p class="radioSpan">{{ item }}</p></el-radio
|
|
|
- >
|
|
|
+ > -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--3数字答案类型区域-->
|
|
|
<div class="answer" v-if="scale_infos[scale_index].questionType == '3'">
|
|
|
<el-slider v-model="radio" style="width:'300px"></el-slider>
|
|
|
- <!-- <el-input
|
|
|
- v-model="radio"
|
|
|
- min=0
|
|
|
- max="100"
|
|
|
- type="number"
|
|
|
- placeholder="请输入数字"
|
|
|
- ></el-input> -->
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="1"> </el-col>
|
|
@@ -150,6 +114,7 @@ export default {
|
|
|
next_and_last_button: true,
|
|
|
pointColor: "", // 仪表盘指针颜色
|
|
|
suggestion: "",
|
|
|
+ activeIndex: undefined
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -188,7 +153,8 @@ export default {
|
|
|
return currentIndex + 1 + "/" + totalIndex;
|
|
|
};
|
|
|
},
|
|
|
- choiceTriger(item) {
|
|
|
+ choiceTriger(item, index) {
|
|
|
+ this.activeIndex = index;
|
|
|
let that = this;
|
|
|
that.radioChange(item);
|
|
|
},
|
|
@@ -225,7 +191,7 @@ export default {
|
|
|
scaleInfoTemp.fillBlank = this.fillBlank;
|
|
|
scaleInfoTemp.checkbox = this.checkbox;
|
|
|
this.radio = "";
|
|
|
- console.log(scaleInfoTemp.questionType)
|
|
|
+ console.log(scaleInfoTemp.questionType);
|
|
|
if (scaleInfoTemp.questionType === "3") {
|
|
|
this.radio = 0;
|
|
|
}
|
|
@@ -382,44 +348,43 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-
|
|
|
-.answer>>> .el-slider__bar {
|
|
|
- height: 20px;
|
|
|
- background-color: #409EFF;
|
|
|
- border-top-left-radius: 3px;
|
|
|
- border-bottom-left-radius: 3px;
|
|
|
- position: absolute;
|
|
|
+.answer >>> .el-slider__bar {
|
|
|
+ height: 20px;
|
|
|
+ background-color: #409eff;
|
|
|
+ border-top-left-radius: 3px;
|
|
|
+ border-bottom-left-radius: 3px;
|
|
|
+ position: absolute;
|
|
|
}
|
|
|
-.answer>>>.el-slider__button-wrapper {
|
|
|
- height: 36px;
|
|
|
- width: 36px;
|
|
|
- z-index: 1001;
|
|
|
- top: -8px;
|
|
|
- transform: translateX(-50%);
|
|
|
- background-color: transparent;
|
|
|
- text-align: center;
|
|
|
- user-select: none;
|
|
|
- line-height: normal;
|
|
|
+.answer >>> .el-slider__button-wrapper {
|
|
|
+ height: 36px;
|
|
|
+ width: 36px;
|
|
|
+ z-index: 1001;
|
|
|
+ top: -8px;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ background-color: transparent;
|
|
|
+ text-align: center;
|
|
|
+ user-select: none;
|
|
|
+ line-height: normal;
|
|
|
}
|
|
|
- .answer>>>.el-slider__button {
|
|
|
- width: 25px;
|
|
|
- height: 25px;
|
|
|
- border: 2px solid #409EFF;
|
|
|
- background-color: #FFF;
|
|
|
- border-radius: 50%;
|
|
|
- -webkit-transition: .2s;
|
|
|
- transition: .2s;
|
|
|
- user-select: none;
|
|
|
+.answer >>> .el-slider__button {
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ border: 2px solid #409eff;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 50%;
|
|
|
+ -webkit-transition: 0.2s;
|
|
|
+ transition: 0.2s;
|
|
|
+ user-select: none;
|
|
|
}
|
|
|
-.answer>>>.el-slider__runway {
|
|
|
- width: 100%;
|
|
|
- height: 20px;
|
|
|
- margin: 16px 0;
|
|
|
- background-color: #E4E7ED;
|
|
|
- border-radius: 3px;
|
|
|
- position: relative;
|
|
|
- cursor: pointer;
|
|
|
- vertical-align: middle;
|
|
|
+.answer >>> .el-slider__runway {
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ margin: 16px 0;
|
|
|
+ background-color: #e4e7ed;
|
|
|
+ border-radius: 3px;
|
|
|
+ position: relative;
|
|
|
+ cursor: pointer;
|
|
|
+ vertical-align: middle;
|
|
|
}
|
|
|
.scala_detail_radio {
|
|
|
width: 100%;
|
|
@@ -475,10 +440,38 @@ p.radioSpan {
|
|
|
height: 40px;
|
|
|
}
|
|
|
.main_right_height {
|
|
|
- height: 95vh !important;
|
|
|
+ height: 100vh !important;
|
|
|
display: block !important;
|
|
|
overflow-y: auto !important;
|
|
|
+ background: #ffffff;
|
|
|
}
|
|
|
|
|
|
+.answer_list {
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+
|
|
|
+.answer_item {
|
|
|
+ width: 20.34vw;
|
|
|
+ line-height: 5.92vh;
|
|
|
+ background: #e0f8ef;
|
|
|
+ border-radius: 60px 60px 60px 60px;
|
|
|
+ opacity: 1;
|
|
|
+ padding-left: 2vw;
|
|
|
+ margin: 0 auto 3.05vh;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
|
|
|
+.answer_item.active {
|
|
|
+ background: #0fb577;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+.question_desc {
|
|
|
+ font-size: 28px;
|
|
|
+ font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #0f0f0f;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
</style>
|