From e713b378b01d189f972cfb5b9eae749ee95a8b51 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 29 十月 2022 13:48:00 +0800
Subject: [PATCH] 1.解决两个账号登录,是否被挤掉的问题
---
src/views/scgl/gdplgb.vue | 119 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 79 insertions(+), 40 deletions(-)
diff --git a/src/views/scgl/gdplgb.vue b/src/views/scgl/gdplgb.vue
index 4b6b910..dcc9176 100644
--- a/src/views/scgl/gdplgb.vue
+++ b/src/views/scgl/gdplgb.vue
@@ -2,23 +2,20 @@
<div>
<div class="body" :style="{height:mainHeight+'px'}">
<div class="bodyTopButtonGroup" style="justify-content: space-between">
- <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
- <!-- <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>-->
<el-button icon="el-icon-switch-button" @click="handleClose('close')">鎵归噺鍏冲崟</el-button>
<el-button icon="el-icon-switch-button" @click="handleClose('noClose')">鎵归噺鍙嶅叧鍗�</el-button>
-
</div>
<div class="bodyTopFormGroup">
<el-form
ref="form"
:model="form"
- label-width="80px"
+ label-width="100px"
inline
style="display: flex;justify-content: space-between"
>
<div class="elForm">
- <el-form-item label="宸ュ崟鐘舵��" style=" display: flex;">
+ <el-form-item label="宸ュ崟鐘舵��" label-width="70px" style=" display: flex;">
<el-input v-model="form.mesorderstus" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
<el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
@@ -37,37 +34,55 @@
/>
</el-select>
</el-form-item>
- <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label-width="70px" label="浜у搧缂栫爜" style=" display: flex;">
<el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
<el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
<el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
<el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label-width="70px" label="鍒涘缓鏃堕棿" style=" display: flex;">
<el-input v-model="form.createdate" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
</div>
- <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+ <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
<el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
<el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
</div>
</el-form>
+ <div
+ class="bodyTopFormExpand"
+ >
+ <svg-icon
+ v-show="mouseHoverType==='mouseout'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+ @mouseenter="mouseHoverType=$event.type"
+ />
+ <svg-icon
+ v-show="mouseHoverType==='mouseenter'"
+ style="cursor: pointer"
+ :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+ @click="isExpandForm=!isExpandForm"
+ @mouseout="mouseHoverType=$event.type"
+ />
+ </div>
</div>
<div class="elTableDiv">
<el-table
ref="multipleTable"
+ class="tableFixed"
:data="tableData"
- :height="tableHeight+'px'"
+ :height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
border
:row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -147,12 +162,14 @@
prop="partname"
min-width="150"
label="浜у搧鍚嶇О"
+ show-tooltip-when-overflow
sortable="custom"
/>
<el-table-column
prop="partspec"
label="浜у搧瑙勬牸"
sortable="custom"
+ show-tooltip-when-overflow
width="110"
>
<template slot-scope="{row}">
@@ -326,6 +343,8 @@
},
data() {
return {
+ mouseHoverType: 'mouseout',
+ isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -428,40 +447,50 @@
data.push({ wo_code: item.wo_code })
}
})
- this.$confirm('鏄惁纭鎵归噺鍏冲崟?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderBitchClosedSeave({ dt: data }).then(res => {
- if (res.code === '200') {
- this.$message.success('鎵归噺鍏冲崟鎴愬姛锛�')
- this.$refs.multipleTable.clearSelection()
- }
+ if (data.length > 0) {
+ this.$confirm('鏄惁纭鎵归噺鍏冲崟?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderBitchClosedSeave(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鎵归噺鍏冲崟鎴愬姛锛�')
+ this.$refs.multipleTable.clearSelection()
+ this.getMesOrderBitchClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堟壒閲忓叧鍗曪紒')
})
- }).catch(() => {
- this.$message.info('宸插彇娑堟壒閲忓叧鍗曪紒')
- })
+ } else if (data.length === 0) {
+ this.$message.info('鏃犵鍚堝彲鍏抽棴鐨勫伐鍗曪紒')
+ }
} else if (val === 'noClose') {
this.multipleSelection.forEach(item => {
if (item.status === 'CLOSED') {
data.push({ wo_code: item.wo_code })
}
})
- this.$confirm('鏄惁纭鎵归噺鍙嶅叧鍗�?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderBitchAntiClosedSeave({ dt: data }).then(res => {
- if (res.code === '200') {
- this.$message.success('鎵归噺鍙嶅叧鍗曟垚鍔燂紒')
- this.$refs.multipleTable.clearSelection()
- }
+ if (data.length > 0) {
+ this.$confirm('鏄惁纭鎵归噺鍙嶅叧鍗�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderBitchAntiClosedSeave(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鎵归噺鍙嶅叧鍗曟垚鍔燂紒')
+ this.$refs.multipleTable.clearSelection()
+ this.getMesOrderBitchClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堟壒閲忓弽鍏冲崟锛�')
})
- }).catch(() => {
- this.$message.info('宸插彇娑堟壒閲忓弽鍏冲崟锛�')
- })
+ } else if (data.length === 0) {
+ this.$message.info('鏃犵鍚堝彲鍙嶅叧闂殑宸ュ崟锛�')
+ }
}
},
@@ -469,7 +498,8 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 240
+ this.tableHeight = this.mainHeight - 295
+ this.$refs.multipleTable.doLayout()
})
},
tableRowClassName({ row, rowIndex }) {
@@ -580,6 +610,15 @@
align-items: center;
justify-content: center;
}
+
+.tableFixed{
+ ::v-deep .el-table__fixed-right{
+ height: 100% !important;
+ }
+ ::v-deep .el-table__fixed{
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3