From 5a2909f121606fe7ee3cd4d2b56cecae81369f89 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: Sat, 8 May 2021 10:43:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/package.json | 1 + Web/src/assets/style/lib/container.less | 37 +++- Web/src/assets/style/lib/form.less | 7 + Web/src/common/login/index.js | 19 +- Web/src/components/yoImage/index.js | 20 +- Web/src/pages/account/index.vue | 35 +++ Web/src/pages/account/setting/info.vue | 254 ++++++++++++++++++++++ Web/src/pages/form/normal.vue | 7 - Web/src/pages/form/yo.vue | 79 ------- Web/src/pages/form/yo/Input.vue | 63 ------ Web/src/pages/list/query.vue | 146 ------------- Web/src/pages/system/doc/index.vue | 48 ++++ Web/src/util/global/index.js | 21 +- Web/src/views/main/_layout/content.vue | 16 +- Web/src/views/main/_layout/header/user.js | 13 ++ Web/src/views/main/index.vue | 4 +- Web/yarn.lock | 5 + 17 files changed, 450 insertions(+), 325 deletions(-) create mode 100644 Web/src/pages/account/index.vue create mode 100644 Web/src/pages/account/setting/info.vue delete mode 100644 Web/src/pages/form/normal.vue delete mode 100644 Web/src/pages/form/yo.vue delete mode 100644 Web/src/pages/form/yo/Input.vue delete mode 100644 Web/src/pages/list/query.vue diff --git a/Web/package.json b/Web/package.json index d9b6637..b1f0c80 100644 --- a/Web/package.json +++ b/Web/package.json @@ -22,6 +22,7 @@ "vue": "^2.6.11", "vue-awesome-swiper": "^4.1.1", "vue-color": "^2.8.1", + "vue-cropper": "^0.5.6", "vue-highlight.js": "^3.1.0", "vue-router": "^3.5.1" }, diff --git a/Web/src/assets/style/lib/container.less b/Web/src/assets/style/lib/container.less index 95a5ebb..4af89bf 100644 --- a/Web/src/assets/style/lib/container.less +++ b/Web/src/assets/style/lib/container.less @@ -1,10 +1,39 @@ @import (reference) '~@/assets/style/extend.less'; @container-width: 1400px; -.container { - width: @container-width; +.container-base { margin: 0 auto; padding: 0 @padding-md; } -.container-fluid { - padding: 0 @padding-md; +.container { + width: @container-width; + +.container-base(); +} +@media (max-width: 1400px) { + .container { + width: auto; + } +} +.container-md { + width: @container-width - 200px; + +.container-base(); +} +.container-sm { + width: @container-width - 400px; + +.container-base(); +} +.container-xs { + width: @container-width - 600px; + +.container-base(); +} +.container-xxs { + width: @container-width - 700px; + +.container-base(); +} +.container-fluid { + .container-base(); } diff --git a/Web/src/assets/style/lib/form.less b/Web/src/assets/style/lib/form.less index e1c5a53..a4508aa 100644 --- a/Web/src/assets/style/lib/form.less +++ b/Web/src/assets/style/lib/form.less @@ -136,6 +136,13 @@ width: 100%; } } + .yo-form--short { + .ant-form-item-control-wrapper { + flex: 0 0 38.2%; + + width: 38.2%; + } + } .ant-form-explain { font-size: @font-size-base - 1px; diff --git a/Web/src/common/login/index.js b/Web/src/common/login/index.js index 93f80bf..ce75d86 100644 --- a/Web/src/common/login/index.js +++ b/Web/src/common/login/index.js @@ -1,23 +1,9 @@ import { api } from '@/common/api' import { token } from '@/common/token' -import { GLOBAL_INFO_KEY } from '@/common/storage' import { encryptByDES, decryptByDES } from '@/util/des' +import { removeGlobal } from '@/util/global' import app from '@/main' -const setGlobal = (info) => { - app.$set(app.global, 'info', info) - window.sessionStorage.setItem(GLOBAL_INFO_KEY, encryptByDES(JSON.stringify(info))) -} - -const removeGlobal = () => { - app.$set(app.global, 'info', undefined) - window.sessionStorage.removeItem(GLOBAL_INFO_KEY) -} - -const getGlobal = () => { - return JSON.parse(decryptByDES(window.sessionStorage.getItem(GLOBAL_INFO_KEY))) -} - const doLogin = (args) => { return new Promise((resolve, reject) => { api.login(args).then(({ success, data, message }) => { @@ -72,7 +58,4 @@ const doLogout = () => { export { doLogin, doLogout, - - setGlobal, - getGlobal } \ No newline at end of file diff --git a/Web/src/components/yoImage/index.js b/Web/src/components/yoImage/index.js index 278a46a..b6fa7ea 100644 --- a/Web/src/components/yoImage/index.js +++ b/Web/src/components/yoImage/index.js @@ -17,13 +17,27 @@ export default { } }, - created() { + watch: { + async id() { + this.src = await this.getSrc() + } + }, + + async created() { if (this.id) { - this.$api.sysFileInfoPreview({ id: this.id }).then(async ({ data }) => { + this.src = await this.getSrc() + } + }, + + methods: { + + getSrc() { + return this.$api.sysFileInfoPreview({ id: this.id }).then(async ({ data }) => { const base64 = await ArrayBufferToBase64(data) - this.src = base64 + return base64 }) } + }, render() { diff --git a/Web/src/pages/account/index.vue b/Web/src/pages/account/index.vue new file mode 100644 index 0000000..3009fac --- /dev/null +++ b/Web/src/pages/account/index.vue @@ -0,0 +1,35 @@ + + \ No newline at end of file diff --git a/Web/src/pages/account/setting/info.vue b/Web/src/pages/account/setting/info.vue new file mode 100644 index 0000000..c06d462 --- /dev/null +++ b/Web/src/pages/account/setting/info.vue @@ -0,0 +1,254 @@ + + + \ No newline at end of file diff --git a/Web/src/pages/form/normal.vue b/Web/src/pages/form/normal.vue deleted file mode 100644 index f147e6a..0000000 --- a/Web/src/pages/form/normal.vue +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/Web/src/pages/form/yo.vue b/Web/src/pages/form/yo.vue deleted file mode 100644 index 84a95ef..0000000 --- a/Web/src/pages/form/yo.vue +++ /dev/null @@ -1,79 +0,0 @@ - - \ No newline at end of file diff --git a/Web/src/pages/form/yo/Input.vue b/Web/src/pages/form/yo/Input.vue deleted file mode 100644 index 49cee58..0000000 --- a/Web/src/pages/form/yo/Input.vue +++ /dev/null @@ -1,63 +0,0 @@ - \ No newline at end of file diff --git a/Web/src/pages/list/query.vue b/Web/src/pages/list/query.vue deleted file mode 100644 index 5434e4a..0000000 --- a/Web/src/pages/list/query.vue +++ /dev/null @@ -1,146 +0,0 @@ - - \ 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 9e0a980..a3fda6d 100644 --- a/Web/src/pages/system/doc/index.vue +++ b/Web/src/pages/system/doc/index.vue @@ -1,6 +1,54 @@