|
@@ -12,8 +12,8 @@
|
|
|
<div class="datasheet_top">
|
|
|
<el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_excel)&&sourceMap[$route.path]===1" type="primary" style="margin-right:20px" @click="goAddSheetHandle"
|
|
|
>添加Excel表格</el-button >
|
|
|
- <el-button v-if="sourceMap[$route.path]===2" type="primary" style="margin-right:20px" @click="goAddSheetHandle">添加时间序列表格</el-button >
|
|
|
- <el-button v-if="sourceMap[$route.path]===3" type="primary" @click="goAddSheetHandle">添加混合表格</el-button >
|
|
|
+ <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_data_sheetAdd)&&sourceMap[$route.path]===2" type="primary" style="margin-right:20px" @click="goAddSheetHandle">添加时间序列表格</el-button >
|
|
|
+ <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_mix_sheetAdd)&&sourceMap[$route.path]===3" type="primary" @click="goAddSheetHandle">添加混合表格</el-button >
|
|
|
|
|
|
</div>
|
|
|
<div class="search-cont">
|
|
@@ -68,7 +68,7 @@
|
|
|
placeholder="请输入值"
|
|
|
class="label-input"
|
|
|
v-model="new_label"
|
|
|
- v-if="data.isEdit&&permissionBtn.isShowBtn('etaTablePermission','etaTable_classifyOpt_edit')"
|
|
|
+ v-if="data.isEdit&&isSheetBtnShow('classifyOpt_edit')"
|
|
|
@blur="changeValue(data)"
|
|
|
/>
|
|
|
<span
|
|
@@ -95,7 +95,7 @@
|
|
|
alt=""
|
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
|
@click.stop="editNode(node, data)"
|
|
|
- v-if="!data.ExcelInfoId&&permissionBtn.isShowBtn('etaTablePermission','etaTable_classifyOpt_edit')"
|
|
|
+ v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_edit')"
|
|
|
/>
|
|
|
<img
|
|
|
slot="reference"
|
|
@@ -103,12 +103,12 @@
|
|
|
alt=""
|
|
|
style="width: 14px; height: 14px"
|
|
|
@click.stop="removeNode(node, data)"
|
|
|
- v-if="!data.ExcelInfoId&&permissionBtn.isShowBtn('etaTablePermission','etaTable_classifyOpt_delete')"
|
|
|
+ v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_delete')"
|
|
|
/>
|
|
|
</span>
|
|
|
</span>
|
|
|
</el-tree>
|
|
|
- <div class="noDepart" @click="addLevelOneHandle" v-if="permissionBtn.isShowBtn('etaTablePermission','etaTable_classifyOpt_edit')">
|
|
|
+ <div class="noDepart" @click="addLevelOneHandle" v-if="isSheetBtnShow('classifyOpt_edit')">
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
|
alt=""
|
|
@@ -162,7 +162,7 @@
|
|
|
@click="saveHandle"
|
|
|
v-if="
|
|
|
sheetDetailInfo.Source === 1 &&
|
|
|
- sheetDetailInfo.Button.OpButton&&isSheetBtnShow(sheetDetailInfo,'save')
|
|
|
+ sheetDetailInfo.Button.OpButton&&isSheetBtnShow('save')
|
|
|
"
|
|
|
>
|
|
|
保存
|
|
@@ -171,21 +171,21 @@
|
|
|
<li
|
|
|
class="editsty"
|
|
|
@click="goEditHandle"
|
|
|
- v-if="sheetDetailInfo.Button.OpButton&&isSheetBtnShow(sheetDetailInfo,'edit')"
|
|
|
+ v-if="sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit')"
|
|
|
>
|
|
|
编辑
|
|
|
</li>
|
|
|
<li
|
|
|
class="editsty"
|
|
|
@click="refreshSheet"
|
|
|
- v-if="sheetDetailInfo.Button.RefreshButton&&isSheetBtnShow(sheetDetailInfo,'refresh')"
|
|
|
+ v-if="sheetDetailInfo.Button.RefreshButton&&isSheetBtnShow('refresh')"
|
|
|
>
|
|
|
刷新
|
|
|
</li>
|
|
|
<li
|
|
|
class="editsty"
|
|
|
@click="saveOtherHandle"
|
|
|
- v-if="sheetDetailInfo.Button.CopyButton&&isSheetBtnShow(sheetDetailInfo,'otherSave')"
|
|
|
+ v-if="sheetDetailInfo.Button.CopyButton&&isSheetBtnShow('otherSave')"
|
|
|
>
|
|
|
另存为
|
|
|
</li>
|
|
@@ -446,20 +446,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- computed:{
|
|
|
- //数据表格是否展示
|
|
|
- isShowDataSheet(){
|
|
|
- const cell = {Source:2}
|
|
|
- return this.isSheetBtnShow(cell,'edit')||this.isSheetBtnShow(cell,'refresh')||this.isSheetBtnShow(cell,'otherSave')
|
|
|
- || this.isSheetBtnShow(cell,'download')||this.isSheetBtnShow(cell,'del')
|
|
|
- },
|
|
|
- //混合表格是否展示
|
|
|
- isShowMixSheet(){
|
|
|
- const cell = {Source:3}
|
|
|
- return this.isSheetBtnShow(cell,'edit')||this.isSheetBtnShow(cell,'refresh')||this.isSheetBtnShow(cell,'otherSave')
|
|
|
- || this.isSheetBtnShow(cell,'download')||this.isSheetBtnShow(cell,'del')
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
/* 添加表格 */
|
|
|
goAddSheetHandle() {
|
|
@@ -836,32 +822,6 @@ export default {
|
|
|
let left = $("#left")[0].offsetWidth;
|
|
|
let rigtWid = total_wid - left - 20 + "px";
|
|
|
$("#right")[0].style.width = rigtWid;
|
|
|
- },
|
|
|
- //判断右侧列表的下载按钮是否显示
|
|
|
- isDownLoadShow(cell){
|
|
|
- const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
|
|
|
- const checkMap = {
|
|
|
- 1:etaTablePermission.etaTable_excel_download,
|
|
|
- 2:etaTablePermission.etaTable_customize_data_download,
|
|
|
- 3:etaTablePermission.etaTable_customize_mix_download
|
|
|
- }
|
|
|
- return checkPermissionBtn(checkMap[cell.Source])
|
|
|
- },
|
|
|
- //判断右侧列表的删除按钮是否显示
|
|
|
- isDeleteShow(cell){
|
|
|
- const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
|
|
|
- const checkMap = {
|
|
|
- 1:etaTablePermission.etaTable_excel_del,
|
|
|
- 2:etaTablePermission.etaTable_customize_data_del,
|
|
|
- 3:etaTablePermission.etaTable_customize_mix_del
|
|
|
- }
|
|
|
- return checkPermissionBtn(checkMap[cell.Source])
|
|
|
- },
|
|
|
- //判断自定义表格-编辑,另存为,刷新按钮是否显示
|
|
|
- isSheetBtnShow(cell,type){
|
|
|
- console.log('cell',cell.Source)
|
|
|
- const sheetType = cell.Source===2?'data':'mix'
|
|
|
- return this.permissionBtn.isShowBtn('etaTablePermission',`etaTable_customize_${sheetType}_${type}`)
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|