From 51cd18dc2821b2b67802ea36c707fd96b99a6afa Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 05 七月 2023 09:46:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue |  274 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 259 insertions(+), 15 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 1fef09a..9b013db 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -1,54 +1,295 @@
 <template>
-  <avue-form v-model="TreeNewForm" :option="option" @submit="submit">
-
-  </avue-form>
-
+  <div>
+    <avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'">
+    </avue-form>
+    <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
+    </avue-form>
+    <div>
+<!--      涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�-->
+      <el-dialog  :visible.sync="MasterdialogVisible"   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
+        <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
+        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
+          <el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button>
+          <el-button  size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
+        </div>
+      </el-dialog>
+<!--      鍏抽敭灞炴�ф煡璇㈣鍒�-->
+      <el-dialog  :visible.sync="KeydialogVisible"   title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body>
+        <avue-crud :data="KeyData" :option="masterOption" @select="masterSelect"></avue-crud>
+        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
+          <el-button type="primary" size="small" @click="KeyHandlerClick">纭畾</el-button>
+          <el-button  size="small" @click="KeydialogVisible=false">鍙栨秷</el-button>
+        </div>
+      </el-dialog>
+      <!--      鐩镐技椤规煡璇㈣鍒�-->
+      <el-dialog  :visible.sync="SimidialogVisible"   title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body>
+        <avue-crud :data="simData" :option="masterOption" @select="masterSelect"></avue-crud>
+        <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
+          <el-button type="primary" size="small" @click="simHandlerClick">纭畾</el-button>
+          <el-button  size="small" @click="SimidialogVisible=false">鍙栨秷</el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
 </template>
 
 <script>
