From 7569bb2d8f1fafa2058a8090078ebf21c1a3e486 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期四, 06 七月 2023 18:44:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue |   60 ++++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 5c286cb..0c3aa5b 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -7,7 +7,7 @@
       <!--        鍏ㄥ睆缂栬緫-->
       <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">鍏ㄥ睆缂栬緫</el-button>
       <!--        楠岃瘉瑙勫垯-->
-      <el-button icon="el-icon-info" size="small" @click="rulesVisible=true">楠岃瘉瑙勫垯</el-button>
+      <el-button icon="el-icon-info" size="small" @click="rulesVisibleHandle">楠岃瘉瑙勫垯</el-button>
       <!--        灞炴�у垎缁�-->
       <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">灞炴�у垎缁�</el-button>
       </el-button-group>
@@ -225,10 +225,15 @@
           </template>
         </avue-crud>
         <div style="display: flex;justify-content: flex-end;margin-top: 15px">
-          <el-button size="small" type="primary" @click="busineAddHandle">淇濆瓨</el-button>
+          <el-button size="small" type="primary" @click="busineAddHandle">纭閫夋嫨</el-button>
           <el-button size="small" type="primary" @click="addVisible=false">鍙栨秷</el-button>
         </div>
       </el-dialog>
+      <!--      鍙傜収閰嶇疆-->
+        <refer-config-form-dialog
+          ref="referConfigFormDialog"
+          @echoReferConfig="echoReferConfig"
+        ></refer-config-form-dialog>
     </div>
     <el-table :data="ProData"
               style="width: 100%"
@@ -262,9 +267,9 @@
           <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' " @focus="DataChangeHandler(item.editConfig,index)">
             <el-option
               v-for="optionItem in item.data"
-              :key="optionItem.key"
-              :label="optionItem.value"
-              :value="optionItem.key">
+              :key="optionItem.dictValue"
+              :label="optionItem.dictValue"
+              :value="optionItem.dictValue">
             </el-option>
           </el-select>
           <el-switch
@@ -340,6 +345,8 @@
   },
   data() {
     return {
+      //鍙傜収
+      referVisible:false,
       crudArrayFlag:false,
       editingRows: null,
       editShows:"",
@@ -1122,6 +1129,7 @@
             prop: "prefixValue",
             sortable: true,
             edit: 'select',
+            width: 110,
             editConfig: {
               extraParams: {
                 code: 'codeclstempattr',
@@ -1135,6 +1143,7 @@
             prop: "suffixValue",
             sortable: true,
             edit: 'select',
+            width: 110,
             editConfig: {
               extraParams: {
                 code: 'codeclstempattr',
@@ -1314,26 +1323,31 @@
     formAttr(row, column) {
       console.log(row,column)
     },
+    //鍙傜収閰嶇疆瀛愮粍浠�
+    echoReferConfig(val){
+      console.log(val)
+    },
     //鏃堕棿涓嬫媺鏍煎紡
     DataChangeHandler(editConfig,index){
-      listByFlag(editConfig.extraParams).then(res=>{
-        console.log(res);
-        this.option.column[index].data=res;
-      })
+      if(!this.option.column[index].data){
+        listByFlag(editConfig.extraParams).then(res=>{
+          this.option.column[index].data=res.data;
+        })
+      }
     },
     //灞炴�у垎缁勬寜閽�
     attrVisibleHandle() {
-      if (this.attrSelectList.length > 1) {
-        this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉垮睘鎬�')
-      } else if (this.attrSelectList < 1) {
-        this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
-      } else if (this.attrSelectList.length === 1) {
-        this.attrVisible = true;
+      if(this.attrSelectList.length==0){
+        this.$message.warning('璇烽�夋嫨灞炴��');
+        return false;
       }
+      this.attrVisible = true;
     },
     //灞炴�у垎缁勬彁浜�
     attrHandle() {
-      this.$set(this.attrRow, 'attributeGroup', this.attrModel)
+      this.attrSelectList.forEach((item)=>{
+        this.$set(item, 'attributeGroup', this.attrModel)
+      })
       this.attrModel = ""
       this.attrVisible = false
     },
@@ -1467,8 +1481,8 @@
         this.editShows = column.property;
         this.rowOid = row.oid;
       console.log(row,column)
-      if(column.property == 'codeDateFormat' ){
-
+      if(column.property == 'referConfig' ){
+        this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
       }
     },
     saveRows() {
@@ -1518,6 +1532,13 @@
     saveRow() {
       this.editingRow = null;
     },
+    rulesVisibleHandle(){
+      if(this.attrSelectList.length==0){
+        this.$message.warning('璇烽�夋嫨灞炴��');
+        return false;
+      }
+      this.rulesVisible = true;
+    },
     //瑙勫垯鏍¢獙锛屽弻鍑昏〃鍗曚簨浠�
     handleRulesRowDBLClick(row) {
       this.RulesForm.expressionText = row.bds
@@ -1529,6 +1550,9 @@
     },
     // 楠岃瘉瑙勫垯纭畾
     rulesHandle() {
+      this.attrSelectList.forEach((item)=>{
+        this.$set(item, 'verifyRule', this.RulesForm.expressionText)
+      })
       this.rulesVisible = false
     },
     //楠岃瘉瑙勫垯妫�鏌�

--
Gitblit v1.9.3