zhou zhou
3 天以前 50e95b985a72fcec4a93a2470e9efdfb2620148a
rsf-design/src/views/manager/wave-rule/index.vue
@@ -12,7 +12,7 @@
      <ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
        <template #left>
          <ElSpace wrap>
            <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>新增波次策略</ElButton>
            <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>{{ t('pages.manager.waveRule.actions.add') }}</ElButton>
            <ElButton
              v-auth="'delete'"
              type="danger"
@@ -20,7 +20,7 @@
              @click="handleBatchDelete"
              v-ripple
            >
              批量删除
              {{ t('common.actions.batchDelete') }}
            </ElButton>
          </ElSpace>
        </template>
@@ -54,6 +54,7 @@
<script setup>
  import { ElMessage } from 'element-plus'
  import { useI18n } from 'vue-i18n'
  import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
  import { useAuth } from '@/hooks/core/useAuth'
  import { useTable } from '@/hooks/core/useTable'
@@ -82,6 +83,7 @@
  } from './waveRulePage.helpers'
  defineOptions({ name: 'WaveRule' })
  const { t } = useI18n()
  const { hasAuth } = useAuth()
  const searchForm = ref(createWaveRuleSearchState())
@@ -93,25 +95,25 @@
  const searchItems = computed(() => [
    {
      label: '关键字',
      label: t('table.keyword'),
      key: 'condition',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入编号或名称'
        placeholder: t('pages.manager.waveRule.search.conditionPlaceholder')
      }
    },
    {
      label: '编号',
      label: t('table.code'),
      key: 'code',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入编号'
        placeholder: t('pages.manager.waveRule.search.codePlaceholder')
      }
    },
    {
      label: '类型',
      label: t('pages.manager.waveRule.table.type'),
      key: 'type',
      type: 'select',
      props: {
@@ -120,12 +122,12 @@
      }
    },
    {
      label: '名称',
      label: t('table.name'),
      key: 'name',
      type: 'input',
      props: {
        clearable: true,
        placeholder: '请输入策略名称'
        placeholder: t('pages.manager.waveRule.search.namePlaceholder')
      }
    }
  ])
@@ -140,7 +142,7 @@
      }),
      [],
      {
        timeoutMessage: '波次策略类型加载超时,已停止等待'
        timeoutMessage: t('pages.manager.waveRule.messages.typeTimeout')
      }
    )
    typeOptions.value = buildWaveRuleTypeOptions(Array.isArray(records?.records) ? records.records : records?.list || records || [])
@@ -154,7 +156,7 @@
    } catch (error) {
      detailDrawerVisible.value = false
      detailData.value = {}
      ElMessage.error(error?.message || '获取波次策略详情失败')
      ElMessage.error(error?.message || t('pages.manager.waveRule.messages.detailFailed'))
    } finally {
      detailLoading.value = false
    }
@@ -166,7 +168,7 @@
      dialogVisible.value = true
      dialogType.value = 'edit'
    } catch (error) {
      ElMessage.error(error?.message || '获取波次策略详情失败')
      ElMessage.error(error?.message || t('pages.manager.waveRule.messages.detailFailed'))
    }
  }
@@ -224,7 +226,7 @@
    saveRequest: fetchSaveWaveRule,
    updateRequest: fetchUpdateWaveRule,
    deleteRequest: fetchDeleteWaveRule,
    entityName: '波次策略',
    entityName: t('pages.manager.waveRule.entity'),
    resolveRecordLabel: (record) => record?.name || record?.code || record?.id,
    refreshCreate,
    refreshUpdate,