职业素养功能修改
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getHistoryTitle();
|
||||
this.getTitle();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
@@ -107,16 +107,6 @@
|
||||
});
|
||||
//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({
|
||||
@@ -128,37 +118,7 @@
|
||||
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;
|
||||
}
|
||||
@@ -180,7 +140,6 @@
|
||||
// 处理单击事件
|
||||
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;
|
||||
@@ -188,37 +147,6 @@
|
||||
},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 = "";
|
||||
@@ -249,9 +177,7 @@
|
||||
testStr,
|
||||
testType: 15
|
||||
}
|
||||
api.removeTestRecordProcess(15).then((res) => {
|
||||
return api.saveCharacterTestResult(data);
|
||||
}).then((res) => {
|
||||
api.saveCharacterTestResult(data).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.Result === 1) {
|
||||
uni.showToast({
|
||||
@@ -263,7 +189,7 @@
|
||||
beforePage.data.refreshIfNeeded = true;
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url: `/packageCa/testReport/personalTestReport?year=${res.Data.Year}`
|
||||
url: `/packageCa/testReport/personalTestReport`
|
||||
})
|
||||
},1000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user