zhou zhou
9 小时以前 450c9d39c6eb3765642f977512202e3240ac9b03
rsf-design/src/views/manager/task-log/index.vue
@@ -46,6 +46,7 @@
<script setup>
  import { computed, ref } from 'vue'
  import { useI18n } from 'vue-i18n'
  import { useUserStore } from '@/store/modules/user'
  import { useTable } from '@/hooks/core/useTable'
  import { usePrintExportPage } from '@/views/system/common/usePrintExportPage'
@@ -73,6 +74,7 @@
  defineOptions({ name: 'TaskLog' })
  const userStore = useUserStore()
  const { t } = useI18n()
  const searchForm = ref(createTaskLogSearchState())
  const detailDrawerVisible = ref(false)
  const detailData = ref({})
@@ -83,61 +85,147 @@
  const searchItems = computed(() => [
    {
      label: '关键字',
      label: t('table.keyword'),
      key: 'condition',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入任务号/托盘码/机器人编码'
        placeholder: t('pages.manager.taskLog.search.conditionPlaceholder')
      }
    },
    {
      label: '任务号',
      label: t('pages.manager.taskLog.detail.taskId'),
      key: 'taskId',
      type: 'inputNumber',
      props: {
        clearable: true,
        controlsPosition: 'right',
        placeholder: '请输入任务ID'
      }
    },
    {
      label: t('pages.manager.taskLog.table.taskCode'),
      key: 'taskCode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入任务号'
        placeholder: t('pages.manager.taskLog.search.taskCodePlaceholder')
      }
    },
    {
      label: '源库位',
      label: t('pages.manager.taskLog.table.taskStatus'),
      key: 'taskStatus',
      type: 'inputNumber',
      props: {
        clearable: true,
        controlsPosition: 'right',
        placeholder: '请输入任务状态'
      }
    },
    {
      label: t('pages.manager.taskLog.table.taskType'),
      key: 'taskType',
      type: 'inputNumber',
      props: {
        clearable: true,
        controlsPosition: 'right',
        placeholder: '请输入任务类型'
      }
    },
    {
      label: t('pages.manager.taskLog.table.orgLoc'),
      key: 'orgLoc',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入源库位'
        placeholder: t('pages.manager.taskLog.search.orgLocPlaceholder')
      }
    },
    {
      label: '目标库位',
      label: t('pages.manager.taskLog.table.orgSite'),
      key: 'orgSite',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入源站点'
      }
    },
    {
      label: t('pages.manager.taskLog.table.targLoc'),
      key: 'targLoc',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入目标库位'
        placeholder: t('pages.manager.taskLog.search.targLocPlaceholder')
      }
    },
    {
      label: '托盘码',
      label: t('pages.manager.taskLog.table.targSite'),
      key: 'targSite',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入目标站点'
      }
    },
    {
      label: t('pages.manager.taskLog.table.barcode'),
      key: 'barcode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入托盘码'
        placeholder: t('pages.manager.taskLog.search.barcodePlaceholder')
      }
    },
    {
      label: '机器人编码',
      label: t('pages.manager.taskLog.table.robotCode'),
      key: 'robotCode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入机器人编码'
        placeholder: t('pages.manager.taskLog.search.robotCodePlaceholder')
      }
    },
    {
      label: '开始日期',
      label: t('pages.manager.taskLog.detail.exceStatus'),
      key: 'exceStatus',
      type: 'inputNumber',
      props: {
        clearable: true,
        controlsPosition: 'right',
        placeholder: '请输入执行状态'
      }
    },
    {
      label: t('pages.manager.taskLog.detail.expDesc'),
      key: 'expDesc',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入异常描述'
      }
    },
    {
      label: t('pages.manager.taskLog.detail.sort'),
      key: 'sort',
      type: 'inputNumber',
      props: {
        clearable: true,
        controlsPosition: 'right',
        placeholder: '请输入优先级'
      }
    },
    {
      label: t('pages.manager.taskLog.detail.expCode'),
      key: 'expCode',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入异常编码'
      }
    },
    {
      label: t('pages.manager.taskLog.search.timeStart'),
      key: 'timeStart',
      type: 'date',
      props: {
@@ -147,13 +235,54 @@
      }
    },
    {
      label: '结束日期',
      label: t('pages.manager.taskLog.search.timeEnd'),
      key: 'timeEnd',
      type: 'date',
      props: {
        clearable: true,
        valueFormat: 'YYYY-MM-DD',
        type: 'date'
      }
    },
    {
      label: t('pages.manager.taskLog.table.startTime'),
      key: 'startTime',
      type: 'date',
      props: {
        clearable: true,
        valueFormat: 'YYYY-MM-DD',
        type: 'date'
      }
    },
    {
      label: t('pages.manager.taskLog.table.endTime'),
      key: 'endTime',
      type: 'date',
      props: {
        clearable: true,
        valueFormat: 'YYYY-MM-DD',
        type: 'date'
      }
    },
    {
      label: t('table.memo'),
      key: 'memo',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入备注'
      }
    },
    {
      label: t('table.status'),
      key: 'status',
      type: 'select',
      props: {
        clearable: true,
        options: [
          { label: t('common.status.enabled'), value: 1 },
          { label: t('common.status.disabled'), value: 0 }
        ]
      }
    }
  ])
@@ -183,7 +312,8 @@
      columnsFactory: () => createTaskLogTableColumns({ handleView: openDetail })
    },
    transform: {
      dataTransformer: (records) => (Array.isArray(records) ? records.map((item) => normalizeTaskLogRow(item)) : [])
      dataTransformer: (records) =>
        Array.isArray(records) ? records.map((item) => normalizeTaskLogRow(item)) : []
    }
  })
@@ -239,6 +369,7 @@
  }
  function handleSearch(params) {
    searchForm.value = { ...searchForm.value, ...params }
    replaceSearchParams(buildTaskLogSearchParams(params))
    getData()
  }