From 3e20408521d46b1086a5e77b914d04afb9630ab0 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 28 七月 2023 10:37:02 +0800
Subject: [PATCH] 主题库开启编辑分类注入bug

---
 Source/UBCS-WEB/src/components/Tree/classifyTrees.vue |    3 ++-
 Source/UBCS-WEB/src/components/Tree/TemplatePro.vue   |    2 +-
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue      |   19 ++++++++++++-------
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue b/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
index 13f0f5e..d17656e 100644
--- a/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
+++ b/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
@@ -18,7 +18,7 @@
 <script>
 export default {
   name: "TemplatePro.vue",
-  props: ['ProData','crudOid','crudLCStatus','crudArray','Formlist','codeClassifyOid'],
+  props: ['ProData','crudOid','crudLCStatus','crudArray','Formlist','codeClassifyOid','rowIndex'],
   data: function () {
     return {
       type: {},
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 5cfb2a4..8f655e7 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -277,7 +277,7 @@
       >
         <template slot-scope="{ row }">
           <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text'  ||item.edit == 'refer' )" v-model="row[item.prop]"
-                    @blur="saveRows"></el-input>
+                    @blur="saveRows" ></el-input>
           <el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
                            @blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number>
           <el-select v-model="row[item.prop]" filterable  allow-create  default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @blur="selectChangeHandler(item.editConfig,index)">
@@ -380,12 +380,17 @@
       }
       return '';
     },
+    editOpenFlag:{
+      handler(newval,oldval){
+        console.log(newval)
+      },
+      deep:true,
+      immediate:true
+    }
 
   },
   data() {
     return {
-      //鏄惁寮�鍚紪杈�
-      initializing:false,
       loading:false,
       referConfigText:"",
       referConfigVisble:false,
@@ -1761,7 +1766,6 @@
       } else if (this.attrSelectList.length < 1) {
         this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉挎暟鎹�')
       } else if (this.attrSelectList.length === 1) {
-        console.log(this.injectOption)
         this.injectVisible = true;
       }
     },
@@ -1775,6 +1779,7 @@
         "鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
       }
       //鍗曞厓鏍肩紪杈戣祴鍊间竴閬�
+      // noinspection JSCheckFunctionSignatures
       if(this.CurrentCell){
         //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
         if(this.CurrentCell.classifyInvokeLevel!== 'min'){
@@ -1784,9 +1789,10 @@
         this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr,
         this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName,
         this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag,
-        this.$set(this.CurrentCell, "classifyInvokeText", data);
+        // this.$set(this.CurrentCell, 'classifyInvokeText', data)
+          this.CurrentCell.classifyInvokeText = data;
         this.injectHandleReset()
-      }else {add
+      }else {
         //鍕鹃�夋搷浣�
         for (const key in this.injectOption) {
           this.attrSelectList[0][key] = this.injectOption[key];
@@ -1803,7 +1809,6 @@
       }else  {
         this.injectOption.classifyNumber=0;
       }
-      this.editOpenFlag=true
       this.injectVisible = false;
 
     },
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 41160fd..03fec95 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -214,7 +214,7 @@
               </template>
           </avue-crud>
           </basic-container>
-          <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
+          <templatePro :ProData="this.ProData" :rowIndex="this.selectRow" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
         </span>
         <!--     缂栫爜瑙勫垯-->
         <el-dialog  :visible.sync="MasterdialogVisible"   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
@@ -937,6 +937,7 @@
       this.crudOid=row.oid;
       this.crudLCStatus=row.lcStatus;
       this.crudArray.push(row);
+      console.log(row.$index)
       gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => {
         this.ProData = res.data.data;
         //鍒嗙被娉ㄥ叆鏁版嵁鏍煎紡

--
Gitblit v1.9.3