【同步3.7.4版本代码】新增全局布局隐藏配置,优化多个组件的属性和逻辑

dev
JEECG 3 months ago
parent 62daec9c16
commit 502ef2f65d

@ -25,3 +25,6 @@ VITE_APP_SUB_jeecg-app-1 = '//localhost:8092'
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
# 作为乾坤子应用启动时必填需与qiankun主应用注册子应用时填写的 entry 保持一致 # 作为乾坤子应用启动时必填需与qiankun主应用注册子应用时填写的 entry 保持一致
#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//localhost:3001/jeecg-vue3
# 全局隐藏哪些布局。可选属性sider,header,multi-tabs多个用逗号隔开
#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs

@ -26,3 +26,6 @@ VITE_GLOB_API_URL_PREFIX=
#VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_NAME=jeecg-vue3
# 作为乾坤子应用启动时必填需与qiankun主应用注册子应用时填写的 entry 保持一致 # 作为乾坤子应用启动时必填需与qiankun主应用注册子应用时填写的 entry 保持一致
#VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//qiankun.boot3.jeecg.com/jeecg-vue3 #VITE_GLOB_QIANKUN_MICRO_APP_ENTRY=//qiankun.boot3.jeecg.com/jeecg-vue3
# 全局隐藏哪些布局。可选属性sider,header,multi-tabs多个用逗号隔开
#VITE_GLOB_HIDE_LAYOUT_TYPES=sider,header,multi-tabs

@ -57,8 +57,8 @@
"path-to-regexp": "^6.3.0", "path-to-regexp": "^6.3.0",
"pinia": "2.1.7", "pinia": "2.1.7",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.5.4",
"qs": "^6.13.1", "qs": "^6.13.1",
"qrcode": "^1.5.4",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0", "showdown": "^2.1.0",
"sortablejs": "^1.15.6", "sortablejs": "^1.15.6",

File diff suppressed because it is too large Load Diff

@ -37,6 +37,11 @@
} else { } else {
Object.assign(data.token, { colorTextBase: '#333' }); Object.assign(data.token, { colorTextBase: '#333' });
} }
// css
if (data.token.colorPrimary) {
document.documentElement.style.setProperty('--j-global-primary-color', data.token.colorPrimary);
}
} }
}; };
// update-begin--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.x // update-begin--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.x

@ -89,7 +89,6 @@
opt.getContainer = `.${prefixVar}-layout-content` as any; opt.getContainer = `.${prefixVar}-layout-content` as any;
} }
} }
console.log('getProps:opt',opt);
return opt as DrawerProps; return opt as DrawerProps;
}); });

