ผู้ถูกร้องเรียน
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({
|
||||
checkId: {
|
||||
mainData: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
|
|
@ -118,8 +118,9 @@ async function searchInput() {
|
|||
.post(config.API.searchPersonal(), body)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
console.log(data)
|
||||
const list = data.map((e: ResponsePreson) => ({
|
||||
personId: e.personId,
|
||||
id: e.personId,
|
||||
idcard: e.idcard,
|
||||
prefix: e.prefix,
|
||||
firstName: e.firstName,
|
||||
|
|
@ -145,10 +146,17 @@ async function searchInput() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/** update เมื่อเปลี่ยน option */
|
||||
function updateSelect() {
|
||||
search.value = "";
|
||||
}
|
||||
watch(()=>props.mainData,()=>{
|
||||
if(props.mainData){
|
||||
console.log('mainData',props.mainData)
|
||||
selected.value = props.mainData
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -214,7 +222,7 @@ function updateSelect() {
|
|||
ref="table"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
:rows="rows"
|
||||
row-key="personId"
|
||||
row-key="idcard"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
|
|
|
|||
|
|
@ -984,7 +984,7 @@ onMounted(() => {
|
|||
<!-- Popup ผู้ถูกร้องเรียน -->
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:checkId="mainStore.rowsAdd"
|
||||
:mainData="mainStore.rowsAdd"
|
||||
:modal="modal"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
|
|
|
|||
|
|
@ -1303,7 +1303,7 @@ onMounted(async () => {
|
|||
|
||||
<DialogAddPersonal
|
||||
title="ผู้ถูกร้องเรียน"
|
||||
:checkId="mainStore.rowsAdd"
|
||||
:mainData="mainStore.rowsAdd"
|
||||
:modal="modalPerson"
|
||||
btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน"
|
||||
:close="toggleModal"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,20 @@ interface ListData {
|
|||
}
|
||||
|
||||
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
|
||||
idcard:string
|
||||
name:string
|
||||
|
|
@ -24,8 +38,9 @@ interface ArrayPerson {
|
|||
salary:number|null
|
||||
organization:string
|
||||
}
|
||||
|
||||
interface ocListType{
|
||||
organizationId: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 { ref } from "vue";
|
||||
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", () => {
|
||||
/** option ผู้ถูกสอบสวน*/
|
||||
|
|
@ -278,6 +278,7 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
rowsAdd.value = data;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
complainantoptionsMain,
|
||||
convertFault,
|
||||
|
|
@ -292,7 +293,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => {
|
|||
visibleColumnsDirector,
|
||||
rowsAdd,
|
||||
fetchData,
|
||||
|
||||
statusResultOptions,
|
||||
convertStatusResult,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue