diff --git a/package.json b/package.json index 02979ad..e3f8d83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "1.0.202408291813", + "version": "1.0.202408291841", "description": "金鸡湖现代服务业品牌管理系统", "author": "若依", "license": "MIT", diff --git a/src/assets/styles/publicPro.scss b/src/assets/styles/publicPro.scss index f34eb6f..e975c08 100644 --- a/src/assets/styles/publicPro.scss +++ b/src/assets/styles/publicPro.scss @@ -364,9 +364,6 @@ } .AFuwufazhanzonglan-item-top { - div { - - } div:nth-child(1) { font-size: 20px; @@ -414,7 +411,14 @@ //近三年 .BJinsannianzijin-box { - .BJinsannianzijin {} + width: 100%; + .BJinsannianzijin { + width: 100%; + .BJinsannianzijinchart-left{ + width: 50%; + height: 25vh; + } + } } } diff --git a/src/views/workbenchPro/components/BJinsannianzijin/index.vue b/src/views/workbenchPro/components/BJinsannianzijin/index.vue index 3b402ea..1e44216 100644 --- a/src/views/workbenchPro/components/BJinsannianzijin/index.vue +++ b/src/views/workbenchPro/components/BJinsannianzijin/index.vue @@ -1,29 +1,127 @@ - - - - - - \ No newline at end of file +} + diff --git a/src/views/workbenchPro/components/BJinsannianzijin/mixins/resize.js b/src/views/workbenchPro/components/BJinsannianzijin/mixins/resize.js new file mode 100644 index 0000000..b1e76e9 --- /dev/null +++ b/src/views/workbenchPro/components/BJinsannianzijin/mixins/resize.js @@ -0,0 +1,56 @@ +import { debounce } from '@/utils' + +export default { + data() { + return { + $_sidebarElm: null, + $_resizeHandler: null + } + }, + mounted() { + this.initListener() + }, + activated() { + if (!this.$_resizeHandler) { + // avoid duplication init + this.initListener() + } + + // when keep-alive chart activated, auto resize + this.resize() + }, + beforeDestroy() { + this.destroyListener() + }, + deactivated() { + this.destroyListener() + }, + methods: { + // use $_ for mixins properties + // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential + $_sidebarResizeHandler(e) { + if (e.propertyName === 'width') { + this.$_resizeHandler() + } + }, + initListener() { + this.$_resizeHandler = debounce(() => { + this.resize() + }, 100) + window.addEventListener('resize', this.$_resizeHandler) + + this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0] + this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler) + }, + destroyListener() { + window.removeEventListener('resize', this.$_resizeHandler) + this.$_resizeHandler = null + + this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler) + }, + resize() { + const { chart } = this + chart && chart.resize() + } + } +}