Browse Source

Merge remote-tracking branch 'origin/master'

shiqian 4 years ago
parent
commit
f6275d8950
2 changed files with 60 additions and 37 deletions
  1. 2 2
      ruoyi-ui/src/settings.js
  2. 58 35
      ruoyi-ui/src/views/system/table/index.vue

+ 2 - 2
ruoyi-ui/src/settings.js

@@ -1,7 +1,7 @@
 module.exports = {
   title: '潜山市云数据中心',
-  urls: `http://192.168.101.11:8090`,
-  // urls: `http://192.168.101.110:8090`,
+  // urls: `http://192.168.101.11:8090`,
+  urls: `http://192.168.101.110:8090`,
   // urls: `http://192.168.101.49:8080`,
 
   // urls: ``,

+ 58 - 35
ruoyi-ui/src/views/system/table/index.vue

@@ -4,7 +4,7 @@
       <!-- <p>单表</p>
       <el-divider></el-divider> -->
       <div class="table_headerBtun" v-if="queryData.buttonList">
-        <el-button type="primary" size="small"  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>
     <!-- 内容 -->
@@ -78,31 +78,33 @@
           idList:[]
         },
         jeigneu:[],
-        jeigneutwo:[]
+        jeigneutwo:[],
+        xidugje:'保存',
+        tijeq:0
       };
     },
-    filters:{
-      btnConversion(val) {
-        switch(val){
-          case 'A':
-          return '保存';
-          case 'M':
-          return '保存';
-          case 'D':
-          return '删除';
-          case 'Q':
-          return '查询';
-          case 'S':
-          return '提交';
-          case 'U':
-          return '反提交';
-          case 'I':
-          return '导入';
-          case 'E':
-          return '导出';
-        }
-      }
-    },
+    // filters:{
+    //   btnConversion(val) {
+    //     switch(val){
+    //       case 'A':
+    //       return '保存';
+    //       case 'M':
+    //       return '保存';
+    //       case 'D':
+    //       return '删除';
+    //       case 'Q':
+    //       return '查询';
+    //       case 'S':
+    //       return '提交';
+    //       case 'U':
+    //       return '反提交';
+    //       case 'I':
+    //       return '导入';
+    //       case 'E':
+    //       return '导出';
+    //     }
+    //   }
+    // },
     mounted() {
       // this.tableZbie.fixedData.id = 0
        this.deledlid.idList = []
@@ -114,7 +116,7 @@
        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.tables)
+       this.deledlid.idList.push(this.$route.query.id)
        console.log(this.$route.query.id)
        console.log(this.tableZbie.table)
 
@@ -172,6 +174,7 @@
            this.antiSubmission()
          }else if(index == '保存'){
            // 修改
+           // this.xidugje = '保存'
            this.forme.fixedData = this.queryParams
            this.submitForm()
          }else if(index == '新增'){
@@ -180,13 +183,18 @@
              path: '/business/table',
              query: {id:-1,tables:this.forme.table},
            })
-           this.$router.go(0)
+          // this.forme.objId = "-1"
+          this.xidugje = '新增'
+          this.tableZbie.fixedData.id = -1
+          this.formy.id = '-1'
+          this.init()
          }else if(index == '返回'){
            this.$router.go(-1)
          }else if(index == '刷新'){
-           this.$router.go(0)
+           this.xidugje = '刷新'
+           this.init()
          }
-         
+
 
         console.log(this.forme)
         // this.getList();
@@ -194,16 +202,20 @@
       getList() {
 
       },
-      init() {
+      init() {
+        console.log(1243)
         getTableQuery(
           this.tableZbie
         ).then(res => {
-          let data = res.data
+          let data = res.data
+          this.queryData = {}
           this.queryData = data
           this.jeigneutwo = []
-          this.queryData.jeigneu = data.buttonList.split('')
-          console.log(this.queryData.jeigneu)
-          this.queryData.jeigneu.filter(route => {
+          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'){
@@ -244,7 +256,13 @@
           })
           this.jeigneutwo.push('刷新')
           this.jeigneutwo.push('返回')
-          console.log(this.jeigneutwo,567)
+          console.log(this.jeigneutwo,567)
+          if(this.xidugje == '刷新'){
+            if(res.code == 200){
+              this.msgSuccess("操作成功");
+            }
+          }
+
         })
       },
       tablsie(){
@@ -272,7 +290,12 @@
               addbjectSave(this.forme).then(response => {
                 this.msgSuccess("保存成功");
                 this.open = false;
-                this.$router.go(-1)
+                if(this.xidugje =="新增"){
+                   this.$router.go(-2)
+                }else{
+                  this.$router.go(-1)
+                }
+
                 // this.getList();
               });
       },