feat: updates TicketTable
This commit is contained in:
parent
ff918b8a1c
commit
d16786d3e1
|
@ -13,6 +13,7 @@ import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import TicketDescriptorProxy from '../Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from '../Card/TicketDescriptorProxy.vue';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
const rowsSelected = ref([]);
|
const rowsSelected = ref([]);
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
filter: {
|
filter: {
|
||||||
|
@ -133,29 +134,28 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
format: ({ theoreticalhour }) => toHour(theoreticalhour),
|
format: ({ theoreticalhour }) => toHour(theoreticalhour),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
columnFilter: {
|
component: 'time',
|
||||||
component: 'time',
|
columnClass: 'shrink',
|
||||||
columnClass: 'shrink',
|
attrs: { ON: { blur: (data) => console.error(data) } },
|
||||||
},
|
columnFilter: {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'alertLevelCode',
|
name: 'alertLevelCode',
|
||||||
label: t('negative.detail.state'),
|
label: t('negative.detail.stadte'),
|
||||||
field: 'code',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
||||||
|
// columnFilter: {
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
columnFilter: {
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'AlertLevels',
|
event: console.error,
|
||||||
fields: ['id', 'code'],
|
// event: console.error,
|
||||||
'sort-by': 'code ASC',
|
options: editableStates.value,
|
||||||
'option-value': 'id',
|
'option-value': 'id',
|
||||||
'option-label': 'code',
|
'option-label': 'name',
|
||||||
dense: true,
|
// },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -179,11 +179,16 @@ const columns = computed(() => [
|
||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
columnFilter: {
|
component: 'input',
|
||||||
component: 'input',
|
type: 'number',
|
||||||
type: 'number',
|
// attrs: ({ row }) => {
|
||||||
class: 'expand',
|
// return {
|
||||||
},
|
// workerId: row.workerFk,
|
||||||
|
// name: row.userName,
|
||||||
|
// }
|
||||||
|
// attrs: (props) => ({
|
||||||
|
// events: getInputEvents(props),
|
||||||
|
// }),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const emit = defineEmits([...useDialogPluginComponent.emits, 'selection', 'close']);
|
const emit = defineEmits([...useDialogPluginComponent.emits, 'selection', 'close']);
|
||||||
|
@ -233,6 +238,7 @@ const tableRef = ref(null);
|
||||||
"
|
"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
{{ editableStates }}
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:data-key="URL_KEY"
|
:data-key="URL_KEY"
|
||||||
|
@ -258,6 +264,12 @@ const tableRef = ref(null);
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
{{ props }}
|
{{ props }}
|
||||||
</template> -->
|
</template> -->
|
||||||
|
<template #column-quantity="props">
|
||||||
|
<VnInputNumber
|
||||||
|
v-model.number="props.row.quantity"
|
||||||
|
v-on="getInputEvents(props)"
|
||||||
|
></VnInputNumber>
|
||||||
|
</template>
|
||||||
<template #column-status="{ row }">
|
<template #column-status="{ row }">
|
||||||
<QTd style="width: 150px">
|
<QTd style="width: 150px">
|
||||||
<QIcon
|
<QIcon
|
||||||
|
|
Loading…
Reference in New Issue