Compare commits
5
Commits
31fca48feb
...
mgy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d74cbcb229 | ||
|
|
f023e4b64a | ||
|
|
5158fd19d9 | ||
|
|
1caeba1225 | ||
|
|
44ce17d43d |
+12
-1
@@ -13,7 +13,11 @@ export default [
|
||||
routes: [
|
||||
{ path: '/admin', redirect: '/admin/dutyinfo' },
|
||||
{ path: '/admin/dutyinfo', name: '值班信息', component: './Admin/DutyInfo' },
|
||||
{ path: '/admin/dutytable', name: '值班表管理', component: './Admin/DutyTable' },
|
||||
{
|
||||
path: '/admin/dutytable',
|
||||
name: '值班表管理',
|
||||
component: './Admin/DutyTable',
|
||||
},
|
||||
{ path: '/admin/logs', name: '日志', component: './Admin/Logs' },
|
||||
],
|
||||
},
|
||||
@@ -29,6 +33,13 @@ export default [
|
||||
{ path: '/leader/askleave', name: '请假管理', component: './Leader/AskLeave' },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/admin/dutytable/edit',
|
||||
component: './Admin/DutyTable/EditTable',
|
||||
menu: {
|
||||
hideInMenu: true,
|
||||
},
|
||||
},
|
||||
{ name: '关于我们', icon: 'thunderbolt', path: '/about', component: './About' },
|
||||
{ path: '/', redirect: '/welcome' },
|
||||
{ path: '*', layout: false, component: './404' },
|
||||
|
||||
+113
-8
@@ -24,7 +24,79 @@
|
||||
}
|
||||
```
|
||||
|
||||
### `GET`请求默认格式(若无特殊说明)
|
||||
### `GET` 请求默认格式(若无特殊说明)
|
||||
|
||||
```json
|
||||
{
|
||||
"token": "token_test"
|
||||
}
|
||||
```
|
||||
|
||||
## 登陆
|
||||
|
||||
### 账号密码登陆 `POST /login`
|
||||
|
||||
request:
|
||||
|
||||
```json
|
||||
{
|
||||
"stuid": "3220114514",
|
||||
"passwd": "__passwd_test__"
|
||||
}
|
||||
```
|
||||
|
||||
data:
|
||||
|
||||
.role
|
||||
|
||||
-1 => 未定
|
||||
|
||||
0 => 干事
|
||||
|
||||
1 => 部长
|
||||
|
||||
2 => 会长
|
||||
|
||||
3 => 副会长
|
||||
|
||||
4 => 技术指导
|
||||
|
||||
5 => 已退休
|
||||
|
||||
6 => 管理员
|
||||
|
||||
7 => 副部长
|
||||
|
||||
8 => 总监
|
||||
|
||||
.department
|
||||
|
||||
-1 => 未定
|
||||
|
||||
0 => 电器部
|
||||
|
||||
1 => 电脑部
|
||||
|
||||
2 => 人资部
|
||||
|
||||
3 => 文宣部
|
||||
|
||||
4 => 财外部
|
||||
|
||||
```json
|
||||
{
|
||||
"token": "token_test",
|
||||
"name": "亦可",
|
||||
"avatar": "https://....png",
|
||||
"role": 6,
|
||||
"department": 1,
|
||||
"access": "admin" // "admin" => 主席团成员 "leader" => 值班组长 "member" => 普通成员
|
||||
}
|
||||
```
|
||||
|
||||
### 登出 `POST /logout`
|
||||
|
||||
request:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -86,10 +158,12 @@ data:
|
||||
"otherDutyTime": [
|
||||
{
|
||||
"name": "第一班",
|
||||
"place": "蓝田",
|
||||
"range": ["2024-03-07T19:52:48.523303", "2024-03-07T19:52:48.523303"]
|
||||
},
|
||||
{
|
||||
"name": "第二班",
|
||||
"place": "蓝田",
|
||||
"range": ["2024-03-07T19:52:48.523303", "2024-03-07T19:52:48.523303"]
|
||||
},
|
||||
...
|
||||
@@ -102,19 +176,50 @@ data:
|
||||
|
||||
#### 更新当前值班情况 `POST /admin/duty/update`
|
||||
|
||||
无关项返回空字符串,后端手动校验
|
||||
无关项不返回,后端手动校验
|
||||
|
||||
新增字段:dutyStatus "normal" => 正常值班 "others" => 特殊值班 "pause" => 暂停值班
|
||||
|
||||
request:
|
||||
|
||||
##### 正常值班
|
||||
|
||||
```json
|
||||
{
|
||||
"isNormalDuty": true,
|
||||
"currentDuty": "2",
|
||||
"dutyStatus": "normal",
|
||||
"inDutyCnt": 3,
|
||||
"otherDutyTime": [],
|
||||
"offDutyReason": "",
|
||||
"place": "204",
|
||||
"dutyRecoverTime": "",
|
||||
},
|
||||
```
|
||||
|
||||
##### 特殊值班
|
||||
|
||||
```json
|
||||
{
|
||||
"dutyStatus": "others",
|
||||
"inDutyCnt": 3,
|
||||
"otherDutyTime": [
|
||||
{
|
||||
"name": "第一班",
|
||||
"place": "蓝田",
|
||||
"range": ["2024-03-07T19:52:48.523303", "2024-03-07T19:52:48.523303"]
|
||||
},
|
||||
{
|
||||
"name": "第二班",
|
||||
"place": "蓝田",
|
||||
"range": ["2024-03-07T19:52:48.523303", "2024-03-07T19:52:48.523303"]
|
||||
},
|
||||
...
|
||||
],
|
||||
},
|
||||
```
|
||||
|
||||
##### 暂停值班
|
||||
|
||||
```json
|
||||
{
|
||||
"dutyStatus": "pause",
|
||||
"offDutyReason": "期中考试周",
|
||||
"dutyRecoverTime": "2024-03-07T19:52:48.523303",
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
+91
-92
@@ -1,93 +1,92 @@
|
||||
[
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": ""
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班",
|
||||
"substitute": "晓洋"
|
||||
}
|
||||
]
|
||||
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": ""
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
},
|
||||
{
|
||||
"member": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"reason": "英语六级口试",
|
||||
"substitute": "晓洋"
|
||||
}
|
||||
]
|
||||
|
||||
+81
-82
@@ -1,83 +1,82 @@
|
||||
[
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
}
|
||||
]
|
||||
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:48.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:49.523303",
|
||||
"week": "2",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:50.523303",
|
||||
"week": "2",
|
||||
"shift": "2",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "晓洋",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:51.523303",
|
||||
"week": "7",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:52.523303",
|
||||
"week": "7",
|
||||
"shift": "1",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:53.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:54.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:55.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:56.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
},
|
||||
{
|
||||
"op": "宇航员",
|
||||
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
|
||||
"time": "2024-03-07T19:52:57.523303",
|
||||
"week": "2",
|
||||
"shift": "3",
|
||||
"detail": "收到电脑 n 台,维修成功 m 台,已取回 x 台,有 y 台正在维修交接给下一班"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import askleavelist from './askleavelist.json';
|
||||
import conclusionlist from './conclusionlist.json';
|
||||
import loglist from './loglist.json';
|
||||
import reportlist from './reportlist.json';
|
||||
import sheet from './sheet.json';
|
||||
import sheetlist from './sheetlist.json';
|
||||
import askleavelist from './askleavelist.json';
|
||||
|
||||
module.exports = {
|
||||
'GET /stats': {
|
||||
@@ -91,6 +91,21 @@ module.exports = {
|
||||
total: 24,
|
||||
data: askleavelist,
|
||||
},
|
||||
'POST /login': {
|
||||
success: true,
|
||||
data: {
|
||||
token: 'token_test',
|
||||
name: '亦可',
|
||||
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
|
||||
role: 6,
|
||||
department: 1,
|
||||
access: 'admin',
|
||||
},
|
||||
},
|
||||
'POST /logout': {
|
||||
success: true,
|
||||
data: {},
|
||||
},
|
||||
'GET /api/currentUser': {
|
||||
success: true,
|
||||
data: {
|
||||
|
||||
+252
-254
@@ -1,260 +1,258 @@
|
||||
{
|
||||
"current": 514,
|
||||
"list": [
|
||||
[
|
||||
{
|
||||
"name": "2024 春学期值班表",
|
||||
"createdTime": "2024-03-07T19:52:48.523303",
|
||||
"id": 114,
|
||||
"isSelect": true,
|
||||
"sheet": [
|
||||
{
|
||||
"name": "2024 春学期值班表",
|
||||
"createdTime": "2024-03-07T19:52:48.523303",
|
||||
"id": 114,
|
||||
"sheet": [
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
}
|
||||
]
|
||||
"weekday": 1,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"name": "2024 秋学期值班表",
|
||||
"createdTime": "2024-03-07T11:45:14.523303",
|
||||
"id": 514,
|
||||
"sheet": [
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
}
|
||||
]
|
||||
"weekday": 1,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "2024 秋学期值班表",
|
||||
"createdTime": "2024-03-07T11:45:14.523303",
|
||||
"id": 514,
|
||||
"isSelect": false,
|
||||
"sheet": [
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 1,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 2,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 3,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 4,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 5,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 6,
|
||||
"shift": 3,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 1,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
},
|
||||
{
|
||||
"weekday": 7,
|
||||
"shift": 2,
|
||||
"workers": ["123423", "31424", "31242"],
|
||||
"leader": "3902487"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
Generated
-21929
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,11 @@ export interface Staff {
|
||||
|
||||
const staffList: Staff[] = [
|
||||
{
|
||||
avatar: 'https://blog.dawn-ocean.top/assets/img/avatar.jpg',
|
||||
avatar: 'https://wiki.zjueva.net/images/1/10/%E5%A4%B4%E5%83%8F.jpg',
|
||||
name: '马国洋',
|
||||
nickname: 'Dawn_Ocean',
|
||||
profile: 'Eta & Tea 总设计\n摸鱼与开发叠加态',
|
||||
link: 'https://blog.dawn-ocean.top',
|
||||
link: 'https://blog.deans.fun',
|
||||
linktext: '我的博客',
|
||||
},
|
||||
{
|
||||
@@ -39,6 +39,6 @@ const sideStaffList: Staff[] = [
|
||||
nickname: 'Tester',
|
||||
profile: 'Eta 系统总测试',
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export default { staffList, sideStaffList };
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { Todo } from '@/components';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { Card } from 'antd';
|
||||
|
||||
const Logs: React.FC = () => {
|
||||
return (
|
||||
<PageContainer>
|
||||
<Card>
|
||||
<Todo />
|
||||
</Card>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
export default Logs;
|
||||
@@ -0,0 +1,105 @@
|
||||
import { Todo } from '@/components';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { Card, Modal } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
const EditTable: React.FC = () => {
|
||||
const [isSaveOpen, setIsSaveOpen] = useState(false);
|
||||
const [isSetOpen, setIsSetOpen] = useState(false);
|
||||
|
||||
// const showSave = () => {
|
||||
// setIsSaveOpen(true);
|
||||
// };
|
||||
|
||||
const handleSaveOk = () => {
|
||||
setIsSaveOpen(false);
|
||||
};
|
||||
|
||||
const handleSaveCancel = () => {
|
||||
setIsSaveOpen(false);
|
||||
};
|
||||
|
||||
// const showSet = () => {
|
||||
// setIsSetOpen(true);
|
||||
// };
|
||||
|
||||
const handleSetOk = () => {
|
||||
setIsSetOpen(false);
|
||||
};
|
||||
|
||||
const handleSetCancel = () => {
|
||||
setIsSetOpen(false);
|
||||
};
|
||||
|
||||
// const columns: ProColumns<DataSourceType>[] = [
|
||||
// {
|
||||
// title: '活动名称',
|
||||
// dataIndex: 'title',
|
||||
// width: '30%',
|
||||
// formItemProps: {
|
||||
// rules: [
|
||||
// {
|
||||
// required: true,
|
||||
// whitespace: true,
|
||||
// message: '此项是必填项',
|
||||
// },
|
||||
// {
|
||||
// message: '必须包含数字',
|
||||
// pattern: /[0-9]/,
|
||||
// },
|
||||
// {
|
||||
// max: 16,
|
||||
// whitespace: true,
|
||||
// message: '最长为 16 位',
|
||||
// },
|
||||
// {
|
||||
// min: 6,
|
||||
// whitespace: true,
|
||||
// message: '最小为 6 位',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '状态',
|
||||
// key: 'state',
|
||||
// dataIndex: 'state',
|
||||
// valueType: 'select',
|
||||
// valueEnum: {
|
||||
// all: { text: '全部', status: 'Default' },
|
||||
// open: {
|
||||
// text: '未解决',
|
||||
// status: 'Error',
|
||||
// },
|
||||
// closed: {
|
||||
// text: '已解决',
|
||||
// status: 'Success',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// title: '描述',
|
||||
// dataIndex: 'decs',
|
||||
// },
|
||||
// ];
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<Modal title="确认保存?" open={isSaveOpen} onOk={handleSaveOk} onCancel={handleSaveCancel}>
|
||||
<p>保存后将回到值班表页面!</p>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="确认设为当前值班表?"
|
||||
open={isSetOpen}
|
||||
onOk={handleSetOk}
|
||||
onCancel={handleSetCancel}
|
||||
>
|
||||
<p>同一时间只能启用一份值班表!</p>
|
||||
</Modal>
|
||||
<Card>
|
||||
<Todo />
|
||||
</Card>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
export default EditTable;
|
||||
@@ -0,0 +1,10 @@
|
||||
export type TableItem = {
|
||||
id: React.Key;
|
||||
mon?: string;
|
||||
tue?: string;
|
||||
wed?: string;
|
||||
thu?: string;
|
||||
fri?: string;
|
||||
sat?: string;
|
||||
sun?: string;
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
export type DutyTableItem = {
|
||||
name: string;
|
||||
isSelect: boolean;
|
||||
time: string;
|
||||
id: number;
|
||||
};
|
||||
@@ -0,0 +1,133 @@
|
||||
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||
import { history } from '@umijs/max';
|
||||
import { Button, Card, Modal, Space, Tag } from 'antd';
|
||||
import moment from 'moment';
|
||||
import React, { useState } from 'react';
|
||||
import request from 'umi-request';
|
||||
import { DutyTableItem } from './dutyTableItem';
|
||||
|
||||
const DutyTable: React.FC = () => {
|
||||
const [isDeleteOpen, setIsDeleteOpen] = useState(false);
|
||||
const [isSetOpen, setIsSetOpen] = useState(false);
|
||||
|
||||
const showDelete = () => {
|
||||
setIsDeleteOpen(true);
|
||||
};
|
||||
|
||||
const handleDeleteOk = () => {
|
||||
setIsDeleteOpen(false);
|
||||
};
|
||||
|
||||
const handleDeleteCancel = () => {
|
||||
setIsDeleteOpen(false);
|
||||
};
|
||||
|
||||
const showSet = () => {
|
||||
setIsSetOpen(true);
|
||||
};
|
||||
|
||||
const handleSetOk = () => {
|
||||
setIsSetOpen(false);
|
||||
};
|
||||
|
||||
const handleSetCancel = () => {
|
||||
setIsSetOpen(false);
|
||||
};
|
||||
|
||||
const newDutyTable = () => {
|
||||
history.push('/admin/dutytable/edit');
|
||||
};
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<Modal
|
||||
title="确认删除?"
|
||||
open={isDeleteOpen}
|
||||
onOk={handleDeleteOk}
|
||||
onCancel={handleDeleteCancel}
|
||||
>
|
||||
<p>删除后将无法恢复!</p>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="确认设为当前值班表?"
|
||||
open={isSetOpen}
|
||||
onOk={handleSetOk}
|
||||
onCancel={handleSetCancel}
|
||||
>
|
||||
<p>同一时间只能启用一份值班表!</p>
|
||||
</Modal>
|
||||
<Card>
|
||||
<ProList<DutyTableItem>
|
||||
search={{
|
||||
filterType: 'light',
|
||||
}}
|
||||
rowKey="op"
|
||||
headerTitle="值班表列表"
|
||||
request={async (params = {} as Record<string, any>) =>
|
||||
request<{
|
||||
data: DutyTableItem[];
|
||||
}>('/admin/sheet/list', {
|
||||
params,
|
||||
})
|
||||
}
|
||||
pagination={{
|
||||
pageSize: 10,
|
||||
}}
|
||||
metas={{
|
||||
title: {
|
||||
dataIndex: 'name',
|
||||
title: '值班表',
|
||||
},
|
||||
subTitle: {
|
||||
dataIndex: ['isSelect'],
|
||||
render: (_, row) => {
|
||||
return row.isSelect ? (
|
||||
<Space size={0}>
|
||||
<Tag color="blue">当前</Tag>
|
||||
</Space>
|
||||
) : (
|
||||
<div></div>
|
||||
);
|
||||
},
|
||||
title: '值班时间',
|
||||
search: false,
|
||||
},
|
||||
extra: {
|
||||
dataIndex: 'time',
|
||||
render: (_: React.ReactNode, row: DutyTableItem) => {
|
||||
return (
|
||||
<div style={{ marginLeft: '3vh' }}>
|
||||
{moment(row.time).format('YYYY-M-D HH:mm:ss')}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
search: false,
|
||||
},
|
||||
actions: {
|
||||
render: () => [
|
||||
<a href="" target="_blank" rel="noopener noreferrer" key="view">
|
||||
查看
|
||||
</a>,
|
||||
<a onClick={showSet} key="view">
|
||||
设为当前值班表
|
||||
</a>,
|
||||
<a onClick={showDelete} key="view">
|
||||
删除
|
||||
</a>,
|
||||
],
|
||||
search: false,
|
||||
},
|
||||
}}
|
||||
toolbar={{
|
||||
actions: [
|
||||
<Button type="primary" key="primary" onClick={newDutyTable}>
|
||||
新建值班表
|
||||
</Button>,
|
||||
],
|
||||
}}
|
||||
/>
|
||||
</Card>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
export default DutyTable;
|
||||
Vendored
-13
@@ -15,11 +15,6 @@ declare namespace API {
|
||||
currentAuthority?: string;
|
||||
};
|
||||
|
||||
type PageParams = {
|
||||
current?: number;
|
||||
pageSize?: number;
|
||||
};
|
||||
|
||||
type LoginParams = {
|
||||
username?: string;
|
||||
password?: string;
|
||||
@@ -27,14 +22,6 @@ declare namespace API {
|
||||
type?: string;
|
||||
};
|
||||
|
||||
type ErrorResponse = {
|
||||
/** 业务约定的错误码 */
|
||||
errorCode: string;
|
||||
/** 业务上的错误信息 */
|
||||
errorMessage?: string;
|
||||
/** 业务上的请求是否成功 */
|
||||
success?: boolean;
|
||||
};
|
||||
type LogList = {
|
||||
pageIndex: number;
|
||||
pageCount: number;
|
||||
|
||||
Reference in New Issue
Block a user