fix(lint): add ts-expect-error descriptions
parent
8daf9a3ce5
commit
cb98b3a47e
|
|
@ -22,7 +22,7 @@ import {
|
|||
|
||||
import { Button, ButtonGroup, message, Modal, Tooltip } from 'ant-design-vue';
|
||||
// 模拟流转流程
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: token simulation package does not ship compatible types
|
||||
import tokenSimulation from 'bpmn-js-token-simulation';
|
||||
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
||||
// 代码高亮插件
|
||||
|
|
@ -132,7 +132,7 @@ const emit = defineEmits([
|
|||
'element-click',
|
||||
]);
|
||||
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: file input ref is set imperatively by the template
|
||||
const bpmnCanvas = ref();
|
||||
const refFile = ref();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ watch(
|
|||
val +=
|
||||
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
||||
}
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: async component registry is indexed dynamically
|
||||
customConfigComponent.value = (
|
||||
CustomConfigMap as Record<string, { component: Component }>
|
||||
)[val]?.component;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ watch(
|
|||
() => props.type,
|
||||
() => {
|
||||
if (props.type) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: installed task component map is indexed dynamically
|
||||
witchTaskComponent.value = installedComponent[props.type].component;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const initCallActivity = () => {
|
|||
|
||||
// 初始化所有配置项
|
||||
Object.keys(formData.value).forEach((key: string) => {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: form state is updated through dynamic schema keys
|
||||
formData.value[key] =
|
||||
bpmnElement.value.businessObject[key] ??
|
||||
formData.value[key as keyof FormData];
|
||||
|
|
|
|||
|
|
@ -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: tree ref instance type is provided by the UI library at runtime
|
||||
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-expect-error
|
||||
// @ts-expect-error: expression strategy stores a scalar in an array-shaped field
|
||||
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-expect-error
|
||||
// @ts-expect-error: dynamic candidate param shape varies by strategy
|
||||
userTaskForm.value.candidateParam = +candidateParamStr;
|
||||
deptLevel.value = +candidateParamStr;
|
||||
} else if (
|
||||
|
|
@ -303,7 +304,7 @@ const openProcessExpressionDialog = async () => {
|
|||
const selectProcessExpression = (
|
||||
expression: BpmProcessExpressionApi.ProcessExpression,
|
||||
) => {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: modal helper exposes runtime methods outside static typing
|
||||
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-expect-error
|
||||
// @ts-expect-error: modal helper exposes runtime methods outside static typing
|
||||
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
||||
}
|
||||
updateElementTask();
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
|||
// 当前节点
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
||||
// 触发器表单配置
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const readonly = inject<boolean>('readonly');
|
|||
const currentNode = useWatchNode(props);
|
||||
|
||||
/** 节点名称编辑 */
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.COPY_TASK_NODE,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
|||
// 监控节点变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.START_USER_NODE,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
|||
// 监控节点变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.USER_TASK_NODE,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ watch(
|
|||
async (newModelView) => {
|
||||
// 加载最新
|
||||
if (newModelView) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: viewer instance type is broader than local ref typing
|
||||
view.value = newModelView;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ const nodeTypeName = ref('审批'); // 节点类型名称
|
|||
|
||||
const reasonRequire = ref();
|
||||
const approveFormRef = ref<FormInstance>(); // 审批通过意见表单
|
||||
// @ts-expect-error: template ref is retained for future provider expansion
|
||||
const approveSignFormRef = ref();
|
||||
const nextAssigneesActivityNode = ref<BpmProcessInstanceApi.ApprovalNodeInfo[]>(
|
||||
[],
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||
modalApi.lock();
|
||||
try {
|
||||
formData.value = await getTenant(data.id);
|
||||
// @ts-expect-error 特殊:https://gitee.com/yudaocode/yudao-ui-admin-vben/issues/ID43CX
|
||||
// @ts-expect-error: special-case workaround for yudao-ui-admin-vben issue ID43CX
|
||||
formData.value.expireTime = String(formData.value.expireTime);
|
||||
// 设置到 values
|
||||
await formApi.setValues(formData.value);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import {
|
|||
} from '@vben/icons';
|
||||
|
||||
// 模拟流转流程
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: token simulation package does not ship compatible types
|
||||
import tokenSimulation from 'bpmn-js-token-simulation';
|
||||
import BpmnModeler from 'bpmn-js/lib/Modeler';
|
||||
import {
|
||||
|
|
@ -139,7 +139,7 @@ const emit = defineEmits([
|
|||
'element-click',
|
||||
]);
|
||||
|
||||
//@ts-expect-error unused-imports/no-unused-vars
|
||||
// @ts-expect-error: file input ref is set imperatively by the template
|
||||
const bpmnCanvas = ref();
|
||||
const refFile = ref();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ watch(
|
|||
val +=
|
||||
props.businessObject.eventDefinitions[0]?.$type.split(':')[1] || '';
|
||||
}
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: async component registry is indexed dynamically
|
||||
customConfigComponent.value = (
|
||||
CustomConfigMap as Record<string, { component: Component }>
|
||||
)[val]?.component;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ watch(
|
|||
() => props.type,
|
||||
() => {
|
||||
if (props.type) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: installed task component map is indexed dynamically
|
||||
witchTaskComponent.value = installedComponent[props.type].component;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const initCallActivity = () => {
|
|||
|
||||
// 初始化所有配置项
|
||||
Object.keys(formData.value).forEach((key: string) => {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: form state is updated through dynamic schema keys
|
||||
formData.value[key] =
|
||||
bpmnElement.value.businessObject[key] ??
|
||||
formData.value[key as keyof FormData];
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const bpmnInstances = () => (window as any)?.bpmnInstances;
|
|||
|
||||
const resetTaskForm = () => {
|
||||
for (const key in defaultTaskForm.value) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: form state is updated through dynamic schema keys
|
||||
scriptTaskForm.value[key] =
|
||||
bpmnElement.value?.businessObject[
|
||||
key as keyof typeof defaultTaskForm.value
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const deptTreeOptions = ref<any>(); // 部门树
|
|||
const postOptions = ref<SystemPostApi.Post[]>([]); // 岗位列表
|
||||
const userOptions = ref<SystemUserApi.User[]>([]); // 用户列表
|
||||
const userGroupOptions = ref<BpmUserGroupApi.UserGroup[]>([]); // 用户组列表
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: tree ref instance type is provided by the UI library at runtime
|
||||
const treeRef = ref<any>();
|
||||
|
||||
const { formFieldOptions } = useFormFieldsPermission(FieldPermissionType.READ);
|
||||
|
|
@ -129,7 +129,7 @@ const resetTaskForm = () => {
|
|||
// eslint-disable-next-line unicorn/prefer-switch
|
||||
if (userTaskForm.value.candidateStrategy === CandidateStrategy.EXPRESSION) {
|
||||
// 特殊:流程表达式,只有一个 input 输入框
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: expression strategy stores a scalar in an array-shaped field
|
||||
userTaskForm.value.candidateParam = [candidateParamStr];
|
||||
} else if (
|
||||
userTaskForm.value.candidateStrategy ===
|
||||
|
|
@ -153,7 +153,7 @@ const resetTaskForm = () => {
|
|||
userTaskForm.value.candidateStrategy ===
|
||||
CandidateStrategy.START_USER_MULTI_LEVEL_DEPT_LEADER
|
||||
) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: dynamic candidate param shape varies by strategy
|
||||
userTaskForm.value.candidateParam = +candidateParamStr;
|
||||
deptLevel.value = +candidateParamStr;
|
||||
} else if (
|
||||
|
|
@ -304,7 +304,7 @@ const openProcessExpressionDialog = async () => {
|
|||
const selectProcessExpression = (
|
||||
expression: BpmProcessExpressionApi.ProcessExpression,
|
||||
) => {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: modal helper exposes runtime methods outside static typing
|
||||
userTaskForm.value.candidateParam = [expression.expression];
|
||||
updateElementTask();
|
||||
};
|
||||
|
|
@ -312,7 +312,7 @@ const selectProcessExpression = (
|
|||
const handleFormUserChange = (e: any) => {
|
||||
if (e === 'PROCESS_START_USER_ID') {
|
||||
userTaskForm.value.candidateParam = [];
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: modal helper exposes runtime methods outside static typing
|
||||
userTaskForm.value.candidateStrategy = CandidateStrategy.START_USER;
|
||||
}
|
||||
updateElementTask();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
|||
const currentNode = useWatchNode(props);
|
||||
|
||||
// 节点名称
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||
useNodeName(BpmNodeTypeEnum.COPY_TASK_NODE);
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ defineExpose({ showCopyTaskNodeConfig }); // 暴露方法给父组件
|
|||
:data="deptTreeOptions"
|
||||
:props="{
|
||||
label: 'name',
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: dynamic node config access is narrower than runtime shape
|
||||
value: 'id',
|
||||
children: 'children',
|
||||
}"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
|
|||
// 当前节点
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { nodeName, showInput, clickIcon, changeNodeName, inputRef } =
|
||||
useNodeName(BpmNodeTypeEnum.TRIGGER_NODE);
|
||||
// 触发器表单配置
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const readonly = inject<boolean>('readonly');
|
|||
const currentNode = useWatchNode(props);
|
||||
|
||||
/** 节点名称编辑 */
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.CHILD_PROCESS_NODE,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.COPY_TASK_NODE,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.DELAY_TIMER_NODE,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.ROUTER_BRANCH_NODE,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
|||
// 监控节点变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.START_USER_NODE,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const readonly = inject<boolean>('readonly');
|
|||
// 监控节点的变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.TRIGGER_NODE,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const tasks = inject<Ref<any[]>>('tasks', ref([]));
|
|||
// 监控节点变化
|
||||
const currentNode = useWatchNode(props);
|
||||
// 节点名称编辑
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: composable typing does not preserve this node schema exactly
|
||||
const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2(
|
||||
currentNode,
|
||||
BpmNodeTypeEnum.USER_TASK_NODE,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ watch(
|
|||
async (newModelView) => {
|
||||
// 加载最新
|
||||
if (newModelView) {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error: viewer instance type is broader than local ref typing
|
||||
view.value = newModelView;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue