Browse Source

页面更新

sr 4 years ago
parent
commit
de4bcba02b
2 changed files with 39 additions and 11 deletions
  1. 3 3
      ruoyi-ui/src/api/system/table.js
  2. 36 8
      ruoyi-ui/src/views/system/surface/index.vue

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

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 获取表单数据
 // 获取表单数据
 export function getQueryList(data) {
 export function getQueryList(data) {
   return request({
   return request({
-    url: '/boman-web-core/p/cs/table/getByTableName',
+    url: '/boman-web-core/p/cs/queryList',
     method: 'POST',
     method: 'POST',
     data
     data
   })
   })
@@ -11,7 +11,7 @@ export function getQueryList(data) {
 // 获取表单查询字段、按钮、表头
 // 获取表单查询字段、按钮、表头
 export function getTableQuery(data) {
 export function getTableQuery(data) {
   return request({
   return request({
-    url: '/boman-web-core/p/cs/getObject',
+    url: '/boman-web-core/p/cs/getTableQuery',
     method: 'POST',
     method: 'POST',
     data
     data
   })
   })
@@ -71,4 +71,4 @@ export function tableSubimt(data) {
      method: 'POST',
      method: 'POST',
      data
      data
    })
    })
- }
+ }

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

@@ -18,7 +18,7 @@
     <div class="table_nav">
     <div class="table_nav">
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
       <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
         <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 queryData.tableHeadList" :key="index"/>
+        <el-table-column :label="item.columnComment" align="center" :prop="item.columnName" v-for="(item,index) in tabData" :key="index"/>
       </el-table>
       </el-table>
       <pagination
       <pagination
         v-show="total>0"
         v-show="total>0"
@@ -44,6 +44,9 @@
     name: "index",
     name: "index",
     data() {
     data() {
       return {
       return {
+        tabData: [],
+        multiple: true,
+        single: true,
         open: false,
         open: false,
         // 遮罩层
         // 遮罩层
         loading: true,
         loading: true,
@@ -58,7 +61,11 @@
         form: {
         form: {
           table: 'obj_test',
           table: 'obj_test',
           objId: -1,
           objId: -1,
-          fixedData: {}
+          fixedData: {
+            condition: {
+
+            }
+          }
         },
         },
         // 查询参数
         // 查询参数
         queryParams: {
         queryParams: {
@@ -67,7 +74,11 @@
           isUi:false,
           isUi:false,
           pageSize: 10,
           pageSize: 10,
           orderBy: 'create_time desc',
           orderBy: 'create_time desc',
-          fixedData: {}
+          fixedData: {
+            condition: {
+
+            }
+          }
         }
         }
       };
       };
     },
     },
@@ -101,13 +112,24 @@
       headerBtn(item) {
       headerBtn(item) {
         switch(item) {
         switch(item) {
           case 'A': {
           case 'A': {
-            this.$router.push('/system/table')
+            this.$router.push({
+              path: '/business/table'
+            })
             return
             return
           }
           }
           case 'M': {
           case 'M': {
+            if(this.single){
+              this.msgInfo('请勾选一条信息')
+              return
+            }
+              const id = this.ids
+              this.$router.push({
+                path: '/business/table'
+              })
             return
             return
           }
           }
           case 'D': {
           case 'D': {
+
             return
             return
           }
           }
           case 'Q': {
           case 'Q': {
@@ -137,7 +159,7 @@
       },
       },
       changeFn(obj) {
       changeFn(obj) {
         for(let key in obj){
         for(let key in obj){
-          this.queryParams.fixedData[key] = obj[key]
+          this.queryParams.fixedData.condition[key] = obj[key]
         }
         }
       },
       },
       // 表单重置
       // 表单重置
@@ -145,7 +167,11 @@
         this.form = {
         this.form = {
           table: 'obj_test',
           table: 'obj_test',
           objId: '',
           objId: '',
-          fixedData: {},
+          fixedData: {
+            condition: {
+
+            }
+          },
         };
         };
         this.resetForm("form");
         this.resetForm("form");
       },
       },
@@ -154,7 +180,7 @@
       },
       },
       /** 搜索按钮操作 */
       /** 搜索按钮操作 */
       handleQuery() {
       handleQuery() {
-        this.grabFn(this.queryData.queryList,this.queryParams.fixedData)
+        this.grabFn(this.queryData.queryList,this.queryParams.fixedData.condition)
         this.getList();
         this.getList();
       },
       },
       // 抓取参数
       // 抓取参数
@@ -173,9 +199,11 @@
       },
       },
       getList() {
       getList() {
         getQueryList(this.queryParams).then(response => {
         getQueryList(this.queryParams).then(response => {
-          this.postList = response.data.rows;
           this.total = response.data.total;
           this.total = response.data.total;
+          this.tabData = response.data.tableHeadList
+          this.postList = response.data.rows;
           this.loading = false;
           this.loading = false;
+          console.log(this.postList,this.tabData,222)
         });
         });
       },
       },
       init() {
       init() {