From 21631208dfc6600deaa7bd4435074492c28b7f2c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 29 十二月 2022 10:36:30 +0800
Subject: [PATCH] 1.提交
---
src/views/sbgl/bybz.vue | 128 +++++++++++++++++++++++++++++-------------
1 files changed, 87 insertions(+), 41 deletions(-)
diff --git a/src/views/sbgl/bybz.vue b/src/views/sbgl/bybz.vue
index e4efde1..d8928e8 100644
--- a/src/views/sbgl/bybz.vue
+++ b/src/views/sbgl/bybz.vue
@@ -63,10 +63,12 @@
prop="code"
label="鏍囧噯缂栫爜"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="name"
label="鏍囧噯鍚嶇О"
+ show-tooltip-when-overflow
sortable="custom"
/>
@@ -84,6 +86,7 @@
<el-table-column
prop="main_cycle"
label="淇濆吇鍛ㄦ湡"
+ show-tooltip-when-overflow
sortable="custom"
>
<template slot-scope="{row}">
@@ -97,6 +100,7 @@
prop="is_repaireqp"
label="鍏宠仈璁惧"
sortable="custom"
+ show-tooltip-when-overflow
>
<template slot-scope="{row}">
<i v-if="row.is_repaireqp==='Y'" class="el-icon-share" @click="checkeqpClick(row)" />
@@ -112,10 +116,12 @@
prop="lm_user"
label="鍒涘缓浜哄憳"
sortable="custom"
+ show-tooltip-when-overflow
/>
<el-table-column
prop="lm_date"
label="鍒涘缓鏃堕棿"
+ show-tooltip-when-overflow
width="160"
sortable="custom"
/>
@@ -213,6 +219,7 @@
/>
<el-table-column
prop="repairitem_code"
+ show-tooltip-when-overflow
label="淇濆吇閮ㄤ綅缂栫爜"
>
<template slot-scope="{row}">
@@ -235,6 +242,7 @@
<el-table-column
prop="repairitem_name"
label="淇濆吇閮ㄤ綅鍚嶇О"
+ show-tooltip-when-overflow
>
<template slot-scope="{row}">
<div v-if="row.isVisible===0">{{ row.repairitem_name }}</div>
@@ -267,6 +275,7 @@
<el-table-column
prop="isscan"
label="閫夋嫨鎵爜"
+ show-tooltip-when-overflow
>
<template slot-scope="{row}">
<div v-if="row.isVisible===0">{{ row.isscan === 'Y' ? '鏄�' : '鍚�' }}</div>
@@ -304,7 +313,12 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -373,7 +387,12 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button @click="eqpDialogVisibleCancel">鍙� 娑�</el-button>
- <el-button type="primary" @click="eqpDialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="eqpDialogVisibleConfirm"
+ >纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -478,7 +497,7 @@
},
title_value: '鏁版嵁瀵煎叆 / 鐐规閮ㄤ綅',
- code: '4',
+ code: '23',
shows: false
}
@@ -575,7 +594,7 @@
},
// 淇敼鍓嶈姹傛帴鍙�
async getViewDeviceRepairStanedSearch(repairstand_code) {
- const { data: res } = await ViewDeviceRepairStanedSearch({ repairstand_code })
+ const { data: res } = await ViewDeviceRepairStanedSearch({ repairstand_code })
this.tableDataDialog = res.Data
this.dialogForm.code = res.code
@@ -631,6 +650,7 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
this.tableDataDialog.filter(item => item.repairitem_code !== '')
let Data = []
@@ -652,9 +672,10 @@
AddUpdateDeviceRepairStandArd(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
if (res.code === '200') {
- this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
+ this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.getDeviceRepairStandArdSearch()
+ this.$store.state.app.buttonIsDisabled = false
} else {
this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
@@ -775,43 +796,59 @@
return 'custom-row'
},
// 鍏宠仈璁惧
- async checkeqpClick(row) {
+ checkeqpClick(row) {
+ const loading = this.$loading({
+ lock: true,
+ text: '姝e湪鍔犺浇鏁版嵁锛岃绋嶇瓑...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+
this.dialogFormEqp.name = row.name
this.dialogFormEqp.code = row.code
- const { data: res } = await DeviceRepairStanedAssociationEqp({ repairstand_code: row.code })
- this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0)
+ DeviceRepairStanedAssociationEqp({ repairstand_code: row.code }).then(res => {
+ if (res.code === '200') {
+ setTimeout(() => {
+ loading.close()
+ this.dialogFormEqp.eqpAll = res.data.filter(item => item.children.length > 0)
- if (this.dialogFormEqp.eqpAll.length > 0) {
- this.dialogFormEqp.eqpAll.forEach((item, index) => {
- this.dialogFormEqp.eqpArr.push({
- code: item.code,
- name: item.name,
- type: item.type,
- isSelected1: index === 0,
- isSelected2: item.flag === 'Y'
- })
- if (item.flag === 'Y') {
- this.$nextTick(() => {
- $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ if (this.dialogFormEqp.eqpAll.length > 0) {
+ this.dialogFormEqp.eqpAll.forEach((item, index) => {
+ this.dialogFormEqp.eqpArr.push({
+ code: item.code,
+ name: item.name,
+ type: item.type,
+ isSelected1: index === 0,
+ isSelected2: item.flag === 'Y'
+ })
+ if (item.flag === 'Y') {
+ this.$nextTick(() => {
+ $('input:checkbox').eq(index).prop('checked', true)// 鑷畾涔夊崟閫夋鍥炴樉
+ })
+ }
+ if (item.children && item.children.length > 0) {
+ item.children.forEach(it => {
+ if (it.flag === 'Y') {
+ this.dialogFormEqp.eqpCodeSelectedArr.push(it.code)
+ }
+ })
+ }
+ })
+ this.dialogFormEqp.eqpAll[0].name = '鍏ㄩ儴'
+ this.dialogFormEqp.eqpTree = [this.dialogFormEqp.eqpAll[0]]
+ }
+
+ this.dialogVisibleEqp = true
+
+ this.$nextTick(() => { // 鏍戝舰鍥炴樉
+ this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr)
})
- }
- if (item.children && item.children.length > 0) {
- item.children.forEach(it => {
- if (it.flag === 'Y') {
- this.dialogFormEqp.eqpCodeSelectedArr.push(it.code)
- }
- })
- }
- })
- this.dialogFormEqp.eqpAll[0].name = '鍏ㄩ儴'
- this.dialogFormEqp.eqpTree = [this.dialogFormEqp.eqpAll[0]]
- }
-
- this.dialogVisibleEqp = true
-
- this.$nextTick(() => { // 鏍戝舰鍥炴樉
- this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr)
+ }, 1000)
+ } else {
+ loading.close()
+ }
})
},
// 鍏宠仈璁惧瀵硅瘽妗嗗叧闂�
@@ -971,6 +1008,7 @@
eqpDialogVisibleConfirm() {
// console.log(this.dialogFormEqp.eqpCodeSelectedArr, 888)
// this.dialogVisibleEqp = false
+ this.$store.state.app.buttonIsDisabled = true
const data = []
this.dialogFormEqp.eqpAll.forEach((item, index) => {
if (item.children && item.children.length > 0) {
@@ -987,9 +1025,10 @@
SaveDeviceRepairStanedAssociationEqp(data, this.dialogFormEqp.code).then(res => {
if (res.code === '200') {
+ this.dialogVisibleEqp = false
this.$message.success('鍏宠仈鎴愬姛锛�')
this.getDeviceRepairStandArdSearch()
- this.dialogVisibleEqp = false
+ this.$store.state.app.buttonIsDisabled = false
}
})
}
@@ -1163,18 +1202,25 @@
justify-content: center;
}
-.tableFixed{
- ::v-deep .el-table__fixed-right{
+.tableFixed {
+ ::v-deep .el-table__fixed-right {
height: 100% !important;
}
- ::v-deep .el-table__fixed{
+
+ ::v-deep .el-table__fixed {
height: 100% !important;
}
}
</style>
<style>
+.osloading{
+ font-size: 26px !important;
+}
+.el-loading-text{
+ font-size: 26px !important;
+}
.el-table .custom-row {
background: #f8f8fa;
}
--
Gitblit v1.9.3