Jelajahi Sumber

上传文件大小

Xiao_123 7 bulan lalu
induk
melakukan
a284e7bdae

+ 1 - 1
src/components/Upload/img.vue

@@ -58,7 +58,7 @@ const accept = ['jpg', 'png', 'webp', 'jpeg']
 const handleUploadFile = async (e) => {
 const handleUploadFile = async (e) => {
   const file = e.target.files[0]
   const file = e.target.files[0]
   const size = file.size
   const size = file.size
-  if (size / (1024*1024) > 10) {
+  if (size / (1024*1024) > 20) {
     Snackbar.warning(t('common.fileSizeExceed'))
     Snackbar.warning(t('common.fileSizeExceed'))
     return
     return
   }
   }

+ 0 - 32
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/basicInfo.vue

@@ -3,12 +3,6 @@
   <div>
   <div>
     <div class="topTip">丰富详尽的企业介绍能提高求职者对贵企业的关注和了解,有助于达到更好的招聘效果</div>
     <div class="topTip">丰富详尽的企业介绍能提高求职者对贵企业的关注和了解,有助于达到更好的招聘效果</div>
     <CtForm ref="CtFormRef" :items="formItems" style="width: 900px;margin: 0 auto">
     <CtForm ref="CtFormRef" :items="formItems" style="width: 900px;margin: 0 auto">
-      <!-- <template #name="{ item }">
-        <div v-show="!item.show" class="text-right" style="width: 80px; line-height: 40px;">
-          <v-icon :color="statusInfo.color" size="20">{{ statusInfo.mdi }}</v-icon>
-          <span class="cursor-pointer text-decoration-underline" :style="{'color': statusInfo.color,'font-size': '14px'}" @click="emit('change', 6)">{{ statusInfo.label }}</span>
-        </div>
-      </template> -->
       <template #industryId="{ item }">
       <template #industryId="{ item }">
         <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="true">
         <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="true">
           <template v-slot:activator="{  props }">
           <template v-slot:activator="{  props }">
@@ -35,7 +29,6 @@
 defineOptions({name: 'informationSettingsComponents-basicInfo'})
 defineOptions({name: 'informationSettingsComponents-basicInfo'})
 import { ref, reactive } from 'vue'
 import { ref, reactive } from 'vue'
 import { getEnterpriseBaseInfo, updateEnterpriseBaseInfo } from '@/api/enterprise'
 import { getEnterpriseBaseInfo, updateEnterpriseBaseInfo } from '@/api/enterprise'
-// import { getEnterpriseAuth } from '@/api/recruit/enterprise/information'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { getDict } from '@/hooks/web/useDictionaries'
 import { useI18n } from '@/hooks/web/useI18n'
 import { useI18n } from '@/hooks/web/useI18n'
 import industryTypeCard from '@/components/industryTypeCard'
 import industryTypeCard from '@/components/industryTypeCard'
@@ -159,27 +152,6 @@ getDict('menduner_industry_type', {}, 'industryList').then(({ data }) => {
   industryList.value = data
   industryList.value = data
 })
 })
 
 
-// 获取企业实名信息
-// const authInfo = ref({})
-// const statusList = [
-//   { label: '未认证', color: '#fb8c00', value: null, mdi: 'mdi-shield-remove' },
-//   { label: '审核中', color: '#fb8c00', value: '0', mdi: 'mdi-shield-half-full' },
-//   { label: '已认证', color: '#00897B', value: '1', mdi: 'mdi-shield-check' },
-//   { label: '已驳回', color: '#fe574a', value: '2', mdi: 'mdi-shield-off' }
-// ]
-// const getAuthInfo = async () => {
-//   const data = await getEnterpriseAuth()
-//   if (!data) return
-//   authInfo.value = data
-// }
-// getAuthInfo()
-
-// const statusInfo = computed(() => {
-//   const obj = (authInfo.value && Object.keys(authInfo.value).length) ? statusList.find(e => e.value === authInfo.value.status) : statusList[0]
-//   return obj
-// })
-
-
 // 获取基本信息
 // 获取基本信息
 const getBaseInfo = async () => {
 const getBaseInfo = async () => {
   let completeCount = 0
   let completeCount = 0
@@ -228,10 +200,6 @@ const handleSave = async () => {
   await user.getEnterpriseInfo()
   await user.getEnterpriseInfo()
   getBaseInfo()
   getBaseInfo()
 }
 }
-
-// defineExpose({
-//   getBaseInfo
-// })
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 1 - 1
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/enterpriseLogo.vue

@@ -107,7 +107,7 @@ const handleUploadFile = async (e) => {
   const file = e.target.files[0]
   const file = e.target.files[0]
 
 
   const size = file.size
   const size = file.size
-  if (size / (1024*1024) > 10) {
+  if (size / (1024*1024) > 20) {
     Snackbar.warning(t('common.fileSizeExceed'))
     Snackbar.warning(t('common.fileSizeExceed'))
     return
     return
   }
   }

+ 6 - 0
src/views/recruit/enterprise/staffInfoSetting/index.vue

@@ -140,6 +140,12 @@ const handleUploadFile = async (e) => {
   const fileType = file.name.split('.')[1]
   const fileType = file.name.split('.')[1]
   if (!accept.includes(fileType)) return Snackbar.warning('请上传图片格式文件')
   if (!accept.includes(fileType)) return Snackbar.warning('请上传图片格式文件')
 
 
+  const size = file.size
+  if (size / (1024*1024) > 20) {
+    Snackbar.warning(t('common.fileSizeExceed'))
+    return
+  }
+
   const reader = new FileReader()
   const reader = new FileReader()
   reader.readAsDataURL(file)
   reader.readAsDataURL(file)
   reader.onload = () => {
   reader.onload = () => {