diff --git a/src/components/DeptSelectForm/index.vue b/src/components/DeptSelectForm/index.vue index 140f49562..099ab42fe 100644 --- a/src/components/DeptSelectForm/index.vue +++ b/src/components/DeptSelectForm/index.vue @@ -87,7 +87,7 @@ const open = async (selectedList?: DeptApi.DeptVO[]) => { } /** 处理选中状态变化 */ -const handleCheck = (data: any, checked: any) => { +const handleCheck = (_data: any, _checked: any) => { selectedDeptIds.value = treeRef.value.getCheckedKeys() if (!props.multiple && selectedDeptIds.value.length > 1) { // 单选模式下,只保留最后选择的节点 diff --git a/src/components/DiyEditor/index.vue b/src/components/DiyEditor/index.vue index 48052061c..8263511b5 100644 --- a/src/components/DiyEditor/index.vue +++ b/src/components/DiyEditor/index.vue @@ -201,7 +201,6 @@ import { propTypes } from '@/utils/propTypes' defineOptions({ name: 'DiyPageDetail' }) // 左侧组件库 -const componentLibrary = ref() // 页面设置组件 const pageConfigComponent = ref>(cloneDeep(PAGE_CONFIG_COMPONENT)) // 顶部导航栏 diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue index eabf485e1..1eda64dab 100644 --- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue +++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue @@ -118,7 +118,6 @@ provide('startDeptIds', props.startDeptIds) provide('tasks', []) provide('processInstance', {}) -const message = useMessage() // 国际化 const processNodeTree = ref() provide('processNodeTree', processNodeTree) const errorDialogVisible = ref(false) @@ -230,7 +229,5 @@ onMounted(async () => { } }) -const simpleProcessModelRef = ref() - defineExpose({}) diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 96fe1bc70..1f56561ad 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -68,7 +68,7 @@ diff --git a/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue index f9cb9ac46..592c1b3bd 100644 --- a/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue +++ b/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue @@ -18,7 +18,6 @@ const props = defineProps({ } }) -const bpmnInstances = () => (window as any)?.bpmnInstances const customConfigComponent = ref(null) watch( diff --git a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue index 2359aff67..0ec2ad853 100644 --- a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue +++ b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue @@ -235,30 +235,8 @@ const props = defineProps({ type: String }) const prefix = inject('prefix') -const width = inject('width') const formKey = ref(undefined) -const businessKey = ref('') -const optionModelTitle = ref('') -const fieldList = ref([]) -const formFieldForm = ref({}) -const fieldType = ref({ - long: '长整型', - string: '字符串', - boolean: '布尔类', - date: '日期类', - enum: '枚举类', - custom: '自定义类型' -}) -const formFieldIndex = ref(-1) // 编辑中的字段, -1 为新增 -const formFieldOptionIndex = ref(-1) // 编辑中的字段配置项, -1 为新增 -const fieldModelVisible = ref(false) -const fieldOptionModelVisible = ref(false) -const fieldOptionForm = ref({}) // 当前激活的字段配置项数据 -const fieldOptionType = ref('') // 当前激活的字段配置项弹窗 类型 -const fieldEnumList = ref([]) // 枚举值列表 -const fieldConstraintsList = ref([]) // 约束条件列表 -const fieldPropertiesList = ref([]) // 绑定属性列表 const bpmnELement = ref() const elExtensionElements = ref() const formData = ref() @@ -280,17 +258,11 @@ const resetFormList = () => { elExtensionElements.value.values.filter((ex) => ex.$type === `${prefix}:FormData`)?.[0] || bpmnInstances().moddle.create(`${prefix}:FormData`, { fields: [] }) - // 业务标识 businessKey, 绑定在 formData 中 - businessKey.value = formData.value.businessKey - // 保留剩余扩展元素,便于后面更新该元素对应属性 otherExtensions.value = elExtensionElements.value.values.filter( (ex) => ex.$type !== `${prefix}:FormData` ) - // 复制原始值,填充表格 - fieldList.value = JSON.parse(JSON.stringify(formData.value.fields || [])) - // 更新元素扩展属性,避免后续报错 updateElementExtensions() } @@ -299,155 +271,6 @@ const updateElementFormKey = () => { formKey: formKey.value }) } -const updateElementBusinessKey = () => { - bpmnInstances().modeling.updateModdleProperties(toRaw(bpmnELement.value), formData.value, { - businessKey: businessKey.value - }) -} -// 根据类型调整字段type -const changeFieldTypeType = (type) => { - // this.$set(this.formFieldForm, "type", type === "custom" ? "" : type); - formFieldForm.value['type'] = type === 'custom' ? '' : type -} - -// 打开字段详情侧边栏 -const openFieldForm = (field, index) => { - formFieldIndex.value = index - if (index !== -1) { - const FieldObject = formData.value.fields[index] - formFieldForm.value = JSON.parse(JSON.stringify(field)) - // 设置自定义类型 - // this.$set(this.formFieldForm, "typeType", !this.fieldType[field.type] ? "custom" : field.type); - formFieldForm.value['typeType'] = !fieldType.value[field.type] ? 'custom' : field.type - // 初始化枚举值列表 - field.type === 'enum' && - (fieldEnumList.value = JSON.parse(JSON.stringify(FieldObject?.values || []))) - // 初始化约束条件列表 - fieldConstraintsList.value = JSON.parse( - JSON.stringify(FieldObject?.validation?.constraints || []) - ) - // 初始化自定义属性列表 - fieldPropertiesList.value = JSON.parse(JSON.stringify(FieldObject?.properties?.values || [])) - } else { - formFieldForm.value = {} - // 初始化枚举值列表 - fieldEnumList.value = [] - // 初始化约束条件列表 - fieldConstraintsList.value = [] - // 初始化自定义属性列表 - fieldPropertiesList.value = [] - } - fieldModelVisible.value = true -} -// 打开字段 某个 配置项 弹窗 -const openFieldOptionForm = (option, index, type) => { - fieldOptionModelVisible.value = true - fieldOptionType.value = type - formFieldOptionIndex.value = index - if (type === 'property') { - fieldOptionForm.value = option ? JSON.parse(JSON.stringify(option)) : {} - return (optionModelTitle.value = '属性配置') - } - if (type === 'enum') { - fieldOptionForm.value = option ? JSON.parse(JSON.stringify(option)) : {} - return (optionModelTitle.value = '枚举值配置') - } - fieldOptionForm.value = option ? JSON.parse(JSON.stringify(option)) : {} - return (optionModelTitle.value = '约束条件配置') -} - -// 保存字段 某个 配置项 -const saveFieldOption = () => { - if (formFieldOptionIndex.value === -1) { - if (fieldOptionType.value === 'property') { - fieldPropertiesList.value.push(fieldOptionForm.value) - } - if (fieldOptionType.value === 'constraint') { - fieldConstraintsList.value.push(fieldOptionForm.value) - } - if (fieldOptionType.value === 'enum') { - fieldEnumList.value.push(fieldOptionForm.value) - } - } else { - fieldOptionType.value === 'property' && - fieldPropertiesList.value.splice(formFieldOptionIndex.value, 1, fieldOptionForm.value) - fieldOptionType.value === 'constraint' && - fieldConstraintsList.value.splice(formFieldOptionIndex.value, 1, fieldOptionForm.value) - fieldOptionType.value === 'enum' && - fieldEnumList.value.splice(formFieldOptionIndex.value, 1, fieldOptionForm.value) - } - fieldOptionModelVisible.value = false - fieldOptionForm.value = {} -} -// 保存字段配置 -const saveField = () => { - const { id, type, label, defaultValue, datePattern } = formFieldForm.value - const Field = bpmnInstances().moddle.create(`${prefix}:FormField`, { id, type, label }) - defaultValue && (Field.defaultValue = defaultValue) - datePattern && (Field.datePattern = datePattern) - // 构建属性 - if (fieldPropertiesList.value && fieldPropertiesList.value.length) { - const fieldPropertyList = fieldPropertiesList.value.map((fp) => { - return bpmnInstances().moddle.create(`${prefix}:Property`, { - id: fp.id, - value: fp.value - }) - }) - Field.properties = bpmnInstances().moddle.create(`${prefix}:Properties`, { - values: fieldPropertyList - }) - } - // 构建校验规则 - if (fieldConstraintsList.value && fieldConstraintsList.value.length) { - const fieldConstraintList = fieldConstraintsList.value.map((fc) => { - return bpmnInstances().moddle.create(`${prefix}:Constraint`, { - name: fc.name, - config: fc.config - }) - }) - Field.validation = bpmnInstances().moddle.create(`${prefix}:Validation`, { - constraints: fieldConstraintList - }) - } - // 构建枚举值 - if (fieldEnumList.value && fieldEnumList.value.length) { - Field.values = fieldEnumList.value.map((fe) => { - return bpmnInstances().moddle.create(`${prefix}:Value`, { name: fe.name, id: fe.id }) - }) - } - // 更新数组 与 表单配置实例 - if (formFieldIndex.value === -1) { - fieldList.value.push(formFieldForm.value) - formData.value.fields.push(Field) - } else { - fieldList.value.splice(formFieldIndex.value, 1, formFieldForm.value) - formData.value.fields.splice(formFieldIndex.value, 1, Field) - } - updateElementExtensions() - fieldModelVisible.value = false -} - -// 移除某个 字段的 配置项 -const removeFieldOptionItem = (option, index, type) => { - // console.log(option, 'option') - if (type === 'property') { - fieldPropertiesList.value.splice(index, 1) - return - } - if (type === 'enum') { - fieldEnumList.value.splice(index, 1) - return - } - fieldConstraintsList.value.splice(index, 1) -} -// 移除 字段 -const removeField = (field, index) => { - console.log(field, 'field') - fieldList.value.splice(index, 1) - formData.value.fields.splice(index, 1) - updateElementExtensions() -} - const updateElementExtensions = () => { // 更新回扩展元素 const newElExtensionElements = bpmnInstances().moddle.create(`bpmn:ExtensionElements`, { diff --git a/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue b/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue index ea0e90f50..0e7097b5f 100644 --- a/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue +++ b/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue @@ -116,56 +116,11 @@ const props = defineProps({ }) const prefix = inject('prefix') const loopCharacteristics = ref('') -//默认配置,用来覆盖原始不存在的选项,避免报错 -const defaultLoopInstanceForm = ref({ - completionCondition: '', - loopCardinality: '', - extensionElements: [], - asyncAfter: false, - asyncBefore: false, - exclusive: false -}) const loopInstanceForm = ref({}) const bpmnElement = ref(null) const multiLoopInstance = ref(null) const bpmnInstances = () => (window as any)?.bpmnInstances -const getElementLoop = (businessObject) => { - if (!businessObject.loopCharacteristics) { - loopCharacteristics.value = 'Null' - loopInstanceForm.value = {} - return - } - if (businessObject.loopCharacteristics.$type === 'bpmn:StandardLoopCharacteristics') { - loopCharacteristics.value = 'StandardLoop' - loopInstanceForm.value = {} - return - } - if (businessObject.loopCharacteristics.isSequential) { - loopCharacteristics.value = 'SequentialMultiInstance' - } else { - loopCharacteristics.value = 'ParallelMultiInstance' - } - // 合并配置 - loopInstanceForm.value = { - ...defaultLoopInstanceForm.value, - ...businessObject.loopCharacteristics, - completionCondition: businessObject.loopCharacteristics?.completionCondition?.body ?? '', - loopCardinality: businessObject.loopCharacteristics?.loopCardinality?.body ?? '' - } - // 保留当前元素 businessObject 上的 loopCharacteristics 实例 - multiLoopInstance.value = bpmnInstances().bpmnElement.businessObject.loopCharacteristics - // 更新表单 - if ( - businessObject.loopCharacteristics.extensionElements && - businessObject.loopCharacteristics.extensionElements.values && - businessObject.loopCharacteristics.extensionElements.values.length - ) { - loopInstanceForm.value['timeCycle'] = - businessObject.loopCharacteristics.extensionElements.values[0].body - } -} - const changeLoopCharacteristicsType = (type) => { // this.loopInstanceForm = { ...this.defaultLoopInstanceForm }; // 切换类型取消原表单配置 // 取消多实例配置 diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue index 6d8268b58..8f7a1604c 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue @@ -164,7 +164,6 @@ const outVariableList = ref() const variableType = ref() // 参数类型 const editingVariableIndex = ref(-1) // 编辑参数下标 const variableDialogVisible = ref(false) -const varialbeFormRef = ref() const varialbeFormData = ref({ source: '', target: '' diff --git a/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue b/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue index 753e3b241..e8654016f 100644 --- a/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue +++ b/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue @@ -9,14 +9,14 @@ {{ val }} 类型: - + 时间 持续 - + 循环 @@ -128,7 +128,6 @@ import { ref, computed, watch, onMounted } from 'vue' import { CircleCheckFilled, WarningFilled, QuestionFilled } from '@element-plus/icons-vue' import DurationConfig from './DurationConfig.vue' import CycleConfig from './CycleConfig.vue' -import { createListenerObject, updateElementExtensions } from '../../utils' const bpmnInstances = () => (window as any).bpmnInstances const props = defineProps({ businessObject: Object }) const type = ref('time') @@ -139,7 +138,6 @@ const showDurationDialog = ref(false) const showCycleDialog = ref(false) const showHelp = ref(false) const dateValue = ref(null) -const bpmnElement = ref(null) const placeholder = computed(() => { if (type.value === 'time') return '请输入时间' diff --git a/src/layout/components/AppView.vue b/src/layout/components/AppView.vue index df720a111..4b5695545 100644 --- a/src/layout/components/AppView.vue +++ b/src/layout/components/AppView.vue @@ -7,10 +7,6 @@ defineOptions({ name: 'AppView' }) const appStore = useAppStore() -const layout = computed(() => appStore.getLayout) - -const fixedHeader = computed(() => appStore.getFixedHeader) - const footer = computed(() => appStore.getFooter) const tagsViewStore = useTagsViewStore() @@ -19,8 +15,6 @@ const getCaches = computed((): string[] => { return tagsViewStore.getCachedViews }) -const tagsView = computed(() => appStore.getTagsView) - //region 无感刷新 const routerAlive = ref(true) // 无感刷新,防止出现页面闪烁白屏 diff --git a/src/layout/components/UserInfo/src/components/LockPage.vue b/src/layout/components/UserInfo/src/components/LockPage.vue index f309fa455..1a6e85706 100644 --- a/src/layout/components/UserInfo/src/components/LockPage.vue +++ b/src/layout/components/UserInfo/src/components/LockPage.vue @@ -1,5 +1,4 @@