fix: lint

pull/336/head
xingyu4j 2026-03-14 12:16:31 +08:00
parent 54c668c3f0
commit 4cdc92f759
119 changed files with 482 additions and 447 deletions

View File

@ -2537,12 +2537,12 @@ interface EditorSelection {
normalize: () => Range;
selectorChanged: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => EditorSelection;
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => {
unbind: () => void;
@ -3217,9 +3217,9 @@ interface Tools {
<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[];
};
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;
resolve: (path: string, o?: Object) => any;
resolve: (path: string, o?: object) => any;
explode: (s: string | string[], d?: string | RegExp) => string[];
_addCacheSuffix: (url: string) => string;
}

View File

@ -37,16 +37,12 @@ export function getModbusPoint(id: number) {
}
/** 创建 Modbus 点位配置 */
export function createModbusPoint(
data: IotDeviceModbusPointApi.ModbusPoint,
) {
export function createModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.post('/iot/device-modbus-point/create', data);
}
/** 更新 Modbus 点位配置 */
export function updateModbusPoint(
data: IotDeviceModbusPointApi.ModbusPoint,
) {
export function updateModbusPoint(data: IotDeviceModbusPointApi.ModbusPoint) {
return requestClient.put('/iot/device-modbus-point/update', data);
}

View File

@ -119,7 +119,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
response.data = apiEncrypt.decryptResponse(response.data);
} catch (error) {
console.error('响应数据解密失败:', error);
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
cause: error,
});
}
}
return response;

View File

@ -21,7 +21,7 @@ export function useDescription(options?: Partial<DescriptionProps>) {
inheritAttrs: false,
setup(_props, { attrs, slots }) {
return () => {
// @ts-ignore - 避免类型实例化过深
// @ts-expect-error - 避免类型实例化过深
return h(Description, { ...propsState, ...attrs }, slots);
};
},

View File

@ -2,10 +2,11 @@
<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue';
import { AreaLevelEnum } from '@vben/constants';
import { Cascader } from 'ant-design-vue';
import { getAreaTree } from '#/api/system/area';
import { AreaLevelEnum } from '@vben/constants';
defineOptions({ name: 'AreaSelect' });
@ -40,12 +41,13 @@ interface AreaVO {
interface Props {
modelValue?: number[] | string[];
value?: number[] | string[];
level?: typeof AreaLevelEnum[keyof typeof AreaLevelEnum];
level?: (typeof AreaLevelEnum)[keyof typeof AreaLevelEnum];
disabled?: boolean;
placeholder?: string;
clearable?: boolean;
showAllLevels?: boolean;
separator?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@ -70,7 +72,7 @@ async function loadAreaTree(): Promise<void> {
const data = await getAreaTree();
// level
areaTree.value = filterTreeByLevel(data || [], props.level);
areaTree.value = filterTreeByLevel((data || []) as AreaVO[], props.level);
} catch (error) {
console.warn('[AreaSelect] 加载地区数据失败:', error);
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) {
emit('update:modelValue', undefined);
emit('update:value', undefined);

View File

@ -29,6 +29,7 @@ interface Props {
allowfullscreen?: boolean;
loading?: 'eager' | 'lazy';
sandbox?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@ -72,9 +73,9 @@ const showPreview = computed(() => {
}
.iframe-preview {
overflow: hidden;
border: 1px solid #d9d9d9;
border-radius: 4px;
overflow: hidden;
}
.iframe-content {
@ -87,8 +88,8 @@ const showPreview = computed(() => {
align-items: center;
justify-content: center;
min-height: 200px;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 4px;
background-color: #fafafa;
}
</style>

View File

@ -11,14 +11,14 @@ import formCreate from '@form-create/ant-design-vue';
import { apiSelectRule } from '#/components/form-create/rules/data';
import {
useAreaSelectRule,
useDictSelectRule,
useEditorRule,
useIframeRule,
useSelectRule,
useUploadFileRule,
useUploadImageRule,
useUploadImagesRule,
useIframeRule,
useAreaSelectRule,
} from './rules';
/** 编码表单 Conf */

View File

@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
const selectRule = [
{
type: 'select',

View File

@ -1,8 +1,9 @@
import { AreaLevelEnum } from '@vben/constants';
import {
localeProps,
makeRequiredRule,
} from '#/components/form-create/helpers';
import { AreaLevelEnum } from '@vben/constants';
/** 省市区选择器规则 */
export function useAreaSelectRule() {

View File

@ -83,6 +83,7 @@ export const useAuthStore = defineStore('auth', () => {
if (accessStore.loginExpired) {
accessStore.setLoginExpired(false);
} else {
// oxlint-disable-next-line no-unused-expressions
onSuccess
? await onSuccess?.()
: await router.push(
@ -132,6 +133,7 @@ export const useAuthStore = defineStore('auth', () => {
async function fetchUserInfo() {
// 加载
// eslint-disable-next-line no-useless-assignment
let authPermissionInfo: AuthPermissionInfo | null = null;
authPermissionInfo = await getAuthPermissionInfoApi();
// userStore

View File

@ -34,9 +34,7 @@ export const findIndex = <T = Recordable<any>>(
*/
export const isUrl = (path: string): boolean => {
// fix:修复hash路由无法跳转的问题
/* eslint-disable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
const reg =
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
return reg.test(path);
/* eslint-enable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
};

View File

@ -106,7 +106,9 @@ async function goRun() {
try {
convertedParams[paramKey] = convertParamValue(value, dataType);
} 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 {
return JSON.parse(value);
} catch (error: any) {
throw new Error(`JSON格式错误: ${error.message}`);
throw new Error(`JSON格式错误: ${error.message}`, { cause: error });
}
}
default: {

View File

@ -22,7 +22,7 @@ import {
import { Button, ButtonGroup, message, Modal, Tooltip } from 'ant-design-vue';
//
// @ts-ignore
// @ts-expect-error
import tokenSimulation from 'bpmn-js-token-simulation';
import BpmnModeler from 'bpmn-js/lib/Modeler';
//
@ -132,6 +132,7 @@ const emit = defineEmits([
'element-click',
]);
// @ts-expect-error
const bpmnCanvas = ref();
const refFile = ref();
@ -178,6 +179,7 @@ const additionalModules = computed(() => {
) {
Modules.push(...(props.additionalModel as any[]));
} else {
// oxlint-disable-next-line no-unused-expressions
props.additionalModel && Modules.push(props.additionalModel);
}
@ -417,6 +419,7 @@ const processSimulation = () => {
// bpmnModeler.get('toggleMode', 'strict'),
// "bpmnModeler.get('toggleMode')",
// );
// oxlint-disable-next-line no-unused-expressions
props.simulation && bpmnModeler.get('toggleMode', 'strict').toggleMode();
};
const processRedo = () => {

View File

@ -3,7 +3,7 @@ import { isFunction, isObject } from '@vben/utils';
const WILDCARD = '*';
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;
eventBus.on('moddleCopy.canCopyProperty', (context) => {

View File

@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
/**
* This is a sample file that should be replaced with the actual translation.
*

View File

@ -39,7 +39,7 @@ watch(
val +=
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
}
// @ts-ignore
// @ts-expect-error
customConfigComponent.value = (
CustomConfigMap as Record<string, { component: Component }>
)[val]?.component;

View File

@ -66,13 +66,13 @@ const bpmnElement = ref<any>(null);
const multiLoopInstance = ref<any>(null);
declare global {
interface Window {
// @ts-ignore
bpmnInstances?: () => any;
}
}
const bpmnInstances = () => (window as any)?.bpmnInstances;
// @ts-expect-error
// eslint-disable-next-line unused-imports/no-unused-vars
const getElementLoop = (businessObject: any): void => {
if (!businessObject.loopCharacteristics) {
@ -141,7 +141,6 @@ const changeLoopCharacteristicsType = (type: any): void => {
isSequential: true,
})
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
// eslint-disable-next-line no-template-curly-in-string
collection: '${coll_userList}',
});
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
@ -233,7 +232,7 @@ const updateLoopAsync = (key: any): void => {
extensionElements: null,
};
} else {
// @ts-ignore
// @ts-expect-error
asyncAttr[key] = loopInstanceForm.value[key];
}
bpmnInstances().modeling.updateModdleProperties(
@ -247,7 +246,7 @@ const changeConfig = (config: string): void => {
switch (config) {
case '会签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
break;
@ -255,14 +254,14 @@ const changeConfig = (config: string): void => {
case '依次审批': {
changeLoopCharacteristicsType('SequentialMultiInstance');
updateLoopCardinality('1');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
break;
}
case '或签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
break;
@ -331,7 +330,7 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
);
multiLoopInstance.value.completionCondition =
@ -344,19 +343,18 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances > 0 }',
});
}
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: true, collection: '${coll_userList}' },
);
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
@ -367,7 +365,6 @@ const updateLoopCharacteristics = (): void => {
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances >= nrOfInstances }',
});
}

View File

@ -53,7 +53,7 @@ watch(
() => props.type,
() => {
if (props.type) {
// @ts-ignore
// @ts-expect-error
witchTaskComponent.value = installedComponent[props.type].component;
}
},

View File

@ -65,7 +65,7 @@ const initCallActivity = () => {
//
Object.keys(formData.value).forEach((key: string) => {
// @ts-ignore
// @ts-expect-error
formData.value[key] =
bpmnElement.value.businessObject[key] ??
formData.value[key as keyof FormData];
@ -183,6 +183,7 @@ const updateElementExtensions = () => {
watch(
() => props.id,
(val) => {
// oxlint-disable-next-line no-unused-expressions
val &&
val.length > 0 &&
nextTick(() => {

View File

@ -82,7 +82,6 @@ onMounted(() => {
bpmnRootElements.value
.filter((el: any) => el.$type === 'bpmn:Message')
.forEach((m: any) => {
// @ts-ignore
if (bpmnMessageRefsMap.value) {
bpmnMessageRefsMap.value[m.id] = m;
}

View File

@ -34,7 +34,6 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
const resetTaskForm = () => {
for (const key in defaultTaskForm.value) {
// @ts-ignore
scriptTaskForm.value[key] =
bpmnElement.value?.businessObject[
key as keyof typeof defaultTaskForm.value

View File

@ -1,3 +1,4 @@
<!-- eslint-disable unicorn/no-nested-ternary -->
<!-- eslint-disable prettier/prettier -->
<script lang="ts" setup>
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
@ -206,9 +207,9 @@ const updateHttpExtensions = (force = false) => {
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
? String(!!rawValue)
: (rawValue === undefined
: rawValue === undefined
? ''
: rawValue.toString());
: rawValue.toString();
desiredEntries.push([name, persisted]);
});

View File

@ -128,7 +128,7 @@ const resetTaskForm = () => {
// eslint-disable-next-line unicorn/prefer-switch
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
// input
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = [candidateParamStr];
} else if (
userTaskForm.value.candidateStrategy ===
@ -152,7 +152,7 @@ const resetTaskForm = () => {
userTaskForm.value.candidateStrategy ===
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
) {
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = +candidateParamStr;
deptLevel.value = +candidateParamStr;
} else if (
@ -303,7 +303,7 @@ const openProcessExpressionDialog = async () => {
const selectProcessExpression = (
expression: BpmProcessExpressionApi.ProcessExpression,
) => {
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = [expression.expression];
updateElementTask();
};
@ -311,7 +311,7 @@ const selectProcessExpression = (
const handleFormUserChange = (e: any) => {
if (e === 'PROCESS_START_USER_ID') {
userTaskForm.value.candidateParam = [];
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
}
updateElementTask();

View File

@ -1,4 +1,5 @@
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
// eslint-disable-next-line n/no-extraneous-import
import inherits from 'inherits';
export default function CustomRules(eventBus) {

View File

@ -1,4 +1,5 @@
function xmlStr2XmlObj(xmlStr) {
// eslint-disable-next-line no-useless-assignment
let xmlObj = {};
if (document.all) {
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');

View File

@ -71,6 +71,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
//

View File

@ -25,12 +25,13 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
/** 监控节点的变化 */
const currentNode = useWatchNode(props);
/** 节点名称编辑 */
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.CHILD_PROCESS_NODE,

View File

@ -27,10 +27,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.COPY_TASK_NODE,

View File

@ -25,10 +25,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.DELAY_TIMER_NODE,

View File

@ -20,7 +20,7 @@ const props = defineProps({
//
const currentNode = useWatchNode(props);
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const processInstance = inject<Ref<any>>('processInstance', ref({}));
const [Modal, modalApi] = useVbenModal({

View File

@ -41,7 +41,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);
watch(

View File

@ -46,7 +46,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);

View File

@ -36,7 +36,7 @@ const props = defineProps({
const emits = defineEmits(['update:childNode']);
const popoverShow = ref(false);
const readonly = inject<Boolean>('readonly'); //
const readonly = inject<boolean>('readonly'); //
function addNode(type: number) {
//

View File

@ -36,7 +36,7 @@ const emits = defineEmits<{
const currentNode = ref<SimpleFlowNode>(props.flowNode);
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
watch(
() => props.flowNode,

View File

@ -28,10 +28,11 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,

View File

@ -32,11 +32,12 @@ defineEmits<{
'update:modelValue': [node: SimpleFlowNode | undefined];
}>();
const readonly = inject<Boolean>('readonly'); //
const readonly = inject<boolean>('readonly'); //
const tasks = inject<Ref<any[]>>('tasks', ref([]));
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.START_USER_NODE,

View File

@ -30,7 +30,7 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//

View File

@ -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 currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.USER_TASK_NODE,

View File

@ -7,6 +7,10 @@ interface DictDataType {
// 用户任务的审批类型。 【参考飞书】
export enum ApproveType {
/**
*
*/
USER = 1,
/**
*
*/
@ -15,18 +19,14 @@ export enum ApproveType {
*
*/
AUTO_REJECT = 3,
/**
*
*/
USER = 1,
}
// 多人审批方式类型枚举 用于审批节点
export enum ApproveMethodType {
/**
* ()
*
*/
ANY_APPROVE = 3,
RANDOM_SELECT_ONE_APPROVE = 1,
/**
* ()
@ -34,9 +34,9 @@ export enum ApproveMethodType {
APPROVE_BY_RATIO = 2,
/**
*
* ()
*/
RANDOM_SELECT_ONE_APPROVE = 1,
ANY_APPROVE = 3,
/**
*
*/
@ -70,34 +70,34 @@ export enum ConditionType {
// 操作按钮类型枚举 (用于审批节点)
export enum OperationButtonType {
/**
*
*/
ADD_SIGN = 5,
/**
*
*/
APPROVE = 1,
/**
*
*/
COPY = 7,
/**
*
*/
DELEGATE = 4,
/**
*
*/
REJECT = 2,
/**
*
*/
TRANSFER = 3,
/**
*
*/
DELEGATE = 4,
/**
*
*/
ADD_SIGN = 5,
/**
* 退
*/
RETURN = 6,
/**
*
*
*/
TRANSFER = 3,
COPY = 7,
}
// 审批拒绝类型枚举
@ -114,6 +114,10 @@ export enum RejectHandlerType {
// 用户任务超时处理类型枚举
export enum TimeoutHandlerType {
/**
*
*/
REMINDER = 1,
/**
*
*/
@ -122,10 +126,6 @@ export enum TimeoutHandlerType {
*
*/
REJECT = 3,
/**
*
*/
REMINDER = 1,
}
// 用户任务的审批人为空时,处理类型枚举
@ -135,49 +135,49 @@ export enum AssignEmptyHandlerType {
*/
APPROVE = 1,
/**
*
*
*/
ASSIGN_ADMIN = 4,
REJECT = 2,
/**
*
*/
ASSIGN_USER = 3,
/**
*
*
*/
REJECT = 2,
ASSIGN_ADMIN = 4,
}
// 用户任务的审批人与发起人相同时,处理类型枚举
export enum AssignStartUserHandlerType {
/**
*
*
*/
ASSIGN_DEPT_LEADER = 3,
START_USER_AUDIT = 1,
/**
* 12
*/
SKIP = 2,
/**
*
*
*/
START_USER_AUDIT = 1,
ASSIGN_DEPT_LEADER = 3,
}
// 时间单位枚举
export enum TimeUnitType {
/**
*
*
*/
DAY = 3,
MINUTE = 1,
/**
*
*/
HOUR = 2,
/**
*
*
*/
MINUTE = 1,
DAY = 3,
}
/**
@ -202,14 +202,14 @@ export enum FieldPermissionType {
*
*/
export enum DelayTypeEnum {
/**
*
*/
FIXED_DATE_TIME = 2,
/**
*
*/
FIXED_TIME_DURATION = 1,
/**
*
*/
FIXED_DATE_TIME = 2,
}
/**
@ -217,35 +217,39 @@ export enum DelayTypeEnum {
*/
export enum TriggerTypeEnum {
/**
*
* HTTP
*/
FORM_DELETE = 11,
/**
*
*/
FORM_UPDATE = 10,
HTTP_REQUEST = 1,
/**
* HTTP
*/
HTTP_CALLBACK = 2,
/**
* HTTP
*
*/
HTTP_REQUEST = 1,
FORM_UPDATE = 10,
/**
*
*/
FORM_DELETE = 11,
}
export enum ChildProcessStartUserTypeEnum {
/**
*
*/
MAIN_PROCESS_START_USER = 1,
/**
*
*/
FROM_FORM = 2,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
*
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
*
*/
@ -254,10 +258,6 @@ export enum ChildProcessStartUserEmptyTypeEnum {
*
*/
MAIN_PROCESS_ADMIN = 3,
/**
*
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessMultiInstanceSourceTypeEnum {
@ -265,54 +265,50 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
*
*/
FIXED_QUANTITY = 1,
/**
*
*/
MULTIPLE_FORM = 3,
/**
*
*/
NUMBER_FORM = 2,
/**
*
*/
MULTIPLE_FORM = 3,
}
// 候选人策略枚举 用于审批节点。抄送节点 )
export enum CandidateStrategy {
/**
*
*
*/
APPROVE_USER_SELECT = 34,
/**
*
*/
DEPT_LEADER = 21,
ROLE = 10,
/**
*
*/
DEPT_MEMBER = 20,
/**
*
*
*/
EXPRESSION = 60,
/**
*
*/
FORM_DEPT_LEADER = 51,
/**
*
*/
FORM_USER = 50,
/**
*
*/
MULTI_LEVEL_DEPT_LEADER = 23,
DEPT_LEADER = 21,
/**
*
*/
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_SELECT = 35,
/**
*
*/
USER = 30,
/**
*
*/
USER_GROUP = 40,
/**
*
*/
FORM_USER = 50,
/**
*
*/
FORM_DEPT_LEADER = 51,
/**
*
*/
EXPRESSION = 60,
}
export enum BpmHttpRequestParamTypeEnum {

View File

@ -3,7 +3,7 @@
* - @ mention
*/
// @ts-ignore TinyMCE 全局或通过打包器提供
// TinyMCE 全局或通过打包器提供
import type { Editor } from 'tinymce';
export interface MentionItem {

View File

@ -9,7 +9,7 @@ const props = withDefaults(
defineProps<{
bpmnXml?: string;
loading?: boolean; //
modelView?: Object;
modelView?: object;
}>(),
{
loading: false,
@ -29,7 +29,7 @@ watch(
async (newModelView) => {
//
if (newModelView) {
// @ts-ignore
// @ts-expect-error
view.value = newModelView;
}
},

View File

@ -10,7 +10,7 @@ import { useUserStore } from '@vben/stores';
import { formatDate } from '@vben/utils';
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 { getProcessInstancePrintData } from '#/api/bpm/processInstance';

View File

@ -1,5 +1,5 @@
<!-- eslint-disable no-useless-escape -->
<script setup lang="ts">
// oxlint-disable no-useless-escape
import { onMounted, ref, unref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';

View File

@ -1,6 +1,7 @@
<!-- Modbus 配置 -->
<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 { IotDeviceModbusConfigApi } from '#/api/iot/device/modbus/config';
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: {
schema: usePointFormSchema(),
submitOnChange: true,
@ -255,7 +256,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceModbusPointApi.ModbusPoint>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceModbusPointApi.ModbusPoint>,
});
/** 新增点位 - 使用 useVbenModal */

View File

@ -1,5 +1,6 @@
<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 { ref, watch } from 'vue';
@ -71,7 +72,7 @@ function useGridColumns(): VxeTableGridOptions['columns'] {
];
}
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
columns: useGridColumns(),
height: 'auto',
@ -96,7 +97,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
pagerConfig: {
enabled: false,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,
@ -219,7 +220,7 @@ function useAddGridColumns(): VxeTableGridOptions['columns'] {
];
}
const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [AddGrid, addGridApi] = useVbenVxeGrid({
formOptions: {
schema: useAddGridFormSchema(),
submitOnChange: true,
@ -247,7 +248,7 @@ const [AddGrid, addGridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleAddSelectionChange,
checkboxChange: handleAddSelectionChange,

View File

@ -210,7 +210,7 @@ function handleRowCheckboxChange({
checkedIds.value = records.map((item) => item.id!);
}
const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
checkboxConfig: {
highlight: true,
@ -242,7 +242,7 @@ const [Grid, gridApi] = useVbenVxeGrid<IotDeviceApi.Device>({
refresh: true,
search: true,
},
},
} as VxeTableGridOptions<IotDeviceApi.Device>,
gridEvents: {
checkboxAll: handleRowCheckboxChange,
checkboxChange: handleRowCheckboxChange,

View File

@ -13,8 +13,8 @@ export const IOT_PROVIDE_KEY = {
/** IoT 设备状态枚举 */
export enum DeviceStateEnum {
INACTIVE = 0, // 未激活
OFFLINE = 2, // 离线
ONLINE = 1, // 在线
OFFLINE = 2, // 离线
}
/** IoT 产品物模型类型枚举类 */

View File

@ -3,8 +3,8 @@ import dayjs from 'dayjs';
/** 时间范围类型枚举 */
export enum TimeRangeTypeEnum {
DAY30 = 1,
MONTH = 30,
WEEK = 7,
MONTH = 30,
YEAR = 365,
}

View File

@ -3,8 +3,8 @@ import dayjs from 'dayjs';
/** 时间范围类型枚举 */
export enum TimeRangeTypeEnum {
DAY30 = 1,
MONTH = 30,
WEEK = 7,
MONTH = 30,
YEAR = 365,
}

View File

@ -12,7 +12,7 @@ defineOptions({ name: 'ProductCategorySelect' });
const props = defineProps({
modelValue: {
type: [Number, Array<Number>],
type: [Number, Array<number>],
default: undefined,
}, // ID
multiple: {

View File

@ -50,7 +50,7 @@ const selectedSku = ref<MallSpuApi.Sku>();
/** 处理商品的选择变化 */
async function handleSpuChange(spu?: MallSpuApi.Spu | null) {
// 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;
await formApi.setFieldValue('spuId', spuId);
//

View File

@ -102,6 +102,7 @@ async function showInput(index: number) {
attributeIndex.value = index;
inputRef.value?.[index]?.focus();
//
// oxlint-disable-next-line typescript/no-non-null-asserted-optional-chain
await getAttributeOptions(attributeList.value?.[index]?.id!);
}

View File

@ -42,7 +42,7 @@ function handleSend(userId: number) {
messageBoxVisible.value = true;
}
const [Grid, gridApi] = useVbenVxeGrid<MpMessageApi.Message>({
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
},

View File

@ -65,7 +65,7 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
try {
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);
// values
await formApi.setValues(formData.value);

View File

@ -2537,12 +2537,12 @@ interface EditorSelection {
normalize: () => Range;
selectorChanged: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => EditorSelection;
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
node: Node;
selector: String;
selector: string;
parents: Node[];
}) => void) => {
unbind: () => void;
@ -3217,9 +3217,9 @@ interface Tools {
<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[];
};
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;
resolve: (path: string, o?: Object) => any;
resolve: (path: string, o?: object) => any;
explode: (s: string | string[], d?: string | RegExp) => string[];
_addCacheSuffix: (url: string) => string;
}

View File

@ -194,6 +194,7 @@ setupVbenVxeTable({
class: '!p-0',
...props,
};
// eslint-disable-next-line no-useless-assignment
let align = 'end';
switch (column.align) {
case 'center': {

View File

@ -16,10 +16,10 @@ export namespace CrmCustomerLimitConfigApi {
/** 客户限制配置类型 */
export enum LimitConfType {
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
/** 拥有客户数限制 */
CUSTOMER_QUANTITY_LIMIT = 1,
/** 锁定客户数限制 */
CUSTOMER_LOCK_LIMIT = 2,
}
/** 查询客户限制配置列表 */

View File

@ -35,11 +35,11 @@ export namespace CrmPermissionApi {
* CRM
*/
export enum BizTypeEnum {
CRM_BUSINESS = 4, // 商机
CRM_CLUE = 1, // 线索
CRM_CONTACT = 3, // 联系人
CRM_CONTRACT = 5, // 合同
CRM_CUSTOMER = 2, // 客户
CRM_CONTACT = 3, // 联系人
CRM_BUSINESS = 4, // 商机
CRM_CONTRACT = 5, // 合同
CRM_PRODUCT = 6, // 产品
CRM_RECEIVABLE = 7, // 回款
CRM_RECEIVABLE_PLAN = 8, // 回款计划

View File

@ -119,7 +119,9 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) {
response.data = apiEncrypt.decryptResponse(response.data);
} catch (error) {
console.error('响应数据解密失败:', error);
throw new Error(`响应数据解密失败: ${(error as Error).message}`);
throw new Error(`响应数据解密失败: ${(error as Error).message}`, {
cause: error,
});
}
}
return response;

View File

@ -89,6 +89,7 @@ async function init() {
// Real-time display preview
function realTimeCropped() {
// oxlint-disable-next-line no-unused-expressions
props.realTimePreview && cropped();
}
@ -113,7 +114,6 @@ function cropped() {
imgInfo,
});
};
// eslint-disable-next-line unicorn/prefer-add-event-listener
fileReader.onerror = () => {
emit('cropendError');
};

View File

@ -21,7 +21,6 @@ export function useDescription(options?: Partial<DescriptionProps>) {
inheritAttrs: false,
setup(_props, { attrs, slots }) {
return () => {
// @ts-ignore - 避免类型实例化过深
return h(Description, { ...propsState, ...attrs }, slots);
};
},

View File

@ -2,10 +2,11 @@
<script lang="ts" setup>
import { onMounted, ref, watch } from 'vue';
import { AreaLevelEnum } from '@vben/constants';
import { ElCascader } from 'element-plus';
import { getAreaTree } from '#/api/system/area';
import { AreaLevelEnum } from '@vben/constants';
defineOptions({ name: 'AreaSelect' });
@ -37,12 +38,13 @@ interface AreaVO {
//
interface Props {
modelValue?: number[] | string[];
level?: typeof AreaLevelEnum[keyof typeof AreaLevelEnum];
level?: (typeof AreaLevelEnum)[keyof typeof AreaLevelEnum];
disabled?: boolean;
placeholder?: string;
clearable?: boolean;
showAllLevels?: boolean;
separator?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@ -69,7 +71,7 @@ async function loadAreaTree(): Promise<void> {
const data = await getAreaTree();
// level
areaTree.value = filterTreeByLevel(data || [], props.level);
areaTree.value = filterTreeByLevel((data || []) as AreaVO[], props.level);
} catch (error) {
console.warn('[AreaSelect] 加载地区数据失败:', error);
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) {
emit('update:modelValue', undefined);
return;

View File

@ -39,15 +39,16 @@ interface DeptVO {
status?: number;
}
// TODO @puhui999linter
/** 接受父组件参数 */
interface Props {
// eslint-disable-next-line vue/require-default-prop
modelValue?: number | number[] | string | string[];
multiple?: boolean;
returnType?: 'id' | 'name';
defaultCurrentDept?: boolean;
disabled?: boolean;
placeholder?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}

View File

@ -27,6 +27,7 @@ interface Props {
allowfullscreen?: boolean;
loading?: 'eager' | 'lazy';
sandbox?: string;
// eslint-disable-next-line vue/require-default-prop
formCreateInject?: any;
}
@ -68,9 +69,9 @@ const showPreview = computed(() => {
}
.iframe-preview {
overflow: hidden;
border: 1px solid #dcdfe6;
border-radius: 4px;
overflow: hidden;
}
.iframe-content {
@ -83,8 +84,8 @@ const showPreview = computed(() => {
align-items: center;
justify-content: center;
min-height: 200px;
background-color: #fafafa;
border: 1px dashed #dcdfe6;
border-radius: 4px;
background-color: #fafafa;
}
</style>

View File

@ -193,7 +193,7 @@ export function useApiSelect(option: ApiSelectProps) {
let parse: any = null;
if (props.parseFunc) {
// 解析字符串函数
// eslint-disable-next-line no-new-func
// oxlint-disable-next-line typescript/no-implied-eval
parse = new Function(`return ${props.parseFunc}`)();
}
return parse;

View File

@ -11,14 +11,14 @@ import formCreate from '@form-create/element-ui';
import { apiSelectRule } from '#/components/form-create/rules/data';
import {
useAreaSelectRule,
useDictSelectRule,
useEditorRule,
useIframeRule,
useSelectRule,
useUploadFileRule,
useUploadImageRule,
useUploadImagesRule,
useIframeRule,
useAreaSelectRule,
} from './rules';
/** 编码表单 Conf */

View File

@ -1,8 +1,9 @@
import { AreaLevelEnum } from '@vben/constants';
import {
localeProps,
makeRequiredRule,
} from '#/components/form-create/helpers';
import { AreaLevelEnum } from '@vben/constants';
/** 省市区选择器规则 */
export function useAreaSelectRule() {

View File

@ -35,9 +35,7 @@ export const findIndex = <T = Recordable<any>>(
*/
export const isUrl = (path: string): boolean => {
// fix:修复hash路由无法跳转的问题
/* eslint-disable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
const reg =
/(((^https?:(?:\/\/)?)(?:[-:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%#/.\w-]*)?\??[-+=&%@.\w]*(?:#\w*)?)?)$/;
return reg.test(path);
/* eslint-enable regexp/no-unused-capturing-group, regexp/no-super-linear-backtracking, regexp/no-useless-quantifier */
};

View File

@ -106,7 +106,9 @@ async function goRun() {
try {
convertedParams[paramKey] = convertParamValue(value, dataType);
} 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 {
return JSON.parse(value);
} catch (error: any) {
throw new Error(`JSON格式错误: ${error.message}`);
throw new Error(`JSON格式错误: ${error.message}`, { cause: error });
}
}
default: {

View File

@ -21,7 +21,7 @@ import {
} from '@vben/icons';
//
// @ts-ignore
// @ts-expect-error
import tokenSimulation from 'bpmn-js-token-simulation';
import BpmnModeler from 'bpmn-js/lib/Modeler';
import {

View File

@ -3,7 +3,7 @@ import { isFunction, isObject } from '@vben/utils';
const WILDCARD = '*';
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;
eventBus.on('moddleCopy.canCopyProperty', (context) => {

View File

@ -1,4 +1,3 @@
/* eslint-disable no-template-curly-in-string */
/**
* This is a sample file that should be replaced with the actual translation.
*

View File

@ -39,7 +39,7 @@ watch(
val +=
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
}
// @ts-ignore
// @ts-expect-error
customConfigComponent.value = (
CustomConfigMap as Record<string, { component: Component }>
)[val]?.component;

View File

@ -67,13 +67,13 @@ const bpmnElement = ref<any>(null);
const multiLoopInstance = ref<any>(null);
declare global {
interface Window {
// @ts-ignore
bpmnInstances?: () => any;
}
}
const bpmnInstances = () => (window as any)?.bpmnInstances;
// @ts-expect-error
// eslint-disable-next-line unused-imports/no-unused-vars
const getElementLoop = (businessObject: any): void => {
if (!businessObject.loopCharacteristics) {
@ -142,7 +142,6 @@ const changeLoopCharacteristicsType = (type: any): void => {
isSequential: true,
})
: bpmnInstances().moddle.create('bpmn:MultiInstanceLoopCharacteristics', {
// eslint-disable-next-line no-template-curly-in-string
collection: '${coll_userList}',
});
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
@ -234,7 +233,7 @@ const updateLoopAsync = (key: any): void => {
extensionElements: null,
};
} else {
// @ts-ignore
// @ts-expect-error
asyncAttr[key] = loopInstanceForm.value[key];
}
bpmnInstances().modeling.updateModdleProperties(
@ -248,7 +247,6 @@ const changeConfig = (config: string): void => {
switch (config) {
case '会签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
break;
@ -256,14 +254,12 @@ const changeConfig = (config: string): void => {
case '依次审批': {
changeLoopCharacteristicsType('SequentialMultiInstance');
updateLoopCardinality('1');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances >= nrOfInstances }');
break;
}
case '或签': {
changeLoopCharacteristicsType('ParallelMultiInstance');
// eslint-disable-next-line no-template-curly-in-string
updateLoopCondition('${ nrOfCompletedInstances > 0 }');
break;
@ -332,7 +328,6 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.APPROVE_BY_RATIO) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
);
multiLoopInstance.value.completionCondition =
@ -345,19 +340,16 @@ const updateLoopCharacteristics = (): void => {
if (approveMethod.value === ApproveMethodType.ANY_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: false, collection: '${coll_userList}' },
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances > 0 }',
});
}
if (approveMethod.value === ApproveMethodType.SEQUENTIAL_APPROVE) {
multiLoopInstance.value = bpmnInstances().moddle.create(
'bpmn:MultiInstanceLoopCharacteristics',
// eslint-disable-next-line no-template-curly-in-string
{ isSequential: true, collection: '${coll_userList}' },
);
multiLoopInstance.value.loopCardinality = bpmnInstances().moddle.create(
@ -368,7 +360,6 @@ const updateLoopCharacteristics = (): void => {
);
multiLoopInstance.value.completionCondition =
bpmnInstances().moddle.create('bpmn:FormalExpression', {
// eslint-disable-next-line no-template-curly-in-string
body: '${ nrOfCompletedInstances >= nrOfInstances }',
});
}

View File

@ -53,7 +53,7 @@ watch(
() => props.type,
() => {
if (props.type) {
// @ts-ignore
// @ts-expect-error
witchTaskComponent.value = installedComponent[props.type].component;
}
},

View File

@ -65,7 +65,7 @@ const initCallActivity = () => {
//
Object.keys(formData.value).forEach((key: string) => {
// @ts-ignore
// @ts-expect-error
formData.value[key] =
bpmnElement.value.businessObject[key] ??
formData.value[key as keyof FormData];
@ -183,6 +183,7 @@ const updateElementExtensions = () => {
watch(
() => props.id,
(val) => {
// oxlint-disable-next-line no-unused-expressions
val &&
val.length > 0 &&
nextTick(() => {

View File

@ -82,7 +82,6 @@ onMounted(() => {
bpmnRootElements.value
.filter((el: any) => el.$type === 'bpmn:Message')
.forEach((m: any) => {
// @ts-ignore
if (bpmnMessageRefsMap.value) {
bpmnMessageRefsMap.value[m.id] = m;
}

View File

@ -27,7 +27,7 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
const resetTaskForm = () => {
for (const key in defaultTaskForm.value) {
// @ts-ignore
// @ts-expect-error
scriptTaskForm.value[key] =
bpmnElement.value?.businessObject[
key as keyof typeof defaultTaskForm.value

View File

@ -1,3 +1,4 @@
<!-- eslint-disable unicorn/no-nested-ternary -->
<!-- eslint-disable prettier/prettier -->
<script lang="ts" setup>
import { inject, nextTick, onBeforeUnmount, ref, watch } from 'vue';
@ -206,9 +207,9 @@ const updateHttpExtensions = (force = false) => {
const persisted = HTTP_BOOLEAN_FIELDS.has(name)
? String(!!rawValue)
: (rawValue === undefined
: rawValue === undefined
? ''
: rawValue.toString());
: rawValue.toString();
desiredEntries.push([name, persisted]);
});

View File

@ -70,6 +70,7 @@ const deptTreeOptions = ref<any>(); // 部门树
const postOptions = ref<SystemPostApi.Post[]>([]); //
const userOptions = ref<SystemUserApi.User[]>([]); //
const userGroupOptions = ref<BpmUserGroupApi.UserGroup[]>([]); //
// @ts-expect-error
const treeRef = ref<any>();
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ);
@ -128,7 +129,7 @@ const resetTaskForm = () => {
// eslint-disable-next-line unicorn/prefer-switch
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
// input
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = [candidateParamStr];
} else if (
userTaskForm.value.candidateStrategy ===
@ -152,7 +153,7 @@ const resetTaskForm = () => {
userTaskForm.value.candidateStrategy ===
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
) {
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = +candidateParamStr;
deptLevel.value = +candidateParamStr;
} else if (
@ -303,7 +304,7 @@ const openProcessExpressionDialog = async () => {
const selectProcessExpression = (
expression: BpmProcessExpressionApi.ProcessExpression,
) => {
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateParam = [expression.expression];
updateElementTask();
};
@ -311,7 +312,7 @@ const selectProcessExpression = (
const handleFormUserChange = (e: any) => {
if (e === 'PROCESS_START_USER_ID') {
userTaskForm.value.candidateParam = [];
// @ts-ignore
// @ts-expect-error
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
}
updateElementTask();

View File

@ -1,4 +1,5 @@
import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
// eslint-disable-next-line n/no-extraneous-import
import inherits from 'inherits';
export default function CustomRules(eventBus) {

View File

@ -1,4 +1,5 @@
function xmlStr2XmlObj(xmlStr) {
// eslint-disable-next-line no-useless-assignment
let xmlObj = {};
if (document.all) {
const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM');

View File

@ -73,6 +73,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
useNodeName(BpmNodeTypeEnum.COPY_TASK_NODE);
@ -283,6 +284,7 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
:data="deptTreeOptions"
:props="{
label: 'name',
// @ts-expect-error
value: 'id',
children: 'children',
}"

View File

@ -70,6 +70,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
//

View File

@ -25,12 +25,13 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
/** 监控节点的变化 */
const currentNode = useWatchNode(props);
/** 节点名称编辑 */
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.CHILD_PROCESS_NODE,

View File

@ -27,10 +27,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.COPY_TASK_NODE,

View File

@ -25,10 +25,11 @@ const emits = defineEmits<{
'update:flowNode': [node: SimpleFlowNode | undefined];
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.DELAY_TIMER_NODE,

View File

@ -20,7 +20,7 @@ const props = defineProps({
//
const currentNode = useWatchNode(props);
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const processInstance = inject<Ref<any>>('processInstance', ref({}));
const [Modal, modalApi] = useVbenModal({

View File

@ -41,7 +41,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);
watch(

View File

@ -46,7 +46,7 @@ const emits = defineEmits<{
const { proxy } = getCurrentInstance() as any;
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
const currentNode = ref<SimpleFlowNode>(props.flowNode);

View File

@ -36,7 +36,7 @@ const props = defineProps({
const emits = defineEmits(['update:childNode']);
const popoverShow = ref(false);
const readonly = inject<Boolean>('readonly'); //
const readonly = inject<boolean>('readonly'); //
function addNode(type: number) {
//

View File

@ -36,7 +36,7 @@ const emits = defineEmits<{
const currentNode = ref<SimpleFlowNode>(props.flowNode);
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
watch(
() => props.flowNode,

View File

@ -28,10 +28,11 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,

View File

@ -32,11 +32,12 @@ defineEmits<{
'update:modelValue': [node: SimpleFlowNode | undefined];
}>();
const readonly = inject<Boolean>('readonly'); //
const readonly = inject<boolean>('readonly'); //
const tasks = inject<Ref<any[]>>('tasks', ref([]));
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.START_USER_NODE,

View File

@ -30,10 +30,11 @@ const emits = defineEmits<{
}>();
//
const readonly = inject<Boolean>('readonly');
const readonly = inject<boolean>('readonly');
//
const currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.TRIGGER_NODE,

View File

@ -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 currentNode = useWatchNode(props);
//
// @ts-expect-error
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
currentNode,
BpmNodeTypeEnum.USER_TASK_NODE,

View File

@ -7,6 +7,10 @@ interface DictDataType {
// 用户任务的审批类型。 【参考飞书】
export enum ApproveType {
/**
*
*/
USER = 1,
/**
*
*/
@ -15,18 +19,14 @@ export enum ApproveType {
*
*/
AUTO_REJECT = 3,
/**
*
*/
USER = 1,
}
// 多人审批方式类型枚举 用于审批节点
export enum ApproveMethodType {
/**
* ()
*
*/
ANY_APPROVE = 3,
RANDOM_SELECT_ONE_APPROVE = 1,
/**
* ()
@ -34,9 +34,9 @@ export enum ApproveMethodType {
APPROVE_BY_RATIO = 2,
/**
*
* ()
*/
RANDOM_SELECT_ONE_APPROVE = 1,
ANY_APPROVE = 3,
/**
*
*/
@ -70,34 +70,34 @@ export enum ConditionType {
// 操作按钮类型枚举 (用于审批节点)
export enum OperationButtonType {
/**
*
*/
ADD_SIGN = 5,
/**
*
*/
APPROVE = 1,
/**
*
*/
COPY = 7,
/**
*
*/
DELEGATE = 4,
/**
*
*/
REJECT = 2,
/**
*
*/
TRANSFER = 3,
/**
*
*/
DELEGATE = 4,
/**
*
*/
ADD_SIGN = 5,
/**
* 退
*/
RETURN = 6,
/**
*
*
*/
TRANSFER = 3,
COPY = 7,
}
// 审批拒绝类型枚举
@ -114,6 +114,10 @@ export enum RejectHandlerType {
// 用户任务超时处理类型枚举
export enum TimeoutHandlerType {
/**
*
*/
REMINDER = 1,
/**
*
*/
@ -122,10 +126,6 @@ export enum TimeoutHandlerType {
*
*/
REJECT = 3,
/**
*
*/
REMINDER = 1,
}
// 用户任务的审批人为空时,处理类型枚举
@ -135,49 +135,49 @@ export enum AssignEmptyHandlerType {
*/
APPROVE = 1,
/**
*
*
*/
ASSIGN_ADMIN = 4,
REJECT = 2,
/**
*
*/
ASSIGN_USER = 3,
/**
*
*
*/
REJECT = 2,
ASSIGN_ADMIN = 4,
}
// 用户任务的审批人与发起人相同时,处理类型枚举
export enum AssignStartUserHandlerType {
/**
*
*
*/
ASSIGN_DEPT_LEADER = 3,
START_USER_AUDIT = 1,
/**
* 12
*/
SKIP = 2,
/**
*
*
*/
START_USER_AUDIT = 1,
ASSIGN_DEPT_LEADER = 3,
}
// 时间单位枚举
export enum TimeUnitType {
/**
*
*
*/
DAY = 3,
MINUTE = 1,
/**
*
*/
HOUR = 2,
/**
*
*
*/
MINUTE = 1,
DAY = 3,
}
/**
@ -202,14 +202,14 @@ export enum FieldPermissionType {
*
*/
export enum DelayTypeEnum {
/**
*
*/
FIXED_DATE_TIME = 2,
/**
*
*/
FIXED_TIME_DURATION = 1,
/**
*
*/
FIXED_DATE_TIME = 2,
}
/**
@ -217,35 +217,39 @@ export enum DelayTypeEnum {
*/
export enum TriggerTypeEnum {
/**
*
* HTTP
*/
FORM_DELETE = 11,
/**
*
*/
FORM_UPDATE = 10,
HTTP_REQUEST = 1,
/**
* HTTP
*/
HTTP_CALLBACK = 2,
/**
* HTTP
*
*/
HTTP_REQUEST = 1,
FORM_UPDATE = 10,
/**
*
*/
FORM_DELETE = 11,
}
export enum ChildProcessStartUserTypeEnum {
/**
*
*/
MAIN_PROCESS_START_USER = 1,
/**
*
*/
FROM_FORM = 2,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
*
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessStartUserEmptyTypeEnum {
/**
*
*/
@ -254,10 +258,6 @@ export enum ChildProcessStartUserEmptyTypeEnum {
*
*/
MAIN_PROCESS_ADMIN = 3,
/**
*
*/
MAIN_PROCESS_START_USER = 1,
}
export enum ChildProcessMultiInstanceSourceTypeEnum {
@ -265,54 +265,50 @@ export enum ChildProcessMultiInstanceSourceTypeEnum {
*
*/
FIXED_QUANTITY = 1,
/**
*
*/
MULTIPLE_FORM = 3,
/**
*
*/
NUMBER_FORM = 2,
/**
*
*/
MULTIPLE_FORM = 3,
}
// 候选人策略枚举 用于审批节点。抄送节点 )
export enum CandidateStrategy {
/**
*
*
*/
APPROVE_USER_SELECT = 34,
/**
*
*/
DEPT_LEADER = 21,
ROLE = 10,
/**
*
*/
DEPT_MEMBER = 20,
/**
*
*
*/
EXPRESSION = 60,
/**
*
*/
FORM_DEPT_LEADER = 51,
/**
*
*/
FORM_USER = 50,
/**
*
*/
MULTI_LEVEL_DEPT_LEADER = 23,
DEPT_LEADER = 21,
/**
*
*/
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_SELECT = 35,
/**
*
*/
USER = 30,
/**
*
*/
USER_GROUP = 40,
/**
*
*/
FORM_USER = 50,
/**
*
*/
FORM_DEPT_LEADER = 51,
/**
*
*/
EXPRESSION = 60,
}
export enum BpmHttpRequestParamTypeEnum {

View File

@ -3,7 +3,7 @@
* - @ mention
*/
// @ts-ignore TinyMCE 全局或通过打包器提供
// TinyMCE 全局或通过打包器提供
import type { Editor } from 'tinymce';
export interface MentionItem {

View File

@ -9,7 +9,7 @@ const props = withDefaults(
defineProps<{
bpmnXml?: string;
loading?: boolean; //
modelView?: Object;
modelView?: object;
}>(),
{
loading: false,
@ -29,7 +29,7 @@ watch(
async (newModelView) => {
//
if (newModelView) {
// @ts-ignore
// @ts-expect-error
view.value = newModelView;
}
},

View File

@ -9,7 +9,7 @@ import { getDictLabel } from '@vben/hooks';
import { useUserStore } from '@vben/stores';
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 { getProcessInstancePrintData } from '#/api/bpm/processInstance';

Some files were not shown because too many files have changed in this diff Show More