更新ppt-排序

This commit is contained in:
zdg 2024-11-27 14:20:52 +08:00
parent 64e7c27a44
commit f2b1a097bb
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ export class PPTApi {
// 获取所有幻灯片列表
static getSlideList(parentid: (Number | String)): Promise<Boolean> {
return new Promise(async (resolve, reject) => {
const params: object = { parentid }
const params: object = { parentid, orderByColumn: 'fileidx', isAsc: 'asc' }
const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params)
if (res.code === 200) {
const slides = (res.rows || []).map(o => {
@ -111,7 +111,7 @@ export class PPTApi {
static async updateSlides(newVal: object, oldVal: object) {
const newData = toRaw(newVal)
const oldData = toRaw(oldVal)
console.log('监听幻灯片数据变化', newData, oldData)
// console.log('监听幻灯片数据变化', newData, oldData)
if (!(newData&&newData.length)) return // 新数据为空,不需要更新数据
else if (!oldData.length) return // 初始加载,旧数据空不需要更新数据