|
@@ -59,7 +59,9 @@
|
|
|
<template #extra>
|
|
|
<el-button v-if="tableTempExcelProps.file" hc-btn type="primary" @click="fullScreenClick">全屏显示</el-button>
|
|
|
</template>
|
|
|
- <hc-online-office v-if="isShow" ui="hc-table-temp-excel" :props="tableTempExcelProps" />
|
|
|
+ <div :id="tableTempExcelId" class="relative h-full">
|
|
|
+ <hc-online-office v-if="isShow" ui="hc-table-temp-excel" :props="tableTempExcelProps" />
|
|
|
+ </div>
|
|
|
</hc-card>
|
|
|
</hc-body>
|
|
|
</hc-drawer>
|
|
@@ -68,7 +70,8 @@
|
|
|
<script setup>
|
|
|
import { ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
|
|
|
+import screenfull from 'screenfull'
|
|
|
+import { getArrValue, getObjValue, getRandom, isNullES } from 'js-fast-way'
|
|
|
import mainApi from '~api/exctab/exceltab'
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -99,8 +102,9 @@ watch(isShow, (val) => {
|
|
|
})
|
|
|
|
|
|
//处理相关数据
|
|
|
+const tableTempExcelId = ref('')
|
|
|
const getDataApi = () => {
|
|
|
-
|
|
|
+ tableTempExcelId.value = getRandom(6)
|
|
|
}
|
|
|
|
|
|
//树搜索
|
|
@@ -240,7 +244,14 @@ const getDetailExcel = async (dataId) => {
|
|
|
|
|
|
//全屏显示
|
|
|
const fullScreenClick = () => {
|
|
|
-
|
|
|
+ // 判断是否支持
|
|
|
+ if (!screenfull.isEnabled) {
|
|
|
+ window.$message.warning('当前浏览器不支持全屏')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ //指定全屏区域元素
|
|
|
+ const element = document.getElementById(tableTempExcelId.value)
|
|
|
+ if (element) screenfull.request(element)
|
|
|
}
|
|
|
|
|
|
//关闭抽屉
|