From e79a5eb40825f67e0b65243b2b397b67e962b2f8 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 21 三月 2024 13:30:40 +0800
Subject: [PATCH] UI上下文展示引擎,参照组件

---
 Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue |   74 ++++++++++++++----------------------
 1 files changed, 29 insertions(+), 45 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
index 947b92d..ef67cc1 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -1,8 +1,7 @@
 <template>
-  <basic-container>
-    <el-dialog v-if="dialogFormVisible" :title="title" :visible.sync="dialogFormVisible" @close="closeHandler" append-to-body>
-      <avue-form v-model="form" :option="option" @submit="submitHandler" @reset-change="changeHandler">
-        <template v-for="item in slotData" :slot="item.prop + 'Label'">
+  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
+    <avue-form v-model="form" :option="option">
+      <template v-for="item in slotData" :slot="item.prop + 'Label'">
         <span>
           <span>{{ item.label }} </span>
           <el-tooltip
@@ -15,10 +14,12 @@
             <i class="el-icon-star-on" style="font-size: 17px !important; color: red;vertical-align: baseline;"></i>
           </el-tooltip>
         </span>
-        </template>
-      </avue-form>
-    </el-dialog>
-  </basic-container>
+      </template>
+      <template slot="menuForm">
+        <dynamic-button type="form" :butttonList="componentVO.buttons" @buttonClick="buttonClick"></dynamic-button>
+      </template>
+    </avue-form>
+  </div>
 </template>
 
 <script>
@@ -46,15 +47,10 @@
       type: Object,
       default: {}
     },
-    visible: {
+    isShow: {
+      //鎵�鍦ㄥ尯鍩熸槸鍚﹀凡鏄剧ず锛岄拡瀵箃ab鍜宑ollapse
       type: Boolean,
-      default: false,
-    },
-    title: {
-      type: String
-    },
-    formList:{
-      type:Array
+      default: true
     },
   },
   data() {
@@ -62,36 +58,24 @@
       form: {},
     }
   },
+  mounted() {
+    // console.log('componentVO--',this.componentVO.tableDefineVO.cols[0])
+  },
   computed: {
-    dialogFormVisible: {
-      get() {
-        return this.visible;
-      },
-      set(val) {
-        this.$emit("update:visible", val);
-      },
-    },
     option() {
       return {
-        column: this.formColumn(this.formList)
+        submitBtn: false,
+        emptyBtn: false,
+        height: 300,
+        column: this.formColumn(this.componentVO.tableDefineVO.cols[0])
       }
     },
-    slotData(){
-      return this.formColumn(this.formList)
+    slotData() {
+      return this.formColumn(this.componentVO.tableDefineVO.cols[0])
     }
   },
-  methods:{
-    //琛ㄥ崟鎻愪氦
-    submitHandler(form,done){
-      console.log(form)
-      console.log(this.slotData)
-      done()
-    },
-    changeHandler(){
-      this.form = {};
-      // this.clearValidate() 娓呯┖鏍¢獙
-      // this.resetFields()
-    },
+  methods: {
+    //杞寲鏁版嵁
     formColumn(formList) {
       return formList.map(item => {
         const typeValue = item.type === 'text' ? 'input' : item.type === 'combox' ? 'select' : item.type;
@@ -101,13 +85,13 @@
           prop: item.field,
           type: typeValue,
           value: item.defaultValue,
-          dicData: item.type === 'combox' ? item.dicData : null,
+          dicData: item.type === 'combox' ? item.dicData : item.dicUrl,
           readonly: item.readOnly,
           disabled: item.disabled,
           labelSuffix: item.suffix,
           suffixIcon: item.prefix,
-          placeholder:item.placeholder,
-          clearable:item.clearable,
+          placeholder: item.placeholder,
+          clearable: item.clearable,
           tip: item.tooltips,
           keyAttr: item.keyAttr,
           rules: [{
@@ -118,13 +102,13 @@
         }
       })
     },
-    closeHandler(){
-      this.form = {};
+    buttonClick(item) {
+      console.log(item.id)
     },
   }
 }
 </script>
 
-<style scoped lang="scss">
+<style scoped>
 
 </style>

--
Gitblit v1.9.3