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/zlgl/gxjybz.vue | 57 ++++++++++++++++++++++++++++++---------------------------
1 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/src/views/zlgl/gxjybz.vue b/src/views/zlgl/gxjybz.vue
index ac781af..29c33dc 100644
--- a/src/views/zlgl/gxjybz.vue
+++ b/src/views/zlgl/gxjybz.vue
@@ -10,12 +10,12 @@
<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="鏍囧噯浠g爜" style=" display: flex;">
+ <el-form-item label-width="70px" label="鏍囧噯浠g爜" style=" display: flex;">
<el-input v-model="form.stanedcode" placeholder="璇疯緭鍏�" style="width: 200px" />
</el-form-item>
<el-form-item label="鏍囧噯鍚嶇О" style=" display: flex;">
@@ -25,14 +25,19 @@
<el-input v-model="form.staneddescr" 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"
+ />
</div>
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="tableHeight+'px'"
border
@@ -253,7 +258,13 @@
<div class="footerButton">
<el-button v-if="operation==='check'" @click="dialogVisibleCancel">杩� 鍥�</el-button>
<el-button v-if="operation!=='check'" @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-if="operation!=='check'" type="primary" @click="dialogVisibleConfirm">鎻� 浜�</el-button>
+ <el-button
+ v-if="operation!=='check'"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ type="primary"
+ @click="dialogVisibleConfirm"
+ >鎻� 浜�</el-button>
</div>
</span>
</el-dialog>
@@ -268,32 +279,14 @@
StepCheckItemSelect,
StepCheckStanedSearch
} from '@/api/zlgl'
+import { validateCode } from '@/utils/global'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'ZJBZ',
components: {
Pagination
},
data() {
- const validateName = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇疯緭鍏ョ紪鐮�'))
- } else {
- if (SER_HZ.test(value)) {
- return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
- } else {
- callback()
- }
- }
- }
- const validateTypeCode = (rule, value, callback) => {
- if (!value) {
- return callback(new Error('璇烽�夋嫨涓婄骇'))
- } else {
- callback()
- }
- }
return {
isIpad: false,
mainHeight: 0,
@@ -319,7 +312,7 @@
operation: '',
dialogFormRules: {
code: [
- { required: true, validator: validateName, trigger: ['blur', 'change'] }
+ { required: true, validator: validateCode, trigger: ['blur', 'change'] }
],
name: [
{ required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
@@ -459,6 +452,7 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
const tableData = []
this.JYTableData = this.JYTableData.filter(item => item.code !== '')
this.JYTableData.forEach((item, index) => {
@@ -477,9 +471,10 @@
}
AddUpdateStepCheckStaned(this.operation === 'add' ? 'Add' : 'Update', data).then(res => {
if (res.code === '200') {
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.getStepCheckStanedSearch()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
@@ -491,8 +486,9 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 200
+ this.tableHeight = this.mainHeight - 195
this.isIpad = window.innerHeight < 769
+ this.$refs.tableDataRef.doLayout()
// if (window.innerHeight < 769) {
// this.tableHeight = this.tableHeight - 50
// }
@@ -715,7 +711,14 @@
.userDialogVisible ::v-deep .el-form-item {
margin-bottom: 0;
}
-
+.tableFixed{
+ ::v-deep .el-table__fixed-right{
+ height: 100% !important;
+ }
+ ::v-deep .el-table__fixed{
+ height: 100% !important;
+ }
+}
</style>
<style>
--
Gitblit v1.9.3