From 101e8e9738e4bfe0ef7a5170d117b47bf901b8f6 Mon Sep 17 00:00:00 2001
From: ludc <pUXmgxCf6A>
Date: 星期一, 29 五月 2023 11:29:48 +0800
Subject: [PATCH] 集团主模型发布接口方法移植开发

---
 Source/UBCS-WEB/src/views/code/code.vue |   84 ++++++++++++++++++++++++++++++++---------
 1 files changed, 65 insertions(+), 19 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 3b01571..5703cc0 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -1,5 +1,5 @@
 <template>
-  <basic-container style="height: 350px;">
+  <basic-container style="height: 100%;">
 
     <!-- 缂栫爜瑙勫垯淇℃伅灞曠ず鍖哄煙 -->
     <basic-container class="code-rule-container">
@@ -149,8 +149,8 @@
         </el-row>
       </div>
       <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
-        <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="saveCloneCodeRule">淇� 瀛�</el-button>
+        <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
       </div>
     </el-dialog>
     <!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
@@ -190,8 +190,8 @@
         </el-row>
       </div>
       <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
-        <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="saveOtherCodeBasic">淇� 瀛�</el-button>
+        <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
       </div>
     </el-dialog>
 
@@ -647,8 +647,8 @@
       <!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
       <el-divider class="horizontal-line" direction="horizontal"></el-divider>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
         <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
+        <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
       </div>
 
       <!--  绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨瀵硅瘽妗� -->
@@ -691,8 +691,8 @@
           </el-row>
         </div>
         <div slot="footer" class="dialog-footer">
-          <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
           <el-button type="primary" @click="selectedListClassifyLinkAttr">纭� 瀹�</el-button>
+          <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
         </div>
       </el-dialog>
 
@@ -726,8 +726,8 @@
           @on-load="parentClassifyOnLoad">
         </avue-crud>
         <div slot="footer" class="dialog-footer">
-          <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
           <el-button type="primary" @click="saveSelectedParentClassify">淇� 瀛�</el-button>
+          <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
         </div>
       </el-dialog>
 
@@ -752,16 +752,20 @@
           @row-click="referBtmRowClick">
         </avue-crud>
         <div slot="footer" class="dialog-footer">
-          <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
           <el-button type="primary" @click="saveSelectedreferBtm">淇� 瀛�</el-button>
+          <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
         </div>
       </el-dialog>
 
-      <!-- 绗簩灞傚璇濇,鍙傜収閰嶇疆缁勪欢 -->
-      <refer-config-dialog
-        ref="referConfigDialog"
+      <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
+      <refer-config-form-dialog
+        ref="referConfigFormDialog"
         @echoReferConfig="echoReferConfig" >
-      </refer-config-dialog>
+      </refer-config-form-dialog>
+      <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆curd缁勪欢 -->
+      <refer-config-crud-dialog
+        ref="referConfigCrudDialog">
+      </refer-config-crud-dialog>
 
     </el-dialog>
 
@@ -796,7 +800,7 @@
   import referBtmOption from "@/const/code/referBtmDialog";
   import fixedValueOption from "@/const/code/fixedValueMgrDialog";
   import {mapGetters} from "vuex";
-
+  import func from "@/util/func";
   export default {
       data() {
         return {
@@ -1117,7 +1121,11 @@
 
         /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
         echoReferConfig(content){
-          this.form.referConfig = content;
+          this.form.referBtmId = content.referType;
+          this.form.referBtmName = content.referTypeName;
+          //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉
+          let submitFormJson = JSON.stringify(content);
+          this.form.referConfig = submitFormJson;
         },
         
         /** 涓哄弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷閫夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉�  */
@@ -2074,6 +2082,7 @@
         },
         // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
         codeRuleRowClick (row) {
+          // 杩欏効搴旇鍙互涓嶈锛屽洜涓簍oggleRowSelection涔熶細瑙﹀彂琛岄�夋嫨鏃堕棿
           this.selectionList = row;
           this.$refs.crud.toggleSelection();
           this.$refs.crud.setCurrentRow(row);
@@ -2379,11 +2388,46 @@
             this.isShowSelectReferBtmOption = true;
             this.refreshReferBtmDataChange();
           }else if(condition === 'referConfig'){
-            this.$refs.referConfigDialog.isShowReferConfig = true;
-            //琛ㄦ牸閿欒鐨勯棶棰樻墍
-            this.$refs.referConfigDialog.onloadAttrData();
+            if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
+              this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+              let value = {
+                referTypeName: this.form.referBtmName,
+                referType: this.form.referBtmId,
+                referConfig: this.form.referConfig,
+              }
+              this.$refs.referConfigFormDialog.initPageData(value);
+            }else{
+              this.openTipsChooseOrCust();
+            }
+             //this.$refs.referConfigFormDialog.onloadAttrData();
           }
         },
+        // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐣岄潰
+        openTipsChooseOrCust(){
+          this.$confirm('璇烽�夋嫨鍙傜収閰嶇疆鐨勫畾涔夋柟寮忥紵','鍙傜収閰嶇疆鐨勬柟寮�', {
+            distinguishCancelAndClose: true,
+            closeOnClickModal: false,
+            confirmButtonText: '鑷畾涔夊弬鐓ч厤缃�',
+            cancelButtonText: '鐩存帴閫夋嫨鍙傜収閰嶇疆'
+          })
+          .then(() => {
+            // 鎵撳紑鑷畾鍙傜収閰嶇疆瀵硅瘽妗�
+            this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
+            // 琛ㄦ牸閿欒鐨勯棶棰�
+            this.$refs.referConfigFormDialog.onloadAttrData();
+          })
+          .catch(action => {
+            if (action === "cancel") {
+              // 鎵撳紑鐩存帴閫夋嫨鍙傜収閰嶇疆瀵硅瘽妗�
+              this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true;
+              this.$refs.referConfigCrudDialog.referConfigOnload();
+            }
+            //console.log(action);
+          });
+          // 璁╁弬鐓ч厤缃緭鍏ユ澶卞幓鐒︾偣锛屽惁鍒欒鎻愮ず妗嗘棤娉曡鍏抽棴
+          this.$refs.referConfig.$el.querySelector('input').blur();
+        },
+
         // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
         clearAttrDataByIcon(condition){
           if(condition === 'attr'){
@@ -2397,6 +2441,8 @@
             this.form.parentClassifySecOid = '';
           }else if(condition === 'referBtmId'){
             this.form.referBtmId = '';
+            this.form.referBtmName = '';
+            this.form.referConfig = '';
           }else if(condition === 'referConfig'){
             this.form.referConfig = '';
           }
@@ -2663,14 +2709,14 @@
 
   .add-basicsec-form > .el-divider--vertical {
     width: 2px;
-    height: 72%;
+    height: 100%;
     margin: 0 auto;
-    position: fixed;
+    /* position: fixed; */
   }
 
  .left {
     /* float: left; */
-    width: 49%;
+    width: 45%;
     height: 100%;
  }
 

--
Gitblit v1.9.3