From cf0d9d26330012e319b4de88d181c66bc907eb0d Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期五, 18 八月 2023 11:46:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue |   55 ++++++++++++++++++++++++++-----------------------------
 1 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 7944637..5be48b7 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -71,19 +71,19 @@
                    size="small"
                    @click="editOpen">寮�鍚紪杈�
         </el-button>
+        <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="璇烽�夋嫨"
+                   size="small">
+          <el-option
+            v-for="item in selectoptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+        <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue"
+                   active-value="true" style="margin:6px 0 0 10px" @change="batchSetFlag">
+        </el-switch>
       </el-button-group>
-      <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="璇烽�夋嫨"
-                 size="small">
-        <el-option
-          v-for="item in selectoptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue"
-                 active-value="true" style="margin:6px 0 0 10px" @change="batchSetFlag">
-      </el-switch>
     </div>
     <!--    寮圭獥-->
     <div>
@@ -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"
@@ -1759,7 +1758,6 @@
       this.ProData.forEach((item, index) => {
         if ((item.requireFlag && item.requireFlag.toString() == 'true') && (item.readOnlyFlag && item.readOnlyFlag.toString() == 'true')) {
           this.$message.warning(item.name + "(" + item.id + ")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
-          console.log(item)
           ischeck = false;
           return;
         }
@@ -1767,29 +1765,23 @@
         if (item.componentRule) {
           //缁勫悎瑙勫垯
           num++
-          console.log('componentRule', num)
         }
         if (item.enumString || item.enumId) {
           //鏋氫妇
           num++
-          console.log('enumString', num)
         }
         if (item.referConfig || item.referBtmId) {
           //鍙傜収
           num++
-          console.log('referConfig', num)
         }
         if (item.codeDateFormat) {
           //鏃堕棿鏍煎紡
           num++
-          console.log('codeDateFormat', num)
         }
         //濡傛灉绌哄悗鍙拌繑鍥瀗one
         if (item.classifyInvokeLevel && item.classifyInvokeLevel != 'none') {
           //鍒嗙被娉ㄥ叆
           num++
-          console.log('classifyInvokeLevel', num)
-          console.log(item.classifyInvokeLevel)
         }
         if (num > 1 && ischeck) {
           this.$message({
@@ -1821,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 = {
@@ -1861,8 +1857,9 @@
           this.isShowformulaEdit = true;
         } else if (column.property == 'enumString') {
           this.enumVisible = true;
-          if (this.attrSelectList[0].enumString != "") {
-            this.tableData = JSON.parse(this.attrSelectList[0].enumString)
+          this.tableData=[];
+          if (this.CurrentCell.enumString != "") {
+            this.tableData = JSON.parse(this.CurrentCell.enumString)
             return
           }
         } else if (column.property == 'parentCode') {

--
Gitblit v1.9.3