Răsfoiți Sursa

弹窗管理基本注释

Zn 1 an în urmă
părinte
comite
fe65d27f4b

+ 0 - 405
ruoyi-ui/src/views/dialogMange/components/StyleFormPanel.vue

@@ -1,405 +0,0 @@
-<template>
-  <div class="style-wrap">
-    <el-form
-      ref="formData"
-      :model="formData"
-      label-width="100px"
-      :rules="rules"
-    >
-      <el-form-item label="表格名称" prop="menuName">
-        <el-input v-model="formData.menuName" @input="iptChange()"></el-input>
-      </el-form-item>
-      <el-form-item label="时间格式" prop="timeFormate">
-        <el-select
-        @input="iptChange()"
-          v-model="formData.timeFormate"
-          placeholder="请选择时间格式"
-        >
-          <el-option
-            v-for="val in dict.type.sys_time_format"
-            :key="val.value"
-            :label="val.label"
-            :value="val.value"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="表格主键" prop="primaryKey">
-        <el-select
-        @input="iptChange()"
-          v-model="formData.primaryKey"
-          placeholder="请选择表格主键"
-        >
-          <el-option
-            v-for="val in primaryKeyList"
-            :key="val.fieldName"
-            :label="val.fieldDescription"
-            :value="val.fieldName"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="操作列按钮" prop="btnGroupList">
-        <el-select
-        @input="iptChange()"
-          v-model="formData.btnGroupList"
-          placeholder="请选择按钮组"
-          clearable
-          multiple
-        >
-          <el-option
-            v-for="val in btnGroupOptions"
-            :key="val.btnKey"
-            :label="val.btnGroupName"
-            :value="val.btnKey"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="排序依赖字段">
-        <el-select
-        @input="iptChange()"
-          v-model="formData.orderByColumn"
-          placeholder="请选择排序依赖"
-        >
-          <el-option
-            v-for="val in orderByFieldList"
-            :key="val.fieldName"
-            :label="val.fieldDescription"
-            :value="val.tableName + '.' + val.fieldName"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="排序方式" v-show="formData.orderByColumn">
-        <el-radio v-model="formData.isAsc" :label="false"
-          >升序</el-radio
-        >
-        <el-radio v-model="formData.isAsc" :label="true"
-          >降序</el-radio
-        >
-      </el-form-item>
-      <el-form-item label="当前表字段">
-        <el-select v-model="formData.relyFile" placeholder="请选择当前表字段">
-          <el-option
-            v-for="item in orderByFieldList"
-            :key="item.fieldName"
-            :label="item.fieldDescription"
-            :value="item.tableName + '.' + item.fieldName">
-          </el-option>
-        </el-select>
-      </el-form-item> 
-      
-      <!-- <el-form-item label="依赖表格">
-        <el-select
-          v-model="formData.relytableName"
-          placeholder="请选择依赖表"
-          filterable
-          @change="getrelyList"
-          class="mb10"
-        >
-          <el-option
-            v-for="item in dragTableList"
-            :key="item.dtName"
-            :label="item.dtName"
-            :value="item.dtName"
-          >
-            <span style="float: left">{{ item.dtName }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{
-              item.dtTableName
-            }}</span>
-          </el-option>
-        </el-select>
-      </el-form-item>
-
-      <el-form-item label="依赖表格字段">
-        <el-select
-            v-model="formData.relaykey"
-            placeholder="请选择依赖字段"
-          >
-          <el-option
-            v-for="item in dragTableFilds"
-            :key="item.keu"
-            :label="item.val"
-            :value="item.key"
-          ></el-option>
-        </el-select>
-      </el-form-item> -->
-    
-      <el-form-item label="依赖表">
-        <el-select
-          v-model="formData.relytableName"
-          placeholder="请选择依赖表"
-          filterable
-          @change="getrelalist"
-          class="mb10"
-        >
-        <el-option
-          v-for="item in tableList"
-          :key="item.tableName"
-          :label="item.tableComment"
-          :value="item.tableName"
-          >
-          <span style="float: left">{{ item.tableComment }}</span>
-          <span style="float: right; color: #8492a6; font-size: 13px">{{
-            item.tableName
-          }}</span>
-        </el-option>
-        </el-select>
-
-      </el-form-item>
-        <el-form-item label="依赖表字段">
-          <el-select
-              v-model="formData.relaykey"
-              placeholder="请选择依赖字段"
-            >
-            <el-option
-              v-for="val in relayTableList"
-              :key="val.fieldName"
-              :label="val.fieldDescription"
-              :value="val.fieldName"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-import { listType } from "@/api/system/tenant/type";
-import { getDicts } from "@/api/system/dict/data";
-import {
-  getFormName,
-  getListName,
-  dragTablePreview,
-} from "@/api/dragform/form.js";
-import { mapState } from "vuex";
-import { listTable, removeTableList } from "@/api/dragform/tableList";
-export default {
-  name: "StyleFormPanel",
-  dicts: ["sys_time_format", "table_statistic_type"],
-  props: {
-    subFieldList: {
-      default: [],
-      type: Array,
-    },
-    btnGroupOptions: {
-      default: [],
-      type: Array,
-    },
-    echoData:{
-      default: {},
-    },
-    tableList:{
-      default: [],
-      type: Array,
-    }
-  },
-  components: {},
-  data() {
-    return {
-      relaytableField:[],
-      dragTableList:[],
-      dragTableFilds:[],
-      editData:{},
-      dragTableFilds:{},
-      rules: {},
-      formData: {
-        timeFormate:'',
-        relytableName:'',
-        isAsc: false,
-        primaryKey: "",
-        btnGroupList: [],
-      },
-      relyFileds: {},
-      conditionDefaultValueMap: '',
-      relyOptions:[
-        {
-         value: '0',
-         label: '自定义依赖值'
-        },
-        {
-          value: '1',
-          label: '依赖其他字段'
-        }
-      ],
-      tableList: []
-    }
-  },
-  computed: {
-    ...mapState({
-      databaseName: (state) => state.user.dataSource.databaseName,
-      databaseType: (state) => state.user.dataSource.databaseType,
-      username: (state) => state.user.dataSource.username,
-      tenantId: (state) => state.user.tenant.tenantId,
-    }),
-    orderByFieldList() {
-      return this.tableFieldList;
-    },
-    primaryKeyList() {
-      // console.log(this.subFieldList)
-      return this.subFieldList.filter((item) => !item.isChildren);
-    },
-    orderByFieldList() {
-      return this.subFieldList;
-    },
-    relayKeyList(){
-      return this.subFieldList.filter((item) => !item.isChildren);
-    },
-    relayTableList(){
-      return this.relaytableField.filter((item) => !item.isChildren);
-    },
-  },
-  watch: {
-    tableFieldList: {
-      handler(nval) {
-        if (!nval || !nval.length) return;
-        this.allFieldList = nval;
-        this.isShowFieldList = nval.filter((item) => item.isShow);
-        let tempList = nval.map((item) => {
-          return {
-            tableName: item.tableName,
-            tableComment: item.tableComment,
-          };
-        });
-        this.tableList = [];
-        tempList.forEach((item) => {
-          let isHas = this.tableList.find(
-            (it) => it.tableName == item.tableName
-          );
-          if (!isHas) {
-            this.tableList.push(item);
-          }
-        });
-      },
-      immediate: true,
-      deep: true,
-    },
-
-    formData:{
-      handler(nval){
-        this.$emit('subFormData', this.formData)
-      },
-      immediate: true,
-      deep: true,
-    },
-    echoData:{
-      handler(nval){
-          let {
-            menuName,
-            timeFormate,
-            orderByColumn,
-            isAsc,
-            primaryKey,
-            btnGroupList,
-            relyFile,
-            relytableName,
-            relaykey,
-            relyOption
-          } = nval.formData;
-          Object.assign(this.formData, {
-            menuName,
-            timeFormate,
-            orderByColumn,
-            isAsc,
-            primaryKey,
-            btnGroupList,
-            relyFile,
-            relytableName,
-            relaykey,
-            relyOption
-
-          });
-        
-        this.getdragTable()
-        this.getrelyList()
-        // this.editData = item;
-      },
-      // immediate: true,
-      deep: true,
-    }
-  },
-  methods: {
-    // 依赖表字段
-    getrelalist(){
-      if (!this.formData.relytableName) return;
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-        tableName:this.formData.relytableName,
-      };
-      let tableComment = this.getTableCommont(this.formData.relytableName, this.tableList);
-      // 获取当前表单结构信息
-      getListName(data).then((res) => {
-        // console.log(res);
-        this.relaytableField = res.map((item, index) => {
-          return {
-            id: this.formData.relytableName + "_" + item.fieldName,
-            fieldName: item.fieldName,
-            fieldDescription: item.fieldDescription,
-            relationTable: "",
-            relationFieldName: "",
-            relaFieldNameList: [],
-            disableRelaFieldName: false,
-            relationType: "",
-            relationShowField: [],
-            relationShowFiledList: [],
-            disableRelaType: false,
-            isShow: true,
-            isSearch: false,
-            isExport: true,
-            relationTableList: this.relationTableList,
-            tableName: this.formData.relytableName,
-            tableComment,
-            relationFieldList: [],
-          };
-        });
-      });
-    },
-    iptChange(){
-	    this.$forceUpdate();  //强制刷新
-    },
-    getdragTable(){
-       let queryParams = {
-        isEnablePaging:false,
-        dtType: 0
-      }
-      listTable(queryParams).then(res => {
-        this.dragTableList = res.rows
-      })
-    },
-    getrelyList() {
-      this.dragTableList.forEach(item => {
-        if(this.formData.relytableName == item.dtName){
-          this.dragTableFilds = JSON.parse(item.dtColumnName)
-        }
-      })
-      this.dragTableFilds.forEach(item => {
-        for(let val in item){
-          item.key = val
-          item.val = item[val]
-        }
-      })
-    },
-    // 获取当前表描述
-    getTableCommont(tableName, tableList) {
-      return tableList.find((item) => item.tableName == tableName).tableComment;
-    },
-  },
-  async mounted() {
-    this.getdragTable()
-  },
-};
-</script>
-
-<style scoped lang="scss">
-.style-wrap {
-  .condition-table-wrap {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    .table-title {
-      margin-bottom: 10px;
-      font-size: 16px;
-      font-weight: 600;
-    }
-  }
-}
-</style>

