From 1396bf8b35c16a104e24d3c795d4a6fe0216c2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 7 Nov 2024 11:31:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BC=A0=E6=A0=87=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E6=9B=B4=E6=94=B9=E8=8F=9C=E5=8D=95=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/assets/styles/sidebar.scss | 8 +- hw-ui/src/layout/index.vue | 133 ++++++++++++------ .../views/mes/productplan/editProductPlan.vue | 7 +- 3 files changed, 100 insertions(+), 48 deletions(-) diff --git a/hw-ui/src/assets/styles/sidebar.scss b/hw-ui/src/assets/styles/sidebar.scss index abe5b63..b06fe4c 100644 --- a/hw-ui/src/assets/styles/sidebar.scss +++ b/hw-ui/src/assets/styles/sidebar.scss @@ -14,7 +14,8 @@ .sidebar-container { -webkit-transition: width .28s; transition: width 0.28s; - width: $base-sidebar-width !important; + //width: $base-sidebar-width !important; + width: $base-sidebar-width ; background-color: $base-menu-background; height: 100%; position: fixed; @@ -109,7 +110,7 @@ .hideSidebar { .sidebar-container { - width: 54px !important; + //width: 54px !important; } .main-container { @@ -169,7 +170,8 @@ .sidebar-container { transition: transform .28s; - width: $base-sidebar-width !important; + width: $base-sidebar-width ; + //width: $base-sidebar-width !important; } &.hideSidebar { diff --git a/hw-ui/src/layout/index.vue b/hw-ui/src/layout/index.vue index dba4393..b0b7c56 100644 --- a/hw-ui/src/layout/index.vue +++ b/hw-ui/src/layout/index.vue @@ -1,8 +1,10 @@ @@ -24,6 +29,11 @@ import variables from '@/assets/styles/variables.scss' export default { name: 'Layout', + data: () => { + return { + sidebarWidth: 54 + } + }, components: { AppMain, Navbar, @@ -33,6 +43,18 @@ export default { TagsView }, mixins: [ResizeMixin], + watch: { + 'sidebar.opened': { + handler: function() { + console.log(this.sidebar.opened) + if (this.sidebar.opened) { + this.sidebarWidth = 200 + } else { + this.sidebarWidth = 54 + } + } + } + }, computed: { ...mapState({ theme: state => state.settings.theme, @@ -51,61 +73,92 @@ export default { } }, variables() { - return variables; + return variables } }, methods: { handleClickOutside() { this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) - } + }, + setLineLeft(e) { + console.log(e) + let left = e.pageX + if (left < 54) { + left = 54 + } + if (left > 1000) { + left = 1000 + } + // if(left <100){ + // this.needTagsView = true + // } + // if(left >210){ + // this.needTagsView = false + // } + this.sidebarWidth = left + }, + layoutLineMouseDown(e) { + window.addEventListener('mousemove', this.setLineLeft) + window.addEventListener('mouseup', ()=>{window.removeEventListener('mousemove', this.setLineLeft)}) + }, } } diff --git a/hw-ui/src/views/mes/productplan/editProductPlan.vue b/hw-ui/src/views/mes/productplan/editProductPlan.vue index 34fb37e..259c78b 100644 --- a/hw-ui/src/views/mes/productplan/editProductPlan.vue +++ b/hw-ui/src/views/mes/productplan/editProductPlan.vue @@ -203,9 +203,6 @@ size="mini" type="primary" @click="handleApplyRawOutstock(scope.row)" - v-if="scope.row.processType === PROCESS_TYPE.AUTO && scope.row.planId!=null && scope.row.planId!=='' - && scope.row.planStatus !== PLAN_STATUS.FINISHED - && form.orderStatus!==ORDER_STATUS.FINISHED && form.orderStatus!==ORDER_STATUS.RECALLED && form.orderStatus!==ORDER_STATUS.DELETED" >投料 @@ -1408,14 +1405,14 @@ export default { }, handleApplyRawOutstock(row) { - if (row.processType === this.PROCESS_TYPE.AUTO) { + // if (row.processType === this.PROCESS_TYPE.AUTO) { this.applyRawOutstockOpen = true; this.productPlanData.planCode = row.planCode; this.productPlanData.planId = row.planId; this.productPlanData.dispatchAmount = row.dispatchAmount; this.productPlanData.saleOrderId = this.form.saleOrderId; this.productPlanData.materialBomId = this.form.materialBomId; - } + // } }, closeRawOutstockDialog() {