From f7e33d69713a5145d19fde5792b422826bc14107 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 09 六月 2023 18:10:12 +0800
Subject: [PATCH] 完善主题库定义

---
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue |  476 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 373 insertions(+), 103 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 4121adf..9f9fca4 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -1,10 +1,26 @@
 <template>
   <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate"
-             @cell-click="handleRowClick">
+             @cell-click="handleRowClick" @select="selectHandle">
     <template slot="menuLeft">
-      <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="addVisible=true">锛� 娣诲姞 {{msg}}</el-button>
+      <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="busineHandle">锛� 娣诲姞 {{msg}}</el-button>
       <el-dialog :visible.sync="addVisible" append-to-body title="浠庝笟鍔$被鍨嬩腑閫夋嫨灞炴��">
-        <avue-crud :data="businessData" :option="businessOption"></avue-crud>
+        <avue-crud :data="businessData" :option="businessOption">
+          <template slot="menuLeft">
+            <div style="display: flex;">
+              <el-select>
+                <el-option>灞炴�ц嫳鏂囧悕绉�</el-option>
+                <el-option>灞炴�т腑鏂囧悕绉�</el-option>
+              </el-select>
+              <el-input style="width: 300px;margin-left: 20px"></el-input>
+              <el-button size="small" style="margin-left: 10px">鏌ヨ</el-button>
+            </div>
+
+          </template>
+        </avue-crud>
+       <div style="display: flex;justify-content: flex-end;margin-top: 15px">
+         <el-button size="small" type="primary">淇濆瓨</el-button>
+         <el-button size="small" type="primary">鍙栨秷</el-button>
+       </div>
       </el-dialog>
     </template>
     <!--        鍏ㄥ睆缂栬緫-->
@@ -14,6 +30,12 @@
       <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true">
         <attrCrud></attrCrud>
       </el-dialog>
+    </template>
+<!--    缁勫悎瑙勫垯-->
+    <template slot="menuLeft">
+      <el-button size="small" @click="isShowformulaEdit=true">缁勫悎瑙勫垯</el-button>
+        <formula-editor :visible="isShowformulaEdit" :systemVariableTableData="systemVariableTableData" :thisSceneTableData="thisSceneTableData"></formula-editor>
+
     </template>
     <!--        楠岃瘉瑙勫垯-->
     <template slot="menuLeft">
@@ -133,7 +155,7 @@
     </template>
     <!--    绾ц仈灞炴��-->
     <template slot="menuLeft">
-      <el-button size="small" @click="CascadeVisible=true">绾ц仈灞炴��</el-button>
+      <el-button size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
       <el-dialog :visible.sync="CascadeVisible" append-to-body title="璇烽�夋嫨绾ц仈灞炴��">
         <avue-crud ref="crud" :data="CascadeData" :option="CascadeOption" @row-click="CascaderowClick">
           <template slot="radio"
@@ -168,31 +190,115 @@
     </template>
     <!--    鍚屾鍒板叾浠栨ā鏉�-->
     <template slot="menuLeft">
-      <el-button size="small">鍚屾鍒板叾浠栨ā鏉�</el-button>
+      <el-button size="small" style="margin-top: 10px">鍚屾鍒板叾浠栨ā鏉�</el-button>
     </template>
   </avue-crud>
 </template>
 
 <script>
