diff --git a/package.json b/package.json index e7a8e62..7faa835 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "simple-drawing-board": "^2.0.1", "vue": "2.5.17", "vue-count-to": "1.0.13", - "vue-router": "3.0.2", + "vue-router": "^3.1.3", "vuex": "3.0.1", "wangeditor": ">=3.0.0", "xlsx": "^0.11.16" diff --git a/src/api/localStorage.js b/src/api/localStorage.js new file mode 100644 index 0000000..02293f0 --- /dev/null +++ b/src/api/localStorage.js @@ -0,0 +1,24 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/localStorage', + method: 'post', + data + }) +} + +export function del(id) { + return request({ + url: 'api/localStorage/' + id, + method: 'delete' + }) +} + +export function edit(data) { + return request({ + url: 'api/localStorage', + method: 'put', + data + }) +} diff --git a/src/router/index.js b/src/router/index.js index f61e2bd..ecacf7f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -58,7 +58,7 @@ export const loadMenus = (next, to) => { asyncRouter.push({ path: '*', redirect: '/404', hidden: true }) store.dispatch('GenerateRoutes', asyncRouter).then(() => { // 存储路由 router.addRoutes(asyncRouter) // 动态添加可访问路由表 - next({ ...to, replace: true })// hack方法 确保addRoutes已完成 + next({ ...to, replace: true }) }) }) } diff --git a/src/store/getters.js b/src/store/getters.js index 5698e10..6273784 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -11,6 +11,8 @@ const getters = { addRouters: state => state.permission.addRouters, socketApi: state => state.api.socketApi, imagesUploadApi: state => state.api.imagesUploadApi, + baseApi: state => state.api.baseApi, + fileUploadApi: state => state.api.fileUploadApi, updateAvatarApi: state => state.api.updateAvatarApi, qiNiuUploadApi: state => state.api.qiNiuUploadApi, sqlApi: state => state.api.sqlApi, diff --git a/src/store/modules/api.js b/src/store/modules/api.js index 609505c..dbda078 100644 --- a/src/store/modules/api.js +++ b/src/store/modules/api.js @@ -12,7 +12,11 @@ const api = { // Sql 监控 sqlApi: baseUrl + '/druid', // swagger - swaggerApi: baseUrl + '/swagger-ui.html' + swaggerApi: baseUrl + '/swagger-ui.html', + // 文件上传 + fileUploadApi: baseUrl + '/api/localStorage', + // baseUrl, + baseApi: baseUrl } } diff --git a/src/styles/index.scss b/src/styles/index.scss index 82ee900..bb8142a 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -164,3 +164,10 @@ a:hover { z-index: 99; width: 100%; } +.eladmin-upload { + border: 1px dashed #c0ccda; + border-radius: 5px; + height: 45px; + line-height: 45px; + width: 368px; +} diff --git a/src/views/tools/qiniu/config.vue b/src/views/tools/qiniu/config.vue deleted file mode 100644 index 01beac3..0000000 --- a/src/views/tools/qiniu/config.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - - - diff --git a/src/views/tools/qiniu/index.vue b/src/views/tools/qiniu/index.vue deleted file mode 100644 index 334fbc7..0000000 --- a/src/views/tools/qiniu/index.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/views/tools/storage/index.vue b/src/views/tools/storage/index.vue new file mode 100644 index 0000000..8856cef --- /dev/null +++ b/src/views/tools/storage/index.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/views/tools/storage/local/form.vue b/src/views/tools/storage/local/form.vue new file mode 100644 index 0000000..c2a09c0 --- /dev/null +++ b/src/views/tools/storage/local/form.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/src/views/tools/storage/local/index.vue b/src/views/tools/storage/local/index.vue new file mode 100644 index 0000000..cea40c9 --- /dev/null +++ b/src/views/tools/storage/local/index.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/views/tools/storage/qiniu/form.vue b/src/views/tools/storage/qiniu/form.vue new file mode 100644 index 0000000..38cd650 --- /dev/null +++ b/src/views/tools/storage/qiniu/form.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/views/tools/qiniu/list.vue b/src/views/tools/storage/qiniu/list.vue similarity index 61% rename from src/views/tools/qiniu/list.vue rename to src/views/tools/storage/qiniu/list.vue index e228f72..49e91da 100644 --- a/src/views/tools/qiniu/list.vue +++ b/src/views/tools/storage/qiniu/list.vue @@ -1,5 +1,7 @@ +