แก้ space ขึ้นบรรทัดใหม่ เเก้คำ พ้นราชการ
This commit is contained in:
parent
90ed596dec
commit
b8f971e251
23 changed files with 377 additions and 170 deletions
|
|
@ -33,7 +33,7 @@ const dataMapToSend = computed(() => {
|
|||
}));
|
||||
});
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogConfirm, date2Thai, onSearchDataTable } = mixin;
|
||||
const { dialogConfirm, date2Thai, onSearchDataTable, textTranForm } = mixin;
|
||||
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
|
|
@ -41,11 +41,11 @@ const props = defineProps({
|
|||
closeModal: { type: Function, requreid: true },
|
||||
fecthList: { type: Function, requreid: true },
|
||||
rows: { type: Array as PropType<ResponseItems[]>, requreid: true },
|
||||
filterKeyword2: { type: String, requreid: true },
|
||||
mainTabs: { type: String, requreid: true },
|
||||
});
|
||||
|
||||
//Table
|
||||
const filterKeyword = defineModel<string>("filterKeyword", { required: true });
|
||||
const rowsData = ref<ResponseItems[]>([]);
|
||||
const rowsDataMain = ref<ResponseItems[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -84,7 +84,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionLevel",
|
||||
align: "left",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
label: "ตำแหน่งประเภท",
|
||||
sortable: true,
|
||||
field: "positionLevel",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -104,7 +104,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "positionNumberOld",
|
||||
align: "left",
|
||||
label: "เลขที่",
|
||||
label: "เลขที่ตำแหน่ง",
|
||||
sortable: true,
|
||||
field: "positionNumberOld",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -118,6 +118,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
field: "organizationPositionOld",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
format(val, row) {
|
||||
return `${row.organizationPositionOld.replace(/\n/g, " ")}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "datetext",
|
||||
|
|
@ -161,7 +164,6 @@ const modalCommand = ref<boolean>(false);
|
|||
|
||||
/** popup ยืนยันส่งัว */
|
||||
function saveOrder() {
|
||||
console.log(selected.value);
|
||||
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -181,7 +183,7 @@ function updateInput(value: any) {
|
|||
|
||||
async function onSearch() {
|
||||
rowsData.value = onSearchDataTable(
|
||||
props.filterKeyword2 ? props.filterKeyword2 : "",
|
||||
filterKeyword.value,
|
||||
rowsDataMain.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
|
|
@ -214,8 +216,7 @@ watch(
|
|||
borderless
|
||||
outlined
|
||||
dense
|
||||
:model-value="filterKeyword2"
|
||||
@update:model-value="updateInput"
|
||||
v-model="filterKeyword"
|
||||
@keydown.enter="onSearch"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
|
|
@ -269,14 +270,17 @@ watch(
|
|||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div
|
||||
:class="
|
||||
col.name === 'organizationPositionOld' ||
|
||||
col.name === 'organization'
|
||||
? 'table_ellipsis2'
|
||||
: ''
|
||||
"
|
||||
v-if="col.name == 'organizationPositionOld'"
|
||||
class="text-html"
|
||||
>
|
||||
{{ col.value ? col.value : "" }}
|
||||
{{
|
||||
props.row.organizationPositionOld
|
||||
? textTranForm(props.row.organizationPositionOld)
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue