({
status: 'CREATED',
@@ -68,15 +89,9 @@ const columns = [
{
name: 'step',
align: 'center',
- label: 'general.numberOf',
+ label: 'flow.processStep',
field: 'step',
},
- {
- name: 'action',
- align: 'center',
- label: '',
- field: 'action',
- },
] satisfies QTableProps['columns'];
function triggerDialog(type: 'add' | 'edit' | 'view') {
@@ -132,6 +147,7 @@ async function changeStatus(id?: string, regisBId?: string) {
if (currWorkflowData.value) {
currWorkflowData.value.status = res.data.status;
}
+ await fetchWorkflowList();
}
}
@@ -189,35 +205,40 @@ async function submit() {
}
function assignFormData(workflowData: WorkflowTemplate) {
- currWorkflowData.value = workflowData;
- formDataWorkflow.value = {
- status: workflowData.status,
- name: workflowData.name,
- step: workflowData.step.map((s, i) => {
- userInTable.value[i] = { name: s.name, responsiblePerson: [] };
- s.responsiblePerson.forEach((p) => {
- userInTable.value[i].responsiblePerson.push({
- id: p.user.id,
- selectedImage: p.user.selectedImage,
- gender: p.user.gender,
- namePrefix: p.user.namePrefix,
- firstName: p.user.firstName,
- lastName: p.user.lastName,
- firstNameEN: p.user.firstNameEN,
- lastNameEN: p.user.lastNameEN,
- code: p.user.code,
+ currWorkflowData.value = JSON.parse(JSON.stringify(workflowData));
+ formDataWorkflow.value = JSON.parse(
+ JSON.stringify({
+ status: workflowData.status,
+ name: workflowData.name,
+ step: workflowData.step.map((s, i) => {
+ userInTable.value[i] = { name: s.name, responsiblePerson: [] };
+ s.responsiblePerson.forEach((p) => {
+ userInTable.value[i].responsiblePerson.push({
+ id: p.user.id,
+ selectedImage: p.user.selectedImage,
+ gender: p.user.gender,
+ namePrefix: p.user.namePrefix,
+ firstName: p.user.firstName,
+ lastName: p.user.lastName,
+ firstNameEN: p.user.firstNameEN,
+ lastNameEN: p.user.lastNameEN,
+ code: p.user.code,
+ });
});
- });
- return {
- id: s.id,
- name: s.name,
- detail: s.detail,
- value: s.value || [],
- responsiblePersonId: s.responsiblePerson.map((p) => p.userId),
- responsibleInstitution: s.responsibleInstitution,
- };
+ return {
+ id: s.id,
+ name: s.name,
+ detail: s.detail,
+ value: s.value.length > 0 ? JSON.parse(JSON.stringify(s.value)) : [],
+ responsiblePersonId: s.responsiblePerson.map((p) => p.userId),
+ responsibleInstitution: JSON.parse(
+ JSON.stringify(s.responsibleInstitution),
+ ),
+ attributes: JSON.parse(JSON.stringify(s.attributes)),
+ };
+ }),
}),
- };
+ );
registeredBranchId.value = workflowData.registeredBranchId;
}
@@ -309,10 +330,10 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
labelI18n
:branch="[
{
- icon: 'mdi-folder-outline',
+ icon: 'mdi-cogs',
count: pageState.total,
label: 'flow.title',
- color: 'red',
+ color: 'gray',
},
]"
:dark="$q.dark.isActive"
@@ -345,7 +366,7 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
@@ -356,7 +377,6 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
option-value="value"
option-label="label"
class="col"
- :class="{ 'offset-md-5': pageState.gridView }"
map-options
emit-value
:for="'field-select-status'"
@@ -367,6 +387,73 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
{ label: $t('general.inactive'), value: 'statusINACTIVE' },
]"
/>
+
+
+
+
+
+
+
+
+
@@ -393,10 +480,15 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
@@ -420,6 +512,7 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
})
}}
+
@@ -438,25 +531,57 @@ watch(() => pageState.inputSearch, fetchWorkflowList);
: ''
"
>
- {{ props.rowIndex + 1 }}
- {{ props.row.name }}
- {{ props.row.step.length }}
-
-
- {
- assignFormData(props.row);
- triggerDialog('view');
- }
+
+ {{ props.rowIndex + 1 }}
+
+
+
+
+ >
+
+
+
+
+ {{ props.row.name }}
+
+
+
+ {{ props.row.step.length }}
+
+
+ {
+ assignFormData(props.row);
+ triggerDialog('view');
+ }
+ "
+ />
pageState.inputSearch, fetchWorkflowList);