|
@@ -2,23 +2,23 @@
|
|
|
<div class="database_container">
|
|
|
<div class="database_top">
|
|
|
<div class="top-left">
|
|
|
- <el-button v-permission="permissionBtn.edbDataPermission.edbData_addEdb"
|
|
|
- type="primary" @click="addHandler"><!-- 添加指标 -->{{$t('EtaBasePage.add_edb_btn')}}</el-button>
|
|
|
- <el-button v-permission="permissionBtn.edbDataPermission.edbData_calcuEdb"
|
|
|
- type="primary" @click="addComputedHandler"><!-- 计算指标 -->{{$t('EtaBasePage.calculation_edb_btn')}}</el-button>
|
|
|
- <el-button v-permission="permissionBtn.edbDataPermission.edbData_replaceEdb"
|
|
|
- type="primary" @click="replaceEdbHandler"><!-- 替换指标 -->{{$t('EtaBasePage.replace_edb_btn')}}</el-button>
|
|
|
- <el-button v-permission="permissionBtn.edbDataPermission.edbData_codeRun"
|
|
|
- type="primary" @click="$router.push({path: '/codecount'})"><!-- 代码运算 -->{{$t('EtaBasePage.algorithm_btn')}}</el-button>
|
|
|
- <el-button v-permission="permissionBtn.edbDataPermission.edbData_dataAdjust"
|
|
|
- type="primary" @click="$router.push({path: '/adjustdata'})"><!-- 数据调整 -->{{$t('EtaBasePage.adjustment_btn')}}</el-button>
|
|
|
- <!-- <el-button v-permission="permissionBtn.edbDataPermission.edbData_batchUpdate"
|
|
|
- type="primary" plain @click="updateHandler">一键刷新</el-button> -->
|
|
|
+ <template v-if="!isBasicBase">
|
|
|
+ <el-button v-permission="permissionBtn.edbDataPermission.edbData_addEdb"
|
|
|
+ type="primary" @click="addHandler"><!-- 添加指标 -->{{$t('EtaBasePage.add_edb_btn')}}</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.edbDataPermission.edbData_calcuEdb"
|
|
|
+ type="primary" @click="addComputedHandler"><!-- 计算指标 -->{{$t('EtaBasePage.calculation_edb_btn')}}</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.edbDataPermission.edbData_replaceEdb"
|
|
|
+ type="primary" @click="replaceEdbHandler"><!-- 替换指标 -->{{$t('EtaBasePage.replace_edb_btn')}}</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.edbDataPermission.edbData_codeRun"
|
|
|
+ type="primary" @click="$router.push({path: '/codecount'})"><!-- 代码运算 -->{{$t('EtaBasePage.algorithm_btn')}}</el-button>
|
|
|
+ <el-button v-permission="permissionBtn.edbDataPermission.edbData_dataAdjust"
|
|
|
+ type="primary" @click="$router.push({path: '/adjustdata'})"><!-- 数据调整 -->{{$t('EtaBasePage.adjustment_btn')}}</el-button>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div class="top-right">
|
|
|
|
|
|
-
|
|
|
<el-select
|
|
|
+ v-if="classifyShowType==='public'"
|
|
|
v-model="search_txt"
|
|
|
v-loadMore="searchLoad"
|
|
|
ref="searchRef"
|
|
@@ -49,9 +49,20 @@
|
|
|
</div>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
+
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="searchCollectWord"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
|
|
|
+ style="width: 260px;"
|
|
|
+ @change="getEdbChartList"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search"/>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="database-label">
|
|
|
+ <!-- <div class="database-label">
|
|
|
<edb-label-list
|
|
|
:currentLang="currentLang"
|
|
|
:labelList="labelList"
|
|
@@ -60,7 +71,7 @@
|
|
|
@deleteLabel="deleteLabel"
|
|
|
@moveLabel="({oldIndex,newIndex})=>{labelList[oldIndex] = labelList.splice(newIndex, 1, labelList[oldIndex])[0];}"
|
|
|
/>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="database_main box" id="box" v-if="showData">
|
|
|
<!-- 展开收起目录按钮 -->
|
|
|
<span
|
|
@@ -70,136 +81,153 @@
|
|
|
>
|
|
|
<i :class="{'el-icon-d-arrow-left':isMainLeftShow,'el-icon-d-arrow-right':!isMainLeftShow}"></i>
|
|
|
</span>
|
|
|
- <!-- <target-tree /> -->
|
|
|
+
|
|
|
<div class="main-left left" id="left" v-show="isMainLeftShow">
|
|
|
+
|
|
|
<div class="tree-cont">
|
|
|
- <div style="padding-bottom:20px;padding-right:20px;display:flex;justify-content:space-between">
|
|
|
+ <el-radio-group
|
|
|
+ v-model="classifyShowType"
|
|
|
+ @input="handleChangeClassifyType"
|
|
|
+ v-if="isBasicBase"
|
|
|
+ >
|
|
|
+ <el-radio-button label="public">
|
|
|
+ 公共指标库
|
|
|
+ </el-radio-button>
|
|
|
+ <el-radio-button label="own">
|
|
|
+ 个人收藏
|
|
|
+ </el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+
|
|
|
+ <div style="padding:20px 0;padding-right:20px;display:flex;justify-content:space-between">
|
|
|
<span><!-- 目录 -->{{$t('EtaBasePage.tab_menu')}}</span>
|
|
|
- <el-checkbox
|
|
|
+ <!-- <el-checkbox
|
|
|
v-model="IsOnlyMe"
|
|
|
@change="onlyMeHandler"
|
|
|
- ><!-- 只看我的 -->{{$t('Edb.only_see_mine')}}</el-checkbox>
|
|
|
+ >{{$t('Edb.only_see_mine')}}</el-checkbox> -->
|
|
|
</div>
|
|
|
<div class="target_tree">
|
|
|
- <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"
|
|
|
- >
|
|
|
- <span
|
|
|
- class="custom-tree-node"
|
|
|
- slot-scope="{ node, data }"
|
|
|
+ <!-- 指标目录 -->
|
|
|
+ <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"
|
|
|
>
|
|
|
- <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 && node.Nodewidth) || ''}`"
|
|
|
- :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"
|
|
|
+ class="custom-tree-node"
|
|
|
+ slot-scope="{ node, data }"
|
|
|
>
|
|
|
- <!-- <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<6"
|
|
|
+ <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)"
|
|
|
/>
|
|
|
- <!-- 编辑节点 如果是分类,判断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.png"
|
|
|
- alt=""
|
|
|
- style="width: 14px; height: 14px;"
|
|
|
- @click.stop="removeNode(node,data)"
|
|
|
- v-if="!data.EdbCode&&(data.Button.DeleteButton)&&isEdbBtnShow('deleteCatalog')"
|
|
|
- />
|
|
|
- <!-- 查看计算指标 -->
|
|
|
- <!-- <i class="el-icon-view"
|
|
|
- v-if="data.EdbType===2&&![58,59,67,68,74].includes(data.Source)&&isEdbBtnShow('checkCalcChart')"
|
|
|
- @click.stop="viewNode(node,data)"></i> -->
|
|
|
- <!-- 查看关联图表 -->
|
|
|
- <!-- <img
|
|
|
- v-if="data.Button.ShowChartRelation&&isEdbBtnShow('checkRelatedChart')"
|
|
|
- @click.stop="showAssociateChart=true,showAssociateComputeData=false"
|
|
|
- src="~@/assets/img/icons/associate_chart.png"
|
|
|
- style="width: 14px; height: 14px;margin-left: 8px"
|
|
|
- alt=""
|
|
|
- /> -->
|
|
|
- <!-- 查看关联指标 -->
|
|
|
- <!-- <img
|
|
|
- v-if="data.Button.ShowEdbRelation&&isEdbBtnShow('checkRelatedEdb')"
|
|
|
- @click.stop="showAssociateComputeData=true,showAssociateChart=false"
|
|
|
- src="~@/assets/img/icons/associate_data.png"
|
|
|
- style="width: 14px; height: 14px;margin-left: 8px"
|
|
|
- alt=""
|
|
|
- /> -->
|
|
|
+ <span
|
|
|
+ @dblclick.stop="editNodeLabel(node, data)"
|
|
|
+ v-else
|
|
|
+ class="text_oneLine node_label"
|
|
|
+ :style="`width:${(select_node === data.UniqueCode && node.Nodewidth) || ''}`"
|
|
|
+ :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<6"
|
|
|
+ />
|
|
|
+ <!-- 编辑节点 如果是分类,判断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>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- <div class="noDepart" @click="addLevelOneHandle" v-if="CanOpClassify&&isEdbBtnShow('editCatalog')">
|
|
|
- <img
|
|
|
- src="~@/assets/img/set_m/add_ico.png"
|
|
|
- alt=""
|
|
|
- style="width: 16px; height: 16px; margin-right: 10px"
|
|
|
+ </el-tree>
|
|
|
+
|
|
|
+ <!-- 收藏目录 -->
|
|
|
+ <collectEdbMenu
|
|
|
+ v-else
|
|
|
+ :data="treeData"
|
|
|
+ @change="getTreeData"
|
|
|
/>
|
|
|
- <span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
|
|
|
</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>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<span class="move-btn resize" v-drag id="resize" @mousemove="dynamicNode&&resetNodeStyle(dynamicNode)">
|
|
|
</span>
|
|
@@ -228,15 +256,18 @@
|
|
|
<span v-show="currentLang=='zh'">{{ item.EdbName }}</span>
|
|
|
<span v-show="currentLang=='en'">{{ item.EdbNameEn || item.EdbName }}</span>
|
|
|
</div>
|
|
|
+ <!-- !item.HaveOperaAuth ? $icons.lock_big : -->
|
|
|
<div class="image" @click="detailShowHandle(item)"
|
|
|
- :style="{background: `no-repeat top/cover url('${!item.HaveOperaAuth ? $icons.lock_big : item.ChartImage}')`}">
|
|
|
+ :style="{background: `no-repeat top/cover url('${ item.ChartImage}')`}">
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
- {{$t('EtaBasePage.time_show')}}:{{item.CreateTime.substring(0,10)}}
|
|
|
+ {{$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>
|
|
@@ -247,6 +278,7 @@
|
|
|
<tableNoData :text="$t('Table.no_edb_msg')"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- 指标详情 -->
|
|
|
<div class="main-right right detail-wrap" id="right" v-show="isShowDetail">
|
|
|
<div class="detail" v-if="EdbData.HaveOperaAuth">
|
|
@@ -258,10 +290,18 @@
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div class="edb-tool-icon edb-tool" style="align-items: center;">
|
|
|
- <el-button v-if="([2,34].includes(EdbData.Source) || EdbData.EdbType==2) && isEdbBtnShow('enableOrDisable')&&EdbData.IsSupplierStop!=1"
|
|
|
- type="text" :style="{'color': EdbData.NoUpdate==1?'#0052D9':'#D54941'}"
|
|
|
+ <el-button
|
|
|
+ v-if="([2,34].includes(EdbData.Source) || EdbData.EdbType==2) && isEdbBtnShow('enableOrDisable')&&EdbData.IsSupplierStop!=1"
|
|
|
+ type="text"
|
|
|
+ :style="{'color': EdbData.NoUpdate==1?'#0052D9':'#D54941'}"
|
|
|
@click="toggleEdbRefreshStatus(EdbData,'detail')"
|
|
|
>{{EdbData.NoUpdate==1?$t('SystemManage.DataRefresh.enable'):$t('SystemManage.DataRefresh.disable') }}<!-- 启用/停用 --></el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ v-if="isBasicBase&&isEdbBtnShow('edbData_edbCollect_collect')"
|
|
|
+ type="text"
|
|
|
+ @click="classifyShowType==='own'?handleRemoveCollect():handleCollectEdb()"
|
|
|
+ >{{classifyShowType==='own'?'移出':'收藏'}}</el-button>
|
|
|
<el-button
|
|
|
v-if="isEdbBtnShow('update')"
|
|
|
type="text"
|
|
@@ -403,14 +443,14 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 输入英文指标弹窗 -->
|
|
|
- <!-- <set-en-name-dia :isOpenDialog="setEnName" @cancel="setEnName=false"
|
|
|
- :formData="formItemArray" @updateEnName="updateEnName" cType="ebd" /> -->
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<!-- 目录弹窗 -->
|
|
|
<openDialog
|
|
|
:isOpenDialog="isOpenDialog"
|
|
|
:title="dialog_title"
|
|
|
+ :isBasicBase="isBasicBase"
|
|
|
:formData="dialogForm"
|
|
|
@closeDia="isOpenDialog=false"
|
|
|
@sucessCallback="sucessCallback"
|
|
@@ -551,11 +591,7 @@
|
|
|
@success="updateNewest"
|
|
|
/>
|
|
|
|
|
|
- <!-- 指标历史记录 -->
|
|
|
- <!-- <edbHistoryDialog
|
|
|
- :isOpenDialog.sync="isLookHistory"
|
|
|
- :edbId="lookEdbId"
|
|
|
- /> -->
|
|
|
+
|
|
|
<!-- 指数修匀弹窗 -->
|
|
|
<SmoothEdbDialog
|
|
|
:is-open-smooth="computed_type==='alpha'"
|
|
@@ -589,11 +625,27 @@
|
|
|
<!-- 指标已经被引用 -->
|
|
|
<edbHasUsedDia :show.sync="edbHasUsedDiaShow" :dataList="hasUsedList"/>
|
|
|
|
|
|
+ <!-- 指标收藏弹窗 -->
|
|
|
+ <edbCollectDia
|
|
|
+ ref="edbCollectRef"
|
|
|
+ :show.sync="isOpenEdbCollectDia"
|
|
|
+ :edbId="selected_edbid"
|
|
|
+ :add_ids="EdbData?EdbData.CollectClassifyIdList:[]"
|
|
|
+ @success="arr=>{tableData[0].CollectClassifyIdList = arr}"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 添加收藏分类弹窗 -->
|
|
|
+ <addCollectClassifyDia
|
|
|
+ :show.sync="isOpenCollectClassifyDia"
|
|
|
+ :form="collectClassifyForm"
|
|
|
+ @confirm="getTreeData();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { dataBaseInterface } from '@/api/api.js';
|
|
|
+import { edbCollectInterface } from '@/api/modules/chartApi';
|
|
|
import { getComputedTypes,getBatchComputedTypes,getFormulaTip } from './databaseComponents/util';
|
|
|
|
|
|
import openDialog from './databaseComponents/openDialog';
|
|
@@ -601,7 +653,7 @@ import addTargetDiaBase from './databaseComponents/addTargetDiaBase';
|
|
|
import completeTargetDia from './databaseComponents/completeTargetDia'
|
|
|
import computedDialog from './databaseComponents/computedDialog';
|
|
|
import operationDialog from './databaseComponents/operationDialog';
|
|
|
-import createChart from './databaseComponents/createChart';
|
|
|
+// import createChart from './databaseComponents/createChart';
|
|
|
import updateDialog from './databaseComponents/updateDialog';
|
|
|
import replaceDialog from './databaseComponents/replaceDialog';
|
|
|
import jointTargetDia from './databaseComponents/jointTargetDia';
|
|
@@ -620,6 +672,9 @@ import SmoothEdbDialog from './databaseComponents/smoothEdbDialog.vue';
|
|
|
import batchComputedV2 from './databaseComponents/batchComputedV2.vue';
|
|
|
import setLangInfoDia from './components/setLangInfo.vue'
|
|
|
import edbHasUsedDia from './components/edbHasUsedDia.vue';
|
|
|
+import collectEdbMenu from './databaseComponents/collectEdbMenu.vue';
|
|
|
+import edbCollectDia from './databaseComponents/edbCollectDia.vue';
|
|
|
+import addCollectClassifyDia from './databaseComponents/addCollectClassifyDia.vue';
|
|
|
export default {
|
|
|
name: '',
|
|
|
components: {
|
|
@@ -628,7 +683,7 @@ export default {
|
|
|
completeTargetDia,
|
|
|
computedDialog,
|
|
|
operationDialog,
|
|
|
- createChart,
|
|
|
+ // createChart,
|
|
|
updateDialog,
|
|
|
replaceDialog,
|
|
|
jointTargetDia,
|
|
@@ -646,7 +701,10 @@ export default {
|
|
|
SmoothEdbDialog,
|
|
|
batchComputedV2,
|
|
|
setLangInfoDia,
|
|
|
- edbHasUsedDia
|
|
|
+ edbHasUsedDia,
|
|
|
+ collectEdbMenu,
|
|
|
+ edbCollectDia,
|
|
|
+ addCollectClassifyDia
|
|
|
},
|
|
|
directives: {
|
|
|
drag(el, bindings,vnode) {
|
|
@@ -728,8 +786,7 @@ export default {
|
|
|
edb_source:0,//指标来源 显示计算按钮
|
|
|
calculateLoading: false,//计算指标刷新loading
|
|
|
refreshLoading: false,//基础指标刷新loading
|
|
|
- /* 一键成图弹窗 */
|
|
|
- isCreateChart: false,
|
|
|
+
|
|
|
/* 一键更新弹窗 */
|
|
|
isUpdate:false,
|
|
|
/* 替换指标弹窗 */
|
|
@@ -784,7 +841,16 @@ export default {
|
|
|
isLangInfoDia: false,
|
|
|
|
|
|
edbHasUsedDiaShow:false,
|
|
|
- hasUsedList:[]
|
|
|
+ hasUsedList:[],
|
|
|
+
|
|
|
+ /* 目录分类 */
|
|
|
+ classifyShowType:'public',
|
|
|
+ searchCollectWord:'',
|
|
|
+ //指标收藏弹窗
|
|
|
+ isOpenEdbCollectDia: false,
|
|
|
+ //收藏分类弹窗
|
|
|
+ isOpenCollectClassifyDia: false,
|
|
|
+ collectClassifyForm: {}
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -826,6 +892,11 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
+ /* 是否是数据查看库 */
|
|
|
+ isBasicBase() {
|
|
|
+ return this.$route.path === '/edbBasicbase'
|
|
|
+ },
|
|
|
+
|
|
|
/* 计算弹窗控制 */
|
|
|
computedShowTypes() {
|
|
|
return this.computed_source===1 ? getComputedTypes() : getBatchComputedTypes();
|
|
@@ -841,11 +912,7 @@ export default {
|
|
|
return role;
|
|
|
}
|
|
|
},
|
|
|
- /* 登录角色id */
|
|
|
- roleId() {
|
|
|
- let id = parseInt(localStorage.getItem('AdminId'));
|
|
|
- return id;
|
|
|
- },
|
|
|
+
|
|
|
//指标详情,也就是tableData[0]
|
|
|
EdbData(){
|
|
|
return this.tableData[0]?this.tableData[0]:{Button:{},DataInsertConfig:{},DataList:[]}
|
|
@@ -964,30 +1031,49 @@ export default {
|
|
|
'checkRelatedEdb':edbDataPermission.edbData_checkRelatedEdb,//查看关联指标
|
|
|
'checkCalcChart':edbDataPermission.edbData_checkCalcChart,//查看计算指标
|
|
|
'enableOrDisable':edbDataPermission.edbData_enableOrDisable,//启用/停用
|
|
|
+
|
|
|
+ 'edbData_edbCollect_collect': edbDataPermission.edbData_edbCollect_collect,//收藏移出
|
|
|
+ 'edbData_edbCollectClassify_save': edbDataPermission.edbData_edbCollectClassify_save,//收藏分类编辑
|
|
|
+ 'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类删除
|
|
|
+ 'edbData_edbCollectClassify_move': edbDataPermission.edbData_edbCollectClassify_move,//收藏分类移动
|
|
|
+ 'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类移动
|
|
|
}
|
|
|
return checkPermissionBtn(BtnMap[type])
|
|
|
},
|
|
|
/* 获取树分类数据 */
|
|
|
- getTreeData(params) {
|
|
|
-
|
|
|
- dataBaseInterface.targetCatalog({IsOnlyMe:this.IsOnlyMe,ParentId:0}).then(res=>{
|
|
|
- if(res.Ret===200){
|
|
|
- const arr=res.Data.AllNodes || []
|
|
|
- this.treeData=arr.map(item=>{
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- // isLeaf:item.Children.length?false:true
|
|
|
- }
|
|
|
+ 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
|
|
|
})
|
|
|
- this.CanOpClassify = res.Data.CanOpClassify;
|
|
|
- // this.currentLang = res.Data.Language === 'EN' ? 'en' : 'ch';
|
|
|
- // this.setLangIntoStore()
|
|
|
+
|
|
|
+
|
|
|
+ if(res.Ret!==200) return
|
|
|
this.showData = true;
|
|
|
- /* 处理树展开和选中图表 */
|
|
|
- params && this.selectCurrentNode(params);
|
|
|
- !params && this.select_node && this.$refs.menuTree.setCurrentKey(this.select_node);
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
+ 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_classify =
|
|
|
+ this.select_classify ||
|
|
|
+ (this.treeData.length ? this.treeData[0].ClassifyId:0);
|
|
|
+ }
|
|
|
},
|
|
|
/* 获取最新的指标 默认展示 */
|
|
|
getNewTargetList: _.throttle(function() {
|
|
@@ -1029,7 +1115,7 @@ export default {
|
|
|
// 展开目录
|
|
|
this.defaultShowNodes=classify_arr.map(item=>item.UniqueCode)
|
|
|
//设置tree高亮
|
|
|
- this.$nextTick(()=>{
|
|
|
+ this.$refs.menuTree&&this.$nextTick(()=>{
|
|
|
setTimeout(() => {
|
|
|
this.$refs.menuTree.setCurrentKey(UniqueCode);
|
|
|
}, 1000);
|
|
@@ -1054,7 +1140,7 @@ export default {
|
|
|
this.$refs.edb_detail_data.$refs.valueUl.scrollTop=0
|
|
|
}
|
|
|
}
|
|
|
- this.$nextTick(()=>{
|
|
|
+ this.$refs.menuTree&&this.$nextTick(()=>{
|
|
|
const _node = this.$refs.menuTree.getNode(this.select_node)
|
|
|
this.dynamicNode = _node;
|
|
|
this.dynamicNode&&this.resetNodeStyle(this.dynamicNode)
|
|
@@ -1079,22 +1165,27 @@ export default {
|
|
|
})
|
|
|
}),
|
|
|
//获取指标图表列表
|
|
|
- getEdbChartList(){
|
|
|
- dataBaseInterface.getEdbChartList({
|
|
|
- PageSize:this.PageSize,
|
|
|
- CurrentIndex:this.CurrentIndex,
|
|
|
- ClassifyId:this.select_classifyId,
|
|
|
- IsOnlyMe:this.IsOnlyMe
|
|
|
- }).then(res=>{
|
|
|
+ async getEdbChartList(){
|
|
|
+ const res = this.classifyShowType === 'own'
|
|
|
+ ? await edbCollectInterface.getCollectEdb({
|
|
|
+ PageSize:this.PageSize,
|
|
|
+ CurrentIndex:this.CurrentIndex,
|
|
|
+ ClassifyId:this.select_classifyId,
|
|
|
+ Keyword: this.searchCollectWord
|
|
|
+ })
|
|
|
+ : await dataBaseInterface.getEdbChartList({
|
|
|
+ PageSize:this.PageSize,
|
|
|
+ CurrentIndex:this.CurrentIndex,
|
|
|
+ ClassifyId:this.select_classifyId,
|
|
|
+ IsOnlyMe:this.IsOnlyMe,
|
|
|
+ EdbType: this.isBasicBase?1:2
|
|
|
+ })
|
|
|
if(res.Ret!==200) return
|
|
|
if(res.Data){
|
|
|
this.chartList = this.CurrentIndex===1?res.Data.List:[...this.chartList,...res.Data.List]
|
|
|
this.Total = res.Data.Paging.Totals||0
|
|
|
this.IsListEnd = res.Data.Paging.IsEnd
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
},
|
|
|
// 切换刷新状态
|
|
|
async toggleEdbRefreshStatus(item,type='list'){
|
|
@@ -1139,7 +1230,8 @@ export default {
|
|
|
searchApi(query,page=1) {
|
|
|
dataBaseInterface.targetSearchByPage({
|
|
|
KeyWord:query,
|
|
|
- CurrentIndex: page
|
|
|
+ CurrentIndex: page,
|
|
|
+ EdbType: this.isBasicBase?1:2
|
|
|
}).then(res => {
|
|
|
if(res.Ret !== 200) return
|
|
|
|
|
@@ -1967,10 +2059,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- /* 一键成图 */
|
|
|
- createChartHandle() {
|
|
|
- this.isCreateChart = true;
|
|
|
- },
|
|
|
|
|
|
/* 重新刷新 重新计算后重置刷数据 */
|
|
|
initDataStatus() {
|
|
@@ -2041,7 +2129,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
//根据页面宽度 判断标签数量是否达到上限
|
|
|
- const listWidth = document.querySelector('.database-label').offsetWidth
|
|
|
+ const listWidth = document.querySelector('.database-label')&&document.querySelector('.database-label').offsetWidth
|
|
|
const minWidth=170+20
|
|
|
const maxNum = Math.floor(listWidth/minWidth)
|
|
|
if(this.labelList.length>=maxNum){
|
|
@@ -2098,7 +2186,11 @@ export default {
|
|
|
resolve(this.treeData)
|
|
|
}else{
|
|
|
let arr=[]
|
|
|
- const res=await dataBaseInterface.targetCatalog({ParentId:node.data.ClassifyId,IsOnlyMe:this.IsOnlyMe})
|
|
|
+ const res=await dataBaseInterface.targetCatalog({
|
|
|
+ ParentId:node.data.ClassifyId,
|
|
|
+ IsOnlyMe:this.IsOnlyMe,
|
|
|
+ ClassifyType: this.isBasicBase ? 0 : 2
|
|
|
+ })
|
|
|
if (res.Ret === 200) {
|
|
|
const temarr = res.Data.AllNodes || [];
|
|
|
arr=temarr.map(item=>{
|
|
@@ -2156,6 +2248,44 @@ export default {
|
|
|
this.$nextTick(()=>{//重新打开计算指标选择类型弹窗
|
|
|
this.isOpenComputed=true
|
|
|
})
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 切换分类类型 */
|
|
|
+ handleChangeClassifyType() {
|
|
|
+ this.defaultShowNodes = [];
|
|
|
+ this.chartList = [];
|
|
|
+ this.Total = 0;
|
|
|
+ this.selected_edbid = 0;
|
|
|
+ this.select_classifyId = 0;
|
|
|
+ this.search_txt = '';
|
|
|
+ this.searchCollectWord = '';
|
|
|
+ this.getTreeData()
|
|
|
+ this.getEdbChartList()
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 收藏指标 */
|
|
|
+ handleCollectEdb() {
|
|
|
+ this.isOpenEdbCollectDia = true
|
|
|
+ },
|
|
|
+
|
|
|
+ async handleRemoveCollect(item=null) {
|
|
|
+ const res = await edbCollectInterface.edbCollectCancel({
|
|
|
+ ClassifyId: this.select_classifyId,
|
|
|
+ EdbInfoId: item?item.EdbInfoId:this.selected_edbid
|
|
|
+ })
|
|
|
+
|
|
|
+ if(res.Ret !== 200) return
|
|
|
+ this.$message.success('取消收藏成功')
|
|
|
+ this.getTreeData()
|
|
|
+ this.getEdbChartList()
|
|
|
+ },
|
|
|
+
|
|
|
+ handleOpenCollectClassify(data=null) {
|
|
|
+ this.collectClassifyForm = {
|
|
|
+ name: data?data.ClassifyName:'',
|
|
|
+ classifyId:data?data.ClassifyId:0
|
|
|
+ }
|
|
|
+ this.isOpenCollectClassifyDia = true
|
|
|
}
|
|
|
},
|
|
|
//离开页面时保存标签
|
|
@@ -2164,7 +2294,7 @@ export default {
|
|
|
next()
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getlabelList()
|
|
|
+ // this.getlabelList()
|
|
|
this.getEdbChartList()
|
|
|
this.$route.query.code
|
|
|
? this.getTreeData({code: this.$route.query.code,id: this.$route.query.id,classifyId:this.$route.query.classifyId})
|
|
@@ -2271,7 +2401,7 @@ export default {
|
|
|
}
|
|
|
.target_tree {
|
|
|
color: #333;
|
|
|
- height: calc(100vh - 400px);
|
|
|
+ height: calc(100vh - 420px);
|
|
|
overflow: auto;
|
|
|
.label-input .el-input__inner {
|
|
|
height: 25px;
|