Merge branch 'lhq20250717' into 'dev'

添加附件上传显示提示以及配置项

See merge request itc-framework/ma/2024/front!96
This commit is contained in:
890147
2025-07-17 06:32:40 +00:00
14 changed files with 50 additions and 5 deletions

View File

@ -48,3 +48,6 @@ VITE_GLOB_API_URL_PREFIX =
VITE_GLOB_DISABLE_NEWS=false VITE_GLOB_DISABLE_NEWS=false
# 禁用关闭页面提示 # 禁用关闭页面提示
# VITE_GLOB_CLOSE_ALERT_DISABLED=true # VITE_GLOB_CLOSE_ALERT_DISABLED=true
#附件上传显示提示
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)

View File

@ -42,3 +42,5 @@ VITE_GLOB_DISABLE_NEWS = true
#登录时是否需要输入租户码 #登录时是否需要输入租户码
# VITE_GLOB_TENANT_INPUT_REQUIRED = true # VITE_GLOB_TENANT_INPUT_REQUIRED = true
#附件上传显示提示
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)

View File

@ -45,3 +45,6 @@ VITE_USE_PWA = false
VITE_GLOB_DISABLE_NEWS=false VITE_GLOB_DISABLE_NEWS=false
# 禁用关闭页面提示 # 禁用关闭页面提示
# VITE_GLOB_CLOSE_ALERT_DISABLED=true # VITE_GLOB_CLOSE_ALERT_DISABLED=true
#附件上传显示提示
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)

View File

@ -42,3 +42,5 @@ VITE_USE_PWA = false
#登录时是否需要输入租户码 #登录时是否需要输入租户码
# VITE_GLOB_TENANT_INPUT_REQUIRED = true # VITE_GLOB_TENANT_INPUT_REQUIRED = true
#附件上传显示提示
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)

View File

@ -489,6 +489,9 @@
<SvgIcon name="upload" style="margin-right: 10px" /> <SvgIcon name="upload" style="margin-right: 10px" />
{{ t('点击上传') }} {{ t('点击上传') }}
</a-button> </a-button>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
<a-form-item :label="t('二次上传')"> <a-form-item :label="t('二次上传')">
@ -778,7 +781,7 @@
import StaticData from './settings/StaticData.vue'; import StaticData from './settings/StaticData.vue';
import { ApiConfig } from '/@/components/ApiConfig'; import { ApiConfig } from '/@/components/ApiConfig';
import { DicItemSelect } from '/@/components/DicItemSelect'; import { DicItemSelect } from '/@/components/DicItemSelect';
// import { getAppEnvConfig } from '/@/utils/env'; import { getAppEnvConfig } from '/@/utils/env';
import { ColorPicker } from '/@/components/ColorPicker'; import { ColorPicker } from '/@/components/ColorPicker';
import { TimePicker } from '/@/components/TimePicker'; import { TimePicker } from '/@/components/TimePicker';
import SelectDepartmentV2 from '/@/components/Form/src/components/SelectDepartmentV2.vue'; import SelectDepartmentV2 from '/@/components/Form/src/components/SelectDepartmentV2.vue';
@ -790,6 +793,7 @@
import { cloneDeep, random } from 'lodash-es'; import { cloneDeep, random } from 'lodash-es';
import { uploadMultiApi } from '/@/api/sys/upload'; import { uploadMultiApi } from '/@/api/sys/upload';
import { getFileList } from '/@/api/system/file'; import { getFileList } from '/@/api/system/file';
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const { t } = useI18n(); const { t } = useI18n();
export default defineComponent({ export default defineComponent({

View File

@ -69,6 +69,9 @@
<upload-outlined /> <upload-outlined />
点击上传 点击上传
</a-button> </a-button>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</div> </div>
<template #itemRender="{ file, actions }"> <template #itemRender="{ file, actions }">
@ -119,6 +122,7 @@
import { getAppEnvConfig } from '/@/utils/env'; import { getAppEnvConfig } from '/@/utils/env';
import WebOfficeSDK from "/@/assets/libs/open-jssdk-v0.1.3.es.js"; import WebOfficeSDK from "/@/assets/libs/open-jssdk-v0.1.3.es.js";
import {getToken} from "/@/utils/auth"; import {getToken} from "/@/utils/auth";
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const props = defineProps({ const props = defineProps({
value: String, value: String,

View File

@ -14,6 +14,9 @@
<img src="/src/assets/images/import.png" /> <img src="/src/assets/images/import.png" />
<span class="upload-tip">只能上传Excel文件且不能超过1G</span> <span class="upload-tip">只能上传Excel文件且不能超过1G</span>
<span class="upload-text">将文件拖到此处<b>点击上传</b></span> <span class="upload-text">将文件拖到此处<b>点击上传</b></span>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload-dragger> </a-upload-dragger>
<a-button size="large" @click="downLoadTemplate">下载模板</a-button> <a-button size="large" @click="downLoadTemplate">下载模板</a-button>
</div> </div>
@ -32,7 +35,7 @@
importUrl: String, importUrl: String,
data: Object, data: Object,
}); });
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const title = ref(''); const title = ref('');
const fileList = ref(); const fileList = ref();
const importType = ref(''); const importType = ref('');

View File

@ -22,7 +22,7 @@ export function getAppEnvConfig() {
(import.meta.env as unknown as GlobEnvConfig) (import.meta.env as unknown as GlobEnvConfig)
: window[ENV_NAME as any]) as unknown as GlobEnvConfig; : window[ENV_NAME as any]) as unknown as GlobEnvConfig;
const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_REQUEST_TIMEOUT, VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_PREVIEW, VITE_GLOB_OUT_LINK_URL, VITE_GLOB_REPORT_URL, VITE_GLOB_PRINT_BASE_URL, VITE_GLOB_TENANT_ENABLED,VITE_GLOB_TENANT_INPUT_REQUIRED } = ENV; const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_REQUEST_TIMEOUT, VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_PREVIEW, VITE_GLOB_OUT_LINK_URL, VITE_GLOB_REPORT_URL, VITE_GLOB_PRINT_BASE_URL, VITE_GLOB_TENANT_ENABLED,VITE_GLOB_TENANT_INPUT_REQUIRED,VITE_GLOB_UPLOAD_ALERT_TIP } = ENV;
if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) { if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
warn(`VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`); warn(`VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`);
@ -40,7 +40,8 @@ export function getAppEnvConfig() {
VITE_GLOB_REPORT_URL, VITE_GLOB_REPORT_URL,
VITE_GLOB_PRINT_BASE_URL, VITE_GLOB_PRINT_BASE_URL,
VITE_GLOB_TENANT_ENABLED, VITE_GLOB_TENANT_ENABLED,
VITE_GLOB_TENANT_INPUT_REQUIRED VITE_GLOB_TENANT_INPUT_REQUIRED,
VITE_GLOB_UPLOAD_ALERT_TIP
}; };
} }

