|
|
@@ -46,8 +46,8 @@
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-item field="auto_time" label="乐跑时段">
|
|
|
- <a-select v-model="queryData.auto_time" placeholder="请选择自动乐跑时段" :default-value="-1">
|
|
|
- <a-option :value="-1">所有时段</a-option>
|
|
|
+ <a-select v-model="queryData.auto_time" placeholder="请选择自动乐跑时段" :default-value="0">
|
|
|
+ <a-option :value="0">所有时段</a-option>
|
|
|
<a-option v-for="(item, index) in auto_time" :key="index" :value="item.value">
|
|
|
{{ item.label }}
|
|
|
</a-option>
|
|
|
@@ -134,7 +134,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #auto_time="{ record }">
|
|
|
- {{ autoTimeLabel(record.auto_time) }}
|
|
|
+ {{ autoTimeLabel(record) }}
|
|
|
</template>
|
|
|
<template #create_time="{ record }">
|
|
|
{{ stramptoTime(record.create_time) }}
|
|
|
@@ -209,7 +209,7 @@ const queryData = reactive({
|
|
|
email: '',
|
|
|
username: '',
|
|
|
state: -1,
|
|
|
- auto_time: -1
|
|
|
+ auto_time: 0
|
|
|
})
|
|
|
|
|
|
const pagination = reactive({
|
|
|
@@ -227,7 +227,7 @@ const form = reactive({
|
|
|
distance: [2.00, 4.00],
|
|
|
area: '',
|
|
|
auto_run: 1,
|
|
|
- auto_time: 8,
|
|
|
+ auto_time: -1,
|
|
|
notes: ''
|
|
|
})
|
|
|
|
|
|
@@ -240,7 +240,6 @@ const state = [
|
|
|
const area = ["兰花湖校区跑区", "主校区北跑区", "主校区南跑区", "重庆工商大学茶园校区"]
|
|
|
|
|
|
const columns = [
|
|
|
-
|
|
|
{
|
|
|
title: 'ID',
|
|
|
dataIndex: 'id',
|
|
|
@@ -330,7 +329,7 @@ const reset = () => {
|
|
|
queryData.email = ''
|
|
|
queryData.username = ''
|
|
|
queryData.state = -1
|
|
|
- queryData.auto_time = -1
|
|
|
+ queryData.auto_time = 0
|
|
|
getAccounts()
|
|
|
}
|
|
|
|
|
|
@@ -517,16 +516,19 @@ const stramptoTime = (time) => {
|
|
|
return new Date(time).toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' })
|
|
|
}
|
|
|
|
|
|
-const auto_time = Array.from({ length: 17 }, (_, i) => {
|
|
|
- const hour = i + 7
|
|
|
- return {
|
|
|
- label: `${hour} ~ ${hour + 1}时`,
|
|
|
- value: hour
|
|
|
- }
|
|
|
-})
|
|
|
+const auto_time = [
|
|
|
+ { label: '随机时段', value: -1 },
|
|
|
+ ...Array.from({ length: 17 }, (_, i) => {
|
|
|
+ const hour = i + 7
|
|
|
+ return { label: `${hour} ~ ${hour + 1}时`, value: hour }
|
|
|
+ })
|
|
|
+]
|
|
|
|
|
|
-const autoTimeLabel = (val) => {
|
|
|
- const match = auto_time.find(item => item.value === val)
|
|
|
+const autoTimeLabel = (record) => {
|
|
|
+ if (record.auto_time === -1 && record.today_auto_time) {
|
|
|
+ return `随机-今日${record.today_auto_time}时`
|
|
|
+ }
|
|
|
+ const match = auto_time.find(item => item.value === record.auto_time)
|
|
|
return match ? match.label : '-'
|
|
|
}
|
|
|
</script>
|
|
|
@@ -537,6 +539,7 @@ const autoTimeLabel = (val) => {
|
|
|
}
|
|
|
|
|
|
.table {
|
|
|
+ font-family: -apple-system, BlinkMacSystemFont;
|
|
|
margin-top: 15px;
|
|
|
|
|
|
.state {
|