|
@@ -648,6 +648,7 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
placeholder="请输入分类名称"
|
|
placeholder="请输入分类名称"
|
|
|
v-model="categoryFilterText"
|
|
v-model="categoryFilterText"
|
|
|
|
|
+ @input="monitorClassification()"
|
|
|
size="small"
|
|
size="small"
|
|
|
clearable
|
|
clearable
|
|
|
prefix-icon="el-icon-search">
|
|
prefix-icon="el-icon-search">
|
|
@@ -663,6 +664,7 @@
|
|
|
:props="{ label: 'cateName', children: 'children' }"
|
|
:props="{ label: 'cateName', children: 'children' }"
|
|
|
@node-click="handleCategoryClick"
|
|
@node-click="handleCategoryClick"
|
|
|
:expand-on-click-node="false"
|
|
:expand-on-click-node="false"
|
|
|
|
|
+ :current-node-key="monitorCateId"
|
|
|
default-expand-all>
|
|
default-expand-all>
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
<span>{{ node.label }}</span>
|
|
<span>{{ node.label }}</span>
|
|
@@ -924,6 +926,10 @@ export default {
|
|
|
currentRow: null,
|
|
currentRow: null,
|
|
|
// 分类树相关数据
|
|
// 分类树相关数据
|
|
|
categoryFilterText: '',
|
|
categoryFilterText: '',
|
|
|
|
|
+ monitorClassificationValue:'',
|
|
|
|
|
+ monitorCateId:null,
|
|
|
|
|
+ monitorData:{},
|
|
|
|
|
+ monitorNode:null,
|
|
|
categoryTreeData: [],
|
|
categoryTreeData: [],
|
|
|
add: false,
|
|
add: false,
|
|
|
// 题目列表
|
|
// 题目列表
|
|
@@ -2079,6 +2085,20 @@ export default {
|
|
|
cateName: '全部',
|
|
cateName: '全部',
|
|
|
children: treeDate
|
|
children: treeDate
|
|
|
}];
|
|
}];
|
|
|
|
|
+
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.monitorClassificationValue) {
|
|
|
|
|
+ this.categoryFilterText = this.monitorClassificationValue;
|
|
|
|
|
+ //触发分类树筛选
|
|
|
|
|
+ if (this.$refs.categoryTree) {
|
|
|
|
|
+ this.$refs.categoryTree.filter(this.monitorClassificationValue);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.$refs.categoryTree && this.monitorCateId !== null && this.monitorCateId !== undefined) {
|
|
|
|
|
+ this.$refs.categoryTree.setCurrentKey(this.monitorCateId);
|
|
|
|
|
+ this.handleCategoryClick(this.monitorData,this.monitorNode);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
filterNode(value, data) {
|
|
filterNode(value, data) {
|
|
@@ -2087,6 +2107,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 处理分类点击 */
|
|
/** 处理分类点击 */
|
|
|
handleCategoryClick(data, node) {
|
|
handleCategoryClick(data, node) {
|
|
|
|
|
+ this.monitorCateId = data.cateId;
|
|
|
|
|
+ this.monitorData = data;
|
|
|
|
|
+ this.monitorNode = node;
|
|
|
|
|
+ console.log("打印数据----------》", data);
|
|
|
|
|
+
|
|
|
// 更新查询参数
|
|
// 更新查询参数
|
|
|
this.projectQueryParams.pageNum = 1;
|
|
this.projectQueryParams.pageNum = 1;
|
|
|
|
|
|
|
@@ -2495,6 +2520,9 @@ export default {
|
|
|
this.projectSelectionCache[type] = [];
|
|
this.projectSelectionCache[type] = [];
|
|
|
}
|
|
}
|
|
|
this.$message.success('已清空题目选择缓存');
|
|
this.$message.success('已清空题目选择缓存');
|
|
|
|
|
+ },
|
|
|
|
|
+ monitorClassification(){
|
|
|
|
|
+ this.monitorClassificationValue = this.categoryFilterText;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|