Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
是阿延啊
gin-vue-admin
提交
100093eb
G
gin-vue-admin
项目概览
是阿延啊
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
100093eb
编写于
10月 26, 2019
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
前端upload文件 sql更新
上级
4ebd90e0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
142 addition
and
78 deletion
+142
-78
QMPlusServer/db/qmplus.sql
QMPlusServer/db/qmplus.sql
+67
-30
QMPlusVuePage/src/view/example/upload/upload.vue
QMPlusVuePage/src/view/example/upload/upload.vue
+70
-44
README.md
README.md
+5
-4
未找到文件。
QMPlusServer/db/qmplus.sql
浏览文件 @
100093eb
...
...
@@ -11,7 +11,7 @@
Target Server Version : 50644
File Encoding : 65001
Date: 2
0/10/2019 11:43:19
Date: 2
6/10/2019 23:23:45
*/
SET
NAMES
utf8mb4
;
...
...
@@ -30,7 +30,7 @@ CREATE TABLE `api_authorities` (
`api_id`
int
(
10
)
UNSIGNED
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_api_authorities_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
12
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
40
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- Records of api_authorities
...
...
@@ -44,34 +44,36 @@ INSERT INTO `api_authorities` VALUES (77, '2019-09-30 15:34:19', '2019-09-30 15:
INSERT
INTO
`api_authorities`
VALUES
(
78
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
79
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
80
,
'2019-09-30 15:34:19'
,
'2019-09-30 15:34:19'
,
NULL
,
9528
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
184
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
1
);
INSERT
INTO
`api_authorities`
VALUES
(
185
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
2
);
INSERT
INTO
`api_authorities`
VALUES
(
186
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
3
);
INSERT
INTO
`api_authorities`
VALUES
(
187
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
4
);
INSERT
INTO
`api_authorities`
VALUES
(
188
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
5
);
INSERT
INTO
`api_authorities`
VALUES
(
189
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
6
);
INSERT
INTO
`api_authorities`
VALUES
(
190
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
7
);
INSERT
INTO
`api_authorities`
VALUES
(
191
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
8
);
INSERT
INTO
`api_authorities`
VALUES
(
192
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
9
);
INSERT
INTO
`api_authorities`
VALUES
(
193
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
10
);
INSERT
INTO
`api_authorities`
VALUES
(
194
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
11
);
INSERT
INTO
`api_authorities`
VALUES
(
195
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
12
);
INSERT
INTO
`api_authorities`
VALUES
(
196
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
13
);
INSERT
INTO
`api_authorities`
VALUES
(
197
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
14
);
INSERT
INTO
`api_authorities`
VALUES
(
198
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
15
);
INSERT
INTO
`api_authorities`
VALUES
(
199
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
16
);
INSERT
INTO
`api_authorities`
VALUES
(
200
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
201
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
18
);
INSERT
INTO
`api_authorities`
VALUES
(
202
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
19
);
INSERT
INTO
`api_authorities`
VALUES
(
203
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
20
);
INSERT
INTO
`api_authorities`
VALUES
(
204
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
21
);
INSERT
INTO
`api_authorities`
VALUES
(
205
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
22
);
INSERT
INTO
`api_authorities`
VALUES
(
206
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
207
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
208
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
28
);
INSERT
INTO
`api_authorities`
VALUES
(
209
,
'2019-10-09 23:01:52'
,
'2019-10-09 23:01:52'
,
NULL
,
888
,
29
);
INSERT
INTO
`api_authorities`
VALUES
(
210
,
'2019-10-09 23:04:56'
,
'2019-10-09 23:04:56'
,
NULL
,
999
,
1
);
INSERT
INTO
`api_authorities`
VALUES
(
211
,
'2019-10-09 23:04:56'
,
'2019-10-09 23:04:56'
,
NULL
,
999
,
2
);
INSERT
INTO
`api_authorities`
VALUES
(
212
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
1
);
INSERT
INTO
`api_authorities`
VALUES
(
213
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
2
);
INSERT
INTO
`api_authorities`
VALUES
(
214
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
3
);
INSERT
INTO
`api_authorities`
VALUES
(
215
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
4
);
INSERT
INTO
`api_authorities`
VALUES
(
216
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
5
);
INSERT
INTO
`api_authorities`
VALUES
(
217
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
6
);
INSERT
INTO
`api_authorities`
VALUES
(
218
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
7
);
INSERT
INTO
`api_authorities`
VALUES
(
219
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
8
);
INSERT
INTO
`api_authorities`
VALUES
(
220
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
9
);
INSERT
INTO
`api_authorities`
VALUES
(
221
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
10
);
INSERT
INTO
`api_authorities`
VALUES
(
222
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
11
);
INSERT
INTO
`api_authorities`
VALUES
(
223
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
12
);
INSERT
INTO
`api_authorities`
VALUES
(
224
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
13
);
INSERT
INTO
`api_authorities`
VALUES
(
225
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
14
);
INSERT
INTO
`api_authorities`
VALUES
(
226
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
15
);
INSERT
INTO
`api_authorities`
VALUES
(
227
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
16
);
INSERT
INTO
`api_authorities`
VALUES
(
228
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
17
);
INSERT
INTO
`api_authorities`
VALUES
(
229
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
18
);
INSERT
INTO
`api_authorities`
VALUES
(
230
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
19
);
INSERT
INTO
`api_authorities`
VALUES
(
231
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
20
);
INSERT
INTO
`api_authorities`
VALUES
(
232
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
21
);
INSERT
INTO
`api_authorities`
VALUES
(
233
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
22
);
INSERT
INTO
`api_authorities`
VALUES
(
234
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
23
);
INSERT
INTO
`api_authorities`
VALUES
(
235
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
24
);
INSERT
INTO
`api_authorities`
VALUES
(
236
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
28
);
INSERT
INTO
`api_authorities`
VALUES
(
237
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
29
);
INSERT
INTO
`api_authorities`
VALUES
(
238
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
30
);
INSERT
INTO
`api_authorities`
VALUES
(
239
,
'2019-10-26 20:15:17'
,
'2019-10-26 20:15:17'
,
NULL
,
888
,
31
);
-- ----------------------------
-- Table structure for apis
...
...
@@ -88,7 +90,7 @@ CREATE TABLE `apis` (
`group`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_apis_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
0
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
2
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- Records of apis
...
...
@@ -120,6 +122,8 @@ INSERT INTO `apis` VALUES (24, '2019-09-30 15:29:33', '2019-09-30 15:29:33', NUL
INSERT
INTO
`apis`
VALUES
(
25
,
'2019-09-30 15:30:00'
,
'2019-09-30 15:30:00'
,
'2019-10-09 15:26:37'
,
NULL
,
'/user/getInfoList'
,
'分页获取用户列表'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
28
,
'2019-10-09 15:15:17'
,
'2019-10-09 15:17:07'
,
NULL
,
NULL
,
'/user/getUserList'
,
'获取用户列表'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
29
,
'2019-10-09 23:01:40'
,
'2019-10-09 23:01:40'
,
NULL
,
NULL
,
'/user/setUserAuthority'
,
'修改用户角色'
,
'user'
);
INSERT
INTO
`apis`
VALUES
(
30
,
'2019-10-26 20:14:38'
,
'2019-10-26 20:14:38'
,
NULL
,
NULL
,
'/fileUploadAndDownload/upload'
,
'文件上传示例'
,
'fileUploadAndDownload'
);
INSERT
INTO
`apis`
VALUES
(
31
,
'2019-10-26 20:14:59'
,
'2019-10-26 20:14:59'
,
NULL
,
NULL
,
'/fileUploadAndDownload/getFileList'
,
'获取上传文件列表'
,
'fileUploadAndDownload'
);
-- ----------------------------
-- Table structure for authorities
...
...
@@ -189,6 +193,39 @@ INSERT INTO `base_menus` VALUES (23, '2019-10-20 11:23:39', '2019-10-20 11:23:39
INSERT
INTO
`base_menus`
VALUES
(
25
,
'2019-10-20 11:26:12'
,
'2019-10-20 11:26:12'
,
'2019-10-20 11:26:19'
,
0
,
23
,
'upload'
,
'upload'
,
0
,
'view/example/upload/upload.vue'
,
'上传下载'
,
'upload'
,
'上传下载'
);
INSERT
INTO
`base_menus`
VALUES
(
26
,
'2019-10-20 11:27:02'
,
'2019-10-20 11:27:02'
,
NULL
,
0
,
19
,
'upload'
,
'upload'
,
0
,
'view/example/upload/upload.vue'
,
'上传下载'
,
'upload'
,
'上传下载'
);
-- ----------------------------
-- Table structure for file_upload_and_downloads
-- ----------------------------
DROP
TABLE
IF
EXISTS
`file_upload_and_downloads`
;
CREATE
TABLE
`file_upload_and_downloads`
(
`id`
int
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`created_at`
timestamp
(
0
)
NULL
DEFAULT
NULL
,
`updated_at`
timestamp
(
0
)
NULL
DEFAULT
NULL
,
`deleted_at`
timestamp
(
0
)
NULL
DEFAULT
NULL
,
`name`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`url`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`tag`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
INDEX
`idx_file_upload_and_downloads_deleted_at`
(
`deleted_at`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Compact
;
-- ----------------------------
-- Records of file_upload_and_downloads
-- ----------------------------
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
1
,
'2019-10-26 15:49:50'
,
'2019-10-26 15:49:50'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572076189logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
2
,
'2019-10-26 15:49:50'
,
'2019-10-26 15:49:50'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572076189logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
3
,
'2019-10-26 20:08:44'
,
'2019-10-26 20:08:44'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572091723logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
4
,
'2019-10-26 20:08:50'
,
'2019-10-26 20:08:50'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572091727logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
5
,
'2019-10-26 20:08:50'
,
'2019-10-26 20:08:50'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572091727logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
6
,
'2019-10-26 22:46:17'
,
'2019-10-26 22:46:17'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572101174logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
7
,
'2019-10-26 22:46:32'
,
'2019-10-26 22:46:32'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572101191logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
8
,
'2019-10-26 23:07:54'
,
'2019-10-26 23:07:54'
,
NULL
,
'timg.jpg'
,
'http://qmplusimg.henrongyi.top/1572102473timg.jpg'
,
'jpg'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
9
,
'2019-10-26 23:08:58'
,
'2019-10-26 23:08:58'
,
NULL
,
'timg.jpg'
,
'http://qmplusimg.henrongyi.top/1572102537timg.jpg'
,
'jpg'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
10
,
'2019-10-26 23:10:44'
,
'2019-10-26 23:10:44'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572102643logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
11
,
'2019-10-26 23:12:05'
,
'2019-10-26 23:12:05'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572102723logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
12
,
'2019-10-26 23:14:08'
,
'2019-10-26 23:14:08'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572102846logo.png'
,
'png'
);
INSERT
INTO
`file_upload_and_downloads`
VALUES
(
13
,
'2019-10-26 23:18:17'
,
'2019-10-26 23:18:17'
,
NULL
,
'logo.png'
,
'http://qmplusimg.henrongyi.top/1572103096logo.png'
,
'png'
);
-- ----------------------------
-- Table structure for menus
-- ----------------------------
...
...
@@ -270,7 +307,7 @@ CREATE TABLE `users` (
-- ----------------------------
-- Records of users
-- ----------------------------
INSERT
INTO
`users`
VALUES
(
10
,
'2019-09-13 17:23:46'
,
'2019-10-
17 22:14:49'
,
NULL
,
0
x63653064363638352D633135662D343132362D613562342D383930626339643233353664
,
NULL
,
NULL
,
'超级管理员'
,
'http://qmplusimg.henrongyi.top/1571321688
timg.jpg'
,
888
,
NULL
,
'admin'
,
'e10adc3949ba59abbe56e057f20f883e'
);
INSERT
INTO
`users`
VALUES
(
10
,
'2019-09-13 17:23:46'
,
'2019-10-
21 11:16:03'
,
NULL
,
0
x63653064363638352D633135662D343132362D613562342D383930626339643233353664
,
NULL
,
NULL
,
'超级管理员'
,
'http://qmplusimg.henrongyi.top/1571627762
timg.jpg'
,
888
,
NULL
,
'admin'
,
'e10adc3949ba59abbe56e057f20f883e'
);
INSERT
INTO
`users`
VALUES
(
11
,
'2019-09-13 17:27:29'
,
'2019-09-13 17:27:29'
,
NULL
,
0
x66643665663739622D393434632D343838382D383337372D616265326432363038383538
,
NULL
,
NULL
,
'QMPlusUser'
,
'http://www.henrongyi.top/avatar/lufu.jpg'
,
888
,
NULL
,
'a303176530'
,
'3ec063004a6f31642261936a379fde3d'
);
INSERT
INTO
`users`
VALUES
(
12
,
'2019-09-13 17:28:56'
,
'2019-09-13 17:28:56'
,
NULL
,
0
x65373939636563362D346337662D343338632D383634372D376435633333393734353165
,
NULL
,
NULL
,
'QMPlusUser'
,
'http://www.henrongyi.top/avatar/lufu.jpg'
,
888
,
NULL
,
'a30317465'
,
'3ec063004a6f31642261936a379fde3d'
);
INSERT
INTO
`users`
VALUES
(
13
,
'2019-09-13 17:29:26'
,
'2019-09-13 17:29:26'
,
NULL
,
0
x65653764353932322D323333312D343162632D393363322D613665366461306465343230
,
NULL
,
NULL
,
'QMPlusUser'
,
'http://www.henrongyi.top/avatar/lufu.jpg'
,
888
,
NULL
,
'a30317465'
,
'3ec063004a6f31642261936a379fde3d'
);
...
...
QMPlusVuePage/src/view/example/upload/upload.vue
浏览文件 @
100093eb
<
template
>
<div>
<template>
<el-upload
:file-list=
"fileList"
:headers=
"
{'x-token':token}"
:show-file-list="false"
@before-upload="checkFile"
@on-error="uploadError"
@on-success="uploadSuccess"
action="https://jsonplaceholder.typicode.com/posts/"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
</el-upload>
<el-table
:data=
"tableData"
border
stripe
>
<el-table-column
label=
"预览"
width=
"100"
>
<template
slot-scope=
"scope"
>
<img
:alt=
"scope.row.alt"
width=
"80"
height=
"80"
:src=
"scope.row.url"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"日期"
prop=
"date"
width=
"180"
></el-table-column>
<el-table-column
label=
"文件名"
prop=
"name"
width=
"180"
>
</el-table-column>
<el-table-column
:formatter=
"formatter"
label=
"链接"
prop=
"url"
></el-table-column>
<el-table-column
label=
"标签"
prop=
"tag"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.tag === 'jpg' ? 'primary' : 'success'"
disable-transitions
>
{{
scope
.
row
.
tag
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"small"
type=
"text"
@
click=
"downloadFile(scope.row)"
>
下载
</el-button>
</
template
>
</el-table-column>
</el-table>
</template>
<el-upload
:headers=
"
{'x-token':token}"
:show-file-list="false"
:before-upload="checkFile"
:on-error="uploadError"
:on-success="uploadSuccess"
action="/api/fileUploadAndDownload/upload"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件,且不超过500kb
</div>
</el-upload>
<el-table
:data=
"tableData"
border
stripe
>
<el-table-column
label=
"预览"
width=
"100"
>
<template
slot-scope=
"scope"
>
<img
:alt=
"scope.row.alt"
:src=
"scope.row.url"
height=
"80"
width=
"80"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"日期"
prop=
"UpdatedAt"
width=
"180"
></el-table-column>
<el-table-column
label=
"文件名"
prop=
"name"
width=
"180"
></el-table-column>
<el-table-column
label=
"链接"
prop=
"url"
></el-table-column>
<el-table-column
label=
"标签"
prop=
"tag"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"scope.row.tag === 'jpg' ? 'primary' : 'success'"
disable-transitions
>
{{
scope
.
row
.
tag
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"downloadFile(scope.row)"
size=
"small"
type=
"text"
>
下载
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
:current-page=
"page"
:page-size=
"pageSize"
:page-sizes=
"[10, 30, 50, 100]"
:style=
"{float:'right',padding:'20px'}"
:total=
"total"
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
layout=
"total, sizes, prev, pager, next, jumper"
></el-pagination>
</div>
</template>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
import
infoList
from
'
@/components/mixins/infoList
'
import
{
getFileList
}
from
'
@/api/fileUploadAndDownload
'
import
{
downloadImage
}
from
'
@/utils/downloadImg
'
export
default
{
name
:
'
Upload
'
,
mixins
:
[
infoList
],
data
()
{
return
{
listApi
:
getFileList
,
listKey
:
'
list
'
,
tableData
:
[
{
date
:
'
2019-10-25
'
,
UpdatedAt
:
'
2019-10-25
'
,
name
:
'
文件名.jpg
'
,
url
:
'
http://qmplusimg.henrongyi.top/1571321688timg.jpg
'
,
tag
:
'
jpg
'
},
{
date
:
'
2019-10-25
'
,
UpdatedAt
:
'
2019-10-25
'
,
name
:
'
文件名.jpg
'
,
url
:
'
http://qmplusimg.henrongyi.top/157162774820191015140921496.gif
'
,
tag
:
'
gif
'
...
...
@@ -71,16 +81,32 @@ export default {
methods
:
{
checkFile
(
file
)
{
const
isJPG
=
file
.
type
===
'
image/jpeg
'
const
isPng
=
file
.
type
===
'
image/png
'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'
上传头像图片只能是 JPG 格式!
'
)
if
(
!
isJPG
&&!
isPng
)
{
this
.
$message
.
error
(
'
上传头像图片只能是 JPG
或png
格式!
'
)
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'
上传头像图片大小不能超过 2MB!
'
)
}
return
isJPG
&&
isLt2M
return
(
isPng
||
isJPG
)
&&
isLt2M
},
downloadFile
(){
uploadSuccess
(
res
,
file
)
{
console
.
log
(
res
,
file
)
this
.
$message
({
type
:
'
success
'
,
message
:
'
上传成功
'
})
this
.
getTableData
()
},
uploadError
(
err
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
上传失败
'
})
},
downloadFile
(
row
)
{
downloadImage
(
row
.
url
,
row
.
name
)
}
}
}
...
...
README.md
浏览文件 @
100093eb
...
...
@@ -29,7 +29,7 @@
## 技术选型
1.
后端采用golang框架gin,快速搭建基础restful风格API
2.
前端项目采用VUE框架,构建基础页面
3.
数据库采用Mysql,可能会引用redis作为缓存数据库使用(待定)
3.
数据库采用Mysql
(5.6.44)版本不同可能会导致SQL导入失败
,可能会引用redis作为缓存数据库使用(待定)
4.
使用swagger构建自动化文档
5.
使用fsnotify和viper实现json格式配置文件
6.
使用logrus实现日志记录
...
...
@@ -47,10 +47,11 @@
5.
实现基于七牛云的文件上传操作(需提前注册七牛云账号) √(为了方便大家测试,我公开了自己的七牛测试号的各种重要token,恳请大家不要乱传东西)
6.
等装了分页方法,实现分页接口并且复制粘贴就可使用分页 √
7.
前端分页mixin封装 分页方法调用mixins即可 √
8.
..看项目进度想到什么做什么,主要目的是方便各位快速接私活,完成项目基础功能
9.
各位开发者可以在issues提出自己工作中遇到的重复性大或者实现复杂的需求,我尽可能提供示例代码。
8.
图片上传前端下载功能 √
<后端下载功能开发中>
9.
..看项目进度想到什么做什么,主要目的是方便各位快速接私活,完成项目基础功能
10.
各位开发者可以在issues提出自己工作中遇到的重复性大或者实现复杂的需求,我尽可能提供示例代码。
## 计划任务
1.
富文本编辑器,Mark
F
own编辑器功能嵌入
1.
富文本编辑器,Mark
D
own编辑器功能嵌入
2.
导入,导出Excel
3.
Echart图表支持
4.
object模式树
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录