更新ppt-排序
This commit is contained in:
parent
64e7c27a44
commit
f2b1a097bb
|
@ -51,7 +51,7 @@ export class PPTApi {
|
||||||
// 获取所有幻灯片列表
|
// 获取所有幻灯片列表
|
||||||
static getSlideList(parentid: (Number | String)): Promise<Boolean> {
|
static getSlideList(parentid: (Number | String)): Promise<Boolean> {
|
||||||
return new Promise(async (resolve, reject) => {
|
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)
|
const res: Result = await API_entpcoursefile.listEntpcoursefileNew(params)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const slides = (res.rows || []).map(o => {
|
const slides = (res.rows || []).map(o => {
|
||||||
|
@ -111,7 +111,7 @@ export class PPTApi {
|
||||||
static async updateSlides(newVal: object, oldVal: object) {
|
static async updateSlides(newVal: object, oldVal: object) {
|
||||||
const newData = toRaw(newVal)
|
const newData = toRaw(newVal)
|
||||||
const oldData = toRaw(oldVal)
|
const oldData = toRaw(oldVal)
|
||||||
console.log('监听幻灯片数据变化', newData, oldData)
|
// console.log('监听幻灯片数据变化', newData, oldData)
|
||||||
if (!(newData&&newData.length)) return // 新数据为空,不需要更新数据
|
if (!(newData&&newData.length)) return // 新数据为空,不需要更新数据
|
||||||
else if (!oldData.length) return // 初始加载,旧数据空不需要更新数据
|
else if (!oldData.length) return // 初始加载,旧数据空不需要更新数据
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue