|
@@ -6,6 +6,8 @@ import apiSheet from '@/api/sheet'
|
|
|
import { useWindowSize } from '@vueuse/core'
|
|
|
import { showToast, showDialog } from "vant";
|
|
|
import {usePublicSettingStore} from '@/store/modules/publicSetting'
|
|
|
+import {etaTablePermission,useAuthBtn} from '@/hooks/useAuthBtn'
|
|
|
+const {checkAuthBtn} = useAuthBtn()
|
|
|
const publicSettingStore = usePublicSettingStore()
|
|
|
// import { useDownLoadFile } from '@/hooks/useDownLoadFile'
|
|
|
const { appContext : { config: { globalProperties } } } = getCurrentInstance();
|
|
@@ -18,12 +20,15 @@ const link = ref(publicSettingStore.publicSetting.ChartViewUrl);
|
|
|
let showMoreAction = ref(false)
|
|
|
|
|
|
const sheetActions = computed(() => {
|
|
|
+ let authList = []
|
|
|
+ const Source = route.query.Source
|
|
|
+ if(Source === 1) authList = [ etaTablePermission.etaTable_customize_mix_refresh, etaTablePermission.etaTable_customize_mix_download, etaTablePermission.etaTable_customize_mix_del]
|
|
|
+ else if (Source === 2) authList = [ etaTablePermission.etaTable_customize_data_refresh, etaTablePermission.etaTable_customize_data_download, etaTablePermission.etaTable_customize_data_del]
|
|
|
+ else authList = [ etaTablePermission.etaTable_customize_mix_refresh, etaTablePermission.etaTable_excel_download, etaTablePermission.etaTable_excel_del]
|
|
|
return [
|
|
|
- // { label: globalProperties.$t('shared_table.chart'), types:'cancel', src: getStaticImg('table/chart.png')},
|
|
|
- { label: globalProperties.$t('shared_table.refresh'), types:'flushed', src: getStaticImg('table/flushed.png') },
|
|
|
- { label: globalProperties.$t('shared_table.download'), types:'download', src: getStaticImg('table/download.png')},
|
|
|
- { label: globalProperties.$t('shared_table.delete'), types:'delete', src: getStaticImg('table/delete.png')},
|
|
|
- // { label: globalProperties.$t('shared_table.cancel'), types:'cancel', src: getStaticImg('table/chart.png')},
|
|
|
+ { label: globalProperties.$t('shared_table.refresh'), types:'flushed', src: getStaticImg('table/flushed.png'), isAuth: Source === 2 ? true : checkAuthBtn(authList[0]) }, /* 因为pc端时间序列表格没有刷新这个权限,所以暂时直接给true */
|
|
|
+ { label: globalProperties.$t('shared_table.download'), types:'download', src: getStaticImg('table/download.png'), isAuth: checkAuthBtn(authList[1])},
|
|
|
+ { label: globalProperties.$t('shared_table.delete'), types:'delete', src: getStaticImg('table/delete.png'), isAuth: checkAuthBtn(authList[2])},
|
|
|
]
|
|
|
})
|
|
|
|
|
@@ -209,7 +214,7 @@ function Base64() {
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div v-for="item in sheetActions" :key="item.types">
|
|
|
- <div class="bottom-item" @click="handleActionClick(item)">
|
|
|
+ <div class="bottom-item" @click="handleActionClick(item)" v-if="item.isAuth">
|
|
|
<img :src="item.src" alt="">
|
|
|
<div>{{item.label}}</div>
|
|
|
</div>
|