|
@@ -19,20 +19,29 @@
|
|
|
<el-col :span="10" class="h-100p">
|
|
|
<div class="h-100p flex flex-d-c">
|
|
|
<p>工程节点信息</p>
|
|
|
- <div class="flex">
|
|
|
+ <div class="flex " style="align-items: center;justify-content: space-between;">
|
|
|
<el-input
|
|
|
- placeholder="输入关键字进行过滤"
|
|
|
+ placeholder="输入关键字进行搜索"
|
|
|
v-model="filterText"
|
|
|
- @input="filterChange"
|
|
|
clearable
|
|
|
+ style="width: 70%;margin-right: 15px;"
|
|
|
></el-input>
|
|
|
- <!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
|
|
|
+ <el-switch
|
|
|
+ v-model="searchType"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="2"
|
|
|
+ inline-prompt
|
|
|
+ active-text="按节点"
|
|
|
+ inactive-text="按表名"
|
|
|
+
|
|
|
+
|
|
|
+ />
|
|
|
+ <el-button type="primary" @click="searchTreeClick">搜索</el-button>
|
|
|
</div>
|
|
|
- <div class="flex1 ov-hidden">
|
|
|
+ <div class="flex1 ov-hidden" v-loading="treeLoad">
|
|
|
<el-scrollbar class="h-100p">
|
|
|
- <div v-loading="treeLoad">
|
|
|
+ <div>
|
|
|
<el-tree
|
|
|
- v-show="!filterText"
|
|
|
class="filter-tree"
|
|
|
lazy
|
|
|
:load="loadNode"
|
|
@@ -43,6 +52,7 @@
|
|
|
node-key="id"
|
|
|
ref="tree"
|
|
|
:default-expanded-keys="defaultExpandedKeys"
|
|
|
+ :data="treeData"
|
|
|
>
|
|
|
<span
|
|
|
class="custom-tree-node"
|
|
@@ -84,7 +94,7 @@
|
|
|
</div>
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
- <el-tree
|
|
|
+ <!-- <el-tree
|
|
|
v-show="filterText"
|
|
|
class="filter-tree"
|
|
|
:data="treeData"
|
|
@@ -105,9 +115,6 @@
|
|
|
<div class="pd-r-20">
|
|
|
{{ node.label }}
|
|
|
<div class="normal-black">
|
|
|
- <!-- <el-link :underline="false">
|
|
|
- <i class="el-icon-sort" @click="paixuMD(data)" v-if="node.level != 1" title="调整排序"></i>
|
|
|
- </el-link> -->
|
|
|
<div >
|
|
|
<el-link :underline="false">
|
|
|
<i
|
|
@@ -118,7 +125,7 @@
|
|
|
></i>
|
|
|
</el-link>
|
|
|
|
|
|
- <!-- 因右键自定义菜单事件需要获取当前点击的位置,所以此处绑定动态样式来控制菜单实时跟踪鼠标右键点击位置 -->
|
|
|
+
|
|
|
<ul
|
|
|
v-show="menuvisible"
|
|
|
:style="{ left: menuleft + 'px', top: menutop + 'px' }"
|
|
@@ -132,7 +139,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</span>
|
|
|
- </el-tree>
|
|
|
+ </el-tree> -->
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
@@ -1611,7 +1618,7 @@ import FormulaEditone from '@/views/formula/edit1.vue'
|
|
|
import {
|
|
|
getLazytree, getDetail, update, selectByNodeTable,getParamElements,delParamElements,specifiedParamElements, getAlltree,
|
|
|
saveFormAndElement, selectFormElements, removeTableById, findWbsTreeSameLevel, wbsTreeSort, findWbsTreeTableSameLevel, wbsTreeTableSort, parameters, saveOrUpdateBatch, keymap, importwbsTreeFormBatch, exportBatchTemplate, updateBatchNodeTableInfo,
|
|
|
- importWbsTree, exportTemplate, remove as removeTreeNode,submitFullName,refrehPram
|
|
|
+ importWbsTree, exportTemplate, remove as removeTreeNode,submitFullName,refrehPram,getQueryValueByType
|
|
|
} from "@/api/manager/wbstree";
|
|
|
|
|
|
import {
|
|
@@ -1654,6 +1661,7 @@ export default {
|
|
|
id: '',
|
|
|
filterText: '',
|
|
|
treeData: [],
|
|
|
+ searchType:'1',//搜索类型
|
|
|
treeLoad: false,
|
|
|
menuShow: false,
|
|
|
defaultProps: {
|
|
@@ -1909,6 +1917,26 @@ export default {
|
|
|
return resolve(arr);
|
|
|
})
|
|
|
},
|
|
|
+ //搜索树
|
|
|
+ searchTreeClick(){
|
|
|
+ this.treeLoad=true
|
|
|
+ getQueryValueByType({
|
|
|
+ queryValue:this.filterText,
|
|
|
+ type:this.searchType,
|
|
|
+ wbsId:this.id,
|
|
|
+
|
|
|
+ }).then((res)=>{
|
|
|
+ let arr = [];
|
|
|
+ if (Array.isArray(res.data.data)) {
|
|
|
+ arr = res.data.data;
|
|
|
+ this.treeData=arr
|
|
|
+ }else{
|
|
|
+ this.treeData=[]
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ this.treeLoad=false
|
|
|
+ },
|
|
|
|
|
|
getNodeDetail (data, node) {
|
|
|
let parentName = '';
|
|
@@ -2384,20 +2412,20 @@ export default {
|
|
|
this.nodeDetail.mixRatioTestIds = this.toJoin(newarr)
|
|
|
|
|
|
},
|
|
|
- filterChange () {
|
|
|
- if (this.treeData.length > 0) {
|
|
|
- this.$refs.treeall.filter(this.filterText);
|
|
|
- return;
|
|
|
- }
|
|
|
- this.treeLoad = true;
|
|
|
- getAlltree(this.userInfo.tenant_id, 1, this.id).then((res) => {
|
|
|
- this.treeLoad = false;
|
|
|
- this.treeData = res.data.data;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.treeall.filter(this.filterText);
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
+ // filterChange () {
|
|
|
+ // if (this.treeData.length > 0) {
|
|
|
+ // this.$refs.treeall.filter(this.filterText);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // this.treeLoad = true;
|
|
|
+ // getAlltree(this.userInfo.tenant_id, 1, this.id).then((res) => {
|
|
|
+ // this.treeLoad = false;
|
|
|
+ // this.treeData = res.data.data;
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.treeall.filter(this.filterText);
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
|
|
|
importTemplate (data) {
|
|
|
this.importTemplateVisible = true;
|