|
@@ -90,7 +90,7 @@
|
|
placeholder="请输入值"
|
|
placeholder="请输入值"
|
|
class="label-input"
|
|
class="label-input"
|
|
v-model="new_label"
|
|
v-model="new_label"
|
|
- v-if="data.isEdit"
|
|
|
|
|
|
+ v-if="data.isEdit&&isEdbBtnShow('editCatalog')"
|
|
@blur="changeValue(node, data)"
|
|
@blur="changeValue(node, data)"
|
|
/>
|
|
/>
|
|
<span
|
|
<span
|
|
@@ -112,40 +112,46 @@
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
v-if="data.Button.MoveButton"
|
|
v-if="data.Button.MoveButton"
|
|
/>
|
|
/>
|
|
|
|
+ <!-- 添加子项 -->
|
|
<img
|
|
<img
|
|
src="~@/assets/img/set_m/add.png"
|
|
src="~@/assets/img/set_m/add.png"
|
|
alt=""
|
|
alt=""
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
@click.stop="addNode(node,data)"
|
|
@click.stop="addNode(node,data)"
|
|
- v-if="data.Button.AddButton"
|
|
|
|
|
|
+ v-if="data.Button.AddButton&&isEdbBtnShow('editCatalog')"
|
|
/>
|
|
/>
|
|
- <!--如果是分类,判断data.Button.OpButton不变;如果是指标,不显示(ETA1.0.3)-->
|
|
|
|
|
|
+ <!--编辑节点 如果是分类,判断data.Button.OpButton不变;如果是指标,不显示(ETA1.0.3)-->
|
|
<img
|
|
<img
|
|
src="~@/assets/img/set_m/edit.png"
|
|
src="~@/assets/img/set_m/edit.png"
|
|
alt=""
|
|
alt=""
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
@click.stop="editNode(node,data)"
|
|
@click.stop="editNode(node,data)"
|
|
- v-if="!data.EdbCode&&(data.Button.OpButton)"
|
|
|
|
|
|
+ v-if="!data.EdbCode&&(data.Button.OpButton)&&isEdbBtnShow('editCatalog')"
|
|
/>
|
|
/>
|
|
- <!--如果是分类,判断data.Button.DeleteButton不变;如果是指标,不显示(ETA1.0.3)-->
|
|
|
|
|
|
+ <!-- 删除节点 如果是分类,判断data.Button.DeleteButton不变;如果是指标,不显示(ETA1.0.3)-->
|
|
<img
|
|
<img
|
|
slot="reference"
|
|
slot="reference"
|
|
src="~@/assets/img/set_m/del.png"
|
|
src="~@/assets/img/set_m/del.png"
|
|
alt=""
|
|
alt=""
|
|
style="width: 14px; height: 14px;"
|
|
style="width: 14px; height: 14px;"
|
|
@click.stop="removeNode(node,data)"
|
|
@click.stop="removeNode(node,data)"
|
|
- v-if="!data.EdbCode&&(data.Button.DeleteButton)"
|
|
|
|
|
|
+ v-if="!data.EdbCode&&(data.Button.DeleteButton)&&isEdbBtnShow('deleteCatalog')"
|
|
/>
|
|
/>
|
|
- <i class="el-icon-view" v-if="data.EdbType===2&&![58,59,67,68].includes(data.Source)" @click.stop="viewNode(node,data)"></i>
|
|
|
|
|
|
+ <!-- 查看计算指标 -->
|
|
|
|
+ <i class="el-icon-view"
|
|
|
|
+ v-if="data.EdbType===2&&![58,59,67,68].includes(data.Source)&&isEdbBtnShow('checkCalcChart')"
|
|
|
|
+ @click.stop="viewNode(node,data)"></i>
|
|
|
|
+ <!-- 查看关联图表 -->
|
|
<img
|
|
<img
|
|
- v-if="data.Button.ShowChartRelation"
|
|
|
|
|
|
+ v-if="data.Button.ShowChartRelation&&isEdbBtnShow('checkRelatedChart')"
|
|
@click.stop="showAssociateChart=true,showAssociateComputeData=false"
|
|
@click.stop="showAssociateChart=true,showAssociateComputeData=false"
|
|
src="~@/assets/img/icons/associate_chart.png"
|
|
src="~@/assets/img/icons/associate_chart.png"
|
|
style="width: 14px; height: 14px;margin-left: 8px"
|
|
style="width: 14px; height: 14px;margin-left: 8px"
|
|
alt=""
|
|
alt=""
|
|
/>
|
|
/>
|
|
|
|
+ <!-- 查看关联指标 -->
|
|
<img
|
|
<img
|
|
- v-if="data.Button.ShowEdbRelation"
|
|
|
|
|
|
+ v-if="data.Button.ShowEdbRelation&&isEdbBtnShow('checkRelatedEdb')"
|
|
@click.stop="showAssociateComputeData=true,showAssociateChart=false"
|
|
@click.stop="showAssociateComputeData=true,showAssociateChart=false"
|
|
src="~@/assets/img/icons/associate_data.png"
|
|
src="~@/assets/img/icons/associate_data.png"
|
|
style="width: 14px; height: 14px;margin-left: 8px"
|
|
style="width: 14px; height: 14px;margin-left: 8px"
|
|
@@ -154,7 +160,7 @@
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</el-tree>
|
|
</el-tree>
|
|
- <div class="noDepart" @click="addLevelOneHandle" v-if="CanOpClassify">
|
|
|
|
|
|
+ <div class="noDepart" @click="addLevelOneHandle" v-if="CanOpClassify&&isEdbBtnShow('editCatalog')">
|
|
<img
|
|
<img
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
alt=""
|
|
alt=""
|
|
@@ -223,13 +229,13 @@
|
|
},EdbData)"
|
|
},EdbData)"
|
|
>编辑</el-button>
|
|
>编辑</el-button>
|
|
<!-- 指保存指标的上下限,在走势图才显示 -->
|
|
<!-- 指保存指标的上下限,在走势图才显示 -->
|
|
- <el-button v-if="activeTab==='Chart'"
|
|
|
|
|
|
+ <el-button v-if="activeTab==='Chart'&&isEdbBtnShow('saveEdb')"
|
|
type="text" @click.stop="saveEdbLimit">保存</el-button>
|
|
type="text" @click.stop="saveEdbLimit">保存</el-button>
|
|
<el-button v-if="isEdbBtnShow('setEn')"
|
|
<el-button v-if="isEdbBtnShow('setEn')"
|
|
type="text" @click="openEnNameDia">设置英文名称</el-button>
|
|
type="text" @click="openEnNameDia">设置英文名称</el-button>
|
|
<el-button v-if="EdbData.Button.InsertNewDataButton&&isEdbBtnShow('newValue')"
|
|
<el-button v-if="EdbData.Button.InsertNewDataButton&&isEdbBtnShow('newValue')"
|
|
type="text" @click.stop="updateNewestDataHandle" >{{(EdbData.DataInsertConfig.Date)?'编辑最新值':'添加最新值'}}</el-button>
|
|
type="text" @click.stop="updateNewestDataHandle" >{{(EdbData.DataInsertConfig.Date)?'编辑最新值':'添加最新值'}}</el-button>
|
|
- <el-button v-if="EdbData.EdbType===2"
|
|
|
|
|
|
+ <el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('calculateAgain')"
|
|
type="text" @click.stop="reCalculateHandler" :loading="calculateLoading">重新计算</el-button>
|
|
type="text" @click.stop="reCalculateHandler" :loading="calculateLoading">重新计算</el-button>
|
|
<el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('toSource')"
|
|
<el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('toSource')"
|
|
type="text" @click="isLookHistory=true;lookEdbId=selected_edbid">指标溯源</el-button>
|
|
type="text" @click="isLookHistory=true;lookEdbId=selected_edbid">指标溯源</el-button>
|
|
@@ -237,7 +243,7 @@
|
|
type="text" @click.stop="refreshBaseHandler" :loading="refreshLoading">全部刷新</el-button>
|
|
type="text" @click.stop="refreshBaseHandler" :loading="refreshLoading">全部刷新</el-button>
|
|
<el-button v-if="isEdbBtnShow('copyData')"
|
|
<el-button v-if="isEdbBtnShow('copyData')"
|
|
type="text" @click="copyCode">复制数据</el-button>
|
|
type="text" @click="copyCode">复制数据</el-button>
|
|
- <el-button v-if="EdbData.Button.DeleteButton"
|
|
|
|
|
|
+ <el-button v-if="EdbData.Button.DeleteButton&&isEdbBtnShow('deleteEdb')"
|
|
type="text" @click="removeNode(_,EdbData)" style="color:#C54322;">删除</el-button>
|
|
type="text" @click="removeNode(_,EdbData)" style="color:#C54322;">删除</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -246,6 +252,9 @@
|
|
<chart-trend-render
|
|
<chart-trend-render
|
|
:edbid="selected_edbid"
|
|
:edbid="selected_edbid"
|
|
:chartLang="currentLang"
|
|
:chartLang="currentLang"
|
|
|
|
+ :isShowChartBasis="isEdbBtnShow('showChartBasis')"
|
|
|
|
+ :isAllowSwitchSeason="isEdbBtnShow('switchSeason')"
|
|
|
|
+ :isAllowEditLimit="isEdbBtnShow('editLimit')"
|
|
ref="createChart"
|
|
ref="createChart"
|
|
@editEnName="openEnNameDia"/>
|
|
@editEnName="openEnNameDia"/>
|
|
<div class="info">
|
|
<div class="info">
|
|
@@ -758,18 +767,30 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- //控制指标详情操作按钮
|
|
|
|
|
|
+ //控制页面按钮权限
|
|
isEdbBtnShow(type){
|
|
isEdbBtnShow(type){
|
|
const {edbDataPermission,checkPermissionBtn}=this.permissionBtn
|
|
const {edbDataPermission,checkPermissionBtn}=this.permissionBtn
|
|
const BtnMap = {
|
|
const BtnMap = {
|
|
- 'update':edbDataPermission.edbData_update,
|
|
|
|
- 'edit':edbDataPermission.edbData_edit,
|
|
|
|
- 'toImg':edbDataPermission.edbData_toImgs,
|
|
|
|
- 'copyData':edbDataPermission.edbData_copyData,
|
|
|
|
- 'toSource':edbDataPermission.edbData_edbSource,
|
|
|
|
- 'setEn':edbDataPermission.edbData_enNameSetting,
|
|
|
|
- 'newValue':edbDataPermission.edbData_newestValue,
|
|
|
|
- 'refreshAll':edbDataPermission.edbData_refreshAll,
|
|
|
|
|
|
+ 'update':edbDataPermission.edbData_update,//指标更新
|
|
|
|
+ 'edit':edbDataPermission.edbData_edit,//指标编辑
|
|
|
|
+ /* 'toImg':edbDataPermission.edbData_toImgs, */
|
|
|
|
+ 'copyData':edbDataPermission.edbData_copyData,//复制数据
|
|
|
|
+ 'toSource':edbDataPermission.edbData_edbSource,//指标溯源
|
|
|
|
+ 'setEn':edbDataPermission.edbData_enNameSetting,//设置英文名称
|
|
|
|
+ 'newValue':edbDataPermission.edbData_newestValue,//添加/编辑最新值
|
|
|
|
+ 'refreshAll':edbDataPermission.edbData_refreshAll,//全部刷新
|
|
|
|
+ 'saveEdb':edbDataPermission.edbData_saveEdb,//保存指标
|
|
|
|
+ 'deleteEdb':edbDataPermission.edbData_deleteEdb,//删除指标
|
|
|
|
+ 'showChartBasis':edbDataPermission.edbData_showChartBasis,//展示/隐藏同比图
|
|
|
|
+ 'switchSeason':edbDataPermission.edbData_switchSeason,//切换季节性图
|
|
|
|
+ 'editLimit':edbDataPermission.edbData_editLimit,//编辑上下限
|
|
|
|
+ 'calculateAgain':edbDataPermission.edbData_calculateAgain,//重新计算
|
|
|
|
+
|
|
|
|
+ 'editCatalog':edbDataPermission.edbData_classifyOpt_add,//添加编辑目录
|
|
|
|
+ 'deleteCatalog':edbDataPermission.edbData_classifyOpt_delete,//删除目录
|
|
|
|
+ 'checkRelatedChart':edbDataPermission.edbData_checkRelatedChart,//查看关联图表
|
|
|
|
+ 'checkRelatedEdb':edbDataPermission.edbData_checkRelatedEdb,//查看关联指标
|
|
|
|
+ 'checkCalcChart':edbDataPermission.edbData_checkCalcChart,//查看计算指标
|
|
}
|
|
}
|
|
return checkPermissionBtn(BtnMap[type])
|
|
return checkPermissionBtn(BtnMap[type])
|
|
},
|
|
},
|
|
@@ -1081,7 +1102,7 @@ export default {
|
|
/* 双击label出现input修改框 */
|
|
/* 双击label出现input修改框 */
|
|
editNodeLabel(node, data) {
|
|
editNodeLabel(node, data) {
|
|
//目录名称可以双击修改 指标不能
|
|
//目录名称可以双击修改 指标不能
|
|
- if(!data.EdbCode && this.role === 'admin') {
|
|
|
|
|
|
+ if(!data.EdbCode && this.role === 'admin'&&this.isEdbBtnShow('editCatalog')) {
|
|
this.$set(data,'isEdit',true)
|
|
this.$set(data,'isEdit',true)
|
|
this.new_label = data.ClassifyName;
|
|
this.new_label = data.ClassifyName;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|