From 1f6c005d4446b0bdf40d1680c385e43bd53d963d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 25 八月 2023 11:04:28 +0800
Subject: [PATCH] 主数据 码段展示(层级码段)
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 549fce6..5be48b7 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -326,12 +326,11 @@
>
<template slot-scope="{ row }">
<el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )"
- ref="inputRef"
- :id="'inputRef' + row.oid"
+ :ref="'input' + row.oid"
v-show="!AddCellFlag"
v-model="row[item.prop]"
- @blur="saveRows"
- autofocus></el-input>
+ @blur="saveRows(row)"
+ ></el-input>
<el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
:style="{width:(item.width-10)+'px'}"
controls-position="right"
@@ -1814,15 +1813,19 @@
},
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
+ console.log(row,column)
if (this.editOpenFlag) {
this.editingRows = row;
this.editShows = column.property;
this.rowOid = row.oid;
this.CurrentCell = row;
- // const inputElement = document.querySelector(`#inputRef${row.oid}`);
- // if (inputElement) {
- // inputElement.focus();
- // };
+ this.$nextTick(() => {
+ const inputs = this.$refs['input' + row.oid];
+ const input = inputs && inputs.length > 0 ? inputs[0].$el : null;
+ if (input) {
+ input.focus();
+ }
+ });
if (column.property == 'referConfig') {
this.referConfigVisble = true;
this.referConfigOption = {
@@ -1854,6 +1857,7 @@
this.isShowformulaEdit = true;
} else if (column.property == 'enumString') {
this.enumVisible = true;
+ this.tableData=[];
if (this.CurrentCell.enumString != "") {
this.tableData = JSON.parse(this.CurrentCell.enumString)
return
--
Gitblit v1.9.3