|
@@ -87,7 +87,7 @@ let pageCount = ref(0)
|
|
|
let defaultItems = ref()
|
|
|
|
|
|
let items = ref()
|
|
|
-// 翻页数据
|
|
|
+// 翻页
|
|
|
const getPageItems = () => {
|
|
|
const startIndex = (pageInfo.current - 1) * pageInfo.size
|
|
|
const endIndex = Math.min(startIndex + pageInfo.size, defaultItems.value.length)
|
|
@@ -95,8 +95,7 @@ const getPageItems = () => {
|
|
|
}
|
|
|
getDict('positionTreeData', null, 'positionTreeData').then(({ data }) => {
|
|
|
data = data?.length && data || []
|
|
|
- if (isPage) {
|
|
|
- // 翻页数据
|
|
|
+ if (isPage) { // 有翻页
|
|
|
defaultItems.value = data
|
|
|
if (defaultItems.value?.length) {
|
|
|
pageCount.value = Math.ceil(defaultItems.value.length / pageInfo.size)
|
|
@@ -107,12 +106,11 @@ getDict('positionTreeData', null, 'positionTreeData').then(({ data }) => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-// 翻页数据
|
|
|
+// 翻页按钮
|
|
|
const previous = () => { if (pageInfo.current > 1) pageInfo.current--; getPageItems() }
|
|
|
const nextPage = () => { if (pageInfo.current < pageCount.value) pageInfo.current++; getPageItems() }
|
|
|
|
|
|
-// card2
|
|
|
+// 右侧职位信息
|
|
|
const leftIndex = ref(null)
|
|
|
const rightObj = reactive({ show: false, data: {} })
|
|
|
|