|
@@ -586,7 +586,7 @@
|
|
type="primary"
|
|
type="primary"
|
|
@close="handleClose(content)"
|
|
@close="handleClose(content)"
|
|
>
|
|
>
|
|
- {{ content.coursePropertyName }}
|
|
|
|
|
|
+ {{ content.courseProperty.name }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</span>
|
|
</span>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -598,7 +598,7 @@
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="属性名" label-width="60px">
|
|
<el-form-item label="属性名" label-width="60px">
|
|
<el-select
|
|
<el-select
|
|
- v-model="coursePropertyName"
|
|
|
|
|
|
+ v-model="coursePropertyId"
|
|
placeholder="属性名"
|
|
placeholder="属性名"
|
|
class="property_with"
|
|
class="property_with"
|
|
:disabled="updatePorperty"
|
|
:disabled="updatePorperty"
|
|
@@ -607,9 +607,9 @@
|
|
<el-option label="请选择" value=""></el-option>
|
|
<el-option label="请选择" value=""></el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in coursePropertyList"
|
|
v-for="item in coursePropertyList"
|
|
- :key="item.name"
|
|
|
|
|
|
+ :key="item.id"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
- :value="item.name"
|
|
|
|
|
|
+ :value="item.id"
|
|
>
|
|
>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -1064,7 +1064,7 @@ export default {
|
|
{ label: "复用", value: 2 },
|
|
{ label: "复用", value: 2 },
|
|
],
|
|
],
|
|
coursePropertyList: [],
|
|
coursePropertyList: [],
|
|
- coursePropertyName: "", //课程属性名
|
|
|
|
|
|
+ coursePropertyId: "", //课程属性名
|
|
firstPropertyList: [], //一级属性集合
|
|
firstPropertyList: [], //一级属性集合
|
|
firstPropertyId: "", //一级属性id
|
|
firstPropertyId: "", //一级属性id
|
|
secondPropertyList: [], //二级属性集合
|
|
secondPropertyList: [], //二级属性集合
|
|
@@ -1509,7 +1509,7 @@ export default {
|
|
//编辑题目
|
|
//编辑题目
|
|
editQues(paperDetailUnit, question) {
|
|
editQues(paperDetailUnit, question) {
|
|
console.log("question:", question);
|
|
console.log("question:", question);
|
|
- this.coursePropertyName = "";
|
|
|
|
|
|
+ this.coursePropertyId = "";
|
|
this.firstPropertyId = "";
|
|
this.firstPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.editPaperDetailUnit = paperDetailUnit;
|
|
this.editPaperDetailUnit = paperDetailUnit;
|
|
@@ -1602,9 +1602,9 @@ export default {
|
|
this.firstPropertyId = "";
|
|
this.firstPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.secondPropertyList = [];
|
|
this.secondPropertyList = [];
|
|
- if (this.coursePropertyName) {
|
|
|
|
|
|
+ if (this.coursePropertyId) {
|
|
for (let courseProperty of this.coursePropertyList) {
|
|
for (let courseProperty of this.coursePropertyList) {
|
|
- if (courseProperty.name == this.coursePropertyName) {
|
|
|
|
|
|
+ if (courseProperty.id == this.coursePropertyId) {
|
|
this.$http
|
|
this.$http
|
|
.get(QUESTION_API + "/property/first/" + courseProperty.id)
|
|
.get(QUESTION_API + "/property/first/" + courseProperty.id)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
@@ -1632,7 +1632,7 @@ export default {
|
|
}
|
|
}
|
|
var quesProperty = {
|
|
var quesProperty = {
|
|
id: "",
|
|
id: "",
|
|
- coursePropertyName: "",
|
|
|
|
|
|
+ courseProperty: {},
|
|
firstProperty: {},
|
|
firstProperty: {},
|
|
secondProperty: {},
|
|
secondProperty: {},
|
|
};
|
|
};
|
|
@@ -1644,13 +1644,13 @@ export default {
|
|
}
|
|
}
|
|
if (this.secondPropertyId) {
|
|
if (this.secondPropertyId) {
|
|
quesProperty.id =
|
|
quesProperty.id =
|
|
- this.coursePropertyName +
|
|
|
|
|
|
+ this.coursePropertyId +
|
|
"-" +
|
|
"-" +
|
|
this.firstPropertyId +
|
|
this.firstPropertyId +
|
|
"-" +
|
|
"-" +
|
|
this.secondPropertyId;
|
|
this.secondPropertyId;
|
|
} else {
|
|
} else {
|
|
- quesProperty.id = this.coursePropertyName + "-" + this.firstPropertyId;
|
|
|
|
|
|
+ quesProperty.id = this.coursePropertyId + "-" + this.firstPropertyId;
|
|
}
|
|
}
|
|
for (let quesPro of this.quesModel.quesProperties) {
|
|
for (let quesPro of this.quesModel.quesProperties) {
|
|
if (quesPro.id == quesProperty.id) {
|
|
if (quesPro.id == quesProperty.id) {
|
|
@@ -1661,7 +1661,11 @@ export default {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- quesProperty.coursePropertyName = this.coursePropertyName;
|
|
|
|
|
|
+ for (let courseProperty of this.coursePropertyList) {
|
|
|
|
+ if (courseProperty.id == this.coursePropertyId) {
|
|
|
|
+ quesProperty.courseProperty = courseProperty;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
//取到一级属性对象
|
|
//取到一级属性对象
|
|
for (let property of this.firstPropertyList) {
|
|
for (let property of this.firstPropertyList) {
|
|
if (property.id == this.firstPropertyId) {
|
|
if (property.id == this.firstPropertyId) {
|
|
@@ -1690,7 +1694,7 @@ export default {
|
|
this.quesModel.quesProperties.push(quesProperty);
|
|
this.quesModel.quesProperties.push(quesProperty);
|
|
this.quesModel = Object.assign({}, this.quesModel);
|
|
this.quesModel = Object.assign({}, this.quesModel);
|
|
//清空下拉框
|
|
//清空下拉框
|
|
- this.coursePropertyName = "";
|
|
|
|
|
|
+ this.coursePropertyId = "";
|
|
this.firstPropertyId = "";
|
|
this.firstPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.secondPropertyId = "";
|
|
this.firstPropertyList = [];
|
|
this.firstPropertyList = [];
|
|
@@ -1698,7 +1702,7 @@ export default {
|
|
},
|
|
},
|
|
//新增属性验证
|
|
//新增属性验证
|
|
checkInsertPro() {
|
|
checkInsertPro() {
|
|
- if (!this.coursePropertyName) {
|
|
|
|
|
|
+ if (!this.coursePropertyId) {
|
|
this.$notify({
|
|
this.$notify({
|
|
message: "请选择属性",
|
|
message: "请选择属性",
|
|
type: "error",
|
|
type: "error",
|