yrik 4 年 前
コミット
00acdf0c6f

+ 10 - 1
ruoyi-ui/src/api/system/form.js

@@ -24,11 +24,20 @@ export function getObject(data) {
      data
      data
    })
    })
  }
  }
- 
+
  export function listIndex(data) {
  export function listIndex(data) {
    return request({
    return request({
      url: '/boman-web-core/p/cs/queryList',
      url: '/boman-web-core/p/cs/queryList',
      method: 'post',
      method: 'post',
      data: data
      data: data
    })
    })
+ }
+
+ // 删除菜单
+ export function delMenutabform(data) {
+   return request({
+     url: 'boman-web-core/p/cs/objectDelete',
+     method: 'POST',
+     data
+   })
  }
  }

+ 4 - 3
ruoyi-ui/src/api/system/table.js

@@ -83,9 +83,10 @@ export function tableSubimt(data) {
  }
  }
 
 
  // 删除菜单
  // 删除菜单
- export function delMenutab(id) {
+ export function delMenutab(data) {
    return request({
    return request({
-     url: 'boman-web-core/p/cs/objectDelete/' + id,
-     method: 'delete'
+     url: 'boman-web-core/p/cs/objectDelete',
+     method: 'POST',
+     data
    })
    })
  }
  }

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

@@ -1,7 +1,7 @@
 <template>
 <template>
     <el-form-item :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
     <el-form-item :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
       <!-- 输入框 -->
       <!-- 输入框 -->
-      <el-input v-if="formConfig.htmlType == 'input'" v-model="config[formConfig.columnValue]" :placeholder="'请输入'+formConfig.columnComment"
+      <el-input v-if="formConfig.htmlType == 'input'" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
         clearable @keyup.enter.native="handleQuery" />
         clearable @keyup.enter.native="handleQuery" />
       <!-- 多行输入框 -->
       <!-- 多行输入框 -->
       <el-input v-if="formConfig.htmlType == 'textarea'" type="textarea" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
       <el-input v-if="formConfig.htmlType == 'textarea'" type="textarea" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
@@ -137,7 +137,7 @@
         console.log(file);
         console.log(file);
       },
       },
       handleQuery() {
       handleQuery() {
-        
+
         this.$emit('btns')
         this.$emit('btns')
       },
       },
       handleCheckedCitiesChange(value){
       handleCheckedCitiesChange(value){

+ 29 - 55
ruoyi-ui/src/views/system/editing/index.vue

@@ -27,55 +27,7 @@
            </el-row>
            </el-row>
          </el-form>
          </el-form>
        </el-collapse-item>
        </el-collapse-item>
-       <!-- 扩展功能 -->
-       <!-- <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
-         <el-form :model="queryParams" ref="queryForm" :inline="true"  >
-           <el-row :gutter="0">
-             <el-col :span="12" v-for="(item,index) in 2" :key="index">
-               <el-form-item :label="labletit" prop="dictName" class="textarea_et">
-                <el-input
-               v-model="queryParams.dictName"
-               placeholder="请输入字典名称"
-               clearable
-               type="textarea"
-               style="width: 100%; height: 100%;"
-               @keyup.enter.native="handleQuery"
-               />
-              </el-form-item>
-           </el-col>
-           <el-col :span="24" v-for="(item,index) in 1" :key="index">
-               <el-form-item :label="labletit" prop="dictName" class="textarea_ety">
-                <el-input
-               v-model="queryParams.dictName"
-               placeholder="请输入字典名称"
-               clearable
-               type="textarea"
-               style="width: 100%; height: 100%;"
-               @keyup.enter.native="handleQuery"
-               />
-              </el-form-item>
-           </el-col>
-           </el-row>
-         </el-form>
-       </el-collapse-item> -->
-       <!-- 服务程序 -->
-       <!-- <el-collapse-item :title="title" :name="index" v-for="(item,index) in 1" :key="index" class="eitde">
-         <el-form :model="queryParams" ref="queryForm" :inline="true"  >
-           <el-row :gutter="0">
-            <el-col :span="12" v-for="(item,index) in 8" :key="index">
-                <el-form-item label="取消提交程序:" prop="dictName" class="textarea_etyju">
-                 <el-input
-                v-model="queryParams.dictName"
-                placeholder="请输入字典名称"
-                clearable
-                style="width: 100%;"
-                @keyup.enter.native="handleQuery"
-                />
-               </el-form-item>
-            </el-col>
-           </el-row>
-         </el-form>
-       </el-collapse-item> -->
+
 
 
      </el-collapse>
      </el-collapse>
     </div>
     </div>
@@ -128,12 +80,18 @@
             formy:{
             formy:{
               id:0,
               id:0,
               status:1
               status:1
+            },
+            // 删除参数
+            deledlid:{
+              table:'',
+              idList:[]
             }
             }
         };
         };
       },
       },
       mounted() {
       mounted() {
         // this.edingelsie()
         // this.edingelsie()
         // button
         // button
+        this.deledlid.idList = []
         this.formeanti.table = this.$route.query.tables
         this.formeanti.table = this.$route.query.tables
         // this.formeanti.id = this.$route.query.id
         // this.formeanti.id = this.$route.query.id
         this.forme.table = this.$route.query.tables
         this.forme.table = this.$route.query.tables
@@ -143,8 +101,10 @@
         this.tableZbie.fixedData.id = this.$route.query.id
         this.tableZbie.fixedData.id = this.$route.query.id
         this.formy.id = this.$route.query.id
         this.formy.id = this.$route.query.id
         this.tableZbietabg.table = this.$route.query.tables
         this.tableZbietabg.table = this.$route.query.tables
-        console.log(this.forme.objId)
-        this.init()
+        this.deledlid.table = this.$route.query.tables
+        this.deledlid.idList.push(this.$route.query.id)
+        console.log(this.deledlid)
+
         // tab
         // tab
         this.edingelsietab()
         this.edingelsietab()
       },
       },
