leadal-auth 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -167
- package/lib/leadal-auth.common.js +220 -198
- package/lib/leadal-auth.css +1 -1
- package/lib/leadal-auth.umd.js +220 -198
- package/lib/leadal-auth.umd.min.js +7 -7
- package/package.json +1 -1
- package/lib/img/finger-status-1-last.ad7c6895.png +0 -0
- package/lib/img/finger-status-1.220235cf.gif +0 -0
- package/lib/img/finger-status-2-last.52c6c2f8.png +0 -0
- package/lib/img/finger-status-2.482c9fce.gif +0 -0
- package/lib/img/finger-status-3-last.fc001fed.png +0 -0
- package/lib/img/finger-status-3.3e090300.gif +0 -0
- package/lib/img/finger-status-compeleted.fc001fed.png +0 -0
- package/lib/img/finger-status-start.a6cdd794.png +0 -0
package/README.md
CHANGED
|
@@ -16,184 +16,43 @@
|
|
|
16
16
|
### 安装
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npm install
|
|
19
|
+
npm install leadal-auth
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### 基本使用
|
|
23
23
|
|
|
24
24
|
```javascript
|
|
25
25
|
import Vue from 'vue'
|
|
26
|
-
import
|
|
27
|
-
import '
|
|
28
|
-
|
|
29
|
-
Vue.use(
|
|
30
|
-
baseUrl:
|
|
31
|
-
|
|
26
|
+
import LeadalAuth from 'leadal-auth'
|
|
27
|
+
import 'leadal-auth/lib/leadal-auth.css' // 引入样式文件(必需)
|
|
28
|
+
|
|
29
|
+
Vue.use(LeadalAuth, {
|
|
30
|
+
baseUrl: "http://dftdm.netiler.com",
|
|
31
|
+
authUrl: "http://dftdm.netiler.com",
|
|
32
|
+
websocketUrl: "ws://10.1.22.32:38280",
|
|
33
|
+
modules: [
|
|
34
|
+
{
|
|
35
|
+
value: "idCard",
|
|
36
|
+
label: "身份卡绑定",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "finger",
|
|
40
|
+
label: "指纹绑定",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "face",
|
|
44
|
+
label: "人脸绑定",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
});
|
|
32
48
|
```
|
|
33
49
|
|
|
34
50
|
在模板中使用:
|
|
35
51
|
|
|
36
52
|
```vue
|
|
37
53
|
<template>
|
|
38
|
-
<div>
|
|
39
|
-
<auth-manage
|
|
40
|
-
<!-- 自定义插槽内容 -->
|
|
41
|
-
<template #face>
|
|
42
|
-
<!-- 人脸采集组件 -->
|
|
43
|
-
</template>
|
|
44
|
-
<template #finger>
|
|
45
|
-
<!-- 指纹采集组件 -->
|
|
46
|
-
</template>
|
|
47
|
-
<template #idCard>
|
|
48
|
-
<!-- 身份卡绑定组件 -->
|
|
49
|
-
</template>
|
|
50
|
-
</auth-manage>
|
|
54
|
+
<div style="height: calc(100vh - 108px);padding: 12px;box-sizing: border-box;">
|
|
55
|
+
<auth-manage> </auth-manage>
|
|
51
56
|
</div>
|
|
52
57
|
</template>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## 📖 核心组件
|
|
56
|
-
|
|
57
|
-
### AuthManage 主组件
|
|
58
|
-
|
|
59
|
-
机构管理的主要组件,包含机构树和用户管理功能。
|
|
60
|
-
|
|
61
|
-
**Props:**
|
|
62
|
-
- `authCollect` (Array): 认证方式集合,默认 `['face', 'finger', 'idCard']`
|
|
63
|
-
|
|
64
|
-
**插槽:**
|
|
65
|
-
- `face`: 人脸采集组件插槽
|
|
66
|
-
- `finger`: 指纹采集组件插槽
|
|
67
|
-
- `idCard`: 身份卡绑定组件插槽
|
|
68
|
-
|
|
69
|
-
### OrganTree 机构树组件
|
|
70
|
-
|
|
71
|
-
提供机构的树形展示和管理功能。
|
|
72
|
-
|
|
73
|
-
**功能:**
|
|
74
|
-
- 懒加载机构树数据
|
|
75
|
-
- 新增/编辑/删除机构
|
|
76
|
-
- 支持无限层级结构
|
|
77
|
-
|
|
78
|
-
### UserTable 用户管理组件
|
|
79
|
-
|
|
80
|
-
用户数据的表格展示和批量操作。
|
|
81
|
-
|
|
82
|
-
**功能:**
|
|
83
|
-
- 分页展示用户列表
|
|
84
|
-
- 用户搜索和筛选
|
|
85
|
-
- 批量操作(启用/禁用/删除/调换机构)
|
|
86
|
-
- 密码重置功能
|
|
87
|
-
|
|
88
|
-
### UserDrawer 用户详情抽屉
|
|
89
|
-
|
|
90
|
-
用户信息编辑和认证管理界面。
|
|
91
|
-
|
|
92
|
-
**功能:**
|
|
93
|
-
- 用户基本信息编辑
|
|
94
|
-
- 多种认证方式管理
|
|
95
|
-
- 支持自定义认证组件
|
|
96
|
-
|
|
97
|
-
## 🔧 开发
|
|
98
|
-
|
|
99
|
-
### 环境要求
|
|
100
|
-
|
|
101
|
-
- Node.js >= 12
|
|
102
|
-
- Vue 2.6+
|
|
103
|
-
- Element UI 2.15+
|
|
104
|
-
|
|
105
|
-
### 本地开发
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# 克隆项目
|
|
109
|
-
git clone [repository-url]
|
|
110
|
-
|
|
111
|
-
# 安装依赖
|
|
112
|
-
npm install
|
|
113
|
-
|
|
114
|
-
# 启动开发服务器
|
|
115
|
-
npm run serve
|
|
116
|
-
|
|
117
|
-
# 构建生产版本
|
|
118
|
-
npm run build
|
|
119
|
-
|
|
120
|
-
# 构建组件库
|
|
121
|
-
npm run package
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### 项目结构
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
src/
|
|
128
|
-
├── api/ # API 接口定义
|
|
129
|
-
├── components/ # 组件库
|
|
130
|
-
│ ├── auth-com.vue # 认证组件
|
|
131
|
-
│ ├── organ-tree.vue # 机构树组件
|
|
132
|
-
│ ├── tree-select.vue # 树形选择器
|
|
133
|
-
│ ├── user-drawer.vue # 用户详情抽屉
|
|
134
|
-
│ ├── user-info.vue # 用户信息组件
|
|
135
|
-
│ └── user-table.vue # 用户表格组件
|
|
136
|
-
├── package/ # 组件库打包入口
|
|
137
|
-
│ └── auth-manage/ # 主组件
|
|
138
|
-
├── store/ # Vuex 状态管理
|
|
139
|
-
├── styles/ # 样式文件
|
|
140
|
-
└── utils/ # 工具函数
|
|
141
|
-
├── dict.js # 数据字典
|
|
142
|
-
└── request.js # HTTP 请求封装
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## 🌐 API 接口
|
|
146
|
-
|
|
147
|
-
### 机构管理接口
|
|
148
|
-
|
|
149
|
-
- `GET /api/fencing-component-api/organization/tree` - 获取机构树
|
|
150
|
-
- `POST /api/fencing-component-api/organization/save` - 保存机构
|
|
151
|
-
- `DELETE /api/fencing-component-api/organization/delete` - 删除机构
|
|
152
|
-
|
|
153
|
-
### 用户管理接口
|
|
154
|
-
|
|
155
|
-
- `GET /api/fencing-component-api/user/page/{page}/{size}` - 分页查询用户
|
|
156
|
-
- `POST /api/fencing-component-api/user/save` - 保存用户
|
|
157
|
-
- `DELETE /api/fencing-component-api/user/delete` - 删除用户
|
|
158
|
-
- `POST /api/fencing-component-api/user/update-status` - 更新用户状态
|
|
159
|
-
- `POST /api/fencing-component-api/user/reset-password` - 重置密码
|
|
160
|
-
- `POST /api/fencing-component-api/user/move` - 移动用户
|
|
161
|
-
|
|
162
|
-
## 📝 数据字典
|
|
163
|
-
|
|
164
|
-
### 用户性别
|
|
165
|
-
- 0: 男
|
|
166
|
-
- 1: 女
|
|
167
|
-
- 2: 保密
|
|
168
|
-
|
|
169
|
-
### 用户类型
|
|
170
|
-
- 0: 系统用户
|
|
171
|
-
- 1: 临时用户
|
|
172
|
-
- 2: 职员
|
|
173
|
-
- 4: 会员
|
|
174
|
-
|
|
175
|
-
### 密级
|
|
176
|
-
- 0: 非密
|
|
177
|
-
- 1: 一般
|
|
178
|
-
- 2: 重要
|
|
179
|
-
- 3: 核心
|
|
180
|
-
|
|
181
|
-
### 认证类型
|
|
182
|
-
- face: 人脸采集
|
|
183
|
-
- finger: 指纹采集
|
|
184
|
-
- idCard: 身份卡绑定
|
|
185
|
-
|
|
186
|
-
## 🎨 样式定制
|
|
187
|
-
|
|
188
|
-
组件使用 SCSS 进行样式开发,支持主题定制。主要样式文件:
|
|
189
|
-
|
|
190
|
-
- `src/styles/index.scss` - 全局样式
|
|
191
|
-
- 各组件的 `<style>` 块 - 组件特定样式
|
|
192
|
-
|
|
193
|
-
## 🤝 贡献指南
|
|
194
|
-
|
|
195
|
-
1. Fork 本仓库
|
|
196
|
-
2. 创建您的特性分支 (`git checkout -b feature/AmazingFeature`)
|
|
197
|
-
3. 提交您的修改 (`git commit -m 'Add some AmazingFeature'`)
|
|
198
|
-
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
|
199
|
-
5. 打开一个 Pull Request
|
|
58
|
+
```
|