#
Junjie
2025-02-14 ac4341ea6b66ae02427d39d35f41d42d78b2eb2e
zy-asrs-admin/src/views/task/taskDetlLog/index.vue
@@ -17,6 +17,11 @@
const searchInput = ref("")
const editChild = ref(null)
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
let tableData = ref([]);
getPage();
@@ -97,6 +102,13 @@
    ...getColumnSearchProps('matId$'),
  },
  {
    title: formatMessage('db.man_task_detl_log.matnr', '商品编号'),
    dataIndex: 'matnr',
    width: 140,
    ellipsis: true,
    ...getColumnSearchProps('matnr'),
  },
  {
    title: formatMessage('db.man_task_detl_log.status', '状态'),
    dataIndex: 'status$',
    width: 140,
@@ -148,10 +160,7 @@
  },
];
const state = reactive({
  selectedRowKeys: [],
  loading: false,
});
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
  state.loading = true;
@@ -167,6 +176,8 @@
};
function getPage() {
  state.loading = true;
  post('/api/taskDetlLog/page', {
    current: currentPage,
    pageSize: pageSize,
@@ -176,6 +187,8 @@
    if (result.code == 200) {
      let data = result.data;
      tableData.value = data;
      state.loading = false;
    } else if (result.code === 401) {
      message.error(result.msg);
      logout()
@@ -217,7 +230,9 @@
}
const handleExport = async (intl) => {
  postBlob('/api/taskDetlLog/export', {}).then(result => {
  postBlob('/api/taskDetlLog/export', {
    condition: searchInput.value
  }).then(result => {
    const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
    window.location.href = window.URL.createObjectURL(blob);
    return true;
@@ -261,7 +276,8 @@
    <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
      :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
      :pagination="{ total: tableData.total, onChange: onPageChange }"
      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn">
      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"
      :loading="state.loading">
      <template #bodyCell="{ column, text, record }">
        <template v-if="column.dataIndex === 'oper'">
          <div style="display: flex;justify-content: space-evenly;">