浏览代码

页面更新

sr 4 年之前
父节点
当前提交
aa3d5cda09

+ 21 - 5
ruoyi-ui/src/components/DynamicForm/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-form-item :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
+  <el-form-item :rules="rules" :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
     <!-- 输入框 -->
     <el-input v-if="formConfig.htmlType == 'input'" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
       clearable @keyup.enter.native="handleQuery" />
@@ -7,14 +7,14 @@
     <el-input v-if="formConfig.htmlType == 'textarea'" type="textarea" v-model="config[formConfig.columnName]"
       :placeholder="'请输入'+formConfig.columnComment" clearable @keyup.enter.native="handleQuery" />
     <!-- 下拉框 -->
-    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(!formConfig.fkInfo.fkTableName)"
+    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(!formConfig.fkInfo)"
       filterable :placeholder="'请输入'+formConfig.columnComment">
       <el-option v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel"
         :value="itemChild.dictValue">
       </el-option>
     </el-select>
     <!-- 下拉框搜索 -->
-    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo.fkTableName)"
+    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo )"
       filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
       <el-option v-for="itemChild in filterList" :key="itemChild.table_id" :label="itemChild.table_name" :value="itemChild.table_id">
       </el-option>
@@ -90,7 +90,13 @@
     components: {
       Editor
     },
-    props: {
+    props: {
+      rules: {
+        type: Object,
+        required: true,
+        'default': {
+        }
+      },
       formConfig: {
         type: Object,
         required: true,
@@ -102,6 +108,14 @@
     created() {
       this.config = {}
       this.init()
+    },
+    watch: {
+      'config': {
+         handler: function() {
+             this.$emit('modelFn',this.formConfig.columnName,this.config[this.formConfig.columnName])
+         },
+         deep: true
+     }
     },
     mounted() {},
     methods: {
@@ -131,8 +145,10 @@
           this.config = []
         } else {
           this.$set(this.config, this.formConfig.columnName, (this.formConfig.columnValue || ''))
+        }
+        if(this.formConfig.fkInfo){
+          this.aliemg.table = this.formConfig.fkInfo.fkTableName
         }
-        this.aliemg.table = this.formConfig.fkInfo.fkTableName
       },
       handleChange(file, fileList) {
         this.fileList = fileList.slice(-3);

+ 12 - 2
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -90,7 +90,7 @@
     components: {
       Editor
     },
-    props: {
+    props: {
       formConfig: {
         type: Object,
         required: true,
@@ -102,6 +102,14 @@
     created() {
       this.config = {}
       this.init()
+    },
+    watch: {
+      'config': {
+         handler: function() {
+             this.$emit('modelFn',this.formConfig.columnName,this.config[this.formConfig.columnName])
+         },
+         deep: true
+     }
     },
     mounted() {},
     methods: {
@@ -131,8 +139,10 @@
           this.config = []
         } else {
           this.$set(this.config, this.formConfig.columnName, (this.formConfig.columnValue || ''))
+        }
+        if(this.formConfig.fkInfo){
+          this.aliemg.table = this.formConfig.fkInfo.fkTableName
         }
-        this.aliemg.table = this.formConfig.fkInfo.fkTableName
       },
       handleChange(file, fileList) {
         this.fileList = fileList.slice(-3);

+ 5 - 3
ruoyi-ui/src/views/system/editing/index.vue

@@ -19,12 +19,12 @@
     <!-- 内容 -->
     <div class="eniting_nav">
       <el-collapse v-model="activeNames" @change="handleChange">
-        <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
+        <el-form :rules="queryData.rules" :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
           <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index"
             class="eitde">
             <el-row>
               <el-col :span="24" :key="index">
-                <dynamic-forms :ref="items.columnName" :config="queryParams" @inputs="changeFn" :formConfig="items"
+                <dynamic-forms @modelFn="modelFn" :ref="items.columnName" :config="queryParams" @inputs="changeFn" :formConfig="items"
                   v-for="(items,indexs) in item.hrChildren" :key='indexs' />
               </el-col>
             </el-row>
@@ -111,12 +111,14 @@
       this.deledlid.table = this.$route.query.tables
       this.deledlid.idList.push(this.$route.query.id)
       console.log(this.deledlid)
-
       // tab
       this.edingelsietab()
     },
     filters: {},
     methods: {
+      modelFn(obj, cont) {
+        this.$set(this.queryParams,obj,cont)
+      },
       handleChange(val) {
         console.log(val);
       },

+ 6 - 3
ruoyi-ui/src/views/system/form/index.vue

@@ -10,11 +10,11 @@
     <!-- 内容 -->
     <div class="table_nav">
       <el-collapse v-model="activeNames">
-         <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
+         <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true" label-width="120px">
         <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index" class="eitde">
             <el-row :gutter="0">
               <el-col :span="24"  :key="index">
-                  <dynamic-forms :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='indexs' />
+                  <dynamic-forms @modelFn="modelFn" :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='indexs' />
               </el-col>
             </el-row>
         </el-collapse-item>
@@ -159,7 +159,10 @@
       this.init()
       this.edingelsietab()
     },
-    methods: {
+    methods: {
+      modelFn(obj, cont) {
+        this.$set(this.queryParams,obj,cont)
+      },
       handleCurrentChange() {
 
       },

+ 346 - 333
ruoyi-ui/src/views/system/table/index.vue

@@ -4,21 +4,22 @@
       <!-- <p>单表</p>
       <el-divider></el-divider> -->
       <div class="table_headerBtun" v-if="queryData.buttonList">
-        <el-button type="primary" size="mini"  plain v-for="(item,index) in jeigneutwo" :key="index" @click="handleQuery(item)">{{item}}</el-button>
+        <el-button type="primary" size="mini" plain v-for="(item,index) in jeigneutwo" :key="index" @click="handleQuery(item)">{{item}}</el-button>
       </div>
     </div>
     <!-- 内容 -->
     <div class="table_nav headertable_nav">
-      <el-collapse v-model="activeNames" @change="handleChange">
-        <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
-        <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index" >
+      <el-collapse v-model="activeNames" @change="handleChange">
+        <el-form :model="queryParams" :rules="queryData.rules" ref="queryForm" :inline="true" label-width="120px">
+          <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index">
 
-            <el-row :gutter="0">
-              <el-col :span="24"  :key="index">
-                  <dynamic-forms :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='indexs' />
-              </el-col>
+            <el-row>
+              <el-col :span="24" :key="index">
+                <dynamic-forms @modelFn="modelFn" :ref="items.columnName" @inputs="changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren"
+                  :key='indexs' />
+              </el-col>
             </el-row>
-        </el-collapse-item>
+          </el-collapse-item>
         </el-form>
       </el-collapse>
     </div>
@@ -26,63 +27,63 @@
 </template>
 <script>
   import {
-    getTableQuery,
-    getQueryList,
-    tableSubimt,
-    tableSubimtanit,
-    addbjectSave,
+    getTableQuery,
+    getQueryList,
+    tableSubimt,
+    tableSubimtanit,
+    addbjectSave,
     delMenutab
   } from '@/api/system/table.js'
   export default {
-    name: "index",
+    name: "index",
     inject: ['reload'],
     data() {
       return {
         // 显示搜索条件
         showSearch: true,
         activeNames: [0],
-        title: '单表1',
-        tabledeLise:{
-          table:'',
-          isUi:true
+        title: '单表1',
+        tabledeLise: {
+          table: '',
+          isUi: true
         },
         queryData: {},
         // 查询参数
         queryParams: {
 
         },
-        labletit: '查询参数1233',
-        tableZbie:{
-          table:'',
-          isUi:true,
-          fixedData:{
-            id:-1
-          }
-
-        },
-        taleLisst:[],
-        forme:{
-          table:'',
-          objId:-1,
-          fixedData:{}
-        },
-        formeanti:{
-          table:'',
-          commitData:[],
-        },
-        formy:{
-          id:0,
-          status:1
-        },
-        // 删除参数
-        deledlid:{
-          table:'',
-          idList:[]
-        },
-        jeigneu:[],
-        jeigneutwo:[],
-        xidugje:0,
-        tijeq:0
+        labletit: '查询参数1233',
+        tableZbie: {
+          table: '',
+          isUi: true,
+          fixedData: {
+            id: -1
+          }
+
+        },
+        taleLisst: [],
+        forme: {
+          table: '',
+          objId: -1,
+          fixedData: {}
+        },
+        formeanti: {
+          table: '',
+          commitData: [],
+        },
+        formy: {
+          id: 0,
+          status: 1
+        },
+        // 删除参数
+        deledlid: {
+          table: '',
+          idList: []
+        },
+        jeigneu: [],
+        jeigneutwo: [],
+        xidugje: 0,
+        tijeq: 0
       };
     },
     // filters:{
@@ -107,27 +108,27 @@
     //     }
     //   }
     // },
-    mounted() {
-      // this.tableZbie.fixedData.id = 0
-       this.deledlid.idList = []
-       this.formeanti.table = this.$route.query.tables
-       // this.formeanti.id = this.$route.query.id
-       this.forme.table = this.$route.query.tables
-       this.forme.objId = this.$route.query.id
-       this.tableZbie.table = this.$route.query.tables
-       this.tableZbie.fixedData.id = this.$route.query.id
-       this.formy.id = this.$route.query.id
-       this.deledlid.table = this.$route.query.tables
-       this.deledlid.idList.push(this.$route.query.id)
-       console.log(this.$route.query.id)
-       console.log(this.tableZbie.table)
-
-      this.init()
+    mounted() {
+      // this.tableZbie.fixedData.id = 0
+      this.deledlid.idList = []
+      this.formeanti.table = this.$route.query.tables
+      // this.formeanti.id = this.$route.query.id
+      this.forme.table = this.$route.query.tables
+      this.forme.objId = this.$route.query.id
+      this.tableZbie.table = this.$route.query.tables
+      this.tableZbie.fixedData.id = this.$route.query.id
+      this.formy.id = this.$route.query.id
+      this.deledlid.table = this.$route.query.tables
+      this.deledlid.idList.push(this.$route.query.id)
+      this.init()
       // this.tablsie()
     },
     methods: {
+      modelFn(obj, cont) {
+        this.$set(this.queryParams,obj,cont)
+      },
       changeFn(obj) {
-        for(let key in obj){
+        for (let key in obj) {
           this.queryParams[key] = obj[key]
         }
       },
@@ -135,289 +136,301 @@
 
       },
       /** 搜索按钮操作 */
-      handleQuery(index) {
-         for(let item of this.queryData.showData){
-           for(var i = 0 ; i < item.hrChildren.length ; i++){
-             if(item.hrChildren[i].htmlType == 'checkbox' ){
-               this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
-             }else if(item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
-               if(this.$refs[item.hrChildren[i].columnName][0].config.length){
-                  this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
-               }
-             } else{
-               this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
-             }
-           }
-         }
-         if(this.queryParams.pageNum !== undefined){
-           this.queryParams.pageNum = undefined
-         }
-         if(this.queryParams.pageSize !== undefined){
-           this.queryParams.pageSize = undefined
-         }
-
-         if(index == '删除'){
-           //删除
-           console.log(this.formy.id)
-           this.handleDelete(this.deledlid)
-         }else if(index == '提交'){
-           //提交  保存
-            this.formeanti.commitData = []
-            this.formy.status = 1
-            this.formeanti.commitData.push(this.formy)
-           this.antiSubmission()
-         }else if(index == '反提交'){
-           //反提交  保存
-            this.formeanti.commitData = []
-            this.formy.status = 2
-            this.formeanti.commitData.push(this.formy)
-           this.antiSubmission()
-         }else if(index == '保存'){
-           // 修改
-           // this.xidugje = '保存'
-           this.forme.fixedData = this.queryParams
-           this.submitForm()
-         }else if(index == '新增'){
-           //新增
-           this.$router.push({
-             path: '/business/table',
-             query: {id:-1,tables:this.forme.table},
-           })
-          // // this.forme.objId = "-1"
-          //  this.queryParams = {}
-          this.xidugje = 0
-          // this.tableZbie.fixedData.id = -1
-          // this.formy.id = '-1'
-          // this.init()
-          this.reload()
-         }else if(index == '返回'){
-           if(this.xidugje ==0){
-              this.$router.go(-2)
-           }else{
-             this.$router.go(-1)
-           }
-         }else if(index == '刷新'){
-           this.xidugje = 1
-           this.reload()
-         }
-
-
+      handleQuery(index) {
+        for (let item of this.queryData.showData) {
+          for (var i = 0; i < item.hrChildren.length; i++) {
+            if (item.hrChildren[i].htmlType == 'checkbox') {
+              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
+            } else if (item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config.length) {
+                this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName]
+                  [0].config)
+              }
+            } else {
+              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
+                item.hrChildren[i].columnName]
+            }
+          }
+        }
+        if (this.queryParams.pageNum !== undefined) {
+          this.queryParams.pageNum = undefined
+        }
+        if (this.queryParams.pageSize !== undefined) {
+          this.queryParams.pageSize = undefined
+        }
+
+        if (index == '删除') {
+          //删除
+          console.log(this.formy.id)
+          this.handleDelete(this.deledlid)
+        } else if (index == '提交') {
+          //提交  保存
+          this.formeanti.commitData = []
+          this.formy.status = 1
+          this.formeanti.commitData.push(this.formy)
+          this.antiSubmission()
+        } else if (index == '反提交') {
+          //反提交  保存
+          this.formeanti.commitData = []
+          this.formy.status = 2
+          this.formeanti.commitData.push(this.formy)
+          this.antiSubmission()
+        } else if (index == '保存') {
+          // 修改
+          // this.xidugje = '保存'
+          this.forme.fixedData = this.queryParams
+          this.submitForm()
+        } else if (index == '新增') {
+          //新增
+          this.$router.push({
+            path: '/business/table',
+            query: {
+              id: -1,
+              tables: this.forme.table
+            },
+          })
+          // // this.forme.objId = "-1"
+          //  this.queryParams = {}
+          this.xidugje = 0
+          // this.tableZbie.fixedData.id = -1
+          // this.formy.id = '-1'
+          // this.init()
+          this.reload()
+        } else if (index == '返回') {
+          if (this.xidugje == 0) {
+            this.$router.go(-2)
+          } else {
+            this.$router.go(-1)
+          }
+        } else if (index == '刷新') {
+          this.xidugje = 1
+          this.reload()
+        }
+
+
         console.log(this.forme)
         // this.getList();
       },
       getList() {
 
       },
-      init() {
+      init() {
         getTableQuery(
           this.tableZbie
         ).then(res => {
-          let data = res.data
-          console.log(res.data)
-          this.queryData = {}
-          this.queryData = data
-          this.jeigneutwo = []
-          this.jeigneu = []
-          this.jeigneu = data.buttonList.split('')
-          console.log(data.buttonList)
-          console.log(this.jeigneu)
-          this.jeigneu.filter(route => {
-            // route.dept_id = route.dept_id.value
-            console.log(route)
-            if(route == 'A'){
-              if(this.formy.id == -1){
-                route = '保存'
-                this.jeigneutwo.push(route)
-              }else{
-                route = '新增'
-              }
-
-            }else if(route == 'M'){
-              route = '保存'
-              if(this.formy.id != -1){
-                this.jeigneutwo.push(route)
-              }
-            }else if(route == 'D'){
-              route = '删除'
-              if(this.formy.id != -1){
-                this.jeigneutwo.push(route)
-              }
-            }else if(route == 'Q'){
-              route = '查询'
-            }else if(route == 'S'){
-              route = '提交'
-              if(this.formy.id != -1){
-                this.jeigneutwo.push(route)
-              }
-            }else if(route == 'U'){
-              route = '反提交'
-              if(this.formy.id != -1){
-                this.jeigneutwo.push(route)
-              }
-            }else if(route == 'I'){
-              route = '导入'
-            }else if(route == 'E'){
-              route = '导出'
-            }
-
-          })
-          this.jeigneutwo.push('刷新')
-          this.jeigneutwo.push('返回')
-          console.log(this.jeigneutwo,567)
-          console.log(this.xidugje)
-          if(this.xidugje == '刷新'){
-            if(res.code == 200){
-              this.msgSuccess("操作成功");
-            }
-          }
+          let data = res.data
+          this.queryData = {}
+          this.queryData = data
+          this.jeigneutwo = []
+          this.jeigneu = []
+          this.jeigneu = data.buttonList.split('')
+          console.log(data.buttonList)
+          console.log(this.jeigneu)
+          this.jeigneu.filter(route => {
+            // route.dept_id = route.dept_id.value
+            console.log(route)
+            if (route == 'A') {
+              if (this.formy.id == -1) {
+                route = '保存'
+                this.jeigneutwo.push(route)
+              } else {
+                route = '新增'
+              }
+
+            } else if (route == 'M') {
+              route = '保存'
+              if (this.formy.id != -1) {
+                this.jeigneutwo.push(route)
+              }
+            } else if (route == 'D') {
+              route = '删除'
+              if (this.formy.id != -1) {
+                this.jeigneutwo.push(route)
+              }
+            } else if (route == 'Q') {
+              route = '查询'
+            } else if (route == 'S') {
+              route = '提交'
+              if (this.formy.id != -1) {
+                this.jeigneutwo.push(route)
+              }
+            } else if (route == 'U') {
+              route = '反提交'
+              if (this.formy.id != -1) {
+                this.jeigneutwo.push(route)
+              }
+            } else if (route == 'I') {
+              route = '导入'
+            } else if (route == 'E') {
+              route = '导出'
+            }
+
+          })
+          this.jeigneutwo.push('刷新')
+          this.jeigneutwo.push('返回')
+          console.log(this.jeigneutwo, 567)
+          console.log(this.xidugje)
+          if (this.xidugje == '刷新') {
+            if (res.code == 200) {
+              this.msgSuccess("操作成功");
+            }
+          }
 
         })
-      },
-      tablsie(){
-        console.log(1234)
-        getQueryList(
-          this.tabledeLise
-        ).then(res => {
-          let data = res.data
-          this.taleLisst = data
-          // console.log(this.queryData.queryList)
-        })
+      },
+      tablsie() {
+        console.log(1234)
+        getQueryList(
+          this.tabledeLise
+        ).then(res => {
+          let data = res.data
+          this.taleLisst = data
+          // console.log(this.queryData.queryList)
+        })
       },
       handleChange(val) {
         console.log(val);
-      },
-      // 按钮点击
-      delet(index){
-      console.log(index)
-      if(index == 'D'){
-        this.handleDelete(this.formy.id)
-      }
-      },
-      /** 新增 修改提交按钮 */
-      submitForm: function() {
-        this.$refs["queryForm"].validate(valid => {
-          if (valid) {
-            addbjectSave(this.forme).then(response => {
-              this.msgSuccess("保存成功");
-              this.open = false;
-              console.log(this.xidugje)
-              this.$router.go(-1)
-            });
-          }
-        });
-      },
-      // 提交反提交
-      antiSubmission(){
-        this.$refs["queryForm"].validate(valid => {
-          if (valid) {
-            if (this.formy.status == 1) {
-              // 提交
-              tableSubimt(this.formeanti).then(response => {
-                this.msgSuccess("提交成功");
-                this.$router.go(-1)
-                // this.open = false;
-                // this.getList();
-              });
-            } else if(this.formy.status == 2){
-              // 反提交
-              tableSubimtanit(this.formeanti).then(response => {
-                this.msgSuccess("反提交成功");
-                this.$router.go(-1)
-                // this.open = false;
-                // this.getList();
-              });
-            }
-          }
-        });
-      },
-      //删除
-      handleDelete(index) {
-        this.$confirm('是否确认删除', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return delMenutab(index);
-          }).then(() => {
-            // this.getList();
-            this.msgSuccess("删除成功");
-            this.$router.go(-1)
-          })
+      },
+      // 按钮点击
+      delet(index) {
+        console.log(index)
+        if (index == 'D') {
+          this.handleDelete(this.formy.id)
+        }
+      },
+      /** 新增 修改提交按钮 */
+      submitForm: function() {
+        this.$refs["queryForm"].validate(valid => {
+          if (valid) {
+            addbjectSave(this.forme).then(response => {
+              this.msgSuccess("保存成功");
+              this.open = false;
+              console.log(this.xidugje)
+              this.$router.go(-1)
+            });
+          }
+        });
+      },
+      // 提交反提交
+      antiSubmission() {
+        this.$refs["queryForm"].validate(valid => {
+          if (valid) {
+            if (this.formy.status == 1) {
+              // 提交
+              tableSubimt(this.formeanti).then(response => {
+                this.msgSuccess("提交成功");
+                this.$router.go(-1)
+                // this.open = false;
+                // this.getList();
+              });
+            } else if (this.formy.status == 2) {
+              // 反提交
+              tableSubimtanit(this.formeanti).then(response => {
+                this.msgSuccess("反提交成功");
+                this.$router.go(-1)
+                // this.open = false;
+                // this.getList();
+              });
+            }
+          }
+        });
+      },
+      //删除
+      handleDelete(index) {
+        this.$confirm('是否确认删除', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMenutab(index);
+        }).then(() => {
+          // this.getList();
+          this.msgSuccess("删除成功");
+          this.$router.go(-1)
+        })
       }
     },
   };
 </script>
 
 
-<style  lang="scss">
-  .table_header{
-    .el-divider--horizontal{
-      margin-top: 16px;
-    }
-  }
-  .headertable_nav{
-    .el-collapse-item__wrap{
-      border-bottom: 0;
-    }
-    .el-collapse-item__header{
-      border-bottom: 0;
-      font-size: 15px;
-      font-family: PingFang SC;
-      font-weight: bold;
-      color: #3C8DBC;
-      line-height: 36px;
-    }
-    // .el-form-item__content{
-    //   width: 55%;
-    // }
-    .el-collapse{
-      border-top: 0;
-    }
-  }
-
-</style>
-
-
-
-<style scoped lang="scss">
-  .app-main{
-     // background-color: #eef0ff !important;
-  }
-  .table_total{
-     background-color: #eef0ff;
-     height: 100%;
-     padding: 20px;
-     // 头部
-     .table_header{
-        background-color: #fff;
-        border-radius: 6px;
-        padding: 23px;
-        margin-bottom: 20px;
-      p{
-         font-size: 15px;
-         font-weight: bold;
-         color: #3C8DBC;
-         line-height: 36px;
-        }
-      p::before{
-        content: "";
-        display: block;
-        width: 18px;
-        height: 8px;
-        background: #3C8DBC;
-        border-radius: 3px;
-
-      }
-     }
-     // 内容
-     .headertable_nav{
-       background-color: #fff;
-       border-radius: 6px;
-       padding: 23px;
-     }
-  }
-  p{
-    margin: 0;
-
-  }
+<style lang="scss">
+  .table_header {
+    .el-divider--horizontal {
+      margin-top: 16px;
+    }
+  }
+
+  .headertable_nav {
+    .el-collapse-item__wrap {
+      border-bottom: 0;
+    }
+
+    .el-collapse-item__header {
+      border-bottom: 0;
+      font-size: 15px;
+      font-family: PingFang SC;
+      font-weight: bold;
+      color: #3C8DBC;
+      line-height: 36px;
+    }
+
+    // .el-form-item__content{
+    //   width: 55%;
+    // }
+    .el-collapse {
+      border-top: 0;
+    }
+  }
 </style>
+
+
+
+<style scoped lang="scss">
+  .app-main {
+    // background-color: #eef0ff !important;
+  }
+
+  .table_total {
+    background-color: #eef0ff;
+    height: 100%;
+    padding: 20px;
+
+    // 头部
+    .table_header {
+      background-color: #fff;
+      border-radius: 6px;
+      padding: 23px;
+      margin-bottom: 20px;
+
+      p {
+        font-size: 15px;
+        font-weight: bold;
+        color: #3C8DBC;
+        line-height: 36px;
+      }
+
+      p::before {
+        content: "";
+        display: block;
+        width: 18px;
+        height: 8px;
+        background: #3C8DBC;
+        border-radius: 3px;
+
+      }
+    }
+
+    // 内容
+    .headertable_nav {
+      background-color: #fff;
+      border-radius: 6px;
+      padding: 23px;
+    }
+  }
+
+  p {
+    margin: 0;
+
+  }
+</style>

+ 25 - 2
ruoyi-ui/src/views/tool/gen/basicInfoForm.vue

@@ -28,6 +28,13 @@
         <el-form-item  label="菜单权限" prop="menuRole">
           <el-input v-model="info.menuRole" placeholder="请输入菜单权限" />
         </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item  label="页面模板" prop="tplCategory">
+          <el-select style="width: 100%;" v-model="info.tplCategory" placeholder="页面模板" clearable>
+            <el-option v-for="dict in embedEdit" :key="dict.id" :label="dict.name" :value="dict.id" />
+          </el-select>
+        </el-form-item>
       </el-col>
       <el-col :span="12" >
         <el-form-item label="新增程序" prop="triggerCreate">
@@ -97,7 +104,20 @@ export default {
     }
   },
   data() {
-    return {
+    return {
+      embedEdit: [{
+        name: '单表',
+        id: 'crud',
+      },{
+        name: '头页签',
+        id: 'headTab',
+      },{
+        name: '主子表',
+        id: 'itemTab',
+      },{
+        name: '树表',
+        id: 'tree',
+      }],
       rules: {
         tableName: [
           { required: true, message: "表名称不能为空", trigger: "blur" }
@@ -107,7 +127,10 @@ export default {
         ],
         menuRole: [
           { required: true, message: "菜单权限不能为空", trigger: "blur" }
-        ]
+        ],
+        viewType: [
+          { required: true, message: "页面模板不能为空", trigger: "blur" }
+        ],
       }
     };
   }