|
@@ -5,18 +5,20 @@
|
|
class="span-item shareLink"
|
|
class="span-item shareLink"
|
|
@click="copyChartConfirm('url')"
|
|
@click="copyChartConfirm('url')"
|
|
:data-clipboard-text="linkUrl"
|
|
:data-clipboard-text="linkUrl"
|
|
- v-if="!chartInfo.Disabled"
|
|
|
|
|
|
+ v-if="!chartInfo.Disabled&&isShowBtn('share')"
|
|
>
|
|
>
|
|
<i class="el-icon-share" /> 分享
|
|
<i class="el-icon-share" /> 分享
|
|
</li>
|
|
</li>
|
|
- <li class="span-item" @click="addMychartHandle(chartInfo)">
|
|
|
|
|
|
+ <li v-if="isShowBtn('addMyChart')"
|
|
|
|
+ class="span-item" @click="addMychartHandle(chartInfo)">
|
|
<img
|
|
<img
|
|
:src="$icons.chart_join_ico"
|
|
:src="$icons.chart_join_ico"
|
|
alt=""
|
|
alt=""
|
|
style="width: 13px; height: 12px; vertical-align: middle"
|
|
style="width: 13px; height: 12px; vertical-align: middle"
|
|
/>加入我的图库
|
|
/>加入我的图库
|
|
</li>
|
|
</li>
|
|
- <li class="span-item" @click="refreshHandle">
|
|
|
|
|
|
+ <li v-if="isShowBtn('refresh')"
|
|
|
|
+ class="span-item" @click="refreshHandle">
|
|
<span
|
|
<span
|
|
><i class="el-icon-refresh" style="margin-left: 0" /> 刷新
|
|
><i class="el-icon-refresh" style="margin-left: 0" /> 刷新
|
|
</span>
|
|
</span>
|
|
@@ -26,12 +28,12 @@
|
|
<i class="el-icon-collection" /> 保存
|
|
<i class="el-icon-collection" /> 保存
|
|
</span>
|
|
</span>
|
|
</li>
|
|
</li>
|
|
- <li class="span-item" v-if="chartInfo.Button.IsCopy">
|
|
|
|
|
|
+ <li class="span-item" v-if="chartInfo.Button.IsCopy&&isShowBtn('otherSave')">
|
|
<span @click="saveChartOtherHandle">
|
|
<span @click="saveChartOtherHandle">
|
|
<i class="el-icon-document-add" /> 另存为
|
|
<i class="el-icon-document-add" /> 另存为
|
|
</span>
|
|
</span>
|
|
</li>
|
|
</li>
|
|
- <li class="span-item" v-if="chartInfo.Button.IsEdit" @click="editChartHandle">
|
|
|
|
|
|
+ <li class="span-item" v-if="chartInfo.Button.IsEdit&&isShowBtn('edit')" @click="editChartHandle">
|
|
<img
|
|
<img
|
|
src="~@/assets/img/set_m/edit.png"
|
|
src="~@/assets/img/set_m/edit.png"
|
|
alt=""
|
|
alt=""
|
|
@@ -41,21 +43,22 @@
|
|
<li
|
|
<li
|
|
class="span-item copy"
|
|
class="span-item copy"
|
|
@click="copyChartConfirm('office')"
|
|
@click="copyChartConfirm('office')"
|
|
- v-if="!chartInfo.Disabled"
|
|
|
|
|
|
+ v-if="!chartInfo.Disabled&&isShowBtn('copyOffice')"
|
|
>
|
|
>
|
|
<i class="el-icon-document-copy" /> 复制至office
|
|
<i class="el-icon-document-copy" /> 复制至office
|
|
</li>
|
|
</li>
|
|
<li
|
|
<li
|
|
class="span-item copy"
|
|
class="span-item copy"
|
|
@click="copyChartConfirm('微信')"
|
|
@click="copyChartConfirm('微信')"
|
|
- v-if="!chartInfo.Disabled"
|
|
|
|
|
|
+ v-if="!chartInfo.Disabled&&isShowBtn('copyWechat')"
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
style="width: 13px; height: 12px; vertical-align: middle"
|
|
style="width: 13px; height: 12px; vertical-align: middle"
|
|
src="~@/assets/img/chart_m/WeChat.jpg"
|
|
src="~@/assets/img/chart_m/WeChat.jpg"
|
|
/> 复制至微信
|
|
/> 复制至微信
|
|
</li>
|
|
</li>
|
|
- <li class="span-item copy" @click="openEnNameDia">
|
|
|
|
|
|
+ <li v-if="isShowBtn('enNameSetting')"
|
|
|
|
+ class="span-item copy" @click="openEnNameDia">
|
|
<img
|
|
<img
|
|
style="width: 16px; vertical-align: middle"
|
|
style="width: 16px; vertical-align: middle"
|
|
:src="$icons.to_en"
|
|
:src="$icons.to_en"
|
|
@@ -65,7 +68,7 @@
|
|
class="span-item"
|
|
class="span-item"
|
|
style="color: #ff4040"
|
|
style="color: #ff4040"
|
|
@click="delChartHandle"
|
|
@click="delChartHandle"
|
|
- v-if="chartInfo.Button.IsEdit"
|
|
|
|
|
|
+ v-if="chartInfo.Button.IsEdit&&isShowBtn('del')"
|
|
>
|
|
>
|
|
<i class="el-icon-delete" style="color: #ff4040" /> 删除
|
|
<i class="el-icon-delete" style="color: #ff4040" /> 删除
|
|
</li>
|
|
</li>
|
|
@@ -98,6 +101,61 @@ export default {
|
|
},
|
|
},
|
|
delChartHandle() {
|
|
delChartHandle() {
|
|
this.$emit('delChartHandle')
|
|
this.$emit('delChartHandle')
|
|
|
|
+ },
|
|
|
|
+ //在原先按钮显示的逻辑上,加上权限控制
|
|
|
|
+ //由于多个图表共用这个操作栏,通过路由判断
|
|
|
|
+ isShowBtn(btn){
|
|
|
|
+ const {path} = this.$route
|
|
|
|
+ const {statisticPermission,checkPermissionBtn} = this.permissionBtn
|
|
|
|
+ const chartrelevanceMap = {
|
|
|
|
+ share:checkPermissionBtn(statisticPermission.corrAnalysis_share),
|
|
|
|
+ addMyChart:checkPermissionBtn(statisticPermission.corrAnalysis_addMyChart),
|
|
|
|
+ refresh:checkPermissionBtn(statisticPermission.corrAnalysis_refresh),
|
|
|
|
+ otherSave:checkPermissionBtn(statisticPermission.corrAnalysis_otherSave),
|
|
|
|
+ edit:checkPermissionBtn(statisticPermission.corrAnalysis_edit),
|
|
|
|
+ copyOffice:checkPermissionBtn(statisticPermission.corrAnalysis_copyOffice),
|
|
|
|
+ copyWechat:checkPermissionBtn(statisticPermission.corrAnalysis_copyWechat),
|
|
|
|
+ enNameSetting:checkPermissionBtn(statisticPermission.corrAnalysis_enNameSetting),
|
|
|
|
+ del:checkPermissionBtn(statisticPermission.corrAnalysis_del),
|
|
|
|
+ }
|
|
|
|
+ const fittingEquationMap = {
|
|
|
|
+ share:checkPermissionBtn(statisticPermission.fittingEq_share),
|
|
|
|
+ addMyChart:checkPermissionBtn(statisticPermission.fittingEq_addMyChart),
|
|
|
|
+ refresh:checkPermissionBtn(statisticPermission.fittingEq_refresh),
|
|
|
|
+ otherSave:checkPermissionBtn(statisticPermission.fittingEq_otherSave),
|
|
|
|
+ edit:checkPermissionBtn(statisticPermission.fittingEq_edit),
|
|
|
|
+ copyOffice:checkPermissionBtn(statisticPermission.fittingEq_copyOffice),
|
|
|
|
+ copyWechat:checkPermissionBtn(statisticPermission.fittingEq_copyWechat),
|
|
|
|
+ enNameSetting:checkPermissionBtn(statisticPermission.fittingEq_enNameSetting),
|
|
|
|
+ del:checkPermissionBtn(statisticPermission.fittingEq_del),
|
|
|
|
+ }
|
|
|
|
+ const statisticFeatureMap = {
|
|
|
|
+ share:checkPermissionBtn(statisticPermission.statisticFeature_share),
|
|
|
|
+ addMyChart:checkPermissionBtn(statisticPermission.statisticFeature_addMyChart),
|
|
|
|
+ refresh:checkPermissionBtn(statisticPermission.statisticFeature_refresh),
|
|
|
|
+ otherSave:checkPermissionBtn(statisticPermission.statisticFeature_otherSave),
|
|
|
|
+ edit:checkPermissionBtn(statisticPermission.statisticFeature_edit),
|
|
|
|
+ copyOffice:checkPermissionBtn(statisticPermission.statisticFeature_copyOffice),
|
|
|
|
+ copyWechat:checkPermissionBtn(statisticPermission.statisticFeature_copyWechat),
|
|
|
|
+ enNameSetting:checkPermissionBtn(statisticPermission.statisticFeature_enNameSetting),
|
|
|
|
+ del:checkPermissionBtn(statisticPermission.statisticFeature_del),
|
|
|
|
+ }
|
|
|
|
+ //相关性分析
|
|
|
|
+ if(path==='/chartrelevance'){
|
|
|
|
+ return chartrelevanceMap[btn]
|
|
|
|
+ }
|
|
|
|
+ //拟合方程曲线
|
|
|
|
+ if(path==='/fittingEquationList'){
|
|
|
|
+ return fittingEquationMap[btn]
|
|
|
|
+ }
|
|
|
|
+ //统计特性
|
|
|
|
+ if(path==='/statisticFeatureList'){
|
|
|
|
+ return statisticFeatureMap[btn]
|
|
|
|
+ }
|
|
|
|
+ //商品价格曲线
|
|
|
|
+ if(path==='/commordityChartBase'){}
|
|
|
|
+
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|