| | |
| | | const columns = computed<DataTableColumns<any>>(() => [ |
| | | { |
| | | type: 'selection', |
| | | width: 50, |
| | | width: 10, |
| | | }, |
| | | { |
| | | title: '序号', |
| | | align: 'left', |
| | | key: 'index', |
| | | width: 80, |
| | | width: 10, |
| | | resizable: true, |
| | | ellipsis: true, |
| | | render: (row, index) => <span>{index + 1}</span>, |
| | |
| | | { |
| | | title: '车辆编码', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'vehicleCode', |
| | | ellipsis: true, |
| | | fixed: 'left', |
| | |
| | | { |
| | | title: '车牌号', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'plateNumber', |
| | | ellipsis: true, |
| | | resizable: true, |
| | | render: (row) => <span style="color: #0256FF;">{row.plateNumber || '-'} </span>, |
| | | }, |
| | | { |
| | | title: '型号', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'vehicleModel', |
| | | ellipsis: true, |
| | | resizable: true, |
| | | }, |
| | | { |
| | | title: '采购来源', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'procurementSource', |
| | | ellipsis: true, |
| | | resizable: true, |
| | | }, |
| | | { |
| | | title: '运营区域', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'electronicId', |
| | | ellipsis: true, |
| | | resizable: true, |
| | | render: (row) => { |
| | | if (row.electronicName) |
| | |
| | | title: '状态', |
| | | align: 'left', |
| | | key: 'status', |
| | | width: 40, |
| | | resizable: true, |
| | | render: (row) => { |
| | | const status = statusMap[String(row.status)] || { type: 'default', text: row.status } |
| | |
| | | { |
| | | title: '入库时间', |
| | | align: 'left', |
| | | width: 40, |
| | | key: 'warehousingTime', |
| | | resizable: true, |
| | | render: row => row.warehousingTime ? dayjs(row.warehousingTime).format('YYYY-MM-DD HH:mm:ss') : '-', |
| | |
| | | title: '操作', |
| | | align: 'left', |
| | | key: 'actions', |
| | | width: 300, |
| | | fixed: 'right', |
| | | resizable: true, |
| | | width: 40, |
| | | // resizable: true, |
| | | render: (row) => { |
| | | return ( |
| | | <NSpace justify="flex-start"> |
| | | <NSpace justify="flex-start" wrap={false} size={8}> |
| | | {row.status == '1' && ( |
| | | <NButton |
| | | text |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <n-flex class="roboTaxi"> |
| | | <NSpace vertical class="flex-1" :size="12"> |
| | | <div class="roboTaxi-form-card"> |
| | | <div class="roboTaxi w-full h-full"> |
| | | <div class="flex-1 flex flex-col"> |
| | | <div class="roboTaxi-form-card mb-12px"> |
| | | <n-form |
| | | ref="formRef" |
| | | :model="model" |
| | |
| | | </n-form> |
| | | </div> |
| | | |
| | | <n-card class="flex-1"> |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex justify="space-between" align="center"> |
| | | <NSpace> |
| | |
| | | </NSpace> |
| | | </n-flex> |
| | | </template> |
| | | <NSpace vertical> |
| | | <div class="flex-1 flex flex-col h-full"> |
| | | <n-data-table |
| | | class="flex-1" |
| | | v-model:checked-row-keys="checkedRowKeys" |
| | | :columns="columns" |
| | | :data="listData" |
| | | :loading="loading" |
| | | :scroll-x="1400" |
| | | :scroll-x="2100" |
| | | :row-key="(row: any) => row.id" |
| | | flex-height |
| | | :bordered="false" |
| | | :header-height="18" |
| | | :row-height="18" |
| | | @update:checked-row-keys="handleCheck" |
| | | /> |
| | | <Pagination :count="count" :page="pagination.page" :page-size="pagination.pageSize" @change="changePage" /> |
| | | </NSpace> |
| | | </div> |
| | | </n-card> |
| | | </NSpace> |
| | | </div> |
| | | |
| | | <!-- 通用确认弹窗 --> |
| | | <ConfirmDialog |
| | |
| | | accept=".xlsx, .xls" |
| | | @change="handleFileChange" |
| | | /> |
| | | </n-flex> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped lang="scss"> |