|
@ -108,7 +108,8 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList' |
|
|
import CRUD, { presenter, header, form } from '@crud/crud' |
|
|
|
|
|
|
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
|
|
|
|
|
import { initData } from '@/api/data' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
@ -218,8 +219,27 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
console.log(this.arrySort) |
|
|
console.log(this.arrySort) |
|
|
|
|
|
this.crud.sort = this.arrySort |
|
|
|
|
|
new Promise((resolve, reject) => { |
|
|
|
|
|
crud.loading = true |
|
|
|
|
|
// 请求数据 |
|
|
|
|
|
initData(crud.url, crud.getQueryParams()).then(data => { |
|
|
|
|
|
const table = crud.getTable() |
|
|
|
|
|
if (table && table.lazy) { // 懒加载子节点数据,清掉已加载的数据 |
|
|
|
|
|
table.store.states.treeData = {} |
|
|
|
|
|
table.store.states.lazyTreeNodeMap = {} |
|
|
|
|
|
} |
|
|
|
|
|
crud.page.total = data.totalElements !== null ? data.totalElements : data.length |
|
|
|
|
|
crud.data = data.content ? data.content : data |
|
|
|
|
|
crud.resetDataStatus() |
|
|
|
|
|
resolve(data) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
crud.loading = false |
|
|
|
|
|
reject(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.crud.sort = this.arrySort |
|
|
|
|
|
|
|
|
return false |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.beforeToCU](crud, form, btn) { |
|
|
[CRUD.HOOK.beforeToCU](crud, form, btn) { |
|
|
this.isEditOrAdd = btn |
|
|
this.isEditOrAdd = btn |
|
|