@ -35,7 +35,8 @@ export const basicProps = {
loading: { type: Boolean }, loading: { type: Boolean },
maskClosable: { type: Boolean, default: true }, maskClosable: { type: Boolean, default: true },
getContainer: { getContainer: {
type: [Object, String] as PropType<any>, type: [Object, String, Function, Boolean] as PropType<any>,
default: () => 'body',
}, },
closeFunc: { closeFunc: {
type: [Function, Object] as PropType<any>, type: [Function, Object] as PropType<any>,

@ -6,6 +6,7 @@
style="width: 100%" style="width: 100%"
:disabled="disabled" :disabled="disabled"
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
showCheckedStrategy="SHOW_ALL"
:placeholder="placeholder" :placeholder="placeholder"
:loadData="asyncLoadTreeData" :loadData="asyncLoadTreeData"
:value="treeValue" :value="treeValue"

@ -2,7 +2,7 @@
<template> <template>
<div class="JPopup components-input-demo-presuffix" v-if="avalid"> <div class="JPopup components-input-demo-presuffix" v-if="avalid">
<!--输入框--> <!--输入框-->
<a-input @click="handleOpen" v-model:value="showText" :placeholder="placeholder" readOnly v-bind="attrs"> <a-input @click="handleOpen" :value="innerShowText || showText" :placeholder="placeholder" readOnly v-bind="attrs">
<template #prefix> <template #prefix>
<Icon icon="ant-design:cluster-outlined"></Icon> <Icon icon="ant-design:cluster-outlined"></Icon>
</template> </template>
@ -64,6 +64,8 @@
default: () => [], default: () => [],
}, },
showAdvancedButton: propTypes.bool.def(true), showAdvancedButton: propTypes.bool.def(true),
// search 使
inSearch: propTypes.bool.def(false),
}, },
emits: ['update:value', 'register', 'popUpChange', 'focus'], emits: ['update:value', 'register', 'popUpChange', 'focus'],
setup(props, { emit, refs }) { setup(props, { emit, refs }) {
@ -72,6 +74,7 @@
//pop //pop
const avalid = ref(true); const avalid = ref(true);
const showText = ref(''); const showText = ref('');
const innerShowText = ref('')
//model //model
const [regModal, { openModal }] = useModal(); const [regModal, { openModal }] = useModal();
// //
@ -124,6 +127,7 @@
let { fieldConfig } = props; let { fieldConfig } = props;
//popup //popup
let values = {}; let values = {};
let labels = []
for (let item of fieldConfig) { for (let item of fieldConfig) {
let val = rows.map((row) => row[item.source]); let val = rows.map((row) => row[item.source]);
// update-begin--author:liaozhiyang---date:20230831---forQQYUN-7535numberjoinstring // update-begin--author:liaozhiyang---date:20230831---forQQYUN-7535numberjoinstring
@ -132,7 +136,20 @@
item.target.split(',').forEach((target) => { item.target.split(',').forEach((target) => {
values[target] = val; values[target] = val;
}); });
if (props.inSearch) {
//
if (item.label) {
let txt = rows.map((row) => row[item.label]);
txt = txt.length == 1 ? txt[0] : txt.join(',');
labels.push(txt);
} else {
labels.push(val);
}
}
} }
innerShowText.value = labels.join(',');
// //
props.formElRef && props.formElRef.setFieldsValue(values); props.formElRef && props.formElRef.setFieldsValue(values);
// //
@ -146,6 +163,7 @@
return { return {
showText, showText,
innerShowText,
avalid, avalid,
uniqGroupId, uniqGroupId,
attrs, attrs,

@ -38,6 +38,7 @@
import { UploadTypeEnum } from './upload.data'; import { UploadTypeEnum } from './upload.data';
import { getFileAccessHttpUrl, getHeaders } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl, getHeaders } from '/@/utils/common/compUtils';
import UploadItemActions from './components/UploadItemActions.vue'; import UploadItemActions from './components/UploadItemActions.vue';
import { split } from '/@/utils/index';
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const { prefixCls } = useDesign('j-upload'); const { prefixCls } = useDesign('j-upload');
@ -201,7 +202,10 @@
return; return;
} }
let list: any[] = []; let list: any[] = [];
for (const item of paths.split(',')) { // update-begin--author:liaozhiyang---date:20250325---forissues/7990
const result = split(paths);
// update-end--author:liaozhiyang---date:20250325---forissues/7990
for (const item of result) {
let url = getFileAccessHttpUrl(item); let url = getFileAccessHttpUrl(item);
list.push({ list.push({
uid: uidGenerator(), uid: uidGenerator(),

@ -189,6 +189,12 @@
selectType: 'sys_role', selectType: 'sys_role',
}); });
} }
// ids arr
if (props.store === 'code') {
arr.sort((a, b) => ids.indexOf(a.code) - ids.indexOf(b.code));
} else {
arr.sort((a, b) => ids.indexOf(a.id) - ids.indexOf(b.id));
}
} }
selectedList.value = arr; selectedList.value = arr;
} else { } else {

@ -133,12 +133,22 @@
return list.filter(item=>item.name.indexOf(text)>=0) return list.filter(item=>item.name.indexOf(text)>=0)
}); });
const selectedKeys = ref<string[]>([]);
const selectedList = computed(()=>{ const selectedList = computed(()=>{
let list = dataList.value; let list = dataList.value;
if(!list || list.length ==0 ){ if(!list || list.length ==0 ){
return [] return []
} }
return list.filter(item=>item.checked) list = list.filter(item=>item.checked)
// selectedKeys
let arr: any[] = [];
for (let key of selectedKeys.value) {
let item = list.find(item => item.id == key);
if (item) {
arr.push(item);
}
}
return arr;
}); });
function unSelect(id) { function unSelect(id) {
@ -192,6 +202,11 @@
} }
} }
item.checked = !item.checked; item.checked = !item.checked;
if (item.checked) {
selectedKeys.value.push(item.id);
} else {
selectedKeys.value = selectedKeys.value.filter((k) => k != item.id);
}
} }
function prevent(e) { function prevent(e) {

@ -30,7 +30,8 @@
:maxHeight="getProps.maxHeight" :maxHeight="getProps.maxHeight"
:height="getWrapperHeight" :height="getWrapperHeight"
:visible="visibleRef" :visible="visibleRef"
:modalFooterHeight="footer !== undefined && !footer ? 0 : undefined" :modalHeaderHeight="getProps.modalHeaderHeight"
:modalFooterHeight="footer !== undefined && !footer ? 0 : getProps.modalFooterHeight"
v-bind="omit(getProps.wrapperProps, 'visible', 'height', 'modalFooterHeight')" v-bind="omit(getProps.wrapperProps, 'visible', 'height', 'modalFooterHeight')"
@ext-height="handleExtHeight" @ext-height="handleExtHeight"
@height-change="handleHeightChange"> @height-change="handleHeightChange">

@ -17,6 +17,9 @@ export const modalProps = {
okText: { type: String, default: t('common.okText') }, okText: { type: String, default: t('common.okText') },
closeFunc: Function as PropType<() => Promise<boolean>>, closeFunc: Function as PropType<() => Promise<boolean>>,
modalHeaderHeight: Number,
modalFooterHeight: Number,
}; };
export const basicProps = Object.assign({}, modalProps, { export const basicProps = Object.assign({}, modalProps, {

@ -199,6 +199,9 @@ export interface ModalProps {
zIndex?: number; zIndex?: number;
enableComment?: boolean; enableComment?: boolean;
modalHeaderHeight: number;
modalFooterHeight: number;
} }
export interface ModalWrapperProps { export interface ModalWrapperProps {

@ -1,6 +1,6 @@
import type { ComputedRef, Ref } from 'vue'; import type { ComputedRef, Ref } from 'vue';
import type { BasicTableProps } from '../types/table'; import type { BasicTableProps } from '../types/table';
import { computed, unref, ref, toRaw } from 'vue'; import { computed, unref, ref, toRaw, watch } from 'vue';
import { ROW_KEY } from '../const'; import { ROW_KEY } from '../const';
export function useTableExpand(propsRef: ComputedRef<BasicTableProps>, tableData: Ref<Recordable[]>, emit: EmitType) { export function useTableExpand(propsRef: ComputedRef<BasicTableProps>, tableData: Ref<Recordable[]>, emit: EmitType) {
@ -28,6 +28,13 @@ export function useTableExpand(propsRef: ComputedRef<BasicTableProps>, tableData
}; };
}); });
// propsexpandedRowKeys
watch(() => propsRef.value?.expandedRowKeys, (keys) => {
if (Array.isArray(keys)) {
expandedRowKeys.value = keys;
}
}, {immediate: true});
function expandAll() { function expandAll() {
const keys = getAllKeys(); const keys = getAllKeys();
expandedRowKeys.value = keys; expandedRowKeys.value = keys;

@ -1,6 +1,7 @@
import type { JPromptProps } from '../typing'; import type { JPromptProps } from '../typing';
import { render, createVNode, nextTick } from 'vue'; import { render, createVNode, nextTick } from 'vue';
import { error } from '/@/utils/log'; import { error } from '/@/utils/log';
import { getAppContext } from "@/store";
import JPrompt from '../JPrompt.vue'; import JPrompt from '../JPrompt.vue';
export function useJPrompt() { export function useJPrompt() {
@ -21,6 +22,7 @@ export function useJPrompt() {
document.body.removeChild(box); document.body.removeChild(box);
}, },
}); });
vm.appContext = getAppContext()!;
// body // body
render(vm, box); render(vm, box);
document.body.appendChild(box); document.body.appendChild(box);

@ -140,11 +140,15 @@ export function useJVxeComponent(props: JVxeComponent.Props) {
const ctx = { props, context }; const ctx = { props, context };
// //
const enhanced = getEnhanced(props.type); let enhanced = getEnhanced(props.type);
watch( watch(
value, value,
(newValue) => { (newValue) => {
// -update-begin--author:liaozhiyang---date:20241210---forissues/7497
// TODO
enhanced = getEnhanced(props.type);
// -update-end--author:liaozhiyang---date:20241210---forissues/7497
// //
let getValue = enhanced.getValue(newValue, ctx); let getValue = enhanced.getValue(newValue, ctx);
if (newValue !== getValue) { if (newValue !== getValue) {

@ -77,13 +77,13 @@
.vxe-table { .vxe-table {
//.vxe-table--footer-wrapper.body--wrapper, //.vxe-table--footer-wrapper.body--wrapper,
.vxe-table--body-wrapper.body--wrapper { .vxe-table--body-wrapper.body--wrapper {
overflow-x: hidden; // overflow-x: hidden;
} }
&:hover { &:hover {
//.vxe-table--footer-wrapper.body--wrapper, //.vxe-table--footer-wrapper.body--wrapper,
.vxe-table--body-wrapper.body--wrapper { .vxe-table--body-wrapper.body--wrapper {
overflow-x: auto; // overflow-x: auto;
} }
} }
} }

@ -10,6 +10,7 @@ import { useMethods } from '/@/hooks/system/useMethods';
import { importViewsFile, _eval } from '/@/utils'; import { importViewsFile, _eval } from '/@/utils';
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import {replaceUserInfoByExpression} from "@/utils/common/compUtils"; import {replaceUserInfoByExpression} from "@/utils/common/compUtils";
import { isString } from '/@/utils/is';
export function usePopBiz(ob, tableRef?) { export function usePopBiz(ob, tableRef?) {
// update-begin--author:liaozhiyang---date:20230811---forissues/675Popup // update-begin--author:liaozhiyang---date:20230811---forissues/675Popup
@ -211,6 +212,15 @@ export function usePopBiz(ob, tableRef?) {
currColumns[a].sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend'; currColumns[a].sortOrder = unref(iSorter).order === 'asc' ? 'ascend' : 'descend';
} }
} }
// update-begin--author:liaozhiyang---date:20250114---forissues/946popup线
currColumns.forEach((item) => {
if (item.fieldWidth != null) {
if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return;
item.width = item.fieldWidth;
delete item.fieldWidth;
}
});
// update-end--author:liaozhiyang---date:20250114---forissues/946popup线
if (currColumns[0].key !== 'rowIndex') { if (currColumns[0].key !== 'rowIndex') {
currColumns.unshift({ currColumns.unshift({
title: '序号', title: '序号',
@ -258,7 +268,16 @@ export function usePopBiz(ob, tableRef?) {
// href // href
const fieldHrefSlotKeysMap = {}; const fieldHrefSlotKeysMap = {};
fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item)); fieldHrefSlots.forEach((item) => (fieldHrefSlotKeysMap[item.slotName] = item));
let currColumns = handleColumnHrefAndDict(metaColumnList, fieldHrefSlotKeysMap); let currColumns: any = handleColumnHrefAndDict(metaColumnList, fieldHrefSlotKeysMap);
// update-begin--author:liaozhiyang---date:20250114---forissues/946popup线
currColumns.forEach((item) => {
if (isString(item.fieldWidth) && item.fieldWidth.trim().length == 0) return;
if (item.fieldWidth != null) {
item.width = item.fieldWidth;
delete item.fieldWidth;
}
});
// update-end--author:liaozhiyang---date:20250114---forissues/946popup线
// popup // popup
if (clickThenCheckFlag === true) { if (clickThenCheckFlag === true) {

@ -38,6 +38,7 @@ interface OnlineColumn {
dbType?:string; dbType?:string;
// //
linkField?:string; linkField?:string;
fieldExtendJson?:string
} }
export { OnlineColumn, HrefSlots }; export { OnlineColumn, HrefSlots };

@ -76,7 +76,9 @@
*/ */
async function getCaptchaCode() { async function getCaptchaCode() {
await resetFields(); await resetFields();
randCodeData.checkKey = new Date().getTime(); //update-begin---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
randCodeData.checkKey = new Date().getTime() + Math.random().toString(36).slice(-4); // 1629428467008;
//update-end---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
getCodeInfo(randCodeData.checkKey).then((res) => { getCodeInfo(randCodeData.checkKey).then((res) => {
randCodeData.randCodeImage = res; randCodeData.randCodeImage = res;
randCodeData.requestCodeSuccess = true; randCodeData.requestCodeSuccess = true;

@ -52,7 +52,20 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
window['_CONFIG'] = {} window['_CONFIG'] = {}
} }
// update-begin--author:sunjianlei---date:220250115---forQQYUN-10956
let domainURL = VITE_GLOB_DOMAIN_URL;
// http(s)
if (!/^http(s)?/.test(domainURL) && !/^(\/\/)?(.*\.)?.+\..+/.test(domainURL)) {
if (!domainURL.startsWith('/')) {
domainURL = '/' + domainURL;
}
domainURL = window.location.origin + domainURL;
}
// update-end--author:sunjianlei---date:220250115---forQQYUN-10956
// @ts-ignore // @ts-ignore
window._CONFIG['domianURL'] = VITE_GLOB_DOMAIN_URL; window._CONFIG['domianURL'] = domainURL;
return glob as Readonly<GlobConfig>; return glob as Readonly<GlobConfig>;
}; };

@ -8,6 +8,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods'; import { useMethods } from '/@/hooks/system/useMethods';
import { useDesign } from '/@/hooks/web/useDesign'; import { useDesign } from '/@/hooks/web/useDesign';
import { filterObj } from '/@/utils/common/compUtils'; import { filterObj } from '/@/utils/common/compUtils';
import { isFunction } from '@/utils/is';
const { handleExportXls, handleImportXls } = useMethods(); const { handleExportXls, handleImportXls } = useMethods();
// useListPage // useListPage
@ -24,7 +25,7 @@ interface ListPageOptions {
// //
name?: string | (() => string); name?: string | (() => string);
// //
params?: object; params?: object | (() => object);
}; };
// //
importConfig?: { importConfig?: {
@ -71,9 +72,15 @@ export function useListPage(options: ListPageOptions) {
//update-begin-author:taoyan date:20220507 for: erp - //update-begin-author:taoyan date:20220507 for: erp -
let paramsForm:any = {}; let paramsForm:any = {};
try { try {
paramsForm = await getForm().validate(); //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627] #7962
//useSearchForfalsevalidate
if (options?.tableProps?.useSearchForm !== false) {
paramsForm = await getForm().validate();
console.log('paramsForm', paramsForm);
}
//update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627] #7962
} catch (e) { } catch (e) {
console.error(e); console.warn(e);
} }
//update-end-author:taoyan date:20220507 for: erp - //update-end-author:taoyan date:20220507 for: erp -
@ -86,8 +93,11 @@ export function useListPage(options: ListPageOptions) {
// //
//update-begin-author:taoyan date:20220507 for: erp mainId //update-begin-author:taoyan date:20220507 for: erp mainId
if (params) { if (params) {
Object.keys(params).map((k) => { //update-begin-author:liusq---date:2025-03-20--for: [QQYUN-11627] #7962
let temp = (params as object)[k]; const realParams = isFunction(params) ? await params() : { ...(params || {}) };
//update-end-author:liusq---date:2025-03-20--for:[QQYUN-11627] #7962
Object.keys(realParams).map((k) => {
let temp = (realParams as object)[k];
if (temp) { if (temp) {
paramsForm[k] = unref(temp); paramsForm[k] = unref(temp);
} }

@ -52,7 +52,7 @@
const getShowHeader = computed(() => { const getShowHeader = computed(() => {
// //
if (appStore.mainAppProps.hideHeader) { if (appStore.getLayoutHideHeader) {
return false; return false;
} }
return unref(getShowInsetHeaderRef); return unref(getShowInsetHeaderRef);
@ -60,7 +60,7 @@
const getShowTabs = computed(() => { const getShowTabs = computed(() => {
// Tabs // Tabs
if (appStore.mainAppProps.hideMultiTabs) { if (appStore.getLayoutHideMultiTabs) {
return false; return false;
} }
return unref(getShowMultipleTab) && !unref(getFullContent); return unref(getShowMultipleTab) && !unref(getFullContent);

@ -72,7 +72,7 @@
const showClassSideBarRef = computed(() => { const showClassSideBarRef = computed(() => {
// //
if (appStore.mainAppProps.hideSider) { if (appStore.getLayoutHideSider) {
return false; return false;
} }
return unref(getSplit) ? !unref(getMenuHidden) : true; return unref(getSplit) ? !unref(getMenuHidden) : true;

@ -2,12 +2,14 @@ import type { App } from 'vue';
import type { Pinia } from 'pinia'; import type { Pinia } from 'pinia';
import { createPinia } from 'pinia'; import { createPinia } from 'pinia';
let app: Nullable<App<Element>> = null;
let store: Nullable<Pinia> = null; let store: Nullable<Pinia> = null;
export function setupStore(app: App<Element>) { export function setupStore($app: App<Element>) {
if (store == null) { if (store == null) {
store = createPinia(); store = createPinia();
} }
app = $app;
app.use(store); app.use(store);
} }
@ -16,4 +18,7 @@ export function destroyStore() {
store = null; store = null;
} }
export { store }; // app
export const getAppContext = () => app?._context;
export {app, store};

@ -11,6 +11,7 @@ import { Persistent } from '/@/utils/cache/persistent';
import { darkMode } from '/@/settings/designSetting'; import { darkMode } from '/@/settings/designSetting';
import { resetRouter } from '/@/router'; import { resetRouter } from '/@/router';
import { deepMerge } from '/@/utils'; import { deepMerge } from '/@/utils';
import { getHideLayoutTypes } from '/@/utils/env';
interface AppState { interface AppState {
darkMode?: ThemeEnum; darkMode?: ThemeEnum;
@ -70,6 +71,28 @@ export const useAppStore = defineStore({
getMainAppProps(): MainAppProps { getMainAppProps(): MainAppProps {
return this.mainAppProps; return this.mainAppProps;
}, },
getLayoutHideSider(): boolean {
const hideLayoutTypes = getHideLayoutTypes();
if (hideLayoutTypes.includes('sider')) {
return true;
}
return !!this.mainAppProps.hideSider;
},
getLayoutHideHeader(): boolean {
const hideLayoutTypes = getHideLayoutTypes();
if (hideLayoutTypes.includes('header')) {
return true;
}
return !!this.mainAppProps.hideHeader;
},
getLayoutHideMultiTabs(): boolean {
const hideLayoutTypes = getHideLayoutTypes();
if (hideLayoutTypes.includes('multi-tabs')) {
return true;
}
return !!this.mainAppProps.hideMultiTabs;
},
}, },
actions: { actions: {
setPageLoading(loading: boolean): void { setPageLoading(loading: boolean): void {

@ -36,6 +36,8 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_CAS_BASE_URL, VITE_GLOB_APP_CAS_BASE_URL,
VITE_GLOB_DOMAIN_URL, VITE_GLOB_DOMAIN_URL,
VITE_GLOB_ONLINE_VIEW_URL, VITE_GLOB_ONLINE_VIEW_URL,
//
VITE_GLOB_HIDE_LAYOUT_TYPES,
// JEECG // JEECG
VITE_GLOB_QIANKUN_MICRO_APP_NAME, VITE_GLOB_QIANKUN_MICRO_APP_NAME,
@ -59,6 +61,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_CAS_BASE_URL, VITE_GLOB_APP_CAS_BASE_URL,
VITE_GLOB_DOMAIN_URL, VITE_GLOB_DOMAIN_URL,
VITE_GLOB_ONLINE_VIEW_URL, VITE_GLOB_ONLINE_VIEW_URL,
VITE_GLOB_HIDE_LAYOUT_TYPES,
// JEECG // JEECG
VITE_GLOB_QIANKUN_MICRO_APP_NAME, VITE_GLOB_QIANKUN_MICRO_APP_NAME,
@ -102,3 +105,11 @@ export function isDevMode(): boolean {
export function isProdMode(): boolean { export function isProdMode(): boolean {
return import.meta.env.PROD; return import.meta.env.PROD;
} }
export function getHideLayoutTypes(): string[] {
const {VITE_GLOB_HIDE_LAYOUT_TYPES} = getAppEnvConfig();
if (typeof VITE_GLOB_HIDE_LAYOUT_TYPES !== 'string') {
return [];
}
return VITE_GLOB_HIDE_LAYOUT_TYPES.split(',');
}

@ -3,7 +3,7 @@ import type { App, Plugin } from 'vue';
import type { FormSchema } from "@/components/Form"; import type { FormSchema } from "@/components/Form";
import { unref } from 'vue'; import { unref } from 'vue';
import { isObject, isFunction } from '/@/utils/is'; import { isObject, isFunction, isString } from '/@/utils/is';
import Big from 'big.js'; import Big from 'big.js';
// update-begin--author:sunjianlei---date:20220408---for: VUEN-656# // update-begin--author:sunjianlei---date:20220408---for: VUEN-656#
export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`; export const URL_HASH_TAB = `__AGWE4H__HASH__TAG__PWHRG__`;
@ -596,3 +596,39 @@ export const getUrlParams = (url) => {
} }
return result; return result;
}; };
/* 20250325
* liaozhiyang
* 分割url字符成数组
* issues/7990图片参数中包含逗号会错误的识别成多张图
* */
export const split = (str) => {
if (isString(str)) {
const text = str.trim();
if (text.startsWith('http')) {
const parts = str.split(',');
const urls: any = [];
let currentUrl = '';
for (const part of parts) {
if (part.startsWith('http://') || part.startsWith('https://')) {
// URLURLURL
if (currentUrl) {
urls.push(currentUrl);
}
currentUrl = part;
} else {
// URL
currentUrl += ',' + part;
}
}
// URL
if (currentUrl) {
urls.push(currentUrl);
}
return urls;
} else {
return str.split(',');
}
}
return str;
};

@ -175,7 +175,9 @@
function handleChangeCheckCode() { function handleChangeCheckCode() {
formData.inputCode = ''; formData.inputCode = '';
//TODO mock //TODO mock
randCodeData.checkKey = 1629428467008; //new Date().getTime(); //update-begin---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
randCodeData.checkKey = new Date().getTime() + Math.random().toString(36).slice(-4); // 1629428467008;
//update-end---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
getCodeInfo(randCodeData.checkKey).then((res) => { getCodeInfo(randCodeData.checkKey).then((res) => {
randCodeData.randCodeImage = res; randCodeData.randCodeImage = res;
randCodeData.requestCodeSuccess = true; randCodeData.requestCodeSuccess = true;

@ -231,8 +231,9 @@
*/ */
function handleChangeCheckCode() { function handleChangeCheckCode() {
formData.inputCode = ''; formData.inputCode = '';
//update-begin---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
randCodeData.checkKey = 1629428467008; randCodeData.checkKey = new Date().getTime() + Math.random().toString(36).slice(-4); // 1629428467008;
//update-end---author:chenrui ---date:2025/1/7 for[QQYUN-10775] #7674------------
getCodeInfo(randCodeData.checkKey).then((res) => { getCodeInfo(randCodeData.checkKey).then((res) => {
randCodeData.randCodeImage = res; randCodeData.randCodeImage = res;
randCodeData.requestCodeSuccess = true; randCodeData.requestCodeSuccess = true;

@ -236,14 +236,10 @@ export const formSchema: FormSchema[] = [
{ {
label: '租户', label: '租户',
field: 'relTenantIds', field: 'relTenantIds',
component: 'ApiSelect', component: 'JDictSelectTag',
componentProps: { componentProps: {
mode: 'multiple', dictCode:"sys_tenant,name,id",
api: getAllTenantList, mode: "multiple"
numberToString: true,
labelField: 'name',
valueField: 'id',
immediate: false,
}, },
}, },
{ {

@ -16,6 +16,8 @@ enum Api {
agreeOrRefuseJoinTenant = '/sys/tenant/agreeOrRefuseJoinTenant', agreeOrRefuseJoinTenant = '/sys/tenant/agreeOrRefuseJoinTenant',
// //
changePhone = '/sys/user/changePhone', changePhone = '/sys/user/changePhone',
//
userLogOff = '/sys/user/userLogOff',
} }
/** /**
@ -129,3 +131,11 @@ export const agreeOrRefuseJoinTenant = (params) => {
export const changePhone = (params) => { export const changePhone = (params) => {
return defHttp.put({ url: Api.changePhone, params },{ joinParamsToUrl: true, isTransformResponse: false }); return defHttp.put({ url: Api.changePhone, params },{ joinParamsToUrl: true, isTransformResponse: false });
}; };
/**
* 用户注销
* @param params
*/
export const userLogOff = (params) => {
return defHttp.put({ url: Api.userLogOff, params },{ isTransformResponse:false });
}

@ -187,6 +187,8 @@ export interface GlobEnvConfig {
VITE_GLOB_UPLOAD_URL?: string; VITE_GLOB_UPLOAD_URL?: string;
// view url // view url
VITE_GLOB_ONLINE_VIEW_URL?: string; VITE_GLOB_ONLINE_VIEW_URL?: string;
//
VITE_GLOB_HIDE_LAYOUT_TYPES?: string;
// JEECGAppName // JEECGAppName
VITE_GLOB_QIANKUN_MICRO_APP_NAME?: string; VITE_GLOB_QIANKUN_MICRO_APP_NAME?: string;

Loading…
Cancel
Save