Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

Administrator 4 жил өмнө
parent
commit
ca700937b8

+ 64 - 10
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 queryData.buttonList.split('')" :key="index" @click="handleQuery(item)">{{item | btnConversion}}</el-button>
+        <el-button type="primary" size="small"  plain v-for="(item,index) in jeigneutwo" :key="index" @click="handleQuery(item)">{{item }}</el-button>
       </div>
     </div>
     <!-- 内容 -->
@@ -76,7 +76,9 @@
         deledlid:{
           table:'',
           idList:[]
-        }
+        },
+        jeigneu:[],
+        jeigneutwo:[]
       };
     },
     filters:{
@@ -150,33 +152,41 @@
            this.queryParams.pageSize = undefined
          }
 
-         if(index == 'D'){
+         if(index == '删除'){
            //删除
            console.log(this.formy.id)
            this.handleDelete(this.deledlid)
-         }else if(index == 'S'){
+         }else if(index == '提交'){
            //提交  保存
             this.formeanti.commitData = []
             this.formy.status = 1
             this.formeanti.commitData.push(this.formy)
             console.log(this.formeanti)
            this.antiSubmission()
-         }else if(index == 'U'){
+         }else if(index == '反提交'){
            //反提交  保存
             this.formeanti.commitData = []
             this.formy.status = 2
             this.formeanti.commitData.push(this.formy)
             console.log(this.formeanti)
            this.antiSubmission()
-         }else if(index == 'M'){
+         }else if(index == '保存'){
            // 修改
            this.forme.fixedData = this.queryParams
            this.submitForm()
-         }else if(index == 'A'){
+         }else if(index == '新增'){
            //新增
-           this.forme.fixedData = this.queryParams
-           this.submitForm()
+           this.$router.push({
+             path: '/business/table',
+             query: {id:-1,tables:this.forme.table},
+           })
+           this.$router.go(0)
+         }else if(index == '返回'){
+           this.$router.go(-1)
+         }else if(index == '刷新'){
+           this.$router.go(0)
          }
+         
 
         console.log(this.forme)
         // this.getList();
@@ -190,7 +200,51 @@
         ).then(res => {
           let data = res.data
           this.queryData = data
-          console.log(this.queryData,567)
+          this.jeigneutwo = []
+          this.queryData.jeigneu = data.buttonList.split('')
+          console.log(this.queryData.jeigneu)
+          this.queryData.jeigneu.filter(route => {
+            // route.dept_id = route.dept_id.value
+            console.log(route)
+            if(route == 'A'){
+              if(this.formy.id == -1){
+                route = '保存'
+              }else{
+                route = '新增'
+              }
+             this.jeigneutwo.push(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)
         })
       },
       tablsie(){