+ 41 - 56
ruoyi-ui/src/views/dialogMange/index.vue

@@ -323,7 +323,7 @@
           </el-tab-pane>
           <el-tab-pane label="关联子表" name="styleEdit">
             <el-card shadow="always" :body-style="{ padding: '10px' }">
-              <StyleFormPanel
+              <relayTable
                 ref="styleTableRef"
                 :echoData="echoData"
                 :btnGroupOptions="btnGroupOptions"
@@ -428,20 +428,6 @@
                     </el-option>
                   </el-select>
                 </el-form-item>
-                <!-- <el-form-item label="依赖方式">
-                <el-select v-model="countData.relyOption" placeholder="请选择依赖方式">
-                  <el-option
-                    v-for="item in relyOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                  </el-option>
-                </el-select>
-              </el-form-item> -->
-
-                <!-- <el-form-item label="自定义依赖值" v-show="countData.relyOption === '0'">
-                <el-input v-model="countData.relayValue" placeholder="请输入依赖值"></el-input>
-              </el-form-item> -->
 
               <!-- <el-form-item label="依赖表格">
                 <el-select
@@ -481,26 +467,26 @@
                 </el-select>
               </el-form-item> -->
               
-              <el-form-item label="依赖表">
-                  <el-select
-                    v-model="countData.relytableName"
-                    placeholder="请选择依赖表"
-                    filterable
-                    @change="getCountrelayList"
-                    class="mb10"
-                  >
-                  <el-option
-                    v-for="item in countRelayList"
-                    :key="item.tableName"
-                    :label="item.tableComment"
-                    :value="item.tableName"
+                <el-form-item label="依赖表">
+                    <el-select
+                      v-model="countData.relytableName"
+                      placeholder="请选择依赖表"
+                      filterable
+                      @change="getCountrelayList"
+                      class="mb10"
                     >
-                    <span style="float: left">{{ item.tableComment }}</span>
-                    <span style="float: right; color: #8492a6; font-size: 13px">{{
-                      item.tableName
-                    }}</span>
-                  </el-option>
-                  </el-select>
+                    <el-option
+                      v-for="item in countRelayList"
+                      :key="item.tableName"
+                      :label="item.tableComment"
+                      :value="item.tableName"
+                      >
+                      <span style="float: left">{{ item.tableComment }}</span>
+                      <span style="float: right; color: #8492a6; font-size: 13px">{{
+                        item.tableName
+                      }}</span>
+                    </el-option>
+                    </el-select>
                 </el-form-item>
 
                 <el-form-item label="依赖表字段">
@@ -516,8 +502,7 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-          
-            </el-form>
+              </el-form>
                 <el-button
                 type="primary"
                 class="inline-large-button addcount"
@@ -526,7 +511,7 @@
                 @click="addDataDialog"
               >
                 添加数据字段
-              </el-button>
+                </el-button>
               <el-table
                 :data="dragTableStatisticList"
                 border
@@ -820,47 +805,35 @@
 </template>
 
 <script>
-import { getTableInfo, editTable } from "@/api/system/table.js";
+import { getTableInfo } from "@/api/system/table.js";
 import {
-  delTableData,
   dragTableInfo,
-  unionListTableData,
-  getInfoBySqlKey,
-  addTableData,
   addStatistic,
   updateStatistic,
 } from "@/api/tablelist/commonTable";
-import { listTable, removeTableList } from "@/api/dragform/tableList";
-import { getDicts } from "@/api/system/dict/data";
+import { listTable, } from "@/api/dragform/tableList";
 import {
   getFormName,
   getListName,
   dragTablePreview,
 } from "@/api/dragform/form.js";
 import {
-  addGroup,
-  listGroup,
   getTable,
-  delGroup,
-  updataGroup,
 } from "@/api/relateTable/index.js";
 import { addDialogGroup, undataDialogGroup } from "@/api/dialogMange/index.js";
 import { listType } from "@/api/system/dict/type.js";
-import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
 import { mapState } from "vuex";
 import Sortable from "sortablejs";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { v4 as uuidv4 } from "uuid";
 import { listBtn } from "@/api/system/btn";
-import StyleFormPanel from "./components/StyleFormPanel.vue";
-import SubList from "./styleMange/tablelist.vue";
+import relayTable from "./components/relayTable.vue";
+import SubList from "./relayTableMange/tablelist.vue";
 
 export default {
   name: "tableMange",
   dicts: ["sys_time_format", "table_statistic_type"],
   props: [],
-  components: { Queryfrom, Treeselect, StyleFormPanel, SubList },
+  components: { relayTable, SubList },
   data() {
     return {
       // 关联子表数据回显
@@ -1083,6 +1056,7 @@ export default {
       // console.log(this.subFiledList);
       return this.subFiledList?.filter((item) => item.isShow);
     },
+    // 数据表
     countList() {
       return this.tableList;
     },
@@ -1124,26 +1098,32 @@ export default {
         return this.checkedList.includes(item.conditionName);
       });
     },
+    // 当前表字段
     orderByFieldList() {
       // return this.tableFieldList.filter((item) => item.isShow);
       return this.tableFieldList;
     },
+    // 统计字段
     countByFieldList() {
       return this.countFieldList;
     },
+    // 表格主键
     primaryKeyList() {
       return this.tableFieldList.filter((item) => !item.isChildren);
     },
+    // 数据统计表格主键
     countPrimaryKeyList() {
       // console.log(this.countFieldList);
       return this.countFieldList.filter((item) => !item.isChildren);
     },
+    // 依赖表字段
     relayTableList(){
       return this.relaytableField.filter((item) => !item.isChildren);
     },
     relayKeyList(){
       return this.relayFieldList.filter((item) => !item.isChildren);
     },
+    // 数据统计依赖表字段
     countRelayField(){
       return this.countrelayFieldList.filter((item) => !item.isChildren);
     }
@@ -1203,7 +1183,6 @@ export default {
           };
         });
       });
-
     },
     // 数据统计依赖表
     getCountrelayList(){
@@ -1259,6 +1238,7 @@ export default {
     filedListHandler(list) {
       this.subFiledList = list;
     },
+    // 关联子表
     subFormDataHandler(data) {
       this.subformData = data;
     },
@@ -1336,6 +1316,7 @@ export default {
         // console.log(this.relayField);
       });
     },
+    // 依赖表格
     getrelyList() {
       // console.log(this.formData.relytableName);
       this.dragTableList.forEach((item) => {
@@ -1350,8 +1331,8 @@ export default {
         }
       });
     },
+    // 依赖表格
     getCountrelyList(){
-      // console.log('123456');
       if(this.countdragTableList){
         this.countdragTableList?.forEach(item => {
           // console.log(this.countData.relytableName);
@@ -1368,6 +1349,7 @@ export default {
         });
       }
     },
+    // 依赖表格列表数据
     getdragTable() {
       let queryParams = {
         isEnablePaging: false,
@@ -1743,6 +1725,7 @@ export default {
       }
       return sql;
     },
+    // 数据统计sql
     countGetSQLStr() {
       let prefix = "{DBNAME}.";
       let sqlType = this.databaseType; //数据库类型
@@ -2343,6 +2326,7 @@ export default {
         }
       });
     },
+    // 按钮
     getBtnMapList(tableKey) {
       let res = this.formData.btnGroupList.map((item) => {
         return {
@@ -2352,6 +2336,7 @@ export default {
       });
       return res;
     },
+    // 解决回显input不能输入问题
     iptChange() {
       this.$forceUpdate(); //强制刷新
     },

+ 0 - 465
ruoyi-ui/src/views/dialogMange/styleMange/index.vue

@@ -1,465 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
-      <el-form-item label="样式key" prop="styleKey">
-        <el-input
-          v-model="queryParams.styleKey"
-          placeholder="请输入样式key"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="样式名称" prop="styleName">
-        <el-input
-          v-model="queryParams.styleName"
-          placeholder="请输入样式名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="样式描述" prop="styleDescription">
-        <el-input
-          v-model="queryParams.styleDescription"
-          placeholder="请输入样式描述"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建者ID" prop="createById">
-        <el-input
-          v-model="queryParams.createById"
-          placeholder="请输入创建者ID"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="更新者ID" prop="updateById">
-        <el-input
-          v-model="queryParams.updateById"
-          placeholder="请输入更新者ID"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['system:style:add']"
-          >新增</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:style:edit']"
-          >修改</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:style:remove']"
-          >删除</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['system:style:export']"
-          >导出</el-button
-        >
-      </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
-    </el-row>
-
-    <el-table
-      v-loading="loading"
-      stripe
-      :data="styleList"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
-      <!-- <el-table-column label="样式key" align="center" prop="styleKey" /> -->
-      <el-table-column label="样式名称" align="center" prop="styleName" />
-      <el-table-column label="样式类型" align="center" prop="styleType">
-        <template slot-scope="scope">
-          {{ theGetDictLabel(scope.row.styleType, dict.type.table_style_type) }}
-        </template>
-      </el-table-column>
-      <!-- <el-table-column label="样式代码" align="center" prop="styleCode" /> -->
-      <el-table-column
-        label="样式描述"
-        align="center"
-        prop="styleDescription"
-      />
-      <!-- <el-table-column label="样式状态" align="center" prop="styleStatus" /> -->
-      <!-- <el-table-column label="创建者ID" align="center" prop="createById" />
-      <el-table-column label="更新者ID" align="center" prop="updateById" /> -->
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:style:edit']"
-            >修改</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:style:remove']"
-            >删除</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改动态格样式模板对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <!-- <el-form-item label="样式key" prop="styleKey">
-          <el-input v-model="form.styleKey" placeholder="请输入样式key" />
-        </el-form-item> -->
-        <el-form-item label="样式名称" prop="styleName">
-          <el-input v-model="form.styleName" placeholder="请输入样式名称" />
-        </el-form-item>
-        <el-form-item label="样式类型" prop="styleType">
-          <el-select
-            v-model="form.styleType"
-            placeholder="请选择样式类型"
-            filterable
-          >
-            <el-option
-              v-for="item in dict.type.table_style_type"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="样式代码" prop="styleCode">
-          <el-input
-            v-model="form.styleCode"
-            type="textarea"
-            placeholder="请输入内容"
-          />
-          <!-- <el-button icon="el-icon-edit" @click="drawerOpenHandler"></el-button> -->
-        </el-form-item>
-        <el-form-item label="样式描述" prop="styleDescription">
-          <el-input
-            v-model="form.styleDescription"
-            placeholder="请输入样式描述"
-          />
-        </el-form-item>
-        <!-- <el-form-item label="删除标志" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
-        </el-form-item>
-        <el-form-item label="创建者ID" prop="createById">
-          <el-input v-model="form.createById" placeholder="请输入创建者ID" />
-        </el-form-item>
-        <el-form-item label="更新者ID" prop="updateById">
-          <el-input v-model="form.updateById" placeholder="请输入更新者ID" />
-        </el-form-item> -->
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-    <el-drawer
-      :visible.sync="drawer"
-      direction="rtl"
-      :before-close="drawerHandleClose"
-      :with-header="false"
-    >
-      <div ref="container" class="monaco-container"></div>
-    </el-drawer>
-  </div>
-</template>
-
-<script>
-import {
-  listStyle,
-  getStyle,
-  delStyle,
-  addStyle,
-  updateStyle,
-} from "@/api/system/style";
-import { getDictLabel } from "@/utils/other";
-import * as monaco from "monaco-editor";
-
-export default {
-  name: "StyleMange",
-  dicts: ["table_style_type"],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 动态格样式模板表格数据
-      styleList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        styleKey: null,
-        styleName: null,
-        styleType: null,
-        styleCode: null,
-        styleDescription: null,
-        styleStatus: null,
-        createById: null,
-        updateById: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        styleName: [
-          { required: true, message: "请输入样式名", trigger: "blur" },
-        ],
-        styleType: [
-          { required: true, message: "请选择样式类型", trigger: "change" },
-        ],
-        styleCode: [
-          { required: true, message: "请输入样式代码", trigger: "blur" },
-        ],
-        styleDescription: [
-          { required: true, message: "请输入样式样式描述", trigger: "blur" },
-        ],
-      },
-      // 代码编辑器
-      monacoEditor: null,
-      drawer: false,
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询动态格样式模板列表 */
-    getList() {
-      this.loading = true;
-      listStyle(this.queryParams).then((response) => {
-        this.styleList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        styleKey: null,
-        styleName: null,
-        styleType: null,
-        styleCode: null,
-        styleDescription: null,
-        styleStatus: null,
-        delFlag: null,
-        createBy: null,
-        createById: null,
-        createTime: null,
-        updateBy: null,
-        updateById: null,
-        updateTime: null,
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加动态格样式模板";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids;
-      getStyle(id).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改动态格样式模板";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateStyle(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addStyle(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal
-        .confirm('是否确认删除动态格样式模板编号为"' + ids + '"的数据项?')
-        .then(function () {
-          return delStyle(ids);
-        })
-        .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        })
-        .catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download(
-        "system/style/export",
-        {
-          ...this.queryParams,
-        },
-        `style_${new Date().getTime()}.xlsx`
-      );
-    },
-    theGetDictLabel(value, dictList) {
-      return getDictLabel(value, dictList);
-    },
-    // 抽屉打开回调
-    drawerOpenHandler() {
-      this.monacoEditor?.dispose();
-      this.drawer = true;
-      this.$nextTick(() => {
-        this.monacoEditor = monaco.editor.create(this.$refs.container, {
-          value: this.form.styleCode,
-          language: "css",
-          theme: "vs-dark", // 编辑器主题:vs, hc-black, or vs-dark,更多选择详见官网
-          contextmenu: false, // 禁用右键菜单
-          editorOptions: this.editorOptions, // 同codes
-        });
-      });
-    },
-    // 抽屉关闭前回调
-    drawerHandleClose(done) {
-      this.$confirm("即将关闭编辑器,是否保存代码?")
-        .then(
-          (val) => {
-            this.form.styleCode = this.monacoEditor?.getValue();
-            // this.drawer = false;
-            done();
-          },
-          (res) => {
-            // this.drawer = false;
-            done();
-          }
-        )
-        .catch(() => {});
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.monaco-container {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 1151
ruoyi-ui/src/views/dialogMange/styleMange/tablelist.vue

@@ -1,1151 +0,0 @@
-<template>
-  <div>
-    <el-card shadow="always" :body-style="{ padding: '20px' }">
-          <template #header>
-            <div>
-              <span>关联子表</span>
-            </div>
-          </template>
-          <el-select
-            v-model="tableName"
-            placeholder="请选择数据表"
-            filterable
-            @change="getList"
-            class="mb10"
-          >
-          <el-option
-            v-for="item in tableList"
-            :key="item.tableName"
-            :label="item.tableComment"
-            :value="item.tableName"
-          >
-            <span style="float: left">{{ item.tableComment }}</span>
-            <span style="float: right; color: #8492a6; font-size: 13px">{{
-              item.tableName
-            }}</span>
-          </el-option>
-          </el-select>
-          <el-table
-            :data="tableFieldList"
-            border
-            ref="dragTable"
-            row-key="id"
-            max-height="500px"
-          >
-            >
-            <el-table-column
-              type="index"
-              label="序号"
-              width="50"
-              class-name="allowDrag"
-            >
-            </el-table-column>
-            <el-table-column prop="fieldName" label="数据字段">
-            </el-table-column>
-            <el-table-column prop="fieldDescription" label="字段描述">
-              <template slot-scope="scope">
-                <input
-                @input="iptChange()"
-                  :class="{
-                    isNullDesc:
-                      scope.row.fieldDescription == '' &&
-                      scope.row.isShow &&
-                      isInputInvalid
-                        ? true
-                        : false,
-                    ipt: true,
-                  }"
-                  v-model="scope.row.fieldDescription"
-                />
-              </template>
-            </el-table-column>
-            <el-table-column prop="relationTable" label="关联表">
-              <template slot-scope="scope">
-                <el-select
-                @input="iptChange()"
-                  v-model="scope.row.relationTable"
-                  :disabled="
-                    !scope.row.relationTableList ||
-                    !scope.row.relationTableList.length
-                  "
-                  placeholder="请选择关联的表"
-                  clearable
-                  filterable
-                  @change="ralationTableChange(scope.row)"
-                >
-                  <el-option
-                    v-for="item in scope.row.relationTableList"
-                    :key="item.tableName"
-                    :label="item.tableComment"
-                    :value="item.tableName"
-                  >
-                    <span style="float: left">{{ item.tableComment }}</span>
-                    <span
-                      style="float: right; color: #8492a6; font-size: 13px"
-                      >{{ item.tableName }}</span
-                    >
-                  </el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column prop="relationFieldName" label="关联条件字段">
-              <template slot-scope="scope">
-                <el-select
-                  v-model="scope.row.relationFieldName"
-                  @change="relationFieldChange(scope.row)"
-                  :disabled="!scope.row.disableRelaFieldName"
-                  placeholder="关联字段"
-                  filterable
-                >
-                  <el-option
-                    v-for="item in scope.row.relaFieldNameList"
-                    :key="item.fieldName"
-                    :label="item.fieldDescription"
-                    :value="item.fieldName"
-                  >
-                  </el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column prop="relationType" label="关联方式">
-              <template slot-scope="scope">
-                <el-select
-                  v-model="scope.row.relationType"
-                  placeholder="请选择关联方式"
-                  :disabled="!scope.row.disableRelaType"
-                  @change="relationTypeChangeHandler(scope.row)"
-                  filterable
-                >
-                  <el-option
-                    v-for="item in relaTypeList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-              </template>
-            </el-table-column>
-            <el-table-column prop="isShow" label="是否显示">
-              <template slot-scope="scope">
-                <el-switch v-model="scope.row.isShow"> </el-switch>
-              </template>
-            </el-table-column>
-           
-          </el-table>
-    </el-card>
-  </div>
-</template>
-
-<script>
-import {
-  delTableData,
-  dragTableInfo,
-  listTable,
-  unionListTableData,
-  getInfoBySqlKey,
-  addTableData,
-  addStatistic,
-  updateStatistic,
-} from "@/api/tablelist/commonTable";
-import { getDicts } from "@/api/system/dict/data";
-import {
-  getFormName,
-  getListName,
-  dragTablePreview,
-} from "@/api/dragform/form.js";
-import { getTableInfo, editTable } from "@/api/system/table.js";
-import { addDragTable } from "@/api/tablelist/commonTable.js";
-import { getParticMenu, updateMenu } from "@/api/system/menu.js";
-import { addGroup, listGroup, getTable, delGroup, updataGroup} from '@/api/relateTable/index.js'
-import { getMenuList, addMenu } from "@/api/menu.js";
-import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
-import { mapState } from "vuex";
-import Sortable from "sortablejs";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { v4 as uuidv4 } from "uuid";
-import { listBtn } from "@/api/system/btn";
-export default {
-  name: "SubList",
-  dicts: ["sys_time_format", "table_statistic_type"],
-  props: ['menudata','echoName','echoList'],
-  components: { Queryfrom, Treeselect },
-  data() {
-    return {
-      staictitle: "添加统计数据字段",
-      isInputInvalid: false,
-      // 修改表格时的menuId
-      menuId: "",
-      // 修改表格的id
-      tId: "",
-      // 当前模板信息
-      templateInfo: {},
-      // 排序方式 默认降序
-      sortState: true,
-      // 列信息
-      columns: {},
-      // 查询条件
-      queryFromWhere: {},
-      // 当前table唯一标识
-      sqlKey: "",
-      // 动态数据sqlkey
-      staticSqlKey: "",
-      // 表格的高度
-      tableKey: "",
-      // tableHeight: document.documentElement.scrollHeight - 245 + "px",
-      tableList: [], //所有表格列表
-      tableFieldList: [], // 当前表格字段数据
-      tableName: "", // 当前表名称
-
-      relationTableList: [], //关联表格列表
-      relationFieldList: [], //关联字段列表
-      relationTypeList: [], //关联方式列表
-      total: 0, //表格数据总数
-      relyOptions:[
-        {
-         value: '0',
-         label: '自定义依赖值'
-        },
-        {
-          value: '1',
-          label: '依赖其他字段'
-        }
-      ],
-      conditionDefaultValueMap: '',
-      relyFileds: {},
-      relaTypeList: [
-        {
-          label: "等值连接",
-          value: "INNER JOIN",
-        },
-        {
-          label: "左连接",
-          value: "LEFT JOIN",
-        },
-        {
-          label: "右连接",
-          value: "RIGHT JOIN",
-        },
-      ],
-      headerList: [
-        {
-          prop: "fieldName",
-          label: "数据字段",
-        },
-        {
-          prop: "fieldDescription",
-          label: "字段描述",
-        },
-        {
-          prop: "relationTable",
-          label: "关联表",
-        },
-        {
-          prop: "relationFieldName",
-          label: "关联字段",
-        },
-        {
-          prop: "relationType",
-          label: "关联方式",
-        },
-        {
-          prop: "isShow",
-          label: "是否显示",
-        },
-        {
-          prop: "isSearch",
-          label: "是否包含查询",
-        },
-        {
-          prop: "isExport",
-          label: "是否导出",
-        },
-        {
-          prop: "isCount",
-          label: "是否统计",
-        },
-      ], //表头列表
-
-      // 基础信息编辑
-      formData: {
-        menuName: "",
-        routePath: undefined,
-        isShowList: true,
-        timeFormate: "",
-        orderByColumn: "",
-        isAsc: false,
-        primaryKey: "",
-        btnGroupList: [],
-      },
-      // 统计信息
-      countData: {},
-      rules: {
-        menuName: [
-          { required: true, message: "请输入菜单名称", trigger: "blur" },
-        ],
-        routePath: [
-          { required: true, message: "请选择路由", trigger: "change" },
-        ],
-        timeFormate: [
-          { required: true, message: "请选择时间格式", trigger: "change" },
-        ],
-        primaryKey: [
-          { required: true, message: "请选择表格主键", trigger: "blur" },
-        ],
-        fieldDescription: [
-          { required: true, message: "请输入字段描述", trigger: "blur" },
-        ],
-      },
-      menus: [], //路由列表数据
-
-      // 预览弹窗相关
-      isShowPreview: false, //弹窗显示与隐藏
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        orderByColumn: "",
-        isAsc: false,
-        basicMap: {
-          sql: "",
-        },
-      },
-      loading: false, //表格加载
-      tableDataList: [], //数据
-      editData: {},
-      menuOrderNum: 0,
-      // tab动态切换
-      activeName: "menuedit",
-      // 数据统计对象
-      dataCountFormData: {},
-      // 添加数据统计表格
-      dragTableStatisticList: [],
-      deepragTableStatisticList: [],
-      tableSqlList: [],
-      searchFieldList: [],
-      // // 是否切换到数据统计
-      // menudata: false,
-      // 显示添加字段对话框dataArr
-      isShowAddData: false,
-      dataType: [],
-      uuid: "",
-
-      // 样式编辑tab数据
-      // dragTableStyleList: [],
-
-      //操作列按钮组数据
-      btnGroupOptions: [],
-    };
-  },
-  async mounted() {
-    this.getAllTable();
-    this.initDragTable();
-    this.getBtnList();
-    if (this.$route.query.tId) {
-      this.tId = this.$route.query.tId;
-      this.initTableData(this.tId);
-    }
-  },
-  computed: {
-    ...mapState({
-      databaseName: (state) => state.user.dataSource.databaseName,
-      databaseType: (state) => state.user.dataSource.databaseType,
-      username: (state) => state.user.dataSource.username,
-      tenantId: (state) => state.user.tenant.tenantId,
-    }),
-    searchArr() {
-      if (!this.templateInfo?.where?.length) return [];
-      return this.templateInfo.where.map((item) => item.conditionName);
-    },
-    checkedWhere() {
-      if (!this.templateInfo?.where?.length) return [];
-      return this.templateInfo?.where.filter((item) => {
-        return this.checkedList.includes(item.conditionName);
-      });
-    },
-    orderByFieldList() {
-      return this.tableFieldList;
-    },
-    primaryKeyList() {
-      return this.tableFieldList.filter((item) => !item.isChildren);
-    },
-
-  },
-  watch: {
-    tableName: function (val) {
-      if (val) {
-        this.relationTableList = this.tableList
-          .filter((item) => item.tableName != val)
-          .map((item) => {
-            return {
-              tableName: item.tableName,
-              tableComment: item.tableComment,
-            };
-          });
-
-          this.$emit('tableNameChange', 
-          this.tableName)
-      } else {
-        this.relationTableList = [];
-      }
-    },
-    "formData.routePath"(nval, oval) {
-      let targetMenu = this.getTargetMenu(this.menus);
-      this.menuOrderNum = targetMenu.children ? targetMenu.children.length : 0;
-    },
-    echoName: function(val){
-      if(val){
-        console.log(val);
-        this.tableName = this.echoName
-        this.tableFieldList = this.echoList
-      }
-    }
-  },
-  methods: {
-    /** 查询列表 */
-    getList(queryParams) {
-      if (!this.tableName) return;
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-        tableName: this.tableName,
-      };
-      let tableComment = this.getTableCommont(this.tableName, this.tableList);
-      // 获取当前表单结构信息
-      getListName(data).then((res) => {
-        // console.log(res);
-        this.tableFieldList = res.map((item, index) => {
-          return {
-            id: this.tableName + "_" + item.fieldName,
-            fieldName: item.fieldName,
-            fieldDescription: item.fieldDescription,
-            relationTable: "",
-            relationFieldName: "",
-            relaFieldNameList: [],
-            disableRelaFieldName: false,
-            relationType: "",
-            relationShowField: [],
-            relationShowFiledList: [],
-            disableRelaType: false,
-            isShow: true,
-            isSearch: false,
-            isExport: true,
-            relationTableList: this.relationTableList,
-            tableName: this.tableName,
-            tableComment,
-            relationFieldList: [],
-          };
-        });
-
-        this.$emit('fieldListChange', 
-          this.tableFieldList)
-
-        // console.log(this.tableFieldList);
-      });
-    },
-    // 关联表变化回调
-    async ralationTableChange(row) {
-      this.tableFieldList = this.tableFieldList.filter((item) => {
-        return !row.relationFieldList.some((val) => {
-          return val.id == item.id;
-        });
-      });
-      row.relationFieldName = "";
-      row.relationType = "";
-      row.disableRelaFieldName = false;
-      row.disableRelaType = false;
-      row.relationFieldList = [];
-      if (!row.relationTable) {
-        return;
-      }
-      // 获取关联表的字段
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-        tableName: row.relationTable,
-      };
-      let tableComment = this.getTableCommont(
-        row.relationTable,
-        this.tableList
-      );
-      let res = await getListName(data);
-      // 关联字段下拉列表数据
-      row.relaFieldNameList = res.map((item) => {
-        return {
-          fieldName: item.fieldName,
-          fieldDescription: item.fieldDescription,
-        };
-      });
-      let relationTableList = row.relationTableList.filter(
-        (item) => row.relationTable != item.tableName
-      );
-      row.relationFieldList = row.relaFieldNameList.map((item, index) => {
-        return {
-          id: row.relationTable + "_" + item.fieldName,
-          fieldName: item.fieldName,
-          fieldDescription: item.fieldDescription,
-          relationTable: "",
-          relationFieldName: "",
-          relaFieldNameList: [],
-          disableRelaFieldName: false,
-          relationType: "",
-          relationShowField: [],
-          relationShowFiledList: [],
-          disableRelaType: false,
-          isShow: true,
-          isSearch: false,
-          isExport: true,
-          relationTableList,
-          tableName: row.relationTable,
-          tableComment,
-          relationFieldList: [],
-          isChildren: true,
-        };
-      });
-      // this.tableFieldList = [...this.tableFieldList, ...row.relationFieldList];
-      row.disableRelaFieldName = true;
-    },
-    // 关联类型变化回调
-    relationTypeChangeHandler(row) {
-      let tempRelationFieldList = row.relationFieldList.filter((item) => {
-        return !this.tableFieldList.find((val) => val.id === item.id);
-      });
-      this.tableFieldList = [...this.tableFieldList, ...tempRelationFieldList];
-    },
-    // 关联字段回调
-    relationFieldChange(row) {
-      if (!row.relationFieldName) {
-        row.relationType = "";
-        row.disableRelaType = false;
-        row.relaFieldNameList = [];
-        return;
-      }
-      row.disableRelaType = true;
-    },
-     // 修改表格回显数据
-     async initTableData(tId) {
-      let res = await getTable({id : tId});
-      if (res.code == 200) {
-        let lists = res.data.dragTables
-        let groupInfo =JSON.parse(res.data.groupTableInfo)
-
-        lists.forEach(item => {
-          if(item.tableKey == groupInfo[1].tableKey){
-            let echoData = JSON.parse(item.echoData);
-              this.tableName = echoData.tableName;
-              this.tableFieldList = echoData.tableFieldData;
-
-              this.$emit('fieldListChange', this.tableFieldList)
-              this.editData = item;
-          }
-        })
-        console.log('info', groupInfo)
-      } else {
-        this.$message.error("数据回显失败");
-      }
-    },
-    // 勾选框回调
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      // this.single = selection.length != 1;
-      this.multiple = !selection.length;
-    },
-    // 分页查询
-    pageList(row) {
-      this.$refs.mychild.pageList(
-        row == undefined
-          ? {
-              limit: this.queryParams.pageSize,
-              page: this.queryParams.pageNum,
-            }
-          : row
-      );
-    },
-    // 多选框改变回调
-    checkedChangeHandle(val) {},
-    // 获取所有表格
-    async getAllTable() {
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-      };
-      let res = await getFormName(data);
-
-      const baseTable = await this.getDicts("base_table");
-
-      this.tableList = res.data.filter((item) => {
-        return !baseTable.data.some(
-          (value) =>
-            value.dictValue.toLowerCase() == item.tableName.toLowerCase()
-        );
-      });
-
-    },
-    //处理表格行拖拽
-    initDragTable() {
-      const el = this.$refs.dragTable.$el.querySelectorAll(
-        ".el-table__body-wrapper > table > tbody"
-      )[0];
-      const sortable = Sortable.create(el, {
-        handle: ".allowDrag",
-        onEnd: (evt) => {
-          const targetRow = this.tableFieldList.splice(evt.oldIndex, 1)[0];
-          this.tableFieldList.splice(evt.newIndex, 0, targetRow);
-          for (let index in this.tableFieldList) {
-            this.tableFieldList[index].sort = parseInt(index) + 1;
-          }
-        },
-      });
-    },
-    // 校验字段合法性(递归版)
-    validateField(tableFieldList, validateParams) {
-      if (!tableFieldList.length) {
-        return;
-      }
-      for (let i = 0; i < tableFieldList.length; i++) {
-        let temp = tableFieldList[i];
-        if (!temp.fieldDescription?.trim() && temp.isShow) {
-          //描述字段不能为空
-          validateParams.isFieldDescrib = true;
-        }
-        if (
-          temp.relationTable &&
-          (!temp.relationFieldName || !temp.relationType)
-        ) {
-          // 关联条件不足
-          validateParams.isRelationFieldAll = true;
-        }
-        if (temp.relationFieldList.length) {
-          this.validateField(temp.relationFieldList, validateParams);
-        }
-      }
-    },
-    // 校验字段合法性(非递归版)
-    validateTableData(tableFieldList) {
-      if (!tableFieldList.length) {
-        return {
-          val: false,
-          meg: "字段个数不能为空",
-        };
-      }
-      for (let i = 0; i < tableFieldList.length; i++) {
-        let temp = tableFieldList[i];
-        if (!temp.fieldDescription?.trim() && temp.isShow) {
-          return {
-            val: false,
-            msg: "显示的字段,字段描述不能为空",
-          };
-        }
-        if (
-          temp.relationTable &&
-          (!temp.relationFieldName || !temp.relationType)
-        ) {
-          return {
-            val: false,
-            msg: "关联条件不足,请完善关联条件",
-          };
-        }
-      }
-      if (tableFieldList.filter((item) => item.isShow).length == 0) {
-        return {
-          val: false,
-          msg: "显示的字段数不能为空",
-        };
-      }
-      if (
-        tableFieldList.filter((item) => item.isExport && !item.isChildren)
-          .length == 0
-      ) {
-        return {
-          val: false,
-          msg: "导出字段中至少应有一个主表字段",
-        };
-      }
-      // 导出的字段的描述不能重复
-      let describeArr = tableFieldList
-        .filter((item) => item.isExport)
-        .map((item) => item.fieldDescription);
-      let isRepeat = false;
-      describeArr.map((item) => {
-        if (describeArr.indexOf(item) != describeArr.lastIndexOf(item)) {
-          isRepeat = true;
-        }
-      });
-      if (isRepeat) {
-        return {
-          val: false,
-          msg: "导出的字段描述不能重复",
-        };
-      }
-
-      return {
-        val: true,
-        msg: "",
-      };
-    },
-    // 递归拼接查询语句
-    getSQLString(tableFieldList, fieldArr, tableArr, sqlType = "mysql") {
-      let prefix = "{DBNAME}.";
-      let asOrSpace = sqlType == "oracle" ? " " : " AS ";
-      for (let i = 0; i < tableFieldList.length; i++) {
-        let temp = tableFieldList[i];
-        if (temp.isShow) {
-          let tempArr = prefix + temp.tableName + "." + temp.fieldName;
-          // 给主表也加上表名前缀
-          // if (temp.isChildren) {
-          tempArr += asOrSpace + temp.tableName + "_" + temp.fieldName;
-          // }
-          fieldArr.push(tempArr);
-        }
-        if (temp.relationTable && temp.relationFieldName && temp.relationType) {
-          // fieldArr.push(temp.relationTable + "." + temp.relationFieldName);
-          let isNeedUsername = sqlType == "oracle" ? this.username + "." : "";
-          tableArr.push(
-            temp.relationType +
-              " " +
-              isNeedUsername +
-              prefix +
-              temp.relationTable +
-              asOrSpace +
-              temp.relationTable +
-              " ON " +
-              prefix +
-              temp.relationTable +
-              "." +
-              temp.relationFieldName +
-              " = " +
-              prefix +
-              temp.tableName +
-              "." +
-              temp.fieldName
-          );
-        }
-        // if (temp.relationFieldList.length) {
-        //   this.getSQLString(temp.relationFieldList, fieldArr, tableArr);
-        // }
-      }
-      // 如果主键不包含显示,则添加至sql语句中
-      let isNotInclude = this.primaryKeyList.find(
-        (val) => !val.isShow && val.fieldName == this.formData.primaryKey
-      );
-      if (isNotInclude) {
-        fieldArr.push(
-          prefix + isNotInclude.tableName + "." + isNotInclude.fieldName
-        );
-      }
-    },
-
-    // 拼接查询sql语句
-    getSQLStr() {
-      let prefix = "{DBNAME}.";
-      let sqlType = this.databaseType; //数据库类型
-      let asOrSpace = sqlType == "oracle" ? " " : " AS ";
-      // let sqlType = "oracle";
-      let sql = "";
-      // mysql
-      sql += "SELECT ";
-      let fieldNameArr = [],
-        relaTypeArr = [];
-      this.getSQLString(
-        this.tableFieldList,
-        fieldNameArr,
-        relaTypeArr,
-        sqlType
-      );
-      // if (discriISEmpty) {
-      //   return false;
-      // }
-      let styleFieldList = this.$refs.styleTableRef.getStyleTableField();
-      styleFieldList = styleFieldList.map((item) => {
-        return `${prefix}${item}${asOrSpace}${item.replace(".", "_")}`;
-      });
-      let set = new Set([...fieldNameArr, ...styleFieldList]);
-      fieldNameArr = [...set];
-      let isNeedUsername = sqlType == "oracle" ? this.username + "." : "";
-      sql +=
-        fieldNameArr.join(",") +
-        " FROM " +
-        isNeedUsername +
-        prefix +
-        this.tableName +
-        asOrSpace +
-        this.tableName;
-      if (relaTypeArr.length) {
-        sql += " " + relaTypeArr.join(" ");
-      }
-      return sql;
-    },
-    getStaticSQL(key) {
-      // let prefix = "{DBNAME}.";
-      let sqlType = this.databaseType; //数据库类型
-      // let sqlType = "oracle";
-      let sql = "";
-      // mysql
-      sql += "SELECT ";
-      let fieldNameArr = [],
-        relaTypeArr = [];
-      this.getSQLString(
-        this.tableFieldList,
-        fieldNameArr,
-        relaTypeArr,
-        sqlType
-      );
-      let isNeedUsername = sqlType == "oracle" ? this.username + "." : "";
-      let asOrSpace = sqlType == "oracle" ? " " : " AS ";
-
-      sql +=
-        key +
-        " FROM " +
-        isNeedUsername +
-        // prefix +
-        this.tableName +
-        asOrSpace +
-        this.tableName;
-      if (relaTypeArr.length) {
-        sql += " " + relaTypeArr.join(" ");
-      }
-      return sql;
-    },
-    // 处理列表信息
-    columnsHandler(columns) {
-      let resArr = [];
-      columns.forEach((item) => {
-        for (const key in item) {
-          let tempObj = {};
-          tempObj.key = key;
-          tempObj.value = item[key];
-          resArr.push(tempObj);
-        }
-      });
-      return resArr;
-    },
-    // 下划线命名转驼峰命名
-    toUpperCase(str) {
-      let nstr = str.replace(/(?:_)+([^_])/g, function ($0, $1) {
-        return $1.toUpperCase();
-      });
-      nstr = nstr.replace(nstr[0], nstr[0].toLowerCase());
-      return nstr;
-    },
-
-    // 递归获取列表信息
-    getCol(
-      tableFieldList,
-      columns,
-      searchFieldList = [],
-      tableExportField = {}
-    ) {
-      if (!tableFieldList.length) return;
-      for (let i = 0; i < tableFieldList.length; i++) {
-        let temp = tableFieldList[i];
-        let tempFieldName = "",
-          exportFieldName = "";
-        if (temp.isChildren) {
-          tempFieldName = temp.tableName + "_" + temp.fieldName;
-          exportFieldName = temp.tableName + "@" + temp.fieldName;
-        } else {
-          // tempFieldName = temp.fieldName;
-          tempFieldName = temp.tableName + "_" + temp.fieldName;
-          exportFieldName = temp.fieldName;
-        }
-        if (temp.isShow) {
-          let tempObj = {};
-          // if (temp.isChildren) {
-          //   tempObj[temp.tableName + "_" + temp.fieldName] =
-          //     temp.fieldDescription;
-          // } else {
-          //   tempObj[temp.fieldName] = temp.fieldDescription;
-          // }
-          tempObj[tempFieldName] = temp.fieldDescription;
-          columns.push(tempObj);
-        }
-        if (temp.isSearch) {
-          searchFieldList.push(temp.tableName + "." + temp.fieldName);
-        }
-
-        if (temp.isExport) {
-          tableExportField[exportFieldName] = temp.fieldDescription;
-        }
-        // 递归
-        // if (temp.relationFieldList) {
-        //   this.getCol(
-        //     temp.relationFieldList,
-        //     columns,
-        //     searchFieldList,
-        //     tableExportField
-        //   );
-        // }
-      }
-    },
-    // 更新路由
-    reloadRouter() {
-      this.$store.dispatch("GenerateRoutes").then((accessRoutes) => {
-        this.$router.addRoutes(accessRoutes); // 动态添加可访问路由表
-      });
-    },
-
-    // 预览结果回调
-    async previewHandle() {
-      this.$refs.formData.validate(async (valid) => {
-        // 至少包含一个查询项
-        if (valid) {
-          if (!this.tableName) {
-            this.$message.error("请选择数据表");
-            return;
-          }
-          // 检验表单合法性
-          let validRes = this.validateTableData(this.tableFieldList);
-          if (!validRes.val) {
-            this.$message.error(validRes.msg);
-            return;
-          }
-          // let validateParams = {
-          //   isFieldDescrib: false,
-          //   isRelationFieldAll: false,
-          // };
-          // this.validateField(this.tableFieldList, validateParams);
-          // console.log(validateParams);
-          // if (validateParams.isFieldDescrib) {
-          //   this.$message.error("需要显示的字段描述不能为空");
-          //   return;
-          // }
-          // if (validateParams.isRelationFieldAll) {
-          //   this.$message.error("请补全关联条件");
-          //   return;
-          // }
-          // 拼接预览的sql查询语句
-          this.queryParams.basicMap.sql = this.getSQLStr();
-          // 获取表头信息
-          let tempColumns = [],
-            searchFieldList = [];
-          this.getCol(this.tableFieldList, tempColumns, searchFieldList);
-          if (!searchFieldList.length) {
-            this.$message.warning("请至少选择一个包含查询字段");
-            return false;
-          }
-          const dataType = await this.getDicts("table_statistic_type");
-          this.deepragTableStatisticList = JSON.parse(
-            JSON.stringify(this.dragTableStatisticList)
-          );
-          this.deepragTableStatisticList.forEach((item) => {
-            dataType.data.forEach((val) => {
-              if (val.dictValue == item.statisticType) {
-                item.statisticType = val.dictLabel;
-              }
-            });
-          });
-          this.columns = this.columnsHandler(tempColumns);
-          this.queryParams.isAsc = this.formData.isAsc;
-          // 发送请求获取预览数据
-          let res = await dragTablePreview(this.queryParams);
-          this.tableDataList = [];
-          res.rows.forEach((item) => {
-            this.tableDataList.push(item.resultMap);
-          });
-          this.total = res.total;
-          this.isShowPreview = true;
-        } else {
-          this.$message.warning("请完善表单");
-          return false;
-        }
-      });
-
-      // this.$refs.tableForm.validate((val) => {
-      //   if (val) {
-
-      //   } else {
-      //     this.$message.warning("请完善表单");
-      //     return false;
-      //   }
-      // });
-    },
-    getBtnMapList(tableKey) {
-      let res = this.formData.btnGroupList.map((item) => {
-        return {
-          tableKey,
-          btnKey: item,
-        };
-      });
-      return res;
-    },
-
-    // tab切换
-    tabhandleClick() {
-      this.menudata = this.activeName != "menuedit" ? true : false;
-    },
-    // 添加数据字段对话框
-    async addDataDialog() {
-      this.staictitle = "添加统计数据字段";
-      this.isShowAddData = true;
-      this.dataType = await this.getDicts("table_statistic_type");
-      this.dataType = this.dataType.data;
-      // console.log(this.dataType)
-    },
-    async updataDialog() {
-      // console.log(this.dataType)
-    },
-    // 修改数据字段
-    upadtaData() {
-      this.dragTableStatisticList.forEach((item, index) => {
-        // console.log(this.dataCountFormData);
-        if (item.id !== undefined && item.id == this.dataCountFormData.id) {
-          this.dragTableStatisticList[index] = this.dataCountFormData;
-        } else if (item.xid == this.dataCountFormData.xid) {
-          this.dragTableStatisticList[index] = this.dataCountFormData;
-        }
-      });
-      this.isShowAddData = false;
-      // console.log(this.dragTableStatisticList)
-      this.dataCountFormData = {};
-    },
-    // 添加数据字段
-    addData() {
-      // console.log(this.dataCountFormData);
-      this.dataCountFormData.xid = Date.now();
-      this.dataCountFormData.tableKey = this.tableKey;
-      this.dragTableStatisticList.push(this.dataCountFormData);
-      this.isShowAddData = false;
-      this.dataCountFormData = {};
-    },
-    // 关闭添加数据字段
-    closeAddDialog() {
-      this.isShowAddData = false;
-      this.dataCountFormData = {};
-    },
-    // 确定统计
-    countHandle() {
-      addStatistic({
-        dragTableStatisticList: this.dragTableStatisticList,
-        tableSqlList: this.tableSqlList,
-        searchFieldList: this.searchFieldList,
-        dtTableName: this.tableName,
-      }).then((res) => {
-        // console.log(res)
-      });
-    },
-    // 修改统计信息
-    async handleUpdateStat(row) {
-      // console.log(row);
-      this.dataCountFormData = row;
-      this.dataCountFormData.xid = Date.now();
-      this.staictitle = "修改统计数据字段";
-      this.dataType = await this.getDicts("table_statistic_type");
-      this.dataType = this.dataType.data;
-      this.isShowAddData = true;
-      // console.log(this.dataCountFormData)
-      // console.log(this.dragTableStatisticList);
-    },
-    // 删除统计信息
-    handleDeleteStat(row) {
-      this.dragTableStatisticList.forEach((item, index) => {
-        if (item.id == row.id) {
-          this.dragTableStatisticList.splice(index, 1);
-        }
-      });
-    },
-
-    // 获取当前表描述
-    getTableCommont(tableName, tableList) {
-      return tableList.find((item) => item.tableName == tableName).tableComment;
-    },
-
-    // 获取按钮组数据
-    async getBtnList() {
-      let res = await listBtn({ isEnablePaging: false, btnParentId: 0 });
-      this.btnGroupOptions = res.rows;
-    },
-  },
-
-};
-</script>
-
-<style scoped lang="scss">
-.ipt {
-  height: 36px;
-  line-height: 36px;
-  font-size: 14px;
-  width: 100%;
-  outline: none;
-  text-align: center;
-  background-color: #fff;
-  border: 1px solid #dcdfe6;
-  color: #606266;
-  display: inline-block;
-  border-radius: 4px;
-}
-.isNullDesc {
-  border-color: #ff4949 !important;
-}
-
-.ipt:focus {
-  border-color: #1890ff;
-}
-::v-deep .right_card {
-  min-height: 500px !important;
-}
-::v-deep .vue-treeselect--has-value .vue-treeselect__input {
-  vertical-align: middle !important;
-}
-.menudata {
-  width: 30% !important;
-}
-.edit {
-  width: 70% !important;
-}
-.mb10 {
-  margin-top: 10px;
-}
-.cardBox {
-  display: flex;
-  align-content: space-between;
-  flex-wrap: wrap;
-  align-content: flex-start;
-}
-.card {
-  /* width:15%; */
-  height: 150px;
-  flex-basis: 15%;
-  margin-bottom: 10px;
-  margin-right: 15px;
-  min-width: 180px;
-  .title {
-    /* width:20%; */
-    font-size: 18px;
-    margin-bottom: 5px;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
-  }
-  .description {
-    width: 70%;
-    font-size: 13px;
-    color: #9699a2;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: -webkit-box;
-    -webkit-box-orient: vertical;
-    -webkit-line-clamp: 3;
-    word-break: break-all;
-    float: left;
-  }
-  .type {
-    float: right;
-    margin-top: 40px;
-    .statisticType {
-      font-size: 18px;
-    }
-  }
-  .count {
-    font-size: 25px;
-  }
-}
-.mb8 {
-  ::v-deep .el-col-18 {
-    width: 30% !important;
-    min-width: 220px !important;
-  }
-  ::v-deep .previewbtn {
-    min-width: 190px !important;
-  }
-}
-</style>

+ 12 - 35
ruoyi-ui/src/views/dialogTemplate/components/index.vue

@@ -106,14 +106,8 @@
 import { dragGroupTableInfo } from "@/api/relateTable/index";
 import {
   btnCommonApi,
-  delTableData,
   dragTableInfo,
-  listTable,
   unionListTableData,
-  getInfoBySqlKey,
-  addTableData,
-  batchEdit,
-  getStatisticList,
 } from "@/api/tablelist/commonTable";
 import { camelCase } from "@/utils";
 import Menu from "@/views/tablelist/commonTable/BtnMenu.vue";
@@ -169,18 +163,12 @@ export default {
   props: ["groupKey", "rowobj", "tableCount", "subCount", "subTableName"],
   computed: {
     isShowExcuteCol() {
-      // console.log(!this.excuteBtnArr?.every((arr) => arr.children.length == 0));
-      // return true;
       return !this.excuteBtnArr?.every((arr) => arr.children.length == 0);
     },
   },
   methods: {
     // 新增
     addBtnHandler() {
-      // if (this.editData == undefined) {
-      //   this.editData = new Array();
-      // }
-
       let obj = {
         // id:'',
       };
@@ -207,10 +195,11 @@ export default {
     // 获取弹窗信息
     async getLists(groupKey) {
       let res = await dragGroupTableInfo({ queryMap: { groupKey: groupKey } });
+      // 获取表格tablekey 和 sort
       this.tableLists = JSON.parse(res.msg);
-      // console.log(this.tableLists);
 
       this.tableLists.forEach(async (item) => {
+        // 基础信息
         if (item.sort == 0) {
           const res = await dragTableInfo({
             queryMap: { tableKey: item.tableKey },
@@ -220,23 +209,26 @@ export default {
             this.infoData.push(result);
             this.$set(this.infoData);
           });
+
+          //表格数据 
         } else if (item.sort == 1) {
           const res = await dragTableInfo({
             queryMap: { tableKey: item.tableKey },
           });
           this.excuteBtnArr = res.data.resultMap.button;
           this.getTableHandle(res, item.sort).then((result) => {
+            // 表头数据
             this.tableData.push({
               column: result,
             });
           });
-          // console.log(this.tableData);
+
+          // 统计状态 和 按钮
         } else if (item.sort == 2) {
           const res = await dragTableInfo({
             queryMap: { tableKey: item.tableKey },
           });
-
-          console.log("butt", res.data.resultMap.button);
+          // 按钮
           this.controlBtnArr = res.data.resultMap.button[0];
           this.controlBtnArr = this.controlBtnArr.children;
         }
@@ -309,18 +301,15 @@ export default {
     // 获取表数据
     async getDataHandler(contion) {
       let con = contion.split("=");
-      // console.log(con);
       let key = con[1].trim();
-      // console.log(this.rowobj);
-      // console.log(key);
 
       let value = key.split(".");
 
-      // console.log(value);
+      // 拼接请求数据依赖条件
       this.queryParams.queryMap[key] = "'" + this.rowobj[value[1]] + "'";
 
       let tableLists = await unionListTableData(this.queryParams);
-      // console.log(tableLists.rows);
+
       if (tableLists.code == 200) {
         this.tableList = [];
         tableLists.rows.forEach((item) => {
@@ -335,12 +324,9 @@ export default {
           }
           return kv;
         });
-        // console.log(this.tableList);
-        // console.log('123', this.tableList);
+
         return this.tableList;
       }
-      // this.total = tableLists.total;
-      // this.loading = false;
     },
     // 处理列表信息
     columnsHandler(columns) {
@@ -387,17 +373,8 @@ export default {
         window.open("http://" + link, "_blank");
       }
     },
+    // 删除
     handleDelete(row, btnData) {
-      // console.log(row, btnData);
-      // if(row.id){
-      //   this.editData.forEach((item ,index) => {
-      //     if(item.id == row.id){
-      //       this.editData.splice(index, 1);
-      //     }
-      //   })
-      // }else{
-      //   this.$message.error("请输入id");
-      // }
     },
     // 修改
     handleUpdate(row, btnData) {

+ 7 - 236
ruoyi-ui/src/views/dialogTemplate/indexTable.vue

@@ -113,23 +113,10 @@
 </template>
 
 <script>
-import { listTable, removeTableList } from "@/api/dragform/tableList";
-import { getFormName, getListName, dragTablePreview, } from "@/api/dragform/form.js";
-import { delMenu } from "@/api/system/menu";
-import { getMenuList, addMenu, getRouters} from "@/api/menu.js";
-import { getParticMenu, updateMenu } from "@/api/system/menu.js";
-import { addGroup, listGroup, getTable, delGroup, updataGroup } from '@/api/relateTable/index.js'
-import { addDragTable } from "@/api/tablelist/commonTable.js";
-import { mapGetters, mapState } from "vuex";
-import DictData from "@/components/DictData";
-import { v4 as uuidv4 } from "uuid";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import json from "highlight.js/lib/languages/json";
-import { getTableInfo, editTable } from "@/api/system/table.js";
+import { listGroup, delGroup } from '@/api/relateTable/index.js'
+
 export default {
   name: "indexTable",
-  components: { Treeselect },
   dicts: ["sys_time_format", "table_statistic_type"],
   data () {
    return {
@@ -137,7 +124,6 @@ export default {
     isInputInvalid: false,
     // 表格数据
     tableData:[],
-    queryParams: {},
     showSearch: true,
     // 新增弹框
     dialogVisible: false,
@@ -153,38 +139,9 @@ export default {
     multiple: true,
     tableList: [],
      // 遮罩层
-     loading: false,
-
-     tableItemRules: [],
+    loading: false,
     total: 0,
-    // 新增弹框数据
-    tableItemForm: {
-        tId: "",
-        rowId: "",
-        title: "",
-        tableName: "",
-        selectFields: "",
-        isAsc: false,
-        timeFormate: "",
-        orderByColumn: "",
-        routePath: undefined,
-      },
     tableFieldList: [],
-        // 关联方式
-    relaTypeList: [
-      {
-        label: "等值连接",
-        value: "INNER JOIN",
-      },
-      {
-        label: "左连接",
-        value: "LEFT JOIN",
-      },
-      {
-        label: "右连接",
-        value: "RIGHT JOIN",
-      },
-      ],
     queryParams: {
         groupType: 1,
         pageNum: 1,
@@ -200,52 +157,16 @@ export default {
         spare: null,
         spare1: null,
         isSelection: null,
-      },
+    },
    }
  },
  created() {
     this.getLists();
   },
  computed: {
-    selectRelate(){
-      if(this.tableItemForm.tableName =='') return
-      return this.tableList.filter(item => item.tableName !== this.tableItemForm.tableName)
-    },
-    dataArr() {
-      return this.tableFieldList.filter((item) => item.isShow);
-    },
-    ...mapGetters(["addRoutes"]),
-    ...mapState({
-      databaseName: (state) => state.user.dataSource.databaseName,
-      databaseType: (state) => state.user.dataSource.databaseType,
-      username: (state) => state.user.dataSource.username,
-      tenantId: (state) => state.user.tenant.tenantId,
-    }),
-    orderByFieldList() {
-      return this.tableFieldList;
-    },
-  },
-  watch: {
-    'tableItemForm.tableName': function (val) {
-      if (val) {
-        this.relationTableList = this.tableList
-          .filter((item) => item.tableName != val)
-          .map((item) => {
-            return {
-              tableName: item.tableName,
-              tableComment: item.tableComment,
-            };
-          });
-      } else {
-        this.relationTableList = [];
-      }
-    },
-    'groupForm.routePath'(nval, oval) {
-      let targetMenu = this.getTargetMenu(this.menus);
-      this.menuOrderNum = targetMenu.children ? targetMenu.children.length : 0;
-    },
   },
   methods: {
+    //表格列表
     getLists(){
       this.loading = true;
       listGroup(this.queryParams).then((response) => {
@@ -255,8 +176,8 @@ export default {
       });
         
     },
-     // 删除表格组
-     DeleteTableGroup(row){
+    // 删除表格组
+    DeleteTableGroup(row){
       const fIds = row.id || this.ids;
       this.$modal
         .confirm('是否确认删除动态单编号为"' + fIds + '"的数据项?删除后表格中所有的数据都将删除!')
@@ -281,10 +202,7 @@ export default {
       this.$router.push({
         path: "/system/fromModel/index/dialogMange",
       });
-      // this.getAllTable()
-      // await this.getMenuList()
     },
-
     /** 修改按钮操作 */
     async handleUpdate(row) {
       // 兼容勾选单个的修改
@@ -295,23 +213,6 @@ export default {
         },
       });
     },
-    // 获取所有表格
-    async getAllTable() {
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-      };
-      let res = await getFormName(data);
-
-      const baseTable = await this.getDicts("base_table");
-
-      this.tableList = res.data.filter((item) => {
-        return !baseTable.data.some(
-          (value) =>
-            value.dictValue.toLowerCase() == item.tableName.toLowerCase()
-        );
-      });
-    },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.id);
@@ -321,124 +222,6 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
-
-    // 关联表变化回调
-    async ralationTableChange(row) {
-      this.tableFieldList = this.tableFieldList.filter((item) => {
-        return !row.relationFieldList.some((val) => {
-          return val.id == item.id;
-        });
-      });
-      row.relationFieldName = "";
-      row.relationType = "";
-      row.disableRelaFieldName = false;
-      row.disableRelaType = false;
-      row.relationFieldList = [];
-      if (!row.relationTable) {
-        return;
-      }
-      // 获取关联表的字段
-      let data = {
-        databaseName: this.databaseName,
-        databaseType: this.databaseType,
-        tableName: row.relationTable,
-      };
-      let res = await getListName(data);
-      // 关联字段下拉列表数据
-      row.relaFieldNameList = res.map((item) => {
-        return {
-          fieldName: item.fieldName,
-          fieldDescription: item.fieldDescription,
-        };
-      });
-      let relationTableList = row.relationTableList.filter(
-        (item) => row.relationTable != item.tableName
-      );
-      row.relationFieldList = row.relaFieldNameList.map((item, index) => {
-        return {
-          id: row.relationTable + "_" + item.fieldName,
-          fieldName: item.fieldName,
-          fieldDescription: item.fieldDescription,
-          relationTable: "",
-          relationFieldName: "",
-          relaFieldNameList: [],
-          disableRelaFieldName: false,
-          relationType: "",
-          relationShowField: [],
-          relationShowFiledList: [],
-          disableRelaType: false,
-          isShow: true,
-          isSearch: false,
-          isExport: true,
-          relationTableList,
-          tableName: row.relationTable,
-          relationFieldList: [],
-          isChildren: true,
-        };
-      });
-      row.disableRelaFieldName = true;
-    },
-    // 关联类型变化回调
-    relationTypeChangeHandler(row) {
-      let tempRelationFieldList = row.relationFieldList.filter((item) => {
-        return !this.tableFieldList.find((val) => val.id === item.id);
-      });
-      this.tableFieldList = [...this.tableFieldList, ...tempRelationFieldList];
-    },
-    // 关联字段回调
-    relationFieldChange(row) {
-      if (!row.relationFieldName) {
-        row.relationType = "";
-        row.disableRelaType = false;
-        row.relaFieldNameList = [];
-        return;
-      }
-      row.disableRelaType = true;
-    },
-    // 递归获取列表信息
-    getCol(
-      tableFieldList,
-      columns,
-      searchFieldList = [],
-      tableExportField = {}
-    ) {
-      if (!tableFieldList.length) return;
-      for (let i = 0; i < tableFieldList.length; i++) {
-        let temp = tableFieldList[i];
-        let tempFieldName = "",
-          exportFieldName = "";
-        if (temp.isChildren) {
-          tempFieldName = temp.tableName + "_" + temp.fieldName;
-          exportFieldName = temp.tableName + "@" + temp.fieldName;
-        } else {
-          tempFieldName = temp.fieldName;
-          exportFieldName = temp.fieldName;
-        }
-        if (temp.isShow) {
-          let tempObj = {};
-          tempObj[tempFieldName] = temp.fieldDescription;
-          columns.push(tempObj);
-        }
-        if (temp.isSearch) {
-          searchFieldList.push(temp.tableName + "." + temp.fieldName);
-        }
-
-        if (temp.isExport) {
-          tableExportField[exportFieldName] = temp.fieldDescription;
-        }
-      }
-    },
-    // 获取路由表单数据
-    async getMenuList() {
-      let res = await getMenuList();
-      this.menus = this.handleTree(res.data, "menuId");
-    },
-    // 更新路由
-    reloadRouter() {
-      this.$store.dispatch("GenerateRoutes").then((accessRoutes) => {
-        this.$router.addRoutes(accessRoutes); // 动态添加可访问路由表
-      });
-    },
   }
 }
 </script>
@@ -447,11 +230,6 @@ export default {
 ::v-deep .el-dialog:not(.is-fullscreen){
   width: 900px !important;
 }
-.treeselect{  
-   .vue-treeselect{
-    width: 217px !important;
-  }
-}
 
 .ipt {
   height: 36px;
@@ -474,10 +252,3 @@ export default {
   border-color: #1890ff;
 }
 </style>
-
-<style lang="scss">
- 
-.vue-treeselect{
-  z-index: 9999 !important;
-}
-</style>