|
@@ -173,16 +173,18 @@ function clickschool (val, state) {
|
|
|
}
|
|
|
//确认拷贝
|
|
|
function confirmClick () {
|
|
|
- console.log(targetData.value, props, '查看准备拷贝的目标')
|
|
|
+ console.log(targetData.value, '查看准备拷贝的目标')
|
|
|
for (let items of targetData.value) {
|
|
|
- if (items.modelValue) { ElMessage.error('请选择试卷拷贝学校信息'); return }
|
|
|
+ if (!items.modelValue) { ElMessage.error('请选择试卷拷贝学校信息'); return }
|
|
|
}
|
|
|
let subjectText = ''
|
|
|
let result = targetData.value[2].listdata.find((item) => { return item.id === targetData.value[2].modelValue })
|
|
|
- // targetData.value[3].modelValue.forEach((value) => { value = String(value) })
|
|
|
- // for (let item of targetData.value[3].modelValue) {
|
|
|
- // item = item.toString()
|
|
|
- // }
|
|
|
+ targetData.value[3].modelValue.forEach((value) => { value = String(value) })
|
|
|
+ let tostringModel = []
|
|
|
+ for (let item of targetData.value[3].modelValue) {
|
|
|
+ // item = item.toString()
|
|
|
+ tostringModel.push(item.toString())
|
|
|
+ }
|
|
|
subjectText = result.name
|
|
|
let data = {
|
|
|
'papers':
|
|
@@ -190,7 +192,7 @@ function confirmClick () {
|
|
|
{ "oldId": props.paperdata.id, "oldSc": props.paperdata.schoolcode }
|
|
|
],
|
|
|
newSc: [
|
|
|
- { "newSc": targetData.value[0].modelValue[1], "newPrdId": targetData.value[1].modelValue, "newSubId": targetData.value[2].modelValue, "newSubName": subjectText, "newGrId": [targetData.value[3].modelValue.toString()] }
|
|
|
+ { "newSc": targetData.value[0].modelValue[1], "newPrdId": targetData.value[1].modelValue, "newSubId": targetData.value[2].modelValue, "newSubName": subjectText, "newGrId": tostringModel }
|
|
|
]
|
|
|
}
|
|
|
console.log(data, '提交的数据')
|