feat: fileicon, filetext 组件改为全局,新增一体机上传简历(接口待调)

This commit is contained in:
2025-12-24 13:53:19 +08:00
parent d0ff91a2c4
commit 212931e969
7 changed files with 596 additions and 5 deletions

View File

@@ -273,8 +273,6 @@ import PopupFeeBack from './popupbadFeeback.vue';
import UploadQrcode from './uploadQrcode.vue';
import AudioWave from './AudioWave.vue';
import WaveDisplay from './WaveDisplay.vue';
import FileIcon from './fileIcon.vue';
import FileText from './fileText.vue';
import useScreenStore from '@/stores/useScreenStore'
const screenStore = useScreenStore();
import { useAudioRecorder } from '@/hook/useRealtimeRecorder.js';

View File

@@ -1,54 +0,0 @@
<template>
<image v-if="type === 'application/pdf' || type === 'pdf'" :src="pdfIcon" class="file-icon" />
<image
v-else-if="
type === 'application/msword' ||
type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ||
type === 'doc' ||
type === 'docx'
"
:src="docIcon"
class="file-icon"
/>
<image
v-else-if="
type === 'application/vnd.ms-powerpoint' ||
type === 'application/vnd.openxmlformats-officedocument.presentationml.presentation'||
type === 'ppt' ||
type === 'pptx'
"
:src="pptIcon"
class="file-icon"
/>
<image v-else-if="type === 'text/markdown' || type === 'md'" :src="mdIcon" class="file-icon" />
<image v-else-if="type === 'text/plain' || type=== 'txt'" :src="txtIcon" class="file-icon" />
<image v-else-if="type === 'text/html' || type === 'html'" :src="htmlIcon" class="file-icon" />
<image
v-else-if="
type === 'application/vnd.ms-excel' ||
type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'||
type === 'xls' ||
type === 'xlsx'
"
:src="excelIcon"
class="file-icon"
/>
<image v-else :src="otherIcon" class="file-icon" />
</template>
<script setup>
import pdfIcon from '@/static/file/pdf.png';
import docIcon from '@/static/file/doc.png';
import pptIcon from '@/static/file/ppt.png';
import mdIcon from '@/static/file/md.png';
import txtIcon from '@/static/file/txt.png';
import htmlIcon from '@/static/file/html.png';
import excelIcon from '@/static/file/excel.png';
import otherIcon from '@/static/file/other.png';
const props = defineProps({
type: String,
});
const type = props.type;
</script>

View File

@@ -1,57 +0,0 @@
<template>
<view class="file-type-box">
{{ fileAbbreviation }}
</view>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
type: String,
});
const fileAbbreviation = computed(() => {
const typeMap = {
'application/pdf': 'PDF',
'application/msword': 'DOC',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'DOCX',
'application/vnd.ms-powerpoint': 'PPT',
'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'PPTX',
'application/vnd.ms-excel': 'XLS',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'XLSX',
'text/markdown': 'MD',
'text/plain': 'TXT',
'text/html': 'HTML',
'pdf':'PDF',
'doc':'DOC',
'docx':'DOCX',
'ppt':'PPT',
'pptx':'PPTX',
'xls': 'XLS',
'xlsx': 'XLSX',
'md':'MD',
'txt':'TXT',
'html':'HTML',
'jpg':'JPG',
'img':'IMG',
'png':'PNG',
'jpeg':'JPEG',
'gif':'GIF',
'webp':'WEBP',
'svg':'SVG',
'tiff':'TIFF',
};
return typeMap[props.type] || 'OTHER';
});
</script>
<style scoped>
.file-type-box {
font-weight: 400;
font-size: 24rpx;
color: #7b7b7b;
line-height: 28rpx;
}
</style>

View File

@@ -40,8 +40,6 @@
<script setup>
import { ref, inject, onUnmounted, watch, computed } from 'vue';
import FileIcon from './fileIcon.vue';
import FileText from './fileText.vue';
import uQRCode from '@/static/js/qrcode';
import config from '@/config';
import { onShow, onHide } from '@dcloudio/uni-app';