Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me
This commit is contained in:
commit
8459c9bc93
2 changed files with 21 additions and 18 deletions
|
|
@ -117,7 +117,7 @@ const rows = ref<any>([
|
|||
]);
|
||||
const filter = ref<string>("");
|
||||
watch(modal, () => {
|
||||
console.log(props);
|
||||
// console.log(props);
|
||||
|
||||
if (modal.value === true) {
|
||||
retireld.value = props.retireld;
|
||||
|
|
@ -137,7 +137,7 @@ const fecthlistRetire = async () => {
|
|||
.get(config.API.profileOrganizRoot)
|
||||
.then((res) => {
|
||||
const id = res.data.result[0].id;
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
if (id !== "") {
|
||||
findlist(id);
|
||||
}
|
||||
|
|
@ -152,20 +152,20 @@ const findlist = async (id: string) => {
|
|||
if (type.value === "officer") {
|
||||
data = [{ criteriaType: "is_retire", criteriaValue: "false" }];
|
||||
} else if (type.value === "all") {
|
||||
console.log("all");
|
||||
// console.log("all");
|
||||
data = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "employee_class", criteriaValue: "perm" },
|
||||
];
|
||||
}
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
|
||||
await http
|
||||
.post(config.API.profileSearchNewOcIdType(id, type.value), {
|
||||
criterias: data,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res.data.result);
|
||||
// console.log(res.data.result);
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
|
|
@ -182,13 +182,15 @@ const findlist = async (id: string) => {
|
|||
});
|
||||
};
|
||||
const clickAdd = (props: any) => {
|
||||
console.log(retireld.value, id);
|
||||
// console.log("props===>",props.row.id)
|
||||
if (retireld.value == undefined) {
|
||||
retireld.value = id;
|
||||
}
|
||||
|
||||
let data: any = props.row.id;
|
||||
|
||||
console.log("retireld & profileId",retireld.value, data);
|
||||
|
||||
$q.dialog({
|
||||
title: "ยืนยันการเพิ่มข้อมูล",
|
||||
message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
||||
|
|
|
|||
|
|
@ -62,8 +62,7 @@ const fecthlist = async (id: any) => {
|
|||
await http
|
||||
.get(config.API.listRetire(id))
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
retireld.value = res.data.result.id;
|
||||
// retireld.value = res.data.result.id;
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
id: e.id,
|
||||
profileId: e.profileId,
|
||||
|
|
@ -332,9 +331,11 @@ const visibleNote = computed(() => {
|
|||
}
|
||||
});
|
||||
|
||||
const UpdateListId = async (retireld: string, pId: string) => {
|
||||
const UpdateListId = (retireld: string, pId: string) => {
|
||||
profileId.value = pId
|
||||
await fecthlist(retireld)
|
||||
fecthlist(retireld)
|
||||
console.log("profileId",profileId.value);
|
||||
|
||||
};
|
||||
// const saveList = () => {
|
||||
// $q.dialog({
|
||||
|
|
@ -363,15 +364,15 @@ const UpdateListId = async (retireld: string, pId: string) => {
|
|||
// .onCancel(() => {})
|
||||
// .onDismiss(() => {});
|
||||
// };
|
||||
const classrow = (prop: any) => {
|
||||
if (prop.profileId === profileId.value) {
|
||||
return "color: #26a69a; border: 1px solid #26a69a;";
|
||||
} else return "";
|
||||
};
|
||||
// const classrow = (prop: any) => {
|
||||
// if (profileId.value!=='' && prop.profileId === profileId.value) {
|
||||
// return "color: #26a69a;";
|
||||
// } else return "";
|
||||
// };
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "order",
|
||||
descending: true,
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 10,
|
||||
});
|
||||
|
|
@ -401,7 +402,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<AddList
|
||||
:retireld="retireld"
|
||||
:profile-id="profileId"
|
||||
:update-list-id="UpdateListId"
|
||||
:UpdateListId="UpdateListId"
|
||||
/>
|
||||
<!-- <q-btn flat round color="blue-12" icon="save" @click="saveList">
|
||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||
|
|
@ -493,7 +494,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-tr
|
||||
:props="props"
|
||||
class="cursor-pointer"
|
||||
:style="classrow(props.row)"
|
||||
:style="props.row.profileId === profileId && 'color: #26a69a;'"
|
||||
>
|
||||
<q-td key="order" :props="props">{{ props.row.order }} </q-td>
|
||||
<q-td key="fixname" :props="props">{{ props.row.fixname }}</q-td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue