mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
perf: 完善签到功能
This commit is contained in:
parent
6937bbace8
commit
b2bb2ddb1f
@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Api;
|
namespace App\Http\Controllers\Api;
|
||||||
|
|
||||||
use App\Exceptions\ApiException;
|
use App\Models\UserCheckinMac;
|
||||||
use App\Models\User;
|
|
||||||
use App\Models\UserCheckin;
|
|
||||||
use App\Models\UserCheckinRecord;
|
use App\Models\UserCheckinRecord;
|
||||||
use App\Module\Base;
|
use App\Module\Base;
|
||||||
use Carbon\Carbon;
|
|
||||||
use Request;
|
use Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,10 +91,10 @@ class PublicController extends AbstractController
|
|||||||
$macs = explode(",", $mac);
|
$macs = explode(",", $mac);
|
||||||
foreach ($macs as $item) {
|
foreach ($macs as $item) {
|
||||||
$item = strtoupper($item);
|
$item = strtoupper($item);
|
||||||
if (Base::isMac($item) && $userCheckin = UserCheckin::whereMac($item)->first()) {
|
if (Base::isMac($item) && $UserCheckinMac = UserCheckinMac::whereMac($item)->first()) {
|
||||||
UserCheckinRecord::createInstance([
|
UserCheckinRecord::createInstance([
|
||||||
'userid' => $userCheckin->userid,
|
'userid' => $UserCheckinMac->userid,
|
||||||
'mac' => $userCheckin->mac,
|
'mac' => $UserCheckinMac->mac,
|
||||||
'time' => $time,
|
'time' => $time,
|
||||||
])->save();
|
])->save();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -848,53 +848,66 @@ class SystemController extends AbstractController
|
|||||||
$headings[] = '成员名称';
|
$headings[] = '成员名称';
|
||||||
$headings[] = '成员邮箱';
|
$headings[] = '成员邮箱';
|
||||||
$headings[] = '签到日期';
|
$headings[] = '签到日期';
|
||||||
$headings[] = '签到时间1';
|
$headings[] = '签到班次';
|
||||||
$headings[] = '签到时间2';
|
$headings[] = '首次签到时间';
|
||||||
|
$headings[] = '首次签到结果';
|
||||||
|
$headings[] = '最后签到时间';
|
||||||
|
$headings[] = '最后签到结果';
|
||||||
//
|
//
|
||||||
$sheets = [];
|
$sheets = [];
|
||||||
$start = Carbon::parse($date[0])->startOfDay();
|
$startD = Carbon::parse($date[0])->startOfDay();
|
||||||
$end = Carbon::parse($date[1])->endOfDay();
|
$endD = Carbon::parse($date[1])->endOfDay();
|
||||||
$users = User::whereIn('userid', $userid)->take(20)->get();
|
$users = User::whereIn('userid', $userid)->take(20)->get();
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$records = UserCheckinRecord::whereUserid($user->userid)->whereBetween("created_at", [$start, $end])->orderBy('id')->get();
|
$records = UserCheckinRecord::whereUserid($user->userid)->whereBetween("created_at", [$startD, $endD])->orderBy('id')->get();
|
||||||
//
|
//
|
||||||
|
$styles = ["A1:I1" => ["font" => ["bold" => true]]];
|
||||||
$datas = [];
|
$datas = [];
|
||||||
$styles = [];
|
$startT = $startD->timestamp;
|
||||||
$startT = $start->timestamp;
|
$endT = $endD->timestamp;
|
||||||
$endT = $end->timestamp;
|
|
||||||
$index = 1;
|
$index = 1;
|
||||||
while ($startT < $endT) {
|
while ($startT < $endT) {
|
||||||
$index++;
|
$index++;
|
||||||
$first = $records->whereBetween("created_at", [Carbon::parse($startT), Carbon::parse($startT + $secondStart)])->first();
|
$firstBetween = [Carbon::createFromTimestamp($startT), Carbon::createFromTimestamp($startT + $secondEnd - 1)];
|
||||||
$last = $records->whereBetween("created_at", [Carbon::parse($startT + $secondEnd), Carbon::parse($startT + 86400)])->last();
|
$lastBetween = [Carbon::createFromTimestamp($startT + $secondStart + 1), Carbon::createFromTimestamp($startT + 86400)];
|
||||||
$first = $first ? Carbon::parse($first->created_at)->timestamp : 0;
|
$firstRecord = $records->whereBetween("created_at", $firstBetween)->first();
|
||||||
$last = $last ? Carbon::parse($last->created_at)->timestamp : 0;
|
$lastRecord = $records->whereBetween("created_at", $lastBetween)->last();
|
||||||
if (empty($first) || $first > $startT + $secondStart) {
|
$firstTimestamp = $firstRecord ? Carbon::parse($firstRecord->created_at)->timestamp : 0;
|
||||||
$styles["E{$index}"] = [
|
$lastTimestamp = $lastRecord ? Carbon::parse($lastRecord->created_at)->timestamp : 0;
|
||||||
'font' => [
|
if (Base::time() < $startT) {
|
||||||
'color' => [
|
$firstResult = "-";
|
||||||
'rgb' => 'ff0000'
|
$lastResult = "-";
|
||||||
]
|
} else {
|
||||||
],
|
$firstResult = "正常";
|
||||||
];
|
$lastResult = "正常";
|
||||||
}
|
if (empty($firstTimestamp)) {
|
||||||
if (empty($last) || $last < $startT + $secondEnd) {
|
$firstResult = "缺卡";
|
||||||
$styles["F{$index}"] = [
|
$styles["G{$index}"] = ["font" => ["color" => ["rgb" => "ff0000"]]];
|
||||||
'font' => [
|
} elseif ($firstTimestamp > $startT + $secondStart) {
|
||||||
'color' => [
|
$firstResult = "迟到";
|
||||||
'rgb' => 'ff0000'
|
$styles["G{$index}"] = ["font" => ["color" => ["rgb" => "436FF6"]]];
|
||||||
]
|
}
|
||||||
],
|
if (empty($lastTimestamp)) {
|
||||||
];
|
$lastResult = "缺卡";
|
||||||
|
$styles["I{$index}"] = ["font" => ["color" => ["rgb" => "ff0000"]]];
|
||||||
|
} elseif ($lastTimestamp < $startT + $secondEnd) {
|
||||||
|
$lastResult = "早退";
|
||||||
|
$styles["I{$index}"] = ["font" => ["color" => ["rgb" => "436FF6"]]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$firstTimestamp = $firstTimestamp ? date("H:i", $firstTimestamp) : "-";
|
||||||
|
$lastTimestamp = $lastTimestamp ? date("H:i", $lastTimestamp) : "-";
|
||||||
$datas[] = [
|
$datas[] = [
|
||||||
$user->userid,
|
$user->userid,
|
||||||
$user->nickname,
|
$user->nickname,
|
||||||
$user->email,
|
$user->email,
|
||||||
date("Y-m-d", $startT),
|
date("Y-m-d", $startT),
|
||||||
$first ? date("H:i", $first) : '-',
|
implode("-", $time),
|
||||||
$last ? date("H:i", $last) : '-',
|
$firstTimestamp,
|
||||||
|
$firstResult,
|
||||||
|
$lastTimestamp,
|
||||||
|
$lastResult,
|
||||||
];
|
];
|
||||||
$startT += 86400;
|
$startT += 86400;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,12 +7,11 @@ use App\Models\Meeting;
|
|||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
use App\Models\UmengAlias;
|
use App\Models\UmengAlias;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\UserCheckin;
|
use App\Models\UserCheckinMac;
|
||||||
use App\Models\UserDelete;
|
use App\Models\UserDelete;
|
||||||
use App\Models\UserDepartment;
|
use App\Models\UserDepartment;
|
||||||
use App\Models\UserEmailVerification;
|
use App\Models\UserEmailVerification;
|
||||||
use App\Models\UserTransfer;
|
use App\Models\UserTransfer;
|
||||||
use App\Models\WebSocket;
|
|
||||||
use App\Models\WebSocketDialog;
|
use App\Models\WebSocketDialog;
|
||||||
use App\Models\WebSocketDialogMsg;
|
use App\Models\WebSocketDialogMsg;
|
||||||
use App\Module\AgoraIO\AgoraTokenGenerator;
|
use App\Module\AgoraIO\AgoraTokenGenerator;
|
||||||
@ -506,13 +505,13 @@ class UsersController extends AbstractController
|
|||||||
* - no: 未认证
|
* - no: 未认证
|
||||||
* - 其他值: 全部(默认)
|
* - 其他值: 全部(默认)
|
||||||
* - keys.department 部门ID(0表示默认部门,不赋值获取所有部门)
|
* - keys.department 部门ID(0表示默认部门,不赋值获取所有部门)
|
||||||
* - keys.checkin_mac 签到mac地址
|
* - keys.checkin_mac 签到mac地址(get_checkin_mac=1时有效)
|
||||||
*
|
*
|
||||||
* @apiParam {Number} [checkin_mac] 获取签到mac地址
|
* @apiParam {Number} [get_checkin_mac] 获取签到mac地址
|
||||||
* - 0: 不获取(默认)
|
* - 0: 不获取(默认)
|
||||||
* - 1: 获取
|
* - 1: 获取
|
||||||
* @apiParam {Number} [page] 当前页,默认:1
|
* @apiParam {Number} [page] 当前页,默认:1
|
||||||
* @apiParam {Number} [pagesize] 每页显示数量,默认:20,最大:50
|
* @apiParam {Number} [pagesize] 每页显示数量,默认:20,最大:50
|
||||||
*
|
*
|
||||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
@ -525,6 +524,7 @@ class UsersController extends AbstractController
|
|||||||
$builder = User::select(['*', 'nickname as nickname_original']);
|
$builder = User::select(['*', 'nickname as nickname_original']);
|
||||||
//
|
//
|
||||||
$keys = Request::input('keys');
|
$keys = Request::input('keys');
|
||||||
|
$getCheckinMac = intval(Request::input('get_checkin_mac')) === 1;
|
||||||
if (is_array($keys)) {
|
if (is_array($keys)) {
|
||||||
if ($keys['key']) {
|
if ($keys['key']) {
|
||||||
if (str_contains($keys['key'], "@")) {
|
if (str_contains($keys['key'], "@")) {
|
||||||
@ -577,9 +577,9 @@ class UsersController extends AbstractController
|
|||||||
$builder->where("department", "like", "%,{$keys['department']},%");
|
$builder->where("department", "like", "%,{$keys['department']},%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($keys['checkin_mac'])) {
|
if ($getCheckinMac && isset($keys['checkin_mac'])) {
|
||||||
$builder->whereIn('userid', function ($query) use ($keys) {
|
$builder->whereIn('userid', function ($query) use ($keys) {
|
||||||
$query->select('userid')->from('user_checkins')->where("mac", "like", "%{$keys['checkin_mac']}%");
|
$query->select('userid')->from('user_checkin_macs')->where("mac", "like", "%{$keys['checkin_mac']}%");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -587,9 +587,9 @@ class UsersController extends AbstractController
|
|||||||
}
|
}
|
||||||
$list = $builder->orderByDesc('userid')->paginate(Base::getPaginate(50, 20));
|
$list = $builder->orderByDesc('userid')->paginate(Base::getPaginate(50, 20));
|
||||||
//
|
//
|
||||||
if (intval(Request::input('checkin_mac')) === 1) {
|
if ($getCheckinMac) {
|
||||||
$list->transform(function (User $user) {
|
$list->transform(function (User $user) {
|
||||||
$user->checkin_macs = UserCheckin::whereUserid($user->userid)->orderBy('id')->pluck('mac');
|
$user->checkin_macs = UserCheckinMac::whereUserid($user->userid)->orderBy('id')->pluck('mac');
|
||||||
return $user;
|
return $user;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -666,7 +666,7 @@ class UsersController extends AbstractController
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return UserCheckin::saveMac($userInfo->userid, $array);
|
return UserCheckinMac::saveMac($userInfo->userid, $array);
|
||||||
|
|
||||||
case 'department':
|
case 'department':
|
||||||
if (!is_array($data['department'])) {
|
if (!is_array($data['department'])) {
|
||||||
@ -1336,7 +1336,7 @@ class UsersController extends AbstractController
|
|||||||
{
|
{
|
||||||
$user = User::auth();
|
$user = User::auth();
|
||||||
//
|
//
|
||||||
$list = UserCheckin::whereUserid($user->userid)->orderBy('id')->get();
|
$list = UserCheckinMac::whereUserid($user->userid)->orderBy('id')->get();
|
||||||
//
|
//
|
||||||
return Base::retSuccess('success', $list);
|
return Base::retSuccess('success', $list);
|
||||||
}
|
}
|
||||||
@ -1386,6 +1386,6 @@ class UsersController extends AbstractController
|
|||||||
return Base::retError('最多只能添加3个MAC地址');
|
return Base::retError('最多只能添加3个MAC地址');
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
return UserCheckin::saveMac($user->userid, $array);
|
return UserCheckinMac::saveMac($user->userid, $array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace App\Models;
|
|||||||
use App\Module\Base;
|
use App\Module\Base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App\Models\UserCheckin
|
* App\Models\UserCheckinMac
|
||||||
*
|
*
|
||||||
* @property int $id
|
* @property int $id
|
||||||
* @property int|null $userid 会员id
|
* @property int|null $userid 会员id
|
||||||
@ -14,18 +14,18 @@ use App\Module\Base;
|
|||||||
* @property string|null $remark 备注
|
* @property string|null $remark 备注
|
||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin newModelQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac newModelQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin newQuery()
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac newQuery()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin query()
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac query()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereCreatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereCreatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereId($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereId($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereMac($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereMac($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereRemark($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereRemark($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereUpdatedAt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereUpdatedAt($value)
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckin whereUserid($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereUserid($value)
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
class UserCheckin extends AbstractModel
|
class UserCheckinMac extends AbstractModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 保存mac地址
|
* 保存mac地址
|
||||||
@ -45,7 +45,7 @@ class UserCheckin extends AbstractModel
|
|||||||
'remark' => $item['remark']
|
'remark' => $item['remark']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$row = UserCheckin::updateInsert([
|
$row = self::updateInsert([
|
||||||
'userid' => $userid,
|
'userid' => $userid,
|
||||||
'mac' => $item['mac']
|
'mac' => $item['mac']
|
||||||
], $update);
|
], $update);
|
||||||
@ -54,7 +54,7 @@ class UserCheckin extends AbstractModel
|
|||||||
$list[] = $row;
|
$list[] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UserCheckin::whereUserid($userid)->whereNotIn('id', $ids)->delete();
|
self::whereUserid($userid)->whereNotIn('id', $ids)->delete();
|
||||||
//
|
//
|
||||||
return Base::retSuccess('修改成功', $list);
|
return Base::retSuccess('修改成功', $list);
|
||||||
});
|
});
|
||||||
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateUserCheckinsTable extends Migration
|
class CreateUserCheckinMacsTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@ -13,7 +13,7 @@ class CreateUserCheckinsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('user_checkins', function (Blueprint $table) {
|
Schema::create('user_checkin_macs', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->bigInteger('userid')->nullable()->default(0)->comment('会员id');
|
$table->bigInteger('userid')->nullable()->default(0)->comment('会员id');
|
||||||
$table->string('mac', 100)->nullable()->default('')->comment('MAC地址');
|
$table->string('mac', 100)->nullable()->default('')->comment('MAC地址');
|
||||||
@ -29,6 +29,6 @@ class CreateUserCheckinsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('user_checkins');
|
Schema::dropIfExists('user_checkin_macs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="mode==='checkin_mac'">
|
<li v-if="checkinMac">
|
||||||
<div class="search-label">
|
<div class="search-label">
|
||||||
{{$L("MAC地址")}}
|
{{$L("MAC地址")}}
|
||||||
</div>
|
</div>
|
||||||
@ -284,9 +284,9 @@ export default {
|
|||||||
name: "TeamManagement",
|
name: "TeamManagement",
|
||||||
components: {UserInput},
|
components: {UserInput},
|
||||||
props: {
|
props: {
|
||||||
mode: {
|
checkinMac: {
|
||||||
type: String,
|
type: Boolean,
|
||||||
default: 'user'
|
default: false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -496,7 +496,7 @@ export default {
|
|||||||
},
|
},
|
||||||
}, [h('div', this.$L('修改密码'))]))
|
}, [h('div', this.$L('修改密码'))]))
|
||||||
|
|
||||||
if (this.mode === 'checkin_mac') {
|
if (this.checkinMac) {
|
||||||
dropdownItems.push(h('EDropdownItem', {
|
dropdownItems.push(h('EDropdownItem', {
|
||||||
props: {
|
props: {
|
||||||
command: 'checkin_mac',
|
command: 'checkin_mac',
|
||||||
@ -657,7 +657,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.mode === 'checkin_mac') {
|
if (this.checkinMac) {
|
||||||
this.columns.splice(5, 0, {
|
this.columns.splice(5, 0, {
|
||||||
title: this.$L('MAC地址'),
|
title: this.$L('MAC地址'),
|
||||||
key: 'checkin_mac',
|
key: 'checkin_mac',
|
||||||
@ -734,7 +734,7 @@ export default {
|
|||||||
url: 'users/lists',
|
url: 'users/lists',
|
||||||
data: {
|
data: {
|
||||||
keys,
|
keys,
|
||||||
checkin_mac: this.mode === 'checkin_mac' ? 1 : 0,
|
get_checkin_mac: this.checkinMac ? 1 : 0,
|
||||||
page: Math.max(this.page, 1),
|
page: Math.max(this.page, 1),
|
||||||
pagesize: Math.max($A.runNum(this.pageSize), 10),
|
pagesize: Math.max($A.runNum(this.pageSize), 10),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="setting-item submit">
|
<div class="setting-item submit">
|
||||||
<Form ref="formData" label-width="auto" @submit.native.prevent>
|
<Form ref="formData" label-width="auto" @submit.native.prevent>
|
||||||
<Alert show-icon style="margin-bottom:18px">
|
<Alert style="margin-bottom:18px">
|
||||||
{{$L('手机连接上指定WIFI后自动签到。')}}
|
{{$L('设备连接上指定路由器(WiFi)后自动签到。')}}
|
||||||
</Alert>
|
</Alert>
|
||||||
<Row class="setting-template">
|
<Row class="setting-template">
|
||||||
<Col span="12">{{$L('MAC地址')}}</Col>
|
<Col span="12">{{$L('设备MAC地址')}}</Col>
|
||||||
<Col span="12">{{$L('备注')}}</Col>
|
<Col span="12">{{$L('备注')}}</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row v-for="(item, key) in formData" :key="key" class="setting-template">
|
<Row v-for="(item, key) in formData" :key="key" class="setting-template">
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<Input
|
<Input
|
||||||
v-model="item.mac"
|
v-model="item.mac"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
:placeholder="$L('请输入MAC地址')"
|
:placeholder="$L('请输入设备MAC地址')"
|
||||||
clearable
|
clearable
|
||||||
@on-clear="delDatum(key)"/>
|
@on-clear="delDatum(key)"/>
|
||||||
</Col>
|
</Col>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<Input v-model="item.remark" :maxlength="100" :placeholder="$L('备注')"/>
|
<Input v-model="item.remark" :maxlength="100" :placeholder="$L('备注')"/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Button type="default" icon="md-add" @click="addDatum">{{$L('添加地址')}}</Button>
|
<Button type="default" icon="md-add" @click="addDatum">{{$L('添加设备')}}</Button>
|
||||||
</Form>
|
</Form>
|
||||||
<div class="setting-footer">
|
<div class="setting-footer">
|
||||||
<Button :loading="loadIng > 0" type="primary" @click="submitForm">{{$L('提交')}}</Button>
|
<Button :loading="loadIng > 0" type="primary" @click="submitForm">{{$L('提交')}}</Button>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="setting-component-item">
|
<div class="setting-component-item">
|
||||||
<Form ref="formData" :model="formData" :rules="ruleData" label-width="auto" @submit.native.prevent>
|
<Form ref="formData" :model="formData" :rules="ruleData" label-width="auto" @submit.native.prevent>
|
||||||
<div class="block-setting-box">
|
<div class="block-setting-box">
|
||||||
<h3>{{ $L('WIFI自动签到') }}</h3>
|
<h3>{{ $L('自动签到') }}</h3>
|
||||||
<FormItem :label="$L('功能开启')" prop="open">
|
<FormItem :label="$L('功能开启')" prop="open">
|
||||||
<RadioGroup v-model="formData.open">
|
<RadioGroup v-model="formData.open">
|
||||||
<Radio label="open">{{ $L('开启') }}</Radio>
|
<Radio label="open">{{ $L('开启') }}</Radio>
|
||||||
@ -21,15 +21,12 @@
|
|||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<div class="form-tip">{{$L('允许成员自己修改MAC地址')}}</div>
|
<div class="form-tip">{{$L('允许成员自己修改MAC地址')}}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('功能说明')" prop="explain">
|
<FormItem :label="$L('安装说明')" prop="explain">
|
||||||
<p>1. {{$L('此功能仅支持手机客户端使用。')}}</p>
|
<p>1. {{$L('签到延迟时长为±1分钟。')}}</p>
|
||||||
<p>2. {{$L('手机连接上指定路由器WIFI后自动签到。')}}{{$L('(注:不限制连接方式)')}}</p>
|
<p>2. {{$L('设备连接上指定路由器(WiFi)后自动签到。')}}</p>
|
||||||
<p>3. {{$L('签到延迟时长为±1分钟。')}}</p>
|
<p>3. {{$L('仅支持Openwrt系统的路由器。')}}</p>
|
||||||
</FormItem>
|
<p>4. {{$L('关闭签到功能再开启需要重新安装。')}}</p>
|
||||||
<FormItem :label="$L('安装说明')" prop="install">
|
<p>5. {{$L('进入路由器终端执行以下命令即可完成安装:')}}</p>
|
||||||
<p>1. {{$L('此功能仅支持Openwrt系统的路由器。')}}</p>
|
|
||||||
<p>2. {{$L('关闭签到功能再开启需要重新安装。')}}</p>
|
|
||||||
<p>3. {{$L('进入路由器终端执行以下命令即可完成安装:')}}</p>
|
|
||||||
<Input ref="cmd" @on-focus="clickCmd" style="margin-top:6px" type="textarea" readonly :value="formData.cmd"/>
|
<Input ref="cmd" @on-focus="clickCmd" style="margin-top:6px" type="textarea" readonly :value="formData.cmd"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</template>
|
</template>
|
||||||
@ -59,17 +56,17 @@
|
|||||||
:placeholder="$L('请选择签到日期')"/>
|
:placeholder="$L('请选择签到日期')"/>
|
||||||
<div class="form-tip page-setting-checkin-export-common">
|
<div class="form-tip page-setting-checkin-export-common">
|
||||||
{{$L('快捷选择')}}:
|
{{$L('快捷选择')}}:
|
||||||
<em @click="exportData.date=dateShortcuts('prev')">上个月</em>
|
<em @click="exportData.date=dateShortcuts('prev')">{{$L('上个月')}}</em>
|
||||||
<em @click="exportData.date=dateShortcuts('this')">这个月</em>
|
<em @click="exportData.date=dateShortcuts('this')">{{$L('这个月')}}</em>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('签到时间')">
|
<FormItem :label="$L('签到班次')">
|
||||||
<TimePicker
|
<TimePicker
|
||||||
v-model="exportData.time"
|
v-model="exportData.time"
|
||||||
type="timerange"
|
type="timerange"
|
||||||
format="HH:mm"
|
format="HH:mm"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:placeholder="$L('请选择签到时间')"/>
|
:placeholder="$L('请选择签到班次')"/>
|
||||||
<div class="form-tip page-setting-checkin-export-common">
|
<div class="form-tip page-setting-checkin-export-common">
|
||||||
{{$L('快捷选择')}}:
|
{{$L('快捷选择')}}:
|
||||||
<em @click="exportData.time=['8:30', '18:00']">8:30-18:00</em>
|
<em @click="exportData.time=['8:30', '18:00']">8:30-18:00</em>
|
||||||
@ -89,7 +86,7 @@
|
|||||||
v-model="allUserShow"
|
v-model="allUserShow"
|
||||||
placement="right"
|
placement="right"
|
||||||
:size="1380">
|
:size="1380">
|
||||||
<TeamManagement v-if="allUserShow" mode="checkin_mac"/>
|
<TeamManagement v-if="allUserShow" checkin-mac/>
|
||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -96,6 +96,7 @@
|
|||||||
}
|
}
|
||||||
.management-user {
|
.management-user {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user