更新0811
This commit is contained in:
parent
a13d4337f4
commit
5cb9610349
@ -105,6 +105,28 @@
|
|||||||
>
|
>
|
||||||
全屏
|
全屏
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- 打印按钮 -->
|
||||||
|
<!-- <PrintButton-->
|
||||||
|
<!-- :beforePrint="beforePrint"-->
|
||||||
|
<!-- :afterPrint="afterPrint"-->
|
||||||
|
<!-- button-text="打印"-->
|
||||||
|
<!-- style="position: absolute; right: 220px; top: 10px; z-index: 10;"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <template #printContent>-->
|
||||||
|
<!-- <!– 根据文件类型动态显示打印内容 –>-->
|
||||||
|
<!-- <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">
|
<div class="preview-container" ref="previewContainer">
|
||||||
<audio v-if="isAudioType" class="preview-iframe" controls>
|
<audio v-if="isAudioType" class="preview-iframe" controls>
|
||||||
<source :src="selectFile.filePath.includes('http')
|
<source :src="selectFile.filePath.includes('http')
|
||||||
@ -302,10 +324,15 @@ import {getAccessToken} from '@/utils/auth'
|
|||||||
// import cos from "@/utils/cosUpload"
|
// import cos from "@/utils/cosUpload"
|
||||||
import cos from '@/utils/cos'
|
import cos from '@/utils/cos'
|
||||||
import {getLastPathSegment} from '@/utils/ruoyi'
|
import {getLastPathSegment} from '@/utils/ruoyi'
|
||||||
|
import PrintButton from '@/components/PrintButton/index.vue';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: {driveFileUpload},
|
components: {
|
||||||
|
driveFileUpload,
|
||||||
|
PrintButton
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadProgress: 0,
|
uploadProgress: 0,
|
||||||
@ -416,6 +443,11 @@ export default {
|
|||||||
showIframe() {
|
showIframe() {
|
||||||
// 只在不是图片和音频的时候才显示 iframe
|
// 只在不是图片和音频的时候才显示 iframe
|
||||||
return !this.isImage && !this.isAudioType;
|
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() {
|
created() {
|
||||||
@ -452,6 +484,13 @@ export default {
|
|||||||
console.log('folderList', this.folderList)
|
console.log('folderList', this.folderList)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
beforePrint() {
|
||||||
|
// 可做 loading 等操作
|
||||||
|
return Promise.resolve();
|
||||||
|
},
|
||||||
|
afterPrint() {
|
||||||
|
this.$message.success('打印完成');
|
||||||
|
},
|
||||||
handleFolderChange(e) {
|
handleFolderChange(e) {
|
||||||
// if (e.length === 0) {
|
// if (e.length === 0) {
|
||||||
// this.form.fatherId = null
|
// this.form.fatherId = null
|
||||||
|
@ -62,10 +62,16 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="userList">
|
<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="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"
|
<el-table-column label="员工昵称" align="center" key="nickname" prop="nickname" v-if="columns[2].visible"
|
||||||
:show-overflow-tooltip="true"/>
|
: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"
|
<el-table-column label="部门" align="center" key="deptName" prop="dept.name" v-if="columns[3].visible"
|
||||||
:show-overflow-tooltip="true"/>
|
:show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible"
|
<el-table-column label="手机号码" align="center" key="mobile" prop="mobile" v-if="columns[4].visible"
|
||||||
@ -482,8 +488,8 @@ export default {
|
|||||||
// 列信息
|
// 列信息
|
||||||
columns: [
|
columns: [
|
||||||
{key: 0, label: `员工编号`, visible: true},
|
{key: 0, label: `员工编号`, visible: true},
|
||||||
{key: 1, label: `员工名称`, visible: true},
|
|
||||||
{key: 2, label: `员工昵称`, visible: true},
|
{key: 2, label: `员工昵称`, visible: true},
|
||||||
|
{key: 1, label: `员工名称`, visible: true},
|
||||||
{key: 3, label: `部门`, visible: false},
|
{key: 3, label: `部门`, visible: false},
|
||||||
{key: 4, label: `手机号码`, visible: true},
|
{key: 4, label: `手机号码`, visible: true},
|
||||||
{key: 5, label: `状态`, visible: false},
|
{key: 5, label: `状态`, visible: false},
|
||||||
|
Loading…
Reference in New Issue
Block a user