api workflow

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-17 11:23:28 +07:00
parent a6c7981fd8
commit 825d99e22e
3 changed files with 73 additions and 24 deletions

View file

@ -22,14 +22,7 @@ const { stateId, fetchData } = defineProps({
/** table*/
const selected = ref<any[]>([]);
const rows = ref<any[]>([
{
fullName: "นายศรัณย์ ศิลาดี",
position: "นักบริหาร",
posType: "บริหาร(สูง)",
organization: "",
},
]);
const rows = ref<any[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "fullName",
@ -37,6 +30,9 @@ const columns = ref<QTableProps["columns"]>([
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -49,15 +45,15 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posType",
align: "left",
label: "ประเภทตำแหน่ง",
sortable: true,
field: "posType",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
// {
// name: "posType",
// align: "left",
// label: "",
// sortable: true,
// field: "posType",
// headerStyle: "font-size: 14px",
// style: "font-size: 14px",
// },
{
name: "organization",
align: "left",
@ -73,7 +69,20 @@ const isAcceptSetting = ref<boolean>(false);
const isApproveSetting = ref<boolean>(false);
const isReasonSetting = ref<boolean>(false);
function fetchLists() {}
async function fetchLists() {
showLoader();
await http
.get(config.API.workflow + `commander`)
.then(async (res) => {
rows.value = res.data.result;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
function onSubmit() {
dialogConfirm($q, async () => {