Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: รายการประเภทตำแหน่ง: ปรับแก้ไขส่งค่าผิด,แก้Get ปรับการแสดงผลฟอร์มเพิ่ม/แก้ไขตำแหน่งของข้าราชการ โครงสร้างอัตรากำลัง => คัดลอกตำแหน่ง
This commit is contained in:
commit
c1b837e47e
7 changed files with 136 additions and 69 deletions
|
|
@ -20,8 +20,10 @@ export default {
|
||||||
/** position*/
|
/** position*/
|
||||||
orgPosPosition: `${orgPos}/position`,
|
orgPosPosition: `${orgPos}/position`,
|
||||||
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
|
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
|
||||||
|
orgPosPositionExecutive : () => `${orgPos}/position/executive`,
|
||||||
orgPosExecutive: `${orgPos}/executive`,
|
orgPosExecutive: `${orgPos}/executive`,
|
||||||
orgPosType: `${orgPos}/type`,
|
orgPosType: `${orgPos}/type`,
|
||||||
|
orgPosTypeId: (id: string) => `${orgPos}/type/${id}`,
|
||||||
orgPosLevel: `${orgPos}/level`,
|
orgPosLevel: `${orgPos}/level`,
|
||||||
orgPosMaster: `${orgPos}/master`,
|
orgPosMaster: `${orgPos}/master`,
|
||||||
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
|
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import type { QInput, QTableProps } from "quasar";
|
import type { QInput, QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { usePositionDataStore } from "@/modules/01_metadataNew/stores/positionListStore";
|
import { usePositionDataStore } from "@/modules/01_metadataNew/stores/positionListStore";
|
||||||
import { useMainOptionDataStore } from "@/modules/01_metadataNew/stores/main";
|
import { useMainOptionDataStore } from "@/modules/01_metadataNew/stores/main";
|
||||||
import { usePositionTypeDataStore } from "@/modules/01_metadataNew/stores/positionTypeStore";
|
import { usePositionTypeDataStore } from "@/modules/01_metadataNew/stores/positionTypeStore";
|
||||||
|
|
@ -133,6 +133,7 @@ const posLevelAuthority = ref<string>("");
|
||||||
const posLevelNameRef = ref<QInput | null>(null);
|
const posLevelNameRef = ref<QInput | null>(null);
|
||||||
const posLevelRankRef = ref<QInput | null>(null);
|
const posLevelRankRef = ref<QInput | null>(null);
|
||||||
const posTypeIdRef = ref<QInput | null>(null);
|
const posTypeIdRef = ref<QInput | null>(null);
|
||||||
|
const posLevelAuthorityRef = ref<QInput | null>(null);
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"posTypeName",
|
"posTypeName",
|
||||||
|
|
@ -144,9 +145,10 @@ const visibleColumns = ref<string[]>([
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgPosLevel)
|
.get(config.API.orgPosTypeId(id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
store.save(res.data.result, id.value);
|
posName.value = res.data.result.posTypeName;
|
||||||
|
store.save(res.data.result.posLevels);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -221,6 +223,7 @@ function validateForm() {
|
||||||
posLevelNameRef.value?.validate();
|
posLevelNameRef.value?.validate();
|
||||||
posLevelRankRef.value?.validate();
|
posLevelRankRef.value?.validate();
|
||||||
posTypeIdRef.value?.validate();
|
posTypeIdRef.value?.validate();
|
||||||
|
posLevelAuthorityRef.value?.validate();
|
||||||
onSubmit();
|
onSubmit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -238,28 +241,7 @@ async function onSubmit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchName() {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.get(config.API.orgPosType)
|
|
||||||
.then(async (res) => {
|
|
||||||
storeName.save(res.data.result);
|
|
||||||
storeName.row.forEach((e) => {
|
|
||||||
if (e.id === id.value) {
|
|
||||||
posName.value = e.posTypeName ? e.posTypeName : "";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
messageError($q, err);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetchName();
|
|
||||||
fetchData();
|
fetchData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -348,11 +330,18 @@ onMounted(async () => {
|
||||||
@click.stop="
|
@click.stop="
|
||||||
() => {
|
() => {
|
||||||
dialogStatus = 'edit';
|
dialogStatus = 'edit';
|
||||||
dialog = true;
|
|
||||||
editId = props.row.id;
|
editId = props.row.id;
|
||||||
posLevelName = props.row.posLevelName;
|
posLevelName = props.row.posLevelName;
|
||||||
posLevelRank = props.row.posLevelRank;
|
posLevelRank = props.row.posLevelRank;
|
||||||
posLevelAuthority = props.row.posLevelAuthority;
|
if (props.row.posLevelAuthority === 'หัวหน้าหน่วยงาน') {
|
||||||
|
posLevelAuthority = 'HEAD';
|
||||||
|
} else if (props.row.posLevelAuthority === 'ปลัด') {
|
||||||
|
posLevelAuthority = 'DEPUTY';
|
||||||
|
} else {
|
||||||
|
posLevelAuthority = 'GOVERNOR';
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog = true;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -424,6 +413,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-select
|
<q-select
|
||||||
|
ref="posLevelAuthorityRef"
|
||||||
outlined
|
outlined
|
||||||
v-model="posLevelAuthority"
|
v-model="posLevelAuthority"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -433,6 +423,7 @@ onMounted(async () => {
|
||||||
label="ผู้มีอำนาจสั่งบรรจุ"
|
label="ผู้มีอำนาจสั่งบรรจุ"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || 'กรุณาเลือกผู้มีอำนาจสั่งบรรจุ']"
|
||||||
borderless
|
borderless
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
|
||||||
|
|
@ -288,19 +288,6 @@ function close() {
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งในสายงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งในสายงาน'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
|
||||||
<q-input
|
|
||||||
ref="positionExecutiveFieldRef"
|
|
||||||
v-model="formPositionSelect.positionExecutiveField"
|
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
for="#positionExecutiveField"
|
|
||||||
label="ด้านทางการบริหาร"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
ref="positionAreaRef"
|
ref="positionAreaRef"
|
||||||
|
|
@ -314,7 +301,6 @@ function close() {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
ref="positionFieldRef"
|
ref="positionFieldRef"
|
||||||
|
|
@ -329,7 +315,6 @@ function close() {
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกสายงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกสายงาน'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-select
|
<q-select
|
||||||
ref="positionTypeRef"
|
ref="positionTypeRef"
|
||||||
|
|
@ -386,9 +371,22 @@ function close() {
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<q-input
|
||||||
|
ref="positionExecutiveFieldRef"
|
||||||
|
v-model="formPositionSelect.positionExecutiveField"
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
for="#positionExecutiveField"
|
||||||
|
label="ด้านทางการบริหาร"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-6 self-center">
|
<div class="col-6 self-center">
|
||||||
<q-checkbox size="md" v-model="isSpecial" label="ฉ" />
|
<q-checkbox size="md" v-model="isSpecial" label="เฉพาะสายงานที่กำหนด" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const { date2Thai } = useCounterMixin();
|
||||||
export const usePositionDataStore = defineStore("PositionData", () => {
|
export const usePositionDataStore = defineStore("PositionData", () => {
|
||||||
const pathLocation = ref<string>("list_position");
|
const pathLocation = ref<string>("list_position");
|
||||||
const row = ref<DataRow[]>([]);
|
const row = ref<DataRow[]>([]);
|
||||||
function save(data: DataResponse[], id: string) {
|
function save(data: DataResponse[]) {
|
||||||
const list = data.map((e) => ({
|
const list = data.map((e) => ({
|
||||||
...e,
|
...e,
|
||||||
posTypes: undefined,
|
posTypes: undefined,
|
||||||
|
|
@ -26,7 +26,7 @@ export const usePositionDataStore = defineStore("PositionData", () => {
|
||||||
? storeOption.posLevelAuthorityConvert(e.posLevelAuthority)
|
? storeOption.posLevelAuthorityConvert(e.posLevelAuthority)
|
||||||
: "-",
|
: "-",
|
||||||
})) satisfies DataRow[];
|
})) satisfies DataRow[];
|
||||||
row.value = list.filter((e) => e.posTypeId === id);
|
row.value = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ import type {
|
||||||
DataPosition,
|
DataPosition,
|
||||||
} from "@/modules/02_organizationalNew/interface/response/organizational";
|
} from "@/modules/02_organizationalNew/interface/response/organizational";
|
||||||
|
|
||||||
|
const posExecutive = ref<string>("");
|
||||||
const isSpecial = ref<boolean>(false);
|
const isSpecial = ref<boolean>(false);
|
||||||
|
const shape = ref<string>("false");
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
emitSearch: Function,
|
emitSearch: Function,
|
||||||
getData: Function,
|
getData: Function,
|
||||||
|
|
@ -109,19 +111,33 @@ function saveSelectEdit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
const dataExecutive = shape.value == "false" ? formPositionSelect.positionExecutive:posExecutive.value
|
||||||
|
const url =
|
||||||
|
shape.value == "false"
|
||||||
|
? config.API.orgPosPositionById(formPositionSelect.positionId)
|
||||||
|
: config.API.orgPosPositionExecutive()+`/${formPositionSelect.positionId}`;
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = shape.value == "false" ?{
|
||||||
posDictName: formPositionSelect.positionName,
|
posDictName: formPositionSelect.positionName,
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutiveId: formPositionSelect.positionExecutive, //ตำแหน่งทางการบริหาร
|
posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
};
|
}:{
|
||||||
|
posDictName: formPositionSelect.positionName,
|
||||||
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
|
posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
|
||||||
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
|
isSpecial: isSpecial.value,
|
||||||
|
}
|
||||||
await http
|
await http
|
||||||
.put(config.API.orgPosPositionById(formPositionSelect.positionId), body)
|
.put(url, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
|
|
||||||
|
|
@ -145,19 +161,33 @@ function onSubmitSelectEdit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
const dataExecutive = shape.value == "false" ? formPositionSelect.positionExecutive:posExecutive.value
|
||||||
|
const url =
|
||||||
|
shape.value == "false"
|
||||||
|
? config.API.orgPosPosition
|
||||||
|
: config.API.orgPosPositionExecutive();
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = shape.value == "false" ?{
|
||||||
posDictName: formPositionSelect.positionName,
|
posDictName: formPositionSelect.positionName,
|
||||||
posDictField: formPositionSelect.positionField, //สายงาน
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
posExecutiveId: formPositionSelect.positionExecutive, //ตำแหน่งทางการบริหาร
|
posExecutiveId: dataExecutive, //ตำแหน่งทางการบริหาร
|
||||||
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
isSpecial: isSpecial.value,
|
isSpecial: isSpecial.value,
|
||||||
};
|
}:{
|
||||||
|
posDictName: formPositionSelect.positionName,
|
||||||
|
posDictField: formPositionSelect.positionField, //สายงาน
|
||||||
|
posTypeId: formPositionSelect.positionType, //*ประเภทตำแหน่ง
|
||||||
|
posLevelId: formPositionSelect.positionLevel, //*ระดับตำแหน่ง
|
||||||
|
posExecutive: dataExecutive, //ตำแหน่งทางการบริหาร
|
||||||
|
posDictExecutiveField: formPositionSelect.positionExecutiveField, //ด้านทางการบริหาร
|
||||||
|
posDictArea: formPositionSelect.positionArea, //ด้าน/สาขา
|
||||||
|
isSpecial: isSpecial.value,
|
||||||
|
}
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosPosition, body)
|
.post(url, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
|
|
||||||
|
|
@ -314,20 +344,6 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
|
||||||
<q-input
|
|
||||||
ref="positionExecutiveFieldRef"
|
|
||||||
v-model="formPositionSelect.positionExecutiveField"
|
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
for="#positionExecutiveField"
|
|
||||||
label="ด้านทางการบริหาร"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-input
|
<q-input
|
||||||
ref="positionAreaRef"
|
ref="positionAreaRef"
|
||||||
|
|
@ -359,7 +375,6 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-select
|
<q-select
|
||||||
ref="positionTypeRef"
|
ref="positionTypeRef"
|
||||||
|
|
@ -406,8 +421,26 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12 self-center">
|
||||||
|
<q-radio
|
||||||
|
v-model="shape"
|
||||||
|
checked-icon="task_alt"
|
||||||
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
val="false"
|
||||||
|
label="เลือกจากรายการ"
|
||||||
|
/>
|
||||||
|
<q-radio
|
||||||
|
v-model="shape"
|
||||||
|
checked-icon="task_alt"
|
||||||
|
w
|
||||||
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
val="true"
|
||||||
|
label="เพิ่มใหม่"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<q-select
|
<q-select
|
||||||
|
v-if="shape == 'false'"
|
||||||
ref="positionExecutiveRef"
|
ref="positionExecutiveRef"
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
label="ตำแหน่งทางการบริหาร"
|
label="ตำแหน่งทางการบริหาร"
|
||||||
|
|
@ -423,10 +456,39 @@ watch(
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<q-input
|
||||||
|
v-else
|
||||||
|
ref="positionExecutiveFieldRef"
|
||||||
|
v-model="posExecutive"
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
for="#positionExecutiveField"
|
||||||
|
label="เพิ่มตำแหน่งทางการบริหาร"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<q-input
|
||||||
|
ref="positionExecutiveFieldRef"
|
||||||
|
v-model="formPositionSelect.positionExecutiveField"
|
||||||
|
:class="inputEdit(isReadonly)"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
for="#positionExecutiveField"
|
||||||
|
label="ด้านทางการบริหาร"
|
||||||
|
lazy-rules
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-6 self-center">
|
<div class="col-6 self-center">
|
||||||
<q-checkbox size="md" v-model="isSpecial" label="ฉ" />
|
<q-checkbox
|
||||||
|
size="md"
|
||||||
|
v-model="isSpecial"
|
||||||
|
label="เฉพาะสายงานที่กำหนด"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ function onSubmit() {
|
||||||
};
|
};
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
props.actionType === "ADD"
|
props.actionType === "ADD" || props.actionType === "COPY"
|
||||||
? await http
|
? await http
|
||||||
.post(config.API.orgPosMaster, body)
|
.post(config.API.orgPosMaster, body)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,12 @@ const listMenu = ref<ListMenu[]>([
|
||||||
type: "EDIT",
|
type: "EDIT",
|
||||||
color: "edit",
|
color: "edit",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "คัดลอก",
|
||||||
|
icon: "content_copy",
|
||||||
|
type: "COPY",
|
||||||
|
color: "blue-6",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "ลบ",
|
label: "ลบ",
|
||||||
icon: "delete",
|
icon: "delete",
|
||||||
|
|
@ -259,6 +265,12 @@ function onClickPosition(type: string, id: string) {
|
||||||
dialogPosition.value = !dialogPosition.value;
|
dialogPosition.value = !dialogPosition.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onClickCopyPosition(type: string, id: string) {
|
||||||
|
rowId.value = id ? id : "";
|
||||||
|
actionType.value = type;
|
||||||
|
dialogPosition.value = !dialogPosition.value;
|
||||||
|
}
|
||||||
|
|
||||||
const dialogDetail = ref<boolean>(false);
|
const dialogDetail = ref<boolean>(false);
|
||||||
const dataDetailPos = ref<DataPosition[]>([]);
|
const dataDetailPos = ref<DataPosition[]>([]);
|
||||||
/**
|
/**
|
||||||
|
|
@ -650,6 +662,8 @@ async function onClickDownloadReport(val: string, name: string) {
|
||||||
? onClickHistoryPos(props.row.id)
|
? onClickHistoryPos(props.row.id)
|
||||||
: item.type === 'INHERIT'
|
: item.type === 'INHERIT'
|
||||||
? onClickInherit(props.row.id)
|
? onClickInherit(props.row.id)
|
||||||
|
: item.type === 'COPY'
|
||||||
|
? onClickCopyPosition('COPY', props.row.id)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue