fix: lint
parent
54c668c3f0
commit
4cdc92f759
|
|
@ -2537,12 +2537,12 @@ interface EditorSelection {
|
||||||
normalize: () => Range;
|
normalize: () => Range;
|
||||||
selectorChanged: (selector: string, callback: (active: boolean, args: {
|
selectorChanged: (selector: string, callback: (active: boolean, args: {
|
||||||
node: Node;
|
node: Node;
|
||||||
selector: String;
|
selector: string;
|
||||||
parents: Node[];
|
parents: Node[];
|
||||||
}) => void) => EditorSelection;
|
}) => void) => EditorSelection;
|
||||||
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
|
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
|
||||||
node: Node;
|
node: Node;
|
||||||
selector: String;
|
selector: string;
|
||||||
parents: Node[];
|
parents: Node[];
|
||||||
}) => void) => {
|
}) => void) => {
|
||||||
unbind: () => void;
|
unbind: () => void;
|
||||||
|
|
@ -3217,9 +3217,9 @@ interface Tools {
|
||||||
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
||||||
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
||||||
};
|
};
|
||||||
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
|
extend: (obj: object, ext: object, ...objs: object[]) => any;
|
||||||
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
|
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
|
||||||
resolve: (path: string, o?: Object) => any;
|
resolve: (path: string, o?: object) => any;
|
||||||
explode: (s: string | string[], d?: string | RegExp) => string[];
|
explode: (s: string | string[], d?: string | RegExp) => string[];
|
||||||
_addCacheSuffix: (url: string) => string;
|
_addCacheSuffix: (url: string) => string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,16 +37,12 @@ export function getModbusPoint(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建 Modbus 点位配置 */
|
/** 创建 Modbus 点位配置 */
|
||||||
export function createModbusPoint(
|
export function createModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
|
||||||
data: IotDeviceModbusPointApi.ModbusPoint,
|
|
||||||
) {
|
|
||||||
return requestClient.post('/iot/device-modbus-point/create', data);
|
return requestClient.post('/iot/device-modbus-point/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更新 Modbus 点位配置 */
|
/** 更新 Modbus 点位配置 */
|
||||||
export function updateModbusPoint(
|
export function updateModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
|
||||||
data: IotDeviceModbusPointApi.ModbusPoint,
|
|
||||||
) {
|
|
||||||
return requestClient.put('/iot/device-modbus-point/update', data);
|
return requestClient.put('/iot/device-modbus-point/update', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||||
response.data = apiEncrypt.decryptResponse(response.data);
|
response.data = apiEncrypt.decryptResponse(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('响应数据解密失败:', error);
|
console.error('响应数据解密失败:', error);
|
||||||
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
|
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
|
||||||
|
cause: error,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export function useDescription(options?: Partial<DescriptionProps>) {
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
setup(_props, { attrs, slots }) {
|
setup(_props, { attrs, slots }) {
|
||||||
return () => {
|
return () => {
|
||||||
// @ts-ignore - 避免类型实例化过深
|
// @ts-expect-error - 避免类型实例化过深
|
||||||
return h(Description, { ...propsState, ...attrs }, slots);
|
return h(Description, { ...propsState, ...attrs }, slots);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
|
import { AreaLevelEnum } from '@vben/constants';
|
||||||
|
|
||||||
import { Cascader } from 'ant-design-vue';
|
import { Cascader } from 'ant-design-vue';
|
||||||
|
|
||||||
import { getAreaTree } from '#/api/system/area';
|
import { getAreaTree } from '#/api/system/area';
|
||||||
import { AreaLevelEnum } from '@vben/constants';
|
|
||||||
|
|
||||||
defineOptions({ name: 'AreaSelect' });
|
defineOptions({ name: 'AreaSelect' });
|
||||||
|
|
||||||
|
|
@ -40,12 +41,13 @@ interface AreaVO {
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue?: number[] | string[];
|
modelValue?: number[] | string[];
|
||||||
value?: number[] | string[];
|
value?: number[] | string[];
|
||||||
level?: typeof AreaLevelEnum[keyof typeof AreaLevelEnum];
|
level?: (typeof AreaLevelEnum)[keyof typeof AreaLevelEnum];
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
showAllLevels?: boolean;
|
showAllLevels?: boolean;
|
||||||
separator?: string;
|
separator?: string;
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,7 +72,7 @@ async function loadAreaTree(): Promise<void> {
|
||||||
const data = await getAreaTree();
|
const data = await getAreaTree();
|
||||||
|
|
||||||
// 根据 level 限制层级
|
// 根据 level 限制层级
|
||||||
areaTree.value = filterTreeByLevel(data || [], props.level);
|
areaTree.value = filterTreeByLevel((data || []) as AreaVO[], props.level);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('[AreaSelect] 加载地区数据失败:', error);
|
console.warn('[AreaSelect] 加载地区数据失败:', error);
|
||||||
areaTree.value = [];
|
areaTree.value = [];
|
||||||
|
|
@ -99,7 +101,7 @@ function filterTreeByLevel(tree: AreaVO[], maxLevel: number): AreaVO[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理选中值变化
|
// 处理选中值变化
|
||||||
function handleChange(value: number[] | undefined): void {
|
function handleChange(value: any): void {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
emit('update:modelValue', undefined);
|
emit('update:modelValue', undefined);
|
||||||
emit('update:value', undefined);
|
emit('update:value', undefined);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ interface Props {
|
||||||
allowfullscreen?: boolean;
|
allowfullscreen?: boolean;
|
||||||
loading?: 'eager' | 'lazy';
|
loading?: 'eager' | 'lazy';
|
||||||
sandbox?: string;
|
sandbox?: string;
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,9 +73,9 @@ const showPreview = computed(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.iframe-preview {
|
.iframe-preview {
|
||||||
|
overflow: hidden;
|
||||||
border: 1px solid #d9d9d9;
|
border: 1px solid #d9d9d9;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.iframe-content {
|
.iframe-content {
|
||||||
|
|
@ -87,8 +88,8 @@ const showPreview = computed(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
background-color: #fafafa;
|
||||||
border: 1px dashed #d9d9d9;
|
border: 1px dashed #d9d9d9;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@ import formCreate from '@form-create/ant-design-vue';
|
||||||
import { apiSelectRule } from '#/components/form-create/rules/data';
|
import { apiSelectRule } from '#/components/form-create/rules/data';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
useAreaSelectRule,
|
||||||
useDictSelectRule,
|
useDictSelectRule,
|
||||||
useEditorRule,
|
useEditorRule,
|
||||||
|
useIframeRule,
|
||||||
useSelectRule,
|
useSelectRule,
|
||||||
useUploadFileRule,
|
useUploadFileRule,
|
||||||
useUploadImageRule,
|
useUploadImageRule,
|
||||||
useUploadImagesRule,
|
useUploadImagesRule,
|
||||||
useIframeRule,
|
|
||||||
useAreaSelectRule,
|
|
||||||
} from './rules';
|
} from './rules';
|
||||||
|
|
||||||
/** 编码表单 Conf */
|
/** 编码表单 Conf */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable no-template-curly-in-string */
|
|
||||||
const selectRule = [
|
const selectRule = [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { AreaLevelEnum } from '@vben/constants';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
localeProps,
|
localeProps,
|
||||||
makeRequiredRule,
|
makeRequiredRule,
|
||||||
} from '#/components/form-create/helpers';
|
} from '#/components/form-create/helpers';
|
||||||
import { AreaLevelEnum } from '@vben/constants';
|
|
||||||
|
|
||||||
/** 省市区选择器规则 */
|
/** 省市区选择器规则 */
|
||||||
export function useAreaSelectRule() {
|
export function useAreaSelectRule() {
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||||
if (accessStore.loginExpired) {
|
if (accessStore.loginExpired) {
|
||||||
accessStore.setLoginExpired(false);
|
accessStore.setLoginExpired(false);
|
||||||
} else {
|
} else {
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
onSuccess
|
onSuccess
|
||||||
? await onSuccess?.()
|
? await onSuccess?.()
|
||||||
: await router.push(
|
: await router.push(
|
||||||
|
|
@ -132,6 +133,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||||
|
|
||||||
async function fetchUserInfo() {
|
async function fetchUserInfo() {
|
||||||
// 加载
|
// 加载
|
||||||
|
// eslint-disable-next-line no-useless-assignment
|
||||||
let authPermissionInfo: AuthPermissionInfo | null = null;
|
let authPermissionInfo: AuthPermissionInfo | null = null;
|
||||||
authPermissionInfo = await getAuthPermissionInfoApi();
|
authPermissionInfo = await getAuthPermissionInfoApi();
|
||||||
// userStore
|
// userStore
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,7 @@ export const findIndex = <T = Recordable<any>>(
|
||||||
*/
|
*/
|
||||||
export const isUrl = (path: string): boolean => {
|
export const isUrl = (path: string): boolean => {
|
||||||
// fix:修复hash路由无法跳转的问题
|
// fix:修复hash路由无法跳转的问题
|
||||||
/* eslint-disable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
|
|
||||||
const reg =
|
const reg =
|
||||||
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
|
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
|
||||||
return reg.test(path);
|
return reg.test(path);
|
||||||
/* eslint-enable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ async function goRun() {
|
||||||
try {
|
try {
|
||||||
convertedParams[paramKey] = convertParamValue(value, dataType);
|
convertedParams[paramKey] = convertParamValue(value, dataType);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`);
|
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`, {
|
||||||
|
cause: error,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,7 +177,7 @@ function convertParamValue(value: string, dataType: string) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(value);
|
return JSON.parse(value);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw new Error(`JSON格式错误: ${error.message}`);
|
throw new Error(`JSON格式错误: ${error.message}`, { cause: error });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import {
|
||||||
|
|
||||||
import { Button, ButtonGroup, message, Modal, Tooltip } from 'ant-design-vue';
|
import { Button, ButtonGroup, message, Modal, Tooltip } from 'ant-design-vue';
|
||||||
// 模拟流转流程
|
// 模拟流转流程
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
import tokenSimulation from 'bpmn-js-token-simulation';
|
import tokenSimulation from 'bpmn-js-token-simulation';
|
||||||
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
||||||
// 代码高亮插件
|
// 代码高亮插件
|
||||||
|
|
@ -132,6 +132,7 @@ const emit = defineEmits([
|
||||||
'element-click',
|
'element-click',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
const bpmnCanvas = ref();
|
const bpmnCanvas = ref();
|
||||||
const refFile = ref();
|
const refFile = ref();
|
||||||
|
|
||||||
|
|
@ -178,6 +179,7 @@ const additionalModules = computed(() => {
|
||||||
) {
|
) {
|
||||||
Modules.push(...(props.additionalModel as any[]));
|
Modules.push(...(props.additionalModel as any[]));
|
||||||
} else {
|
} else {
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
props.additionalModel && Modules.push(props.additionalModel);
|
props.additionalModel && Modules.push(props.additionalModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -417,6 +419,7 @@ const processSimulation = () => {
|
||||||
// bpmnModeler.get('toggleMode', 'strict'),
|
// bpmnModeler.get('toggleMode', 'strict'),
|
||||||
// "bpmnModeler.get('toggleMode')",
|
// "bpmnModeler.get('toggleMode')",
|
||||||
// );
|
// );
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
props.simulation && bpmnModeler.get('toggleMode', 'strict').toggleMode();
|
props.simulation && bpmnModeler.get('toggleMode', 'strict').toggleMode();
|
||||||
};
|
};
|
||||||
const processRedo = () => {
|
const processRedo = () => {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { isFunction, isObject } from '@vben/utils';
|
||||||
const WILDCARD = '*';
|
const WILDCARD = '*';
|
||||||
|
|
||||||
function CamundaModdleExtension(eventBus) {
|
function CamundaModdleExtension(eventBus) {
|
||||||
// eslint-disable-next-line unicorn/no-this-assignment, @typescript-eslint/no-this-alias
|
// eslint-disable-next-line unicorn/no-this-assignment
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable no-template-curly-in-string */
|
|
||||||
/**
|
/**
|
||||||
* This is a sample file that should be replaced with the actual translation.
|
* This is a sample file that should be replaced with the actual translation.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ watch(
|
||||||
val +=
|
val +=
|
||||||
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
customConfigComponent.value = (
|
customConfigComponent.value = (
|
||||||
CustomConfigMap as Record<string, { component: Component }>
|
CustomConfigMap as Record<string, { component: Component }>
|
||||||
)[val]?.component;
|
)[val]?.component;
|
||||||
|
|
|
||||||
|
|
@ -66,13 +66,13 @@ const bpmnElement = ref<any>(null);
|
||||||
const multiLoopInstance = ref<any>(null);
|
const multiLoopInstance = ref<any>(null);
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
// @ts-ignore
|
|
||||||
bpmnInstances?: () => any;
|
bpmnInstances?: () => any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bpmnInstances = () => (window as any)?.bpmnInstances;
|
const bpmnInstances = () => (window as any)?.bpmnInstances;
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||||
const getElementLoop = (businessObject: any): void => {
|
const getElementLoop = (businessObject: any): void => {
|
||||||
if (!businessObject.loopCharacteristics) {
|
if (!businessObject.loopCharacteristics) {
|
||||||
|
|
@ -141,7 +141,6 @@ const changeLoopCharacteristicsType = (type: any): void => {
|
||||||
isSequential: true,
|
isSequential: true,
|
||||||
})
|
})
|
||||||
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
|
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
collection: '${coll_userList}',
|
collection: '${coll_userList}',
|
||||||
});
|
});
|
||||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||||
|
|
@ -233,7 +232,7 @@ const updateLoopAsync = (key: any): void => {
|
||||||
extensionElements: null,
|
extensionElements: null,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
asyncAttr[key] = loopInstanceForm.value[key];
|
asyncAttr[key] = loopInstanceForm.value[key];
|
||||||
}
|
}
|
||||||
bpmnInstances().modeling.updateModdleProperties(
|
bpmnInstances().modeling.updateModdleProperties(
|
||||||
|
|
@ -247,7 +246,7 @@ const changeConfig = (config: string): void => {
|
||||||
switch (config) {
|
switch (config) {
|
||||||
case '会签': {
|
case '会签': {
|
||||||
changeLoopCharacteristicsType('ParallelMultiInstance');
|
changeLoopCharacteristicsType('ParallelMultiInstance');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -255,14 +254,14 @@ const changeConfig = (config: string): void => {
|
||||||
case '依次审批': {
|
case '依次审批': {
|
||||||
changeLoopCharacteristicsType('SequentialMultiInstance');
|
changeLoopCharacteristicsType('SequentialMultiInstance');
|
||||||
updateLoopCardinality('1');
|
updateLoopCardinality('1');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '或签': {
|
case '或签': {
|
||||||
changeLoopCharacteristicsType('ParallelMultiInstance');
|
changeLoopCharacteristicsType('ParallelMultiInstance');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
|
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -331,7 +330,7 @@ const updateLoopCharacteristics = (): void => {
|
||||||
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
|
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: false, collection: '${coll_userList}' },
|
{ isSequential: false, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
|
|
@ -344,19 +343,18 @@ const updateLoopCharacteristics = (): void => {
|
||||||
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
|
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: false, collection: '${coll_userList}' },
|
{ isSequential: false, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
body: '${ nrOfCompletedInstances > 0 }',
|
body: '${ nrOfCompletedInstances > 0 }',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
|
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: true, collection: '${coll_userList}' },
|
{ isSequential: true, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
|
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
|
||||||
|
|
@ -367,7 +365,6 @@ const updateLoopCharacteristics = (): void => {
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
body: '${ nrOfCompletedInstances >= nrOfInstances }',
|
body: '${ nrOfCompletedInstances >= nrOfInstances }',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ watch(
|
||||||
() => props.type,
|
() => props.type,
|
||||||
() => {
|
() => {
|
||||||
if (props.type) {
|
if (props.type) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
witchTaskComponent.value = installedComponent[props.type].component;
|
witchTaskComponent.value = installedComponent[props.type].component;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const initCallActivity = () => {
|
||||||
|
|
||||||
// 初始化所有配置项
|
// 初始化所有配置项
|
||||||
Object.keys(formData.value).forEach((key: string) => {
|
Object.keys(formData.value).forEach((key: string) => {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
formData.value[key] =
|
formData.value[key] =
|
||||||
bpmnElement.value.businessObject[key] ??
|
bpmnElement.value.businessObject[key] ??
|
||||||
formData.value[key as keyof FormData];
|
formData.value[key as keyof FormData];
|
||||||
|
|
@ -183,6 +183,7 @@ const updateElementExtensions = () => {
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
val &&
|
val &&
|
||||||
val.length > 0 &&
|
val.length > 0 &&
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ onMounted(() => {
|
||||||
bpmnRootElements.value
|
bpmnRootElements.value
|
||||||
.filter((el: any) => el.$type === 'bpmn:Message')
|
.filter((el: any) => el.$type === 'bpmn:Message')
|
||||||
.forEach((m: any) => {
|
.forEach((m: any) => {
|
||||||
// @ts-ignore
|
|
||||||
if (bpmnMessageRefsMap.value) {
|
if (bpmnMessageRefsMap.value) {
|
||||||
bpmnMessageRefsMap.value[m.id] = m;
|
bpmnMessageRefsMap.value[m.id] = m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
|
||||||
|
|
||||||
const resetTaskForm = () => {
|
const resetTaskForm = () => {
|
||||||
for (const key in defaultTaskForm.value) {
|
for (const key in defaultTaskForm.value) {
|
||||||
// @ts-ignore
|
|
||||||
scriptTaskForm.value[key] =
|
scriptTaskForm.value[key] =
|
||||||
bpmnElement.value?.businessObject[
|
bpmnElement.value?.businessObject[
|
||||||
key as keyof typeof defaultTaskForm.value
|
key as keyof typeof defaultTaskForm.value
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- eslint-disable unicorn/no-nested-ternary -->
|
||||||
<!-- eslint-disable prettier/prettier -->
|
<!-- eslint-disable prettier/prettier -->
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
||||||
|
|
@ -206,9 +207,9 @@ const updateHttpExtensions = (force = false) => {
|
||||||
|
|
||||||
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
|
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
|
||||||
? String(!!rawValue)
|
? String(!!rawValue)
|
||||||
: (rawValue === undefined
|
: rawValue === undefined
|
||||||
? ''
|
? ''
|
||||||
: rawValue.toString());
|
: rawValue.toString();
|
||||||
|
|
||||||
desiredEntries.push([name, persisted]);
|
desiredEntries.push([name, persisted]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ const resetTaskForm = () => {
|
||||||
// eslint-disable-next-line unicorn/prefer-switch
|
// eslint-disable-next-line unicorn/prefer-switch
|
||||||
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
|
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
|
||||||
// 特殊:流程表达式,只有一个 input 输入框
|
// 特殊:流程表达式,只有一个 input 输入框
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = [candidateParamStr];
|
userTaskForm.value.candidateParam = [candidateParamStr];
|
||||||
} else if (
|
} else if (
|
||||||
userTaskForm.value.candidateStrategy ===
|
userTaskForm.value.candidateStrategy ===
|
||||||
|
|
@ -152,7 +152,7 @@ const resetTaskForm = () => {
|
||||||
userTaskForm.value.candidateStrategy ===
|
userTaskForm.value.candidateStrategy ===
|
||||||
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
|
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = +candidateParamStr;
|
userTaskForm.value.candidateParam = +candidateParamStr;
|
||||||
deptLevel.value = +candidateParamStr;
|
deptLevel.value = +candidateParamStr;
|
||||||
} else if (
|
} else if (
|
||||||
|
|
@ -303,7 +303,7 @@ const openProcessExpressionDialog = async () => {
|
||||||
const selectProcessExpression = (
|
const selectProcessExpression = (
|
||||||
expression: BpmProcessExpressionApi.ProcessExpression,
|
expression: BpmProcessExpressionApi.ProcessExpression,
|
||||||
) => {
|
) => {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = [expression.expression];
|
userTaskForm.value.candidateParam = [expression.expression];
|
||||||
updateElementTask();
|
updateElementTask();
|
||||||
};
|
};
|
||||||
|
|
@ -311,7 +311,7 @@ const selectProcessExpression = (
|
||||||
const handleFormUserChange = (e: any) => {
|
const handleFormUserChange = (e: any) => {
|
||||||
if (e === 'PROCESS_START_USER_ID') {
|
if (e === 'PROCESS_START_USER_ID') {
|
||||||
userTaskForm.value.candidateParam = [];
|
userTaskForm.value.candidateParam = [];
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
||||||
}
|
}
|
||||||
updateElementTask();
|
updateElementTask();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
|
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
|
||||||
|
// eslint-disable-next-line n/no-extraneous-import
|
||||||
import inherits from 'inherits';
|
import inherits from 'inherits';
|
||||||
|
|
||||||
export default function CustomRules(eventBus) {
|
export default function CustomRules(eventBus) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
function xmlStr2XmlObj(xmlStr) {
|
function xmlStr2XmlObj(xmlStr) {
|
||||||
|
// eslint-disable-next-line no-useless-assignment
|
||||||
let xmlObj = {};
|
let xmlObj = {};
|
||||||
if (document.all) {
|
if (document.all) {
|
||||||
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');
|
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
||||||
// 当前节点
|
// 当前节点
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称
|
// 节点名称
|
||||||
|
// @ts-expect-error
|
||||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||||
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
||||||
// 触发器表单配置
|
// 触发器表单配置
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,13 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
/** 监控节点的变化 */
|
/** 监控节点的变化 */
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
|
|
||||||
/** 节点名称编辑 */
|
/** 节点名称编辑 */
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,11 @@ const emits = defineEmits<{
|
||||||
'update:flowNode': [node: SimpleFlowNode | undefined];
|
'update:flowNode': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.COPY_TASK_NODE,
|
BpmNodeTypeEnum.COPY_TASK_NODE,
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,11 @@ const emits = defineEmits<{
|
||||||
'update:flowNode': [node: SimpleFlowNode | undefined];
|
'update:flowNode': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const props = defineProps({
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const processInstance = inject<Ref<any>>('processInstance', ref({}));
|
const processInstance = inject<Ref<any>>('processInstance', ref({}));
|
||||||
|
|
||||||
const [Modal, modalApi] = useVbenModal({
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const emits = defineEmits(['update:childNode']);
|
const emits = defineEmits(['update:childNode']);
|
||||||
const popoverShow = ref(false);
|
const popoverShow = ref(false);
|
||||||
const readonly = inject<Boolean>('readonly'); // 是否只读
|
const readonly = inject<boolean>('readonly'); // 是否只读
|
||||||
|
|
||||||
function addNode(type: number) {
|
function addNode(type: number) {
|
||||||
// 校验:条件分支、包容分支后面,不允许直接添加并行分支
|
// 校验:条件分支、包容分支后面,不允许直接添加并行分支
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.flowNode,
|
() => props.flowNode,
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,11 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ defineEmits<{
|
||||||
'update:modelValue': [node: SimpleFlowNode | undefined];
|
'update:modelValue': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const readonly = inject<Boolean>('readonly'); // 是否只读
|
const readonly = inject<boolean>('readonly'); // 是否只读
|
||||||
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.START_USER_NODE,
|
BpmNodeTypeEnum.START_USER_NODE,
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.USER_TASK_NODE,
|
BpmNodeTypeEnum.USER_TASK_NODE,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ interface DictDataType {
|
||||||
|
|
||||||
// 用户任务的审批类型。 【参考飞书】
|
// 用户任务的审批类型。 【参考飞书】
|
||||||
export enum ApproveType {
|
export enum ApproveType {
|
||||||
|
/**
|
||||||
|
* 人工审批
|
||||||
|
*/
|
||||||
|
USER = 1,
|
||||||
/**
|
/**
|
||||||
* 自动通过
|
* 自动通过
|
||||||
*/
|
*/
|
||||||
|
|
@ -15,18 +19,14 @@ export enum ApproveType {
|
||||||
* 自动拒绝
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
AUTO_REJECT = 3,
|
AUTO_REJECT = 3,
|
||||||
/**
|
|
||||||
* 人工审批
|
|
||||||
*/
|
|
||||||
USER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多人审批方式类型枚举 ( 用于审批节点 )
|
// 多人审批方式类型枚举 ( 用于审批节点 )
|
||||||
export enum ApproveMethodType {
|
export enum ApproveMethodType {
|
||||||
/**
|
/**
|
||||||
* 多人或签(通过只需一人,拒绝只需一人)
|
* 随机挑选一人审批
|
||||||
*/
|
*/
|
||||||
ANY_APPROVE = 3,
|
RANDOM_SELECT_ONE_APPROVE = 1,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多人会签(按通过比例)
|
* 多人会签(按通过比例)
|
||||||
|
|
@ -34,9 +34,9 @@ export enum ApproveMethodType {
|
||||||
APPROVE_BY_RATIO = 2,
|
APPROVE_BY_RATIO = 2,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机挑选一人审批
|
* 多人或签(通过只需一人,拒绝只需一人)
|
||||||
*/
|
*/
|
||||||
RANDOM_SELECT_ONE_APPROVE = 1,
|
ANY_APPROVE = 3,
|
||||||
/**
|
/**
|
||||||
* 多人依次审批
|
* 多人依次审批
|
||||||
*/
|
*/
|
||||||
|
|
@ -70,34 +70,34 @@ export enum ConditionType {
|
||||||
|
|
||||||
// 操作按钮类型枚举 (用于审批节点)
|
// 操作按钮类型枚举 (用于审批节点)
|
||||||
export enum OperationButtonType {
|
export enum OperationButtonType {
|
||||||
/**
|
|
||||||
* 加签
|
|
||||||
*/
|
|
||||||
ADD_SIGN = 5,
|
|
||||||
/**
|
/**
|
||||||
* 通过
|
* 通过
|
||||||
*/
|
*/
|
||||||
APPROVE = 1,
|
APPROVE = 1,
|
||||||
/**
|
|
||||||
* 抄送
|
|
||||||
*/
|
|
||||||
COPY = 7,
|
|
||||||
/**
|
|
||||||
* 委派
|
|
||||||
*/
|
|
||||||
DELEGATE = 4,
|
|
||||||
/**
|
/**
|
||||||
* 拒绝
|
* 拒绝
|
||||||
*/
|
*/
|
||||||
REJECT = 2,
|
REJECT = 2,
|
||||||
|
/**
|
||||||
|
* 转办
|
||||||
|
*/
|
||||||
|
TRANSFER = 3,
|
||||||
|
/**
|
||||||
|
* 委派
|
||||||
|
*/
|
||||||
|
DELEGATE = 4,
|
||||||
|
/**
|
||||||
|
* 加签
|
||||||
|
*/
|
||||||
|
ADD_SIGN = 5,
|
||||||
/**
|
/**
|
||||||
* 退回
|
* 退回
|
||||||
*/
|
*/
|
||||||
RETURN = 6,
|
RETURN = 6,
|
||||||
/**
|
/**
|
||||||
* 转办
|
* 抄送
|
||||||
*/
|
*/
|
||||||
TRANSFER = 3,
|
COPY = 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 审批拒绝类型枚举
|
// 审批拒绝类型枚举
|
||||||
|
|
@ -114,6 +114,10 @@ export enum RejectHandlerType {
|
||||||
|
|
||||||
// 用户任务超时处理类型枚举
|
// 用户任务超时处理类型枚举
|
||||||
export enum TimeoutHandlerType {
|
export enum TimeoutHandlerType {
|
||||||
|
/**
|
||||||
|
* 自动提醒
|
||||||
|
*/
|
||||||
|
REMINDER = 1,
|
||||||
/**
|
/**
|
||||||
* 自动同意
|
* 自动同意
|
||||||
*/
|
*/
|
||||||
|
|
@ -122,10 +126,6 @@ export enum TimeoutHandlerType {
|
||||||
* 自动拒绝
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
REJECT = 3,
|
REJECT = 3,
|
||||||
/**
|
|
||||||
* 自动提醒
|
|
||||||
*/
|
|
||||||
REMINDER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户任务的审批人为空时,处理类型枚举
|
// 用户任务的审批人为空时,处理类型枚举
|
||||||
|
|
@ -135,49 +135,49 @@ export enum AssignEmptyHandlerType {
|
||||||
*/
|
*/
|
||||||
APPROVE = 1,
|
APPROVE = 1,
|
||||||
/**
|
/**
|
||||||
* 转交给流程管理员
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
ASSIGN_ADMIN = 4,
|
REJECT = 2,
|
||||||
/**
|
/**
|
||||||
* 指定人员审批
|
* 指定人员审批
|
||||||
*/
|
*/
|
||||||
ASSIGN_USER = 3,
|
ASSIGN_USER = 3,
|
||||||
/**
|
/**
|
||||||
* 自动拒绝
|
* 转交给流程管理员
|
||||||
*/
|
*/
|
||||||
REJECT = 2,
|
ASSIGN_ADMIN = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户任务的审批人与发起人相同时,处理类型枚举
|
// 用户任务的审批人与发起人相同时,处理类型枚举
|
||||||
export enum AssignStartUserHandlerType {
|
export enum AssignStartUserHandlerType {
|
||||||
/**
|
/**
|
||||||
* 转交给部门负责人审批
|
* 由发起人对自己审批
|
||||||
*/
|
*/
|
||||||
ASSIGN_DEPT_LEADER = 3,
|
START_USER_AUDIT = 1,
|
||||||
/**
|
/**
|
||||||
* 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
* 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
||||||
*/
|
*/
|
||||||
SKIP = 2,
|
SKIP = 2,
|
||||||
/**
|
/**
|
||||||
* 由发起人对自己审批
|
* 转交给部门负责人审批
|
||||||
*/
|
*/
|
||||||
START_USER_AUDIT = 1,
|
ASSIGN_DEPT_LEADER = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 时间单位枚举
|
// 时间单位枚举
|
||||||
export enum TimeUnitType {
|
export enum TimeUnitType {
|
||||||
/**
|
/**
|
||||||
* 天
|
* 分钟
|
||||||
*/
|
*/
|
||||||
DAY = 3,
|
MINUTE = 1,
|
||||||
/**
|
/**
|
||||||
* 小时
|
* 小时
|
||||||
*/
|
*/
|
||||||
HOUR = 2,
|
HOUR = 2,
|
||||||
/**
|
/**
|
||||||
* 分钟
|
* 天
|
||||||
*/
|
*/
|
||||||
MINUTE = 1,
|
DAY = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -202,14 +202,14 @@ export enum FieldPermissionType {
|
||||||
* 延迟类型
|
* 延迟类型
|
||||||
*/
|
*/
|
||||||
export enum DelayTypeEnum {
|
export enum DelayTypeEnum {
|
||||||
/**
|
|
||||||
* 固定日期时间
|
|
||||||
*/
|
|
||||||
FIXED_DATE_TIME = 2,
|
|
||||||
/**
|
/**
|
||||||
* 固定时长
|
* 固定时长
|
||||||
*/
|
*/
|
||||||
FIXED_TIME_DURATION = 1,
|
FIXED_TIME_DURATION = 1,
|
||||||
|
/**
|
||||||
|
* 固定日期时间
|
||||||
|
*/
|
||||||
|
FIXED_DATE_TIME = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -217,35 +217,39 @@ export enum DelayTypeEnum {
|
||||||
*/
|
*/
|
||||||
export enum TriggerTypeEnum {
|
export enum TriggerTypeEnum {
|
||||||
/**
|
/**
|
||||||
* 表单数据删除触发器
|
* 发送 HTTP 请求触发器
|
||||||
*/
|
*/
|
||||||
FORM_DELETE = 11,
|
HTTP_REQUEST = 1,
|
||||||
/**
|
|
||||||
* 表单数据更新触发器
|
|
||||||
*/
|
|
||||||
FORM_UPDATE = 10,
|
|
||||||
/**
|
/**
|
||||||
* 接收 HTTP 回调请求触发器
|
* 接收 HTTP 回调请求触发器
|
||||||
*/
|
*/
|
||||||
HTTP_CALLBACK = 2,
|
HTTP_CALLBACK = 2,
|
||||||
/**
|
/**
|
||||||
* 发送 HTTP 请求触发器
|
* 表单数据更新触发器
|
||||||
*/
|
*/
|
||||||
HTTP_REQUEST = 1,
|
FORM_UPDATE = 10,
|
||||||
|
/**
|
||||||
|
* 表单数据删除触发器
|
||||||
|
*/
|
||||||
|
FORM_DELETE = 11,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChildProcessStartUserTypeEnum {
|
export enum ChildProcessStartUserTypeEnum {
|
||||||
|
/**
|
||||||
|
* 同主流程发起人
|
||||||
|
*/
|
||||||
|
MAIN_PROCESS_START_USER = 1,
|
||||||
/**
|
/**
|
||||||
* 表单
|
* 表单
|
||||||
*/
|
*/
|
||||||
FROM_FORM = 2,
|
FROM_FORM = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChildProcessStartUserEmptyTypeEnum {
|
||||||
/**
|
/**
|
||||||
* 同主流程发起人
|
* 同主流程发起人
|
||||||
*/
|
*/
|
||||||
MAIN_PROCESS_START_USER = 1,
|
MAIN_PROCESS_START_USER = 1,
|
||||||
}
|
|
||||||
|
|
||||||
export enum ChildProcessStartUserEmptyTypeEnum {
|
|
||||||
/**
|
/**
|
||||||
* 子流程管理员
|
* 子流程管理员
|
||||||
*/
|
*/
|
||||||
|
|
@ -254,10 +258,6 @@ export enum ChildProcessStartUserEmptyTypeEnum {
|
||||||
* 主流程管理员
|
* 主流程管理员
|
||||||
*/
|
*/
|
||||||
MAIN_PROCESS_ADMIN = 3,
|
MAIN_PROCESS_ADMIN = 3,
|
||||||
/**
|
|
||||||
* 同主流程发起人
|
|
||||||
*/
|
|
||||||
MAIN_PROCESS_START_USER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChildProcessMultiInstanceSourceTypeEnum {
|
export enum ChildProcessMultiInstanceSourceTypeEnum {
|
||||||
|
|
@ -265,54 +265,50 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
|
||||||
* 固定数量
|
* 固定数量
|
||||||
*/
|
*/
|
||||||
FIXED_QUANTITY = 1,
|
FIXED_QUANTITY = 1,
|
||||||
/**
|
|
||||||
* 多选表单
|
|
||||||
*/
|
|
||||||
MULTIPLE_FORM = 3,
|
|
||||||
/**
|
/**
|
||||||
* 数字表单
|
* 数字表单
|
||||||
*/
|
*/
|
||||||
NUMBER_FORM = 2,
|
NUMBER_FORM = 2,
|
||||||
|
/**
|
||||||
|
* 多选表单
|
||||||
|
*/
|
||||||
|
MULTIPLE_FORM = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
||||||
export enum CandidateStrategy {
|
export enum CandidateStrategy {
|
||||||
/**
|
/**
|
||||||
* 审批人自选
|
* 指定角色
|
||||||
*/
|
*/
|
||||||
APPROVE_USER_SELECT = 34,
|
ROLE = 10,
|
||||||
/**
|
|
||||||
* 部门的负责人
|
|
||||||
*/
|
|
||||||
DEPT_LEADER = 21,
|
|
||||||
/**
|
/**
|
||||||
* 部门成员
|
* 部门成员
|
||||||
*/
|
*/
|
||||||
DEPT_MEMBER = 20,
|
DEPT_MEMBER = 20,
|
||||||
/**
|
/**
|
||||||
* 流程表达式
|
* 部门的负责人
|
||||||
*/
|
*/
|
||||||
EXPRESSION = 60,
|
DEPT_LEADER = 21,
|
||||||
/**
|
|
||||||
* 表单内部门负责人
|
|
||||||
*/
|
|
||||||
FORM_DEPT_LEADER = 51,
|
|
||||||
/**
|
|
||||||
* 表单内用户字段
|
|
||||||
*/
|
|
||||||
FORM_USER = 50,
|
|
||||||
/**
|
|
||||||
* 连续多级部门的负责人
|
|
||||||
*/
|
|
||||||
MULTI_LEVEL_DEPT_LEADER = 23,
|
|
||||||
/**
|
/**
|
||||||
* 指定岗位
|
* 指定岗位
|
||||||
*/
|
*/
|
||||||
POST = 22,
|
POST = 22,
|
||||||
/**
|
/**
|
||||||
* 指定角色
|
* 连续多级部门的负责人
|
||||||
*/
|
*/
|
||||||
ROLE = 10,
|
MULTI_LEVEL_DEPT_LEADER = 23,
|
||||||
|
/**
|
||||||
|
* 指定用户
|
||||||
|
*/
|
||||||
|
USER = 30,
|
||||||
|
/**
|
||||||
|
* 审批人自选
|
||||||
|
*/
|
||||||
|
APPROVE_USER_SELECT = 34,
|
||||||
|
/**
|
||||||
|
* 发起人自选
|
||||||
|
*/
|
||||||
|
START_USER_SELECT = 35,
|
||||||
/**
|
/**
|
||||||
* 发起人自己
|
* 发起人自己
|
||||||
*/
|
*/
|
||||||
|
|
@ -325,18 +321,22 @@ export enum CandidateStrategy {
|
||||||
* 发起人连续多级部门的负责人
|
* 发起人连续多级部门的负责人
|
||||||
*/
|
*/
|
||||||
START_USER_MULTI_LEVEL_DEPT_LEADER = 38,
|
START_USER_MULTI_LEVEL_DEPT_LEADER = 38,
|
||||||
/**
|
|
||||||
* 发起人自选
|
|
||||||
*/
|
|
||||||
START_USER_SELECT = 35,
|
|
||||||
/**
|
|
||||||
* 指定用户
|
|
||||||
*/
|
|
||||||
USER = 30,
|
|
||||||
/**
|
/**
|
||||||
* 指定用户组
|
* 指定用户组
|
||||||
*/
|
*/
|
||||||
USER_GROUP = 40,
|
USER_GROUP = 40,
|
||||||
|
/**
|
||||||
|
* 表单内用户字段
|
||||||
|
*/
|
||||||
|
FORM_USER = 50,
|
||||||
|
/**
|
||||||
|
* 表单内部门负责人
|
||||||
|
*/
|
||||||
|
FORM_DEPT_LEADER = 51,
|
||||||
|
/**
|
||||||
|
* 流程表达式
|
||||||
|
*/
|
||||||
|
EXPRESSION = 60,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BpmHttpRequestParamTypeEnum {
|
export enum BpmHttpRequestParamTypeEnum {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* - @ 自动补全:插入 mention 占位元素
|
* - @ 自动补全:插入 mention 占位元素
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @ts-ignore TinyMCE 全局或通过打包器提供
|
// TinyMCE 全局或通过打包器提供
|
||||||
import type { Editor } from 'tinymce';
|
import type { Editor } from 'tinymce';
|
||||||
|
|
||||||
export interface MentionItem {
|
export interface MentionItem {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
bpmnXml?: string;
|
bpmnXml?: string;
|
||||||
loading?: boolean; // 是否加载中
|
loading?: boolean; // 是否加载中
|
||||||
modelView?: Object;
|
modelView?: object;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -29,7 +29,7 @@ watch(
|
||||||
async (newModelView) => {
|
async (newModelView) => {
|
||||||
// 加载最新
|
// 加载最新
|
||||||
if (newModelView) {
|
if (newModelView) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
view.value = newModelView;
|
view.value = newModelView;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { useUserStore } from '@vben/stores';
|
||||||
import { formatDate } from '@vben/utils';
|
import { formatDate } from '@vben/utils';
|
||||||
|
|
||||||
import { Button } from 'ant-design-vue';
|
import { Button } from 'ant-design-vue';
|
||||||
// @ts-ignore - 安装 vue3-print-nb 局部指令 v-print
|
// @ts-expect-error - 安装 vue3-print-nb 局部指令 v-print
|
||||||
import vPrint from 'vue3-print-nb';
|
import vPrint from 'vue3-print-nb';
|
||||||
|
|
||||||
import { getProcessInstancePrintData } from '#/api/bpm/processInstance';
|
import { getProcessInstancePrintData } from '#/api/bpm/processInstance';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!-- eslint-disable no-useless-escape -->
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// oxlint-disable no-useless-escape
|
||||||
import { onMounted, ref, unref } from 'vue';
|
import { onMounted, ref, unref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<!-- Modbus 配置 -->
|
<!-- Modbus 配置 -->
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { VbenFormSchema, VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { IotDeviceApi } from '#/api/iot/device/device';
|
import type { IotDeviceApi } from '#/api/iot/device/device';
|
||||||
import type { IotDeviceModbusConfigApi } from '#/api/iot/device/modbus/config';
|
import type { IotDeviceModbusConfigApi } from '#/api/iot/device/modbus/config';
|
||||||
import type { IotDeviceModbusPointApi } from '#/api/iot/device/modbus/point';
|
import type { IotDeviceModbusPointApi } from '#/api/iot/device/modbus/point';
|
||||||
|
|
@ -227,7 +228,7 @@ function usePointColumns(): VxeTableGridOptions['columns'] {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceModbusPointApi.ModbusPoint>({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: usePointFormSchema(),
|
schema: usePointFormSchema(),
|
||||||
submitOnChange: true,
|
submitOnChange: true,
|
||||||
|
|
@ -255,7 +256,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceModbusPointApi.ModbusPoint>({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<IotDeviceModbusPointApi.ModbusPoint>,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 新增点位 - 使用 useVbenModal */
|
/** 新增点位 - 使用 useVbenModal */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { VbenFormSchema, VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VbenFormSchema } from '#/adapter/form';
|
||||||
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { IotDeviceApi } from '#/api/iot/device/device';
|
import type { IotDeviceApi } from '#/api/iot/device/device';
|
||||||
|
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
@ -71,7 +72,7 @@ function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
gridOptions: {
|
gridOptions: {
|
||||||
columns: useGridColumns(),
|
columns: useGridColumns(),
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
|
@ -96,7 +97,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<IotDeviceApi.Device>,
|
||||||
gridEvents: {
|
gridEvents: {
|
||||||
checkboxAll: handleRowCheckboxChange,
|
checkboxAll: handleRowCheckboxChange,
|
||||||
checkboxChange: handleRowCheckboxChange,
|
checkboxChange: handleRowCheckboxChange,
|
||||||
|
|
@ -219,7 +220,7 @@ function useAddGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
const [AddGrid, addGridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useAddGridFormSchema(),
|
schema: useAddGridFormSchema(),
|
||||||
submitOnChange: true,
|
submitOnChange: true,
|
||||||
|
|
@ -247,7 +248,7 @@ const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<IotDeviceApi.Device>,
|
||||||
gridEvents: {
|
gridEvents: {
|
||||||
checkboxAll: handleAddSelectionChange,
|
checkboxAll: handleAddSelectionChange,
|
||||||
checkboxChange: handleAddSelectionChange,
|
checkboxChange: handleAddSelectionChange,
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ function handleRowCheckboxChange({
|
||||||
checkedIds.value = records.map((item) => item.id!);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
gridOptions: {
|
gridOptions: {
|
||||||
checkboxConfig: {
|
checkboxConfig: {
|
||||||
highlight: true,
|
highlight: true,
|
||||||
|
|
@ -242,7 +242,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
},
|
} as VxeTableGridOptions<IotDeviceApi.Device>,
|
||||||
gridEvents: {
|
gridEvents: {
|
||||||
checkboxAll: handleRowCheckboxChange,
|
checkboxAll: handleRowCheckboxChange,
|
||||||
checkboxChange: handleRowCheckboxChange,
|
checkboxChange: handleRowCheckboxChange,
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ export const IOT_PROVIDE_KEY = {
|
||||||
/** IoT 设备状态枚举 */
|
/** IoT 设备状态枚举 */
|
||||||
export enum DeviceStateEnum {
|
export enum DeviceStateEnum {
|
||||||
INACTIVE = 0, // 未激活
|
INACTIVE = 0, // 未激活
|
||||||
OFFLINE = 2, // 离线
|
|
||||||
ONLINE = 1, // 在线
|
ONLINE = 1, // 在线
|
||||||
|
OFFLINE = 2, // 离线
|
||||||
}
|
}
|
||||||
|
|
||||||
/** IoT 产品物模型类型枚举类 */
|
/** IoT 产品物模型类型枚举类 */
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ import dayjs from 'dayjs';
|
||||||
/** 时间范围类型枚举 */
|
/** 时间范围类型枚举 */
|
||||||
export enum TimeRangeTypeEnum {
|
export enum TimeRangeTypeEnum {
|
||||||
DAY30 = 1,
|
DAY30 = 1,
|
||||||
MONTH = 30,
|
|
||||||
WEEK = 7,
|
WEEK = 7,
|
||||||
|
MONTH = 30,
|
||||||
YEAR = 365,
|
YEAR = 365,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ import dayjs from 'dayjs';
|
||||||
/** 时间范围类型枚举 */
|
/** 时间范围类型枚举 */
|
||||||
export enum TimeRangeTypeEnum {
|
export enum TimeRangeTypeEnum {
|
||||||
DAY30 = 1,
|
DAY30 = 1,
|
||||||
MONTH = 30,
|
|
||||||
WEEK = 7,
|
WEEK = 7,
|
||||||
|
MONTH = 30,
|
||||||
YEAR = 365,
|
YEAR = 365,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ defineOptions({ name: 'ProductCategorySelect' });
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: [Number, Array<Number>],
|
type: [Number, Array<number>],
|
||||||
default: undefined,
|
default: undefined,
|
||||||
}, // 选中的 ID
|
}, // 选中的 ID
|
||||||
multiple: {
|
multiple: {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const selectedSku = ref<MallSpuApi.Sku>();
|
||||||
/** 处理商品的选择变化 */
|
/** 处理商品的选择变化 */
|
||||||
async function handleSpuChange(spu?: MallSpuApi.Spu | null) {
|
async function handleSpuChange(spu?: MallSpuApi.Spu | null) {
|
||||||
// 处理商品选择:如果 spu 为 null 或 id 为 0,表示清空选择
|
// 处理商品选择:如果 spu 为 null 或 id 为 0,表示清空选择
|
||||||
const spuId = spu?.id && spu.id ? spu.id : undefined;
|
const spuId = spu && spu.id ? spu.id : undefined;
|
||||||
formData.value.spuId = spuId;
|
formData.value.spuId = spuId;
|
||||||
await formApi.setFieldValue('spuId', spuId);
|
await formApi.setFieldValue('spuId', spuId);
|
||||||
// 清空已选规格
|
// 清空已选规格
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ async function showInput(index: number) {
|
||||||
attributeIndex.value = index;
|
attributeIndex.value = index;
|
||||||
inputRef.value?.[index]?.focus();
|
inputRef.value?.[index]?.focus();
|
||||||
// 获取属性下拉选项
|
// 获取属性下拉选项
|
||||||
|
// oxlint-disable-next-line typescript/no-non-null-asserted-optional-chain
|
||||||
await getAttributeOptions(attributeList.value?.[index]?.id!);
|
await getAttributeOptions(attributeList.value?.[index]?.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ function handleSend(userId: number) {
|
||||||
messageBoxVisible.value = true;
|
messageBoxVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid<MpMessageApi.Message>({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||||
modalApi.lock();
|
modalApi.lock();
|
||||||
try {
|
try {
|
||||||
formData.value = await getTenant(data.id);
|
formData.value = await getTenant(data.id);
|
||||||
// @ts-ignore 特殊:https://gitee.com/yudaocode/yudao-ui-admin-vben/issues/ID43CX
|
// @ts-expect-error 特殊:https://gitee.com/yudaocode/yudao-ui-admin-vben/issues/ID43CX
|
||||||
formData.value.expireTime = String(formData.value.expireTime);
|
formData.value.expireTime = String(formData.value.expireTime);
|
||||||
// 设置到 values
|
// 设置到 values
|
||||||
await formApi.setValues(formData.value);
|
await formApi.setValues(formData.value);
|
||||||
|
|
|
||||||
|
|
@ -2537,12 +2537,12 @@ interface EditorSelection {
|
||||||
normalize: () => Range;
|
normalize: () => Range;
|
||||||
selectorChanged: (selector: string, callback: (active: boolean, args: {
|
selectorChanged: (selector: string, callback: (active: boolean, args: {
|
||||||
node: Node;
|
node: Node;
|
||||||
selector: String;
|
selector: string;
|
||||||
parents: Node[];
|
parents: Node[];
|
||||||
}) => void) => EditorSelection;
|
}) => void) => EditorSelection;
|
||||||
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
|
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
|
||||||
node: Node;
|
node: Node;
|
||||||
selector: String;
|
selector: string;
|
||||||
parents: Node[];
|
parents: Node[];
|
||||||
}) => void) => {
|
}) => void) => {
|
||||||
unbind: () => void;
|
unbind: () => void;
|
||||||
|
|
@ -3217,9 +3217,9 @@ interface Tools {
|
||||||
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
||||||
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
||||||
};
|
};
|
||||||
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
|
extend: (obj: object, ext: object, ...objs: object[]) => any;
|
||||||
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
|
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
|
||||||
resolve: (path: string, o?: Object) => any;
|
resolve: (path: string, o?: object) => any;
|
||||||
explode: (s: string | string[], d?: string | RegExp) => string[];
|
explode: (s: string | string[], d?: string | RegExp) => string[];
|
||||||
_addCacheSuffix: (url: string) => string;
|
_addCacheSuffix: (url: string) => string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ setupVbenVxeTable({
|
||||||
class: '!p-0',
|
class: '!p-0',
|
||||||
...props,
|
...props,
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line no-useless-assignment
|
||||||
let align = 'end';
|
let align = 'end';
|
||||||
switch (column.align) {
|
switch (column.align) {
|
||||||
case 'center': {
|
case 'center': {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ export namespace CrmCustomerLimitConfigApi {
|
||||||
|
|
||||||
/** 客户限制配置类型 */
|
/** 客户限制配置类型 */
|
||||||
export enum LimitConfType {
|
export enum LimitConfType {
|
||||||
/** 锁定客户数限制 */
|
|
||||||
CUSTOMER_LOCK_LIMIT = 2,
|
|
||||||
/** 拥有客户数限制 */
|
/** 拥有客户数限制 */
|
||||||
CUSTOMER_QUANTITY_LIMIT = 1,
|
CUSTOMER_QUANTITY_LIMIT = 1,
|
||||||
|
/** 锁定客户数限制 */
|
||||||
|
CUSTOMER_LOCK_LIMIT = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询客户限制配置列表 */
|
/** 查询客户限制配置列表 */
|
||||||
|
|
|
||||||
|
|
@ -35,11 +35,11 @@ export namespace CrmPermissionApi {
|
||||||
* CRM 业务类型枚举
|
* CRM 业务类型枚举
|
||||||
*/
|
*/
|
||||||
export enum BizTypeEnum {
|
export enum BizTypeEnum {
|
||||||
CRM_BUSINESS = 4, // 商机
|
|
||||||
CRM_CLUE = 1, // 线索
|
CRM_CLUE = 1, // 线索
|
||||||
CRM_CONTACT = 3, // 联系人
|
|
||||||
CRM_CONTRACT = 5, // 合同
|
|
||||||
CRM_CUSTOMER = 2, // 客户
|
CRM_CUSTOMER = 2, // 客户
|
||||||
|
CRM_CONTACT = 3, // 联系人
|
||||||
|
CRM_BUSINESS = 4, // 商机
|
||||||
|
CRM_CONTRACT = 5, // 合同
|
||||||
CRM_PRODUCT = 6, // 产品
|
CRM_PRODUCT = 6, // 产品
|
||||||
CRM_RECEIVABLE = 7, // 回款
|
CRM_RECEIVABLE = 7, // 回款
|
||||||
CRM_RECEIVABLE_PLAN = 8, // 回款计划
|
CRM_RECEIVABLE_PLAN = 8, // 回款计划
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
|
||||||
response.data = apiEncrypt.decryptResponse(response.data);
|
response.data = apiEncrypt.decryptResponse(response.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('响应数据解密失败:', error);
|
console.error('响应数据解密失败:', error);
|
||||||
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
|
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
|
||||||
|
cause: error,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ async function init() {
|
||||||
|
|
||||||
// Real-time display preview
|
// Real-time display preview
|
||||||
function realTimeCropped() {
|
function realTimeCropped() {
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
props.realTimePreview && cropped();
|
props.realTimePreview && cropped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,7 +114,6 @@ function cropped() {
|
||||||
imgInfo,
|
imgInfo,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// eslint-disable-next-line unicorn/prefer-add-event-listener
|
|
||||||
fileReader.onerror = () => {
|
fileReader.onerror = () => {
|
||||||
emit('cropendError');
|
emit('cropendError');
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ export function useDescription(options?: Partial<DescriptionProps>) {
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
setup(_props, { attrs, slots }) {
|
setup(_props, { attrs, slots }) {
|
||||||
return () => {
|
return () => {
|
||||||
// @ts-ignore - 避免类型实例化过深
|
|
||||||
return h(Description, { ...propsState, ...attrs }, slots);
|
return h(Description, { ...propsState, ...attrs }, slots);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
|
import { AreaLevelEnum } from '@vben/constants';
|
||||||
|
|
||||||
import { ElCascader } from 'element-plus';
|
import { ElCascader } from 'element-plus';
|
||||||
|
|
||||||
import { getAreaTree } from '#/api/system/area';
|
import { getAreaTree } from '#/api/system/area';
|
||||||
import { AreaLevelEnum } from '@vben/constants';
|
|
||||||
|
|
||||||
defineOptions({ name: 'AreaSelect' });
|
defineOptions({ name: 'AreaSelect' });
|
||||||
|
|
||||||
|
|
@ -37,12 +38,13 @@ interface AreaVO {
|
||||||
// 接受父组件参数
|
// 接受父组件参数
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue?: number[] | string[];
|
modelValue?: number[] | string[];
|
||||||
level?: typeof AreaLevelEnum[keyof typeof AreaLevelEnum];
|
level?: (typeof AreaLevelEnum)[keyof typeof AreaLevelEnum];
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
showAllLevels?: boolean;
|
showAllLevels?: boolean;
|
||||||
separator?: string;
|
separator?: string;
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69,7 +71,7 @@ async function loadAreaTree(): Promise<void> {
|
||||||
const data = await getAreaTree();
|
const data = await getAreaTree();
|
||||||
|
|
||||||
// 根据 level 限制层级
|
// 根据 level 限制层级
|
||||||
areaTree.value = filterTreeByLevel(data || [], props.level);
|
areaTree.value = filterTreeByLevel((data || []) as AreaVO[], props.level);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('[AreaSelect] 加载地区数据失败:', error);
|
console.warn('[AreaSelect] 加载地区数据失败:', error);
|
||||||
areaTree.value = [];
|
areaTree.value = [];
|
||||||
|
|
@ -98,7 +100,7 @@ function filterTreeByLevel(tree: AreaVO[], maxLevel: number): AreaVO[] {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理选中值变化
|
// 处理选中值变化
|
||||||
function handleChange(value: number[] | undefined): void {
|
function handleChange(value: any): void {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
emit('update:modelValue', undefined);
|
emit('update:modelValue', undefined);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -39,15 +39,16 @@ interface DeptVO {
|
||||||
status?: number;
|
status?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @puhui999:linter 报错;
|
|
||||||
/** 接受父组件参数 */
|
/** 接受父组件参数 */
|
||||||
interface Props {
|
interface Props {
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
modelValue?: number | number[] | string | string[];
|
modelValue?: number | number[] | string | string[];
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
returnType?: 'id' | 'name';
|
returnType?: 'id' | 'name';
|
||||||
defaultCurrentDept?: boolean;
|
defaultCurrentDept?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ interface Props {
|
||||||
allowfullscreen?: boolean;
|
allowfullscreen?: boolean;
|
||||||
loading?: 'eager' | 'lazy';
|
loading?: 'eager' | 'lazy';
|
||||||
sandbox?: string;
|
sandbox?: string;
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
formCreateInject?: any;
|
formCreateInject?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,9 +69,9 @@ const showPreview = computed(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.iframe-preview {
|
.iframe-preview {
|
||||||
|
overflow: hidden;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.iframe-content {
|
.iframe-content {
|
||||||
|
|
@ -83,8 +84,8 @@ const showPreview = computed(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
background-color: #fafafa;
|
||||||
border: 1px dashed #dcdfe6;
|
border: 1px dashed #dcdfe6;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ export function useApiSelect(option: ApiSelectProps) {
|
||||||
let parse: any = null;
|
let parse: any = null;
|
||||||
if (props.parseFunc) {
|
if (props.parseFunc) {
|
||||||
// 解析字符串函数
|
// 解析字符串函数
|
||||||
// eslint-disable-next-line no-new-func
|
// oxlint-disable-next-line typescript/no-implied-eval
|
||||||
parse = new Function(`return ${props.parseFunc}`)();
|
parse = new Function(`return ${props.parseFunc}`)();
|
||||||
}
|
}
|
||||||
return parse;
|
return parse;
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@ import formCreate from '@form-create/element-ui';
|
||||||
import { apiSelectRule } from '#/components/form-create/rules/data';
|
import { apiSelectRule } from '#/components/form-create/rules/data';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
useAreaSelectRule,
|
||||||
useDictSelectRule,
|
useDictSelectRule,
|
||||||
useEditorRule,
|
useEditorRule,
|
||||||
|
useIframeRule,
|
||||||
useSelectRule,
|
useSelectRule,
|
||||||
useUploadFileRule,
|
useUploadFileRule,
|
||||||
useUploadImageRule,
|
useUploadImageRule,
|
||||||
useUploadImagesRule,
|
useUploadImagesRule,
|
||||||
useIframeRule,
|
|
||||||
useAreaSelectRule,
|
|
||||||
} from './rules';
|
} from './rules';
|
||||||
|
|
||||||
/** 编码表单 Conf */
|
/** 编码表单 Conf */
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { AreaLevelEnum } from '@vben/constants';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
localeProps,
|
localeProps,
|
||||||
makeRequiredRule,
|
makeRequiredRule,
|
||||||
} from '#/components/form-create/helpers';
|
} from '#/components/form-create/helpers';
|
||||||
import { AreaLevelEnum } from '@vben/constants';
|
|
||||||
|
|
||||||
/** 省市区选择器规则 */
|
/** 省市区选择器规则 */
|
||||||
export function useAreaSelectRule() {
|
export function useAreaSelectRule() {
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,7 @@ export const findIndex = <T = Recordable<any>>(
|
||||||
*/
|
*/
|
||||||
export const isUrl = (path: string): boolean => {
|
export const isUrl = (path: string): boolean => {
|
||||||
// fix:修复hash路由无法跳转的问题
|
// fix:修复hash路由无法跳转的问题
|
||||||
/* eslint-disable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
|
|
||||||
const reg =
|
const reg =
|
||||||
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
|
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
|
||||||
return reg.test(path);
|
return reg.test(path);
|
||||||
/* eslint-enable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ async function goRun() {
|
||||||
try {
|
try {
|
||||||
convertedParams[paramKey] = convertParamValue(value, dataType);
|
convertedParams[paramKey] = convertParamValue(value, dataType);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`);
|
throw new Error(`参数 ${paramKey} 转换失败: ${error.message}`, {
|
||||||
|
cause: error,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,7 +177,7 @@ function convertParamValue(value: string, dataType: string) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(value);
|
return JSON.parse(value);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
throw new Error(`JSON格式错误: ${error.message}`);
|
throw new Error(`JSON格式错误: ${error.message}`, { cause: error });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import {
|
||||||
} from '@vben/icons';
|
} from '@vben/icons';
|
||||||
|
|
||||||
// 模拟流转流程
|
// 模拟流转流程
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
import tokenSimulation from 'bpmn-js-token-simulation';
|
import tokenSimulation from 'bpmn-js-token-simulation';
|
||||||
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { isFunction, isObject } from '@vben/utils';
|
||||||
const WILDCARD = '*';
|
const WILDCARD = '*';
|
||||||
|
|
||||||
function CamundaModdleExtension(eventBus) {
|
function CamundaModdleExtension(eventBus) {
|
||||||
// eslint-disable-next-line unicorn/no-this-assignment, @typescript-eslint/no-this-alias
|
// eslint-disable-next-line unicorn/no-this-assignment
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable no-template-curly-in-string */
|
|
||||||
/**
|
/**
|
||||||
* This is a sample file that should be replaced with the actual translation.
|
* This is a sample file that should be replaced with the actual translation.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ watch(
|
||||||
val +=
|
val +=
|
||||||
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
customConfigComponent.value = (
|
customConfigComponent.value = (
|
||||||
CustomConfigMap as Record<string, { component: Component }>
|
CustomConfigMap as Record<string, { component: Component }>
|
||||||
)[val]?.component;
|
)[val]?.component;
|
||||||
|
|
|
||||||
|
|
@ -67,13 +67,13 @@ const bpmnElement = ref<any>(null);
|
||||||
const multiLoopInstance = ref<any>(null);
|
const multiLoopInstance = ref<any>(null);
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
// @ts-ignore
|
|
||||||
bpmnInstances?: () => any;
|
bpmnInstances?: () => any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bpmnInstances = () => (window as any)?.bpmnInstances;
|
const bpmnInstances = () => (window as any)?.bpmnInstances;
|
||||||
|
|
||||||
|
// @ts-expect-error
|
||||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||||
const getElementLoop = (businessObject: any): void => {
|
const getElementLoop = (businessObject: any): void => {
|
||||||
if (!businessObject.loopCharacteristics) {
|
if (!businessObject.loopCharacteristics) {
|
||||||
|
|
@ -142,7 +142,6 @@ const changeLoopCharacteristicsType = (type: any): void => {
|
||||||
isSequential: true,
|
isSequential: true,
|
||||||
})
|
})
|
||||||
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
|
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
collection: '${coll_userList}',
|
collection: '${coll_userList}',
|
||||||
});
|
});
|
||||||
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||||
|
|
@ -234,7 +233,7 @@ const updateLoopAsync = (key: any): void => {
|
||||||
extensionElements: null,
|
extensionElements: null,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
asyncAttr[key] = loopInstanceForm.value[key];
|
asyncAttr[key] = loopInstanceForm.value[key];
|
||||||
}
|
}
|
||||||
bpmnInstances().modeling.updateModdleProperties(
|
bpmnInstances().modeling.updateModdleProperties(
|
||||||
|
|
@ -248,7 +247,6 @@ const changeConfig = (config: string): void => {
|
||||||
switch (config) {
|
switch (config) {
|
||||||
case '会签': {
|
case '会签': {
|
||||||
changeLoopCharacteristicsType('ParallelMultiInstance');
|
changeLoopCharacteristicsType('ParallelMultiInstance');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -256,14 +254,12 @@ const changeConfig = (config: string): void => {
|
||||||
case '依次审批': {
|
case '依次审批': {
|
||||||
changeLoopCharacteristicsType('SequentialMultiInstance');
|
changeLoopCharacteristicsType('SequentialMultiInstance');
|
||||||
updateLoopCardinality('1');
|
updateLoopCardinality('1');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '或签': {
|
case '或签': {
|
||||||
changeLoopCharacteristicsType('ParallelMultiInstance');
|
changeLoopCharacteristicsType('ParallelMultiInstance');
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
|
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -332,7 +328,6 @@ const updateLoopCharacteristics = (): void => {
|
||||||
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
|
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: false, collection: '${coll_userList}' },
|
{ isSequential: false, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
|
|
@ -345,19 +340,16 @@ const updateLoopCharacteristics = (): void => {
|
||||||
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
|
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: false, collection: '${coll_userList}' },
|
{ isSequential: false, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
body: '${ nrOfCompletedInstances > 0 }',
|
body: '${ nrOfCompletedInstances > 0 }',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
|
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
|
||||||
multiLoopInstance.value = bpmnInstances().moddle.create(
|
multiLoopInstance.value = bpmnInstances().moddle.create(
|
||||||
'bpmn:MultiInstanceLoopCharacteristics',
|
'bpmn:MultiInstanceLoopCharacteristics',
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
{ isSequential: true, collection: '${coll_userList}' },
|
{ isSequential: true, collection: '${coll_userList}' },
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
|
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
|
||||||
|
|
@ -368,7 +360,6 @@ const updateLoopCharacteristics = (): void => {
|
||||||
);
|
);
|
||||||
multiLoopInstance.value.completionCondition =
|
multiLoopInstance.value.completionCondition =
|
||||||
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
bpmnInstances().moddle.create('bpmn:FormalExpression', {
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
|
||||||
body: '${ nrOfCompletedInstances >= nrOfInstances }',
|
body: '${ nrOfCompletedInstances >= nrOfInstances }',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ watch(
|
||||||
() => props.type,
|
() => props.type,
|
||||||
() => {
|
() => {
|
||||||
if (props.type) {
|
if (props.type) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
witchTaskComponent.value = installedComponent[props.type].component;
|
witchTaskComponent.value = installedComponent[props.type].component;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ const initCallActivity = () => {
|
||||||
|
|
||||||
// 初始化所有配置项
|
// 初始化所有配置项
|
||||||
Object.keys(formData.value).forEach((key: string) => {
|
Object.keys(formData.value).forEach((key: string) => {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
formData.value[key] =
|
formData.value[key] =
|
||||||
bpmnElement.value.businessObject[key] ??
|
bpmnElement.value.businessObject[key] ??
|
||||||
formData.value[key as keyof FormData];
|
formData.value[key as keyof FormData];
|
||||||
|
|
@ -183,6 +183,7 @@ const updateElementExtensions = () => {
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
(val) => {
|
(val) => {
|
||||||
|
// oxlint-disable-next-line no-unused-expressions
|
||||||
val &&
|
val &&
|
||||||
val.length > 0 &&
|
val.length > 0 &&
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ onMounted(() => {
|
||||||
bpmnRootElements.value
|
bpmnRootElements.value
|
||||||
.filter((el: any) => el.$type === 'bpmn:Message')
|
.filter((el: any) => el.$type === 'bpmn:Message')
|
||||||
.forEach((m: any) => {
|
.forEach((m: any) => {
|
||||||
// @ts-ignore
|
|
||||||
if (bpmnMessageRefsMap.value) {
|
if (bpmnMessageRefsMap.value) {
|
||||||
bpmnMessageRefsMap.value[m.id] = m;
|
bpmnMessageRefsMap.value[m.id] = m;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
|
||||||
|
|
||||||
const resetTaskForm = () => {
|
const resetTaskForm = () => {
|
||||||
for (const key in defaultTaskForm.value) {
|
for (const key in defaultTaskForm.value) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
scriptTaskForm.value[key] =
|
scriptTaskForm.value[key] =
|
||||||
bpmnElement.value?.businessObject[
|
bpmnElement.value?.businessObject[
|
||||||
key as keyof typeof defaultTaskForm.value
|
key as keyof typeof defaultTaskForm.value
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- eslint-disable unicorn/no-nested-ternary -->
|
||||||
<!-- eslint-disable prettier/prettier -->
|
<!-- eslint-disable prettier/prettier -->
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
|
||||||
|
|
@ -206,9 +207,9 @@ const updateHttpExtensions = (force = false) => {
|
||||||
|
|
||||||
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
|
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
|
||||||
? String(!!rawValue)
|
? String(!!rawValue)
|
||||||
: (rawValue === undefined
|
: rawValue === undefined
|
||||||
? ''
|
? ''
|
||||||
: rawValue.toString());
|
: rawValue.toString();
|
||||||
|
|
||||||
desiredEntries.push([name, persisted]);
|
desiredEntries.push([name, persisted]);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ const deptTreeOptions = ref<any>(); // 部门树
|
||||||
const postOptions = ref<SystemPostApi.Post[]>([]); // 岗位列表
|
const postOptions = ref<SystemPostApi.Post[]>([]); // 岗位列表
|
||||||
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
|
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
|
||||||
const userGroupOptions = ref<BpmUserGroupApi.UserGroup[]>([]); // 用户组列表
|
const userGroupOptions = ref<BpmUserGroupApi.UserGroup[]>([]); // 用户组列表
|
||||||
|
// @ts-expect-error
|
||||||
const treeRef = ref<any>();
|
const treeRef = ref<any>();
|
||||||
|
|
||||||
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ);
|
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ);
|
||||||
|
|
@ -128,7 +129,7 @@ const resetTaskForm = () => {
|
||||||
// eslint-disable-next-line unicorn/prefer-switch
|
// eslint-disable-next-line unicorn/prefer-switch
|
||||||
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
|
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
|
||||||
// 特殊:流程表达式,只有一个 input 输入框
|
// 特殊:流程表达式,只有一个 input 输入框
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = [candidateParamStr];
|
userTaskForm.value.candidateParam = [candidateParamStr];
|
||||||
} else if (
|
} else if (
|
||||||
userTaskForm.value.candidateStrategy ===
|
userTaskForm.value.candidateStrategy ===
|
||||||
|
|
@ -152,7 +153,7 @@ const resetTaskForm = () => {
|
||||||
userTaskForm.value.candidateStrategy ===
|
userTaskForm.value.candidateStrategy ===
|
||||||
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
|
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = +candidateParamStr;
|
userTaskForm.value.candidateParam = +candidateParamStr;
|
||||||
deptLevel.value = +candidateParamStr;
|
deptLevel.value = +candidateParamStr;
|
||||||
} else if (
|
} else if (
|
||||||
|
|
@ -303,7 +304,7 @@ const openProcessExpressionDialog = async () => {
|
||||||
const selectProcessExpression = (
|
const selectProcessExpression = (
|
||||||
expression: BpmProcessExpressionApi.ProcessExpression,
|
expression: BpmProcessExpressionApi.ProcessExpression,
|
||||||
) => {
|
) => {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateParam = [expression.expression];
|
userTaskForm.value.candidateParam = [expression.expression];
|
||||||
updateElementTask();
|
updateElementTask();
|
||||||
};
|
};
|
||||||
|
|
@ -311,7 +312,7 @@ const selectProcessExpression = (
|
||||||
const handleFormUserChange = (e: any) => {
|
const handleFormUserChange = (e: any) => {
|
||||||
if (e === 'PROCESS_START_USER_ID') {
|
if (e === 'PROCESS_START_USER_ID') {
|
||||||
userTaskForm.value.candidateParam = [];
|
userTaskForm.value.candidateParam = [];
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
||||||
}
|
}
|
||||||
updateElementTask();
|
updateElementTask();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
|
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
|
||||||
|
// eslint-disable-next-line n/no-extraneous-import
|
||||||
import inherits from 'inherits';
|
import inherits from 'inherits';
|
||||||
|
|
||||||
export default function CustomRules(eventBus) {
|
export default function CustomRules(eventBus) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
function xmlStr2XmlObj(xmlStr) {
|
function xmlStr2XmlObj(xmlStr) {
|
||||||
|
// eslint-disable-next-line no-useless-assignment
|
||||||
let xmlObj = {};
|
let xmlObj = {};
|
||||||
if (document.all) {
|
if (document.all) {
|
||||||
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');
|
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
|
|
||||||
// 节点名称
|
// 节点名称
|
||||||
|
// @ts-expect-error
|
||||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||||
useNodeName(BpmNodeTypeEnum.COPY_TASK_NODE);
|
useNodeName(BpmNodeTypeEnum.COPY_TASK_NODE);
|
||||||
|
|
||||||
|
|
@ -283,6 +284,7 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
||||||
:data="deptTreeOptions"
|
:data="deptTreeOptions"
|
||||||
:props="{
|
:props="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
|
// @ts-expect-error
|
||||||
value: 'id',
|
value: 'id',
|
||||||
children: 'children',
|
children: 'children',
|
||||||
}"
|
}"
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
||||||
// 当前节点
|
// 当前节点
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称
|
// 节点名称
|
||||||
|
// @ts-expect-error
|
||||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||||
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
||||||
// 触发器表单配置
|
// 触发器表单配置
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,13 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
/** 监控节点的变化 */
|
/** 监控节点的变化 */
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
|
|
||||||
/** 节点名称编辑 */
|
/** 节点名称编辑 */
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,11 @@ const emits = defineEmits<{
|
||||||
'update:flowNode': [node: SimpleFlowNode | undefined];
|
'update:flowNode': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.COPY_TASK_NODE,
|
BpmNodeTypeEnum.COPY_TASK_NODE,
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,11 @@ const emits = defineEmits<{
|
||||||
'update:flowNode': [node: SimpleFlowNode | undefined];
|
'update:flowNode': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const props = defineProps({
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const processInstance = inject<Ref<any>>('processInstance', ref({}));
|
const processInstance = inject<Ref<any>>('processInstance', ref({}));
|
||||||
|
|
||||||
const [Modal, modalApi] = useVbenModal({
|
const [Modal, modalApi] = useVbenModal({
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const emits = defineEmits(['update:childNode']);
|
const emits = defineEmits(['update:childNode']);
|
||||||
const popoverShow = ref(false);
|
const popoverShow = ref(false);
|
||||||
const readonly = inject<Boolean>('readonly'); // 是否只读
|
const readonly = inject<boolean>('readonly'); // 是否只读
|
||||||
|
|
||||||
function addNode(type: number) {
|
function addNode(type: number) {
|
||||||
// 校验:条件分支、包容分支后面,不允许直接添加并行分支
|
// 校验:条件分支、包容分支后面,不允许直接添加并行分支
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const emits = defineEmits<{
|
||||||
|
|
||||||
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
const currentNode = ref<SimpleFlowNode>(props.flowNode);
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.flowNode,
|
() => props.flowNode,
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,11 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ defineEmits<{
|
||||||
'update:modelValue': [node: SimpleFlowNode | undefined];
|
'update:modelValue': [node: SimpleFlowNode | undefined];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const readonly = inject<Boolean>('readonly'); // 是否只读
|
const readonly = inject<boolean>('readonly'); // 是否只读
|
||||||
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.START_USER_NODE,
|
BpmNodeTypeEnum.START_USER_NODE,
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,11 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
// 监控节点的变化
|
// 监控节点的变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.TRIGGER_NODE,
|
BpmNodeTypeEnum.TRIGGER_NODE,
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ const emits = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 是否只读
|
// 是否只读
|
||||||
const readonly = inject<Boolean>('readonly');
|
const readonly = inject<boolean>('readonly');
|
||||||
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
||||||
// 监控节点变化
|
// 监控节点变化
|
||||||
const currentNode = useWatchNode(props);
|
const currentNode = useWatchNode(props);
|
||||||
// 节点名称编辑
|
// 节点名称编辑
|
||||||
|
// @ts-expect-error
|
||||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||||
currentNode,
|
currentNode,
|
||||||
BpmNodeTypeEnum.USER_TASK_NODE,
|
BpmNodeTypeEnum.USER_TASK_NODE,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ interface DictDataType {
|
||||||
|
|
||||||
// 用户任务的审批类型。 【参考飞书】
|
// 用户任务的审批类型。 【参考飞书】
|
||||||
export enum ApproveType {
|
export enum ApproveType {
|
||||||
|
/**
|
||||||
|
* 人工审批
|
||||||
|
*/
|
||||||
|
USER = 1,
|
||||||
/**
|
/**
|
||||||
* 自动通过
|
* 自动通过
|
||||||
*/
|
*/
|
||||||
|
|
@ -15,18 +19,14 @@ export enum ApproveType {
|
||||||
* 自动拒绝
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
AUTO_REJECT = 3,
|
AUTO_REJECT = 3,
|
||||||
/**
|
|
||||||
* 人工审批
|
|
||||||
*/
|
|
||||||
USER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多人审批方式类型枚举 ( 用于审批节点 )
|
// 多人审批方式类型枚举 ( 用于审批节点 )
|
||||||
export enum ApproveMethodType {
|
export enum ApproveMethodType {
|
||||||
/**
|
/**
|
||||||
* 多人或签(通过只需一人,拒绝只需一人)
|
* 随机挑选一人审批
|
||||||
*/
|
*/
|
||||||
ANY_APPROVE = 3,
|
RANDOM_SELECT_ONE_APPROVE = 1,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多人会签(按通过比例)
|
* 多人会签(按通过比例)
|
||||||
|
|
@ -34,9 +34,9 @@ export enum ApproveMethodType {
|
||||||
APPROVE_BY_RATIO = 2,
|
APPROVE_BY_RATIO = 2,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 随机挑选一人审批
|
* 多人或签(通过只需一人,拒绝只需一人)
|
||||||
*/
|
*/
|
||||||
RANDOM_SELECT_ONE_APPROVE = 1,
|
ANY_APPROVE = 3,
|
||||||
/**
|
/**
|
||||||
* 多人依次审批
|
* 多人依次审批
|
||||||
*/
|
*/
|
||||||
|
|
@ -70,34 +70,34 @@ export enum ConditionType {
|
||||||
|
|
||||||
// 操作按钮类型枚举 (用于审批节点)
|
// 操作按钮类型枚举 (用于审批节点)
|
||||||
export enum OperationButtonType {
|
export enum OperationButtonType {
|
||||||
/**
|
|
||||||
* 加签
|
|
||||||
*/
|
|
||||||
ADD_SIGN = 5,
|
|
||||||
/**
|
/**
|
||||||
* 通过
|
* 通过
|
||||||
*/
|
*/
|
||||||
APPROVE = 1,
|
APPROVE = 1,
|
||||||
/**
|
|
||||||
* 抄送
|
|
||||||
*/
|
|
||||||
COPY = 7,
|
|
||||||
/**
|
|
||||||
* 委派
|
|
||||||
*/
|
|
||||||
DELEGATE = 4,
|
|
||||||
/**
|
/**
|
||||||
* 拒绝
|
* 拒绝
|
||||||
*/
|
*/
|
||||||
REJECT = 2,
|
REJECT = 2,
|
||||||
|
/**
|
||||||
|
* 转办
|
||||||
|
*/
|
||||||
|
TRANSFER = 3,
|
||||||
|
/**
|
||||||
|
* 委派
|
||||||
|
*/
|
||||||
|
DELEGATE = 4,
|
||||||
|
/**
|
||||||
|
* 加签
|
||||||
|
*/
|
||||||
|
ADD_SIGN = 5,
|
||||||
/**
|
/**
|
||||||
* 退回
|
* 退回
|
||||||
*/
|
*/
|
||||||
RETURN = 6,
|
RETURN = 6,
|
||||||
/**
|
/**
|
||||||
* 转办
|
* 抄送
|
||||||
*/
|
*/
|
||||||
TRANSFER = 3,
|
COPY = 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 审批拒绝类型枚举
|
// 审批拒绝类型枚举
|
||||||
|
|
@ -114,6 +114,10 @@ export enum RejectHandlerType {
|
||||||
|
|
||||||
// 用户任务超时处理类型枚举
|
// 用户任务超时处理类型枚举
|
||||||
export enum TimeoutHandlerType {
|
export enum TimeoutHandlerType {
|
||||||
|
/**
|
||||||
|
* 自动提醒
|
||||||
|
*/
|
||||||
|
REMINDER = 1,
|
||||||
/**
|
/**
|
||||||
* 自动同意
|
* 自动同意
|
||||||
*/
|
*/
|
||||||
|
|
@ -122,10 +126,6 @@ export enum TimeoutHandlerType {
|
||||||
* 自动拒绝
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
REJECT = 3,
|
REJECT = 3,
|
||||||
/**
|
|
||||||
* 自动提醒
|
|
||||||
*/
|
|
||||||
REMINDER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户任务的审批人为空时,处理类型枚举
|
// 用户任务的审批人为空时,处理类型枚举
|
||||||
|
|
@ -135,49 +135,49 @@ export enum AssignEmptyHandlerType {
|
||||||
*/
|
*/
|
||||||
APPROVE = 1,
|
APPROVE = 1,
|
||||||
/**
|
/**
|
||||||
* 转交给流程管理员
|
* 自动拒绝
|
||||||
*/
|
*/
|
||||||
ASSIGN_ADMIN = 4,
|
REJECT = 2,
|
||||||
/**
|
/**
|
||||||
* 指定人员审批
|
* 指定人员审批
|
||||||
*/
|
*/
|
||||||
ASSIGN_USER = 3,
|
ASSIGN_USER = 3,
|
||||||
/**
|
/**
|
||||||
* 自动拒绝
|
* 转交给流程管理员
|
||||||
*/
|
*/
|
||||||
REJECT = 2,
|
ASSIGN_ADMIN = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户任务的审批人与发起人相同时,处理类型枚举
|
// 用户任务的审批人与发起人相同时,处理类型枚举
|
||||||
export enum AssignStartUserHandlerType {
|
export enum AssignStartUserHandlerType {
|
||||||
/**
|
/**
|
||||||
* 转交给部门负责人审批
|
* 由发起人对自己审批
|
||||||
*/
|
*/
|
||||||
ASSIGN_DEPT_LEADER = 3,
|
START_USER_AUDIT = 1,
|
||||||
/**
|
/**
|
||||||
* 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
* 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
||||||
*/
|
*/
|
||||||
SKIP = 2,
|
SKIP = 2,
|
||||||
/**
|
/**
|
||||||
* 由发起人对自己审批
|
* 转交给部门负责人审批
|
||||||
*/
|
*/
|
||||||
START_USER_AUDIT = 1,
|
ASSIGN_DEPT_LEADER = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 时间单位枚举
|
// 时间单位枚举
|
||||||
export enum TimeUnitType {
|
export enum TimeUnitType {
|
||||||
/**
|
/**
|
||||||
* 天
|
* 分钟
|
||||||
*/
|
*/
|
||||||
DAY = 3,
|
MINUTE = 1,
|
||||||
/**
|
/**
|
||||||
* 小时
|
* 小时
|
||||||
*/
|
*/
|
||||||
HOUR = 2,
|
HOUR = 2,
|
||||||
/**
|
/**
|
||||||
* 分钟
|
* 天
|
||||||
*/
|
*/
|
||||||
MINUTE = 1,
|
DAY = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -202,14 +202,14 @@ export enum FieldPermissionType {
|
||||||
* 延迟类型
|
* 延迟类型
|
||||||
*/
|
*/
|
||||||
export enum DelayTypeEnum {
|
export enum DelayTypeEnum {
|
||||||
/**
|
|
||||||
* 固定日期时间
|
|
||||||
*/
|
|
||||||
FIXED_DATE_TIME = 2,
|
|
||||||
/**
|
/**
|
||||||
* 固定时长
|
* 固定时长
|
||||||
*/
|
*/
|
||||||
FIXED_TIME_DURATION = 1,
|
FIXED_TIME_DURATION = 1,
|
||||||
|
/**
|
||||||
|
* 固定日期时间
|
||||||
|
*/
|
||||||
|
FIXED_DATE_TIME = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -217,35 +217,39 @@ export enum DelayTypeEnum {
|
||||||
*/
|
*/
|
||||||
export enum TriggerTypeEnum {
|
export enum TriggerTypeEnum {
|
||||||
/**
|
/**
|
||||||
* 表单数据删除触发器
|
* 发送 HTTP 请求触发器
|
||||||
*/
|
*/
|
||||||
FORM_DELETE = 11,
|
HTTP_REQUEST = 1,
|
||||||
/**
|
|
||||||
* 表单数据更新触发器
|
|
||||||
*/
|
|
||||||
FORM_UPDATE = 10,
|
|
||||||
/**
|
/**
|
||||||
* 接收 HTTP 回调请求触发器
|
* 接收 HTTP 回调请求触发器
|
||||||
*/
|
*/
|
||||||
HTTP_CALLBACK = 2,
|
HTTP_CALLBACK = 2,
|
||||||
/**
|
/**
|
||||||
* 发送 HTTP 请求触发器
|
* 表单数据更新触发器
|
||||||
*/
|
*/
|
||||||
HTTP_REQUEST = 1,
|
FORM_UPDATE = 10,
|
||||||
|
/**
|
||||||
|
* 表单数据删除触发器
|
||||||
|
*/
|
||||||
|
FORM_DELETE = 11,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChildProcessStartUserTypeEnum {
|
export enum ChildProcessStartUserTypeEnum {
|
||||||
|
/**
|
||||||
|
* 同主流程发起人
|
||||||
|
*/
|
||||||
|
MAIN_PROCESS_START_USER = 1,
|
||||||
/**
|
/**
|
||||||
* 表单
|
* 表单
|
||||||
*/
|
*/
|
||||||
FROM_FORM = 2,
|
FROM_FORM = 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChildProcessStartUserEmptyTypeEnum {
|
||||||
/**
|
/**
|
||||||
* 同主流程发起人
|
* 同主流程发起人
|
||||||
*/
|
*/
|
||||||
MAIN_PROCESS_START_USER = 1,
|
MAIN_PROCESS_START_USER = 1,
|
||||||
}
|
|
||||||
|
|
||||||
export enum ChildProcessStartUserEmptyTypeEnum {
|
|
||||||
/**
|
/**
|
||||||
* 子流程管理员
|
* 子流程管理员
|
||||||
*/
|
*/
|
||||||
|
|
@ -254,10 +258,6 @@ export enum ChildProcessStartUserEmptyTypeEnum {
|
||||||
* 主流程管理员
|
* 主流程管理员
|
||||||
*/
|
*/
|
||||||
MAIN_PROCESS_ADMIN = 3,
|
MAIN_PROCESS_ADMIN = 3,
|
||||||
/**
|
|
||||||
* 同主流程发起人
|
|
||||||
*/
|
|
||||||
MAIN_PROCESS_START_USER = 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChildProcessMultiInstanceSourceTypeEnum {
|
export enum ChildProcessMultiInstanceSourceTypeEnum {
|
||||||
|
|
@ -265,54 +265,50 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
|
||||||
* 固定数量
|
* 固定数量
|
||||||
*/
|
*/
|
||||||
FIXED_QUANTITY = 1,
|
FIXED_QUANTITY = 1,
|
||||||
/**
|
|
||||||
* 多选表单
|
|
||||||
*/
|
|
||||||
MULTIPLE_FORM = 3,
|
|
||||||
/**
|
/**
|
||||||
* 数字表单
|
* 数字表单
|
||||||
*/
|
*/
|
||||||
NUMBER_FORM = 2,
|
NUMBER_FORM = 2,
|
||||||
|
/**
|
||||||
|
* 多选表单
|
||||||
|
*/
|
||||||
|
MULTIPLE_FORM = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
||||||
export enum CandidateStrategy {
|
export enum CandidateStrategy {
|
||||||
/**
|
/**
|
||||||
* 审批人自选
|
* 指定角色
|
||||||
*/
|
*/
|
||||||
APPROVE_USER_SELECT = 34,
|
ROLE = 10,
|
||||||
/**
|
|
||||||
* 部门的负责人
|
|
||||||
*/
|
|
||||||
DEPT_LEADER = 21,
|
|
||||||
/**
|
/**
|
||||||
* 部门成员
|
* 部门成员
|
||||||
*/
|
*/
|
||||||
DEPT_MEMBER = 20,
|
DEPT_MEMBER = 20,
|
||||||
/**
|
/**
|
||||||
* 流程表达式
|
* 部门的负责人
|
||||||
*/
|
*/
|
||||||
EXPRESSION = 60,
|
DEPT_LEADER = 21,
|
||||||
/**
|
|
||||||
* 表单内部门负责人
|
|
||||||
*/
|
|
||||||
FORM_DEPT_LEADER = 51,
|
|
||||||
/**
|
|
||||||
* 表单内用户字段
|
|
||||||
*/
|
|
||||||
FORM_USER = 50,
|
|
||||||
/**
|
|
||||||
* 连续多级部门的负责人
|
|
||||||
*/
|
|
||||||
MULTI_LEVEL_DEPT_LEADER = 23,
|
|
||||||
/**
|
/**
|
||||||
* 指定岗位
|
* 指定岗位
|
||||||
*/
|
*/
|
||||||
POST = 22,
|
POST = 22,
|
||||||
/**
|
/**
|
||||||
* 指定角色
|
* 连续多级部门的负责人
|
||||||
*/
|
*/
|
||||||
ROLE = 10,
|
MULTI_LEVEL_DEPT_LEADER = 23,
|
||||||
|
/**
|
||||||
|
* 指定用户
|
||||||
|
*/
|
||||||
|
USER = 30,
|
||||||
|
/**
|
||||||
|
* 审批人自选
|
||||||
|
*/
|
||||||
|
APPROVE_USER_SELECT = 34,
|
||||||
|
/**
|
||||||
|
* 发起人自选
|
||||||
|
*/
|
||||||
|
START_USER_SELECT = 35,
|
||||||
/**
|
/**
|
||||||
* 发起人自己
|
* 发起人自己
|
||||||
*/
|
*/
|
||||||
|
|
@ -325,18 +321,22 @@ export enum CandidateStrategy {
|
||||||
* 发起人连续多级部门的负责人
|
* 发起人连续多级部门的负责人
|
||||||
*/
|
*/
|
||||||
START_USER_MULTI_LEVEL_DEPT_LEADER = 38,
|
START_USER_MULTI_LEVEL_DEPT_LEADER = 38,
|
||||||
/**
|
|
||||||
* 发起人自选
|
|
||||||
*/
|
|
||||||
START_USER_SELECT = 35,
|
|
||||||
/**
|
|
||||||
* 指定用户
|
|
||||||
*/
|
|
||||||
USER = 30,
|
|
||||||
/**
|
/**
|
||||||
* 指定用户组
|
* 指定用户组
|
||||||
*/
|
*/
|
||||||
USER_GROUP = 40,
|
USER_GROUP = 40,
|
||||||
|
/**
|
||||||
|
* 表单内用户字段
|
||||||
|
*/
|
||||||
|
FORM_USER = 50,
|
||||||
|
/**
|
||||||
|
* 表单内部门负责人
|
||||||
|
*/
|
||||||
|
FORM_DEPT_LEADER = 51,
|
||||||
|
/**
|
||||||
|
* 流程表达式
|
||||||
|
*/
|
||||||
|
EXPRESSION = 60,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BpmHttpRequestParamTypeEnum {
|
export enum BpmHttpRequestParamTypeEnum {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* - @ 自动补全:插入 mention 占位元素
|
* - @ 自动补全:插入 mention 占位元素
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @ts-ignore TinyMCE 全局或通过打包器提供
|
// TinyMCE 全局或通过打包器提供
|
||||||
import type { Editor } from 'tinymce';
|
import type { Editor } from 'tinymce';
|
||||||
|
|
||||||
export interface MentionItem {
|
export interface MentionItem {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
bpmnXml?: string;
|
bpmnXml?: string;
|
||||||
loading?: boolean; // 是否加载中
|
loading?: boolean; // 是否加载中
|
||||||
modelView?: Object;
|
modelView?: object;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -29,7 +29,7 @@ watch(
|
||||||
async (newModelView) => {
|
async (newModelView) => {
|
||||||
// 加载最新
|
// 加载最新
|
||||||
if (newModelView) {
|
if (newModelView) {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
view.value = newModelView;
|
view.value = newModelView;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { getDictLabel } from '@vben/hooks';
|
||||||
import { useUserStore } from '@vben/stores';
|
import { useUserStore } from '@vben/stores';
|
||||||
import { formatDate } from '@vben/utils';
|
import { formatDate } from '@vben/utils';
|
||||||
|
|
||||||
// @ts-ignore - 安装 vue3-print-nb 局部指令 v-print
|
// @ts-expect-error - 安装 vue3-print-nb 局部指令 v-print
|
||||||
import vPrint from 'vue3-print-nb';
|
import vPrint from 'vue3-print-nb';
|
||||||
|
|
||||||
import { getProcessInstancePrintData } from '#/api/bpm/processInstance';
|
import { getProcessInstancePrintData } from '#/api/bpm/processInstance';
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue