浏览代码

Merge remote-tracking branch 'origin/master'

Administrator 4 年之前
父节点
当前提交
b365dbc457

+ 60 - 0
ruoyi-ui/src/components/BigPicture/index.vue

@@ -0,0 +1,60 @@
+<template>
+  <div :class="{'hidden': !hidden.status}" @click="hidden.status=false" class="heibox">
+    <div class="imgs" @click.stop="">
+      <img :src="urls" alt="" class="img">
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+    scrollTo
+  } from '@/utils/scroll-to'
+
+  export default {
+    name: 'BigPicture',
+    props: {
+      urls: {
+        default: '',
+        type: String
+      },
+      hidden: {
+        type: Object,
+        default: () => {
+          return {
+            status: ''
+          }
+        }
+      }
+    },
+    methods: {
+
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .heibox {
+    width: 100%;
+    height: 100%;
+    background-color: rgba(0,0,0,.8);
+    position: fixed;
+    z-index: 99999;
+    top: 0;
+    left: 0;
+    .imgs{
+      width: 80%;
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%,-50%);
+      .img{
+        width: 100%;
+        object-fit: contain;
+      }
+    }
+  }
+  .hidden {
+    display: none;
+  }
+</style>

+ 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);

+ 13 - 4
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -14,7 +14,7 @@
       </el-option>
     </el-select>
     <!-- 下拉框搜索 -->
-    <el-select :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo.fkTableName)"
+    <el-select :disabled="formConfig.disabshow" 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,7 @@
     components: {
       Editor
     },
-    props: {
+    props: {
       formConfig: {
         type: Object,
         required: true,
@@ -110,11 +110,18 @@
       }else{
         this.formConfig.disabshow = false
       }
-      console.log(this.formConfig.fkInfo.fkTableName)
       if(this.formConfig.fkInfo == null){
           this.formConfig.fkInfo=false
       }
       this.init()
+    },
+    watch: {
+      'config': {
+         handler: function() {
+             this.$emit('modelFn',this.formConfig.columnName,this.config[this.formConfig.columnName])
+         },
+         deep: true
+     }
     },
     mounted() {},
     methods: {
@@ -144,8 +151,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);

+ 2 - 0
ruoyi-ui/src/main.js

@@ -27,6 +27,8 @@ import DynamicForm from "@/components/DynamicForm"
 import DynamicForms from "@/components/DynamicForms"
 import MemoranDum from "@/components/MemoranDum"
 import 'burgeon-ui/dist/styles/burgeon-ui.css';
+import BigPicture from "@/components/BigPicture";
+Vue.component('BigPicture', BigPicture)
 import BurgeonUi from 'burgeon-ui';
 Vue.use(BurgeonUi);
 // 全局方法挂载

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

@@ -20,12 +20,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>
@@ -114,12 +114,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

@@ -11,11 +11,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>
@@ -161,7 +161,10 @@
       this.init()
       this.edingelsietab()
     },
-    methods: {
+    methods: {
+      modelFn(obj, cont) {
+        this.$set(this.queryParams,obj,cont)
+      },
       handleCurrentChange() {
 
       },

+ 25 - 8
ruoyi-ui/src/views/system/surface/index.vue

@@ -8,7 +8,7 @@
           :key="index">{{item | btnConversion}}</el-button>
       </div>
       <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-        <dynamic-form :ref="item.columnName" :config="queryParams" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryData.queryList"
+        <dynamic-forms :ref="item.columnName" :config="queryParams" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryData.queryList"
           :key='index' />
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -20,14 +20,20 @@
     <div class="table_nav">
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
-        <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" v-for="(item,index) in tabData"
-          :key="index" />
+        <template v-for="(item, index) in tabData">
+          <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" :key="index">
+            <template slot-scope="scope">
+              <img class="img_icon" v-if="item.htmlType=='imageUpload'&&scope.row[scope.column.property]" @click="imgBtn(JSON.parse(scope.row[scope.column.property])[0].url)" :src="JSON.parse(scope.row[scope.column.property])[0].url" alt="">
+              <span v-else>{{ scope.row[scope.column.property] }}</span>
+            </template>
+          </el-table-column>
+        </template>
       </el-table>
       <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
         @pagination="getList" />
-    </div>
+    </div>
+    <BigPicture ref="BigPicture" :urls="pir_imgs"></BigPicture>
   </div>
-
 </template>
 
 <script>
@@ -46,7 +52,8 @@
   export default {
     name: "index",
     data() {
-      return {
+      return {
+        pir_imgs: '', // 图片链接
         tabData: [],
         multiple: true,
         single: true,
@@ -128,7 +135,11 @@
       this.init();
       this.getList();
     },
-    methods: {
+    methods: {
+      imgBtn(url) {
+        this.pir_imgs = url
+        this.$refs.BigPicture.hidden.status = true
+      },
       routerFn(id, tables) {
         if (this.queryData.viewType == 'crud') {
           this.$router.push({
@@ -287,7 +298,13 @@
 </script>
 
 
-<style lang="scss">
+<style lang="scss">
+  .img_icon{
+    width: 120px;
+    height: 120px;
+    cursor: pointer;
+    object-fit: cover;
+  }
   .table_header {
     .el-divider--horizontal {
       margin-top: 16px;

+ 230 - 175
ruoyi-ui/src/views/system/table/index.vue

@@ -5,20 +5,22 @@
       <el-divider></el-divider> -->
       <div class="imge_tab"><img src="../../../assets/images/pic_sy_ytj.png" alt="" v-if="imgShoew" ></div>
       <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-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-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>
+              <el-col :span="24" :key="index">
+                <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>
+          </el-collapse-item>
         </el-form>
       </el-collapse>
     </div>
@@ -26,25 +28,25 @@
 </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: {},
         // 查询参数
@@ -108,27 +110,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]
         }
       },
@@ -136,80 +138,85 @@
 
       },
       /** 搜索按钮操作 */
-      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 => {
@@ -284,86 +291,83 @@
               }
           })
          }
-
-
         })
-      },
-      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{
     position: relative;
@@ -442,3 +446,54 @@
     top: 5px;
   }
 </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" }
+        ],
       }
     };
   }