From 94ba4f30561983d66ba7d53759f727ac497d7f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Wed, 28 Apr 2021 15:44:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?update=20=E6=98=8E=E7=A1=AE=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/assets/style/lib/margin.less | 16 ++++++++++++++++ Web/src/components/yoTable/index.js | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Web/src/assets/style/lib/margin.less b/Web/src/assets/style/lib/margin.less index 567a16c..8f5e8bb 100644 --- a/Web/src/assets/style/lib/margin.less +++ b/Web/src/assets/style/lib/margin.less @@ -6,6 +6,10 @@ @position: extract(@margin-padding-position, @i); @name: extract(@margin-padding-position-name, @i); + .m@{name}-xl { + margin@{position}: @padding-xl !important; + } + .m@{name}-lg { margin@{position}: @padding-lg !important; } @@ -22,6 +26,14 @@ margin@{position}: @padding-xs !important; } + .m@{name}-xxs { + margin@{position}: @padding-xxs !important; + } + + .p@{name}-xl { + padding@{position}: @padding-xl !important; + } + .p@{name}-lg { padding@{position}: @padding-lg !important; } @@ -38,6 +50,10 @@ padding@{position}: @padding-xs !important; } + .p@{name}-xxs { + padding@{position}: @padding-xxs !important; + } + .m@{name}-none { margin@{position}: 0 !important; } diff --git a/Web/src/components/yoTable/index.js b/Web/src/components/yoTable/index.js index 4f05893..e0ce949 100644 --- a/Web/src/components/yoTable/index.js +++ b/Web/src/components/yoTable/index.js @@ -128,7 +128,10 @@ export default { onTableChange(pagination, filters, sorter) { this.pagination = pagination - this.sorter = sorter + this.sorter = { + sortField: sorter.field, + sortOrder: sorter.order, + } this.onLoadData() }, From aac183749bcafcee21a172d07e7491a4fe6aa4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Wed, 28 Apr 2021 16:24:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?update=20=E6=9B=B4=E6=94=B9queue=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/public/doc-code/seed/query.vue | 4 ++-- Web/src/common/api/index.js | 4 ++-- Web/src/pages/system/_seed/index.vue | 4 ++-- Web/src/pages/system/app/index.vue | 4 ++-- Web/src/pages/system/dict/index.vue | 2 +- Web/src/pages/system/log/oplog/index.vue | 2 +- Web/src/pages/system/log/vislog/index.vue | 2 +- Web/src/pages/system/menu/form.vue | 6 +++--- Web/src/pages/system/menu/index.vue | 6 +++--- Web/src/pages/system/role/orgForm.vue | 2 +- Web/src/pages/system/user/index.vue | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Web/public/doc-code/seed/query.vue b/Web/public/doc-code/seed/query.vue index c88a70c..6d561bc 100644 --- a/Web/public/doc-code/seed/query.vue +++ b/Web/public/doc-code/seed/query.vue @@ -128,8 +128,8 @@ export default { onLoadCodes() { this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'code1' }), - this.$api.sysDictTypeDropDownWait({ code: 'code2' }), + this.$api.sysDictTypeDropDownAwait({ code: 'code1' }), + this.$api.sysDictTypeDropDownAwait({ code: 'code2' }), ]) .then(([code1, code2]) => { this.codes.code1 = code1.data; diff --git a/Web/src/common/api/index.js b/Web/src/common/api/index.js index 069ad1e..907d351 100644 --- a/Web/src/common/api/index.js +++ b/Web/src/common/api/index.js @@ -94,7 +94,7 @@ for (let key in urls) { } } - api[`${key}Wait`] = function (params = {}) { + api[`${key}Await`] = function (params = {}) { if (method === 'post') { return initInstance(options).post(url, params) } else { @@ -106,7 +106,7 @@ for (let key in urls) { api[key] = function (params = {}) { return new Promise((reslove, reject) => { - api[`${key}Wait`](params) + api[`${key}Await`](params) .then((res) => { const { data } = res if (errerCodes.indexOf(data.code) >= 0) { diff --git a/Web/src/pages/system/_seed/index.vue b/Web/src/pages/system/_seed/index.vue index a3d8c57..9d2d8bc 100644 --- a/Web/src/pages/system/_seed/index.vue +++ b/Web/src/pages/system/_seed/index.vue @@ -128,8 +128,8 @@ export default { onLoadCodes() { this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'code1' }), - this.$api.sysDictTypeDropDownWait({ code: 'code2' }), + this.$api.sysDictTypeDropDownAwait({ code: 'code1' }), + this.$api.sysDictTypeDropDownAwait({ code: 'code2' }), ]) .then(([code1, code2]) => { this.codes.code1 = code1.data; diff --git a/Web/src/pages/system/app/index.vue b/Web/src/pages/system/app/index.vue index 6b41d4b..a969211 100644 --- a/Web/src/pages/system/app/index.vue +++ b/Web/src/pages/system/app/index.vue @@ -166,8 +166,8 @@ export default { onLoadCodes() { this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'yes_or_no' }), - this.$api.sysDictTypeDropDownWait({ code: 'common_status' }), + this.$api.sysDictTypeDropDownAwait({ code: 'yes_or_no' }), + this.$api.sysDictTypeDropDownAwait({ code: 'common_status' }), ]) .then(([yesOrNo, commonStatus]) => { this.codes.find((p) => p.code === 'yes_or_no').values = yesOrNo.data; diff --git a/Web/src/pages/system/dict/index.vue b/Web/src/pages/system/dict/index.vue index 4b66429..eedcb5d 100644 --- a/Web/src/pages/system/dict/index.vue +++ b/Web/src/pages/system/dict/index.vue @@ -170,7 +170,7 @@ export default { * 如果不需要获取相应的字典数据,此方法内容可空 */ onLoadCodes() { - this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'common_status' })]).then(([commonStatus]) => { + this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'common_status' })]).then(([commonStatus]) => { this.codes.commonStatus = commonStatus.data; }); }, diff --git a/Web/src/pages/system/log/oplog/index.vue b/Web/src/pages/system/log/oplog/index.vue index 38ffa4f..4c3d81f 100644 --- a/Web/src/pages/system/log/oplog/index.vue +++ b/Web/src/pages/system/log/oplog/index.vue @@ -173,7 +173,7 @@ export default { * 加载字典数据时的必要方法 */ onLoadCodes() { - this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'op_type' })]).then(([commonStatus]) => { + this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'op_type' })]).then(([commonStatus]) => { this.codes.opTypeDict = commonStatus.data; }); }, diff --git a/Web/src/pages/system/log/vislog/index.vue b/Web/src/pages/system/log/vislog/index.vue index a6b1f3c..9e4690d 100644 --- a/Web/src/pages/system/log/vislog/index.vue +++ b/Web/src/pages/system/log/vislog/index.vue @@ -165,7 +165,7 @@ export default { * 加载字典数据时的必要方法 */ onLoadCodes() { - this.$api.$queue([this.$api.sysDictTypeDropDownWait({ code: 'vis_type' })]).then(([commonStatus]) => { + this.$api.$queue([this.$api.sysDictTypeDropDownAwait({ code: 'vis_type' })]).then(([commonStatus]) => { this.codes.visTypeDict = commonStatus.data; }); }, diff --git a/Web/src/pages/system/menu/form.vue b/Web/src/pages/system/menu/form.vue index 22b79e5..f805047 100644 --- a/Web/src/pages/system/menu/form.vue +++ b/Web/src/pages/system/menu/form.vue @@ -260,9 +260,9 @@ export default { onLoadCodes() { return this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'menu_type' }), - this.$api.sysDictTypeDropDownWait({ code: 'menu_weight' }), - this.$api.sysDictTypeDropDownWait({ code: 'open_type' }), + this.$api.sysDictTypeDropDownAwait({ code: 'menu_type' }), + this.$api.sysDictTypeDropDownAwait({ code: 'menu_weight' }), + this.$api.sysDictTypeDropDownAwait({ code: 'open_type' }), ]) .then(([menuType, menuWerght, openType]) => { return { diff --git a/Web/src/pages/system/menu/index.vue b/Web/src/pages/system/menu/index.vue index a6cb903..ee64e1a 100644 --- a/Web/src/pages/system/menu/index.vue +++ b/Web/src/pages/system/menu/index.vue @@ -156,9 +156,9 @@ export default { onLoadCodes() { this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'menu_type' }), - this.$api.sysDictTypeDropDownWait({ code: 'menu_weight' }), - this.$api.sysDictTypeDropDownWait({ code: 'open_type' }), + this.$api.sysDictTypeDropDownAwait({ code: 'menu_type' }), + this.$api.sysDictTypeDropDownAwait({ code: 'menu_weight' }), + this.$api.sysDictTypeDropDownAwait({ code: 'open_type' }), ]) .then(([menuType, menuWerght, openType]) => { this.codes.find((p) => p.code === 'menu_type').values = menuType.data; diff --git a/Web/src/pages/system/role/orgForm.vue b/Web/src/pages/system/role/orgForm.vue index 0a847c8..08480ec 100644 --- a/Web/src/pages/system/role/orgForm.vue +++ b/Web/src/pages/system/role/orgForm.vue @@ -88,7 +88,7 @@ export default { */ onLoadCodes() { return this.$api - .$queue([this.$api.sysDictTypeDropDownWait({ code: 'data_scope_type' })]) + .$queue([this.$api.sysDictTypeDropDownAwait({ code: 'data_scope_type' })]) .then(([dataScopeType]) => { this.dataScopeTypeData = dataScopeType.data; }); diff --git a/Web/src/pages/system/user/index.vue b/Web/src/pages/system/user/index.vue index 127e7e9..fa6519d 100644 --- a/Web/src/pages/system/user/index.vue +++ b/Web/src/pages/system/user/index.vue @@ -218,8 +218,8 @@ export default { onLoadCodes() { this.$api .$queue([ - this.$api.sysDictTypeDropDownWait({ code: 'sex' }), - this.$api.sysDictTypeDropDownWait({ code: 'common_status' }), + this.$api.sysDictTypeDropDownAwait({ code: 'sex' }), + this.$api.sysDictTypeDropDownAwait({ code: 'common_status' }), ]) .then(([sex, commonStatus]) => { this.codes.find((p) => p.code === 'sex').values = sex.data; From 8c429bcde6603a217c5865a8ce32ad61763be115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Wed, 28 Apr 2021 17:08:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?update=20=E5=AE=8C=E5=96=84=E4=BA=86?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=BC=80=E5=8F=91=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/public/doc-code/api/queue.js | 15 ++ Web/public/doc-code/api/setting.js | 14 ++ Web/public/doc-code/api/usage.js | 11 ++ Web/public/doc-code/auth/index.vue | 14 ++ Web/src/common/login/index.js | 12 -- Web/src/main.js | 2 +- Web/src/pages/system/doc/api/index.vue | 5 + Web/src/pages/system/doc/api/queue.vue | 26 ++++ Web/src/pages/system/doc/api/setting.vue | 23 +++ Web/src/pages/system/doc/api/usage.vue | 21 +++ Web/src/pages/system/doc/auth/index.vue | 26 ++++ Web/src/pages/system/doc/database/index.vue | 3 + .../pages/system/doc/database/migrations.vue | 77 ++++++++++ Web/src/pages/system/doc/functions/index.vue | 44 ++++++ Web/src/pages/system/doc/globalinfo/index.vue | 122 +++++++++++++++ Web/src/pages/system/doc/index.vue | 145 +++++++++++++----- Web/src/pages/system/doc/seed/index.vue | 5 + Web/src/pages/system/doc/seed/query.vue | 4 + Web/src/pages/system/doc/storage/index.vue | 3 + Web/src/pages/system/doc/window/close.vue | 23 +++ Web/src/pages/system/doc/window/index.vue | 27 ++++ Web/src/pages/system/doc/window/open.vue | 59 +++++++ Web/src/views/main/index.vue | 2 +- 23 files changed, 633 insertions(+), 50 deletions(-) create mode 100644 Web/public/doc-code/api/queue.js create mode 100644 Web/public/doc-code/api/setting.js create mode 100644 Web/public/doc-code/api/usage.js create mode 100644 Web/public/doc-code/auth/index.vue create mode 100644 Web/src/pages/system/doc/api/index.vue create mode 100644 Web/src/pages/system/doc/api/queue.vue create mode 100644 Web/src/pages/system/doc/api/setting.vue create mode 100644 Web/src/pages/system/doc/api/usage.vue create mode 100644 Web/src/pages/system/doc/auth/index.vue create mode 100644 Web/src/pages/system/doc/database/index.vue create mode 100644 Web/src/pages/system/doc/database/migrations.vue create mode 100644 Web/src/pages/system/doc/functions/index.vue create mode 100644 Web/src/pages/system/doc/globalinfo/index.vue create mode 100644 Web/src/pages/system/doc/storage/index.vue create mode 100644 Web/src/pages/system/doc/window/close.vue create mode 100644 Web/src/pages/system/doc/window/index.vue create mode 100644 Web/src/pages/system/doc/window/open.vue diff --git a/Web/public/doc-code/api/queue.js b/Web/public/doc-code/api/queue.js new file mode 100644 index 0000000..5551ab8 --- /dev/null +++ b/Web/public/doc-code/api/queue.js @@ -0,0 +1,15 @@ +/* 使用关键字await */ +async function doc() { + const res1 = await this.$api.apiName1(params1) + const res2 = await this.$api.apiName2(params2) +} + +/* 使用$queue */ +this.$api + .$queue([ + this.$api.apiName1Await(params1), + this.$api.apiName2Await(params2), + ]) + .then(([_res1, _res2]) => { + /* ... */ + }) \ No newline at end of file diff --git a/Web/public/doc-code/api/setting.js b/Web/public/doc-code/api/setting.js new file mode 100644 index 0000000..81bf4f8 --- /dev/null +++ b/Web/public/doc-code/api/setting.js @@ -0,0 +1,14 @@ +export default { + /* 自定义的接口名称 */ + apiName: [ + /* 接口地址 */ + url, + /* 请求类型 [get | post] */ + 'get', + /* axios所需的设置参数 */ + options, + ], + + /* 默认为post的接口 */ + apiPostName: postUrl +} \ No newline at end of file diff --git a/Web/public/doc-code/api/usage.js b/Web/public/doc-code/api/usage.js new file mode 100644 index 0000000..158c948 --- /dev/null +++ b/Web/public/doc-code/api/usage.js @@ -0,0 +1,11 @@ +this.$api + .apiName(params) + .then((res) => { + /* ... */ + }) + .catch((error) => { + /* catch */ + }) + .finally(() => { + /* finally */ + }) \ No newline at end of file diff --git a/Web/public/doc-code/auth/index.vue b/Web/public/doc-code/auth/index.vue new file mode 100644 index 0000000..075a52a --- /dev/null +++ b/Web/public/doc-code/auth/index.vue @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/Web/src/common/login/index.js b/Web/src/common/login/index.js index ca4f285..f2f3473 100644 --- a/Web/src/common/login/index.js +++ b/Web/src/common/login/index.js @@ -70,21 +70,9 @@ const doLogout = () => { }) } -const doCheck = () => { - return new Promise((resolve, reject) => { - api.checkLogin().then(({ result }) => { - setGlobal(result) - resolve() - }).catch(() => { - reject() - }) - }) -} - export { doLogin, doLogout, - doCheck, setGlobal, getGlobal diff --git a/Web/src/main.js b/Web/src/main.js index 731d3a5..75a1e97 100644 --- a/Web/src/main.js +++ b/Web/src/main.js @@ -26,7 +26,7 @@ SwiperClass.use([Pagination, Mousewheel, Autoplay, Scrollbar]) Vue.use(getAwesomeSwiper(SwiperClass)) import hljs from 'highlight.js' -import 'highlight.js/styles/vs2015.css' +import 'highlight.js/styles/monokai-sublime.css' Vue.use(hljs.vuePlugin); /** diff --git a/Web/src/pages/system/doc/api/index.vue b/Web/src/pages/system/doc/api/index.vue new file mode 100644 index 0000000..98ad48b --- /dev/null +++ b/Web/src/pages/system/doc/api/index.vue @@ -0,0 +1,5 @@ + diff --git a/Web/src/pages/system/doc/api/queue.vue b/Web/src/pages/system/doc/api/queue.vue new file mode 100644 index 0000000..974aed8 --- /dev/null +++ b/Web/src/pages/system/doc/api/queue.vue @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/api/setting.vue b/Web/src/pages/system/doc/api/setting.vue new file mode 100644 index 0000000..c5c937a --- /dev/null +++ b/Web/src/pages/system/doc/api/setting.vue @@ -0,0 +1,23 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/api/usage.vue b/Web/src/pages/system/doc/api/usage.vue new file mode 100644 index 0000000..9e0018b --- /dev/null +++ b/Web/src/pages/system/doc/api/usage.vue @@ -0,0 +1,21 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/auth/index.vue b/Web/src/pages/system/doc/auth/index.vue new file mode 100644 index 0000000..510e9dc --- /dev/null +++ b/Web/src/pages/system/doc/auth/index.vue @@ -0,0 +1,26 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/database/index.vue b/Web/src/pages/system/doc/database/index.vue new file mode 100644 index 0000000..e5e6a79 --- /dev/null +++ b/Web/src/pages/system/doc/database/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/Web/src/pages/system/doc/database/migrations.vue b/Web/src/pages/system/doc/database/migrations.vue new file mode 100644 index 0000000..ed59bc0 --- /dev/null +++ b/Web/src/pages/system/doc/database/migrations.vue @@ -0,0 +1,77 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/functions/index.vue b/Web/src/pages/system/doc/functions/index.vue new file mode 100644 index 0000000..018e4a1 --- /dev/null +++ b/Web/src/pages/system/doc/functions/index.vue @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/Web/src/pages/system/doc/globalinfo/index.vue b/Web/src/pages/system/doc/globalinfo/index.vue new file mode 100644 index 0000000..17f8b41 --- /dev/null +++ b/Web/src/pages/system/doc/globalinfo/index.vue @@ -0,0 +1,122 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/index.vue b/Web/src/pages/system/doc/index.vue index aa6ca76..c31f41f 100644 --- a/Web/src/pages/system/doc/index.vue +++ b/Web/src/pages/system/doc/index.vue @@ -3,10 +3,15 @@ - -
+ +

{{ doc.title }}

- +
+
@@ -48,59 +54,126 @@ \ No newline at end of file diff --git a/Web/src/pages/system/doc/window/index.vue b/Web/src/pages/system/doc/window/index.vue new file mode 100644 index 0000000..4a5705b --- /dev/null +++ b/Web/src/pages/system/doc/window/index.vue @@ -0,0 +1,27 @@ + + \ No newline at end of file diff --git a/Web/src/pages/system/doc/window/open.vue b/Web/src/pages/system/doc/window/open.vue new file mode 100644 index 0000000..ad4fab2 --- /dev/null +++ b/Web/src/pages/system/doc/window/open.vue @@ -0,0 +1,59 @@ + + \ No newline at end of file diff --git a/Web/src/views/main/index.vue b/Web/src/views/main/index.vue index b58603f..fad068b 100644 --- a/Web/src/views/main/index.vue +++ b/Web/src/views/main/index.vue @@ -144,7 +144,7 @@ export default { onCloseContentWindow(key) { key = key || this.tabActived; - const i = this.$_.findIndex(this.panes, (p) => p.key === key && p.closable); + const i = this.$_.findIndex(this.panes, (p) => p.key === key); this.panes.splice(i, 1); if (this.panes.length) {