Merge branch 'develop' into dev-tee
This commit is contained in:
commit
bfaf2bfccc
5 changed files with 43 additions and 43 deletions
|
|
@ -92,7 +92,6 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
||||
{
|
||||
name: "insigniaType",
|
||||
align: "left",
|
||||
|
|
@ -175,7 +174,6 @@ const Note = ref<string>("");
|
|||
const titleModal = ref<string>("");
|
||||
const actionModal = ref<string>("");
|
||||
const person = ref<any>([]);
|
||||
|
||||
const props = defineProps({
|
||||
tab: {
|
||||
type: String,
|
||||
|
|
@ -192,12 +190,11 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
if (DataStore.typeOc == "") {
|
||||
organization.value = DataStore.optionsTypeOc[2].id;
|
||||
DataStore.typeOc = organization.value;
|
||||
} else organization.value = DataStore.typeOc;
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
organization.value = organizationOptions.value[2].id;
|
||||
DataStore.typeOc = organization.value;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
props.fecthInsigniaByOc(
|
||||
|
|
@ -218,6 +215,7 @@ const changtypeOc = () => {
|
|||
props.tab
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
};
|
||||
const clickmodalAdd = () => {
|
||||
showLoader();
|
||||
|
|
@ -324,8 +322,8 @@ const addlistperson = async (id: string) => {
|
|||
// modalNote.value = true;
|
||||
// };
|
||||
const clickmodalEdit = (props: any) => {
|
||||
insignia.value = "";
|
||||
insigniaType.value = "";
|
||||
insignia.value = props.insigniaSend;
|
||||
insigniaType.value = props.insigniaLevel;
|
||||
person.value = props;
|
||||
console.log(person.value);
|
||||
modalEdit.value = true;
|
||||
|
|
@ -616,9 +614,8 @@ const paginationLabel2 = (start: string, end: string, total: string) => {
|
|||
{{ props.row.level }}
|
||||
</q-td>
|
||||
<q-td key="salary" :props="props">
|
||||
{{ props.row.salary }}
|
||||
{{ Number(props.row.salary).toLocaleString() }}
|
||||
</q-td>
|
||||
|
||||
<q-td key="insigniaType" :props="props">
|
||||
{{ props.row.insigniaType }}
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
organization.value = organizationOptions.value[0].id;
|
||||
DataStore.typeOc = organization.value;
|
||||
organization.value = DataStore.typeOc;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
|
|
@ -158,6 +157,7 @@ const changtypeOc = () => {
|
|||
props.tab
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -129,8 +129,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
onMounted(async () => {
|
||||
organizationOptions.value = DataStore.optionsTypeOc;
|
||||
organization.value = organizationOptions.value[0].id;
|
||||
DataStore.typeOc = organization.value;
|
||||
organization.value = DataStore.typeOc;
|
||||
// if (props.fecthInsigniaAll) {
|
||||
// await props.fecthInsigniaAll(props.roundId, props.tab);
|
||||
// }
|
||||
|
|
@ -154,6 +153,7 @@ const changtypeOc = () => {
|
|||
props.tab
|
||||
);
|
||||
}
|
||||
DataStore.typeOc = organization.value;
|
||||
};
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const fecthlistRound = async () => {
|
|||
year: e.period_year,
|
||||
name: `รอบการเสนอพระราชทานเครื่องราช ${e.period_name} ปี ${e.period_year} `,
|
||||
}));
|
||||
console.log(optionRound.value);
|
||||
// console.log(optionRound.value);
|
||||
// const lastIndex = optionRound.value.length;
|
||||
const lastValue = optionRound.value[0];
|
||||
round.value = lastValue.id.toString();
|
||||
|
|
@ -95,21 +95,21 @@ const changround = () => {
|
|||
fecthStat(round.value);
|
||||
fecthInsigniaByOc(round.value, DataStore.typeOc, "officer", tab.value);
|
||||
};
|
||||
const fecthInsigniaAll = async (periodId: string, tab: string) => {
|
||||
// let data: any = [];
|
||||
// for (const item of DataStore.optionsTypeOc) {
|
||||
// await http
|
||||
// .get(config.API.insigniaList(periodId, item["id"], "officer", tab))
|
||||
// .then((res) => {
|
||||
// // console.log(res);
|
||||
// data.push(res.data.result);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
// }
|
||||
// console.log(data);
|
||||
};
|
||||
// const fecthInsigniaAll = async (periodId: string, tab: string) => {
|
||||
// // let data: any = [];
|
||||
// // for (const item of DataStore.optionsTypeOc) {
|
||||
// // await http
|
||||
// // .get(config.API.insigniaList(periodId, item["id"], "officer", tab))
|
||||
// // .then((res) => {
|
||||
// // // console.log(res);
|
||||
// // data.push(res.data.result);
|
||||
// // })
|
||||
// // .catch((err) => {
|
||||
// // console.log(err);
|
||||
// // });
|
||||
// // }
|
||||
// // console.log(data);
|
||||
// };
|
||||
const fecthInsigniaByOc = async (
|
||||
roundId: string,
|
||||
ocId: string,
|
||||
|
|
@ -204,7 +204,6 @@ const fecthInsigniaByOc = async (
|
|||
<tab1
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
|
@ -212,7 +211,6 @@ const fecthInsigniaByOc = async (
|
|||
<tab2
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
|
@ -220,7 +218,6 @@ const fecthInsigniaByOc = async (
|
|||
<tab3
|
||||
:tab="tab"
|
||||
:roundId="round"
|
||||
:fecthInsigniaAll="fecthInsigniaAll"
|
||||
:fecthInsigniaByOc="fecthInsigniaByOc"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
name: e.fullName,
|
||||
position: e.position,
|
||||
level: e.rank,
|
||||
salary2: e.salary,
|
||||
salary: Number(e.salary).toLocaleString(),
|
||||
salary: e.salary,
|
||||
salary2: Number(e.salary).toLocaleString(),
|
||||
insigniaType: e.lastInsignia,
|
||||
insigniaSend: e.requestInsignia,
|
||||
insigniaLevel: e.level,
|
||||
|
|
@ -41,13 +41,19 @@ export const useInsigniaDataStore = defineStore("insignia", () => {
|
|||
}
|
||||
const filtertypeInsignia = async () => {
|
||||
typeinsignia.value = "all"
|
||||
for (const data of listinsignia.value) {
|
||||
const Type = data.insigniaType;
|
||||
if (Type !== null && !typeinsigniaValues.has(Type)) {
|
||||
typeinsigniaOptions.value.push({ id: Type, name: Type })
|
||||
typeinsigniaValues.add(Type);
|
||||
}
|
||||
}
|
||||
if (listinsignia.value.length !== 0) {
|
||||
const double_name = [
|
||||
...new Set(listinsignia.value.map((item: any) => item.insigniaType)),
|
||||
];
|
||||
for (let i = 1; i <= double_name.length; i++) {
|
||||
const type = double_name[i - 1];
|
||||
const listtype = {
|
||||
id: type,
|
||||
name: type,
|
||||
};
|
||||
typeinsigniaOptions.value.push(listtype)
|
||||
}
|
||||
} else typeinsigniaOptions.value = [{ id: "all", name: "ทั้งหมด" }]
|
||||
};
|
||||
const searchFilterTable = async () => {
|
||||
if (typeinsignia.value !== undefined && typeinsignia.value !== null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue