更新0811

This commit is contained in:
xyc 2025-08-11 09:54:37 +08:00
parent a13d4337f4
commit 5cb9610349
2 changed files with 49 additions and 4 deletions

View File

@ -105,6 +105,28 @@
>
全屏
</el-button>
<!-- 打印按钮 -->
<!-- <PrintButton-->
<!-- :beforePrint="beforePrint"-->
<!-- :afterPrint="afterPrint"-->
<!-- button-text="打印"-->
<!-- style="position: absolute; right: 220px; top: 10px; z-index: 10;"-->
<!-- >-->
<!-- <template #printContent>-->
<!-- &lt;!&ndash; 根据文件类型动态显示打印内容 &ndash;&gt;-->
<!-- <iframe-->
<!-- v-if="!isImage && !isAudioType"-->
<!-- :src="fileUrlMethod"-->
<!-- style="width: 100%; height: 100vh; border: none"-->
<!-- />-->
<!-- <div v-else-if="isImage" style="text-align: center; padding: 20px">-->
<!-- <img :src="previewSrc" style="max-width: 100%; max-height: 100vh;" />-->
<!-- </div>-->
<!-- <div v-else>-->
<!-- <p>当前类型不支持打印</p>-->
<!-- </div>-->
<!-- </template>-->
<!-- </PrintButton>-->
<div class="preview-container" ref="previewContainer">
<audio v-if="isAudioType" class="preview-iframe" controls>
<source :src="selectFile.filePath.includes('http')
@ -302,10 +324,15 @@ import {getAccessToken} from '@/utils/auth'
// import cos from "@/utils/cosUpload"
import cos from '@/utils/cos'
import {getLastPathSegment} from '@/utils/ruoyi'
import PrintButton from '@/components/PrintButton/index.vue';
export default {
name: 'index',
components: {driveFileUpload},
components: {
driveFileUpload,
PrintButton
},
data() {
return {
uploadProgress: 0,
@ -416,6 +443,11 @@ export default {
showIframe() {
// iframe
return !this.isImage && !this.isAudioType;
},
previewSrc() {
return this.selectFile.filePath.includes('http')
? this.inspectionFileUrl + this.selectFile.filePath.replace(/^.*?uploads\//, 'uploads/')
: this.imageUrl + this.selectFile.filePath;
}
},
created() {
@ -452,6 +484,13 @@ export default {
console.log('folderList', this.folderList)
})
},
beforePrint() {
// loading
return Promise.resolve();
},
afterPrint() {
this.$message.success('打印完成');
},
handleFolderChange(e) {
// if (e.length === 0) {
// this.form.fatherId = null

View File

@ -62,10 +62,16 @@
<el-table v-loading="loading" :data="userList">
<el-table-column label="员工编号" align="center" key="id" prop="id" v-if="columns[0].visible"/>
<el-table-column label="员工账号" align="center" key="username" prop="username" v-if="columns[1].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="员工昵称" align="center" key="nickname" prop="nickname" v-if="columns[2].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="员工岗位" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="性别" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="年龄" align="center" key="nickname" prop="nickname"
:show-overflow-tooltip="true"/>
<el-table-column label="员工账号" align="center" key="username" prop="username" v-if="columns[1].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="部门" align="center" key="deptName" prop="dept.name" v-if="columns[3].visible"
:show-overflow-tooltip="true"/>
<el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible"
@ -482,8 +488,8 @@ export default {
//
columns: [
{key: 0, label: `员工编号`, visible: true},
{key: 1, label: `员工名称`, visible: true},
{key: 2, label: `员工昵称`, visible: true},
{key: 1, label: `员工名称`, visible: true},
{key: 3, label: `部门`, visible: false},
{key: 4, label: `手机号码`, visible: true},
{key: 5, label: `状态`, visible: false},