ui จัดการสิทธิ์
This commit is contained in:
parent
9c43465a7d
commit
9ce059949c
4 changed files with 308 additions and 1555 deletions
|
|
@ -1,15 +1,17 @@
|
||||||
|
/** user*/
|
||||||
const ListsPageUser = () => import("@/modules/02_users/views/listsUser.vue");
|
const ListsPageUser = () => import("@/modules/02_users/views/listsUser.vue");
|
||||||
const PageManagementRole = () =>
|
const PageManagementRole = () =>
|
||||||
import("@/modules/02_users/views/managementRoleUser.vue");
|
import("@/modules/02_users/views/managementRoleUser.vue");
|
||||||
|
|
||||||
|
/** role*/
|
||||||
const ListsPageRole = () => import("@/modules/02_users/views/listsRole.vue");
|
const ListsPageRole = () => import("@/modules/02_users/views/listsRole.vue");
|
||||||
// const RoleDetail = () => import("@/modules/02_users/views/detailRoleView.vue");
|
|
||||||
|
|
||||||
const PermissionPsge = () =>
|
|
||||||
import("@/modules/02_users/views/permissionsView.vue");
|
|
||||||
const ListsPage2Role = () =>
|
const ListsPage2Role = () =>
|
||||||
import("@/modules/02_users/views/permissionDetail.vue");
|
import("@/modules/02_users/views/permissionDetail.vue");
|
||||||
|
|
||||||
|
/** PermissionPage*/
|
||||||
|
const PermissionPage = () =>
|
||||||
|
import("@/modules/02_users/views/permissionsView.vue");
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/users",
|
path: "/users",
|
||||||
|
|
@ -62,7 +64,7 @@ export default [
|
||||||
{
|
{
|
||||||
path: "/permission",
|
path: "/permission",
|
||||||
name: "managePermission",
|
name: "managePermission",
|
||||||
component: PermissionPsge,
|
component: PermissionPage,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [7],
|
Key: [7],
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,4 @@
|
||||||
<<<<<<<< HEAD:src/modules/02_users/views/detailRoleView.vue
|
|
||||||
<script setup>
|
|
||||||
========
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
>>>>>>>> fc575094eec541671db6fffe19e04350fdb0ff54:src/modules/02_users/views/permissionDetail.vue
|
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import type { FormRole } from "@/modules/02_users/interface/request/Main";
|
import type { FormRole } from "@/modules/02_users/interface/request/Main";
|
||||||
|
|
@ -13,11 +9,7 @@ const formData = reactive<FormRole>({
|
||||||
description: "",
|
description: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
<<<<<<<< HEAD:src/modules/02_users/views/detailRoleView.vue
|
|
||||||
const columns = ref([]);
|
|
||||||
========
|
|
||||||
const columns = ref<any>([]);
|
const columns = ref<any>([]);
|
||||||
>>>>>>>> fc575094eec541671db6fffe19e04350fdb0ff54:src/modules/02_users/views/permissionDetail.vue
|
|
||||||
|
|
||||||
const systemLists = ref<any>([
|
const systemLists = ref<any>([
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, reactive, onMounted, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -23,14 +23,16 @@ const expanded = ref<string[]>([]);
|
||||||
const nodeId = ref<string>("");
|
const nodeId = ref<string>("");
|
||||||
|
|
||||||
/** Table*/
|
/** Table*/
|
||||||
/** columns*/
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ลำดับ",
|
label: "ลำดับ",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "no",
|
field: (row) =>
|
||||||
|
(reqMaster.page - 1) * reqMaster.pageSize +
|
||||||
|
posMaster.value.indexOf(row) +
|
||||||
|
1,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -39,7 +41,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เลขที่ตำแหน่ง",
|
label: "เลขที่ตำแหน่ง",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posMasterNo",
|
field: (row) =>
|
||||||
|
row.orgShortname +
|
||||||
|
(row.posMasterNoPrefix ? row.posMasterNoPrefix : "") +
|
||||||
|
(row.posMasterNo ? row.posMasterNo : "") +
|
||||||
|
(row.posMasterNoSuffix ? row.posMasterNoSuffix : ""),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -47,7 +53,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
name: "positionName",
|
name: "positionName",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ตำแหน่งในสายงาน",
|
label: "ตำแหน่งในสายงาน",
|
||||||
field: "positionName",
|
field: (row) => (row.isSit ? row.profilePosition : row.positionName),
|
||||||
sortable: false,
|
sortable: false,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
|
@ -57,7 +63,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ประเภทตำแหน่ง",
|
label: "ประเภทตำแหน่ง",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posTypeName",
|
field: (row) => (row.isSit ? row.profilePostype : row.posTypeName),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -66,7 +72,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระดับตำแหน่ง",
|
label: "ระดับตำแหน่ง",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "posLevelName",
|
field: (row) => (row.isSit ? row.profilePoslevel : row.posLevelName),
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -75,12 +81,17 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "คนครอง",
|
label: "คนครอง",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
field: "positionIsSelected",
|
field: (row) =>
|
||||||
|
store.typeOrganizational === "draft" && row.fullNameNextHolder !== null
|
||||||
|
? row.fullNameNextHolder
|
||||||
|
: store.typeOrganizational !== "draft" &&
|
||||||
|
row.fullNameCurrentHolder !== null
|
||||||
|
? row.fullNameCurrentHolder
|
||||||
|
: "ว่าง",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const columnsExpand = ref<QTableProps["columns"]>([
|
const columnsExpand = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -155,6 +166,18 @@ const columnsExpand = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const reqMaster = reactive<any>({
|
||||||
|
id: "",
|
||||||
|
type: 0,
|
||||||
|
isAll: false,
|
||||||
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
keyword: "",
|
||||||
|
revisionId: "",
|
||||||
|
});
|
||||||
|
const maxPage = ref<number>(0);
|
||||||
|
const totalRow = ref<number>(0);
|
||||||
|
const posMaster = ref<any[]>([]);
|
||||||
|
|
||||||
/** function เรียกข้อมูลโครงสร้าง แบบปัจุบันและ แบบร่าง*/
|
/** function เรียกข้อมูลโครงสร้าง แบบปัจุบันและ แบบร่าง*/
|
||||||
async function fetchOrganizationActive() {
|
async function fetchOrganizationActive() {
|
||||||
|
|
@ -202,11 +225,86 @@ async function fetchDataTree(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSelected(data: any) {
|
/**
|
||||||
console.log(data);
|
* function fetch ข้อรายการตำแหน่ง
|
||||||
nodeId.value = data.orgTreeId;
|
* @param id idTree
|
||||||
|
* @param level levelTree
|
||||||
|
*/
|
||||||
|
async function fetchDataTable(id: string, revisionId: string, level: number) {
|
||||||
|
showLoader();
|
||||||
|
reqMaster.id = id;
|
||||||
|
reqMaster.revisionId = revisionId;
|
||||||
|
reqMaster.type = level;
|
||||||
|
await http
|
||||||
|
.post(config.API.orgPosMasterList, reqMaster)
|
||||||
|
.then(async (res) => {
|
||||||
|
posMaster.value = [];
|
||||||
|
const dataMain: any = [];
|
||||||
|
maxPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||||
|
totalRow.value = res.data.result.total;
|
||||||
|
|
||||||
|
res.data.result.data.forEach((e: any) => {
|
||||||
|
const p = e.positions;
|
||||||
|
if (p.length !== 0) {
|
||||||
|
const a = p.find((el: any) => el.positionIsSelected === true);
|
||||||
|
const { id, ...rest } = a ? a : p[0];
|
||||||
|
const test = { ...e, ...rest };
|
||||||
|
dataMain.push(test);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
posMaster.value = dataMain;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
posMaster.value = [];
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateSelected(data: any) {
|
||||||
|
nodeId.value = data.orgTreeId;
|
||||||
|
fetchDataTable(data.orgTreeId, data.orgRevisionId, data.orgLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
const pagination = ref({
|
||||||
|
page: reqMaster.page,
|
||||||
|
rowsPerPage: reqMaster.pageSize,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* function updatePagination
|
||||||
|
* @param newPagination ข้อมูล Pagination ใหม่
|
||||||
|
*/
|
||||||
|
function updatePagination(newPagination: any) {
|
||||||
|
reqMaster.pageSize = newPagination.rowsPerPage;
|
||||||
|
reqMaster.page = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า*/
|
||||||
|
watch([() => reqMaster.pageSize], () => {
|
||||||
|
fetchDataTable(reqMaster.id, reqMaster.revisionId, reqMaster.type);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => store.typeOrganizational,
|
||||||
|
() => {
|
||||||
|
const id =
|
||||||
|
store.typeOrganizational === "current" ? store.activeId : store.draftId;
|
||||||
|
fetchDataTree(id);
|
||||||
|
posMaster.value = []
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => reqMaster.isAll,
|
||||||
|
() => {
|
||||||
|
reqMaster.page = 1;
|
||||||
|
fetchDataTable(reqMaster.id, reqMaster.revisionId, reqMaster.type);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchOrganizationActive();
|
fetchOrganizationActive();
|
||||||
});
|
});
|
||||||
|
|
@ -318,284 +416,207 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-9 q-pa-md row">
|
<div class="col-xs-12 col-sm-9 q-pa-md row">
|
||||||
<div class="col-12 row">
|
<div class="col-12">
|
||||||
<!-- TABLE -->
|
<!-- TOOLBAR -->
|
||||||
<div class="col-12">
|
<q-toolbar style="padding: 0">
|
||||||
<d-table
|
<q-space />
|
||||||
ref="table"
|
<div class="row q-gutter-md">
|
||||||
:columns="columns"
|
<div>
|
||||||
:rows="posMaster"
|
<q-checkbox
|
||||||
:paging="true"
|
keep-color
|
||||||
row-key="id"
|
v-model="reqMaster.isAll"
|
||||||
flat
|
label="แสดงตำแหน่งทั้งหมด"
|
||||||
bordered
|
color="primary"
|
||||||
dense
|
>
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
<q-tooltip
|
||||||
@update:pagination="updatePagination"
|
>แสดงตำแหน่งทั้งหมดภายใต้หน่วยงาน/ส่วนราชการที่เลือก</q-tooltip
|
||||||
v-model:pagination="pagination"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th auto-width></q-th>
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
</q-checkbox>
|
||||||
</q-th>
|
</div>
|
||||||
<q-th auto-width></q-th>
|
<div>
|
||||||
</q-tr>
|
<q-input
|
||||||
</template>
|
outlined
|
||||||
<template v-slot:body="props">
|
dense
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
v-model="reqMaster.keyword"
|
||||||
<q-td>
|
label="ค้นหา"
|
||||||
<q-btn
|
@keydown.enter.prevent="
|
||||||
|
(reqMaster.page = 1),
|
||||||
|
fetchDataTable(
|
||||||
|
reqMaster.id,
|
||||||
|
reqMaster.revisionId,
|
||||||
|
reqMaster.type
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" color="grey-5" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-toolbar>
|
||||||
|
<d-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="posMaster"
|
||||||
|
:paging="true"
|
||||||
|
row-key="id"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
dense
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
@update:pagination="updatePagination"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th auto-width></q-th>
|
||||||
|
<q-th
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
|
</q-th>
|
||||||
|
<q-th auto-width></q-th>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:body="props">
|
||||||
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
|
<q-td>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
size="14px"
|
||||||
|
color="primary"
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
@click="props.expand = !props.expand"
|
||||||
|
:icon="
|
||||||
|
props.expand ? 'mdi-menu-down' : 'mdi-menu-right'
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</q-td>
|
||||||
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<!-- <div v-else-if="col.name === 'posMasterNo'">
|
||||||
|
{{
|
||||||
|
props.row.isSit
|
||||||
|
? col.value + " " + "(ทับที่)"
|
||||||
|
: col.value
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name === 'posLevelName'">
|
||||||
|
{{
|
||||||
|
props.row.posLevelName
|
||||||
|
? props.row.isSpecial == true
|
||||||
|
? `${props.row.posLevelName} (ฉ)`
|
||||||
|
: props.row.posLevelName
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div> -->
|
||||||
|
<div>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
<q-td> </q-td>
|
||||||
|
</q-tr>
|
||||||
|
|
||||||
|
<q-tr v-show="props.expand" :props="props">
|
||||||
|
<q-td colspan="100%" class="bg-grey-1">
|
||||||
|
<q-card flat bordered class="text-left q-ma-sm">
|
||||||
|
<d-table
|
||||||
flat
|
flat
|
||||||
size="14px"
|
:columns="columnsExpand"
|
||||||
color="primary"
|
:rows="props.row.positions"
|
||||||
round
|
table-class="text-grey-9"
|
||||||
|
row-key="id"
|
||||||
dense
|
dense
|
||||||
@click="props.expand = !props.expand"
|
hide-bottom
|
||||||
:icon="
|
bordered
|
||||||
props.expand ? 'mdi-menu-down' : 'mdi-menu-right'
|
separator="vertical"
|
||||||
"
|
class="custom-header-table-expand"
|
||||||
/>
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{
|
|
||||||
(reqMaster.page - 1) * Number(reqMaster.pageSize) +
|
|
||||||
props.rowIndex +
|
|
||||||
1
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'posMasterNo'">
|
|
||||||
{{
|
|
||||||
props.row.isSit
|
|
||||||
? col.value + " " + "(ทับที่)"
|
|
||||||
: col.value
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="col.name === 'posLevelName'">
|
|
||||||
{{
|
|
||||||
props.row.posLevelName
|
|
||||||
? props.row.isSpecial == true
|
|
||||||
? `${props.row.posLevelName} (ฉ)`
|
|
||||||
: props.row.posLevelName
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
<q-td>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
icon="mdi-dots-vertical"
|
|
||||||
class="q-pa-none q-ml-xs"
|
|
||||||
color="grey-13"
|
|
||||||
size="12px"
|
|
||||||
>
|
>
|
||||||
<q-menu>
|
<template v-slot:header="props">
|
||||||
<q-list dense style="min-width: 150px">
|
<q-tr :props="props" class="bg-grey-2">
|
||||||
<!-- เลือกคนครอง -->
|
<q-th
|
||||||
<q-item
|
v-for="col in props.cols"
|
||||||
v-if="
|
:key="col.name"
|
||||||
props.row.positionIsSelected == 'ว่าง' &&
|
:props="props"
|
||||||
store.typeOrganizational === 'draft'
|
|
||||||
"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="openSelectPerson(props.row)"
|
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<span class="q-px-sm text-body2 text-black">{{
|
||||||
<div class="row items-center">
|
col.label
|
||||||
<q-icon
|
}}</span>
|
||||||
color="secondary"
|
</q-th>
|
||||||
size="17px"
|
</q-tr>
|
||||||
name="mdi-account"
|
</template>
|
||||||
/>
|
<template v-slot:body="props">
|
||||||
<div class="q-pl-md">เลือกคนครอง</div>
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
</div>
|
<q-td
|
||||||
</q-item-section>
|
v-for="col in props.cols"
|
||||||
</q-item>
|
:key="col.name"
|
||||||
<q-item
|
:props="props"
|
||||||
v-else-if="
|
|
||||||
props.row.positionIsSelected != 'ว่าง' &&
|
|
||||||
store.typeOrganizational === 'draft'
|
|
||||||
"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="removePerson(props.row.id)"
|
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<div v-if="col.name == 'no'" class="text-body2">
|
||||||
<div class="row items-center">
|
{{ props.rowIndex + 1 }}
|
||||||
<q-icon
|
</div>
|
||||||
color="red"
|
<div
|
||||||
size="17px"
|
v-else-if="col.name === 'posExecutiveName'"
|
||||||
name="mdi-account-remove"
|
class="text-body2"
|
||||||
/>
|
|
||||||
<div class="q-pl-md">ลบคนครอง</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
v-for="(
|
|
||||||
item, index
|
|
||||||
) in store.typeOrganizational === 'draft'
|
|
||||||
? listMenu
|
|
||||||
: listMenu.filter(
|
|
||||||
(e) => e.type === 'HISTORY'
|
|
||||||
)"
|
|
||||||
:key="index"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
item.type === 'EDIT'
|
|
||||||
? onClickPosition('EDIT', props.row.id)
|
|
||||||
: item.type === 'DEL'
|
|
||||||
? onClickDelete(props.row.id)
|
|
||||||
: item.type === 'MOVE'
|
|
||||||
? onClickMovePos(props.row.id, 'SINGER')
|
|
||||||
: item.type === 'HISTORY'
|
|
||||||
? onClickHistoryPos(props.row.id)
|
|
||||||
: item.type === 'INHERIT'
|
|
||||||
? onClickInherit(props.row.id)
|
|
||||||
: item.type === 'COPY'
|
|
||||||
? onClickCopyPosition('COPY', props.row.id)
|
|
||||||
: null
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-item-section>
|
|
||||||
<div class="row items-center">
|
|
||||||
<q-icon
|
|
||||||
:color="item.color"
|
|
||||||
size="17px"
|
|
||||||
:name="item.icon"
|
|
||||||
/>
|
|
||||||
<div class="q-pl-md">{{ item.label }}</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
v-if="props.row.positionIsSelected != 'ว่าง'"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="onClickViewDetail(props.row)"
|
|
||||||
>
|
|
||||||
<q-item-section>
|
|
||||||
<div class="row items-center">
|
|
||||||
<q-icon
|
|
||||||
color="blue"
|
|
||||||
size="17px"
|
|
||||||
name="mdi-eye"
|
|
||||||
/>
|
|
||||||
<div class="q-pl-md">ดูรายละเอียด</div>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-menu>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
|
|
||||||
<q-tr v-show="props.expand" :props="props">
|
|
||||||
<q-td colspan="100%" class="bg-grey-1">
|
|
||||||
<q-card flat bordered class="text-left q-ma-sm">
|
|
||||||
<d-table
|
|
||||||
flat
|
|
||||||
:columns="columnsExpand"
|
|
||||||
:rows="props.row.positions"
|
|
||||||
table-class="text-grey-9"
|
|
||||||
row-key="id"
|
|
||||||
dense
|
|
||||||
hide-bottom
|
|
||||||
bordered
|
|
||||||
separator="vertical"
|
|
||||||
class="custom-header-table-expand"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props" class="bg-grey-2">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
>
|
||||||
<span class="q-px-sm text-body2 text-black">{{
|
{{ col.value ? col.value : "-" }}
|
||||||
col.label
|
</div>
|
||||||
}}</span>
|
|
||||||
</q-th>
|
<div
|
||||||
</q-tr>
|
v-else-if="
|
||||||
</template>
|
col.name === 'positionExecutiveField'
|
||||||
<template v-slot:body="props">
|
"
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
class="text-body2"
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
>
|
||||||
<div
|
{{ col.value ? col.value : "-" }}
|
||||||
v-if="col.name == 'no'"
|
</div>
|
||||||
class="text-body2"
|
|
||||||
>
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="col.name === 'posExecutiveName'"
|
|
||||||
class="text-body2"
|
|
||||||
>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else-if="
|
v-else-if="col.name === 'positionArea'"
|
||||||
col.name === 'positionExecutiveField'
|
class="text-body2"
|
||||||
"
|
>
|
||||||
class="text-body2"
|
{{ col.value ? col.value : "-" }}
|
||||||
>
|
</div>
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div v-else class="text-body2">
|
||||||
v-else-if="col.name === 'positionArea'"
|
{{ col.value }}
|
||||||
class="text-body2"
|
</div>
|
||||||
>
|
</q-td>
|
||||||
{{ col.value ? col.value : "-" }}
|
</q-tr>
|
||||||
</div>
|
</template>
|
||||||
|
</d-table>
|
||||||
<div v-else class="text-body2">
|
</q-card>
|
||||||
{{ col.value }}
|
</q-td>
|
||||||
</div>
|
</q-tr>
|
||||||
</q-td>
|
</template>
|
||||||
</q-tr>
|
<template v-slot:pagination="scope">
|
||||||
</template>
|
ทั้งหมด {{ totalRow }} รายการ
|
||||||
</d-table>
|
<q-pagination
|
||||||
</q-card>
|
v-model="reqMaster.page"
|
||||||
</q-td>
|
active-color="primary"
|
||||||
</q-tr>
|
color="dark"
|
||||||
</template>
|
:max="maxPage"
|
||||||
<!-- <template v-slot:pagination="scope">
|
:max-pages="5"
|
||||||
<q-pagination
|
size="sm"
|
||||||
v-model="reqMaster.page"
|
boundary-links
|
||||||
active-color="primary"
|
direction-links
|
||||||
color="dark"
|
@update:model-value="
|
||||||
:max="totalPage"
|
fetchDataTable(
|
||||||
:max-pages="5"
|
reqMaster.id,
|
||||||
size="sm"
|
reqMaster.revisionId,
|
||||||
boundary-links
|
reqMaster.type
|
||||||
direction-links
|
)
|
||||||
></q-pagination>
|
"
|
||||||
</template> -->
|
></q-pagination>
|
||||||
</d-table>
|
</template>
|
||||||
</div>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue