|
|
@ -155,7 +155,7 @@ |
|
|
|
v-for="(item, index) in scope.row.items" |
|
|
|
v-for="(item, index) in scope.row.items" |
|
|
|
:key="index" |
|
|
|
:key="index" |
|
|
|
:label="item.options" |
|
|
|
:label="item.options" |
|
|
|
:value="item.itemId" |
|
|
|
:value="item.subjectId" |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -388,6 +388,7 @@ export default { |
|
|
|
// 重新封装数据 |
|
|
|
// 重新封装数据 |
|
|
|
let length = judgmentRuleList.length; |
|
|
|
let length = judgmentRuleList.length; |
|
|
|
let tempArr = []; |
|
|
|
let tempArr = []; |
|
|
|
|
|
|
|
console.log(judgmentRuleList) |
|
|
|
judgmentRuleList.forEach((item, index) => { |
|
|
|
judgmentRuleList.forEach((item, index) => { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
...item, |
|
|
|
...item, |
|
|
@ -398,7 +399,7 @@ export default { |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
if (item.type == 1 || item.type == 2) { |
|
|
|
if (item.type == 1 || item.type == 2) { |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.value1 = Number(item.emptyTwo); |
|
|
|
obj.value1 = item.itemId; |
|
|
|
} else if (item.type == 3) { |
|
|
|
} else if (item.type == 3) { |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.subjectId = Number(item.emptyOne); |
|
|
|
obj.value1 = item.emptyTwo; |
|
|
|
obj.value1 = item.emptyTwo; |
|
|
@ -567,8 +568,9 @@ export default { |
|
|
|
let obj = { |
|
|
|
let obj = { |
|
|
|
emptyOne: "", |
|
|
|
emptyOne: "", |
|
|
|
emptyTwo: "", |
|
|
|
emptyTwo: "", |
|
|
|
id: i.id ? i.id : "", |
|
|
|
id: "", |
|
|
|
lcId: i.lcId, |
|
|
|
lcId: i.lcId, |
|
|
|
|
|
|
|
itemId:'', |
|
|
|
type: i.type ? i.type : "", |
|
|
|
type: i.type ? i.type : "", |
|
|
|
operationIds: i.operationIds, |
|
|
|
operationIds: i.operationIds, |
|
|
|
resultOperation: i.resultOperation, |
|
|
|
resultOperation: i.resultOperation, |
|
|
@ -577,7 +579,7 @@ export default { |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
//题目类型(1选择 2判断 3填空 4问答 5指标结果) |
|
|
|
if (i.type == 1 || i.type == 2) { |
|
|
|
if (i.type == 1 || i.type == 2) { |
|
|
|
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; |
|
|
|
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; |
|
|
|
obj.emptyTwo = i.value1 ? i.value1.toString() : ""; |
|
|
|
obj.itemId = i.value1 ? i.value1.toString() : ""; |
|
|
|
} else if (i.type == 3) { |
|
|
|
} else if (i.type == 3) { |
|
|
|
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; |
|
|
|
obj.emptyOne = i.subjectId ? i.subjectId.toString() : ""; |
|
|
|
obj.emptyTwo = i.value1; |
|
|
|
obj.emptyTwo = i.value1; |
|
|
@ -596,7 +598,7 @@ export default { |
|
|
|
tempArr.push(obj); |
|
|
|
tempArr.push(obj); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
console.log(tempArr) |
|
|
|
this.formData.lcJudgmentRuleList = tempArr; |
|
|
|
this.formData.lcJudgmentRuleList = tempArr; |
|
|
|
if (this.isAdd) { // 新增判分点 |
|
|
|
if (this.isAdd) { // 新增判分点 |
|
|
|
this.$post(this.api.addJudgmentPoint, this.formData).then(res => { |
|
|
|
this.$post(this.api.addJudgmentPoint, this.formData).then(res => { |
|
|
@ -610,6 +612,7 @@ export default { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else if (this.isEdit) { // 编辑判分点 |
|
|
|
} else if (this.isEdit) { // 编辑判分点 |
|
|
|
|
|
|
|
console.log(this.formData) |
|
|
|
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { |
|
|
|
this.$post(this.api.updateJudgmentPoint, this.formData).then(res => { |
|
|
|
if (res.status === 200) { |
|
|
|
if (res.status === 200) { |
|
|
|
this.$message.success("更新判分点成功"); |
|
|
|
this.$message.success("更新判分点成功"); |
|
|
|