|
@@ -14,7 +14,7 @@
|
|
|
<el-button type="primary" @click="addComputedHandler" style="margin-right:10px;">计算指标</el-button>
|
|
|
<change-lang :lang="currentLang" style="height: 32px;" @changeLang="changeLangHandle"/>
|
|
|
</div>
|
|
|
- <div class="search-cont">
|
|
|
+ <div class="search-cont" v-loading="searchLoading">
|
|
|
<el-select
|
|
|
v-model="search_txt"
|
|
|
ref="searchRef"
|
|
@@ -177,6 +177,7 @@
|
|
|
ref="detailComponentRef"
|
|
|
|
|
|
@updateTit="setNameBack"
|
|
|
+ @setCurrentClassify="setCurrentClassify"
|
|
|
@setOpera="(obj) => { edbButton = obj }"
|
|
|
@openEnNameDia="openEnNameDia"
|
|
|
/>
|
|
@@ -216,17 +217,7 @@
|
|
|
</el-col>
|
|
|
</div>
|
|
|
<div v-if="!edb_total" class="nodata">
|
|
|
- <img
|
|
|
- src="~@/assets/img/data_m/table_no.png"
|
|
|
- alt=""
|
|
|
- style="
|
|
|
- display: block;
|
|
|
- width: 140px;
|
|
|
- height: 148px;
|
|
|
- margin: 10% auto 0;
|
|
|
- "
|
|
|
- />
|
|
|
- 暂无指标
|
|
|
+ <tableNoData text="暂无指标"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -556,6 +547,7 @@ export default {
|
|
|
/* 查看历史弹窗 */
|
|
|
isLookHistory: false,
|
|
|
lookEdbId: 0,
|
|
|
+ searchLoading:false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -621,7 +613,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setCurrentClassify(classifyId){
|
|
|
+ //获取指标详情后才能拿到准确的classifyId
|
|
|
+ //根据准备的id查找指标的父级目录并展开
|
|
|
+ let deep_arr = _.cloneDeep(this.treeData);
|
|
|
+ let arr = this.findParentNodeHandle(deep_arr, classifyId).reverse();
|
|
|
|
|
|
+ this.defaultShowNodes = arr;
|
|
|
+ this.$refs.treeRef.setCurrentKey(this.select_node);
|
|
|
+
|
|
|
+ //滚动到高亮节点位置
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
+ const dom = document.querySelector(".el-tree-node.is-current");
|
|
|
+ const parentDom = document.querySelector(".tree-cont");
|
|
|
+ if (!dom || !parentDom) {
|
|
|
+ this.searchLoading = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (dom.offsetTop > parentDom.offsetHeight) {
|
|
|
+ parentDom.scrollTo({
|
|
|
+ top: dom.offsetTop - parentDom.offsetHeight / 2,
|
|
|
+ left: 0,
|
|
|
+ behavior: "smooth",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.searchLoading = false;
|
|
|
+ }, 300);
|
|
|
+ })
|
|
|
+ },
|
|
|
setNameBack({edb_name,edb_nameEn,userid}) {
|
|
|
this.edbName=edb_name;
|
|
|
this.edb_nameEn= edb_nameEn;
|