Skip to content

Commit 170f689

Browse files
committed
formate
1 parent 805be0b commit 170f689

5 files changed

Lines changed: 17 additions & 10 deletions

File tree

src/constants/default.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const COLLEGE_MAP: NumberCodeMap = {
118118

119119
// 专业字典常量
120120
export const MAJOR_MAP: NumberCodeMap = {
121-
0: '教育学',
121+
0: '教育学',
122122
1: '学前教育(公费师范)',
123123
2: '小学教育(公费师范)',
124124
4: '心理学',

src/core/request.core.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ export class RequestCore {
5656
(response: AxiosResponse<ApiResponse>) => {
5757
console.log(`[Response] ${response.config.url}`, response.data)
5858

59-
const responseBody = response.data as
60-
| (ApiResponse & { msg?: string })
61-
| undefined
59+
const responseBody = response.data as (ApiResponse & { msg?: string }) | undefined
6260

6361
// 业务状态码 401(例如:{ code: 401, data: null, msg: "认证失败,无法访问系统资源" })
6462
if (responseBody?.code === 401) {

src/stores/order-store.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export const useOrderStore = defineStore('order', () => {
4949
])
5050

5151
const statusTitle = computed(() => {
52-
return statusOptions.value.find((option) => option.value === statusFilter.value)?.label || '订单状态'
52+
return (
53+
statusOptions.value.find((option) => option.value === statusFilter.value)?.label || '订单状态'
54+
)
5355
})
5456

5557
const checkableSelectedOrders = computed(() => {
@@ -164,7 +166,8 @@ export const useOrderStore = defineStore('order', () => {
164166
return typeMap[String(status)] || 'primary'
165167
}
166168

167-
const isOrderCheckable = (status: string | AdminOrderStatus) => String(status) === CHECKABLE_ORDER_STATUS
169+
const isOrderCheckable = (status: string | AdminOrderStatus) =>
170+
String(status) === CHECKABLE_ORDER_STATUS
168171

169172
const setStatusFilter = async (status: number | null) => {
170173
statusFilter.value = status
@@ -179,7 +182,8 @@ export const useOrderStore = defineStore('order', () => {
179182
}
180183

181184
const checkSingleOrder = async (orderId: string) => {
182-
const targetOrder = orders.value.find((order) => order.id === orderId) || selectedOrderMap.value[orderId]
185+
const targetOrder =
186+
orders.value.find((order) => order.id === orderId) || selectedOrderMap.value[orderId]
183187
if (targetOrder && !isOrderCheckable(targetOrder.status)) {
184188
ElMessage.warning('该订单当前状态不可核销')
185189
return

src/stores/user-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const useUserStore = defineStore('user', () => {
8282
const initLoginState = async () => {
8383
initRemember()
8484
if (!(await isLoggedIn())) {
85-
clearAuth();
85+
clearAuth()
8686
}
8787
}
8888
const detectDeviceType = () => {

src/views/order/index.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<div class="header-title-wrap">
77
<h2>订单列表</h2>
88
<p v-if="selectedOrderIds.length" class="selection-summary">
9-
当前已跨页选中 {{ selectedOrderIds.length }} 条,可核销 {{ checkableSelectedOrders.length }} 条
9+
当前已跨页选中 {{ selectedOrderIds.length }} 条,可核销
10+
{{ checkableSelectedOrders.length }} 条
1011
</p>
1112
<p v-else class="selection-summary is-empty">当前未选择订单</p>
1213
</div>
@@ -81,7 +82,11 @@
8182
<span class="preview-count">共 {{ checkableSelectedOrders.length }} 条待核销</span>
8283
<div>
8384
<el-button @click="closeBatchCheckPreview">取消</el-button>
84-
<el-button type="primary" :disabled="!checkableSelectedOrders.length" @click="checkSelectedOrders">
85+
<el-button
86+
type="primary"
87+
:disabled="!checkableSelectedOrders.length"
88+
@click="checkSelectedOrders"
89+
>
8590
确认核销
8691
</el-button>
8792
</div>

0 commit comments

Comments
 (0)