Browse Source

可视化页面

chenrui  1 year ago
parent
commit
f075c8bebc
1 changed files with 15 additions and 14 deletions
  1. 15 14
      src/views/createtable/index.vue

+ 15 - 14
src/views/createtable/index.vue

@@ -354,17 +354,17 @@ export default {
       const pageAuthFforms = pageAuthArrs.filter(item => item.pagetype == 'form')
       //获取form表单弹框权限
       if (pageAuthFforms?.length) this.getPageBtnFormSetting(pageAuths, pageAuthFforms)
-      this.tableForm = {}
-      for (let k in this.defaultfilter) {
-        if (k != 1) {
-          this.tableForm[k] = this.defaultfilter[k]
-        }
-      }
-      for (let k in this.formItem) {
-        if (this.formItem[k].defaultvalue && this.formItem[k].defaultvalue != "") {
-          this.$set(this.tableForm, this.formItem[k].pagecode, this.formItem[k].defaultvalue)
-        }
-      }
+      // this.tableForm = {}
+      // for (let k in this.defaultfilter) {
+      //   if (k != 1) {
+      //     this.tableForm[k] = this.defaultfilter[k]
+      //   }
+      // }
+      // for (let k in this.formItem) {
+      //   if (this.formItem[k].defaultvalue && this.formItem[k].defaultvalue != "") {
+      //     this.$set(this.tableForm, this.formItem[k].pagecode, this.formItem[k].defaultvalue)
+      //   }
+      // }
       // this.getSelectData(this.formItem)
     },
     //根据页面tree设置数据
@@ -401,7 +401,8 @@ export default {
       const tableColumnArrs = pageAuths.filter(item => item['superiorid'] == pageconfigurationid && item['pagetype'] == 'column')
       const formItemCopy = tableColumnArrs.filter((item) => item.isdisplay != 0)
       this.formItem = _.orderBy(formItemCopy, ['displaynumber'], ['asc'])
-      console.log(this.formItem)
+      this.getSelectData(this.formItem)
+
     },
     //获取表头数据
     getColumnData (columnArrs = []) {
@@ -1082,7 +1083,7 @@ export default {
       const [allResult, allResultKey, allResultList] = [[], [], []]
       formItemCopy.map(({ dropdownlist, pagecode, defaultparameters }) => {
         if (((dropdownlist || dropdownlist == 0) && dropdownlist != "")) {
-          const datacontent = defaultparameters ? { filter: this.formatDefault(defaultparameters) } : { filter: { 1: 1 } }
+          const datacontent = defaultparameters ? { filter: this.formatDefaults(defaultparameters) } : { filter: { 1: 1 } }
           const params = {
             dropdownlist,
             pagecode,
@@ -1098,7 +1099,7 @@ export default {
       }
     },
     //格式化传递参数数据
-    formatDefault (item) {
+    formatDefaults (item) {
       if (typeof item != 'string') return {}
       const filterItem = {}
       const parameters = item.replace('{', '').replace('}', '')