fix(ts): 修复树表分页遗留与搜索失效,清理低风险类型错误
- 移除 erp 产品分类 / demo02 树表残留的 Pagination(/list + handleTree 不应分页) - list API 增加可选 params 并转发,修复搜索条件被静默丢弃 - 修复 el-option value、coupon formatter、导入后缀、事件参数等低风险类型问题 ts:check 855 → 829,无新增类型错误pull/885/MERGE
parent
63dfc5e2c3
commit
a57df0b2de
|
|
@ -13,8 +13,8 @@ export interface ProductCategoryVO {
|
|||
// ERP 产品分类 API
|
||||
export const ProductCategoryApi = {
|
||||
// 查询产品分类列表
|
||||
getProductCategoryList: async () => {
|
||||
return await request.get({ url: `/erp/product-category/list` })
|
||||
getProductCategoryList: async (params?: any) => {
|
||||
return await request.get({ url: `/erp/product-category/list`, params })
|
||||
},
|
||||
|
||||
// 查询产品分类精简列表
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export interface Demo02CategoryVO {
|
|||
}
|
||||
|
||||
// 查询示例分类列表
|
||||
export const getDemo02CategoryList = async () => {
|
||||
return await request.get({ url: `/infra/demo02-category/list` })
|
||||
export const getDemo02CategoryList = async (params?: any) => {
|
||||
return await request.get({ url: `/infra/demo02-category/list`, params })
|
||||
}
|
||||
|
||||
// 查询示例分类详情
|
||||
|
|
|
|||
|
|
@ -65,7 +65,12 @@
|
|||
style="width: 100%"
|
||||
@change="updateElementTask"
|
||||
>
|
||||
<el-option v-for="item in postOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-option
|
||||
v-for="item in postOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id!"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<Icon icon="majesticons:next-circle" :size="20" class="text-gray-300 cursor-pointer" />
|
||||
<div class="flex gap-[16px] items-center">
|
||||
<span>{{ audioProps.currentTime }}</span>
|
||||
<el-slider v-model="audioProps.duration" color="#409eff" class="w-[160px!important]" />
|
||||
<el-slider v-model="audioProgress" color="#409eff" class="w-[160px!important]" />
|
||||
<span>{{ audioProps.duration }}</span>
|
||||
</div>
|
||||
<!-- 音频 -->
|
||||
|
|
@ -62,7 +62,8 @@ defineOptions({ name: 'Index' })
|
|||
|
||||
const currentSong = inject('currentSong', {})
|
||||
|
||||
const audioRef = ref<Nullable<HTMLElement>>(null)
|
||||
const audioRef = ref<Nullable<HTMLAudioElement>>(null)
|
||||
const audioProgress = ref(0)
|
||||
// 音频相关属性https://www.runoob.com/tags/ref-av-dom.html
|
||||
const audioProps = reactive({
|
||||
autoplay: true,
|
||||
|
|
|
|||
|
|
@ -59,19 +59,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="110" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="!scope.row.endStatus"
|
||||
link
|
||||
type="primary"
|
||||
@click="addStatus(scope.$index)"
|
||||
>
|
||||
<el-button v-if="!scope.row.endStatus" link type="primary" @click="() => addStatus()">
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!scope.row.endStatus"
|
||||
link
|
||||
type="danger"
|
||||
@click="deleteStatusArea(scope.$index)"
|
||||
@click="() => deleteStatusArea(scope.$index)"
|
||||
:disabled="formData.statuses.length <= 1"
|
||||
>
|
||||
删除
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
<Icon class="mr-5px" icon="ep:search" />
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery(undefined)">
|
||||
<el-button @click="resetQuery">
|
||||
<Icon class="mr-5px" icon="ep:refresh" />
|
||||
重置
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -108,13 +108,6 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
|
|
@ -157,7 +150,6 @@ const getList = async () => {
|
|||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
v-for="config in dataSourceConfigList"
|
||||
:key="config.id"
|
||||
:label="config.name"
|
||||
:value="config.id"
|
||||
:value="config.id!"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -98,13 +98,6 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
|
|
@ -124,7 +117,7 @@ const message = useMessage() // 消息弹窗
|
|||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const list = ref<Demo02CategoryApi.Demo02CategoryVO[]>([]) // 列表的数据
|
||||
const queryParams = reactive({
|
||||
name: null,
|
||||
parentId: null,
|
||||
|
|
@ -146,7 +139,6 @@ const getList = async () => {
|
|||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const totalCountFormat = (row: CouponTemplateVO) => {
|
|||
if (row.totalCount === -1) {
|
||||
return '不限制'
|
||||
}
|
||||
return row.totalCount
|
||||
return `${row.totalCount}`
|
||||
}
|
||||
|
||||
// 格式化【剩余数量】
|
||||
|
|
@ -50,7 +50,7 @@ export const remainedCountFormat = (row: CouponTemplateVO) => {
|
|||
if (row.totalCount === -1) {
|
||||
return '不限制'
|
||||
}
|
||||
return row.totalCount - row.takeCount
|
||||
return `${row.totalCount - row.takeCount}`
|
||||
}
|
||||
|
||||
// 格式化【最低消费】
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { SeckillConfigApi, SeckillConfigVO } from '@/api/mall/promotion/seckill/seckillConfig.ts'
|
||||
import { SeckillConfigApi, SeckillConfigVO } from '@/api/mall/promotion/seckill/seckillConfig'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
|
||||
/** 秒杀时段 表单 */
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import { SeckillConfigApi, SeckillConfigVO } from '@/api/mall/promotion/seckill/seckillConfig.ts'
|
||||
import { SeckillConfigApi, SeckillConfigVO } from '@/api/mall/promotion/seckill/seckillConfig'
|
||||
import SeckillConfigForm from './SeckillConfigForm.vue'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
class="!w-1/1"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option v-for="item in filteredList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-option v-for="item in filteredList" :key="item.id" :label="item.name" :value="item.id!">
|
||||
<div class="flex items-center gap-8px">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-tag v-if="item.code" size="small" type="info" class="ml-4px">{{ item.code }}</el-tag>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
v-for="line in taskLineList"
|
||||
:key="line.id"
|
||||
:label="`${line.itemCode} - ${line.itemName} (${line.warehouseName}${line.locationName ? ' / ' + line.locationName : ''}${line.areaName ? ' / ' + line.areaName : ''})`"
|
||||
:value="line.id"
|
||||
:value="line.id!"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
|
|||
Loading…
Reference in New Issue