|
@@ -14,7 +14,7 @@
|
|
|
type="primary" @click="$router.push({path: '/adjustdata'})"><!-- 数据调整 -->{{$t('EtaBasePage.adjustment_btn')}}</el-button>
|
|
|
</div>
|
|
|
<div class="top-right">
|
|
|
-
|
|
|
+
|
|
|
<el-select
|
|
|
v-model="search_txt"
|
|
|
v-loadMore="searchLoad"
|
|
@@ -66,13 +66,10 @@
|
|
|
<el-radio-group
|
|
|
v-model="classifyShowType"
|
|
|
@input="handleChangeClassifyType"
|
|
|
- v-if="isBasicBase"
|
|
|
+ v-if="!isBasicBase"
|
|
|
>
|
|
|
- <el-radio-button label="public">
|
|
|
- 公共指标库
|
|
|
- </el-radio-button>
|
|
|
- <el-radio-button label="own">
|
|
|
- 个人收藏
|
|
|
+ <el-radio-button :label="item.key" v-for="item in classifyTabs" :key="item.key">
|
|
|
+ {{item.label}}
|
|
|
</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
|
|
@@ -85,10 +82,10 @@
|
|
|
remote
|
|
|
clearable
|
|
|
:placeholder="$t('Edb.InputHolderAll.input_name_orid')"
|
|
|
- style="width: 260px;"
|
|
|
:remote-method="searchHandle"
|
|
|
@click.native="inputFocusHandle"
|
|
|
@keyup.enter.native="getEdbChartList"
|
|
|
+ style="width: 100%"
|
|
|
>
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
<el-option
|
|
@@ -109,134 +106,174 @@
|
|
|
</div>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
-
|
|
|
- <div style="padding:20px 0;padding-right:20px;display:flex;justify-content:space-between">
|
|
|
- <span><!-- 目录 -->{{$t('EtaBasePage.tab_menu')}}</span>
|
|
|
- </div>
|
|
|
- <div class="target_tree">
|
|
|
- <!-- 指标目录 -->
|
|
|
- <el-tree
|
|
|
- v-if="classifyShowType==='public'"
|
|
|
- ref="menuTree"
|
|
|
- :data="treeData"
|
|
|
- node-key="UniqueCode"
|
|
|
- :props="defaultProp"
|
|
|
- :allow-drag="canDragHandle"
|
|
|
- :allow-drop="canDropHandle"
|
|
|
- :current-node-key="select_node"
|
|
|
- :default-expanded-keys="defaultShowNodes"
|
|
|
- :draggable="isEdbBtnShow('moveCatalog')"
|
|
|
- :expand-on-click-node="false"
|
|
|
- check-strictly
|
|
|
- empty-text="暂无目录"
|
|
|
- lazy
|
|
|
- :load="getLazyTreeData"
|
|
|
- @node-expand="handleNodeExpand"
|
|
|
- @node-collapse="handleNodeCollapse"
|
|
|
- @current-change="nodeChange"
|
|
|
- @node-drop="dropOverHandle"
|
|
|
- @node-drag-end="dropMouseLeave"
|
|
|
- @node-drag-leave="dropMouseLeave"
|
|
|
- @node-drag-enter="dropMouseOver"
|
|
|
+
|
|
|
+ <!-- 我的 公共指标目录 -->
|
|
|
+ <div
|
|
|
+ class="target_tree"
|
|
|
+ v-if="['public','own'].includes(classifyShowType)"
|
|
|
+ :style="`${isBasicBase?'height:calc(100vh - 200px)':'height: calc(100vh - 300px)'}`"
|
|
|
+ >
|
|
|
+ <div class="own-tree"
|
|
|
+ :style="`height:${(classifyShowType==='own'&&!isBasicBase )?'60%':'100%'}`"
|
|
|
>
|
|
|
- <span
|
|
|
- class="custom-tree-node"
|
|
|
- slot-scope="{ node, data }"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- ref="editVal"
|
|
|
- style="width: 90px"
|
|
|
- placeholder="请输入值"
|
|
|
- class="label-input"
|
|
|
- v-model="new_label"
|
|
|
- v-if="data.isEdit&&isEdbBtnShow('editCatalog')"
|
|
|
- @blur="changeValue(node, data)"
|
|
|
- />
|
|
|
- <span
|
|
|
- @dblclick.stop="editNodeLabel(node, data)"
|
|
|
- v-else
|
|
|
- class="text_oneLine node_label"
|
|
|
- :style="`width:${(select_node === data.UniqueCode ? '40%' :'90%') || ''}`"
|
|
|
- :id="`node${data.UniqueCode}`"
|
|
|
- >
|
|
|
- <img
|
|
|
- :src="$icons.lock_ico2"
|
|
|
- width="18"
|
|
|
- height="18"
|
|
|
- style="vertical-align:middle"
|
|
|
- v-if="!data.HaveOperaAuth&&data.EdbInfoId"
|
|
|
- />
|
|
|
- <span>{{ currentLang==='en' ? (data.ClassifyNameEn||data.ClassifyName) : data.ClassifyName }}</span>
|
|
|
- </span>
|
|
|
- <span
|
|
|
- style="display: flex; align-items: center"
|
|
|
- v-if="select_node===data.UniqueCode&&data.HaveOperaAuth"
|
|
|
+ <div class="tree-title">目录</div>
|
|
|
+ <div class="tree-wrapper">
|
|
|
+ <el-tree
|
|
|
+ ref="menuTree"
|
|
|
+ :data="treeData"
|
|
|
+ node-key="UniqueCode"
|
|
|
+ :props="defaultProp"
|
|
|
+ :allow-drag="canDragHandle"
|
|
|
+ :allow-drop="canDropHandle"
|
|
|
+ :current-node-key="select_node"
|
|
|
+ :default-expanded-keys="defaultShowNodes"
|
|
|
+ :draggable="isEdbBtnShow('moveCatalog')"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ check-strictly
|
|
|
+ empty-text="暂无目录"
|
|
|
+ lazy
|
|
|
+ :load="getLazyTreeData"
|
|
|
+ @node-expand="handleNodeExpand"
|
|
|
+ @node-collapse="handleNodeCollapse"
|
|
|
+ @current-change="nodeChange"
|
|
|
+ @node-drop="dropOverHandle"
|
|
|
+ @node-drag-end="dropMouseLeave"
|
|
|
+ @node-drag-leave="dropMouseLeave"
|
|
|
+ @node-drag-enter="dropMouseOver"
|
|
|
>
|
|
|
- <!-- <img
|
|
|
- src="~@/assets/img/data_m/move_ico.png"
|
|
|
- alt=""
|
|
|
- style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
- v-if="data.Button.MoveButton&&isEdbBtnShow('moveCatalog')"
|
|
|
- /> -->
|
|
|
- <!-- 添加子项 -->
|
|
|
- <img
|
|
|
- src="~@/assets/img/set_m/add.png"
|
|
|
- alt=""
|
|
|
- style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
- @click.stop="addNode(node,data)"
|
|
|
- v-if="data.Button.AddButton&&isEdbBtnShow('editCatalog')&&node.level<9"
|
|
|
- />
|
|
|
- <!-- 编辑节点 如果是分类,判断data.Button.OpButton不变;如果是指标,不显示(ETA1.0.3) -->
|
|
|
- <img
|
|
|
- src="~@/assets/img/set_m/edit.png"
|
|
|
- alt=""
|
|
|
- style="width: 15px; height: 14px; margin-right: 8px"
|
|
|
- @click.stop="editNode(node,data)"
|
|
|
- v-if="!data.EdbCode&&(data.Button.OpButton)&&isEdbBtnShow('editCatalog')"
|
|
|
- />
|
|
|
- <!-- 删除节点 如果是分类,判断data.Button.DeleteButton不变;如果是指标,不显示(ETA1.0.3) -->
|
|
|
- <img
|
|
|
- slot="reference"
|
|
|
- src="~@/assets/img/set_m/del_icon.png"
|
|
|
- alt=""
|
|
|
- style="width: 14px; height: 14px;"
|
|
|
- @click.stop="removeNode(node,data)"
|
|
|
- v-if="!data.EdbCode&&(data.Button.DeleteButton)&&isEdbBtnShow('deleteCatalog')"
|
|
|
+ <div
|
|
|
+ class="custom-tree-node"
|
|
|
+ slot-scope="{ node, data }"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="text_oneLine node_label"
|
|
|
+ :style="`width:${(select_node === data.UniqueCode ? '40%' :'90%') || ''}`"
|
|
|
+ :id="`node${data.UniqueCode}`"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="$icons.lock_ico2"
|
|
|
+ width="18"
|
|
|
+ height="18"
|
|
|
+ style="vertical-align:middle"
|
|
|
+ v-if="!data.HaveOperaAuth&&data.EdbInfoId"
|
|
|
+ />
|
|
|
+ <span>{{ currentLang==='en' ? (data.ClassifyNameEn||data.ClassifyName) : data.ClassifyName }}</span>
|
|
|
+ </span>
|
|
|
+ <span
|
|
|
+ style="display: flex; align-items: center"
|
|
|
+ v-if="select_node===data.UniqueCode&&data.HaveOperaAuth"
|
|
|
+ >
|
|
|
+ <!-- <img
|
|
|
+ src="~@/assets/img/data_m/move_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
+ v-if="data.Button.MoveButton&&isEdbBtnShow('moveCatalog')"
|
|
|
+ /> -->
|
|
|
+ <!-- 添加子项 -->
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/add.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
+ @click.stop="addNode(node,data)"
|
|
|
+ v-if="data.Button.AddButton&&isEdbBtnShow('editCatalog')&&node.level<9"
|
|
|
+ />
|
|
|
+ <!-- 编辑节点 如果是分类,判断data.Button.OpButton不变;如果是指标,不显示(ETA1.0.3) -->
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/edit.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 15px; height: 14px; margin-right: 8px"
|
|
|
+ @click.stop="editNode(node,data)"
|
|
|
+ v-if="!data.EdbCode&&(data.Button.OpButton)&&isEdbBtnShow('editCatalog')"
|
|
|
+ />
|
|
|
+ <!-- 删除节点 如果是分类,判断data.Button.DeleteButton不变;如果是指标,不显示(ETA1.0.3) -->
|
|
|
+ <img
|
|
|
+ slot="reference"
|
|
|
+ src="~@/assets/img/set_m/del_icon.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 14px; height: 14px;"
|
|
|
+ @click.stop="removeNode(node,data)"
|
|
|
+ v-if="!data.EdbCode&&(data.Button.DeleteButton)&&isEdbBtnShow('deleteCatalog')"
|
|
|
+ />
|
|
|
+
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-tree>
|
|
|
+ </div>
|
|
|
+ <div class="opt-wrapper">
|
|
|
+ <!-- 新增分类 -->
|
|
|
+ <div class="opt-item" @click="addLevelOneHandle" v-if="CanOpClassify&&isEdbBtnShow('editCatalog')">
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/add_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 16px; height: 16px; margin-right: 5px"
|
|
|
+ />
|
|
|
+ <span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
|
|
|
+ </div>
|
|
|
+ <!-- 移动指标 -->
|
|
|
+ <div class="opt-item">
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/move_batch_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 16px; height: 16px; margin-right: 5px"
|
|
|
+ />
|
|
|
+ <span>批量移动指标</span>
|
|
|
+ </div>
|
|
|
+ <template v-if="classifyShowType==='own'">
|
|
|
+ <!-- 共享指标 -->
|
|
|
+ <div class="opt-item" @click="handleOpenSetShared('shared')">
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/shared_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 16px; height: 16px; margin-right: 5px"
|
|
|
+ />
|
|
|
+ <span>设置指标共享</span>
|
|
|
+ </div>
|
|
|
+ <!-- 公开指标 -->
|
|
|
+ <div class="opt-item" @click="handleOpenSetShared('public')">
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/public_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 16px; height: 16px; margin-right: 5px"
|
|
|
+ />
|
|
|
+ <span>设置指标公开</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 收藏目录 拼接我的指标tab-->
|
|
|
+ <div class="collect-tree" v-if="classifyShowType==='own'&&!isBasicBase">
|
|
|
+ <div class="tree-title">收藏指标</div>
|
|
|
+ <div class="tree-wrapper">
|
|
|
+ <collectEdbMenu
|
|
|
+ :data="collectClassifys"
|
|
|
+ @change="getCollectClassifys"
|
|
|
+ ref="collectEdbMenuRef"
|
|
|
/>
|
|
|
-
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </el-tree>
|
|
|
-
|
|
|
- <!-- 收藏目录 -->
|
|
|
- <collectEdbMenu
|
|
|
- v-else
|
|
|
- :data="treeData"
|
|
|
- @change="getTreeData"
|
|
|
- ref="collectEdbMenuRef"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <template>
|
|
|
- <!-- 新增分类 -->
|
|
|
- <div class="noDepart" @click="addLevelOneHandle" v-if="classifyShowType==='public'&&CanOpClassify&&isEdbBtnShow('editCatalog')">
|
|
|
- <img
|
|
|
- src="~@/assets/img/set_m/add_ico.png"
|
|
|
- alt=""
|
|
|
- style="width: 16px; height: 16px; margin-right: 10px"
|
|
|
- />
|
|
|
- <span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
|
|
|
- </div>
|
|
|
- <!-- 新增收藏分类 -->
|
|
|
- <div class="noDepart" @click="handleOpenCollectClassify" v-if="classifyShowType==='own'&&isEdbBtnShow('edbData_edbCollectClassify_save')">
|
|
|
- <img
|
|
|
- src="~@/assets/img/set_m/add_ico.png"
|
|
|
- alt=""
|
|
|
- style="width: 16px; height: 16px; margin-right: 10px"
|
|
|
- />
|
|
|
- <span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
|
|
|
+ <div class="opt-wrapper">
|
|
|
+ <div class="opt-item" @click="handleOpenCollectClassify" v-if="isEdbBtnShow('edbData_edbCollectClassify_save')">
|
|
|
+ <img
|
|
|
+ src="~@/assets/img/set_m/add_ico.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 16px; height: 16px; margin-right: 5px"
|
|
|
+ />
|
|
|
+ <span>新增收藏分类</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </template>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 共享指标目录 -->
|
|
|
+ <div class="target_tree"
|
|
|
+ :style="`${isBasicBase?'height:calc(100vh - 200px)':'height: calc(100vh - 300px)'}`"
|
|
|
+ v-if="classifyShowType==='shared'"
|
|
|
+ >
|
|
|
+ <sharedMenu/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<span class="move-btn resize" v-drag id="resize" >
|
|
|
</span>
|
|
@@ -255,53 +292,19 @@
|
|
|
<div class="main-right right" id="right" style="background:transparent;border:none;box-shadow:none;padding-top: 30px;box-sizing: border-box;" v-if="showAssociateComputeData">
|
|
|
<dataAssociateComputeData :edbInfoId="selected_edbid" @returnHandle="showAssociateChart=false,showAssociateComputeData=false"></dataAssociateComputeData>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- 指标图表列表 -->
|
|
|
<div class="main-right right list" id="right" v-show="isShowList">
|
|
|
- <p>{{$t('EtaBasePage.total_show',{limit: Total||0})}}</p>
|
|
|
- <div class="list-wrap" ref="listRef" @scroll="loadMoreHandle" v-if="Total">
|
|
|
- <!-- <div class="chart-list-item-wrap"> -->
|
|
|
- <draggable
|
|
|
- v-model="chartList"
|
|
|
- class="chart-list-item-wrap"
|
|
|
- animation="300"
|
|
|
- tag="div"
|
|
|
- :disabled="classifyShowType!=='own'"
|
|
|
- @start="menuDragStart"
|
|
|
- @update="menuDragenter"
|
|
|
- @end="collectDragOver"
|
|
|
- >
|
|
|
- <div class="list-item" v-for="item in chartList" :key="item.EdbInfoId">
|
|
|
- <div class="header">
|
|
|
- <span class="text_oneLine">{{ item.EdbName }}</span>
|
|
|
-
|
|
|
- <img
|
|
|
- v-if="classifyShowType==='own'"
|
|
|
- src="~@/assets/img/data_m/move_ico.png"
|
|
|
- class="move"
|
|
|
- style="width: 14px; height: 14px;"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="image" @click="detailShowHandle(item)"
|
|
|
- :style="{background: `no-repeat top/cover url('${ item.ChartImage}')`}">
|
|
|
- </div>
|
|
|
- <div class="info">
|
|
|
- {{$t('EtaBasePage.time_show')}}:{{item.CreateTime?item.CreateTime.substring(0,10):''}}
|
|
|
- <!-- wind和钢联化工的指标、计算指标显示 启用/停用-->
|
|
|
- <span v-if="([2,34].includes(item.Source) || item.EdbType==2) && isEdbBtnShow('enableOrDisable')&&item.IsSupplierStop!=1"
|
|
|
- class="enable-toggle-btn" :style="{'color': item.NoUpdate==1?'#0052D9':'#D54941'}"
|
|
|
- @click="toggleEdbRefreshStatus(item)">{{item.NoUpdate==1?$t('SystemManage.DataRefresh.enable'):$t('SystemManage.DataRefresh.disable') }}</span>
|
|
|
-
|
|
|
- <span class="deletesty" v-if="classifyShowType==='own'&&isEdbBtnShow('edbData_edbCollect_collect')" @click="handleRemoveCollect(item)">移出</span>
|
|
|
- </div>
|
|
|
- <img src="~@/assets/img/icons/edb-stopping.png" class="stop-mark" v-if="([2,34].includes(item.Source) || item.EdbType==2) && ( item.IsSupplierStop==1 || (item.IsSupplierStop==0&&item.NoUpdate==1))" />
|
|
|
- </div>
|
|
|
- </draggable>
|
|
|
- <!-- </div> -->
|
|
|
- </div>
|
|
|
- <div v-if="!Total" class="nodata">
|
|
|
- <tableNoData :text="$t('Table.no_edb_msg')"/>
|
|
|
- </div>
|
|
|
- <edbTableList :list="list"/>
|
|
|
+ <edbTableList
|
|
|
+ :isBasicBase="isBasicBase"
|
|
|
+ :tableLoading="tableLoading"
|
|
|
+ :list="chartList"
|
|
|
+ :total="Total"
|
|
|
+ :pageSize="PageSize"
|
|
|
+ :pageNo="CurrentIndex"
|
|
|
+ @click-detail="detailShowHandle"
|
|
|
+ @page-change="handleListPageChange"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<!-- 指标详情 -->
|
|
@@ -323,10 +326,10 @@
|
|
|
>{{EdbData.NoUpdate==1?$t('SystemManage.DataRefresh.enable'):$t('SystemManage.DataRefresh.disable') }}<!-- 启用/停用 --></el-button>
|
|
|
|
|
|
<el-button
|
|
|
- v-if="isBasicBase&&isEdbBtnShow('edbData_edbCollect_collect')"
|
|
|
+ v-if="isEdbBtnShow('edbData_edbCollect_collect')"
|
|
|
type="text"
|
|
|
:style="classifyShowType==='own'?'color:#D54941':''"
|
|
|
- @click="classifyShowType==='own'?handleRemoveCollect():handleCollectEdb()"
|
|
|
+ @click="classifyShowType==='own'?handleRemoveCollect():handleCollectEdb(EdbData)"
|
|
|
>{{classifyShowType==='own'?'移出':'收藏'}}</el-button>
|
|
|
<el-button
|
|
|
v-if="isEdbBtnShow('update')"
|
|
@@ -650,8 +653,8 @@
|
|
|
<edbCollectDia
|
|
|
ref="edbCollectRef"
|
|
|
:show.sync="isOpenEdbCollectDia"
|
|
|
- :edbId="selected_edbid"
|
|
|
- :add_ids="EdbData?EdbData.CollectClassifyIdList:[]"
|
|
|
+ :edbId="collectEdbForm.edbId"
|
|
|
+ :add_ids="collectEdbForm.collectClassifyIdList"
|
|
|
@success="arr=>{tableData[0].CollectClassifyIdList = arr}"
|
|
|
/>
|
|
|
|
|
@@ -661,6 +664,13 @@
|
|
|
:form="collectClassifyForm"
|
|
|
@confirm="getTreeData();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
|
|
|
/>
|
|
|
+
|
|
|
+ <!-- 设置公开共享列表弹窗 -->
|
|
|
+ <setSharedDialog
|
|
|
+ :show.sync="isOpenSetSharedDia"
|
|
|
+ :type="sharedType"
|
|
|
+ @change="getTreeData"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -695,6 +705,8 @@ import collectEdbMenu from './databaseComponents/collectEdbMenu.vue';
|
|
|
import edbCollectDia from './databaseComponents/edbCollectDia.vue';
|
|
|
import addCollectClassifyDia from './databaseComponents/addCollectClassifyDia.vue';
|
|
|
import edbTableList from './databaseComponents/edbTableList.vue';
|
|
|
+import sharedMenu from './sharedComponents/sharedMenu.vue';
|
|
|
+import setSharedDialog from './sharedComponents/setSharedListDialog.vue';
|
|
|
export default {
|
|
|
name: '',
|
|
|
components: {
|
|
@@ -723,7 +735,9 @@ export default {
|
|
|
collectEdbMenu,
|
|
|
edbCollectDia,
|
|
|
addCollectClassifyDia,
|
|
|
- edbTableList
|
|
|
+ edbTableList,
|
|
|
+ sharedMenu,
|
|
|
+ setSharedDialog
|
|
|
},
|
|
|
directives: {
|
|
|
drag(el, bindings,vnode) {
|
|
@@ -800,7 +814,6 @@ export default {
|
|
|
calulateList:[],
|
|
|
computed_type:0,//打开弹窗的类型
|
|
|
operationForm:{},
|
|
|
- dynamicNode:null,
|
|
|
|
|
|
edb_source:0,//指标来源 显示计算按钮
|
|
|
calculateLoading: false,//计算指标刷新loading
|
|
@@ -847,6 +860,7 @@ export default {
|
|
|
Total:0,
|
|
|
IsListEnd:false,//是不是到底了
|
|
|
chartList:[],
|
|
|
+ tableLoading:false,
|
|
|
|
|
|
activeTab:'',
|
|
|
activeName:'second',
|
|
@@ -862,13 +876,24 @@ export default {
|
|
|
hasUsedList:[],
|
|
|
|
|
|
/* 目录分类 */
|
|
|
- classifyShowType:'public',
|
|
|
- searchCollectWord:'',
|
|
|
+ classifyTabs: [
|
|
|
+ { label: '我的指标',key: 'own' },
|
|
|
+ { label: '共享指标',key: 'shared' },
|
|
|
+ { label: '公共指标',key: 'public' },
|
|
|
+ ],
|
|
|
+ classifyShowType:'own',
|
|
|
+
|
|
|
+ collectClassifys:[],//收藏目录
|
|
|
//指标收藏弹窗
|
|
|
isOpenEdbCollectDia: false,
|
|
|
+ collectEdbForm: {},
|
|
|
//收藏分类弹窗
|
|
|
isOpenCollectClassifyDia: false,
|
|
|
- collectClassifyForm: {}
|
|
|
+ collectClassifyForm: {},
|
|
|
+
|
|
|
+ /* 设置共享弹窗 */
|
|
|
+ isOpenSetSharedDia: false,
|
|
|
+ sharedType:'',//shared/public
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -899,7 +924,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
select_classifyId(newval){
|
|
|
- if(this.$refs.listRef) this.$refs.listRef.scrollTop = 0;
|
|
|
if(newval){
|
|
|
this.CurrentIndex = 1
|
|
|
this.getEdbChartList()
|
|
@@ -1060,40 +1084,28 @@ export default {
|
|
|
},
|
|
|
/* 获取树分类数据 */
|
|
|
async getTreeData(params) {
|
|
|
- const res = this.classifyShowType==='own'
|
|
|
- ? await edbCollectInterface.getEdbCollectClassify({ParentId:0})
|
|
|
- : await dataBaseInterface.targetCatalog({
|
|
|
- IsOnlyMe:this.IsOnlyMe,
|
|
|
- ParentId:0,
|
|
|
- ClassifyType: this.isBasicBase ? 0 : 2
|
|
|
- })
|
|
|
+ const res = await dataBaseInterface.targetCatalog({
|
|
|
+ IsOnlyMe:this.IsOnlyMe,
|
|
|
+ ParentId:0,
|
|
|
+ ClassifyType: this.isBasicBase ? 0 : 2
|
|
|
+ })
|
|
|
|
|
|
-
|
|
|
- if(res.Ret!==200) return
|
|
|
- this.showData = true;
|
|
|
-
|
|
|
- if(this.classifyShowType==='public') {
|
|
|
- const arr=res.Data.AllNodes || []
|
|
|
- this.treeData=arr.map(item=>{
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- // isLeaf:item.Children.length?false:true
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- this.CanOpClassify = res.Data.CanOpClassify;
|
|
|
|
|
|
- /* 处理树展开和选中图表 */
|
|
|
- params && this.selectCurrentNode(params);
|
|
|
- !params && this.select_node && this.$refs.menuTree.setCurrentKey(this.select_node);
|
|
|
- }else {
|
|
|
- this.treeData = res.Data||[]
|
|
|
- this.select_classifyId =
|
|
|
- this.select_classifyId ||
|
|
|
- (this.treeData.length ? this.treeData[0].ClassifyId:0);
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.showData = true;
|
|
|
|
|
|
- this.$refs.collectEdbMenuRef&&this.$refs.collectEdbMenuRef.initSelect(this.select_classifyId)
|
|
|
- }
|
|
|
+ const arr=res.Data.AllNodes || []
|
|
|
+ this.treeData=arr.map(item=>{
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.CanOpClassify = res.Data.CanOpClassify;
|
|
|
+
|
|
|
+ /* 处理树展开和选中图表 */
|
|
|
+ params && this.selectCurrentNode(params);
|
|
|
+ !params && this.select_node && this.$refs.menuTree.setCurrentKey(this.select_node);
|
|
|
},
|
|
|
/* 获取最新的指标 默认展示 */
|
|
|
getNewTargetList: _.throttle(function() {
|
|
@@ -1161,7 +1173,6 @@ export default {
|
|
|
}
|
|
|
this.$refs.menuTree&&this.$nextTick(()=>{
|
|
|
const _node = this.$refs.menuTree.getNode(this.select_node)
|
|
|
- // this.dynamicNode = _node;
|
|
|
//滚动到高亮位置
|
|
|
setTimeout(() => {
|
|
|
let node = document.getElementById(`node${this.select_node}`)||{}
|
|
@@ -1184,12 +1195,13 @@ export default {
|
|
|
}),
|
|
|
//获取指标图表列表
|
|
|
async getEdbChartList(){
|
|
|
- const res = this.classifyShowType === 'own'
|
|
|
+ this.tableLoading = true;
|
|
|
+ const res = this.classifyShowType === 'collect'
|
|
|
? await edbCollectInterface.getCollectEdb({
|
|
|
PageSize:this.PageSize,
|
|
|
CurrentIndex:this.CurrentIndex,
|
|
|
ClassifyId:this.select_classifyId,
|
|
|
- Keyword: this.searchCollectWord
|
|
|
+ Keyword: ''
|
|
|
})
|
|
|
: await dataBaseInterface.getEdbChartList({
|
|
|
PageSize:this.PageSize,
|
|
@@ -1198,9 +1210,11 @@ export default {
|
|
|
IsOnlyMe:this.IsOnlyMe,
|
|
|
EdbType: this.isBasicBase?1:2
|
|
|
})
|
|
|
+
|
|
|
+ this.tableLoading = false;
|
|
|
if(res.Ret!==200) return
|
|
|
if(res.Data){
|
|
|
- this.chartList = this.CurrentIndex===1?res.Data.List:[...this.chartList,...res.Data.List]
|
|
|
+ this.chartList = res.Data.List || [];
|
|
|
this.Total = res.Data.Paging.Totals||0
|
|
|
this.IsListEnd = res.Data.Paging.IsEnd
|
|
|
}
|
|
@@ -1228,16 +1242,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
//指标图表列表-加载更多
|
|
|
- loadMoreHandle: _.throttle(function() {
|
|
|
- let scrollTop = this.$refs.listRef.scrollTop;
|
|
|
- let clientHeight = this.$refs.listRef.clientHeight;
|
|
|
- let scrollHeight = this.$refs.listRef.scrollHeight;
|
|
|
- if(scrollTop + clientHeight >= scrollHeight-210 && !this.IsListEnd){
|
|
|
- this.CurrentIndex++;
|
|
|
- this.getEdbChartList();
|
|
|
- }
|
|
|
- },300),
|
|
|
+ handleListPageChange(page) {
|
|
|
+ this.CurrentIndex = page;
|
|
|
+ this.getEdbChartList();
|
|
|
+ },
|
|
|
/* 搜索 */
|
|
|
searchHandle(query) {
|
|
|
this.search_page = 1;
|
|
@@ -1355,38 +1365,10 @@ export default {
|
|
|
this.select_classifyId = !data.EdbInfoId?data.ClassifyId:0;
|
|
|
this.select_node = data.UniqueCode;
|
|
|
this.selected_edbid = data.EdbInfoId;
|
|
|
- // this.dynamicNode = node;
|
|
|
this.showAssociateChart=false
|
|
|
this.showAssociateComputeData=false
|
|
|
},
|
|
|
|
|
|
- /* 双击label出现input修改框 */
|
|
|
- editNodeLabel(node, data) {
|
|
|
- //目录名称可以双击修改 指标不能
|
|
|
- if(!data.EdbCode && this.role === 'admin'&&this.isEdbBtnShow('editCatalog')) {
|
|
|
- this.$set(data,'isEdit',true)
|
|
|
- this.new_label = this.currentLang==='en' ? data.ClassifyNameEn : data.ClassifyName;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.editVal.focus();
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- /* input失去焦点恢复node 修改最新的值*/
|
|
|
- changeValue(node, data) {
|
|
|
- if(this.new_label) {
|
|
|
- this.$set(data,'isEdit',false)
|
|
|
- dataBaseInterface.nodeEdit({
|
|
|
- ClassifyId: data.ClassifyId,
|
|
|
- ClassifyName: this.new_label
|
|
|
- }).then(res => {
|
|
|
- if(res.Ret === 200) {
|
|
|
- this.getTreeData();
|
|
|
- }
|
|
|
- })
|
|
|
- }else {
|
|
|
- this.$message.warning('名称不能为空')
|
|
|
- }
|
|
|
- },
|
|
|
/* 添加一级目录 */
|
|
|
addLevelOneHandle() {
|
|
|
this.dialog_title = '添加';
|
|
@@ -2109,14 +2091,7 @@ export default {
|
|
|
changeTreeNode(){
|
|
|
this.$refs.menuTree.setCurrentKey(this.select_node);
|
|
|
},
|
|
|
- //只看我的
|
|
|
- onlyMeHandler(){
|
|
|
- this.getTreeData()
|
|
|
|
|
|
- this.CurrentIndex = 1;
|
|
|
- this.$refs.listRef.scrollTop = 0;
|
|
|
- this.getEdbChartList();
|
|
|
- },
|
|
|
//绑定el-tree的load属性
|
|
|
async getLazyTreeData (node,resolve){
|
|
|
if(node.level===0){
|
|
@@ -2195,13 +2170,25 @@ export default {
|
|
|
this.selected_edbid = 0;
|
|
|
this.select_classifyId = 0;
|
|
|
this.search_txt = '';
|
|
|
- this.searchCollectWord = '';
|
|
|
- this.getTreeData()
|
|
|
- this.classifyShowType==='public'&&this.getEdbChartList()
|
|
|
+
|
|
|
+ ['own','public'].includes(this.classifyShowType) && this.getTreeData()
|
|
|
+ // this.classifyShowType==='public'&&this.getEdbChartList()
|
|
|
+ this.classifyShowType==='own' && this.getCollectClassifys();
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取收藏指标分类
|
|
|
+ async getCollectClassifys() {
|
|
|
+ const res = await edbCollectInterface.getEdbCollectClassify({ParentId:0})
|
|
|
+
|
|
|
+ this.collectClassifys = res.Data||[]
|
|
|
},
|
|
|
|
|
|
/* 收藏指标 */
|
|
|
- handleCollectEdb() {
|
|
|
+ handleCollectEdb(info) {
|
|
|
+ this.collectEdbForm = {
|
|
|
+ edbId: info.EdbInfoId,
|
|
|
+ collectClassifyIdList: info.CollectClassifyIdList||[]
|
|
|
+ },
|
|
|
this.isOpenEdbCollectDia = true
|
|
|
},
|
|
|
|
|
@@ -2254,9 +2241,16 @@ export default {
|
|
|
if(res.Ret !== 200) return
|
|
|
this.$message.success('移动成功')
|
|
|
},
|
|
|
+
|
|
|
+ /* 设置指标共享弹窗 */
|
|
|
+ handleOpenSetShared(type) {
|
|
|
+ this.sharedType = type;
|
|
|
+ this.isOpenSetSharedDia = true;
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getEdbChartList()
|
|
|
+ this.getEdbChartList();
|
|
|
+ this.getCollectClassifys();
|
|
|
this.$route.query.code
|
|
|
? this.getTreeData({code: this.$route.query.code,id: this.$route.query.id,classifyId:this.$route.query.classifyId})
|
|
|
: this.getTreeData();
|
|
@@ -2313,6 +2307,7 @@ export default {
|
|
|
border: 1px solid #ececec;
|
|
|
border-radius: 4px;
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
|
|
|
+ margin-bottom: 20px;
|
|
|
.top-right,.top-left{
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -2329,7 +2324,6 @@ export default {
|
|
|
}
|
|
|
.database_main {
|
|
|
display: flex;
|
|
|
- margin-top: 20px;
|
|
|
position:relative;
|
|
|
width:100%;
|
|
|
overflow-x: auto;
|
|
@@ -2341,17 +2335,16 @@ export default {
|
|
|
border: 1px solid #ececec;
|
|
|
border-radius: 4px;
|
|
|
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
|
|
|
- height: calc(100vh - 225px);
|
|
|
+ // height: calc(100vh - 225px);
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
.tree-cont {
|
|
|
- padding: 30px;
|
|
|
+ padding: 20px 30px;
|
|
|
}
|
|
|
.target_tree {
|
|
|
color: #333;
|
|
|
- height: calc(100vh - 420px);
|
|
|
- overflow: auto;
|
|
|
+ height: calc(100vh - 300px);
|
|
|
.label-input .el-input__inner {
|
|
|
height: 25px;
|
|
|
line-height: 25px;
|
|
@@ -2381,7 +2374,7 @@ export default {
|
|
|
background-color:$theme-color;
|
|
|
}
|
|
|
.el-tree-node__content {
|
|
|
- margin-bottom: 14px !important;
|
|
|
+ margin-bottom: 5px !important;
|
|
|
}
|
|
|
.el-tree-node__children {
|
|
|
.el-tree-node {
|
|
@@ -2414,15 +2407,7 @@ export default {
|
|
|
padding-right: 10px !important;
|
|
|
}
|
|
|
}
|
|
|
- .noDepart {
|
|
|
- margin: 30px 0;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- color: $theme-color;
|
|
|
- font-size: 16px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+
|
|
|
.move-btn {
|
|
|
height: 100%;
|
|
|
width: 4px;
|
|
@@ -2435,11 +2420,45 @@ export default {
|
|
|
/* background-color: orange */
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .own-tree,.collect-tree {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+ .own-tree {
|
|
|
+ height: 60%;
|
|
|
+ }
|
|
|
+ .collect-tree {
|
|
|
+ height: 40%;
|
|
|
+ border-top: 1px solid #C8CDD9;
|
|
|
+ }
|
|
|
+ .tree-title {
|
|
|
+ font-size: 15px;
|
|
|
+ margin: 15px 0;
|
|
|
+ }
|
|
|
+ .tree-wrapper {
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+ .opt-wrapper {
|
|
|
+ margin: 15px 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ color: #0052D9;
|
|
|
+ gap: 10px;
|
|
|
+ .opt-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.main-right {
|
|
|
flex: 1;
|
|
|
/* width:70%; */
|
|
|
- height: calc(100vh - 225px);
|
|
|
+ // height: calc(100vh - 225px);
|
|
|
background: #fff;
|
|
|
border: 1px solid #ececec;
|
|
|
border-radius: 4px;
|
|
@@ -2507,76 +2526,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
&.list{
|
|
|
- background-color: transparent;
|
|
|
+ background-color: #fff;
|
|
|
+ height: auto;
|
|
|
box-shadow: none;
|
|
|
border:none;
|
|
|
- padding-left:30px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- .list-wrap{
|
|
|
- flex: 1;
|
|
|
- margin-top: 20px;
|
|
|
- overflow-y: auto;
|
|
|
- .dragShdow {
|
|
|
- box-shadow: 0 1px 8px rgba(64, 158, 255, 0.8);
|
|
|
- opacity: 0.5;
|
|
|
- }
|
|
|
- .list-item{
|
|
|
- width:23%;
|
|
|
- min-width: 210px;
|
|
|
- background-color: #fff;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- box-sizing: border-box;
|
|
|
- border-radius: 4px;
|
|
|
- border:1px solid #DCDFE6;
|
|
|
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
- position: relative;
|
|
|
- .header{
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- padding:10px;
|
|
|
- box-sizing: border-box;
|
|
|
- /* text-align: left; */
|
|
|
- }
|
|
|
- .info{
|
|
|
- padding:10px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- .enable-toggle-btn{
|
|
|
- cursor: pointer;
|
|
|
- color: #0052D9;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
- .header{
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- box-shadow: 0 3px 6px rgba(37, 37, 239, 0.1);
|
|
|
- }
|
|
|
- .image{
|
|
|
- margin:10px;
|
|
|
- margin-bottom: 0;
|
|
|
- height: 0;
|
|
|
- padding-bottom: 67%;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- .stop-mark{
|
|
|
- height: 48px;
|
|
|
- width: 48px;
|
|
|
- position: absolute;
|
|
|
- right: -1px;
|
|
|
- top: 0;
|
|
|
- pointer-events: none;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ padding:20px;
|
|
|
}
|
|
|
&.detail-wrap{
|
|
|
overflow-x:auto;
|