|
@@ -12,20 +12,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
添加账号
|
|
添加账号
|
|
|
</a-button>
|
|
</a-button>
|
|
|
-
|
|
|
|
|
- <a-button size="large" @click="download" style="margin-left: 10px;">
|
|
|
|
|
- <template #icon>
|
|
|
|
|
- <icon-question-circle />
|
|
|
|
|
- </template>
|
|
|
|
|
- 操作说明
|
|
|
|
|
- </a-button>
|
|
|
|
|
-
|
|
|
|
|
- <a-button size="large" @click="$router.push('/download/down')" style="margin-left: 10px;" v-if="!isElectron()">
|
|
|
|
|
- <template #icon>
|
|
|
|
|
- <icon-download />
|
|
|
|
|
- </template>
|
|
|
|
|
- 客户端/登录器下载
|
|
|
|
|
- </a-button>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<a-row class="queryForm">
|
|
<a-row class="queryForm">
|
|
@@ -120,7 +106,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #columns>
|
|
<template #columns>
|
|
|
- <a-table-column title="" :width="50" data-index="user_avatar" tooltip>
|
|
|
|
|
|
|
+ <a-table-column title="" :width="45" data-index="user_avatar" tooltip>
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
<a-avatar>
|
|
<a-avatar>
|
|
|
<img :alt="record.name ?? ''"
|
|
<img :alt="record.name ?? ''"
|
|
@@ -128,13 +114,13 @@
|
|
|
</a-avatar>
|
|
</a-avatar>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <a-table-column title="学号" :width="115" data-index="student_num" ellipsis tooltip></a-table-column>
|
|
|
|
|
- <a-table-column title="姓名" :width="130">
|
|
|
|
|
|
|
+ <a-table-column title="学号" :width="100" data-index="student_num" ellipsis tooltip></a-table-column>
|
|
|
|
|
+ <a-table-column title="姓名" :width="100">
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
{{ record.name ?? '请使用乐跑登录器更新账号信息' }}
|
|
{{ record.name ?? '请使用乐跑登录器更新账号信息' }}
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <a-table-column title="性别" :width="80" ellipsis tooltip :filterable="{
|
|
|
|
|
|
|
+ <!-- <a-table-column title="性别" :width="80" ellipsis tooltip :filterable="{
|
|
|
filters: [
|
|
filters: [
|
|
|
{ text: '男', value: 1 },
|
|
{ text: '男', value: 1 },
|
|
|
{ text: '女', value: 2 }
|
|
{ text: '女', value: 2 }
|
|
@@ -146,10 +132,9 @@
|
|
|
<icon-woman v-else-if="record.sex === 2" />
|
|
<icon-woman v-else-if="record.sex === 2" />
|
|
|
{{ record.sex === 1 ? '男' : (record.sex === 2 ? '女' : '') }}
|
|
{{ record.sex === 1 ? '男' : (record.sex === 2 ? '女' : '') }}
|
|
|
</template>
|
|
</template>
|
|
|
- </a-table-column>
|
|
|
|
|
- <a-table-column title="年级" :width="70" data-index="grade_id" tooltip></a-table-column>
|
|
|
|
|
- <a-table-column title="学院" :width="220" data-index="academy_name" tooltip></a-table-column>
|
|
|
|
|
- <a-table-column title="跑区" :width="130">
|
|
|
|
|
|
|
+ </a-table-column> -->
|
|
|
|
|
+ <a-table-column title="年级" :width="80" data-index="grade_id" tooltip></a-table-column>
|
|
|
|
|
+ <a-table-column title="跑区" :width="170">
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
{{ record.area || '随机分配' }}
|
|
{{ record.area || '随机分配' }}
|
|
|
</template>
|
|
</template>
|
|
@@ -168,19 +153,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <!-- <a-table-column title="人脸状态" :width="100" ellipsis tooltip>
|
|
|
|
|
- <template #cell="{ record }">
|
|
|
|
|
- <div v-if="record.face_state === 0" class="state">
|
|
|
|
|
- <div class="circle zero"></div>未采集
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-else-if="record.face_state === 1" class="state">
|
|
|
|
|
- <div class="circle one"></div>已通过
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-else class="state">
|
|
|
|
|
- <div class="circle else"></div>不通过
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table-column> -->
|
|
|
|
|
<a-table-column title="自动乐跑" :width="105" ellipsis tooltip :filterable="{
|
|
<a-table-column title="自动乐跑" :width="105" ellipsis tooltip :filterable="{
|
|
|
filters: [
|
|
filters: [
|
|
|
{ text: '开启', value: 1 },
|
|
{ text: '开启', value: 1 },
|
|
@@ -189,8 +161,7 @@
|
|
|
filter: (value, record) => record.auto_run == value
|
|
filter: (value, record) => record.auto_run == value
|
|
|
}">
|
|
}">
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
- <a-tag color="green" v-if="record.auto_run">{{ record.target_count === 0 ? '开启-不限' :
|
|
|
|
|
- `开启-${record.target_count}次` }}</a-tag>
|
|
|
|
|
|
|
+ <a-tag color="green" v-if="record.auto_run">开启</a-tag>
|
|
|
<a-tag color="red" v-else>关闭</a-tag>
|
|
<a-tag color="red" v-else>关闭</a-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
@@ -199,11 +170,10 @@
|
|
|
{{ autoTimeLabel(record) }}
|
|
{{ autoTimeLabel(record) }}
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <a-table-column title="学期目标" :width="88" ellipsis tooltip>
|
|
|
|
|
|
|
+ <a-table-column title="乐跑次数" :width="88" ellipsis tooltip>
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
- {{ record.term_num != record.total_num ? `${record.total_num} / ${record.term_num}` :
|
|
|
|
|
- '已完成' }}
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ {{ record.target_count != record.total_num ? `${record.total_num} / ${(record.target_count === 0 ||
|
|
|
|
|
+ record.target_count < record.total_num) ? '∞' : record.target_count}` : '已完成' }} </template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
<a-table-column title="添加时间" :width="145" ellipsis tooltip :sortable="{
|
|
<a-table-column title="添加时间" :width="145" ellipsis tooltip :sortable="{
|
|
|
sortDirections: ['ascend', 'descend']
|
|
sortDirections: ['ascend', 'descend']
|
|
@@ -212,11 +182,6 @@
|
|
|
{{ stramptoTime(record.create_time) }}
|
|
{{ stramptoTime(record.create_time) }}
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
- <a-table-column title="上次登录时间" :width="145" ellipsis tooltip>
|
|
|
|
|
- <template #cell="{ record }">
|
|
|
|
|
- {{ record.update_time ? stramptoTime(record.update_time) : '待登录' }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table-column>
|
|
|
|
|
<a-table-column title="备注" :width="200" ellipsis tooltip>
|
|
<a-table-column title="备注" :width="200" ellipsis tooltip>
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
{{ record.notes }}
|
|
{{ record.notes }}
|
|
@@ -229,7 +194,6 @@
|
|
|
<a-button>操作 <icon-down /></a-button>
|
|
<a-button>操作 <icon-down /></a-button>
|
|
|
<template #content>
|
|
<template #content>
|
|
|
<a-doption @click="editAccount(record)"><icon-edit /> 编辑账号</a-doption>
|
|
<a-doption @click="editAccount(record)"><icon-edit /> 编辑账号</a-doption>
|
|
|
- <!-- <a-doption @click="faceRecoRef.openModal(record)"><icon-video-camera /> 人脸采集</a-doption> -->
|
|
|
|
|
<a-doption @click="SingleRun(record)"><icon-play-circle /> 开始单次乐跑</a-doption>
|
|
<a-doption @click="SingleRun(record)"><icon-play-circle /> 开始单次乐跑</a-doption>
|
|
|
<a-doption @click="ChangeAutoRun(record)"><icon-translate /> {{ record.auto_run ? '关闭' :
|
|
<a-doption @click="ChangeAutoRun(record)"><icon-translate /> {{ record.auto_run ? '关闭' :
|
|
|
'开启' }}自动乐跑</a-doption>
|
|
'开启' }}自动乐跑</a-doption>
|
|
@@ -248,19 +212,20 @@
|
|
|
:ok-loading="ok_loading" esc-to-close closable>
|
|
:ok-loading="ok_loading" esc-to-close closable>
|
|
|
<a-form :model="form">
|
|
<a-form :model="form">
|
|
|
<a-form-item field="student_num" label="学号">
|
|
<a-form-item field="student_num" label="学号">
|
|
|
- <a-input v-model="form.student_num" placeholder="账号所有者学号,填写错误将无法登录" allow-clear />
|
|
|
|
|
|
|
+ <a-input v-model="form.student_num" placeholder="账号所有者学号" allow-clear />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item field="password" label="密码" v-if="!form.id">
|
|
|
|
|
+ <a-input-password v-model="form.password" placeholder="乐跑账号密码,填写错误将无法添加账号" allow-clear />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item field="email" label="通知邮箱">
|
|
<a-form-item field="email" label="通知邮箱">
|
|
|
<a-auto-complete :data="email" @search="handleSearch" v-model="form.email" placeholder="用于接收乐跑失败、登录失效的通知"
|
|
<a-auto-complete :data="email" @search="handleSearch" v-model="form.email" placeholder="用于接收乐跑失败、登录失效的通知"
|
|
|
allow-clear />
|
|
allow-clear />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item field="area" label="乐跑跑区">
|
|
<a-form-item field="area" label="乐跑跑区">
|
|
|
- <a-select v-model="form.area" placeholder="请选择乐跑跑区" default-value="">
|
|
|
|
|
- <a-option value="">随机分配</a-option>
|
|
|
|
|
|
|
+ <a-select v-model="form.area" placeholder="请选择乐跑跑区" default-value="重庆工程学院南泉校区">
|
|
|
<a-option v-for="(item, index) in area" :key="index" :value="item">
|
|
<a-option v-for="(item, index) in area" :key="index" :value="item">
|
|
|
<span class="vipcontent">
|
|
<span class="vipcontent">
|
|
|
<span>{{ item }} </span>
|
|
<span>{{ item }} </span>
|
|
|
- <!-- <img src="@/assets/vip.svg" alt="vip" height="20"> -->
|
|
|
|
|
</span>
|
|
</span>
|
|
|
</a-option>
|
|
</a-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
@@ -271,7 +236,7 @@
|
|
|
<a-form-item field="target_count" label="乐跑目标次数" v-if="form.auto_run">
|
|
<a-form-item field="target_count" label="乐跑目标次数" v-if="form.auto_run">
|
|
|
<a-input-number v-model="form.target_count" placeholder="请输入乐跑目标次数" mode="button" />
|
|
<a-input-number v-model="form.target_count" placeholder="请输入乐跑目标次数" mode="button" />
|
|
|
<template #extra>
|
|
<template #extra>
|
|
|
- <div>当学期有效次数达到目标次数时自动乐跑将关闭,0为不限次</div>
|
|
|
|
|
|
|
+ <div>当有效次数达到目标次数时自动乐跑将关闭,0为不限次</div>
|
|
|
</template>
|
|
</template>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
<a-form-item field="auto_time" label="自动乐跑时段" v-if="form.auto_run">
|
|
<a-form-item field="auto_time" label="自动乐跑时段" v-if="form.auto_run">
|
|
@@ -284,7 +249,6 @@
|
|
|
</a-form>
|
|
</a-form>
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
|
|
|
|
- <faceModal :faceInfo="faceInfo" ref="faceRecoRef" />
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -293,16 +257,12 @@ import { accountList, deleteAccount, addAccount, changeAutoRun, singleRun } from
|
|
|
import { Modal, Notification, Message } from '@arco-design/web-vue'
|
|
import { Modal, Notification, Message } from '@arco-design/web-vue'
|
|
|
import { IconSearch } from '@arco-design/web-vue/es/icon'
|
|
import { IconSearch } from '@arco-design/web-vue/es/icon'
|
|
|
import userCard from '@/components/userCard/userCard.vue'
|
|
import userCard from '@/components/userCard/userCard.vue'
|
|
|
-import { isElectron } from '@/utils/electron'
|
|
|
|
|
-import faceModal from '@/components/FaceModal/faceModal.vue'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
|
import { getNotice } from '@/utils/util'
|
|
import { getNotice } from '@/utils/util'
|
|
|
|
|
|
|
|
const notice = ref('')
|
|
const notice = ref('')
|
|
|
|
|
|
|
|
const email = ref([])
|
|
const email = ref([])
|
|
|
-const faceInfo = ref({})
|
|
|
|
|
-const faceRecoRef = ref(null)
|
|
|
|
|
|
|
|
|
|
const queryDataForm = reactive({
|
|
const queryDataForm = reactive({
|
|
|
area: '',
|
|
area: '',
|
|
@@ -328,7 +288,7 @@ const pagination = reactive({
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const handleSearch = (value) => {
|
|
const handleSearch = (value) => {
|
|
|
- const emailSuffix = ["qq.com", "ctbu.edu.cn", "163.com"]
|
|
|
|
|
|
|
+ const emailSuffix = ["qq.com", "163.com"]
|
|
|
const input = (value || "").trim()
|
|
const input = (value || "").trim()
|
|
|
|
|
|
|
|
if (!input) {
|
|
if (!input) {
|
|
@@ -428,28 +388,20 @@ const ok_loading = ref(false)
|
|
|
const form = reactive({
|
|
const form = reactive({
|
|
|
id: null,
|
|
id: null,
|
|
|
student_num: '',
|
|
student_num: '',
|
|
|
|
|
+ password: '',
|
|
|
email: '',
|
|
email: '',
|
|
|
distance: [2.00, 4.00],
|
|
distance: [2.00, 4.00],
|
|
|
area: '',
|
|
area: '',
|
|
|
auto_time: -1,
|
|
auto_time: -1,
|
|
|
auto_run: 1,
|
|
auto_run: 1,
|
|
|
- target_count: 30,
|
|
|
|
|
|
|
+ target_count: 0,
|
|
|
notes: ''
|
|
notes: ''
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const download = () => {
|
|
|
|
|
- const a = document.createElement('a');
|
|
|
|
|
- a.href = 'https:\/\/lepao-cloud.xxoo365.top\/down.php\/682d99f9694c6fe76b64b86c5741a2d8.pdf';
|
|
|
|
|
- a.download = 'RunForge操作说明.pdf'
|
|
|
|
|
- a.target = '_blank'
|
|
|
|
|
- document.body.appendChild(a);
|
|
|
|
|
- a.click();
|
|
|
|
|
- document.body.removeChild(a);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
const editAccount = (item) => {
|
|
const editAccount = (item) => {
|
|
|
if (item) {
|
|
if (item) {
|
|
|
form.id = item.id
|
|
form.id = item.id
|
|
|
|
|
+ form.password = ''
|
|
|
form.student_num = item.student_num
|
|
form.student_num = item.student_num
|
|
|
form.email = item.email
|
|
form.email = item.email
|
|
|
form.area = item.area
|
|
form.area = item.area
|
|
@@ -459,12 +411,13 @@ const editAccount = (item) => {
|
|
|
form.notes = item.notes
|
|
form.notes = item.notes
|
|
|
} else {
|
|
} else {
|
|
|
form.id = null
|
|
form.id = null
|
|
|
|
|
+ form.password = ''
|
|
|
form.student_num = ''
|
|
form.student_num = ''
|
|
|
form.email = ''
|
|
form.email = ''
|
|
|
form.auto_run = 1
|
|
form.auto_run = 1
|
|
|
form.auto_time = -1
|
|
form.auto_time = -1
|
|
|
- form.target_count = 30
|
|
|
|
|
- form.area = ''
|
|
|
|
|
|
|
+ form.target_count = 0
|
|
|
|
|
+ form.area = '重庆工程学院南泉校区'
|
|
|
form.notes = ''
|
|
form.notes = ''
|
|
|
}
|
|
}
|
|
|
visible.value = true
|
|
visible.value = true
|
|
@@ -473,13 +426,13 @@ const editAccount = (item) => {
|
|
|
const handleBeforeOk = async (done) => {
|
|
const handleBeforeOk = async (done) => {
|
|
|
try {
|
|
try {
|
|
|
ok_loading.value = true
|
|
ok_loading.value = true
|
|
|
- const { student_num, email } = form
|
|
|
|
|
|
|
+ const { student_num, email, password } = form
|
|
|
if (!student_num || !email) {
|
|
if (!student_num || !email) {
|
|
|
Message.error('请填写完整的账号信息')
|
|
Message.error('请填写完整的账号信息')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const studentNumRegex = /^\d{10}$/
|
|
|
|
|
|
|
+ const studentNumRegex = /^\d{9}$/
|
|
|
if (!studentNumRegex.test(student_num)) {
|
|
if (!studentNumRegex.test(student_num)) {
|
|
|
Message.error('请检查学号格式是否正确')
|
|
Message.error('请检查学号格式是否正确')
|
|
|
return false
|
|
return false
|
|
@@ -493,8 +446,7 @@ const handleBeforeOk = async (done) => {
|
|
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
|
...form,
|
|
...form,
|
|
|
- min_distance: form.distance[0],
|
|
|
|
|
- max_distance: form.distance[1]
|
|
|
|
|
|
|
+ password: btoa(password)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const res = await addAccount(data)
|
|
const res = await addAccount(data)
|