diff --git a/src/components/BpmnDesign/panel/TaskPanel.vue b/src/components/BpmnDesign/panel/TaskPanel.vue index 90851ee..f4efa18 100644 --- a/src/components/BpmnDesign/panel/TaskPanel.vue +++ b/src/components/BpmnDesign/panel/TaskPanel.vue @@ -48,9 +48,9 @@ - - 选择角色 - + + 选择角色 + @@ -74,6 +74,32 @@ + + +
+ +
+
+ + +
+ +
+
@@ -92,11 +118,6 @@ - - - - - @@ -109,7 +130,7 @@ import DueDate from '@/components/BpmnDesign/panel/property/DueDate.vue'; import { Element, Modeler } from 'bpmn'; import { TaskPanel } from 'bpmnDesign'; import { AuditUserTypeEnum, MultipleUserAuditTypeEnum, SpecifyDescEnum } from '@/enums/bpmn/IndexEnums'; -import { Checked, InfoFilled } from '@element-plus/icons-vue'; +import { BellFilled, Checked, InfoFilled } from '@element-plus/icons-vue'; interface PropType { modeler: Modeler; diff --git a/src/components/BpmnDesign/panel/property/DueDate.vue b/src/components/BpmnDesign/panel/property/DueDate.vue index af3fc64..24c84ac 100644 --- a/src/components/BpmnDesign/panel/property/DueDate.vue +++ b/src/components/BpmnDesign/panel/property/DueDate.vue @@ -82,7 +82,46 @@ const customMonthValue = ref(1); const hourValueConst = ['4', '8', '12', '24']; const dayAndWeekAndMonthValueConst = ['1', '2', '3', '4']; -const initValue = () => {}; +const initValue = () => { + formValue.value = prop.modelValue; + if (prop.modelValue) { + const lastStr = prop.modelValue.substring(prop.modelValue.length - 1); + if (lastStr === 'H') { + const hourValueValue = prop.modelValue.substring(2, prop.modelValue.length - 1); + if (hourValueConst.includes(hourValueValue)) { + hourValue.value = hourValueValue; + } else { + hourValue.value = '自定义'; + customHourValue.value = Number(hourValueValue); + } + } + const dayAndWeekAndMonthValue = prop.modelValue.substring(1, prop.modelValue.length - 1); + if (lastStr === 'D') { + if (dayAndWeekAndMonthValueConst.includes(dayAndWeekAndMonthValue)) { + dayValue.value = dayAndWeekAndMonthValue; + } else { + dayValue.value = '自定义'; + customDayValue.value = Number(dayAndWeekAndMonthValue); + } + } + if (lastStr === 'W') { + if (dayAndWeekAndMonthValueConst.includes(dayAndWeekAndMonthValue)) { + weekValue.value = dayAndWeekAndMonthValue; + } else { + weekValue.value = '自定义'; + customWeekValue.value = Number(dayAndWeekAndMonthValue); + } + } + if (lastStr === 'M') { + if (dayAndWeekAndMonthValueConst.includes(dayAndWeekAndMonthValue)) { + monthValue.value = dayAndWeekAndMonthValue; + } else { + monthValue.value = '自定义'; + customMonthValue.value = Number(dayAndWeekAndMonthValue); + } + } + } +}; const confirm = () => { // 深拷贝赋值更新modelValue @@ -91,7 +130,6 @@ const confirm = () => { }; const customHourValueChange = (customHourValue) => { - valueType.value = 'H'; formValue.value = `PT${customHourValue}H`; dayValue.value = ''; @@ -102,7 +140,6 @@ const customHourValueChange = (customHourValue) => { customMonthValue.value = 1; }; const customDayValueChange = (customDayValue) => { - valueType.value = 'D'; formValue.value = `P${customDayValue}D`; hourValue.value = ''; weekValue.value = ''; @@ -114,7 +151,6 @@ const customDayValueChange = (customDayValue) => { }; const customWeekValueChange = (customWeekValue) => { - valueType.value = 'W'; formValue.value = `P${customWeekValue}W`; hourValue.value = ''; dayValue.value = ''; @@ -126,7 +162,6 @@ const customWeekValueChange = (customWeekValue) => { }; const customMonthValueChange = (customMonthValue) => { - valueType.value = 'M'; formValue.value = `P${customMonthValue}M`; hourValue.value = ''; dayValue.value = ''; @@ -138,7 +173,6 @@ const customMonthValueChange = (customMonthValue) => { }; const hourChange = (hourValue) => { - valueType.value = 'H'; if (hourValue === '自定义') { formValue.value = `PT${customHourValue.value}H`; } else { @@ -153,7 +187,6 @@ const hourChange = (hourValue) => { customMonthValue.value = 1; }; const dayChange = (dayValue) => { - valueType.value = 'D'; if (dayValue === '自定义') { formValue.value = `P${customDayValue.value}D`; } else { @@ -169,7 +202,6 @@ const dayChange = (dayValue) => { customMonthValue.value = 1; }; const weekChange = (weekValue) => { - valueType.value = 'W'; if (weekValue === '自定义') { formValue.value = `P${customWeekValue.value}W`; } else { @@ -185,7 +217,6 @@ const weekChange = (weekValue) => { customMonthValue.value = 1; }; const monthChange = (monthValue) => { - valueType.value = 'M'; if (monthValue === '自定义') { formValue.value = `P${customMonthValue.value}M`; } else { diff --git a/src/components/RoleSelect/index.vue b/src/components/RoleSelect/index.vue index e69de29..6fc3453 100644 --- a/src/components/RoleSelect/index.vue +++ b/src/components/RoleSelect/index.vue @@ -0,0 +1,197 @@ + + + diff --git a/src/components/UserSelect/index.vue b/src/components/UserSelect/index.vue index db6476b..54a11d0 100644 --- a/src/components/UserSelect/index.vue +++ b/src/components/UserSelect/index.vue @@ -1,108 +1,100 @@