提交 84d8a885 authored 作者: kxjia's avatar kxjia

修改bug

上级 28559ec9
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
"@tinymce/tinymce-vue": "4.0.7", "@tinymce/tinymce-vue": "4.0.7",
"@traptitech/markdown-it-katex": "^3.6.0", "@traptitech/markdown-it-katex": "^3.6.0",
"@vant/area-data": "^1.5.2", "@vant/area-data": "^1.5.2",
"@vue/compat": "^3.5.27",
"@vue/shared": "^3.5.22", "@vue/shared": "^3.5.22",
"@vueuse/core": "^10.11.1", "@vueuse/core": "^10.11.1",
"@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/core": "^3.0.4",
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
"enquire.js": "^2.1.6", "enquire.js": "^2.1.6",
"event-source-polyfill": "^1.0.31", "event-source-polyfill": "^1.0.31",
"exceljs": "^4.4.0", "exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"intro.js": "^7.2.0", "intro.js": "^7.2.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
......
...@@ -36,3 +36,13 @@ export { default as JImageUpload } from './src/jeecg/components/JImageUpload.vue ...@@ -36,3 +36,13 @@ export { default as JImageUpload } from './src/jeecg/components/JImageUpload.vue
export { JCronValidator } from '/@/components/Form/src/jeecg/components/JEasyCron'; export { JCronValidator } from '/@/components/Form/src/jeecg/components/JEasyCron';
export { BasicForm }; export { BasicForm };
/*stm 项目添加的 */
export { default as JCascaderDomain } from './src/jeecg/components/JCascaderDomain.vue';
export { default as JTreeSelectDomain } from './src/jeecg/components/JTreeSelectDomain.vue';
export { default as StSelectLable } from './src/jeecg/components/StSelectLable.vue';
export { default as JCaSelect } from './src/jeecg/components/JCaSelect.vue';
export { default as JSearchSelectDuty } from './src/jeecg/components/JSearchSelectDuty.vue';
export { default as JRangeDate } from './src/jeecg/components/JRangeDate.vue';
...@@ -13,21 +13,10 @@ import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; ...@@ -13,21 +13,10 @@ import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
* Component list, register here to setting it in the form * Component list, register here to setting it in the form
*/ */
import { import {
Input, Input,Select,Radio,Checkbox,AutoComplete,Cascader,
Select, DatePicker,InputNumber,Switch,TimePicker,TreeSelect,Slider,Rate,Divider,
Radio,
Checkbox,
AutoComplete,
Cascader,
DatePicker,
InputNumber,
Switch,
TimePicker,
TreeSelect,
Slider,
Rate,
Divider,
} from 'ant-design-vue'; } from 'ant-design-vue';
import ApiRadioGroup from './components/ApiRadioGroup.vue'; import ApiRadioGroup from './components/ApiRadioGroup.vue';
import RadioButtonGroup from './components/RadioButtonGroup.vue'; import RadioButtonGroup from './components/RadioButtonGroup.vue';
import ApiSelect from './components/ApiSelect.vue'; import ApiSelect from './components/ApiSelect.vue';
...@@ -81,6 +70,14 @@ import JSelectUserByDeptPost from './jeecg/components/JSelectUserByDeptPost.vue' ...@@ -81,6 +70,14 @@ import JSelectUserByDeptPost from './jeecg/components/JSelectUserByDeptPost.vue'
import JDatePickerMultiple from './jeecg/components/JDatePickerMultiple.vue'; import JDatePickerMultiple from './jeecg/components/JDatePickerMultiple.vue';
import {DatePickerInFilter, CascaderPcaInFilter} from "@/components/InFilter"; import {DatePickerInFilter, CascaderPcaInFilter} from "@/components/InFilter";
import JCascaderDomain from './jeecg/components/JCascaderDomain.vue';
import JSelectRateRule from './jeecg/components/JSelectRateRule.vue';
import JCaSelect from './jeecg/components/JCaSelect.vue';
import StSelectLable from './jeecg/components/StSelectLable.vue';
import JSearchSelectDuty from './jeecg/components/JSearchSelectDuty.vue';
const componentMap = new Map<ComponentType, Component>(); const componentMap = new Map<ComponentType, Component>();
componentMap.set('Time', Time); componentMap.set('Time', Time);
...@@ -120,12 +117,11 @@ componentMap.set('InputCountDown', CountdownInput); ...@@ -120,12 +117,11 @@ componentMap.set('InputCountDown', CountdownInput);
componentMap.set('Upload', BasicUpload); componentMap.set('Upload', BasicUpload);
componentMap.set('Divider', Divider); componentMap.set('Divider', Divider);
//注册自定义组件 //注册自定义组件
componentMap.set( componentMap.set('JAreaLinkage', createAsyncComponent(() => import('./jeecg/components/JAreaLinkage.vue')));
'JAreaLinkage',
createAsyncComponent(() => import('./jeecg/components/JAreaLinkage.vue'))
);
componentMap.set('JSelectPosition', JSelectPosition); componentMap.set('JSelectPosition', JSelectPosition);
componentMap.set('JSelectUser', JSelectUser); componentMap.set('JSelectUser', JSelectUser);
componentMap.set('JSelectRole', JSelectRole); componentMap.set('JSelectRole', JSelectRole);
...@@ -134,6 +130,7 @@ componentMap.set('JDictSelectTag', JDictSelectTag); ...@@ -134,6 +130,7 @@ componentMap.set('JDictSelectTag', JDictSelectTag);
componentMap.set('JSelectDept', JSelectDept); componentMap.set('JSelectDept', JSelectDept);
componentMap.set('JAreaSelect', JAreaSelect); componentMap.set('JAreaSelect', JAreaSelect);
componentMap.set('JLinkTableCard', JLinkTableCard); componentMap.set('JLinkTableCard', JLinkTableCard);
// componentMap.set( // componentMap.set(
// 'JEditor', // 'JEditor',
// createAsyncComponent(() => import('./jeecg/components/JEditor.vue')) // createAsyncComponent(() => import('./jeecg/components/JEditor.vue'))
...@@ -175,11 +172,15 @@ componentMap.set('UserSelect', UserSelect); ...@@ -175,11 +172,15 @@ componentMap.set('UserSelect', UserSelect);
componentMap.set('RangeDate', JRangeDate); componentMap.set('RangeDate', JRangeDate);
componentMap.set('RangeTime', JRangeTime); componentMap.set('RangeTime', JRangeTime);
componentMap.set('RoleSelect', RoleSelectInput); componentMap.set('RoleSelect', RoleSelectInput);
componentMap.set('JInputSelect', JInputSelect); componentMap.set('JInputSelect', JInputSelect);
componentMap.set('JSelectDepartPost', JSelectDepartPost); componentMap.set('JSelectDepartPost', JSelectDepartPost);
componentMap.set('JSelectUserByDeptPost', JSelectUserByDeptPost); componentMap.set('JSelectUserByDeptPost', JSelectUserByDeptPost);
componentMap.set('JCascaderDomain', JCascaderDomain);
componentMap.set('JSelectRateRule', JSelectRateRule);
componentMap.set('JCaSelect', JCaSelect);
componentMap.set('StSelectLable', StSelectLable);
componentMap.set('JSearchSelectDuty', JSearchSelectDuty);
export function add(compName: ComponentType, component: Component) { export function add(compName: ComponentType, component: Component) {
componentMap.set(compName, component); componentMap.set(compName, component);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, unref } from 'vue'; import { defineComponent, ref, unref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal'; import { BasicModal, useModalInner } from '/@/components/Modal';
import { getRateRuleList } from '/@/api/common/api'; // import { getRateRuleList } from '/@/api/common/api';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
import { useSelectBiz } from '/@/components/Form/src/jeecg/hooks/useSelectBiz'; import { useSelectBiz } from '/@/components/Form/src/jeecg/hooks/useSelectBiz';
import { useAttrs } from '/@/hooks/core/useAttrs'; import { useAttrs } from '/@/hooks/core/useAttrs';
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
}; };
const getBindValue = Object.assign({}, unref(props), unref(attrs), config); const getBindValue = Object.assign({}, unref(props), unref(attrs), config);
const [{ rowSelection, visibleChange, indexColumnProps, getSelectResult, handleDeleteSelected, selectRows }] = useSelectBiz( const [{ rowSelection, visibleChange, indexColumnProps, getSelectResult, handleDeleteSelected, selectRows }] = useSelectBiz(
getRateRuleList, null,
getBindValue getBindValue
); );
const searchInfo = ref(props.params); const searchInfo = ref(props.params);
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
} }
return { return {
handleOk, handleOk,
getRateRuleList, //getRateRuleList,
register, register,
visibleChange, visibleChange,
getBindValue, getBindValue,
......
...@@ -161,5 +161,11 @@ export type ComponentType = ...@@ -161,5 +161,11 @@ export type ComponentType =
| 'RangeTime' | 'RangeTime'
| 'JRangeNumber' | 'JRangeNumber'
| 'JLinkTableCard' | 'JLinkTableCard'
| 'JInputSelect'; | 'JCascaderDomain'
| 'JSelectRateRule'
| 'JRangeDate'
| 'JSearchSelectDuty'
| 'StSelectLable'
| 'JTreeSelectDomain'
| 'JCaSelect'
| 'JInputSelect';
\ No newline at end of file
...@@ -6,6 +6,7 @@ function randomStr() { ...@@ -6,6 +6,7 @@ function randomStr() {
export const getInitStr = (params) => { export const getInitStr = (params) => {
const processId = `flow_${randomStr()}`;
return `<?xml version="1.0" encoding="UTF-8"?> return `<?xml version="1.0" encoding="UTF-8"?>
<definitions <definitions
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
...@@ -17,11 +18,11 @@ export const getInitStr = (params) => { ...@@ -17,11 +18,11 @@ export const getInitStr = (params) => {
xmlns:flowable="http://flowable.org/bpmn" xmlns:flowable="http://flowable.org/bpmn"
targetNamespace="http://www.flowable.org/processdef" targetNamespace="http://www.flowable.org/processdef"
> >
<process id="flow_${randomStr()}" name="flow_${randomStr()}"> <process id="${processId}" name="${processId}">
<startEvent id="start_event" name="开始" /> <startEvent id="start_event" name="开始" />
</process> </process>
<bpmndi:BPMNDiagram id="BPMNDiagram_flow"> <bpmndi:BPMNDiagram id="BPMNDiagram_${processId}">
<bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="T-2d89e7a3-ba79-4abd-9f64-ea59621c258c"> <bpmndi:BPMNPlane id="BPMNPlane_${processId}" bpmnElement="${processId}">
<bpmndi:BPMNShape id="BPMNShape_start_event" bpmnElement="start_event" bioc:stroke=""> <bpmndi:BPMNShape id="BPMNShape_start_event" bpmnElement="start_event" bioc:stroke="">
<omgdc:Bounds x="240" y="200" width="30" height="30" /> <omgdc:Bounds x="240" y="200" width="30" height="30" />
<bpmndi:BPMNLabel> <bpmndi:BPMNLabel>
......
...@@ -113,14 +113,29 @@ function registerPromiseErrorHandler() { ...@@ -113,14 +113,29 @@ function registerPromiseErrorHandler() {
'unhandledrejection', 'unhandledrejection',
function (event) { function (event) {
const errorLogStore = useErrorLogStoreWithOut(); const errorLogStore = useErrorLogStoreWithOut();
// 获取更详细的错误信息
let message = 'Unknown Promise Error';
let stack = 'No stack trace available';
if (event.reason instanceof Error) {
message = event.reason.message;
stack = event.reason.stack || stack;
} else if (typeof event.reason === 'string') {
message = event.reason;
} else if (event.reason) {
// 处理其他类型的错误原因
message = JSON.stringify(event.reason);
}
errorLogStore.addErrorLogInfo({ errorLogStore.addErrorLogInfo({
type: ErrorTypeEnum.PROMISE, type: ErrorTypeEnum.PROMISE,
name: 'Promise Error!', name: 'Unhandled Promise Rejection',
file: 'none', file: 'none',
detail: 'promise error!', detail: 'Unhandled promise rejection occurred',
url: window.location.href, url: window.location.href,
stack: 'promise error!', stack: stack,
message: event.reason, message: message,
}); });
}, },
true true
......
...@@ -45,8 +45,6 @@ main(); ...@@ -45,8 +45,6 @@ main();
async function bootstrap(props?: MainAppProps) { async function bootstrap(props?: MainAppProps) {
// 创建应用实例 // 创建应用实例
const app = createApp(App); const app = createApp(App);
// 【QQYUN-6329】
window['JAppRootInstance'] = app;
// 创建路由 // 创建路由
createRouter(); createRouter();
......
...@@ -103,13 +103,18 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) { ...@@ -103,13 +103,18 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recordable>>, component: string) { function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recordable>>, component: string) {
const keys = Object.keys(dynamicViewsModules); const keys = Object.keys(dynamicViewsModules);
// 标准化组件路径
let normalizedComponent = component;
if (normalizedComponent.startsWith('/')) {
normalizedComponent = normalizedComponent.slice(1);
}
if (normalizedComponent.endsWith('.vue') || normalizedComponent.endsWith('.tsx')) {
normalizedComponent = normalizedComponent.replace(/\.(vue|tsx)$/, '');
}
const matchKeys = keys.filter((key) => { const matchKeys = keys.filter((key) => {
const k = key.replace('../../views', ''); const k = key.replace('../../views/', '').replace(/\.(vue|tsx)$/, '');
const startFlag = component.startsWith('/'); return k === normalizedComponent;
const endFlag = component.endsWith('.vue') || component.endsWith('.tsx');
const startIndex = startFlag ? 0 : 1;
const lastIndex = endFlag ? k.length : k.lastIndexOf('.');
return k.substring(startIndex, lastIndex) === component;
}); });
if (matchKeys?.length === 1) { if (matchKeys?.length === 1) {
const matchKey = matchKeys[0]; const matchKey = matchKeys[0];
...@@ -118,7 +123,12 @@ function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recorda ...@@ -118,7 +123,12 @@ function dynamicImport(dynamicViewsModules: Record<string, () => Promise<Recorda
warn( warn(
'Please do not create `.vue` and `.TSX` files with the same file name in the same hierarchical directory under the views folder. This will cause dynamic introduction failure' 'Please do not create `.vue` and `.TSX` files with the same file name in the same hierarchical directory under the views folder. This will cause dynamic introduction failure'
); );
return; return EXCEPTION_COMPONENT;
} else {
warn(
`Failed to find dynamic import component: ${component}`
);
return EXCEPTION_COMPONENT;
} }
} }
......
...@@ -172,9 +172,7 @@ const transform: AxiosTransform = { ...@@ -172,9 +172,7 @@ const transform: AxiosTransform = {
config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token; config.headers.Authorization = options.authenticationScheme ? `${options.authenticationScheme} ${token}` : token;
config.headers[ConfigEnum.TOKEN] = token; config.headers[ConfigEnum.TOKEN] = token;
// 将签名和时间戳,添加在请求接口 Header
//config.headers[ConfigEnum.TIMESTAMP] = signMd5Utils.getTimestamp();
//config.headers[ConfigEnum.Sign] = signMd5Utils.getSign(config.url, config.params);
if (!tenantId) { if (!tenantId) {
tenantId = 0; tenantId = 0;
} }
...@@ -192,13 +190,12 @@ const transform: AxiosTransform = { ...@@ -192,13 +190,12 @@ const transform: AxiosTransform = {
// ======================================================================================== // ========================================================================================
// 代码逻辑说明: 添加低代码应用ID // 代码逻辑说明: 添加低代码应用ID
let routeParams = router.currentRoute.value.params; const { appId, lowAppFilter } = router.currentRoute.value.params;
if (routeParams.appId) { if (appId) {
config.headers[ConfigEnum.X_LOW_APP_ID] = routeParams.appId; config.headers[ConfigEnum.X_LOW_APP_ID] = appId;
// lowApp自定义筛选条件 // lowApp自定义筛选条件
if (routeParams.lowAppFilter) { if (lowAppFilter) {
config.params = { ...config.params, ...JSON.parse(routeParams.lowAppFilter as string) }; config.params = { ...config.params, ...JSON.parse(lowAppFilter as string) };
delete routeParams.lowAppFilter;
} }
} }
// ======================================================================================== // ========================================================================================
......
...@@ -40,14 +40,15 @@ export function isNull(val: unknown): val is null { ...@@ -40,14 +40,15 @@ export function isNull(val: unknown): val is null {
return val === null; return val === null;
} }
export function isNullAndUnDef(val: unknown): val is null | undefined {
return isUnDef(val) && isNull(val);
}
export function isNullOrUnDef(val: unknown): val is null | undefined { export function isNullOrUnDef(val: unknown): val is null | undefined {
return isUnDef(val) || isNull(val); return isUnDef(val) || isNull(val);
} }
// 保持向后兼容
export function isNullAndUnDef(val: unknown): val is null | undefined {
return isNullOrUnDef(val);
}
export function isNumber(val: unknown): val is number { export function isNumber(val: unknown): val is number {
return is(val, 'Number'); return is(val, 'Number');
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论