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