From a65112ecf7580c7d5a2ae60d05150cac34e59f5d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 26 九月 2022 16:30:33 +0800
Subject: [PATCH] 1.工艺路线工艺设置下拉选中之后自动回车2.工序定义检验人员选中默认当前登录人员
---
src/views/zzmx/gylx.vue | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/views/zzmx/gylx.vue b/src/views/zzmx/gylx.vue
index 44b8b17..9f3b379 100644
--- a/src/views/zzmx/gylx.vue
+++ b/src/views/zzmx/gylx.vue
@@ -29,7 +29,7 @@
<el-input v-model="form.createuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
</div>
- <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+ <div class="bodySearchReset">
<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>
@@ -38,6 +38,8 @@
<div class="elTableDiv">
<el-table
+ ref="tableDataRef"
+ class="tableFixed"
:data="tableData"
:height="tableHeight"
border
@@ -247,9 +249,11 @@
:debounce="300"
:popper-append-to-body="false"
popper-class="autocompleteClass"
- @select="handleSelect"
+ @select="val=>handleSelect(val,tag)"
@keyup.enter.native="handleInputConfirm(tag)"
/>
+ <!-- @keyup.enter.native="handleInputConfirm(tag)"-->
+
<!-- @blur="handleBlur2"-->
<div
v-if="index!==dynamicTags.length-1"
@@ -285,25 +289,14 @@
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateRoute, DeleteRoute, RouteSearch, StepSelect, ViewRoute } from '@/api/zzmx'
+import { validateCode } from '@/utils/global'
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'GYLX',
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()
- }
- }
- }
return {
isIpad: false,
mainHeight: 0,
@@ -349,7 +342,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'] }
@@ -394,10 +387,11 @@
this.routeArr = res
},
// 澶勭悊涓嬫媺閫夋嫨
- handleSelect(item) {
+ handleSelect(item, tag) {
this.autocompleteValue = item.value
this.$nextTick(_ => {
this.$refs['saveTagInput' + this.mouseFocusPosition][0].focus()
+ this.handleInputConfirm(tag)
})
},
// 杈撳叆妗嗙‘璁や簨浠�
@@ -750,6 +744,7 @@
this.tableHeight = this.tableHeight - 40
}
this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+ this.$refs.tableDataRef.doLayout()
})
},
tableRowClassName({ row, rowIndex }) {
@@ -968,6 +963,15 @@
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