|
@@ -12,8 +12,8 @@
|
|
|
<div class="main-left left" id="left" v-show="!isSlideLeft">
|
|
|
|
|
|
<div class="add-chart-cont">
|
|
|
- <el-button
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_add"
|
|
|
+ <el-button
|
|
|
+ v-if="isBtnShow('chartLib_add')"
|
|
|
@click="$router.push({path: '/addchart'})" type="primary"
|
|
|
><!-- 添加图表 -->{{$t('Chart.add_chart_btn')}}</el-button>
|
|
|
|
|
@@ -41,6 +41,7 @@
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
:remote-method="searchHandle"
|
|
|
@click.native="inputFocusHandle"
|
|
|
+ @keyup.enter.native="handleSearchEnter"
|
|
|
>
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
<el-option
|
|
@@ -49,15 +50,18 @@
|
|
|
:label="currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName"
|
|
|
:value="item.ChartInfoId"
|
|
|
>
|
|
|
- <div>
|
|
|
- <img
|
|
|
- :src="$icons.lock_ico2"
|
|
|
- width="18"
|
|
|
- height="18"
|
|
|
- style="vertical-align:middle"
|
|
|
- v-if="!item.HaveOperaAuth"
|
|
|
- />
|
|
|
- {{currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName}}
|
|
|
+ <div class="chart-search-item">
|
|
|
+ <div>
|
|
|
+ <img
|
|
|
+ :src="$icons.lock_ico2"
|
|
|
+ width="18"
|
|
|
+ height="18"
|
|
|
+ style="vertical-align:middle"
|
|
|
+ v-if="!item.HaveOperaAuth"
|
|
|
+ />
|
|
|
+ {{currentLang==='en'?(item.ChartNameEn||item.ChartName):item.ChartName}}
|
|
|
+ </div>
|
|
|
+ <i class="el-icon-star-on" style="color: #0052D9;font-size:18px;" v-if="item.CollectClassifyIdList&&item.CollectClassifyIdList.length"/>
|
|
|
</div>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -129,7 +133,7 @@
|
|
|
alt=""
|
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
@click.stop="addNode(node, data)"
|
|
|
- v-if="data.Button.AddButton&&permissionBtn.isShowBtn('chartLibPermission','chartLib_classifyOpt_add')"
|
|
|
+ v-if="data.Button.AddButton&&isBtnShow('chartLib_classifyOpt_add')"
|
|
|
/>
|
|
|
<!-- 编辑子项 -->
|
|
|
<img
|
|
@@ -137,7 +141,7 @@
|
|
|
alt=""
|
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
|
@click.stop="editNode(node, data)"
|
|
|
- v-if="data.Button.OpButton&&permissionBtn.isShowBtn('chartLibPermission','chartLib_classifyOpt_add')"
|
|
|
+ v-if="data.Button.OpButton&&isBtnShow('chartLib_classifyOpt_add')"
|
|
|
/>
|
|
|
<!-- 删除子项 -->
|
|
|
<img
|
|
@@ -146,7 +150,7 @@
|
|
|
alt=""
|
|
|
style="width: 14px; height: 14px"
|
|
|
@click.stop="removeNode(node, data)"
|
|
|
- v-if="data.Button.DeleteButton&&permissionBtn.isShowBtn('chartLibPermission','chartLib_classifyOpt_delete')"
|
|
|
+ v-if="data.Button.DeleteButton&&isBtnShow('chartLib_classifyOpt_delete')"
|
|
|
/>
|
|
|
</span>
|
|
|
</span>
|
|
@@ -158,7 +162,7 @@
|
|
|
<div
|
|
|
class="opt-item"
|
|
|
@click="addLevelOneHandle"
|
|
|
- v-if="CanOpClassify&&permissionBtn.isShowBtn('chartLibPermission','chartLib_classifyOpt_add')"
|
|
|
+ v-if="CanOpClassify&&isBtnShow('chartLib_classifyOpt_add')"
|
|
|
>
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
@@ -168,7 +172,11 @@
|
|
|
<span>添加图表分类</span>
|
|
|
</div>
|
|
|
<!-- 移动图表 -->
|
|
|
- <div class="opt-item" @click="isOpenBatchMoveDialog=true">
|
|
|
+ <div
|
|
|
+ v-if="isBtnShow('chartLib_batch_move')"
|
|
|
+ class="opt-item"
|
|
|
+ @click="isOpenBatchMoveDialog=true"
|
|
|
+ >
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/move_batch_ico.png"
|
|
|
alt=""
|
|
@@ -178,7 +186,7 @@
|
|
|
</div>
|
|
|
<template v-if="classifyShowType==='own'">
|
|
|
<!-- 共享图表 -->
|
|
|
- <div class="opt-item" @click="handleOpenSetShared('shared')">
|
|
|
+ <div class="opt-item" @click="handleOpenSetShared('shared')" v-if="isBtnShow('chartLib_set_shared')">
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/shared_ico.png"
|
|
|
alt=""
|
|
@@ -187,7 +195,7 @@
|
|
|
<span>设置图表共享</span>
|
|
|
</div>
|
|
|
<!-- 公开图表 -->
|
|
|
- <div class="opt-item" @click="handleOpenSetShared('public')">
|
|
|
+ <div class="opt-item" @click="handleOpenSetShared('public')" v-if="isBtnShow('chartLib_set_public')">
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/public_ico.png"
|
|
|
alt=""
|
|
@@ -305,7 +313,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="上限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.max"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -314,7 +322,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="下限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.min"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -328,7 +336,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="上限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.rightMax"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -337,7 +345,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="下限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.rightMin"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -348,7 +356,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="上限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.rightTwoMax"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -357,7 +365,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
placeholder="下限"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.rightTwoMin"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -372,7 +380,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
:placeholder="$t('Chart.up_limit')"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.max"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -381,7 +389,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
:placeholder="$t('Chart.low_limit')"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.min"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -393,7 +401,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
:placeholder="$t('Chart.low_limit')"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.x_min"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -402,7 +410,7 @@
|
|
|
size="mini"
|
|
|
type="number"
|
|
|
:placeholder="$t('Chart.up_limit')"
|
|
|
- :disabled="!permissionBtn.isShowBtn('chartLibPermission','chartLib_editLimit')"
|
|
|
+ :disabled="!isBtnShow('chartLib_editLimit')"
|
|
|
v-model="chartLimit.x_max"
|
|
|
@change="changeLimit"
|
|
|
/>
|
|
@@ -457,11 +465,10 @@
|
|
|
<ul class="right-actions">
|
|
|
<li><!-- 操作 -->{{$t('Table.column_operations')}}</li>
|
|
|
<li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_share"
|
|
|
class="span-item shareLink"
|
|
|
@click="copyChartConfirm('url')"
|
|
|
:data-clipboard-text="linkUrl"
|
|
|
- v-if="!chartInfo.Disabled"
|
|
|
+ v-if="!chartInfo.Disabled&&isBtnShow('chartLib_share')"
|
|
|
>
|
|
|
<i class="el-icon-share"/> <!-- 分享 -->
|
|
|
{{$t('Chart.chart_share_btn')}}
|
|
@@ -479,35 +486,34 @@
|
|
|
收藏
|
|
|
</li>
|
|
|
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_refresh"
|
|
|
+ <li
|
|
|
class="span-item"
|
|
|
@click="refreshHandle"
|
|
|
+ v-if="isBtnShow('chartLib_refresh')"
|
|
|
>
|
|
|
<span>
|
|
|
<i class="el-icon-refresh" style="margin-left:0"/> <!-- 刷新 -->{{$t('Edb.detail_refresh_btn')}}
|
|
|
</span>
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_save"
|
|
|
+ <li
|
|
|
class="span-item"
|
|
|
+ v-if="isBtnShow('chartLib_save')"
|
|
|
>
|
|
|
<span @click="saveChartHandle('')">
|
|
|
<i class="el-icon-collection" /> <!-- 保存 -->{{$t('Chart.chart_save_btn')}}
|
|
|
</span>
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_otherSave"
|
|
|
+ <li
|
|
|
+ v-if="isBtnShow('chartLib_otherSave')"
|
|
|
class="span-item"
|
|
|
>
|
|
|
<span @click="saveChartOtherHandle">
|
|
|
<i class="el-icon-document-add" /> <!-- 另存为 -->{{$t('Chart.chart_copy_btn')}}
|
|
|
</span>
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_edit"
|
|
|
+ <li
|
|
|
class="span-item"
|
|
|
- v-if="chartInfo.IsEdit"
|
|
|
+ v-if="chartInfo.IsEdit&&isBtnShow('chartLib_edit')"
|
|
|
@click="editChartHandle"
|
|
|
>
|
|
|
<img
|
|
@@ -516,56 +522,52 @@
|
|
|
style="width: 13px; height: 12px;"
|
|
|
/> <!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_copyOffice"
|
|
|
+ <li
|
|
|
class="span-item copy"
|
|
|
@click="copyChartConfirm('office')"
|
|
|
- v-if="!chartInfo.Disabled"
|
|
|
+ v-if="!chartInfo.Disabled&&isBtnShow('chartLib_copyOffice')"
|
|
|
>
|
|
|
<i class="el-icon-document-copy" /> <!-- 复制至office -->{{$t('Chart.chart_copyoffice')}}
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_copyWechat"
|
|
|
+ <li
|
|
|
class="span-item copy"
|
|
|
@click="copyChartConfirm('微信')"
|
|
|
- v-if="!chartInfo.Disabled"
|
|
|
+ v-if="!chartInfo.Disabled&&isBtnShow('chartLib_copyWechat')"
|
|
|
>
|
|
|
<img style="width: 13px; height: 12px;vertical-align: middle" src="~@/assets/img/chart_m/WeChat.jpg" /> <!-- 复制至微信 -->{{$t('Chart.chart_copywx')}}
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_enNameSetting"
|
|
|
+ <li
|
|
|
class="span-item copy"
|
|
|
@click="openLangInfoDia"
|
|
|
+ v-if="isBtnShow('chartLib_enNameSetting')"
|
|
|
>
|
|
|
<img style="width: 16px;vertical-align: middle" :src="$icons.to_en" /> <!-- 编辑信息 -->{{$t('Edb.detail_en_btn')}}
|
|
|
</li>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_del"
|
|
|
+ <li
|
|
|
class="span-item"
|
|
|
style="color: #ff4040"
|
|
|
@click="delChartHandle"
|
|
|
- v-if="chartInfo.IsEdit"
|
|
|
+ v-if="chartInfo.IsEdit&&isBtnShow('chartLib_del')"
|
|
|
>
|
|
|
<i class="el-icon-delete" style="color: #ff4040" /> <!-- 删除 -->{{$t('Chart.chart_del_btn')}}
|
|
|
</li>
|
|
|
<li
|
|
|
- v-if="chartInfo.ForumChartInfoId==0"
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_uploadToForum"
|
|
|
+ v-if="chartInfo.ForumChartInfoId==0&&isBtnShow('chartLib_uploadToForum')"
|
|
|
class="span-item copy"
|
|
|
@click="showUploadToForum=true;uploadToForumIntro=''"
|
|
|
>
|
|
|
<img style="width: 16px;vertical-align: middle" :src="$icons.upload_to_forum" /> <!-- 上传至社区 -->{{$t('Chart.upload_to_forum')}}
|
|
|
</li>
|
|
|
<template v-else>
|
|
|
- <li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_updateToForum"
|
|
|
+ <li
|
|
|
+ v-if="isBtnShow('chartLib_updateToForum')"
|
|
|
class="span-item copy"
|
|
|
@click="handleForumOpt('update')"
|
|
|
>
|
|
|
<img style="width: 16px;vertical-align: middle" :src="$icons.update_to_forum" /> <!-- 同步至社区 -->{{$t('Chart.update_to_forum')}}
|
|
|
</li>
|
|
|
<li
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_withdrawfromForum"
|
|
|
+ v-if="isBtnShow('chartLib_withdrawfromForum')"
|
|
|
class="span-item copy"
|
|
|
@click="handleForumOpt('withdraw')"
|
|
|
>
|
|
@@ -621,14 +623,14 @@
|
|
|
width="110"
|
|
|
>
|
|
|
<template slot-scope="scope" v-if="scope.row.HaveOperaAuth">
|
|
|
- <span
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_copyData"
|
|
|
+ <span
|
|
|
+ v-if="isBtnShow('chartLib_copyData')"
|
|
|
class="editsty" @click="copyCode(scope.row)"
|
|
|
>
|
|
|
<i class="el-icon-document-copy" /> <!-- 复制数据 -->{{$t('Edb.detail_copydata_btn')}}
|
|
|
</span>
|
|
|
<span
|
|
|
- v-permission="permissionBtn.chartLibPermission.chartLib_viewData"
|
|
|
+ v-if="isBtnShow('chartLib_viewData')"
|
|
|
class="editsty"
|
|
|
@click="viewTarget(scope.row)"
|
|
|
>
|
|
@@ -926,7 +928,7 @@ export default {
|
|
|
classifyTabs: [
|
|
|
{ label: '我的图表',key: 'own' },
|
|
|
{ label: '共享图表',key: 'shared' },
|
|
|
- { label: '公共图表',key: 'public' },
|
|
|
+ { label: '公开图表',key: 'public' },
|
|
|
],
|
|
|
classifyShowType:'own',
|
|
|
currentTreeName: 'own',//当前点击的分类树 4块 列表请求接口不同 own public collect sharedReceive sharedSend
|
|
@@ -983,9 +985,9 @@ export default {
|
|
|
/* 选中搜索图表 展开目录 选中图表 展示图表 */
|
|
|
search_txt(newval) {
|
|
|
if (newval) {
|
|
|
- let [search_obj] = this.searchOptions.filter(
|
|
|
- (item) => item.ChartInfoId === newval
|
|
|
- );
|
|
|
+ let search_obj = this.searchOptions.find(item => item.ChartInfoId === newval);
|
|
|
+ if(!search_obj) return
|
|
|
+
|
|
|
this.select_node = search_obj.UniqueCode;
|
|
|
|
|
|
this.selected_chartClassify = search_obj.ChartClassifyId; //图表所属分类
|
|
@@ -1048,6 +1050,20 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ //控制页面按钮权限
|
|
|
+ isBtnShow(key){
|
|
|
+ const {chartLibPermission,checkPermissionBtn}=this.permissionBtn
|
|
|
+
|
|
|
+ //同个按钮 不同分类分别控制的提出来判断
|
|
|
+ const BtnMap = {
|
|
|
+ 'chartLib_classifyOpt_add': this.classifyShowType==='own'?chartLibPermission[key]:chartLibPermission.chartLib_publicClassifyOpt_add, //新增分类
|
|
|
+ 'chartLib_classifyOpt_delete': this.classifyShowType==='own'?chartLibPermission[key]:chartLibPermission.chartLib_publicClassifyOpt_del, //删除分类
|
|
|
+ 'chartLib_batch_move': this.classifyShowType==='own'?chartLibPermission[key]:chartLibPermission.chartLib_publicClassifyOpt_batch_move, //批量移动
|
|
|
+ }
|
|
|
+ return BtnMap[key] ? checkPermissionBtn(BtnMap[key]) : checkPermissionBtn(chartLibPermission[key]);
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
/* 获取目录 我的/公共目录 */
|
|
|
async getTreeData(params) {
|
|
|
const res = this.classifyShowType === 'public'
|
|
@@ -1775,6 +1791,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ /* enter刷列表 */
|
|
|
+ handleSearchEnter(e) {
|
|
|
+ this.search_txt = e.target.value;
|
|
|
+ if(this.selected_chartid) {
|
|
|
+ this.selected_chartid = 0;
|
|
|
+ this.select_node = '';
|
|
|
+ }
|
|
|
+ this.$refs.listChartPage && (this.$refs.listChartPage.scrollTop = 0);
|
|
|
+ this.public_page_no = 1;
|
|
|
+ this.getChartList();
|
|
|
+ },
|
|
|
+
|
|
|
/* 搜索 */
|
|
|
searchHandle(query) {
|
|
|
this.search_page = 1;
|
|
@@ -3049,4 +3077,9 @@ export default {
|
|
|
.edb-item-style .el-input__icon {
|
|
|
line-height: 27px;
|
|
|
}
|
|
|
+.el-select-dropdown .chart-search-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
</style>
|