refs #7407 fix time
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
21488cda9e
commit
c7f14d30bd
|
@ -7,6 +7,7 @@ import { dashIfEmpty } from 'src/filters';
|
|||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
import VnComponent from 'components/common/VnComponent.vue';
|
||||
|
||||
const model = defineModel();
|
||||
|
@ -71,6 +72,15 @@ const defaultComponents = {
|
|||
label: $props.showLabel && $props.column.label,
|
||||
},
|
||||
},
|
||||
time: {
|
||||
component: markRaw(VnInputTime),
|
||||
attrs: {
|
||||
disable: !$props.isEditable,
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
},
|
||||
},
|
||||
checkbox: {
|
||||
component: markRaw(QCheckbox),
|
||||
attrs: (prop) => {
|
||||
|
|
|
@ -7,6 +7,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
import VnTableColumn from 'components/VnTable/VnColumn.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -76,6 +77,15 @@ const components = {
|
|||
label: $props.showTitle ? '' : $props.column.label,
|
||||
},
|
||||
},
|
||||
time: {
|
||||
component: markRaw(VnInputTime),
|
||||
attrs: {
|
||||
disable: !$props.isEditable,
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
},
|
||||
},
|
||||
checkbox: {
|
||||
component: markRaw(QCheckbox),
|
||||
event: updateEvent,
|
||||
|
|
|
@ -15,15 +15,19 @@ const columns = computed(() => [
|
|||
label: t('worker.medical.tableVisibleColumns.date'),
|
||||
create: true,
|
||||
component: 'date',
|
||||
field: 'date',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'time',
|
||||
label: t('worker.medical.tableVisibleColumns.time'),
|
||||
create: true,
|
||||
component: 'VnInputTime',
|
||||
field: 'time',
|
||||
component: 'time',
|
||||
// format: ({ time }) => {
|
||||
// console.log('time: ', time);
|
||||
// if (!time) return;
|
||||
// const [hours, minutes] = time.split(':');
|
||||
// return new Date(new Date().setHours(hours, minutes));
|
||||
// },
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -32,7 +36,7 @@ const columns = computed(() => [
|
|||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'centers',
|
||||
url: 'medicalCenters',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
|
@ -42,7 +46,6 @@ const columns = computed(() => [
|
|||
label: t('worker.medical.tableVisibleColumns.invoice'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'invoice',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -50,15 +53,13 @@ const columns = computed(() => [
|
|||
label: t('worker.medical.tableVisibleColumns.amount'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'amount',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'isFit',
|
||||
label: t('worker.medical.tableVisibleColumns.isFit'),
|
||||
create: true,
|
||||
component: 'QCheckbox',
|
||||
field: 'isFit',
|
||||
component: 'checkbox',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -66,7 +67,6 @@ const columns = computed(() => [
|
|||
label: t('worker.medical.tableVisibleColumns.remark'),
|
||||
create: true,
|
||||
component: 'input',
|
||||
field: 'remark',
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue