diff --git a/src/components/Workflow/DialogSelectPerson.vue b/src/components/Workflow/DialogSelectPerson.vue index 192e5da25..5fbfa7362 100644 --- a/src/components/Workflow/DialogSelectPerson.vue +++ b/src/components/Workflow/DialogSelectPerson.vue @@ -18,6 +18,7 @@ const modal = defineModel("modal", { required: true }); const props = defineProps({ stateId: { type: String, require: true }, fetchData: { type: Function, require: true }, + type: { type: String, require: true }, }); /** table*/ @@ -72,7 +73,7 @@ const isReasonSetting = ref(false); async function fetchLists() { showLoader(); await http - .get(config.API.workflow + `commander`) + .get(config.API.workflow + `commander/${props.type}`) .then(async (res) => { rows.value = res.data.result; }) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index bc166e9b4..a9b3d173b 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -16,7 +16,10 @@ const $q = useQuasar(); const { dialogConfirm, showLoader, hideLoader, messageError } = useCounterMixin(); -const { id, sysName } = defineProps({ +const isCheckData = defineModel("isCheckData", { + default: true, +}); +const props = defineProps({ id: { type: String, require: true }, sysName: { type: String, require: true }, }); @@ -38,12 +41,13 @@ const itemState = ref([]); const modalSelectPerson = ref(false); const modalApprove = ref(false); +const typeSelectPerson = ref(""); async function fetchCheckState() { await http .post(config.API.workflow + `check-user-now`, { - refId: id, - system: sysName, + refId: props.id, + system: props.sysName, }) .then(async (res) => { await fetchData(); @@ -71,8 +75,8 @@ async function fetchCheckState() { async function fetchData() { await http .post(config.API.workflow + `check-state-all`, { - refId: id, - system: sysName, + refId: props.id, + system: props.sysName, }) .then(async (res) => { const data = await res.data.result; @@ -88,8 +92,8 @@ function onChangeState() { showLoader(); await http .post(config.API.workflow + `state-next`, { - refId: id, - system: sysName, + refId: props.id, + system: props.sysName, }) .then(async () => { await fetchCheckState(); @@ -115,7 +119,7 @@ defineExpose({