ตำแหน่ง/เงินเดือน >>ต้นแบบเอกสารอ้างอิง
This commit is contained in:
parent
f8804e3b73
commit
7056b31aa3
3 changed files with 11 additions and 17 deletions
|
|
@ -15,26 +15,18 @@ const positionId = defineModel<string>("positionId", { required: true });
|
|||
const seletcId = defineModel<string>("seletcId", { required: true });
|
||||
const date = defineModel<Date>("datePos", { required: true });
|
||||
const positionData = defineModel<any>("position", { required: true });
|
||||
// const props = defineProps({
|
||||
// position: {
|
||||
// type: Array(),
|
||||
// require: true,
|
||||
// },
|
||||
// });
|
||||
|
||||
// const positionId = ref<string>("");
|
||||
const filters = ref<string>("");
|
||||
const rowsPosition = ref<Positions[]>([]);
|
||||
|
||||
async function onClickSelectPos(id: string) {
|
||||
positionId.value = id;
|
||||
selected.value = [];
|
||||
|
||||
const position: DataPositionNo = positionData.value.find(
|
||||
(e: DataPositionNo) => e.id === id
|
||||
);
|
||||
if (position) {
|
||||
rowsPosition.value = await position.positions;
|
||||
rowsPosition.value = position.positions;
|
||||
if (seletcId.value) {
|
||||
selected.value = rowsPosition.value.filter(
|
||||
(e) => e.id === seletcId.value
|
||||
|
|
@ -200,10 +192,8 @@ onMounted(async () => {
|
|||
showLoader();
|
||||
setTimeout(async () => {
|
||||
await onClickSelectPos(positionId.value);
|
||||
await setTimeout(() => {
|
||||
hideLoader();
|
||||
}, 500);
|
||||
}, 500);
|
||||
await hideLoader();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue