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