From a5058f8422c6c1696e7ab16692bc610dcb92c628 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 01 九月 2022 17:34:23 +0800
Subject: [PATCH] 1.提交
---
src/views/sbgl/djbz.vue | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/src/views/sbgl/djbz.vue b/src/views/sbgl/djbz.vue
index 2dc802b..2e08caa 100644
--- a/src/views/sbgl/djbz.vue
+++ b/src/views/sbgl/djbz.vue
@@ -58,6 +58,7 @@
<el-table-column
prop="RowNum"
width="50"
+ fixed
label="搴忓彿"
/>
<el-table-column
@@ -148,7 +149,7 @@
:page.sync="form.page"
:limit.sync="form.rows"
align="right"
- layout="prev, pager, next,sizes"
+ layout="total,prev, pager, next,sizes"
popper-class="select_bottom"
@pagination="getDeviceCheckStandArdSearch"
/>
@@ -164,7 +165,7 @@
>
<!-- @close="handleClose"-->
<div>
- <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />璁惧鐐规鏍囧噯淇℃伅
+ <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />璁惧鐐规鏍囧噯淇℃伅锛�
</div>
<div style="margin: 0 30px;">
<el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
@@ -480,7 +481,7 @@
code: '',
name: '',
enable: 'Y',
- description: ''// 涓婄骇鍗曚綅
+ description: ''
},
operation: '',
dialogFormRules: {
@@ -529,19 +530,25 @@
}
},
created() {
- this.getDeviceCheckStandArdSearch()
+ this.handleRequest()
},
mounted() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
-
- this.getDeviceCheckItemSelect()
},
methods: {
+ handleRequest() {
+ this.getDeviceCheckStandArdSearch().then(res => {
+ if (res.code === '200') {
+ this.getDeviceCheckItemSelect()
+ }
+ })
+ },
async getDeviceCheckStandArdSearch() {
const res = await DeviceCheckStandArdSearch(this.form)
this.tableData = res.data
this.total = res.count
+ return { code: res.code }
},
// 鎺掑簭鏀瑰彉鏃�
sortChange({ column, prop, order }) {
@@ -636,6 +643,9 @@
DeleteDeviceCheckStaned({ checkstand_code: row.code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getDeviceCheckStandArdSearch()
}
})
@@ -822,7 +832,7 @@
this.dialogFormEqp.code = row.code
const { data: res } = await DeviceCheckStanedAssociationEqp({ checkstand_code: row.code })
- this.dialogFormEqp.eqpAll = res
+ this.dialogFormEqp.eqpAll = res.filter(item => item.children.length > 0)
if (this.dialogFormEqp.eqpAll.length > 0) {
this.dialogFormEqp.eqpAll.forEach((item, index) => {
@@ -874,6 +884,9 @@
this.dialogFormEqp.eqpAll[index].name = '鍏ㄩ儴'
this.dialogFormEqp.eqpTree = [this.dialogFormEqp.eqpAll[index]]
}
+ })
+ this.$nextTick(() => { // 鏍戝舰鍥炴樉
+ this.$refs.epqTree.setCheckedKeys(this.dialogFormEqp.eqpCodeSelectedArr)
})
},
// 灏忕洅瀛愮偣鍑�
@@ -954,7 +967,7 @@
})
this.dialogFormEqp.eqpCodeSelectedArr = [...new Set(this.dialogFormEqp.eqpCodeSelectedArr)]
}
-
+ console.log(this.dialogFormEqp.eqpCodeSelectedArr, 666)
// 2.绗簩绉嶆儏鍐靛綋鏍戝舰 鍗婂彾 涓洪浂 鍏ㄥ彾 涓洪浂
if (halfCheckedKeys.length === 0 && checkedKeys.length === 0) {
console.log('// 2.绗簩绉嶆儏鍐靛綋鏍戝舰 鍗婂彾 涓洪浂 鍏ㄥ彾 涓洪浂')
--
Gitblit v1.9.3