+import {AttrByBtm,gridCodeClassifyTemplateAttr} from '@/api/template/templateAttr'
 export default {
   name: "attrCrud .vue",
-  props: ['ProData'],
+  props: ['ProData','crudOid','crudArray','Formlist'],
   data() {
     return {
+      //琛ㄦ牸鍗曢�夋暟缁�
+      CrudSelect:[],
+      //琛ㄦ牸oid
+      CrudOid:"",
+      //鍦烘櫙鍙橀噺
+      thisSceneTableData:[
+        {
+          formula: "lcstatus",
+          desc: "鐘舵��",
+        },
+        {
+          formula: "name",
+          desc: "闆嗗洟鐮�",
+        },
+        {
+          formula: "materialname",
+          desc: "閮ㄩ棬鍚嶇О",
+        },
+        {
+          formula: "parentcode",
+          desc: "涓婄骇閮ㄩ棬缂栧彿",
+        },
+        {
+          formula: "parentname",
+          desc: "涓婄骇閮ㄩ棬鍚嶇О",
+        },
+        {
+          formula: "description",
+          desc: "鎻忚堪",
+        },
+      ],
+      // 绯荤粺鍙橀噺
+      systemVariableTableData:[
+        {
+          formula: "#CURRENTUSER.OID#",
+          desc: "褰撳墠鐢ㄦ埛鐨勪富閿�",
+        },
+        {
+          formula:"#CURRENTUSER.ID",
+          desc:"褰撳墠鐢ㄦ埛鐨勮处鎴�"
+        },
+        {
+          formula:"#CURRENTTIME#",
+          desc:"褰撳墠鏃堕棿"
+        },
+        {
+          formula:"#CURRENTDATE#",
+          desc:"褰撳墠鏃ユ湡"
+        },
+        {
+          formula:"#CURRENTDATETIME#",
+          desc:"褰撳墠鏃ユ湡鏃堕棿"
+        },
+        {
+          formula:"#CURRENTUSER_NAME#",
+          desc:"褰撳墠鐢ㄦ埛鐨勫鍚�"
+        },
+        {
+          formula:"#CURRENTUSER.SECRETGRADE#",
+          desc:"褰撳墠鐢ㄦ埛瀵嗙骇"
+        },
+        {
+          formula:"#CURRENTUSER.IPSECRET#",
+          desc:"褰撳墠鐢ㄦ埛鐨処P瀵嗙骇"
+        },
+        {
+          formula:"#CURRENTUSER.BUSINESSUNIT#",
+          desc:"褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏�"
+        },
+        {
+          formula:"#CURRENTUSER.BUSINESSUNITNAME#",
+          desc:"褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏冨悕绉�"
+        },
+        {
+          formula:"#CURRENTUSER.GROUPOID#",
+          desc:"褰撳墠鐢ㄦ埛鐨勯儴闂ㄤ富閿�"
+        },
+        {
+          formula:"#CURRENTUSER.GROUPNAME#",
+          desc:"褰撳墠鐢ㄦ埛鎵�灞為儴闂ㄥ悕绉�"
+        },
+        {
+          formula:"#CURRENTUSER.EMAIL#",
+          desc:"褰撳墠鐢ㄦ埛閭欢鍦板潃"
+        },
+        {
+          formula:"#CURRENTUSER.ROLENAME#",
+          desc:"褰撳墠鐢ㄦ埛鎵�灞炶鑹插悕绉� "
+        },
+      ],
       CascadeVisible: false,
       attrEditVisible: false,
+      isShowformulaEdit:false,
       // 绾ц仈鍗曢��
       selectRow: '',
       // 绾ц仈data
-      CascadeData: [{
-        id: 1,
-        name: '寮犱笁',
-        attrIn: '娴嬭瘯涓�'
-      }, {
-        id: 2,
-        name: '鏉庡洓',
-        attrIn: '娴嬭瘯浜�'
-      }],
+      CascadeData: [],
       // 绾ц仈option
       CascadeOption: {
         menu: false,
@@ -208,18 +314,19 @@
         },
           {
             label: '灞炴�ц嫳鏂囩紪鍙�',
-            prop: 'nid'
-          }, {
-            label: '鎬у埆',
+            prop: 'id'
+          },
+          {
+            label: '灞炴�т腑鏂囧悕绉�',
             prop: 'name'
           },
           {
             label: '灞炴�у垎缁�',
-            prop: 'attrIn'
+            prop: 'attributeGroup'
           },
           {
             label: '绫诲瀷',
-            prop: 'type'
+            prop: 'attributeDataTypeText'
           },
           {
             label: '鍒楄〃瀹藉害',
@@ -227,19 +334,63 @@
           },
           {
             label: '鍏抽敭灞炴��',
-            prop: 'keyattrflag'
+            prop: 'keyAttrFlag',
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
           },
           {
             label: '鏌ヨ灞炴��',
-            prop: 'queryattrflag'
+            prop: 'queryAttrFlag',
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
           },
           {
             label: '楂樼骇鏌ヨ灞炴��',
-            prop: 'seniorqueryattrflag'
+            prop: 'seniorQueryAttrFlag',
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
           },
           {
             label: '鐩镐技鏌ラ噸灞炴��',
-            prop: 'samerepeatattrflag'
+            prop: 'sameRepeatAttrFlag',
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
           },
           {
             label: '涓�缁寸爜',
@@ -248,6 +399,170 @@
           {
             label: '浜岀淮鐮�',
             prop: 'TwoDimensional'
+          },
+          {
+            label: '蹇呰緭',
+            prop: 'requireFlag',
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
+          },
+          {
+            label: "琛ㄥ崟鏄剧ず",
+            prop: "formDisplayFlag",
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
+          },
+          {
+            label: "鍒楄〃鏄剧ず",
+            prop: "tableDisplayFlag",
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
+          },
+          {
+            label: "鍙",
+            prop: "readonlyFlag",
+          },
+          {
+            label: "鍒楄〃鎺掑簭",
+            prop: "sortAttrFlag",
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
+          },
+
+          {
+            label: "澶氳鏂囨湰",
+            prop: "textAreaFlag",
+            type:'text',
+            dicData:[
+              {
+                label:"鏄�",
+                value:'true'
+              },
+              {
+                label:"鍚�",
+                value:'false'
+              }
+            ]
+          },
+          {
+            label: "榛樿鍊�",
+            prop: "defaultValue",
+          },
+          {
+            label: "鍓嶇紑",
+            prop: "prefixValue",
+          },
+          {
+            label: "鍚庣紑",
+            prop: "suffixValue",
+          },
+          {
+            label: "缁勫悎瑙勫垯",
+            prop: "componentRule",
+          },
+          {
+            label: "楠岃瘉瑙勫垯",
+            prop: "verifyRule",
+          },
+          {
+            label: "鏃堕棿鏍煎紡",
+            prop: "codeDateFormat",
+          },
+          {
+            label: "鍒嗙被娉ㄥ叆",
+            prop: "classifyInvokeLevel",
+          },
+          {
+            label: "鏋氫妇娉ㄥ叆",
+            prop: "enumString",
+          },
+          {
+            label: "绾ц仈灞炴��",
+            prop: "parentCode",
+          },
+          {
+            label: "鍙傜収閰嶇疆",
+            prop: "referConfig",
+          },
+          {
+            label: "绾ц仈鏌ヨ灞炴��",
+            prop: "parentQueryAttr",
+          },
+          {
+            label: "閫夋嫨搴撴爣璇�",
+            prop: "libraryIdentification",
+          },
+          {
+            label: "濉啓鎻愮ず",
+            prop: "explain",
+          },
+          {
+            label: "琛ㄥ崟鏄剧ず鏍峰紡",
+            prop: "formDisplayStyle",
+          },
+          {
+            label: "琛ㄦ牸鏄剧ず鏍峰紡",
+            prop: "tableDisplayStyle",
+          },
+          {
+            label: "琛ㄥ崟瓒呴摼鎺�",
+            prop: "formHref",
+          },
+          {
+            label: "琛ㄦ牸瓒呴摼鎺�",
+            prop: "tableHref",
+          },
+          {
+            label: "琛ㄦ牸鏄剧ずjs",
+            prop: "tableDisplayJs",
+          },
+          {
+            label: "闀垮害",
+            prop: "controlLength",
+          },
+          {
+            label: "灏忔暟绮惧害",
+            prop: "precisionLength",
+          },
+          {
+            label: "鍙栧�艰寖鍥�",
+            prop: "valueArea",
           },
         ]
       },
@@ -359,90 +674,14 @@
           bds: "娴嬭瘯涓�",
           shiyong: "娴嬭瘯涓�"
         },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        },
