This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<ElButton
|
||||
v-if="canCreate"
|
||||
type="primary"
|
||||
:icon="Plus"
|
||||
@click="openFormDialog('create')"
|
||||
>
|
||||
新增规则
|
||||
@@ -54,7 +53,7 @@
|
||||
destroy-on-close
|
||||
@closed="resetForm"
|
||||
>
|
||||
<ElForm ref="formRef" :model="form" :rules="formRules" label-width="120px">
|
||||
<ElForm ref="formRef" :model="form" :rules="formRules" label-width="100px">
|
||||
<ElFormItem label="套餐商品" prop="package_id">
|
||||
<ElSelect
|
||||
v-model="form.package_id"
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
:pageSize="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
:marginTop="10"
|
||||
:actions="getActions"
|
||||
:actionsWidth="100"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
@@ -76,7 +74,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, h, onMounted, reactive, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox, ElRadio, ElRadioGroup, ElTag } from 'element-plus'
|
||||
import { ElButton, ElMessage, ElMessageBox, ElRadio, ElRadioGroup, ElTag } from 'element-plus'
|
||||
import { Download } from '@element-plus/icons-vue'
|
||||
import { PackageManageService, PackageTrafficAlertService, ShopService } from '@/api/modules'
|
||||
import { useAuth } from '@/composables/useAuth'
|
||||
@@ -284,7 +282,15 @@
|
||||
label: '套餐名称',
|
||||
minWidth: 160,
|
||||
showOverflowTooltip: true,
|
||||
formatter: (row: PackageTrafficAlertRecordItem) => row.package_name || '-'
|
||||
formatter: (row: PackageTrafficAlertRecordItem) => {
|
||||
const packageName = row.package_name || '-'
|
||||
if (!canViewDetail.value) return packageName
|
||||
return h(
|
||||
ElButton,
|
||||
{ link: true, type: 'primary', onClick: () => goDetail(row) },
|
||||
() => h('span', { style: { textDecoration: 'underline' } }, packageName)
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'shop_name',
|
||||
@@ -452,17 +458,6 @@
|
||||
router.push(`${RoutesAlias.TrafficAlertDetail}/${row.id}`)
|
||||
}
|
||||
|
||||
const getActions = (row: PackageTrafficAlertRecordItem) => {
|
||||
if (!canViewDetail.value) return []
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
handler: () => goDetail(row),
|
||||
type: 'primary' as const
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// ========== 导出 ==========
|
||||
|
||||
const exportDialogVisible = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user