no message
This commit is contained in:
parent
d2a26cdf39
commit
d6c2fbbc8d
2 changed files with 12 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ const { messageError, success, showLoader, hideLoader } = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const type_params = route.params.type;
|
const type_params = route.params.type;
|
||||||
|
const id = route.params.id;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
retireld: String,
|
retireld: String,
|
||||||
listId: String,
|
listId: String,
|
||||||
|
|
@ -113,6 +114,8 @@ const rows = ref<any>([
|
||||||
]);
|
]);
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
watch(modal, () => {
|
watch(modal, () => {
|
||||||
|
console.log(props);
|
||||||
|
|
||||||
if (modal.value === true) {
|
if (modal.value === true) {
|
||||||
retireld.value = props.retireld;
|
retireld.value = props.retireld;
|
||||||
if (type_params === "officer") {
|
if (type_params === "officer") {
|
||||||
|
|
@ -179,7 +182,11 @@ const findlist = async (id: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const clickAdd = (props: any) => {
|
const clickAdd = (props: any) => {
|
||||||
console.log(props.row.id);
|
console.log(retireld.value, id);
|
||||||
|
if (retireld.value == undefined) {
|
||||||
|
retireld.value = id;
|
||||||
|
}
|
||||||
|
|
||||||
let data: any = props.row.id;
|
let data: any = props.row.id;
|
||||||
|
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
|
|
@ -194,7 +201,7 @@ const clickAdd = (props: any) => {
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
console.log("เพิ่มข้อมูล");
|
console.log("เพิ่มข้อมูล");
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileRetire(data), { profileId: data })
|
.put(config.API.profileRetire(retireld.value), { profileId: data })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
updateListId(data);
|
updateListId(data);
|
||||||
|
|
@ -203,7 +210,7 @@ const clickAdd = (props: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
fecthlistRetire();
|
// fecthlistRetire();
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ const fecthlist = async (id: any) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.listRetire(id))
|
.get(config.API.listRetire(id))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
// console.log(res);
|
console.log(res);
|
||||||
retireld.value = res.data.result.id;
|
retireld.value = res.data.result.id;
|
||||||
rows.value = res.data.result.map((e: any) => ({
|
rows.value = res.data.result.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
|
|
@ -366,7 +366,7 @@ const UpdateListId = (newListId: string) => {
|
||||||
// .onDismiss(() => {});
|
// .onDismiss(() => {});
|
||||||
// };
|
// };
|
||||||
const classrow = (prop: any) => {
|
const classrow = (prop: any) => {
|
||||||
console.log(listId.value);
|
console.log(prop.id);
|
||||||
if (prop.id === listId.value) {
|
if (prop.id === listId.value) {
|
||||||
return "color: #26a69a ";
|
return "color: #26a69a ";
|
||||||
} else return "";
|
} else return "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue