UI แต่งตั้งคณะกรรมการทดลองงาน

This commit is contained in:
setthawutttty 2024-10-18 16:48:27 +07:00
parent 8dadcb450a
commit 3728587c4e
7 changed files with 470 additions and 96 deletions

View file

@ -30,6 +30,10 @@ const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
commandTypeCode: String, //
persons: Array, // array
notPerson: {
type: Boolean,
default: false,
},
});
const commandOp = ref<ListCommand[]>([]); //
@ -166,9 +170,10 @@ function createCommand(isRedirect: boolean) {
commandYear: commandYear.value,
commandNo: commandNo.value,
commandTypeId: commandType.value,
persons: data,
persons: !props.notPerson ? data : [],
};
console.log(body);
await http
.post(config.API.command + `/person`, body)
.then(async (res) => {
@ -263,6 +268,7 @@ async function fetchCommandType() {
(v: ListCommand) => v.code == props.commandTypeCode
);
commandType.value = commandOp.value[0].id;
console.log("🚀 ~ fetchCommandType ~ commandType.value:", commandType.value)
}
/**