+import {defaultReferDataGrid} from '@/api/MasterData/master'
+import {TreeEditSave} from '@/api/template/templateAttr'
 export default {
   name: "classifyTreeform.vue",
-  props: ["TreeNewForm"],
+  props: ['loneTreeNewForm','flag'],
   data() {
     return {
+      KeyData:[],
+      simData:[],
+      name:"",
+      oid:"",
+      masterInput:'',
+      MasterSearchSelects:"",
+      masterData:[],
+      masterOption:{
+        addBtn:false,
+        index:true,
+        border:true,
+        selection:true,
+        menu:false,
+        height:380,
+        column:[
+          {
+            label:'鑻辨枃鍚嶇О',
+            prop:'id'
+          },
+          {
+            label:'涓枃鍚嶇О',
+            prop:'name'
+          },
+          {
+            label:'鎻忚堪',
+            prop:'description'
+          }
+        ]
+      },
+      MasterdialogVisible:false,
+      KeydialogVisible:false,
+      SimidialogVisible:false,
       form: {
         name: "鍝堝搱",
         sex: "鐢�"
       },
       option: {
+        submitBtn:false,
+        emptyBtn:false,
+
         column: [
           {
-            label: '濮撳悕',
+            label: '涓婚搴�/鍒嗙被缂栧彿',
+            prop: 'btmtypeid',
+            labelWidth:135,
+            readonly: true,
+            rules: [{
+              required: true,
+              message: "涓婚搴�/鍒嗙被缂栧彿",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '涓婚搴�/鍒嗙被鍚嶇О',
             prop: 'name',
             readonly: true,
+            labelWidth:135,
             rules: [{
               required: true,
-              message: "璇疯緭鍏ュ鍚�",
+              message: "涓婚搴�/鍒嗙被鍚嶇О",
               trigger: "blur"
             }]
-          }, {
-            label: '鎬у埆',
-            prop: 'sex',
+          },
+          {
+            label:"鎻忚堪",
+            prop:"description",
+            labelWidth:128,
+            readonly: true,
+          },
+          {
+            label: '瀛樺偍鐨勪笟鍔$被鍨�',
+            prop: 'btmtypename',
+            labelWidth:128,
             readonly: true,
             rules: [{
               required: true,
-              message: "璇疯緭鍏ユ�у埆",
+              message: "瀛樺偍鐨勪笟鍔$被鍨�",
               trigger: "blur"
             }]
-          }
+          },
+          {
+            label:"缂栫爜瑙勫垯",
+            prop:"coderuleoidName",
+            labelWidth:128,
+            readonly: true,
+          },
+          {
+            label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
+            prop:"codekeyattrrepeatoidName",
+            labelWidth:128,
+            readonly: true,
+          },
+          {
+            label:"鐩镐技鏌ヨ瑙勫垯",
+            prop:"codeResembleRuleOidName",
+            labelWidth:128,
+            readonly: true,
+          },
         ]
       },
-      FormList: {}
+      options: {
+        column: [
+          {
+            label: '涓婚搴�/鍒嗙被缂栧彿',
+            prop: 'btmtypeid',
+            labelWidth:128,
+            rules: [{
+              required: true,
+              message: "涓婚搴�/鍒嗙被缂栧彿",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '涓婚搴�/鍒嗙被鍚嶇О',
+            prop: 'name',
+            labelWidth:128,
+            rules: [{
+              required: true,
+              message: "涓婚搴�/鍒嗙被鍚嶇О",
+              trigger: "blur"
+            }]
+          },
+          {
+            label:"鎻忚堪",
+            prop:"description",
+            labelWidth:128,
+          },
+          {
+            label: '瀛樺偍鐨勪笟鍔$被鍨�',
+            prop: 'btmtypename',
+            labelWidth:128,
+            rules: [{
+              required: true,
+              message: "瀛樺偍鐨勪笟鍔$被鍨�",
+              trigger: "blur"
+            }]
+          },
+          {
+            label:"缂栫爜瑙勫垯",
+            prop:"coderuleoidName",
+            labelWidth:128,
+            focus:this.CodeFoucus
+          },
+          {
+            label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
+            prop:"codekeyattrrepeatoidName",
+            labelWidth:128,
+            focus:this.Keyfouce
+          },
+          {
+            label:"鐩镐技鏌ヨ瑙勫垯",
+            prop:"codeResembleRuleOidName",
+            labelWidth:128,
+            focus: this.simFouce
+          },
+
+        ]
+      },
+      FormList: {},
+      masterSelectList:[]
     }
   },
+  created() {
+      this.MasterdefaultRend()
+    this.KeydefaultRend()
+  },
   methods: {
-    submit(form, done) {
-      this.$message.success(JSON.stringify(form));
+    submits(form,done){
+      console.log(this.loneTreeNewForm)
+      TreeEditSave(this.loneTreeNewForm).then(res=>{
+        this.$message.success('淇敼鎴愬姛');
+      }).catch(res=>{
+        this.$message.error(res)
+      })
       done()
     },
     error(err) {
       this.$message.success('璇锋煡鐪嬫帶鍒跺彴');
       console.log(err)
+    },
+    //缂栫爜瑙勫垯澶辩劍
+    CodeFoucus(){
+      this.MasterdialogVisible=true;
+    },
+    //缂栫爜瑙勫垯纭畾
+    MasterHandlerClick(){
+      if(this.masterSelectList.length>1){
+        this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+      }else if(this.masterSelectList.length<=0){
+        this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+      }else {
+        this.MasterdialogVisible=false;
+        this.masterSelectList=[]
+        this.loneTreeNewForm.codeRuleOidName=this.name;
+        this.loneTreeNewForm.codeRuleOid=this.oid;
+        console.log(this.masterSelectList)
+      }
+    },
+    //缂栫爜澶氶��
+    masterSelect(row){
+      console.log(row)
+      this.masterSelectList=row;
+      this.name=row[0].name;
+      this.oid=row[0].oid;
+      console.log('oid',this.oid)
+    },
+    //缂栫爜鎺ュ彛
+    MasterdefaultRend(){
+      defaultReferDataGrid({
+        referType:'coderule',
+        isMuti:'false',
+        'conditionMap["lcstatus"]':'Released'
+      }).then(res=>{
+        console.log('---',res)
+        this.masterData=res.data.records;
+
+      })
+    },
+    // 鍏抽敭灞炴�уけ鐒�
+    Keyfouce(){
+      this.KeydialogVisible=true;
+    },
+    //鍏抽敭灞炴�х‘瀹�
+    KeyHandlerClick(){
+      if(this.masterSelectList.length>1){
+        this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+      }else if(this.masterSelectList.length<=0){
+        this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+      }else {
+
+      }
+    },
+    KeydefaultRend(){
+      defaultReferDataGrid({
+        referType:'codekeyattrrepeat',
+        isMuti:'false',
+        'conditionMap["lcstatus"]':'Enabled'
+      }).then(res=>{
+        this.keyData=res.data.records;
+
+      })
+    },
+    // 鐩镐技椤瑰け鐒�
+    simFouce(){
+      this.SimidialogVisible=true;
+    },
+    //鐩镐技椤圭‘瀹�
+    simHandlerClick(){
+
     }
   }
 }
@@ -57,3 +298,6 @@
 <style scoped>
 
 </style>
+
+<!--uiDataController/defaultReferDataGrid?referBo=coderule&isMuti=false&conditionMap%5B%22lcstatus%22%5D=Released-->
+<!--uiDataController/defaultReferDataGrid?conditionMap%5B%22lcstatus%22%5D=Released&referBo=coderule&isMuti=false&_=1687831291212-->

--
Gitblit v1.9.3