|
|
@@ -8,6 +8,14 @@
|
|
|
</div>
|
|
|
<div class="textbook-chapter">
|
|
|
<div class="textbook-chapter__header">
|
|
|
+ <div class="search-left">
|
|
|
+ <label class="label-btn" :class="[search_scope === 0 ? 'active' : '']" @click="changeScope(0)">
|
|
|
+ 当前节点
|
|
|
+ </label>
|
|
|
+ <label class="label-btn" :class="[search_scope === 1 ? 'active' : '']" @click="changeScope(1)">
|
|
|
+ 本节点以及所有子节点
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
<div class="courseware">
|
|
|
<div class="operator flex">
|
|
|
<span class="link" @click="handleAdd">上传</span>
|
|
|
@@ -343,6 +351,7 @@ export default {
|
|
|
},
|
|
|
], // 类型分类
|
|
|
type_index: 0, // 类型索引
|
|
|
+ search_scope: 0, // 搜索范围
|
|
|
sort_list: [
|
|
|
{
|
|
|
value: 'name',
|
|
|
@@ -589,6 +598,11 @@ export default {
|
|
|
this.acceptFileType = this.acceptFileTypeList[index];
|
|
|
this.queryList('');
|
|
|
},
|
|
|
+ // 切换搜索范围
|
|
|
+ changeScope(val) {
|
|
|
+ this.search_scope = val;
|
|
|
+ this.queryList('');
|
|
|
+ },
|
|
|
// 查询列表
|
|
|
queryList(data) {
|
|
|
this.boxLoading = true;
|
|
|
@@ -613,6 +627,7 @@ export default {
|
|
|
type: this.type_list[this.type_index].value,
|
|
|
name_or_label: this.search_content,
|
|
|
order_column_list,
|
|
|
+ search_scope: this.search_scope,
|
|
|
};
|
|
|
PageQueryProjectResourceList(datas)
|
|
|
.then(({ total_count, resource_list }) => {
|
|
|
@@ -1026,7 +1041,7 @@ export default {
|
|
|
&__header {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
+ justify-content: space-between;
|
|
|
height: 40px;
|
|
|
padding: 6px 4px;
|
|
|
margin-bottom: 5px;
|
|
|
@@ -1055,25 +1070,6 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
padding: 5px;
|
|
|
|
|
|
- .search-left {
|
|
|
- display: flex;
|
|
|
- flex-flow: wrap;
|
|
|
- gap: 5px;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
-
|
|
|
- .label-btn {
|
|
|
- padding: 5px 10px;
|
|
|
- cursor: pointer;
|
|
|
- background: #ebebeb;
|
|
|
- border-radius: 4px;
|
|
|
-
|
|
|
- &.active {
|
|
|
- color: #f90;
|
|
|
- background: #ffefd6;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
.el-input,
|
|
|
.el-select {
|
|
|
width: 120px;
|
|
|
@@ -1081,6 +1077,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .search-left {
|
|
|
+ display: flex;
|
|
|
+ flex-flow: wrap;
|
|
|
+ gap: 5px;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label-btn {
|
|
|
+ padding: 5px 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #ebebeb;
|
|
|
+ border-radius: 4px;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ color: #f90;
|
|
|
+ background: #ffefd6;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.sources-box {
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|