|
@@ -51,12 +51,12 @@
|
|
|
<el-table-column label="蓝图属性" width="520" fixed="left">
|
|
|
<el-table-column
|
|
|
label="一级属性"
|
|
|
- width="260"
|
|
|
+ :width="propertyColWidth"
|
|
|
prop="firstPropertyName"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
label="二级属性"
|
|
|
- width="260"
|
|
|
+ :width="propertyColWidth"
|
|
|
prop="secondPropertyName"
|
|
|
></el-table-column>
|
|
|
</el-table-column>
|
|
@@ -113,6 +113,11 @@ export default {
|
|
|
curBlueDataList: [],
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ propertyColWidth() {
|
|
|
+ return this.blueQtypes.length ? 260 : undefined;
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
visibleChange() {
|
|
|
this.filter.courseId = this.courseId;
|
|
@@ -167,6 +172,7 @@ export default {
|
|
|
|
|
|
this.blueDataList = res.data.map((mainGroup) => {
|
|
|
let dataList = [];
|
|
|
+ let blueQtypes = [];
|
|
|
mainGroup.distributeInfo.forEach((item) => {
|
|
|
if (!item.children || !item.children.length) return;
|
|
|
const rowspan = item.children.length;
|
|
@@ -180,8 +186,8 @@ export default {
|
|
|
elem.distributeByQuestionTypeList.forEach((qt) => {
|
|
|
nelem[qt.sourceDetailName] = this.getQuesDiffContent(qt);
|
|
|
});
|
|
|
- if (!this.blueQtypes.length) {
|
|
|
- this.blueQtypes = elem.distributeByQuestionTypeList.map(
|
|
|
+ if (!blueQtypes.length) {
|
|
|
+ blueQtypes = elem.distributeByQuestionTypeList.map(
|
|
|
(qt) => qt.sourceDetailName
|
|
|
);
|
|
|
}
|
|
@@ -192,11 +198,13 @@ export default {
|
|
|
return {
|
|
|
name: mainGroup.coursePropertyName,
|
|
|
dataList,
|
|
|
+ blueQtypes,
|
|
|
};
|
|
|
});
|
|
|
if (!this.blueDataList.length) return;
|
|
|
this.curProperty = this.blueDataList[0].name;
|
|
|
this.curBlueDataList = this.blueDataList[0].dataList;
|
|
|
+ this.blueQtypes = this.blueDataList[0].blueQtypes;
|
|
|
},
|
|
|
propertyChange() {
|
|
|
const data = this.blueDataList.find(
|
|
@@ -204,6 +212,7 @@ export default {
|
|
|
);
|
|
|
if (!data) return;
|
|
|
this.curBlueDataList = data.dataList;
|
|
|
+ this.blueQtypes = data.blueQtypes;
|
|
|
},
|
|
|
},
|
|
|
};
|