View File

@ -104,6 +104,9 @@
> >
<img v-if="data.info.config.pictureUrl" :src="data.info.config.pictureUrl" /> <img v-if="data.info.config.pictureUrl" :src="data.info.config.pictureUrl" />
<div v-else>{{ t('点击上传') }}</div> <div v-else>{{ t('点击上传') }}</div>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload> </a-upload>
</div> </div>
</a-form-item> </a-form-item>
@ -242,6 +245,7 @@
import { getToken } from '/@/utils/auth'; import { getToken } from '/@/utils/auth';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n(); const { t } = useI18n();
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
info: DashboardInfo; info: DashboardInfo;

View File

@ -22,6 +22,9 @@
<a-button type="primary"> <a-button type="primary">
{{ t('点击上传') }} {{ t('点击上传') }}
</a-button> </a-button>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
</a-collapse-panel> </a-collapse-panel>
@ -37,6 +40,8 @@
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { getFileList } from '/@/api/system/file'; import { getFileList } from '/@/api/system/file';
import { uploadMultiApi } from '/@/api/sys/upload'; import { uploadMultiApi } from '/@/api/sys/upload';
import { getAppEnvConfig } from '/@/utils/env';
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const { t } = useI18n(); const { t } = useI18n();
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

View File

@ -599,6 +599,9 @@
<SvgIcon name="upload" style="margin-right: 10px" /> <SvgIcon name="upload" style="margin-right: 10px" />
{{ t('点击上传') }} {{ t('点击上传') }}
</a-button> </a-button>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
</template> </template>
@ -947,6 +950,8 @@
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { getFileList } from '/@/api/system/file'; import { getFileList } from '/@/api/system/file';
import { uploadMultiApi } from '/@/api/sys/upload'; import { uploadMultiApi } from '/@/api/sys/upload';
import { getAppEnvConfig } from '/@/utils/env';
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const { t } = useI18n(); const { t } = useI18n();
export default defineComponent({ export default defineComponent({
name: 'PropertyOption', name: 'PropertyOption',

View File

@ -34,6 +34,9 @@
<img :src="BgImg" /> <img :src="BgImg" />
<div class="a-upload__text">{{ t('将文件拖到此处,或') }}<em>{{ t('点击上传') }}</em></div> <div class="a-upload__text">{{ t('将文件拖到此处,或') }}<em>{{ t('点击上传') }}</em></div>
</a-upload> </a-upload>
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</div> </div>
</a-modal> </a-modal>
@ -48,7 +51,8 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting'; import { useGlobSetting } from '/@/hooks/setting';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { getAppEnvConfig } from '/@/utils/env';
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
const props = defineProps({ const props = defineProps({
importType: { importType: {
type:String, type:String,

View File

@ -24,6 +24,9 @@
<div class="a-upload__text" <div class="a-upload__text"
>{{ t('将文件拖到此处,或') }}<em>{{ t('点击上传') }}</em></div >{{ t('将文件拖到此处,或') }}<em>{{ t('点击上传') }}</em></div
> >
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
</div>
</a-upload> </a-upload>
</div> </div>
</a-modal> </a-modal>
@ -54,6 +57,7 @@
type: Boolean type: Boolean
}, },
}); });
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
async function open() { async function open() {
data.visible = true; data.visible = true;

1
types/config.d.ts vendored
View File

@ -167,6 +167,7 @@ export interface GlobEnvConfig {
VITE_GLOB_DISABLE_NEWS: boolean; VITE_GLOB_DISABLE_NEWS: boolean;
VITE_GLOB_CLOSE_ALERT_DISABLED: boolean; VITE_GLOB_CLOSE_ALERT_DISABLED: boolean;
VITE_GLOB_TENANT_INPUT_REQUIRED: boolean; VITE_GLOB_TENANT_INPUT_REQUIRED: boolean;
VITE_GLOB_UPLOAD_ALERT_TIP?: string;
} }
export interface LogoConfig { export interface LogoConfig {