添加附件上传显示提示以及配置项
This commit is contained in:
@ -48,3 +48,6 @@ VITE_GLOB_API_URL_PREFIX =
|
||||
VITE_GLOB_DISABLE_NEWS=false
|
||||
# 禁用关闭页面提示
|
||||
# VITE_GLOB_CLOSE_ALERT_DISABLED=true
|
||||
|
||||
#附件上传显示提示
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)
|
||||
|
||||
@ -42,3 +42,5 @@ VITE_GLOB_DISABLE_NEWS = true
|
||||
#登录时是否需要输入租户码
|
||||
# VITE_GLOB_TENANT_INPUT_REQUIRED = true
|
||||
|
||||
#附件上传显示提示
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)
|
||||
|
||||
@ -45,3 +45,6 @@ VITE_USE_PWA = false
|
||||
VITE_GLOB_DISABLE_NEWS=false
|
||||
# 禁用关闭页面提示
|
||||
# VITE_GLOB_CLOSE_ALERT_DISABLED=true
|
||||
|
||||
#附件上传显示提示
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)
|
||||
|
||||
@ -42,3 +42,5 @@ VITE_USE_PWA = false
|
||||
#登录时是否需要输入租户码
|
||||
# VITE_GLOB_TENANT_INPUT_REQUIRED = true
|
||||
|
||||
#附件上传显示提示
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP=(严禁在本非涉密平台处理、传输国家秘密、工作秘密、商业秘密、敏感信息,请确认扫描、传输的文件资料不涉密!)
|
||||
|
||||
@ -489,6 +489,9 @@
|
||||
<SvgIcon name="upload" style="margin-right: 10px" />
|
||||
{{ t('点击上传') }}
|
||||
</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-form-item>
|
||||
<a-form-item :label="t('二次上传')">
|
||||
@ -778,7 +781,7 @@
|
||||
import StaticData from './settings/StaticData.vue';
|
||||
import { ApiConfig } from '/@/components/ApiConfig';
|
||||
import { DicItemSelect } from '/@/components/DicItemSelect';
|
||||
// import { getAppEnvConfig } from '/@/utils/env';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
import { ColorPicker } from '/@/components/ColorPicker';
|
||||
import { TimePicker } from '/@/components/TimePicker';
|
||||
import SelectDepartmentV2 from '/@/components/Form/src/components/SelectDepartmentV2.vue';
|
||||
@ -790,6 +793,7 @@
|
||||
import { cloneDeep, random } from 'lodash-es';
|
||||
import { uploadMultiApi } from '/@/api/sys/upload';
|
||||
import { getFileList } from '/@/api/system/file';
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
|
||||
const { t } = useI18n();
|
||||
export default defineComponent({
|
||||
|
||||
@ -69,6 +69,9 @@
|
||||
<upload-outlined />
|
||||
点击上传
|
||||
</a-button>
|
||||
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
|
||||
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #itemRender="{ file, actions }">
|
||||
@ -119,6 +122,7 @@
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
import WebOfficeSDK from "/@/assets/libs/open-jssdk-v0.1.3.es.js";
|
||||
import {getToken} from "/@/utils/auth";
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
|
||||
const props = defineProps({
|
||||
value: String,
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
<img src="/src/assets/images/import.png" />
|
||||
<span class="upload-tip">只能上传Excel文件,且不能超过1G</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-button size="large" @click="downLoadTemplate">下载模板</a-button>
|
||||
</div>
|
||||
@ -32,7 +35,7 @@
|
||||
importUrl: String,
|
||||
data: Object,
|
||||
});
|
||||
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
const title = ref('');
|
||||
const fileList = ref();
|
||||
const importType = ref('');
|
||||
|
||||
@ -22,7 +22,7 @@ export function getAppEnvConfig() {
|
||||
(import.meta.env 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)) {
|
||||
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_PRINT_BASE_URL,
|
||||
VITE_GLOB_TENANT_ENABLED,
|
||||
VITE_GLOB_TENANT_INPUT_REQUIRED
|
||||
VITE_GLOB_TENANT_INPUT_REQUIRED,
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -104,6 +104,9 @@
|
||||
>
|
||||
<img v-if="data.info.config.pictureUrl" :src="data.info.config.pictureUrl" />
|
||||
<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>
|
||||
</div>
|
||||
</a-form-item>
|
||||
@ -242,6 +245,7 @@
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
const { t } = useI18n();
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
info: DashboardInfo;
|
||||
|
||||
@ -22,6 +22,9 @@
|
||||
<a-button type="primary">
|
||||
{{ t('点击上传') }}
|
||||
</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-form-item>
|
||||
</a-collapse-panel>
|
||||
@ -37,6 +40,8 @@
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { getFileList } from '/@/api/system/file';
|
||||
import { uploadMultiApi } from '/@/api/sys/upload';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
const { t } = useI18n();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
||||
@ -599,6 +599,9 @@
|
||||
<SvgIcon name="upload" style="margin-right: 10px" />
|
||||
{{ t('点击上传') }}
|
||||
</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-form-item>
|
||||
</template>
|
||||
@ -947,6 +950,8 @@
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { getFileList } from '/@/api/system/file';
|
||||
import { uploadMultiApi } from '/@/api/sys/upload';
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
const { t } = useI18n();
|
||||
export default defineComponent({
|
||||
name: 'PropertyOption',
|
||||
|
||||
@ -34,6 +34,9 @@
|
||||
<img :src="BgImg" />
|
||||
<div class="a-upload__text">{{ t('将文件拖到此处,或') }}<em>{{ t('点击上传') }}</em></div>
|
||||
</a-upload>
|
||||
<div v-if="VITE_GLOB_UPLOAD_ALERT_TIP?.trim()" style="color: red; margin-top: 8px;">
|
||||
{{VITE_GLOB_UPLOAD_ALERT_TIP}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-modal>
|
||||
@ -48,7 +51,8 @@
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
const props = defineProps({
|
||||
importType: {
|
||||
type:String,
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
<div class="a-upload__text"
|
||||
>{{ 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>
|
||||
</div>
|
||||
</a-modal>
|
||||
@ -54,6 +57,7 @@
|
||||
type: Boolean
|
||||
},
|
||||
});
|
||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||
|
||||
async function open() {
|
||||
data.visible = true;
|
||||
|
||||
1
types/config.d.ts
vendored
1
types/config.d.ts
vendored
@ -167,6 +167,7 @@ export interface GlobEnvConfig {
|
||||
VITE_GLOB_DISABLE_NEWS: boolean;
|
||||
VITE_GLOB_CLOSE_ALERT_DISABLED: boolean;
|
||||
VITE_GLOB_TENANT_INPUT_REQUIRED: boolean;
|
||||
VITE_GLOB_UPLOAD_ALERT_TIP?: string;
|
||||
}
|
||||
|
||||
export interface LogoConfig {
|
||||
|
||||
Reference in New Issue
Block a user