素质测评,生涯规划,个人档案,职业库功能完成
This commit is contained in:
511
packageCa/pagesTest/customTestTitle.vue
Normal file
511
packageCa/pagesTest/customTestTitle.vue
Normal file
@@ -0,0 +1,511 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" v-if="taskId ==0" @click="goback"></view>
|
||||
<text v-if="testTitle != ''">{{testTitle}}</text>
|
||||
</view>
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
第{{pageIndex+1}}题
|
||||
</view>
|
||||
<view class="all-title">
|
||||
共{{allNum}}道题
|
||||
</view>
|
||||
<view class="time" v-if="doTime >0">
|
||||
约{{doTime}}分钟
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar">
|
||||
<view class="bar-inner" :style="{width: rate + '%'}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
|
||||
<view class="title">{{ item.TitleName }}</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="label" v-if="item.OptionsA != null && item.OptionsA.trim() != ''"
|
||||
:class="item.Value === 1 ? 'sel' : ''" @click="checkedTitle(1,index)">{{item.OptionsA}}</view>
|
||||
<view class="label" v-if="item.OptionsB != null && item.OptionsB.trim() != ''"
|
||||
:class="item.Value === 2 ? 'sel' : ''" @click="checkedTitle(2,index)">{{item.OptionsB}}</view>
|
||||
<view class="label" v-if="item.OptionsC != null && item.OptionsC.trim() != ''"
|
||||
:class="item.Value === 3 ? 'sel' : ''" @click="checkedTitle(3,index)">{{item.OptionsC}}</view>
|
||||
<view class="label" v-if="item.OptionsD != null && item.OptionsD.trim() != ''"
|
||||
:class="item.Value === 4 ? 'sel' : ''" @click="checkedTitle(4,index)">{{item.OptionsD}}</view>
|
||||
<view class="label" v-if="item.OptionsE != null && item.OptionsE.trim() != ''"
|
||||
:class="item.Value === 5 ? 'sel' : ''" @click="checkedTitle(5,index)">{{item.OptionsE}}</view>
|
||||
<view class="label" v-if="item.OptionsF != null && item.OptionsF.trim() != ''"
|
||||
:class="item.Value === 6 ? 'sel' : ''" @click="checkedTitle(6,index)">{{item.OptionsF}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="pre-btn" @click="prePage">上一题</view>
|
||||
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评"
|
||||
:showCancelButton="true">
|
||||
<view class="slot-content">
|
||||
<view class="tip-layer">
|
||||
<view class="title">提示</view>
|
||||
<view class="desc">确认要放弃测评吗?</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "@/apiCa/testManage.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
list: [],
|
||||
allNum: 0, //总题目数
|
||||
pageIndex: 0, //显示页
|
||||
showBakcTip: false,
|
||||
lastTapTime: 0, // 记录上次点击的时间
|
||||
testType: -27,
|
||||
taskId: 0,
|
||||
testTitle: "自定义测评",
|
||||
doTime: 2,
|
||||
|
||||
historyTitle: [],// 历史题目
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rate: function() {
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value !== '') {
|
||||
num++
|
||||
}
|
||||
});
|
||||
return Math.round(num * 100 / this.allNum)
|
||||
},
|
||||
commit: function() {
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value !== '') {
|
||||
num++
|
||||
}
|
||||
});
|
||||
if (num == this.list.length) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.testType = e.testType;
|
||||
if (e.taskId > 0) {
|
||||
this.taskId = e.taskId
|
||||
}
|
||||
this.computeTitle(this.testType);
|
||||
this.getHistoryTitle();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
goback() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认要放弃测评吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认',
|
||||
confirmColor: '#1677ff',
|
||||
cancelColor: '#999999',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack(-1);
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
}
|
||||
});
|
||||
//uni.navigateBack(-1);
|
||||
},
|
||||
computeTitle(testType) {
|
||||
switch (parseInt(testType) ) {
|
||||
case -27: {
|
||||
// 多元能力
|
||||
this.doTime = 25;
|
||||
this.testTitle = "多元(职业)能力测评";
|
||||
break;
|
||||
}
|
||||
case -28: {
|
||||
// 通用职业
|
||||
this.doTime = 8;
|
||||
this.testTitle = "通用(职业)能力测评";
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取答题记录
|
||||
getHistoryTitle(){
|
||||
api.getTestRecordProcessList(this.testType).then(res => {
|
||||
if (res.Result === 1) {
|
||||
let data = res.Data;
|
||||
this.historyTitle = data;
|
||||
this.getTitle();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取题目
|
||||
getTitle() {
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
})
|
||||
api.queryTestContent(this.testType).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
let list = res.Data.List.Item1;
|
||||
list.forEach(item => {
|
||||
item.Value = "";
|
||||
this.historyTitle.forEach(ritem=>{
|
||||
if(item.Id == ritem.TestTitleId){
|
||||
switch (ritem.TestResult) {
|
||||
case "A": {
|
||||
item.Value = 1;
|
||||
break;
|
||||
}
|
||||
case "B": {
|
||||
item.Value = 2;
|
||||
break;
|
||||
}
|
||||
case "C": {
|
||||
item.Value = 3;
|
||||
break;
|
||||
}
|
||||
case "D": {
|
||||
item.Value = 4;
|
||||
break;
|
||||
}
|
||||
case "E": {
|
||||
item.Value = 5;
|
||||
break;
|
||||
}
|
||||
case "F": {
|
||||
item.Value = 6;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
if(this.historyTitle.length == 0){
|
||||
this.pageIndex = 0;
|
||||
}else if(this.historyTitle.length == list.length){
|
||||
this.pageIndex = list.length - 1;
|
||||
}else {
|
||||
this.pageIndex = this.historyTitle.length;
|
||||
}
|
||||
|
||||
this.allNum = list.length;
|
||||
this.list = list;
|
||||
this.testTitle = res.Data.List.Item2;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 上一页
|
||||
prePage() {
|
||||
if (this.pageIndex == 0) {
|
||||
return
|
||||
}
|
||||
this.pageIndex--
|
||||
},
|
||||
//选中题目
|
||||
checkedTitle(NUM, INDEX) {
|
||||
const now = Date.now();
|
||||
if (now - this.lastTapTime < 500) {
|
||||
console.log('双击事件被阻止');
|
||||
return;
|
||||
} else {
|
||||
// 处理单击事件
|
||||
console.log('单击事件被触发');
|
||||
this.lastTapTime = now;
|
||||
this.list[INDEX].Value = NUM;
|
||||
this.saveTestRecordProcess(this.list[INDEX].Id,NUM);
|
||||
setTimeout(() => {
|
||||
if (this.pageIndex != this.list.length - 1) {
|
||||
this.pageIndex = INDEX + 1;
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
},
|
||||
//存储答题记录
|
||||
saveTestRecordProcess(ID,VALUE){
|
||||
let val = ""
|
||||
switch (VALUE) {
|
||||
case 1: {
|
||||
val = "A";
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
val = "B";
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
val = "C";
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
val = "D";
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
val = "E";
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
val = "F";
|
||||
break;
|
||||
}
|
||||
}
|
||||
let data = {
|
||||
testType: this.testType,
|
||||
testTitleId: ID,
|
||||
testResult: val
|
||||
}
|
||||
api.saveTestRecordProcess(data).then(res => {
|
||||
if (res.Result === 1) {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交题目
|
||||
submitTitle() {
|
||||
let testStr = "";
|
||||
this.list.forEach(item => {
|
||||
switch (item.Value) {
|
||||
case 1: {
|
||||
testStr += `${item.Id}|A,`
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
testStr += `${item.Id}|B,`
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
testStr += `${item.Id}|C,`
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
testStr += `${item.Id}|D,`
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
testStr += `${item.Id}|E,`
|
||||
break;
|
||||
}
|
||||
case 6: {
|
||||
testStr += `${item.Id}|F,`
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uni.showLoading({
|
||||
title: "提交中"
|
||||
})
|
||||
let data = {
|
||||
testType: this.testType,
|
||||
taskId: this.taskId,
|
||||
testStr
|
||||
}
|
||||
api.removeTestRecordProcess(this.testType).then((res) => {
|
||||
return api.saveCustomTestResult(data);
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
})
|
||||
let pages = getCurrentPages(); // 当前页面
|
||||
let beforePage = pages[pages.length - 2]; // 上一页
|
||||
if (beforePage != undefined) {
|
||||
beforePage.data.refreshIfNeeded = true;
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (this.testType == -27) {
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/multipleAbilityTestReport?id=${res.Data.TestId}`
|
||||
})
|
||||
} else if (this.testType == -28) {
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/generalCareerTestReport?id=${res.Data.TestId}`
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.Message,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tip-layer {
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.head-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.go-back {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.title-wrap {
|
||||
background: #fff;
|
||||
|
||||
.progress-block {
|
||||
padding: 0 40rpx;
|
||||
|
||||
.row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.title-index {
|
||||
font-size: 32rpx;
|
||||
color: #1677ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.all-title {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 28rpx;
|
||||
color: #20B664;
|
||||
}
|
||||
}
|
||||
|
||||
.bar {
|
||||
position: relative;
|
||||
width: 670rpx;
|
||||
height: 8rpx;
|
||||
background: #EBEBEB;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
|
||||
.bar-inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 8rpx;
|
||||
background: #1677ff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 40rpx;
|
||||
|
||||
.item {
|
||||
padding-top: 40rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.sel-label-block {
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 630rpx;
|
||||
height: 96rpx;
|
||||
padding-left: 40rpx;
|
||||
background: #F5F5F5;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
|
||||
&.sel {
|
||||
background: #EDF6FF;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 50rpx;
|
||||
|
||||
.pre-btn {
|
||||
width: 316rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
background: #F8F8F8;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
border: 2rpx solid #EAEAEA;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.com-btn {
|
||||
width: 320rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #1677ff;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
503
packageCa/pagesTest/interestTestTitle.vue
Normal file
503
packageCa/pagesTest/interestTestTitle.vue
Normal file
@@ -0,0 +1,503 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>职业兴趣测评</text>
|
||||
</view>
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
第{{pageIndex+1}}题
|
||||
</view>
|
||||
<view class="all-title">
|
||||
共{{allNum}}道题
|
||||
</view>
|
||||
<view class="time">
|
||||
约25分钟
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar">
|
||||
<view class="bar-inner" :style="{width: rate + '%'}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
|
||||
<view class="title">{{ item.Title }}</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常喜欢</view>
|
||||
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">喜欢</view>
|
||||
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">不喜欢</view>
|
||||
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">非常不喜欢</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-show="pageIndex == 180">
|
||||
<view class="title">只能选一种[自我介绍]代表你自己,你最想选哪一种?</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="long-label" :class="item.Value === firstDescVal ? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(1,item,index)">{{item.Title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-show="pageIndex == 181">
|
||||
<view class="title">让您再选一种[自我介绍]代表你自己,你会选哪一种?</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="long-label" v-show="item.Value != firstDescVal" :class="item.Value === secondDescVal ? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(2,item,index)">{{item.Title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-show="pageIndex == 182">
|
||||
<view class="title">如果能有选择第三种,你会选哪一种?</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="long-label" v-show="item.Value !== firstDescVal && item.Value !== secondDescVal" :class="item.Value === thirdDescVal? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(3,item,index)">{{item.Title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="pre-btn" @click="prePage">上一题</view>
|
||||
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
|
||||
<view class="slot-content">
|
||||
<view class="tip-layer">
|
||||
<view class="title">提示</view>
|
||||
<view class="desc">确认要放弃测评吗?</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal> -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import api from "@/apiCa/testManage.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
list: [],
|
||||
allNum: 0,//总题目数
|
||||
pageIndex: 0, //显示页
|
||||
showBakcTip: false,
|
||||
lastTapTime: 0 ,// 记录上次点击的时间
|
||||
|
||||
checkTitleList: [{
|
||||
Title: "我有操作机械的能力,倾向自己独立完成工作,避免做些常常与人沟通的事。爱动手操弄,喜欢做和机械、工具、电器、户外有关的工作。我认为自己是勤奋的技术家,期望从事机械、电子、土木建筑、工程技术等工作。",
|
||||
Checked: false,
|
||||
Value: 0
|
||||
},
|
||||
{
|
||||
Title: "我有分析推理的能力,倾向自己思考解决问题,胜过在商场或政界发展。喜欢观察、分析、探究和研发的工作,我认为自己是客观的科学家,期望从事物理、生物、化学、医药、数学、地科等相关工作。",
|
||||
Checked: false,
|
||||
Value: 1
|
||||
},
|
||||
{
|
||||
Title: "我乐于助人、善解人意并具洞察力,倾向与人接触胜过操作机械仪器,喜欢协助他人增进知识与技能、健全身心健康与信念。我认为自己是教育或心理学家,期望从事教师、咨商辅导、社会救助、健康照护等相关工作。",
|
||||
Checked: false,
|
||||
Value: 2
|
||||
},
|
||||
{
|
||||
Title: "我有敏捷文书整理或计算能力,倾向在有清楚规范的环境下工作,胜过创作或研究工作,喜欢有条理的将文书、数字与物品归类管理。我认为自己是谨慎的事务家。期望从事财务、金融、会计、物流管理等工作。",
|
||||
Checked: false,
|
||||
Value: 3
|
||||
},
|
||||
{
|
||||
Title: "我有艺术创作的能力,倾向运用想象力,胜过快速计算或物品归类。喜欢藉文字、声音、色彩或形式来表达美感创作。我认为自己是表现美的艺术家,期望从事音乐、写作、戏剧、绘画、设计、舞蹈等工作。",
|
||||
Checked: false,
|
||||
Value: 4
|
||||
},
|
||||
{
|
||||
Title: "我有领导、说服他人的能力,倾向在法政与商界工作,胜过基础科学研究。喜欢影响他人,获取相当的报酬。我认为自己是有自信的事业家,期望未来从事管理、销售、司法、从政等工作。",
|
||||
Checked: false,
|
||||
Value: 5
|
||||
}
|
||||
],
|
||||
firstDescVal: "", //第一种
|
||||
secondDescVal: "",//第二种
|
||||
thirdDescVal: "", //第三种
|
||||
|
||||
historyTitle: [],// 历史题目
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rate: function() {
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
if(this.firstDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
if(this.secondDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
if(this.thirdDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
return Math.round(num * 100 / this.allNum)
|
||||
},
|
||||
commit: function(){
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
if(this.firstDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
if(this.secondDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
if(this.thirdDescVal !== ''){
|
||||
num++
|
||||
}
|
||||
console.log(num);
|
||||
if(num == this.allNum){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getHistoryTitle();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
goback(){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认要放弃测评吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认',
|
||||
confirmColor: '#1677ff',
|
||||
cancelColor: '#999999',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack(-1);
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
}
|
||||
});
|
||||
//uni.navigateBack(-1);
|
||||
},
|
||||
//获取答题记录
|
||||
getHistoryTitle(){
|
||||
api.getTestRecordProcessList(11).then(res => {
|
||||
if (res.Result === 1) {
|
||||
let data = res.Data;
|
||||
this.historyTitle = data;
|
||||
this.getTitle();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取题目
|
||||
getTitle() {
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
})
|
||||
api.queryTestContent(11).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
let list = res.Data;
|
||||
list.forEach(item => {
|
||||
item.Value = 0
|
||||
this.historyTitle.forEach(ritem=>{
|
||||
if(item.Id == ritem.TestTitleId){
|
||||
item.Value = Number(ritem.TestResult);
|
||||
}
|
||||
})
|
||||
})
|
||||
if(this.historyTitle.length > 180){
|
||||
let len = this.historyTitle.length - 180;
|
||||
for(let i = 0; i < len; i++){
|
||||
this.checkTitleList[i].Value = this.historyTitle[i + 180];
|
||||
this.checkTitleList[i].Checked = true;
|
||||
}
|
||||
}
|
||||
if(this.historyTitle.length == 0){
|
||||
this.pageIndex = 0;
|
||||
}else if(this.historyTitle.length == list.length){
|
||||
this.pageIndex = list.length - 1;
|
||||
}else {
|
||||
this.pageIndex = this.historyTitle.length;
|
||||
}
|
||||
this.allNum = list.length + 3;
|
||||
this.list = list;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 上一页
|
||||
prePage() {
|
||||
if (this.pageIndex == 0) {
|
||||
return
|
||||
}
|
||||
this.pageIndex--
|
||||
},
|
||||
//选中题目
|
||||
checkedTitle(NUM,INDEX){
|
||||
const now = Date.now();
|
||||
if (now - this.lastTapTime < 500) {
|
||||
return;
|
||||
} else {
|
||||
// 处理单击事件
|
||||
this.lastTapTime = now;
|
||||
this.list[INDEX].Value = NUM;
|
||||
this.saveTestRecordProcess(this.list[INDEX].Id,NUM);
|
||||
setTimeout(()=>{
|
||||
if(this.pageIndex != this.allNum - 1){
|
||||
this.pageIndex = INDEX + 1;
|
||||
}
|
||||
},400)
|
||||
}
|
||||
},
|
||||
// 选中题目
|
||||
checkItem(TYPE,ITEM,INDEX) {
|
||||
switch(TYPE){
|
||||
case 1: {
|
||||
this.checkTitleList.forEach(item=>{
|
||||
item.Checked = false;
|
||||
})
|
||||
this.checkTitleList[INDEX].Checked = true;
|
||||
this.firstDescVal = ITEM.Value;
|
||||
this.secondDescVal = "";
|
||||
this.thirdDescVal = "";
|
||||
this.saveTestRecordProcess(181,ITEM.Value);
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
this.checkTitleList.forEach(item=>{
|
||||
if(item.Value != this.firstDescVal){
|
||||
item.Checked = false;
|
||||
}
|
||||
})
|
||||
this.checkTitleList[INDEX].Checked = true;
|
||||
this.secondDescVal = ITEM.Value;
|
||||
this.thirdDescVal = "";
|
||||
this.saveTestRecordProcess(182,ITEM.Value);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
this.checkTitleList[INDEX].Checked = true;
|
||||
this.thirdDescVal = ITEM.Value;
|
||||
this.saveTestRecordProcess(183,ITEM.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
setTimeout(()=>{
|
||||
if(this.pageIndex != this.allNum - 1){
|
||||
this.pageIndex = 180 + TYPE;
|
||||
}
|
||||
},400)
|
||||
|
||||
},
|
||||
//存储答题记录
|
||||
saveTestRecordProcess(ID,VALUE){
|
||||
let data = {
|
||||
testType: 11,
|
||||
testTitleId: ID,
|
||||
testResult: VALUE
|
||||
}
|
||||
api.saveTestRecordProcess(data).then(res => {
|
||||
if (res.Result === 1) {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交题目
|
||||
submitTitle() {
|
||||
|
||||
// uni.showToast({
|
||||
// title: "请选择三个特质描述",
|
||||
// icon: "none"
|
||||
// })
|
||||
// return;
|
||||
|
||||
let testStr = "";
|
||||
this.list.forEach(item => {
|
||||
testStr += `${item.Id}|${item.Value - 1},`
|
||||
});
|
||||
testStr += `181|${this.firstDescVal},182|${this.secondDescVal},183|${this.thirdDescVal}`
|
||||
uni.showLoading({
|
||||
title: "提交中"
|
||||
})
|
||||
let data = {testStr}
|
||||
api.removeTestRecordProcess(11).then((res) => {
|
||||
return api.saveInterestTestResult(data);
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
})
|
||||
let pages = getCurrentPages(); // 当前页面
|
||||
let beforePage = pages[pages.length - 2]; // 上一页
|
||||
beforePage.data.refreshIfNeeded = true;
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/interestTestReport`
|
||||
})
|
||||
},1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.Message,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip-layer {
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.desc {
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: center;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.head-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.go-back {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.title-wrap {
|
||||
background: #fff;
|
||||
.progress-block {
|
||||
padding: 0 40rpx;
|
||||
.row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.title-index {
|
||||
font-size: 28rpx;
|
||||
color: #1677ff;
|
||||
}
|
||||
.all-title {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 24rpx;
|
||||
color: #20B664;
|
||||
}
|
||||
}
|
||||
.bar {
|
||||
position: relative;
|
||||
width: 670rpx;
|
||||
height: 8rpx;
|
||||
background: #EBEBEB;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
.bar-inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 8rpx;
|
||||
background: #1677ff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 0 40rpx 120rpx;
|
||||
.item {
|
||||
padding-top: 40rpx;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.sel-label-block {
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 630rpx;
|
||||
height: 96rpx;
|
||||
padding-left: 40rpx;
|
||||
background: #F5F5F5;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
&.sel {
|
||||
background: #EDF6FF;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
.long-label {
|
||||
align-items: center;
|
||||
width: 610rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
background: #F5F5F5;
|
||||
margin-bottom: 24rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
&.sel {
|
||||
background: #EDF6FF;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 50rpx;
|
||||
.pre-btn {
|
||||
width: 316rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
background: #F8F8F8;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
border: 2rpx solid #EAEAEA;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.com-btn {
|
||||
width: 320rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #1677ff;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
419
packageCa/pagesTest/personalTestTitle.vue
Normal file
419
packageCa/pagesTest/personalTestTitle.vue
Normal file
@@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback()"></view>
|
||||
<text>人格测评</text>
|
||||
</view>
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
第{{pageIndex+1}}题
|
||||
</view>
|
||||
<view class="all-title">
|
||||
共{{allNum}}道题
|
||||
</view>
|
||||
<view class="time">
|
||||
约20分钟
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar">
|
||||
<view class="bar-inner" :style="{width: rate + '%'}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
|
||||
<view class="title">{{ item.Title }}</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常符合</view>
|
||||
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">基本符合</view>
|
||||
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">基本不符合</view>
|
||||
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">完全不符合</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="pre-btn" @click="prePage">上一题</view>
|
||||
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
|
||||
<view class="slot-content">
|
||||
<view class="tip-layer">
|
||||
<view class="title">提示</view>
|
||||
<view class="desc">确认要放弃测评吗?</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import api from "@/apiCa/testManage.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
list: [],
|
||||
allNum: 0,//总题目数
|
||||
pageIndex: 0, //显示页
|
||||
showBakcTip: false,
|
||||
lastTapTime: 0 ,// 记录上次点击的时间
|
||||
historyTitle: [],// 历史题目
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rate: function() {
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
return Math.round(num * 100 / this.allNum)
|
||||
},
|
||||
commit: function(){
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
if(num == this.list.length){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getHistoryTitle();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
goback(){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认要放弃测评吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认',
|
||||
confirmColor: '#1677ff',
|
||||
cancelColor: '#999999',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack(-1);
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
}
|
||||
});
|
||||
//uni.navigateBack(-1);
|
||||
},
|
||||
//获取答题记录
|
||||
getHistoryTitle(){
|
||||
api.getTestRecordProcessList(15).then(res => {
|
||||
if (res.Result === 1) {
|
||||
let data = res.Data;
|
||||
this.historyTitle = data;
|
||||
this.getTitle();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取题目
|
||||
getTitle() {
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
})
|
||||
api.queryTestContent(15).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
let list = res.Data.List;
|
||||
list.forEach(item => {
|
||||
item.Value = 0
|
||||
this.historyTitle.forEach(ritem=>{
|
||||
if(item.TitleId == ritem.TestTitleId){
|
||||
switch (ritem.TestResult) {
|
||||
case "A": {
|
||||
item.Value = 4;
|
||||
break;
|
||||
}
|
||||
case "B": {
|
||||
item.Value = 3;
|
||||
break;
|
||||
}
|
||||
case "C": {
|
||||
item.Value = 2;
|
||||
break;
|
||||
}
|
||||
case "D": {
|
||||
item.Value = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
if(this.historyTitle.length == 0){
|
||||
this.pageIndex = 0;
|
||||
}else if(this.historyTitle.length == list.length){
|
||||
this.pageIndex = list.length - 1;
|
||||
}else {
|
||||
this.pageIndex = this.historyTitle.length;
|
||||
}
|
||||
|
||||
this.allNum = list.length;
|
||||
this.list = list;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 上一页
|
||||
prePage() {
|
||||
if (this.pageIndex == 0) {
|
||||
return
|
||||
}
|
||||
this.pageIndex--
|
||||
},
|
||||
//选中题目
|
||||
checkedTitle(NUM,INDEX){
|
||||
const now = Date.now();
|
||||
if (now - this.lastTapTime < 500) {
|
||||
return;
|
||||
} else {
|
||||
// 处理单击事件
|
||||
this.lastTapTime = now;
|
||||
this.list[INDEX].Value = NUM;
|
||||
this.saveTestRecordProcess(this.list[INDEX].TitleId,NUM);
|
||||
setTimeout(()=>{
|
||||
if(this.pageIndex != this.list.length - 1){
|
||||
this.pageIndex = INDEX + 1;
|
||||
}
|
||||
},400)
|
||||
}
|
||||
},
|
||||
//存储答题记录
|
||||
saveTestRecordProcess(ID,VALUE){
|
||||
let val = ""
|
||||
switch (VALUE) {
|
||||
case 4: {
|
||||
val = "A";
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
val = "B";
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
val = "C";
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
val = "D";
|
||||
break;
|
||||
}
|
||||
}
|
||||
let data = {
|
||||
testType: 15,
|
||||
testTitleId: ID,
|
||||
testResult: val
|
||||
}
|
||||
api.saveTestRecordProcess(data).then(res => {
|
||||
if (res.Result === 1) {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交题目
|
||||
submitTitle() {
|
||||
let testStr = "";
|
||||
this.list.forEach(item => {
|
||||
switch (item.Value) {
|
||||
case 4: {
|
||||
testStr += `${item.TitleId}|A,`
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
testStr += `${item.TitleId}|B,`
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
testStr += `${item.TitleId}|C,`
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
testStr += `${item.TitleId}|D,`
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
uni.showLoading({
|
||||
title: "提交中"
|
||||
})
|
||||
let data = {
|
||||
testStr,
|
||||
testType: 15
|
||||
}
|
||||
api.removeTestRecordProcess(15).then((res) => {
|
||||
return api.saveCharacterTestResult(data);
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
})
|
||||
let pages = getCurrentPages(); // 当前页面
|
||||
let beforePage = pages[pages.length - 2]; // 上一页
|
||||
beforePage.data.refreshIfNeeded = true;
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/personalTestReport?year=${res.Data.Year}`
|
||||
})
|
||||
},1000)
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.Message,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip-layer {
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.desc {
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: center;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.head-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.go-back {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.title-wrap {
|
||||
background: #fff;
|
||||
.progress-block {
|
||||
padding: 0 40rpx;
|
||||
.row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.title-index {
|
||||
font-size: 28rpx;
|
||||
color: #1677ff;
|
||||
}
|
||||
.all-title {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 24rpx;
|
||||
color: #20B664;
|
||||
}
|
||||
}
|
||||
.bar {
|
||||
position: relative;
|
||||
width: 670rpx;
|
||||
height: 8rpx;
|
||||
background: #EBEBEB;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
.bar-inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 8rpx;
|
||||
background: #1677ff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 0 40rpx;
|
||||
.item {
|
||||
padding-top: 40rpx;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.sel-label-block {
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 630rpx;
|
||||
height: 96rpx;
|
||||
padding-left: 40rpx;
|
||||
background: #f5f5f5;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
&.sel {
|
||||
background: #EDF6FF;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 50rpx;
|
||||
.pre-btn {
|
||||
width: 316rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
background: #F8F8F8;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
border: 2rpx solid #EAEAEA;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.com-btn {
|
||||
width: 320rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #1677ff;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
942
packageCa/pagesTest/testList.vue
Normal file
942
packageCa/pagesTest/testList.vue
Normal file
@@ -0,0 +1,942 @@
|
||||
<template>
|
||||
<view class="test-list-wrap" style="display:block;">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>生涯测评</text>
|
||||
</view>
|
||||
<view class="contrast-box" >
|
||||
<view class="desc">
|
||||
<text class="icon"></text>
|
||||
<view class="txt-item">
|
||||
<text v-for="(item,index) in selectTypeStr" :key="index">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" @click="showContrastLayer">
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
<view class="content" style="overflow:hidden;">
|
||||
<view class="p-item" v-for="(pitem,pindex) in filteredData" :key="pindex">
|
||||
<view class="h1">{{pitem.title}}</view>
|
||||
<view class="item" v-for="(item,index) in pitem.list" :key="index">
|
||||
<view class="h2">{{item.TestName}}</view>
|
||||
<view class="do-time">
|
||||
约{{item.AvgTime == 0 ? '1' : item.AvgTime}}分钟
|
||||
</view>
|
||||
<view class="desc">
|
||||
{{item.Brief}}
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn" v-if="item.HasTest" @click="navTest(item,1)">
|
||||
重新测评
|
||||
</view>
|
||||
<view class="btn" v-else @click="navTest(item,1)">
|
||||
开始测评
|
||||
</view>
|
||||
<view class="btn" v-if="item.HasTestRecordProcess && item.Type != 25" @click="navTest(item,2)">
|
||||
继续测评
|
||||
</view>
|
||||
<view class="report-btn" v-if="item.HasTest" @click="navReport(item)">
|
||||
查看报告
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 筛选 -->
|
||||
<uni-popup ref="pop_card" type="bottom">
|
||||
<view class="search-content">
|
||||
<view class="head-title">
|
||||
<text>筛选</text>
|
||||
<view @click="closeDialog()" class="s_close"></view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="title">测评等级</view>
|
||||
<view class="options">
|
||||
<view class="item" v-for="(item,index) in levelOption" :class="checkedTestLevel==item.value?'on':''" @click="checkedTestLevel = item.value" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="title">测评类型</view>
|
||||
<view class="options">
|
||||
<view class="item" v-for="(item,index) in typeOption" :class="checkedTestType==item.value?'on':''" @click="checkedTestType = item.value" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="title">测评功能</view>
|
||||
<view class="options">
|
||||
<view class="item" v-for="(item,index) in fnOption" :class="checkedTestFun==item.value?'on':''" @click="checkedTestFun = item.value" :key="index">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn" v-on:click="confirmCompute">
|
||||
确认筛选
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "@/apiCa/testManage.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
refreshIfNeeded: false, //是否返回刷新
|
||||
dataList: [],
|
||||
selectTypeStr: ["全部"],
|
||||
showContrast: false,//显示筛选
|
||||
levelOption: [
|
||||
{
|
||||
name: "全部",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "基础型",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: "进阶型",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: "专项型",
|
||||
value: 3
|
||||
},
|
||||
],
|
||||
typeOption: [
|
||||
{
|
||||
name: "全部",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "生涯类",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: "学习力类",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: "心理健康类",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: "其他",
|
||||
value: 4
|
||||
},
|
||||
],
|
||||
fnOption: [
|
||||
{
|
||||
name: "全部",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "情感态度",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: "智力能力",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: "认知学习",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: "人格特质",
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
name: "心理健康",
|
||||
value: 5
|
||||
}
|
||||
],
|
||||
testLevel:0 ,// 测评等级
|
||||
testType: 0,// 测评类型
|
||||
testFun: 0,// 测评功能
|
||||
checkedTestLevel: 0,// 测评等级
|
||||
checkedTestType: 0,// 测评类型
|
||||
checkedTestFun: 0,// 测评功能
|
||||
testList1: [], //情感
|
||||
testList2: [], //智力
|
||||
testList3: [], //认知学习
|
||||
testList4: [], //人格特质
|
||||
testList5: [], //心理健康
|
||||
testList6: [], //其他测评
|
||||
filteredData: [],//筛选后数据
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.queryTaskListForWeChart();
|
||||
},
|
||||
methods: {
|
||||
closeDialog(){
|
||||
this.$refs.pop_card.close();
|
||||
},
|
||||
//确认筛选
|
||||
confirmCompute(){
|
||||
this.testLevel = this.checkedTestLevel;
|
||||
this.testType = this.checkedTestType;
|
||||
this.testFun = this.checkedTestFun;
|
||||
if(this.checkedTestLevel == 0 && this.checkedTestType == 0 && this.checkedTestFun == 0){
|
||||
this.selectTypeStr = ["全部"];
|
||||
}else {
|
||||
let arr = [];
|
||||
if(this.checkedTestLevel != 0){
|
||||
arr.push(this.levelOption[this.checkedTestLevel].name);
|
||||
}
|
||||
if(this.checkedTestType != 0){
|
||||
arr.push(this.typeOption[this.checkedTestType].name);
|
||||
}
|
||||
if(this.checkedTestFun != 0){
|
||||
arr.push(this.fnOption[this.checkedTestFun].name);
|
||||
}
|
||||
this.selectTypeStr = arr;
|
||||
}
|
||||
|
||||
this.filteredData = this.dataList.map(category => {
|
||||
const filteredList = category.list.filter(item => {
|
||||
// 处理TestLevel筛选
|
||||
const levelMatch = this.testLevel === 0 || item.TestLevel === this.testLevel;
|
||||
|
||||
// 处理TestType特殊映射(其他类对应TestType=0)
|
||||
const typeMatch = this.testType === 0 ? true :
|
||||
this.testType === 4 ? item.TestType === 0 :
|
||||
item.TestType === this.testType;
|
||||
|
||||
// 处理TestFun筛选
|
||||
const funMatch = this.testFun === 0 || item.TestFun === this.testFun;
|
||||
|
||||
return levelMatch && typeMatch && funMatch;
|
||||
});
|
||||
return { ...category, list: filteredList };
|
||||
}).filter(category => category.list.length > 0); // 过滤空分组
|
||||
//this.showContrast = false;
|
||||
this.$refs.pop_card.close();
|
||||
},
|
||||
// 显示筛选列表
|
||||
showContrastLayer(){
|
||||
//this.showContrast = true;
|
||||
this.$refs.pop_card.open('bottom') //底部弹出
|
||||
this.checkedTestLevel = this.testLevel;
|
||||
this.checkedTestType = this.testType;
|
||||
this.checkedTestFun = this.testFun;
|
||||
},
|
||||
// 返回
|
||||
goback(){
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
//获取列表
|
||||
queryTaskListForWeChart() {
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
let eduLevel = uni.getStorageSync("CAuserInfo").user.GradeLevel;
|
||||
new Promise((resolve,reject)=>{
|
||||
return api.getTestTypeTagLIst().then((res)=>{
|
||||
resolve(res)
|
||||
})
|
||||
}).then((res)=>{
|
||||
let arr = [];
|
||||
res.Data.forEach(item=>{
|
||||
return arr.push(item.Type);
|
||||
})
|
||||
return api.getUserTestTypeProcessList(JSON.stringify(arr)).then((res1)=>{
|
||||
return [res, res1];
|
||||
})
|
||||
}).then(([res1, res2]) => {
|
||||
if (res1.Result === 1 && res2.Result === 1) {
|
||||
return api.queryTaskListForWeChart(eduLevel).then((res) => {
|
||||
return [res, res1, res2];
|
||||
});
|
||||
}
|
||||
}).then(([res, res1, res2]) => {
|
||||
uni.hideLoading();
|
||||
if (res && res.Result === 1) {
|
||||
this.testList1 = [];
|
||||
this.testList2 = [];
|
||||
this.testList3 = [];
|
||||
this.testList4 = [];
|
||||
this.testList5 = [];
|
||||
this.testList6 = [];
|
||||
let list = res.Data.TestList;
|
||||
list.forEach(item=>{
|
||||
// 处理答题记录匹配
|
||||
item.HasTestRecordProcess = false;
|
||||
res2.Data.forEach(ritem=>{
|
||||
if(item.TestType == ritem.TestType){
|
||||
item.HasTestRecordProcess = ritem.HasTestRecordProcess;
|
||||
}
|
||||
})
|
||||
})
|
||||
let num = 0;
|
||||
let arr = [];
|
||||
let arr1 = [];
|
||||
list.forEach(item=>{
|
||||
if(item.HasTest){
|
||||
num++
|
||||
}
|
||||
let isMatch = false;
|
||||
// 处理测评分类匹配
|
||||
res1.Data.forEach((yitem, yindex) => {
|
||||
if (item.TestType == yitem.Type) {
|
||||
item.Type = item.TestType;
|
||||
item.TestType = yitem.TestType;
|
||||
item.TestLevel = yitem.TestLevel;
|
||||
item.TestFun = yitem.TestFun;
|
||||
arr.push(item);
|
||||
isMatch = true;
|
||||
}
|
||||
})
|
||||
if (!isMatch) {
|
||||
item.Type = item.TestType;
|
||||
item.TestType = 0;
|
||||
item.TestLevel = 0;
|
||||
item.TestFun = 0;
|
||||
arr1.push(item);
|
||||
}
|
||||
})
|
||||
this.testList6 = arr1;
|
||||
this.testList = list;
|
||||
arr.forEach((item, index) => {
|
||||
switch (item.Type) {
|
||||
// 1 情感态度
|
||||
// 高中,大学职业兴趣11
|
||||
// 工作价值观17
|
||||
// 学习动机测评-33
|
||||
// 自我效能感测评-34
|
||||
// 小学兴趣测评-31
|
||||
//初中兴趣测评18
|
||||
case 11:
|
||||
case 17:
|
||||
// case 18:
|
||||
// case -31:
|
||||
// case -33:
|
||||
// case -34:
|
||||
{
|
||||
this.testList1.push(item);
|
||||
// this.interestList.push(item);
|
||||
break;
|
||||
}
|
||||
// 2 智力能力
|
||||
// 注意力22
|
||||
// 记忆力23
|
||||
// 多元智能16
|
||||
// 小学多元智能 -32
|
||||
// 多元性向潜能发展6
|
||||
// 推理能力测评-45
|
||||
// 批判性思维倾向测评-38
|
||||
// 创造力倾向测评-37
|
||||
// 多元(职业)能力测评-27
|
||||
// 通用(职业)能力测评-28
|
||||
// case 22:
|
||||
// case 23:
|
||||
// case 16:
|
||||
// case 6:
|
||||
// case -32:
|
||||
// case -45:
|
||||
// case -38:
|
||||
// case -37:
|
||||
case -27:
|
||||
case -28: {
|
||||
this.testList2.push(item);
|
||||
break;
|
||||
}
|
||||
// 3认知学习
|
||||
// 学科信心-2
|
||||
// 学科能力测评20
|
||||
// 学科自评-9999
|
||||
// 学习习惯-36
|
||||
// 领导力测评-29
|
||||
// 生涯建构测评-42
|
||||
// 生涯适应力测评-43
|
||||
// 意志力测评 -35
|
||||
// 场独立-场依存认知风格测评 25
|
||||
// 沉思型-冲动型认知风格测评 26
|
||||
// 儿童元认知测评 -39
|
||||
// 元认知测评 -40
|
||||
// 学习资源管理能力测评 -41
|
||||
// 问题解决能力测评-44
|
||||
// case -2:
|
||||
// case 20:
|
||||
// case -9999:
|
||||
// case -36:
|
||||
// case -29:
|
||||
// case -42:
|
||||
// case -43:
|
||||
// case -35:
|
||||
// case 25:
|
||||
// case 26:
|
||||
// case -39:
|
||||
// case -40:
|
||||
// case -41:
|
||||
// case -44:
|
||||
// {
|
||||
// this.testList3.push(item);
|
||||
// // this.workValueList.push(item);
|
||||
// break;
|
||||
// }
|
||||
// 4.人格特质
|
||||
// MBTI 4
|
||||
// 人格测评15
|
||||
// case 4:
|
||||
case 15: {
|
||||
this.testList4.push(item);
|
||||
break;
|
||||
}
|
||||
// 5.心理健康
|
||||
// SCL-90
|
||||
// case -10: {
|
||||
// this.testList5.push(item);
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
})
|
||||
let allList = [];
|
||||
if(this.testList1.length>0){
|
||||
allList.push({title: '情感态度', list: this.testList1});
|
||||
}
|
||||
if(this.testList2.length>0){
|
||||
allList.push({title: '智力能力', list: this.testList2});
|
||||
}
|
||||
if(this.testList3.length>0){
|
||||
allList.push({title: '认知学习', list: this.testList3});
|
||||
}
|
||||
if(this.testList4.length>0){
|
||||
allList.push({title: '人格特质', list: this.testList4});
|
||||
}
|
||||
// if(this.testList5.length>0){
|
||||
// allList.push({title: '心理健康', list: this.testList5});
|
||||
// }
|
||||
// if(this.testList6.length>0){
|
||||
// allList.push({title: '其他测评', list: this.testList6});
|
||||
// }
|
||||
this.dataList = allList;
|
||||
this.confirmCompute();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error('请求出错:', error);
|
||||
});
|
||||
},
|
||||
routerUrl(TYPE){
|
||||
switch (TYPE) {
|
||||
case 11: {
|
||||
// 高中兴趣测评
|
||||
uni.navigateTo({
|
||||
url: "/packageCa/pagesTest/interestTestTitle"
|
||||
})
|
||||
break;
|
||||
}
|
||||
case 15: {
|
||||
// 人格测评
|
||||
uni.navigateTo({
|
||||
url: "/packageCa/pagesTest/personalTestTitle"
|
||||
})
|
||||
break;
|
||||
}
|
||||
case 17: {
|
||||
// 工作价值观测评
|
||||
uni.navigateTo({
|
||||
url: "/packageCa/pagesTest/workValuesTestTitle"
|
||||
})
|
||||
break;
|
||||
}
|
||||
|
||||
case -27: {
|
||||
// 多元能力
|
||||
uni.navigateTo({
|
||||
url: "/packageCa/pagesTest/customTestTitle?testType=-27"
|
||||
})
|
||||
break;
|
||||
}
|
||||
case -28: {
|
||||
// 通用职业
|
||||
uni.navigateTo({
|
||||
url: "/packageCa/pagesTest/customTestTitle?testType=-28"
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
navTest(item,index) {
|
||||
if(index == 1){
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
})
|
||||
api.removeTestRecordProcess(item.Type).then((res) => {
|
||||
if (res.Result == 1) {
|
||||
uni.hideLoading();
|
||||
this.routerUrl(item.Type)
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.routerUrl(item.Type)
|
||||
}
|
||||
},
|
||||
navReport(item) {
|
||||
switch (item.Type) {
|
||||
case 11: {
|
||||
// 兴趣测评
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/testReport/interestTestReport`
|
||||
})
|
||||
break;
|
||||
}
|
||||
case 15: {
|
||||
// 人格测评
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/testReport/personalTestReport`
|
||||
})
|
||||
break;
|
||||
}
|
||||
case 17: {
|
||||
// 工作价值观测评
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/testReport/workValuesTestReport`
|
||||
})
|
||||
break;
|
||||
}
|
||||
case -27: {
|
||||
// 多元能力
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/testReport/multipleAbilityTestReport?id=${item.RecordId}`
|
||||
})
|
||||
break;
|
||||
}
|
||||
case -28: {
|
||||
// 通用职业
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/testReport/generalCareerTestReport?id=${item.RecordId}`
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
|
||||
page {
|
||||
background: url('#{$image-oss-url}/18.png') no-repeat;
|
||||
background-size: contain;
|
||||
overflow-y:scroll;
|
||||
background-color:#f5f5f5;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.head-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 40rpx;
|
||||
.go-back {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.progress-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 36rpx;
|
||||
.progress-txt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
width: 175rpx;
|
||||
color: #333333;
|
||||
margin-right: 20rpx;
|
||||
.strong {
|
||||
font-size: 32rpx;
|
||||
color: #20B664;
|
||||
font-weight: 600;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
}
|
||||
.progress-bar {
|
||||
width: 500rpx;
|
||||
height: 24rpx;
|
||||
background: #F8F8F8;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
.progress {
|
||||
position: relative;
|
||||
background-image: repeating-linear-gradient(-45deg, #20B664, #20B664 20rpx, #47C580 20rpx, #47C580 30rpx);
|
||||
height: 24rpx;
|
||||
border-radius: 20rpx;
|
||||
transition: width 1s ease-in-out;
|
||||
&::after {
|
||||
display: block;
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -20rpx;
|
||||
top: -8rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAA2FBMVEUAAAA60X84z4A60YE50X850n860H860IA6z4A4z4A60X850IA50X84z4Awz4D///860X8iv2khu2ciwmskyW8guWUlzHEky3Ajx20hvWglznEl0HMm0nQjxWwm1HUgt2Q3z3zk+O112KK67dGR47Yu03kyznktzXYuyHQz0nsvxXIqwm/I8NoqyHInv2ys6Mc9yHwr0Xbx+/Wt7Mpa15NZ0ZBO1os/0IEyynfI8tyD3Ktn1Jjx/PbW8+Of5b6E4q9LzYZA1oVLyYTW9eSf6cGf5r+C2qpp35/QM//cAAAAD3RSTlMA70B/37+vn2Agz7+PYBCLRPBlAAACh0lEQVQ4y6XV2XqqMBAAYKKI1i2DgNZWK6AHEHetS7X72d7/jc4kGBJFvTlzARf833yTySRo55HLV8oEgOhGNVdXP2RlEZ0MUsxdpSUdgRuEi8fHx05nMRwCQOEyvzNQhs1m8wGD887TD8bvLqQlSFutVhNDasZJ7dzmAYKmbaPmWOonLCafseG9jZHJjcmFlnZyf6/oh+u6hraL+EbuUtoHAlG3i/pGbiJ6UoDAsjIa+dfz36/hcZVGYnMAlpXVmxVl8ZLkFoUUILIyetunSXii37pMfKY3HhVxrBsgh7gIkWmmejsbD2zbp2l46c4XNa1OwDRTPeDf+XP18cJe/WNPFkBYFYEp9HwsMw5areAV379EB4dYRxWi9lH7HpXxjKv8ie+N6PcQt9GAUTvRPlVjZdtb1rl0LxdQ0XQw24nu05MYsz6/btK9XEBZI9BuNLieUbr0lvQkPuScdHCFAA3ETMf+Ghd5kn+gzgkAw1yLVc5Uq84gwwSxqt8VvLW5FphoZZg6nDM9f5vPFdxXZhCxrlUQOyL3mI7NwUmzZe4QDDxRsSP0H/zum/ulLFqZ7wCquN07R+j4e0aXezNeH2bHzMp8u7jdbIVcc+6h8D4ta83tb/U0AKmzER31hPZpf8wqsT6Z9aKu1CEU+fC7PaG//fbBm2MH9wyv1bPDhh9Dx9RpbmVO3tWzE0IhueXAbUiNPMFvJyeNJeZhQNQ7yx0ffKRSB1CQl8zoXGMoOpSXDBYC01t6AlBTL0ZXaoxTPclco9criaSVeudc0t2dsErUCLgjJ6MnLpDShR9QAcCNHbVuCykYd5f/gshhF0/bjE5HUQAAeun/fpoy6rmqoRN05Uo+I/8B7R+IPTrIPJ8AAAAASUVORK5CYII=');
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.test-list-wrap {
|
||||
padding: 0 20rpx 130rpx;
|
||||
|
||||
.content {
|
||||
.p-item {
|
||||
.h1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 8rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 6rpx;
|
||||
background: #1677ff;
|
||||
border-radius: 4rpx 4rpx 4rpx 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item {
|
||||
position: relative;
|
||||
padding: 40rpx 20rpx;
|
||||
background: #fff;
|
||||
height: 224rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 25rpx;
|
||||
/*background: #F2F9FF;*/
|
||||
background:#fff;
|
||||
// border: 2rpx solid #E7F4FD;
|
||||
border: 2rpx solid #fff;
|
||||
overflow: hidden;
|
||||
|
||||
&:nth-child(2n-1) {
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -110rpx;
|
||||
bottom: -60rpx;
|
||||
display: block;
|
||||
width: 118rpx;
|
||||
height: 118rpx;
|
||||
border-radius: 50%;
|
||||
border: 34rpx solid rgba(189, 226, 255, 0.5);
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 55rpx;
|
||||
bottom: 106rpx;
|
||||
display: block;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(189, 226, 255, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2n) {
|
||||
/*background: #F7F7FF;*/
|
||||
background: #fff;
|
||||
border: 2rpx solid #FFF;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -65rpx;
|
||||
bottom: 75rpx;
|
||||
display: block;
|
||||
width: 102rpx;
|
||||
height: 102rpx;
|
||||
border-radius: 24rpx;
|
||||
transform: rotateZ(45deg) skew(-20deg, -20deg);
|
||||
background: rgba(205, 217, 255, 0.4);
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -72rpx;
|
||||
bottom: 10rpx;
|
||||
display: block;
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
border-radius: 33rpx;
|
||||
transform: rotateZ(45deg) skew(-20deg, -20deg);
|
||||
background: rgba(205, 217, 255, 0.2);
|
||||
// background: #3F51B5;
|
||||
}
|
||||
}
|
||||
|
||||
.h2 {
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.do-time {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #20B664;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 10rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIASURBVEiJ3ZaxctNAEIa/tQ5oU1Ieb5A3wJlUNsPEGR4gChE18Qy9cc+MQ6+AeIAMYZjYFRPzBrwBV6Z0yRDZS3GykayTYTyh4a+ku93/313d3koowU5iC4Cah2wDyW8AXCdzq6UV+Tg5BUZbEdfRd930DKB1R4SNkPKLncRWMfuipACodhCZbWRQ3UFkAqDwSiS/CJaoLIKa74X3oeueX27it5+TNhHXni1/VCaHQIkKg2+F/MHG6AGilc10nRzANLhNgV2UNixPVzSomsyH/GCGEiOAMA0RhQUkf4uaUxBrr57HII9Rias2EdzXrwg7fiH/EKRqyAA7fvERtAfqkPleMAONrkEsMHXddO/vMwCQ2z5qep7AHLlOelwNIBkB1msxbKRpFADsJBmgvPaWmi0WrYuWiEHmB6WSnblu2t9KAMBenbxH1uq/hGrmnpwfB/cK/PNO3ihgx8loFb1oBnq4UHnqnwGR2E6SQSMBm05RuUMDda5+n3oH/zmDiCIydaGP6DrpENST6r3GWzgoUMyFtnfWxiP4e097q1myhoY+MEfejxk/F5dNzq7zLrPjkwGIRc1LoJZpWKC4gxAyHpgYDQ8iO076iE5RYpYZr6FWokp55nwKBlANZmmzG8q0PnDUPBN4452LgSNac/T74ioDR0iE/Mt/PpOBO/1t+QUcj9NlQhj6vwAAAABJRU5ErkJggg==") no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.btn {
|
||||
width: 200rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
background: #1677ff;
|
||||
margin-right: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
|
||||
.report-btn {
|
||||
width: 200rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
border-radius: 60rpx;
|
||||
border: 2rpx solid #1677ff;
|
||||
font-size: 28rpx;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.contrast-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 666rpx;
|
||||
height: 76rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #E7F1FF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #FFFFFF;
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHfSURBVEiJ1Va9btswEP5OlBNr01JAMgpUeYNm7FDAeoP2Ddq1UzK5Roc6Q6AoS7auzps4QDt0i4fu1lYVWThFP7Z4HSIpspC4cCMmyLeQR+nu4/GOvAOeAwYn+dQ9zWf/o0vtBSdIvE0KBpkvmfg7AKyY3i5T85eckLzRZS/NICvZnrBdze8kdMN8AWAj4V1gVfgkxFcwhqX8EcAFGeISYPl7tLtXb7jl2dZkJTww7FoyzFelLRsgzwm4tmu0NbcBMz6tVtiPx9Z5kvR8VoXPqvDjUe+oUKI+yjRDPa+P1AkSjwyx2IZQAW/+jHZ+3vd9EGbvlFIyHlsX1dqDPPznhpSSTU+1EjpBMiRDzEwTM3vCdXy1eljC7u/eJpSpiyXN+nPLyiMAiMcUaSeUE5IS2Guvaz1SN1yeuWF+9iiETpAMAT4AcNDZxd+E+y6+NsKrLztzYpwD6rD5gGtLGgC4TnuH7WqhM4aeZS0XbpitPZc6s9RD19ViE54macDvWRV+M47Pq1oQY7/qgZwg8ZwgGb44zl+XcvfVggjfSIgpAJAQ05Lg0gmSD43f1qpFTRiPrQhAtDWputGpxgpp1p8DHAEcNavFg9vEq8+9H7e6621iZ3BP89ngJJ92alQX/gLMKt2XTOFMygAAAABJRU5ErkJggg==") no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.txt-item {
|
||||
width: 400rpx;
|
||||
line-height: 21px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 20rpx;
|
||||
text {
|
||||
|
||||
display: inline-block;
|
||||
line-height: 50rpx;
|
||||
font-size: 24rpx;
|
||||
color: #1677ff;
|
||||
margin-left: 16rpx;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 2rpx;
|
||||
height: 12rpx;
|
||||
margin-left: 16rpx;
|
||||
background: #1677ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 120rpx;
|
||||
height: 48rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-left: 6rpx;
|
||||
border-top: 12rpx solid #333;
|
||||
border-left: 12rpx solid #fff;
|
||||
border-right: 12rpx solid #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.search-content {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-top-left-radius: 28rpx;
|
||||
border-top-right-radius: 28rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.head-title {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
font-weight:550;
|
||||
margin-top:10rpx;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
padding: 0 0 0 30rpx;
|
||||
|
||||
.s-line {
|
||||
position: relative;
|
||||
width: 630rpx;
|
||||
margin: 15rpx auto 45rpx;
|
||||
height: 2rpx;
|
||||
background: #FAFAFA;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -85rpx;
|
||||
top: -16rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
background: #EEF1F8;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: -58rpx;
|
||||
top: -16rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
background: #EEF1F8;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
padding: 30rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.v-line {
|
||||
border-bottom: 1px dotted #f1ececb8;
|
||||
margin: 26rpx 0;
|
||||
}
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
min-width: 170rpx;
|
||||
margin-right: 30rpx;
|
||||
height: 76rpx;
|
||||
text-align: center;
|
||||
line-height: 76rpx;
|
||||
background: #F5F5F5;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
|
||||
&.disable {
|
||||
color: #C6C6C6;
|
||||
background: #F8F8F8;
|
||||
}
|
||||
|
||||
&.on {
|
||||
background: #E7F1FF;
|
||||
color: #1677ff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.btn {
|
||||
width: 688rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
text-align: center;
|
||||
background: #1677ff;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.s_close{position:absolute;top:30rpx;right:6%;width:30rpx;height:30rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjkzQkY4QkFCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjkzQkY4QkJCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOTNCRjhCOEIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOTNCRjhCOUIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvssjGYAAAO/SURBVHjatJf7a5V1HMef5bN2tduObjp1hMlOTbCpaKTifpI0b1EKXgo0U4Lw/0j8ZSoohkpFKjLvUYrWREX8Qa0oQaw5O7Yzt45jbW7u4nZ8f+R14MvDOdtz9PSB13jOs+37/n6u3+/Ji0aj2zzPaxenxF9i2Mu9lYo66BG/+foxT3SLAXFUtORY9AUxWywTM0WvKDHhWlEkqsSgaBD/5kj0Rdb/VKzms0U34bMjs6jYIvLFd+JBDoTfYc1FiJr9IS6PiUQiteTgZVEhyghHC/l41vDOFRvEKtbuE1fEAXHehBOEOErIJxL2TnFH9GcpmifeFl8gWsJ7E90lfhRtJhzXQ5xqnuR4Pk4kRbN4lIXwfLFZvC9e5d1ZPD2DQ0kTHtLDfUJbgrcW+smiXHSJfwj/SJZPIW0U68QrTni/EqdZ66mZcOrZiumuvRNviUIxXkwl17dpuUw2S2wVK4ia2UWxQ5yjZb10whbWBK2U74S9nJANsrG+NKJzaJkPxGuO6H7xfVA0KJyyNhEjVNWiQEwRlfRgM5tIVe+btMzH4iVhqftV7BQnMnVGOmEPgTjP1YS9HPFOejH1O6velY6nl8Qe8YOb06D5I+TsBq1hLbaENnuXdHSQ7/lMpAieXhffiOPpwhtW2CNk9fSyDYNixMsI9wREk4jWZ8pp2FC7BdcO3bRZFUyh1xOIfU2f/hem2f2QQ+EavV5BXoucGR/nYGnIdqaGtQHyGLRhp8pD22ihTtkMsUYsZKLlBTafz6ZaRxkyoUNti74h1lNcZeSwiYKz0L/O7ycz9c6FOdVG83i6+Fx8SAWn+nQ7g7+HaBTSbjbtHoo/M6QllMc1TKPVDA+zX8QhcZLPCTa0lApfyEk2gOdd2Xo8jTG4gQXNbjLwjzvz2oTvkYIaUlOF5/c5z4fCCtsCm8RH5NBjOOxDNBHo81YmWQH1UIhwhN5Pe3MNCk+lUDaSsyS7tlPmIIMknf2NeITQF7NWKf/TFqx2PxDez2ib8by7JXaHvHleZaN2YVhLy9WhUciVZ8D1eAzh/YRCqnIK6VtxmHCOZkN43uWEeyztVsKGYqlh43MbXMpBnvK0idl7aITwZrKfKT5bezHjdTmbsd6/YJVvHn/JH1Q69969hLfVy96SVHQ7ua4h7BVgvd/lc0cqdnJ6BJ7nq4zlspFRauFewDXqPSo84n6TiHEFfV5R9/BoJPePcTCPm2ivz2Fv0+YncYwLXa6snxFbRE9Pp8jiPvfeDg7x2P/wFbWPVitAx3L8+xMBBgBa0QNtbOSplwAAAABJRU5ErkJggg==") center no-repeat;
|
||||
background-size:30rpx;
|
||||
}
|
||||
</style>
|
||||
387
packageCa/pagesTest/workValuesTestTitle.vue
Normal file
387
packageCa/pagesTest/workValuesTestTitle.vue
Normal file
@@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>工作价值观测评</text>
|
||||
</view>
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
第{{pageIndex+1}}题
|
||||
</view>
|
||||
<view class="all-title">
|
||||
共{{allNum}}道题
|
||||
</view>
|
||||
<view class="time">
|
||||
约8分钟
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar">
|
||||
<view class="bar-inner" :style="{width: rate + '%'}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
|
||||
<view class="title">{{ item.Title }}</view>
|
||||
<view class="sel-label-block">
|
||||
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常喜欢</view>
|
||||
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">喜欢</view>
|
||||
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">不喜欢</view>
|
||||
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">非常不喜欢</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="pre-btn" @click="prePage">上一题</view>
|
||||
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
|
||||
<view class="slot-content">
|
||||
<view class="tip-layer">
|
||||
<view class="title">提示</view>
|
||||
<view class="desc">确认要放弃测评吗?</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "@/apiCa/testManage.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
list: [],
|
||||
allNum: 0,//总题目数
|
||||
pageIndex: 0, //显示页
|
||||
showBakcTip: false,
|
||||
lastTapTime: 0 ,// 记录上次点击的时间
|
||||
|
||||
historyTitle: [],// 历史题目
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rate: function() {
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
return Math.round(num * 100 / this.allNum)
|
||||
},
|
||||
commit: function(){
|
||||
let num = 0;
|
||||
this.list.forEach(item => {
|
||||
if (item.Value > 0) {
|
||||
num++
|
||||
}
|
||||
});
|
||||
if(num == this.list.length){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getHistoryTitle();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
goback(){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认要放弃测评吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认',
|
||||
confirmColor: '#1677ff',
|
||||
cancelColor: '#999999',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack(-1);
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
}
|
||||
});
|
||||
//uni.navigateBack(-1);
|
||||
},
|
||||
// 上一页
|
||||
prePage() {
|
||||
if (this.pageIndex == 0) {
|
||||
return
|
||||
}
|
||||
this.pageIndex--
|
||||
},
|
||||
//获取答题记录
|
||||
getHistoryTitle(){
|
||||
api.getTestRecordProcessList(17).then(res => {
|
||||
if (res.Result === 1) {
|
||||
let data = res.Data;
|
||||
this.historyTitle = data;
|
||||
this.getTitle();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取题目
|
||||
getTitle() {
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
})
|
||||
api.queryTestContent(17).then(res => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
let list = res.Data.List;
|
||||
list.forEach(item => {
|
||||
item.Value = 0;
|
||||
this.historyTitle.forEach(ritem=>{
|
||||
if(item.TitleId == ritem.TestTitleId){
|
||||
item.Value = Number(ritem.TestResult) + 1;
|
||||
}
|
||||
})
|
||||
})
|
||||
if(this.historyTitle.length == 0){
|
||||
this.pageIndex = 0;
|
||||
}else if(this.historyTitle.length == list.length){
|
||||
this.pageIndex = list.length - 1;
|
||||
}else {
|
||||
this.pageIndex = this.historyTitle.length;
|
||||
}
|
||||
|
||||
this.allNum = list.length;
|
||||
this.list = list;
|
||||
}
|
||||
})
|
||||
},
|
||||
//选中题目
|
||||
checkedTitle(NUM,INDEX){
|
||||
const now = Date.now();
|
||||
if (now - this.lastTapTime < 500) {
|
||||
console.log('双击事件被阻止');
|
||||
return;
|
||||
} else {
|
||||
// 处理单击事件
|
||||
console.log('单击事件被触发');
|
||||
this.lastTapTime = now;
|
||||
this.list[INDEX].Value = NUM;
|
||||
//
|
||||
this.saveTestRecordProcess(this.list[INDEX].TitleId,NUM-1);
|
||||
setTimeout(()=>{
|
||||
if(this.pageIndex != this.list.length - 1){
|
||||
this.pageIndex = INDEX + 1;
|
||||
|
||||
}
|
||||
},300)
|
||||
}
|
||||
},
|
||||
//存储答题记录
|
||||
saveTestRecordProcess(ID,VALUE){
|
||||
let data = {
|
||||
testType: 17,
|
||||
testTitleId: ID,
|
||||
testResult: VALUE
|
||||
}
|
||||
api.saveTestRecordProcess(data).then(res => {
|
||||
if (res.Result === 1) {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交题目
|
||||
submitTitle() {
|
||||
let testStr = "";
|
||||
this.list.forEach(item => {
|
||||
switch (item.Value) {
|
||||
case 4: {
|
||||
testStr += `${item.TitleId}|3,`
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
testStr += `${item.TitleId}|2,`
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
testStr += `${item.TitleId}|1,`
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
testStr += `${item.TitleId}|0,`
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uni.showLoading({
|
||||
title: "提交中"
|
||||
})
|
||||
let data = {
|
||||
testStr
|
||||
}
|
||||
api.removeTestRecordProcess(17).then((res) => {
|
||||
return api.saveWorkValuesResult(data);
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: "success"
|
||||
})
|
||||
let pages = getCurrentPages(); // 当前页面
|
||||
let beforePage = pages[pages.length - 2]; // 上一页
|
||||
beforePage.data.refreshIfNeeded = true;
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/workValuesTestReport?year=${res.Data.Year}`
|
||||
})
|
||||
},1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.Message,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tip-layer {
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.desc {
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 20rpx;
|
||||
text-align: center;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.head-bar {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.go-back {
|
||||
position: absolute;
|
||||
left: 10rpx;
|
||||
top: 0;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.title-wrap {
|
||||
background: #fff;
|
||||
.progress-block {
|
||||
padding: 0 40rpx;
|
||||
.row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.title-index {
|
||||
font-size: 28rpx;
|
||||
color: #1677ff;
|
||||
}
|
||||
.all-title {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 24rpx;
|
||||
color: #20B664;
|
||||
}
|
||||
}
|
||||
.bar {
|
||||
position: relative;
|
||||
width: 670rpx;
|
||||
height: 8rpx;
|
||||
background: #EBEBEB;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
.bar-inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 8rpx;
|
||||
background: #1677ff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 0 40rpx;
|
||||
.item {
|
||||
padding-top: 40rpx;
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.sel-label-block {
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 630rpx;
|
||||
height: 96rpx;
|
||||
padding-left: 40rpx;
|
||||
background: #F5F5F5;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
&.sel {
|
||||
background: #EDF6FF;
|
||||
color: #1677ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 50rpx;
|
||||
.pre-btn {
|
||||
width: 316rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
background: #F8F8F8;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
border: 2rpx solid #EAEAEA;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.com-btn {
|
||||
width: 320rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background: #1677ff;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 60rpx 60rpx 60rpx 60rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user