|
@@ -50,15 +50,23 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="属性列表">
|
|
<el-form-item label="属性列表">
|
|
<el-tag
|
|
<el-tag
|
|
- v-for="item in modalForm.quesProperties"
|
|
|
|
- :key="item.key"
|
|
|
|
- style="margin-right: 5px"
|
|
|
|
|
|
+ v-for="content in modalForm.quesProperties"
|
|
|
|
+ :key="content.key"
|
|
closable
|
|
closable
|
|
effect="dark"
|
|
effect="dark"
|
|
type="primary"
|
|
type="primary"
|
|
- @close="removeProperty(item)"
|
|
|
|
|
|
+ style="margin-right: 5px; margin-bottom: 5px"
|
|
|
|
+ @close="removeProperty(content)"
|
|
>
|
|
>
|
|
- {{ item.name }}
|
|
|
|
|
|
+ {{ content.courseProperty && content.courseProperty.name }}
|
|
|
|
+ <span style="margin: 0 3px">/</span>
|
|
|
|
+ {{ content.firstProperty && content.firstProperty.name }}
|
|
|
|
+ <span
|
|
|
|
+ v-if="content.secondProperty && content.secondProperty.name"
|
|
|
|
+ style="margin: 0 3px"
|
|
|
|
+ >/</span
|
|
|
|
+ >
|
|
|
|
+ {{ content.secondProperty && content.secondProperty.name }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -105,9 +113,7 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
propSelected() {
|
|
propSelected() {
|
|
return (
|
|
return (
|
|
- this.properties.coursePropertyId &&
|
|
|
|
- this.properties.firstPropertyId &&
|
|
|
|
- this.properties.secondPropertyId
|
|
|
|
|
|
+ this.properties.coursePropertyId && this.properties.firstPropertyId
|
|
);
|
|
);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -119,7 +125,6 @@ export default {
|
|
let modalForm = this.$objAssign(initModalForm, this.question);
|
|
let modalForm = this.$objAssign(initModalForm, this.question);
|
|
modalForm.quesProperties.forEach((item) => {
|
|
modalForm.quesProperties.forEach((item) => {
|
|
item.key = `${item.courseProperty.id}_${item.firstProperty.id}_${item.secondProperty.id}`;
|
|
item.key = `${item.courseProperty.id}_${item.firstProperty.id}_${item.secondProperty.id}`;
|
|
- item.name = `${item.courseProperty.name},${item.firstProperty.name},${item.secondProperty.name}`;
|
|
|
|
});
|
|
});
|
|
this.modalForm = modalForm;
|
|
this.modalForm = modalForm;
|
|
},
|
|
},
|
|
@@ -142,7 +147,6 @@ export default {
|
|
if (!this.propSelected) return;
|
|
if (!this.propSelected) return;
|
|
const newProperty = {
|
|
const newProperty = {
|
|
key: `${this.properties.coursePropertyId}_${this.properties.firstPropertyId}_${this.properties.secondPropertyId}`,
|
|
key: `${this.properties.coursePropertyId}_${this.properties.firstPropertyId}_${this.properties.secondPropertyId}`,
|
|
- name: `${this.selection.courseProperty.name},${this.selection.firstProperty.name},${this.selection.secondProperty.name}`,
|
|
|
|
...this.selection,
|
|
...this.selection,
|
|
};
|
|
};
|
|
const propertyExist = this.modalForm.quesProperties.find(
|
|
const propertyExist = this.modalForm.quesProperties.find(
|