|
|
@@ -239,6 +239,9 @@
|
|
|
<div>当有效次数达到目标次数时自动乐跑将关闭,0为不限次</div>
|
|
|
</template>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item field="auto_day" label="自动乐跑星期" v-if="form.auto_run">
|
|
|
+ <a-checkbox-group v-model="form.auto_day" placeholder="请选择每天自动乐跑的星期" :options="auto_day" />
|
|
|
+ </a-form-item>
|
|
|
<a-form-item field="auto_time" label="自动乐跑时段" v-if="form.auto_run">
|
|
|
<a-select v-model="form.auto_time" placeholder="请选择每天自动乐跑的时段" :options="auto_time" />
|
|
|
</a-form-item>
|
|
|
@@ -364,6 +367,16 @@ const handlePageSizeChange = (size) => {
|
|
|
getAccountsAsync()
|
|
|
}
|
|
|
|
|
|
+const auto_day = [
|
|
|
+ { label: '周一', value: 1 },
|
|
|
+ { label: '周二', value: 2 },
|
|
|
+ { label: '周三', value: 3 },
|
|
|
+ { label: '周四', value: 4 },
|
|
|
+ { label: '周五', value: 5 },
|
|
|
+ { label: '周六', value: 6 },
|
|
|
+ { label: '周日', value: 0 }
|
|
|
+]
|
|
|
+
|
|
|
const auto_time = [
|
|
|
{ label: '随机分配', value: -1 },
|
|
|
...Array.from({ length: 15 }, (_, i) => {
|
|
|
@@ -373,8 +386,10 @@ const auto_time = [
|
|
|
]
|
|
|
|
|
|
const autoTimeLabel = (record) => {
|
|
|
- if (record.auto_time === -1 && record.today_auto_time) {
|
|
|
- return `随机-今日${record.today_auto_time}时`
|
|
|
+ if (record.auto_time === -1) {
|
|
|
+ if (record.today_auto_time)
|
|
|
+ return `随机-今日${record.today_auto_time}时`
|
|
|
+ return '随机-待分配'
|
|
|
}
|
|
|
const match = auto_time.find(item => item.value === record.auto_time)
|
|
|
return match ? match.label : '-'
|
|
|
@@ -390,11 +405,11 @@ const form = reactive({
|
|
|
student_num: '',
|
|
|
password: '',
|
|
|
email: '',
|
|
|
- distance: [2.00, 4.00],
|
|
|
area: '',
|
|
|
auto_time: -1,
|
|
|
auto_run: 1,
|
|
|
target_count: 0,
|
|
|
+ auto_day: [0, 1, 2, 3, 4, 5, 6],
|
|
|
notes: ''
|
|
|
})
|
|
|
|
|
|
@@ -408,6 +423,7 @@ const editAccount = (item) => {
|
|
|
form.auto_time = item.auto_time
|
|
|
form.auto_run = item.auto_run
|
|
|
form.target_count = item.target_count
|
|
|
+ form.auto_day = item.auto_day
|
|
|
form.notes = item.notes
|
|
|
} else {
|
|
|
form.id = null
|
|
|
@@ -418,6 +434,7 @@ const editAccount = (item) => {
|
|
|
form.auto_time = -1
|
|
|
form.target_count = 0
|
|
|
form.area = '重庆工程学院南泉校区'
|
|
|
+ form.auto_day = [0, 1, 2, 3, 4, 5, 6]
|
|
|
form.notes = ''
|
|
|
}
|
|
|
visible.value = true
|