@@ -181,7 +141,7 @@
          this.forme.table = this.tabldie[index].tableName
          this.forme.table = this.tabldie[index].tableName
 
 
          this.tableZbie.table = this.tabldie[index].tableName
          this.tableZbie.table = this.tabldie[index].tableName
-         this.edingelsie()
+         // this.edingelsie()
          this.init()
          this.init()
         },
         },
         // 按钮
         // 按钮
@@ -210,6 +170,14 @@
          console.log(4566)
          console.log(4566)
          geteditindeTab(this.tableZbietabg).then(response => {
          geteditindeTab(this.tableZbietabg).then(response => {
            this.tabldie = response.data.ref
            this.tabldie = response.data.ref
+           if(this.tabldie.length !==0){
+             this.init()
+           }else {
+             this.msgSuccess("暂无数据");
+
+             this.$router.go(-1)
+           }
+
            // this.msgSuccess("反提交成功");
            // this.msgSuccess("反提交成功");
            // this.open = false;
            // this.open = false;
            // this.getList();
            // this.getList();
@@ -222,12 +190,14 @@
        },
        },
        handleQuery(index) {
        handleQuery(index) {
           console.log(index,4)
           console.log(index,4)
-          for(let item of this.taleLisst){
+          for(let item of this.queryData.showData){
             for(var i = 0 ; i < item.hrChildren.length ; i++){
             for(var i = 0 ; i < item.hrChildren.length ; i++){
               if(item.hrChildren[i].htmlType == 'checkbox' || item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
               if(item.hrChildren[i].htmlType == 'checkbox' || item.hrChildren[i].htmlType == 'imageUpload' || item.hrChildren[i].htmlType == 'fileUpload'){
                 this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
                 this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config
+                console.log(this.$refs[item.hrChildren[i].columnName][0].config)
               } else{
               } else{
                 this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
                 this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+                console.log(this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName])
               }
               }
             }
             }
           }
           }
@@ -240,7 +210,7 @@
           }
           }
           if(index == 'D'){
           if(index == 'D'){
             //删除
             //删除
-            this.handleDelete(this.formy.id)
+            this.handleDelete(this.deledlid)
           }else if(index == 'S'){
           }else if(index == 'S'){
             //提交  保存
             //提交  保存
              // this.formeanti.table = 'obj_test'
              // this.formeanti.table = 'obj_test'
@@ -281,6 +251,7 @@
               addbjectSave(this.forme).then(response => {
               addbjectSave(this.forme).then(response => {
                 this.msgSuccess("保存成功");
                 this.msgSuccess("保存成功");
                 this.open = false;
                 this.open = false;
+                this.$router.go(-1)
                 // this.getList();
                 // this.getList();
               });
               });
       },
       },
@@ -290,6 +261,7 @@
           // 提交
           // 提交
           tableSubimt(this.formeanti).then(response => {
           tableSubimt(this.formeanti).then(response => {
             this.msgSuccess("提交成功");
             this.msgSuccess("提交成功");
+            this.$router.go(-1)
             // this.open = false;
             // this.open = false;
             // this.getList();
             // this.getList();
           });
           });
@@ -297,6 +269,7 @@
           // 反提交
           // 反提交
           tableSubimtanit(this.formeanti).then(response => {
           tableSubimtanit(this.formeanti).then(response => {
             this.msgSuccess("反提交成功");
             this.msgSuccess("反提交成功");
+            this.$router.go(-1)
             // this.open = false;
             // this.open = false;
             // this.getList();
             // this.getList();
           });
           });
@@ -304,7 +277,7 @@
       },
       },
       //删除
       //删除
       handleDelete(index) {
       handleDelete(index) {
-        this.$confirm('是否确认删除名称为"' + index + '"的数据项?', "警告", {
+        this.$confirm('是否确认删除名称为"' + index.table + '"的数据项?', "警告", {
             confirmButtonText: "确定",
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             cancelButtonText: "取消",
             type: "warning"
             type: "warning"
@@ -313,6 +286,7 @@
           }).then(() => {
           }).then(() => {
             // this.getList();
             // this.getList();
             this.msgSuccess("删除成功");
             this.msgSuccess("删除成功");
+            this.$router.go(-1)
           })
           })
       }
       }
       },
       },

