Commit 5a46ceba authored by daniel's avatar daniel

fix(pageHelper): 分页插件依赖更新

parent 3d8b0a0b
......@@ -70,13 +70,19 @@
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
<!--PageHelper插件分页-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.13</version>
<version>2.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
<!-- <dependency>-->
<!-- <groupId>com.github.pagehelper</groupId>-->
<!-- <artifactId>pagehelper-spring-boot-starter</artifactId>-->
<!-- <version>2.1.0</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
......
......@@ -458,7 +458,7 @@
// 查询的参数
const query = reactive({
keyword: undefined,
isPickUp: undefined,
isPickUp: 1,
markNo: undefined,
})
const keyword = ref('')
......@@ -471,13 +471,12 @@
// 状态更新
const updateStatus = (value) => {
pagination.page = 1
query.status = value
query.isPickUp = value
fetchData()
}
// 状态tab
const updateTab = (value) => {
tabIndex.value = value
console.log(isPlayerList.value)
fetchData()
}
// 上传完成
......@@ -516,7 +515,7 @@
current: pagination.page,
size: pagination.pageSize,
cmptId: getCId(),
keyword: keyword.value
keyword: keyword.value,
}
// 发起请求
const url = isPlayerList.value ? PLAYERS_URL : MARK_NO_URL
......@@ -535,11 +534,7 @@
if (res.code === 200) {
list.value = res.data.records
pagination.itemCount = res.data.total
if (isPlayerList.value) {
statusOptions.value[2].total = res.data.total
} else {
statusOptions.value[1].total = res.data.total
}
// // 全部状态下不获取统计
getStats()
} else {
message.error(res.message)
......@@ -574,30 +569,31 @@
size: 1,
cmptId: getCId(),
}
// 发起请求
const url = isPlayerList.value ? MARK_NO_URL : PLAYERS_URL
const [err, res] = await to(fetch(url, {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
}).then(res => res.json()))
let paramsList = [1, 0].map(v => ({
...params,
isPickUp: v,
}))
const requests = paramsList.map(v => {
// 发起请求
const url = isPlayerList.value ? PLAYERS_URL : MARK_NO_URL
return fetch(url, {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(v)
}).then(res => res.json())
})
const res = await Promise.all(requests)
loading.value = false
if (err) {
message.error(err)
return
}
if (res.code === 200) {
if (isPlayerList.value) {
statusOptions.value[1].total = res.data.total
} else {
statusOptions.value[2].total = res.data.total
}
statusOptions.value[0].total = statusOptions.value[2].total + statusOptions.value[1].total
if (isPlayerList.value) {
statusOptions.value[1].total = res[0].data.total
statusOptions.value[2].total = res[1].data.total
} else {
message.error(res.message)
statusOptions.value[1].total = res[0].data.total
statusOptions.value[2].total = res[1].data.total
}
statusOptions.value[0].total = statusOptions.value[2].total + statusOptions.value[1].total
}
// 名单导出
const exportExcel = (type) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment