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 @@