+ 23 - 2
ruoyi-ui/src/views/system/form/index.vue

@@ -55,7 +55,8 @@
     getTableQuery,
     getTableQuery,
     getObject,
     getObject,
     geteditindeTab,
     geteditindeTab,
-    listIndex
+    listIndex,
+    delMenutabform
   } from '@/api/system/form.js'
   } from '@/api/system/form.js'
 
 
   export default {
   export default {
@@ -110,6 +111,11 @@
         formy:{
         formy:{
           id:0,
           id:0,
           status:1
           status:1
+        },
+        // 删除参数
+        deledlid:{
+          table:'',
+          idList:[]
         }
         }
       };
       };
     },
     },
@@ -143,6 +149,8 @@
       this.tableZbietabg.table = this.$route.query.tables
       this.tableZbietabg.table = this.$route.query.tables
       this.objParams.table = this.$route.query.tables
       this.objParams.table = this.$route.query.tables
       this.objParams.fixedData.id = this.$route.query.id
       this.objParams.fixedData.id = this.$route.query.id
+      this.deledlid.table = this.$route.query.tables
+      this.deledlid.idList.push(this.$route.query.id)
       this.init()
       this.init()
       this.edingelsietab()
       this.edingelsietab()
     },
     },
@@ -249,7 +257,7 @@
          console.log(this.queryParams)
          console.log(this.queryParams)
          if(index == 'D'){
          if(index == 'D'){
            //删除
            //删除
-           this.handleDelete(index)
+           this.handleDelete(this.deledlid)
          }else if(index == 'S'){
          }else if(index == 'S'){
            //提交  保存
            //提交  保存
             // this.formeanti.table = 'obj_test'
             // this.formeanti.table = 'obj_test'
@@ -311,6 +319,19 @@
          });
          });
        }
        }
      },
      },
+     //删除
+     handleDelete(index) {
+       this.$confirm('是否确认删除名称为"' + index.table + '"的数据项?', "警告", {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning"
+         }).then(function() {
+           return delMenutab(index);
+         }).then(() => {
+           // this.getList();
+           this.msgSuccess("删除成功");
+         })
+     }
 
 
     },
     },
   };
   };

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

@@ -157,7 +157,7 @@
               const id = this.ids.join(',')
               const id = this.ids.join(',')
               // id = id.join(',')
               // id = id.join(',')
               this.$router.push({
               this.$router.push({
-                path: '/business/form',
+                path: '/business/editing',
                 query: {
                 query: {
                   id,
                   id,
                   tables: this.tabName,
                   tables: this.tabName,

+ 10 - 3
ruoyi-ui/src/views/system/table/index.vue

@@ -71,6 +71,11 @@
         formy:{
         formy:{
           id:0,
           id:0,
           status:1
           status:1
+        },
+        // 删除参数
+        deledlid:{
+          table:'',
+          idList:[]
         }
         }
       };
       };
     },
     },
@@ -98,7 +103,7 @@
     },
     },
     mounted() {
     mounted() {
       // this.tableZbie.fixedData.id = 0
       // this.tableZbie.fixedData.id = 0
-
+       this.deledlid.idList = []
        this.formeanti.table = this.$route.query.tables
        this.formeanti.table = this.$route.query.tables
        // this.formeanti.id = this.$route.query.id
        // this.formeanti.id = this.$route.query.id
        this.forme.table = this.$route.query.tables
        this.forme.table = this.$route.query.tables
@@ -106,6 +111,8 @@
        this.tableZbie.table = this.$route.query.tables
        this.tableZbie.table = this.$route.query.tables
        this.tableZbie.fixedData.id = this.$route.query.id
        this.tableZbie.fixedData.id = this.$route.query.id
        this.formy.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.tables)
        console.log(this.$route.query.id)
        console.log(this.$route.query.id)
        console.log(this.tableZbie.table)
        console.log(this.tableZbie.table)
 
 
@@ -136,14 +143,14 @@
          console.log(this.queryParams)
          console.log(this.queryParams)
          if(this.queryParams.pageNum !== undefined){
          if(this.queryParams.pageNum !== undefined){
            this.queryParams.pageNum = undefined
            this.queryParams.pageNum = undefined
-         } 
+         }
          if(this.queryParams.pageSize !== undefined){
          if(this.queryParams.pageSize !== undefined){
            this.queryParams.pageSize = undefined
            this.queryParams.pageSize = undefined
          }
          }
          if(index == 'D'){
          if(index == 'D'){
            //删除
            //删除
            console.log(this.formy.id)
            console.log(this.formy.id)
-           this.handleDelete(this.formy.id)
+           this.handleDelete(this.deledlid)
          }else if(index == 'S'){
          }else if(index == 'S'){
            //提交  保存
            //提交  保存
             this.formeanti.commitData = []
             this.formeanti.commitData = []