ผู้ถูกร้องเรียน
This commit is contained in:
parent
97fde66a79
commit
62ad5673c6
5 changed files with 31 additions and 8 deletions
|
|
@ -46,7 +46,7 @@ const typeOps = ref<typeOp[]>([
|
||||||
|
|
||||||
/** รับค่ามาจาก หน้าหลัก */
|
/** รับค่ามาจาก หน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
checkId: {
|
mainData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: [],
|
||||||
},
|
},
|
||||||
|
|
@ -118,8 +118,9 @@ async function searchInput() {
|
||||||
.post(config.API.searchPersonal(), body)
|
.post(config.API.searchPersonal(), body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
console.log(data)
|
||||||
const list = data.map((e: ResponsePreson) => ({
|
const list = data.map((e: ResponsePreson) => ({
|
||||||
personId: e.personId,
|
id: e.personId,
|
||||||
idcard: e.idcard,
|
idcard: e.idcard,
|
||||||
prefix: e.prefix,
|
prefix: e.prefix,
|
||||||
firstName: e.firstName,
|
firstName: e.firstName,
|
||||||
|
|
@ -145,10 +146,17 @@ async function searchInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** update เมื่อเปลี่ยน option */
|
/** update เมื่อเปลี่ยน option */
|
||||||
function updateSelect() {
|
function updateSelect() {
|
||||||
search.value = "";
|
search.value = "";
|
||||||
}
|
}
|
||||||
|
watch(()=>props.mainData,()=>{
|
||||||
|
if(props.mainData){
|
||||||
|
console.log('mainData',props.mainData)
|
||||||
|
selected.value = props.mainData
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -214,7 +222,7 @@ function updateSelect() {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="mainStore.columnsRespondent"
|
:columns="mainStore.columnsRespondent"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="personId"
|
row-key="idcard"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
:paging="true"
|
:paging="true"
|
||||||
|
|
|
||||||
|
|
@ -984,7 +984,7 @@ onMounted(() => {
|
||||||
<!-- Popup ผู้ถูกร้องเรียน -->
|
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:checkId="mainStore.rowsAdd"
|
:mainData="mainStore.rowsAdd"
|
||||||
:modal="modal"
|
:modal="modal"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
|
|
|
||||||
|
|
@ -1303,7 +1303,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<DialogAddPersonal
|
<DialogAddPersonal
|
||||||
title="ผู้ถูกร้องเรียน"
|
title="ผู้ถูกร้องเรียน"
|
||||||
:checkId="mainStore.rowsAdd"
|
:mainData="mainStore.rowsAdd"
|
||||||
:modal="modalPerson"
|
:modal="modalPerson"
|
||||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||||
:close="toggleModal"
|
:close="toggleModal"
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,20 @@ interface ListData {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ArrayPerson {
|
interface ArrayPerson {
|
||||||
|
id:string
|
||||||
|
idcard:string
|
||||||
|
name:string
|
||||||
|
prefix:string
|
||||||
|
firstName:string
|
||||||
|
lastName:string
|
||||||
|
posNo:string
|
||||||
|
position:string
|
||||||
|
positionLevel:string
|
||||||
|
salary:number|null
|
||||||
|
organization:string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ArrayPersonAdd {
|
||||||
personId:string
|
personId:string
|
||||||
idcard:string
|
idcard:string
|
||||||
name:string
|
name:string
|
||||||
|
|
@ -24,8 +38,9 @@ interface ArrayPerson {
|
||||||
salary:number|null
|
salary:number|null
|
||||||
organization:string
|
organization:string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ocListType{
|
interface ocListType{
|
||||||
organizationId:string
|
organizationId:string
|
||||||
organizationName:string
|
organizationName:string
|
||||||
}
|
}
|
||||||
export type { ListData,ArrayPerson,ocListType };
|
export type { ListData,ArrayPerson,ocListType,ArrayPersonAdd };
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type { ArrayPerson } from "@/modules/11_discipline/interface/response/investigate";
|
import type { ArrayPerson, ArrayPersonAdd } from "@/modules/11_discipline/interface/response/investigate";
|
||||||
|
|
||||||
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
/** option ผู้ถูกสอบสวน*/
|
/** option ผู้ถูกสอบสวน*/
|
||||||
|
|
@ -278,6 +278,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
rowsAdd.value = data;
|
rowsAdd.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
complainantoptionsMain,
|
complainantoptionsMain,
|
||||||
convertFault,
|
convertFault,
|
||||||
|
|
@ -292,7 +293,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
||||||
visibleColumnsDirector,
|
visibleColumnsDirector,
|
||||||
rowsAdd,
|
rowsAdd,
|
||||||
fetchData,
|
fetchData,
|
||||||
|
|
||||||
statusResultOptions,
|
statusResultOptions,
|
||||||
convertStatusResult,
|
convertStatusResult,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue