| | |
| | | :destroyOnClose="true" |
| | | @cancel="fileTreeViewVisible = false" |
| | | > |
| | | <a-input-search |
| | | style="margin-bottom: 8px" |
| | | v-model="searchValue" |
| | | placeholder="输入关键词搜索文件名" |
| | | @change="searchChanged" |
| | | /> |
| | | <div class="log-content"> |
| | | <a-tree |
| | | class="file-tree-view" |
| | | v-if="fileTreeView.length" |
| | | v-if="fileTreeView.length && treeReset" |
| | | :show-line="true" |
| | | defaultExpandAll |
| | | :tree-data="fileTreeView" |
| | | :tree-data="fileTreeViewRes" |
| | | > |
| | | <template slot="custom" slot-scope="item"> |
| | | <div class="flex-r space-between"> |
| | | <span class="node-title">{{ item.title }} </span> |
| | | <span v-if="item.title.indexOf(searchValue) > -1"> |
| | | {{ item.title.substr(0, item.title.indexOf(searchValue)) }} |
| | | <span style="color: #f50">{{ searchValue }}</span> |
| | | {{ |
| | | item.title.substr( |
| | | item.title.indexOf(searchValue) + searchValue.length |
| | | ) |
| | | }} |
| | | </span> |
| | | <span v-else class="node-title">{{ item.title }} </span> |
| | | <span |
| | | class="icon-wrap" |
| | | v-if="item.isLeaf && viewAble(item.type)" |
| | |
| | | mixins: [WSMixin], |
| | | data() { |
| | | return { |
| | | treeReset: true, |
| | | searchValue: "", |
| | | imgUrl: "", |
| | | previewVisible: false, |
| | | showSop: false, |
| | |
| | | // 有状态为-1的版本在 |
| | | hasLock() { |
| | | return this.versionList.some((v) => v.enabled == -1); |
| | | }, |
| | | fileTreeViewRes() { |
| | | let resList = this.fileTreeView.filter((v) => { |
| | | let fileName = v.split("\\").pop(); |
| | | return fileName.indexOf(this.searchValue) > -1; |
| | | }); |
| | | |
| | | let { |
| | | children: [ |
| | | { |
| | | children: [{ children: list }], |
| | | }, |
| | | ], |
| | | } = this.format(resList, false); |
| | | return list; |
| | | }, |
| | | }, |
| | | watch: { |
| | |
| | | if (code && data) { |
| | | // console.log(data); |
| | | this.$message.success("解析成功"); |
| | | let { |
| | | children: [ |
| | | { |
| | | children: [{ children: list1 }], |
| | | }, |
| | | ], |
| | | } = this.format(data2, false); |
| | | list = list1; |
| | | // let { |
| | | // children: [ |
| | | // { |
| | | // children: [{ children: list1 }], |
| | | // }, |
| | | // ], |
| | | // } = this.format(data2, false); |
| | | // list = list1; |
| | | list = data2; |
| | | } else { |
| | | this.$message.error(msg); |
| | | } |
| | |
| | | handleCancel() { |
| | | this.previewVisible = false; |
| | | }, |
| | | searchChanged() { |
| | | this.treeReset = false; |
| | | this.$nextTick(() => { |
| | | this.treeReset = true; |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.searchAllUserList(); |