-        {
-          bds: "娴嬭瘯浜�",
-          shiyong: "娴嬭瘯浜�"
-        }
       ],
       // 鏂板涓氬姟绫诲瀷
-      businessData: [
-        {
-          id: "娴嬭瘯涓�",
-          name: "娴嬭瘯涓�",
-          attributeLength: "娴嬭瘯涓�",
-          attrDataType: "娴嬭瘯涓�"
-        },
-        {
-          id: "娴嬭瘯浜�",
-          name: "娴嬭瘯浜�",
-          attributeLength: "娴嬭瘯浜�",
-          attrDataType: "娴嬭瘯浜�"
-        },
-        {
-          id: "娴嬭瘯涓�",
-          name: "娴嬭瘯涓�",
-          attributeLength: "娴嬭瘯涓�",
-          attrDataType: "娴嬭瘯涓�",
-        },
-        {
-          id: "娴嬭瘯涓�",
-          name: "娴嬭瘯涓�",
-          attributeLength: "娴嬭瘯涓�",
-          attrDataType: "娴嬭瘯涓�",
-        }
-      ],
+      businessData: [],
       businessOption: {
         index: true,
         border: true,
-        addBtn: true,
+        addBtn: false,
+        menu:false,
         column: [
           {
             label: "灞炴�ц嫳鏂囧悕绉�",
@@ -522,6 +761,7 @@
         index: true,
         border: true,
         editBtn: false,
+        selection:true,
         labelWidth: 110,
         cellBtn: true,
         cancelBtn: false,
@@ -756,6 +996,36 @@
     console.log(this.ProData)
   },
   methods: {
+    // 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁
+    busineHandle(){
+      if(this.crudArray.length<1){
+        this.$message.error('璇烽�夋嫨涓�鏉℃ā鏉�')
+      }else {
+        this.addVisible=true;
+        AttrByBtm({'conditionMap[oid]': this.crudOid}).then(res=>{
+          this.businessData=res.data.data;
+          console.log(res.data)
+        })
+      }
+    },
+    // 绾ц仈灞炴��
+    CascadeHandle(){
+      if(this.CrudSelect.length >0){
+        this.CascadeVisible=true;
+        gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
+          'conditionMap[oid_notequal]':this.CrudOid
+        }).then(res=>{
+         this.CascadeData=res.data.data
+        })
+      }else {
+        this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
+      }
+    },
+    //琛ㄦ牸鍗曢��
+    selectHandle(selection,row){
+      this.CrudOid=row.oid;
+      this.CrudSelect=selection
+    },
     addsHandler(){
 
     },

--
Gitblit v1.9.3