ソースを参照

Merge branch 'master' of http://192.168.101.10:13000/boman/boman-framwork

sr 4 年 前
コミット
43b01b0c5e

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

@@ -16,6 +16,16 @@ export function getObject(data) {
     data
   })
 }
+
+export function getObjectqure(data) {
+  return request({
+    url: '/boman-web-core/p/cs/getTableQuery',
+    method: 'POST',
+    data
+  })
+}
+
+
 // 获取表单tab数据
  export function geteditindeTab(data) {
    return request({

+ 1 - 1
ruoyi-ui/src/components/FlowChartShow/index.vue

@@ -215,7 +215,7 @@ export default {
     // 获取流程图信息
     getChartInfo () {
       let id = this.instanceId?this.instanceId:this.$route.query.instanceId
-      addGenflowshow()
+      addGenflowshow({instanceId:id})
         .then(res => {
           if(res.data.resultCode === 0){
             let guiStyle = res.data.data.guiStyle?JSON.parse(res.data.data.guiStyle):{}

+ 1 - 0
ruoyi-ui/src/components/StandardTable/index.vue

@@ -117,6 +117,7 @@ export default {
     flex: 1;
     overflow: hidden;
     position: relative;
+    // height: 400px !important;
     .noData{
       position:absolute;
       height: 200px;

+ 136 - 0
ruoyi-ui/src/components/StandardTabletwo/index.vue

@@ -0,0 +1,136 @@
+<template>
+  <div class="StandardTable">
+
+    <div
+      class="table"
+      v-if="showTable"
+    >
+      <Table
+        ref="table"
+        class="table"
+        :total="total"
+        :columns="columns"
+        :height = true
+        :data="data"
+        :border="border"
+        highlight-row
+        v-on="standardTableEvent"
+      >
+      </Table>
+
+
+    </div>
+    <div class="stabd">
+      <Page
+       v-if="showPage"
+       class="page"
+       :total="total"
+       show-total
+       show-sizer
+       show-elevator
+       transfer
+       :page-size="pageSize"
+       :current="currentPage"
+       :page-size-opts="pageSizeOpts"
+       v-on="standardTableEvent"
+      />
+    </div>
+
+  </div>
+</template>
+<script>
+export default {
+  name:'StandardTable',
+  props:{
+    //事件回调
+    standardTableEvent:{
+      type:Object,
+      default() {
+        return {}
+      }
+    },
+    //分页属性
+    showPage:{  //控制分页是否展示
+      type:Boolean,
+      default:true
+    },
+    total:{
+      type:Number,
+      default:0
+    },
+    currentPage:{
+      type:Number,
+      default:1
+    },
+    pageSize:{
+      type:Number,
+      default:10
+    },
+    pageSizeOpts:{
+      type:Array,
+      default () {
+        return [10,20,30,40]
+      }
+    },
+
+    //表格属性
+    showTable:{  //控制表格是否展示
+      type:Boolean,
+      default:true
+    },
+    columns:{
+      type:Array,
+      default() {
+        return [];
+      }
+    },
+    data:{
+      type:Array,
+      default() {
+        return [];
+      }
+    },
+    border:{
+      type: Boolean,
+      default: false
+    }
+  },
+  watch:{
+    data () {
+      this.$refs.table.$el.getElementsByClassName('burgeon-table-body')[0].scrollTop = 0
+    }
+  },
+  methods:{
+  }
+}
+</script>
+<style lang="scss" scoped>
+.StandardTable{
+  display: flex;
+  overflow: hidden;
+  flex-direction: column;
+  .page{
+    margin-bottom: 8px;
+  }
+
+  .table{
+    flex: 1;
+    overflow: hidden;
+    position: relative;
+    height: 220px !important;
+    .noData{
+      position:absolute;
+      height: 200px;
+      top: 50%;
+      left: 50%;
+      margin-top: -90px;
+      margin-left: -80px;
+    }
+  }
+}
+.stabd{
+  display: flex;
+  justify-content: flex-end;
+  margin-top: 20px;
+}
+</style>

+ 29 - 10
ruoyi-ui/src/components/todoProcess/index.vue

@@ -11,15 +11,16 @@
       :buttonType="false"
       @formChange="formChange"
     ></FormItemComponent>
-   <StandardTable
-     class="table"
+   <StandardTabletwo
+     class="table tabgeu"
      :currentPage="searchData.page"
      :pageSize="searchData.pageSize"
      :total="total"
      :columns="columns"
      :data="data"
      :standardTableEvent="standardTableEvent"
-   ></StandardTable>
+     style="height: 400px;"
+   ></StandardTabletwo>
     <Modal
       v-model="openControl"
       :title="modaltitle"
@@ -58,9 +59,11 @@
 <script>
 import FormItemComponent from "../FormItemComponent";
 import ItemComponent from "../ItemComponent";
-import StandardTable from "../StandardTable";
+import StandardTabletwo from "../StandardTabletwo";
 import mutipleSelectPop from "../MutipleSelectPop/index.vue";
 import FlowChartShow from "../FlowChartShow";
+// import { mapState } from "vuex";
+// import { mapMutations } from "vuex";
 import {
     addGendefini,
     addGendefiniqur,
@@ -70,7 +73,7 @@ export default {
   name: "TodoProcess",
   components: {
     FormItemComponent,
-    StandardTable,
+    StandardTabletwo,
     mutipleSelectPop,
     FlowChartShow,
 
@@ -258,6 +261,7 @@ export default {
                 },
                 on: {
                   click: () => {
+                    console.log(params.row.instanceId)
                     this.modalShow = true;
                     this.instanceId = params.row.instanceId;
                   }
@@ -351,6 +355,7 @@ export default {
     },
     ////查询
     queryLists() {
+      var that = this
       if (
         this.searchData.createTime &&
         this.searchData.createTime[0] &&
@@ -368,12 +373,19 @@ export default {
       }
       let obj = Object.assign({}, this.searchData);
       delete obj.createTime;
+      var that = this
       addGendefiniqur(obj).then(res => {
-        if (res.data.resultCode === 0) {
-          let data = res.data.data;
-          this.total = data.total;
-          this.data = data.records;
+        console.log(res.resultCode)
+        // that.data = res.data.records
+        if (res.resultCode === 0) {
+          console.log(1)
+          // let data = res.data.data;
+          this.total = res.total;
+          this.data = res.data.records;
+          console.log(res.data.records,23456)
+          // console.log(this.data,2345)
         }
+      console.log(this.data,2345)
       });
     },
     formChange(data) {
@@ -476,7 +488,11 @@ export default {
     this.getselectOption();
     this.queryLists();
   },
-  mounted() {}
+  mounted() {
+    // this.getselectOption();
+    // this.queryLists();
+    console.log(this.searchData,8765)
+  }
 };
 </script>
 <style lang="scss">
@@ -499,6 +515,9 @@ export default {
   .table {
     flex: 1;
   }
+  .tabgeu{
+    height: 400px !important;
+  }
 }
 .modalCotent {
   .burgeon-tree {

+ 9 - 12
ruoyi-ui/src/views/system/form/index.vue

@@ -31,7 +31,7 @@
           </div>
           <el-divider></el-divider>
           <el-form :model="queryParamstwoi" ref="queryForm" :inline="true" >
-            <dynamic-forms :ref="item.columnName" :config="queryParamstwoi" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryDatatao.showData"
+            <dynamic-forms :ref="item.columnName" :config="queryParamstwoi" @inputs="changeFn" :formConfig="item" v-for="(item,index) in queryDatatao.queryList"
               :key='index' />
             <el-form-item>
               <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryiu">搜索</el-button>
@@ -76,7 +76,8 @@
     geteditindeTab,
     listIndex,
     delMenutabform,
-    tableSubimt, tableSubimtanit, addbjectSave
+    tableSubimt, tableSubimtanit, addbjectSave,
+    getObjectqure
   } from '@/api/system/form.js'
 
   export default {
@@ -93,18 +94,14 @@
         activeNames: [1],
         title: '列表',
         objParams: {
-          table: 'obj_test',
+          table: '',
           fixedData: {
             id: -1
           },
           isUi:true
         },
         objParamstue:{
-          table: 'obj_test',
-          fixedData: {
-            id: -1
-          },
-          isUi:false
+          table: ''
         },
         queryData: {},
         queryDatatao:{},
@@ -186,12 +183,12 @@
       this.forme.objId = this.$route.query.id
       this.formy.id = this.$route.query.id
       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.deledlid.table = this.$route.query.tables
       this.deledlid.idList.push(this.$route.query.id)
       this.queryParamslist.table = this.$route.query.tables
-      this.objParamstue.fixedData.id = this.$route.query.id
+      // this.objParamstue.fixedData.id = this.$route.query.id
       this.init()
       this.edingelsietab()
     },
@@ -296,7 +293,7 @@
       },
       // 列表查询接口
       foremlisejuque(){
-       getObject(this.objParamstue).then(res => {
+       getObjectqure(this.objParamstue).then(res => {
          console.log(res)
          this.queryDatatao = res.data
          // let data = res.data
@@ -387,7 +384,7 @@
       },
       // 搜索列表
       handleQueryiu(){
-       for(let item of this.queryDatatao.showData){
+       for(let item of this.queryDatatao.queryList){
          // for(var i = 0 ; i < item.hrChildren.length ; i++){
            if(item.htmlType == 'checkbox'){
              this.queryParamstwoi[item.columnName] = this.$refs[item.columnName][0].config