yrik il y a 4 ans
Parent
commit
9339522083

+ 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 {