Browse Source

Merge branch 'leng_dev' of https://git.pig4cloud.com/pigx/pigx-ui into leng_dev

smallwei 5 years ago
parent
commit
5343438a91
67 changed files with 1726 additions and 1812 deletions
  1. 1 1
      package.json
  2. 1 1
      public/cdn/avue/index.css
  3. 3 3
      public/cdn/avue/index.js
  4. 1 0
      src/const/crud/activiti/leave-bill.js
  5. 1 0
      src/const/crud/activiti/task.js
  6. 1 0
      src/const/crud/admin/client.js
  7. 2 0
      src/const/crud/admin/dict.js
  8. 1 0
      src/const/crud/admin/log.js
  9. 1 0
      src/const/crud/admin/role.js
  10. 1 0
      src/const/crud/admin/sys-file.js
  11. 1 1
      src/const/crud/admin/sys-public-param.js
  12. 1 0
      src/const/crud/admin/sys-social-details.js
  13. 1 0
      src/const/crud/admin/tenant.js
  14. 1 0
      src/const/crud/admin/token.js
  15. 1 0
      src/const/crud/admin/user.js
  16. 1 0
      src/const/crud/daemon/execution-log.js
  17. 1 0
      src/const/crud/daemon/status-trace-log.js
  18. 1 0
      src/const/crud/daemon/sys-job-log.js
  19. 2 0
      src/const/crud/daemon/sys-job.js
  20. 1 0
      src/const/crud/gen/form.js
  21. 1 0
      src/const/crud/gen/gen.js
  22. 1 0
      src/const/crud/mp/wxaccount.js
  23. 1 0
      src/const/crud/mp/wxaccountfans.js
  24. 1 0
      src/const/crud/mp/wxfansmsg.js
  25. 1 0
      src/const/crud/mp/wxmenu.js
  26. 1 0
      src/const/crud/pay/paychannel.js
  27. 1 0
      src/const/crud/pay/paygoodsorder.js
  28. 1 0
      src/const/crud/pay/paynotifyrecord.js
  29. 1 0
      src/const/crud/pay/paytradeorder.js
  30. 55 60
      src/page/index/top/top-lock.vue
  31. 1 1
      src/page/index/top/top-setting.vue
  32. 71 77
      src/page/lock/index.vue
  33. 1 1
      src/page/login/codelogin.vue
  34. 1 214
      src/page/login/index.vue
  35. 1 2
      src/page/login/userlogin.vue
  36. 5 5
      src/page/wel.vue
  37. 2 1
      src/store/modules/common.js
  38. 219 0
      src/styles/login.scss
  39. 108 105
      src/views/activiti/index.vue
  40. 14 54
      src/views/activiti/leave.vue
  41. 92 111
      src/views/activiti/process.vue
  42. 82 77
      src/views/activiti/task.vue
  43. 92 89
      src/views/admin/client/index.vue
  44. 131 146
      src/views/admin/dict/index.vue
  45. 10 4
      src/views/admin/file/index.vue
  46. 11 12
      src/views/admin/log/index.vue
  47. 86 101
      src/views/admin/param/index.vue
  48. 13 4
      src/views/admin/role/index.vue
  49. 82 82
      src/views/admin/social/index.vue
  50. 81 109
      src/views/admin/tenant/index.vue
  51. 11 16
      src/views/admin/token/index.vue
  52. 171 183
      src/views/admin/user/index.vue
  53. 9 11
      src/views/daemon/execution-log/index.vue
  54. 10 17
      src/views/daemon/job-log/index.vue
  55. 10 1
      src/views/daemon/job-manage/index.vue
  56. 61 56
      src/views/daemon/job-manage/job-log.vue
  57. 78 108
      src/views/daemon/status-trace-log/index.vue
  58. 8 0
      src/views/gen/datasource.vue
  59. 13 17
      src/views/gen/form.vue
  60. 8 0
      src/views/gen/index.vue
  61. 8 1
      src/views/mp/wxaccount/index.vue
  62. 8 3
      src/views/mp/wxaccountfans/index.vue
  63. 10 7
      src/views/mp/wxfansmsg/index.vue
  64. 10 7
      src/views/pay/goods/index.vue
  65. 97 100
      src/views/pay/notify/index.vue
  66. 10 4
      src/views/pay/orders/index.vue
  67. 13 20
      src/views/pay/paychannel/index.vue

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pigx-ui",
-  "version": "3.5.0",
+  "version": "3.6.0",
   "private": true,
   "scripts": {
     "pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",

File diff suppressed because it is too large
+ 1 - 1
public/cdn/avue/index.css


File diff suppressed because it is too large
+ 3 - 3
public/cdn/avue/index.js


+ 1 - 0
src/const/crud/activiti/leave-bill.js

@@ -25,6 +25,7 @@ export const tableOption = {
   editBtn: false,
   delBtn: false,
   addBtn: false,
+  searchShow: false,
   menuType: 'menu',
   column: [
     {

+ 1 - 0
src/const/crud/activiti/task.js

@@ -24,6 +24,7 @@ export const tableOption = {
   editBtn: false,
   delBtn: false,
   addBtn: false,
+  searchShow: false,
   menuType: 'menu',
   column: [
     {

+ 1 - 0
src/const/crud/admin/client.js

@@ -31,6 +31,7 @@ export const tableOption = {
   stripe: true,
   menuAlign: 'center',
   align: 'center',
+  searchShow: false,
   viewBtn: true,
   column: [{
     width: 150,

+ 2 - 0
src/const/crud/admin/dict.js

@@ -23,11 +23,13 @@ export const tableOption = {
   align: 'center',
   refreshBtn: false,
   showClomnuBtn: false,
+  searchShow: false,
   searchSize: 'mini',
   column: [{
     label: '类型',
     prop: 'type',
     'search': true,
+    editDisabled: true,
     rules: [{
       required: true,
       message: '请输入字典类型',

+ 1 - 0
src/const/crud/admin/log.js

@@ -25,6 +25,7 @@ export const tableOption = {
   refreshBtn: true,
   showClomnuBtn: false,
   searchSize: 'mini',
+  searchShow: false,
   addBtn: false,
   editBtn: false,
   viewBtn: true,

+ 1 - 0
src/const/crud/admin/role.js

@@ -21,6 +21,7 @@ export const tableOption = {
   indexLabel: '序号',
   stripe: true,
   menuAlign: 'center',
+  searchShow: false,
   editBtn: false,
   delBtn: false,
   align: 'center',

+ 1 - 0
src/const/crud/admin/sys-file.js

@@ -23,6 +23,7 @@ export const tableOption = {
   menuAlign: 'center',
   align: 'center',
   viewBtn:false,
+  searchShow: false,
   editBtn:false,
   saveBtn: false,
   addBtn: true,

+ 1 - 1
src/const/crud/admin/sys-public-param.js

@@ -17,7 +17,7 @@
 
 import { rule } from "@/util/validateRules";
 export const tableOption = {
-  // 省略 ...
+  searchShow: false,
   column: [
     {
       label: '名称',

+ 1 - 0
src/const/crud/admin/sys-social-details.js

@@ -23,6 +23,7 @@ export const tableOption = {
   menuAlign: 'center',
   align: 'center',
   viewBtn: true,
+  searchShow: false,
   labelWidth: 120,
   column: [{
     label: 'ID',

+ 1 - 0
src/const/crud/admin/tenant.js

@@ -21,6 +21,7 @@ export const tableOption = {
   indexLabel: '序号',
   stripe: true,
   menuAlign: 'center',
+  searchShow: false,
   align: 'center',
   column: [
     {

+ 1 - 0
src/const/crud/admin/token.js

@@ -25,6 +25,7 @@ export const tableOption = {
   viewBtn: true,
   addBtn: false,
   editBtn: false,
+  searchShow: false,
   column: [{
     label: '用户ID',
     prop: 'user_id',

+ 1 - 0
src/const/crud/admin/user.js

@@ -34,6 +34,7 @@ export const tableOption = {
   indexLabel: '序号',
   stripe: true,
   menuAlign: 'center',
+  searchShow: false,
   editBtn: false,
   delBtn: false,
   align: 'center',

+ 1 - 0
src/const/crud/daemon/execution-log.js

@@ -33,6 +33,7 @@ export const tableOption = {
   stripe: true,
   menuAlign: 'center',
   align: 'center',
+  searchShow: false,
   editBtn: false,
   addBtn: false,
   viewBtn: true,

+ 1 - 0
src/const/crud/daemon/status-trace-log.js

@@ -38,6 +38,7 @@ export const tableOption = {
   align: 'center',
   editBtn: false,
   delBtn: false,
+  searchShow: false,
   addBtn: false,
   viewBtn: true,
   column: [{

+ 1 - 0
src/const/crud/daemon/sys-job-log.js

@@ -10,6 +10,7 @@ export const tableOption = {
   filterBtn: false,
   editBtn: false,
   delBtn: false,
+  searchShow: false,
   addBtn: false,
   column: [
     {

+ 2 - 0
src/const/crud/daemon/sys-job.js

@@ -13,6 +13,7 @@ export const tableOption = {
   editBtn: false,
   delBtn: false,
   addBtn: false,
+  searchShow: false,
   dialogWidth: '85%',
   labelWidth: 130,
   dialogHeight: '78%',
@@ -243,6 +244,7 @@ export const tableLogOption = {
   editBtn: false,
   delBtn: false,
   addBtn: false,
+  searchShow: false,
   columnBtn: false,
   column: [
     {

+ 1 - 0
src/const/crud/gen/form.js

@@ -25,6 +25,7 @@ export const tableOption = {
   viewBtn: true,
   editBtn: false,
   addBtn: false,
+  searchShow: false,
   column: [
     {
       label: 'ID',

+ 1 - 0
src/const/crud/gen/gen.js

@@ -25,6 +25,7 @@ export const tableOption = {
   addBtn: false,
   editBtn: false,
   delBtn: false,
+  searchShow: false,
   column: [{
     label: '表名称',
     prop: 'tableName',

+ 1 - 0
src/const/crud/mp/wxaccount.js

@@ -22,6 +22,7 @@ export const tableOption = {
   stripe: true,
   menuAlign: 'center',
   align: 'center',
+  searchShow: false,
   column: [
     {
       label: '主键',

+ 1 - 0
src/const/crud/mp/wxaccountfans.js

@@ -25,6 +25,7 @@ export const tableOption = {
   addBtn: false,
   editBtn: false,
   align: 'center',
+  searchShow: false,
   column: [
     {
       label: '主键',

+ 1 - 0
src/const/crud/mp/wxfansmsg.js

@@ -24,6 +24,7 @@ export const tableOption = {
   viewBtn: true,
   addBtn: false,
   editBtn: false,
+  searchShow: false,
   align: 'center',
   column: [
     {

+ 1 - 0
src/const/crud/mp/wxmenu.js

@@ -21,6 +21,7 @@ export const tableOption = {
   indexLabel: '序号',
   stripe: true,
   menuAlign: 'center',
+  searchShow: false,
   align: 'center',
   column: [
 	  {

+ 1 - 0
src/const/crud/pay/paychannel.js

@@ -23,6 +23,7 @@ export const tableOption = {
   menuAlign: 'center',
   align: 'center',
   viewBtn: true,
+  searchShow: false,
   column: [
     {
       label: '主键',

+ 1 - 0
src/const/crud/pay/paygoodsorder.js

@@ -23,6 +23,7 @@ export const tableOption = {
   menuAlign: 'center',
   viewBtn: true,
   align: 'center',
+  searchShow: false,
   column: [
     {
       label: 'ID',

+ 1 - 0
src/const/crud/pay/paynotifyrecord.js

@@ -23,6 +23,7 @@ export const tableOption = {
   menuAlign: 'center',
   align: 'center',
   viewBtn: true,
+  searchShow: false,
   column: [
     {
       label: 'ID',

+ 1 - 0
src/const/crud/pay/paytradeorder.js

@@ -22,6 +22,7 @@ export const tableOption = {
   stripe: true,
   menuAlign: 'center',
   align: 'center',
+  searchShow: false,
   column: [
     {
       label: '订单号',

+ 55 - 60
src/page/index/top/top-lock.vue

@@ -1,76 +1,71 @@
 <template>
   <span>
-    <i
-      class="icon-bofangqi-suoping"
-      @click="handleLock"/>
-    <el-dialog
-      :visible.sync="box"
-      title="设置锁屏密码"
-      width="30%"
-      append-to-body>
-      <el-form
-        ref="form"
-        :model="form"
-        label-width="80px">
-        <el-form-item
-          :rules="[{ required: true, message: '锁屏密码不能为空'}]"
-          label="锁屏密码"
-          prop="passwd">
-          <el-input
-            v-model="form.passwd"
-            placeholder="请输入锁屏密码"/>
+    <i  class="icon-bofangqi-suoping"
+       @click="handleLock"></i>
+    <el-dialog title="设置锁屏密码"
+               :visible.sync="box"
+               width="30%"
+               append-to-body>
+      <el-form :model="form"
+               ref="form"
+               label-width="80px">
+        <el-form-item label="锁屏密码"
+                      prop="passwd"
+                      :rules="[{ required: true, message: '锁屏密码不能为空'}]">
+          <el-input v-model="form.passwd"
+                    placeholder="请输入锁屏密码"></el-input>
         </el-form-item>
       </el-form>
-      <span
-        slot="footer"
-        class="dialog-footer">
-        <el-button
-          type="primary"
-          @click="handleSetLock">确 定</el-button>
+      <span slot="footer"
+            class="dialog-footer">
+        <el-button type="primary"
+                   @click="handleSetLock">确 定</el-button>
       </span>
     </el-dialog>
   </span>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-export default {
-  name: 'TopLock',
-  data() {
-    return {
-      box: false,
-      form: {
-        passwd: ''
-      }
-    }
-  },
-  created() {},
-  mounted() {},
-  computed: {
-    ...mapGetters(['lockPasswd'])
-  },
-  methods: {
-    handleSetLock() {
-      this.$refs['form'].validate(valid => {
-        if (valid) {
-          this.$store.commit('SET_LOCK_PASSWD', this.form.passwd)
-          this.handleLock()
+  import { validatenull } from "@/util/validate";
+  import { mapGetters } from "vuex";
+  export default {
+    name: "top-lock",
+    data() {
+      return {
+        box: false,
+        form: {
+          passwd: ""
         }
-      })
+      };
+    },
+    created() {},
+    mounted() {},
+    computed: {
+      ...mapGetters(["lockPasswd"])
     },
-    handleLock() {
-      if (this.validatenull(this.lockPasswd)) {
-        this.box = true
-        return
+    props: [],
+    methods: {
+      handleSetLock() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            this.$store.commit("SET_LOCK_PASSWD", this.form.passwd);
+            this.handleLock();
+          }
+        });
+      },
+      handleLock() {
+        if (validatenull(this.lockPasswd)) {
+          this.box = true;
+          return;
+        }
+        this.$store.commit("SET_LOCK");
+        setTimeout(() => {
+          this.$router.push({ path: "/lock" });
+        }, 100);
       }
-      this.$store.commit('SET_LOCK')
-      setTimeout(() => {
-        this.$router.push({ path: '/lock' })
-      }, 100)
-    }
-  },
-  components: {}
-}
+    },
+    components: {}
+  };
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/page/index/top/top-setting.vue

@@ -9,7 +9,7 @@
       class="setting__content">
       <div class="setting__header">版权信息</div>
       <div class="setting__body setting__about">
-        <p>Version:PigX 3.5.0</p>
+        <p>Version:PigX 3.6.0</p>
         <p>Copyright: Pig4Cloud ©2018-2025</p>
       </div>
       <div class="setting__header">设置

+ 71 - 77
src/page/lock/index.vue

@@ -1,24 +1,20 @@
 <template>
-  <div class="lock-container pull-height">
+  <div class="lock-container">
     <div class="lock-form animated bounceInDown">
-      <div
-        :class="{'shake':passwdError,'bounceOut':pass}"
-        class="animated">
-        <h3 class="title">{{ userInfo.username }}</h3>
-        <el-input
-          v-model="passwd"
-          placeholder="请输入登录密码"
-          type="password"
-          class="input-with-select animated"
-          @keyup.enter.native="handleLogin">
-          <el-button
-            slot="append"
-            icon="icon-bofangqi-suoping"
-            @click="handleLogin"/>
-          <el-button
-            slot="append"
-            icon="icon-tuichu"
-            @click="handleLogout"/>
+      <div class="animated"
+           :class="{'shake':passwdError,'bounceOut':pass}">
+        <h3 class="title">{{userInfo.username}}</h3>
+        <el-input placeholder="请输入登录密码"
+                  type="password"
+                  class="input-with-select animated"
+                  v-model="passwd"
+                  @keyup.enter.native="handleLogin">
+          <el-button slot="append"
+                     icon="icon-bofangqi-suoping"
+                     @click="handleLogin"></el-button>
+          <el-button slot="append"
+                     icon="icon-tuichu"
+                     @click="handleLogout"></el-button>
         </el-input>
       </div>
 
@@ -26,88 +22,86 @@
   </div>
 </template>
 <script>
-import { mapGetters, mapState } from 'vuex'
-
-export default {
-  name: 'Lock',
-  data() {
-    return {
-      passwd: '',
-      passwdError: false,
-      pass: false
-    }
-  },
-  created() {
-  },
-  mounted() {
-  },
-  computed: {
-    ...mapState({
-      userInfo: state => state.user.userInfo
-    }),
-    ...mapGetters(['tag', 'lockPasswd'])
-  },
-  methods: {
-    handleLogout() {
-      this.$confirm('是否退出系统, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$store.dispatch('LogOut').then(() => {
-          this.$router.push({ path: '/login' })
-        })
-      })
+  import { mapGetters, mapState } from "vuex";
+  export default {
+    name: "lock",
+    data() {
+      return {
+        passwd: "",
+        passwdError: false,
+        pass: false
+      };
+    },
+    created() {},
+    mounted() {},
+    computed: {
+      ...mapState({
+        userInfo: state => state.user.userInfo
+      }),
+      ...mapGetters(["tag", "lockPasswd"])
     },
-    handleLogin() {
-      if (this.passwd != this.lockPasswd) {
-        this.passwd = ''
-        this.$message({
-          message: '解锁密码错误,请重新输入',
-          type: 'error'
-        })
-        this.passwdError = true
+    props: [],
+    methods: {
+      handleLogout() {
+        this.$confirm("是否退出系统, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$store.dispatch("LogOut").then(() => {
+            this.$router.push({ path: "/login" });
+          });
+        });
+      },
+      handleLogin() {
+        if (this.passwd != this.lockPasswd) {
+          this.passwd = "";
+          this.$message({
+            message: "解锁密码错误,请重新输入",
+            type: "error"
+          });
+          this.passwdError = true;
+          setTimeout(() => {
+            this.passwdError = false;
+          }, 1000);
+          return;
+        }
+        this.pass = true;
         setTimeout(() => {
-          this.passwdError = false
-        }, 1000)
-        return
+          this.$store.commit("CLEAR_LOCK");
+          this.$router.push({
+            path: this.$router.$avueRouter.getPath({ src: this.tag.value })
+          });
+        }, 1000);
       }
-      this.pass = true
-      setTimeout(() => {
-        this.$store.commit('CLEAR_LOCK')
-        this.$router.push({ path: this.$router.$avueRouter.getPath({ src: this.tag.value }) })
-      }, 1000)
-    }
-  },
-  components: {}
-}
+    },
+    components: {}
+  };
 </script>
 
 <style lang="scss">
   .lock-container {
+    height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
-
     .title {
+      text-align: center;
       margin-bottom: 8px;
-      color: #333;
     }
   }
-
   .lock-container::before {
     z-index: -999;
-    content: '';
+    content: "";
     position: absolute;
     left: 0;
     top: 0;
     width: 100%;
     height: 100%;
-    background-image: url('/img/login.png');
+    background-image: url("/img/bg/login.png");
     background-size: cover;
   }
-
   .lock-form {
     width: 300px;
   }

+ 1 - 1
src/page/login/codelogin.vue

@@ -110,7 +110,7 @@ export default {
       const time = setInterval(() => {
         this.msgTime--
         this.msgText = MSGSCUCCESS.replace('${time}', this.msgTime)
-        if (this.msgTime == 0) {
+        if (this.msgTime === 0) {
           this.msgTime = MSGTIME
           this.msgText = MSGINIT
           this.msgKey = false

+ 1 - 214
src/page/login/index.vue

@@ -146,218 +146,5 @@ export default {
 </script>
 
 <style lang="scss">
-.login-copyright {
-  color: #999;
-  width: 100%;
-  position: fixed;
-  bottom: 30px;
-  text-align: center;
-}
-.login-container {
-  background-color: #f0f2f5;
-  display: flex;
-  align-items: center;
-  position: relative;
-  width: 100%;
-  height: 100%;
-  margin: 0 auto;
-  // animation: animate-cloud 20s linear infinite;
-}
-
-.login-tip {
-  color: #409eff;
-  text-align: center;
-  font-weight: 700;
-  font-size: 16px;
-}
-.login-logo {
-  overflow: hidden;
-  width: 110px;
-  height: 110px;
-  margin: -50px auto 20px auto;
-  border-radius: 50%;
-  -webkit-box-shadow: 0 4px 40px rgba(0, 0, 0, 0.07);
-  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.07);
-  padding: 10px;
-  background-color: #fff;
-  z-index: 1;
-  position: relative;
-  box-sizing: border-box;
-  padding: 20px;
-  img {
-    width: 100%;
-  }
-}
-.login-weaper {
-  position: relative;
-  margin: 0 auto;
-  width: 380px;
-  padding: 0 40px;
-  box-sizing: border-box;
-  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
-  background-color: #fff;
-  border-radius: 3px;
-}
-
-.login-left,
-.login-border {
-  padding: 20px 0 40px 0;
-  position: relative;
-  align-items: center;
-  display: flex;
-}
-
-.login-left {
-  border-top-left-radius: 5px;
-  border-bottom-left-radius: 5px;
-  justify-content: center;
-  flex-direction: column;
-  background-color: #409eff;
-  color: #fff;
-  float: left;
-  width: 50%;
-  position: relative;
-}
-
-.login-left .img {
-  width: 140px;
-}
-
-.login-left .title {
-  margin-top: 60px;
-  text-align: center;
-  color: #fff;
-  font-weight: 300;
-  letter-spacing: 2px;
-  font-size: 25px;
-}
-
-.login-border {
-  border-left: none;
-  border-top-right-radius: 5px;
-  border-bottom-right-radius: 5px;
-  color: #fff;
-  background-color: #fff;
-  width: 100%;
-  float: left;
-  box-sizing: border-box;
-}
-
-.login-main {
-  margin: 0 auto;
-  width: 100%;
-  box-sizing: border-box;
-}
-
-.login-main > h3 {
-  margin-bottom: 20px;
-}
-
-.login-main > p {
-  color: #76838f;
-}
-
-.login-title {
-  color: #333;
-  margin-bottom: 30px;
-  font-weight: 500;
-  font-size: 22px;
-  text-align: center;
-  letter-spacing: 4px;
-}
-
-.login-select {
-  input {
-    color: #333;
-    font-size: 14px;
-    font-weight: 400;
-    border: none;
-    text-align: center;
-  }
-}
-
-.login-menu {
-  margin-top: 40px;
-  width: 100%;
-  text-align: center;
-
-  a {
-    color: #409eff;
-    font-weight: 700;
-    font-size: 12px;
-    margin: 0px 8px;
-  }
-}
-
-.login-submit {
-  width: 100%;
-  height: 45px;
-  font-size: 18px;
-  letter-spacing: 5px;
-  text-indent: 5px;
-  font-weight: 300;
-  font-weight: 600;
-  cursor: pointer;
-  margin-top: 30px;
-  font-family: "neo";
-  transition: 0.25s;
-}
-
-.login-form {
-  margin: 10px 0;
-
-  i {
-    color: #409eff;
-  }
-
-  .el-form-item__content {
-    width: 100%;
-  }
-
-  .el-form-item {
-    margin-bottom: 12px;
-  }
-
-  .el-input {
-    input {
-      padding-bottom: 10px;
-      text-indent: 15px;
-      background: transparent;
-      border: none;
-      border-radius: 0;
-      color: #333;
-      border-bottom: 1px solid rgb(235, 237, 242);
-    }
-
-    .el-input__prefix {
-      i {
-        padding: 0 5px;
-        font-weight: 600;
-        font-size: 18px !important;
-      }
-    }
-  }
-}
-
-.login-code {
-  display: flex;
-  align-items: center;
-  justify-content: space-around;
-  margin: 0 0 0 10px;
-}
-
-.login-code-img {
-  margin-top: 2px;
-  width: 100px;
-  height: 38px;
-  background-color: #fdfdfd;
-  border: 1px solid #f0f0f0;
-  color: #333;
-  font-size: 14px;
-  font-weight: bold;
-  letter-spacing: 5px;
-  line-height: 38px;
-  text-indent: 5px;
-  text-align: center;
-}
+  @import "@/styles/login.scss";
 </style>

+ 1 - 2
src/page/login/userlogin.vue

@@ -113,8 +113,7 @@ export default {
           { min: 6, message: '密码长度最少为6位', trigger: 'blur' }
         ],
         code: [
-          { required: true, message: '请输入验证码', trigger: 'blur' },
-          { min: 4, max: 4, message: '验证码长度为4位', trigger: 'blur' }
+          { required: true, message: '请输入验证码', trigger: 'blur' }
         ]
       },
       passwordType: 'password'

+ 5 - 5
src/page/wel.vue

@@ -4,18 +4,18 @@
       <div class="banner-text">
         <span>
           <a href="https://avue.top/#/pay" target="_blank">
-            <img src="https://img.shields.io/badge/Avue-2.2.0-green.svg" alt="Build Status">
+            <img src="https://img.shields.io/badge/Avue-2.3.0-green.svg" alt="Build Status">
           </a>
-          <img src="https://img.shields.io/badge/Spring%20Boot-2.1.10.RELEASE-yellowgreen.svg" alt="Downloads">
-          <img src="https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR3-blue.svg" alt="Coverage Status">
+          <img src="https://img.shields.io/badge/Spring%20Boot-2.2.2.RELEASE-yellowgreen.svg" alt="Downloads">
+          <img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.RELEASE-blue.svg" alt="Coverage Status">
         </span>
         <br>
         <span>
           <el-collapse v-model="activeNames">
             <el-collapse-item title="完整的微服务架构" name="1">
               <div>基于Spring Cloud Gateway</div>
-              <div>基于Spring Cloud Greenwich.SR3</div>
-              <div>基于Spring Boot 2.1.10.RELEASE</div>
+              <div>基于Spring Cloud Hoxton.RELEASE</div>
+              <div>基于Spring Boot 2.2.2.RELEASE</div>
             </el-collapse-item>
             <el-collapse-item title="完善的权限控制" name="2">
               <div>基于Spring Security OAuth实现鉴权体系;</div>

+ 2 - 1
src/store/modules/common.js

@@ -137,7 +137,8 @@ const common = {
         name: 'lockPasswd'
       })
       removeStore({
-        name: 'isLock'
+        name: 'isLock',
+        type: 'session'
       })
     }
   }

+ 219 - 0
src/styles/login.scss

@@ -0,0 +1,219 @@
+.login-copyright {
+  color: #999;
+  width: 100%;
+  position: fixed;
+  bottom: 30px;
+  text-align: center;
+}
+
+.login-container {
+  background-color: #f0f2f5;
+  display: flex;
+  align-items: center;
+  position: relative;
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+  background: url("/img/bg/login.png");
+  animation: animate-cloud 20s linear infinite;
+}
+
+.login-tip {
+  color: #409eff;
+  text-align: center;
+  font-weight: 700;
+  font-size: 16px;
+}
+
+.login-logo {
+  overflow: hidden;
+  width: 110px;
+  height: 110px;
+  margin: -50px auto 20px auto;
+  border-radius: 50%;
+  -webkit-box-shadow: 0 4px 40px rgba(0, 0, 0, 0.07);
+  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.07);
+  padding: 10px;
+  background-color: #fff;
+  z-index: 1;
+  position: relative;
+  box-sizing: border-box;
+  padding: 20px;
+
+  img {
+    width: 100%;
+  }
+}
+
+.login-weaper {
+  position: relative;
+  margin: 0 auto;
+  width: 380px;
+  padding: 0 40px;
+  box-sizing: border-box;
+  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.08);
+  background-color: #fff;
+  border-radius: 3px;
+}
+
+.login-left,
+.login-border {
+  padding: 20px 0 40px 0;
+  position: relative;
+  align-items: center;
+  display: flex;
+}
+
+.login-left {
+  border-top-left-radius: 5px;
+  border-bottom-left-radius: 5px;
+  justify-content: center;
+  flex-direction: column;
+  background-color: #409eff;
+  color: #fff;
+  float: left;
+  width: 50%;
+  position: relative;
+}
+
+.login-left .img {
+  width: 140px;
+}
+
+.login-left .title {
+  margin-top: 60px;
+  text-align: center;
+  color: #fff;
+  font-weight: 300;
+  letter-spacing: 2px;
+  font-size: 25px;
+}
+
+.login-border {
+  border-left: none;
+  border-top-right-radius: 5px;
+  border-bottom-right-radius: 5px;
+  color: #fff;
+  background-color: #fff;
+  width: 100%;
+  float: left;
+  box-sizing: border-box;
+}
+
+.login-main {
+  margin: 0 auto;
+  width: 100%;
+  box-sizing: border-box;
+}
+
+.login-main > h3 {
+  margin-bottom: 20px;
+}
+
+.login-main > p {
+  color: #76838f;
+}
+
+.login-title {
+  color: #333;
+  margin-bottom: 30px;
+  font-weight: 500;
+  font-size: 22px;
+  text-align: center;
+  letter-spacing: 4px;
+}
+
+.login-select {
+  input {
+    color: #333;
+    font-size: 14px;
+    font-weight: 400;
+    border: none;
+    text-align: center;
+  }
+}
+
+.login-menu {
+  margin-top: 40px;
+  width: 100%;
+  text-align: center;
+
+  a {
+    color: #409eff;
+    font-weight: 700;
+    font-size: 12px;
+    margin: 0px 8px;
+  }
+}
+
+.login-submit {
+  width: 100%;
+  height: 45px;
+  font-size: 18px;
+  letter-spacing: 5px;
+  text-indent: 5px;
+  font-weight: 300;
+  font-weight: 600;
+  cursor: pointer;
+  margin-top: 30px;
+  font-family: "neo";
+  transition: 0.25s;
+}
+
+.login-form {
+  margin: 10px 0;
+
+  i {
+    color: #409eff;
+  }
+
+  .el-form-item__content {
+    width: 100%;
+  }
+
+  .el-form-item {
+    margin-bottom: 12px;
+  }
+
+  .el-input {
+    input {
+      padding-bottom: 10px;
+      text-indent: 15px;
+      background: transparent;
+      border: none;
+      border-radius: 0;
+      color: #333;
+      border-bottom: 1px solid rgb(235, 237, 242);
+    }
+
+    .el-input__prefix {
+      i {
+        padding: 0 5px;
+        font-weight: 600;
+        font-size: 18px !important;
+      }
+    }
+  }
+}
+
+.login-code {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  margin: 0 0 0 10px;
+}
+
+.login-code-img {
+  margin-top: 2px;
+  width: 100px;
+  height: 38px;
+  background-color: #fdfdfd;
+  border: 1px solid #f0f0f0;
+  color: #333;
+  font-size: 14px;
+  font-weight: bold;
+  letter-spacing: 5px;
+  line-height: 38px;
+  text-indent: 5px;
+  text-align: center;
+}

+ 108 - 105
src/views/activiti/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-save="handleSave"
         @row-del="rowDel">
         <template
@@ -55,125 +57,126 @@
 </template>
 
 <script>
-import { addObj, delObj, deploy, fetchList } from '@/api/activiti/activiti'
-import { tableOption } from '@/const/crud/activiti/activiti'
-import { mapGetters } from 'vuex'
+  import {addObj, delObj, deploy, fetchList} from '@/api/activiti/activiti'
+  import {tableOption} from '@/const/crud/activiti/activiti'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Activiti',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions'])
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        descs: 'create_time',
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
+  export default {
+    name: 'Activiti',
+    data() {
+      return {
+        searchForm: {},
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
+      }
     },
-    handleView(row) {
-      const name = `模型id为${row.id}的${row.name}流程图`,
-        src = `/activti/detail/${row.id}`
-      this.$router.push({
-        path: src,
-        query: {
-          name: name
-        }
-      })
+    created() {
     },
-    handleDel(row, index) {
-      this.$refs.crud.rowDel(row, index)
+    mounted: function () {
     },
-    handleDeploy: function(row) {
-      var _this = this
-      this.$confirm('是否确认部署ID为"' + row.id + '"的模型?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return deploy(row.id)
-      }).then(() => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '部署成功',
-          type: 'success'
-        })
-      }).catch(function() {
-      })
+    computed: {
+      ...mapGetters(['permissions'])
     },
-    rowDel: function(row) {
-      var _this = this
-      this.$confirm('是否确认删除ID为"' + row.id + '"的模型?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.id)
-      }).then(() => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          descs: 'create_time',
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
         })
-      }).catch(function() {
-      })
-    },
-    /**
+      },
+      handleView(row) {
+        const name = `模型id为${row.id}的${row.name}流程图`,
+          src = `/activti/detail/${row.id}`
+        this.$router.push({
+          path: src,
+          query: {
+            name: name
+          }
+        })
+      },
+      handleDel(row, index) {
+        this.$refs.crud.rowDel(row, index)
+      },
+      handleDeploy: function (row) {
+        var _this = this
+        this.$confirm('是否确认部署ID为"' + row.id + '"的模型?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return deploy(row.id)
+        }).then(() => {
+          this.getList(this.page)
+          _this.$message({
+            showClose: true,
+            message: '部署成功',
+            type: 'success'
+          })
+        }).catch(function () {
+        })
+      },
+      rowDel: function (row) {
+        var _this = this
+        this.$confirm('是否确认删除ID为"' + row.id + '"的模型?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.id)
+        }).then(() => {
+          this.getList(this.page)
+          _this.$message({
+            showClose: true,
+            message: '删除成功',
+            type: 'success'
+          })
+        }).catch(function () {
+        })
+      },
+      /**
        * @title 数据添加
        * @param row 为当前的数据
        * @param done 为表单关闭函数
        *
        **/
-    handleSave: function(row, done) {
-      addObj(row).then(() => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      handleSave: function (row, done) {
+        addObj(row).then(() => {
+          this.tableData.push(Object.assign({}, row))
+          this.$message({
+            showClose: true,
+            message: '添加成功',
+            type: 'success'
+          })
+          done()
+          this.getList(this.page)
         })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
         this.getList(this.page)
-      })
-    },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      }
     }
   }
-}
 </script>

+ 14 - 54
src/views/activiti/leave.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel">
@@ -106,11 +108,6 @@ export default {
         this.tableLoading = false
       })
     },
-    /**
-       * @title 打开新增窗口
-       * @detail 调用crud的handleadd方法即可
-       *
-       **/
     handleAdd: function() {
       this.$refs.crud.rowAdd()
     },
@@ -121,7 +118,6 @@ export default {
       this.$refs.crud.rowDel(row, index)
     },
     rowDel: function(row, index) {
-      var _this = this
       this.$confirm('是否确认删除ID为' + row.leaveId, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -129,16 +125,10 @@ export default {
       }).then(function() {
         return delObj(row.leaveId)
       }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
+        this.$message.success('删除成功')
       })
     },
     handleSubmit: function(row, index) {
-      var _this = this
       this.$confirm('是否确认提交ID为' + row.leaveId, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -146,62 +136,35 @@ export default {
       }).then(function() {
         return submit(row.leaveId)
       }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '提交成功',
-          type: 'success'
-        })
+        this.$message.success('提交成功')
         this.getList(this.page)
       })
     },
-    /**
-       * @title 数据更新
-       * @param row 为当前的数据
-       * @param index 为当前更新数据的行数
-       * @param done 为表单关闭函数
-       *
-       **/
     handleUpdate: function(row, index, done) {
       putObj(row).then(() => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
-        })
+        this.$message.success('修改成功')
         done()
         this.getList(this.page)
       })
     },
-    /**
-       * @title 数据添加
-       * @param row 为当前的数据
-       * @param done 为表单关闭函数
-       *
-       **/
     handleSave: function(row, done) {
       addObj(row).then(() => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
-        })
+        this.$message.success('添加成功')
         done()
         this.getList(this.page)
       })
     },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
-    /**
-       * 刷新回调
-       */
     refreshChange() {
       this.getList(this.page)
     }
@@ -209,6 +172,3 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
-</style>
-

+ 92 - 111
src/views/activiti/process.vue

@@ -27,14 +27,12 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
-        @row-del="rowDel"
-      >
+        @row-del="rowDel">
         <template slot-scope="scope" slot="menuBtn">
           <el-dropdown-item
             v-if="permissions.act_process_manage"
             divided
-            @click.native="handlePic(scope.row,scope.index)"
-          >流程图
+            @click.native="handlePic(scope.row,scope.index)">流程图
           </el-dropdown-item>
           <el-dropdown-item
             v-if="permissions.act_process_manage && scope.row.suspend"
@@ -66,125 +64,108 @@
 </template>
 
 <script>
-import { delObj, fetchList, status } from '@/api/activiti/process'
-import { tableOption } from '@/const/crud/activiti/process'
-import { mapGetters } from 'vuex'
+  import {delObj, fetchList, status} from '@/api/activiti/process'
+  import {tableOption} from '@/const/crud/activiti/process'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Process',
-  data() {
-    return {
-      searchForm: {},
-      showPicDialog: false,
-      actPicUrl: '',
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions'])
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(
-        Object.assign(
-          {
-            descs: 'create_time',
-            current: page.currentPage,
-            size: page.pageSize
-          },
-          params,
-          this.searchForm
-        )
-      ).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
+  export default {
+    name: 'Process',
+    data() {
+      return {
+        searchForm: {},
+        showPicDialog: false,
+        actPicUrl: '',
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
+      }
+    },
+    created() {
+    },
+    mounted: function () {
+    },
+    computed: {
+      ...mapGetters(['permissions'])
     },
-    handlePic(row) {
-      this.actPicUrl =
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(
+          Object.assign(
+            {
+              descs: 'create_time',
+              current: page.currentPage,
+              size: page.pageSize
+            },
+            params,
+            this.searchForm
+          )
+        ).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        })
+      },
+      handlePic(row) {
+        this.actPicUrl =
           `/act/process/resource/` +
           row.deploymentId +
           '/' +
           row.processonDefinitionId +
           '/image'
-      this.showPicDialog = true
-    },
-    handleStatus(row, type) {
-      var _this = this
-      this.$confirm(
-        '是否确认操作ID为"' + row.processonDefinitionId + '"的流程?',
-        '警告',
-        {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }
-      ).then(function() {
-        return status(row.processonDefinitionId, type)
-      }).then(() => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '操作成功',
-          type: 'success'
+        this.showPicDialog = true
+      },
+      handleStatus(row, type) {
+        var _this = this
+        this.$confirm(
+          '是否确认操作ID为"' + row.processonDefinitionId + '"的流程?',
+          '警告',
+          {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        ).then(function () {
+          return status(row.processonDefinitionId, type)
+        }).then(() => {
+          this.$message.success('操作成功')
+          this.getList(this.page)
         })
-        this.getList(this.page)
-      })
-    },
-    handleDel(row, index) {
-      this.$refs.crud.rowDel(row, index)
-    },
-    rowDel: function(row) {
-      var _this = this
-      this.$confirm(
-        '是否确认删除ID为"' + row.deploymentId + '"的模型?',
-        '警告',
-        {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }
-      ).then(function() {
-        return delObj(row.deploymentId)
-      }).then(() => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
+      },
+      handleDel(row, index) {
+        this.$refs.crud.rowDel(row, index)
+      },
+      rowDel: function (row) {
+        this.$confirm(
+          '是否确认删除ID为"' + row.deploymentId + '"的模型?',
+          '警告',
+          {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        ).then(function () {
+          return delObj(row.deploymentId)
+        }).then(() => {
+          this.$message.success('删除成功')
+          this.getList(this.page)
         })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
+        done()
+      },
+      refreshChange() {
         this.getList(this.page)
-      }).catch(function() {
-      })
-    },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 82 - 77
src/views/activiti/task.vue

@@ -25,6 +25,8 @@
         :table-loading="tableLoading"
         :option="tableOption"
         @on-load="getList"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @refresh-change="refreshChange">
         <template
           slot-scope="scope"
@@ -76,91 +78,94 @@
 </template>
 
 <script>
-import { doTask, fetchComment, fetchDetail, fetchList } from '@/api/activiti/task'
-import { formOption, tableOption, taskOption } from '@/const/crud/activiti/task'
-import { mapGetters } from 'vuex'
+  import {doTask, fetchComment, fetchDetail, fetchList} from '@/api/activiti/task'
+  import {formOption, tableOption, taskOption} from '@/const/crud/activiti/task'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Task',
-  data() {
-    return {
-      actPicUrl: '',
-      obj: {},
-      flagList: {},
-      showTask: false,
-      showComment: false,
-      showPicDialog: false,
-      tableData: [],
-      taskTableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption,
-      formOption: formOption,
-      taskOption: taskOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions'])
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        current: page.currentPage,
-        size: page.pageSize
-      }, params)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
+  export default {
+    name: 'Task',
+    data() {
+      return {
+        actPicUrl: '',
+        obj: {},
+        flagList: {},
+        showTask: false,
+        showComment: false,
+        showPicDialog: false,
+        tableData: [],
+        taskTableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption,
+        formOption: formOption,
+        taskOption: taskOption
+      }
     },
-    audit: function(row) {
-      fetchDetail(row.taskId).then(response => {
-        this.obj = response.data.data
-        // 根据连线判断下次的流程
-        this.flagList = this.obj.flagList
-        this.showTask = true
-      })
-      this.obj = row
+    created() {
     },
-    comment: function(row) {
-      fetchComment(row.taskId).then(response => {
-        this.taskTableData = response.data.data
-      })
-      this.showComment = true
+    mounted: function () {
     },
-    handleTask: function(row, result) {
-      this.obj.taskFlag = result
-      doTask(this.obj).then(() => {
-        this.$message({
-          showClose: true,
-          message: '提交成功',
-          type: 'success'
+    computed: {
+      ...mapGetters(['permissions'])
+    },
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        })
+      },
+      audit: function (row) {
+        fetchDetail(row.taskId).then(response => {
+          this.obj = response.data.data
+          // 根据连线判断下次的流程
+          this.flagList = this.obj.flagList
+          this.showTask = true
+        })
+        this.obj = row
+      },
+      comment: function (row) {
+        fetchComment(row.taskId).then(response => {
+          this.taskTableData = response.data.data
         })
-        this.showTask = false
+        this.showComment = true
+      },
+      handleTask: function (row, result) {
+        this.obj.taskFlag = result
+        doTask(this.obj).then(() => {
+          this.$message({
+            showClose: true,
+            message: '提交成功',
+            type: 'success'
+          })
+          this.showTask = false
+          this.getList(this.page)
+        })
+      },
+      viewPic: function (row) {
+        this.actPicUrl = `/act/task/view/` + row.taskId
+        this.showPicDialog = true
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
         this.getList(this.page)
-      })
-    },
-    viewPic: function(row) {
-      this.actPicUrl = `/act/task/view/` + row.taskId
-      this.showPicDialog = true
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 92 - 89
src/views/admin/client/index.vue

@@ -27,6 +27,8 @@
         :permission="permissionList"
         @on-load="getList"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="handleDelete"/>
@@ -35,98 +37,99 @@
 </template>
 
 <script>
-    import {addObj, delObj, fetchList, putObj} from '@/api/admin/client'
-    import {tableOption} from '@/const/crud/admin/client'
-    import {mapGetters} from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/client'
+  import {tableOption} from '@/const/crud/admin/client'
+  import {mapGetters} from 'vuex'
 
-    export default {
-        name: 'Client',
-        data() {
-            return {
-                tableData: [],
-                page: {
-                    total: 0, // 总页数
-                    currentPage: 1, // 当前页数
-                    pageSize: 20 // 每页显示多少条
-                },
-                tableLoading: false,
-                tableOption: tableOption
-            }
+  export default {
+    name: 'Client',
+    data() {
+      return {
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
         },
-        created() {
-        },
-        mounted: function () {
-        },
-        computed: {
-            ...mapGetters(['permissions']),
-            permissionList() {
-                return {
-                    addBtn: this.vaildData(this.permissions.sys_client_add, false),
-                    delBtn: this.vaildData(this.permissions.sys_client_del, false),
-                    editBtn: this.vaildData(this.permissions.sys_client_edit, false)
-                }
-            }
-        },
-        methods: {
-            getList(page, params) {
-                this.tableLoading = true
-                fetchList(Object.assign({
-                    current: page.currentPage,
-                    size: page.pageSize
-                }, params)).then(response => {
-                    this.tableData = response.data.data.records
-                    this.page.total = response.data.data.total
-                    this.tableLoading = false
-                })
-            },
-            handleDelete: function (row, index) {
-                var _this = this
-                this.$confirm('是否确认删除ID为' + row.clientId, '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(function () {
-                    return delObj(row.clientId)
-                }).then(() => {
-                    _this.$message.success('删除成功')
-                    this.refreshChange()
-                }).catch(function () {
-                })
-            },
-            handleUpdate: function (row, index, done) {
-                if (row.accessTokenValidity === undefined) {
-                    row.accessTokenValidity = 60 * 60 * 12
-                }
-                if (row.refreshTokenValidity === undefined) {
-                    row.refreshTokenValidity = 60 * 60 * 24 * 30
-                }
+        tableLoading: false,
+        tableOption: tableOption
+      }
+    },
+    created() {
+    },
+    mounted: function () {
+    },
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.sys_client_add, false),
+          delBtn: this.vaildData(this.permissions.sys_client_del, false),
+          editBtn: this.vaildData(this.permissions.sys_client_edit, false)
+        }
+      }
+    },
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        })
+      },
+      handleDelete: function (row, index) {
+        var _this = this
+        this.$confirm('是否确认删除ID为' + row.clientId, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.clientId)
+        }).then(() => {
+          _this.$message.success('删除成功')
+          this.refreshChange()
+        })
+      },
+      handleUpdate: function (row, index, done) {
+        if (row.accessTokenValidity === undefined) {
+          row.accessTokenValidity = 60 * 60 * 12
+        }
+        if (row.refreshTokenValidity === undefined) {
+          row.refreshTokenValidity = 60 * 60 * 24 * 30
+        }
 
-                putObj(row).then(() => {
-                    this.$message.success('修改成功');
-                    this.refreshChange()
-                    done()
-                })
-            },
-            handleSave: function (row, done) {
-                if (row.accessTokenValidity === undefined) {
-                    row.accessTokenValidity = 60 * 60 * 12
-                }
-                if (row.refreshTokenValidity === undefined) {
-                    row.refreshTokenValidity = 60 * 60 * 24 * 30
-                }
-                addObj(row).then(() => {
-                    this.$message.success('添加成功');
-                    this.refreshChange()
-                    done()
-                })
-            },
-            refreshChange() {
-                this.getList(this.page)
-            }
+        putObj(row).then(() => {
+          this.$message.success('修改成功');
+          this.refreshChange()
+          done()
+        })
+      },
+      handleSave: function (row, done) {
+        if (row.accessTokenValidity === undefined) {
+          row.accessTokenValidity = 60 * 60 * 12
+        }
+        if (row.refreshTokenValidity === undefined) {
+          row.refreshTokenValidity = 60 * 60 * 24 * 30
         }
+        addObj(row).then(() => {
+          this.$message.success('添加成功');
+          this.refreshChange()
+          done()
+        })
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
+        this.getList(this.page)
+      }
     }
+  }
 </script>
-
-<style lang="scss" scoped>
-</style>
-

+ 131 - 146
src/views/admin/dict/index.vue

@@ -29,6 +29,8 @@
         @row-update="handleUpdate"
         @row-save="handleSave"
         @search-change="searchChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-del="rowDel">
         <template
           slot-scope="scope"
@@ -65,168 +67,151 @@
 </template>
 
 <script>
-import { addItemObj, addObj, delItemObj, delObj, fetchItemList, fetchList, putItemObj, putObj } from '@/api/admin/dict'
-import { tableDictItemOption, tableOption } from '@/const/crud/admin/dict'
-import { mapGetters } from 'vuex'
+  import {addItemObj, addObj, delItemObj, delObj, fetchItemList, fetchList, putItemObj, putObj} from '@/api/admin/dict'
+  import {tableDictItemOption, tableOption} from '@/const/crud/admin/dict'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Dict',
-  data() {
-    return {
-      searchForm: {},
-      form: {
-        type: undefined,
-        dictId: undefined
-      },
-      dictType: undefined,
-      dictId: undefined,
-      dialogFormVisible: false,
-      tableData: [],
-      tableDictItemData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption,
-      tableDictItemOption: tableDictItemOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions']),
-    permissionList() {
+  export default {
+    name: 'Dict',
+    data() {
       return {
-        addBtn: this.vaildData(this.permissions.sys_dict_add, false),
-        delBtn: this.vaildData(this.permissions.sys_dict_del, false),
-        editBtn: this.vaildData(this.permissions.sys_dict_edit, false)
+        searchForm: {},
+        form: {
+          type: undefined,
+          dictId: undefined
+        },
+        dictType: undefined,
+        dictId: undefined,
+        dialogFormVisible: false,
+        tableData: [],
+        tableDictItemData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption,
+        tableDictItemOption: tableDictItemOption
       }
-    }
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
     },
-
-    getDictItemList(dictId, type) {
-      this.dictType = type
-      this.dictId = dictId
-      this.dialogFormVisible = true
-      this.tableLoading = true
-      fetchItemList(Object.assign({
-        current: this.page.currentPage,
-        size: this.page.pageSize
-      }, { dictId: dictId })).then(response => {
-        this.tableDictItemData = response.data.data.records
-        this.tableLoading = false
-      })
+    created() {
     },
-    handleBeforeOpen(done) {
-      this.form.type = this.dictType
-      this.form.dictId = this.dictId
-      done()
+    mounted: function () {
     },
-    rowDel: function(row) {
-      var _this = this
-      this.$confirm('是否确认删除数据类型为"' + row.type + '"的数据项?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row)
-      }).then(() => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-      }).catch(function() {
-      })
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.sys_dict_add, false),
+          delBtn: this.vaildData(this.permissions.sys_dict_del, false),
+          editBtn: this.vaildData(this.permissions.sys_dict_edit, false)
+        }
+      }
     },
-    handleUpdate: function(row, index, done) {
-      putObj(row).then(() => {
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
         })
-        this.getList(this.page)
-        done()
-      })
-    },
-    handleSave: function(row, done) {
-      addObj(row).then(() => {
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      },
+
+      getDictItemList(dictId, type) {
+        this.dictType = type
+        this.dictId = dictId
+        this.dialogFormVisible = true
+        this.tableLoading = true
+        fetchItemList(Object.assign({
+          current: this.page.currentPage,
+          size: this.page.pageSize
+        }, {dictId: dictId})).then(response => {
+          this.tableDictItemData = response.data.data.records
+          this.tableLoading = false
         })
-        this.getList(this.page)
+      },
+      handleBeforeOpen(done) {
+        this.form.type = this.dictType
+        this.form.dictId = this.dictId
         done()
-      })
-    },
-    handleItemSave: function(row, done) {
-      addItemObj(row).then(() => {
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      },
+      rowDel: function (row) {
+        var _this = this
+        this.$confirm('是否确认删除数据类型为"' + row.type + '"的数据项?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row)
+        }).then(() => {
+          this.getList(this.page)
+          _this.$message.success('删除成功')
+        }).catch(function () {
         })
-        this.getDictItemList(row.dictId, row.type)
-        done()
-      })
-    },
-    handleItemUpdate: function(row, index, done) {
-      putItemObj(row).then(() => {
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+      },
+      handleUpdate: function (row, index, done) {
+        putObj(row).then(() => {
+          this.$message.success('修改成功')
+          this.getList(this.page)
+          done()
+        })
+      },
+      handleSave: function (row, done) {
+        addObj(row).then(() => {
+          this.$message.success('添加成功')
+          this.getList(this.page)
+          done()
+        })
+      },
+      handleItemSave: function (row, done) {
+        addItemObj(row).then(() => {
+          this.$message.success('添加成功')
+          this.getDictItemList(row.dictId, row.type)
+          done()
+        })
+      },
+      handleItemUpdate: function (row, index, done) {
+        putItemObj(row).then(() => {
+          this.$message.success('修改成功')
+          this.getDictItemList(row.dictId, row.type)
+          done()
         })
-        this.getDictItemList(row.dictId, row.type)
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
-      })
-    },
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    handleItem: function(row) {
-      this.getDictItemList(row.id, row.type)
-    },
-    rowItemDel: function(row) {
-      var _this = this
-      this.$confirm('是否确认删除数据为"' + row.label + '"的数据项?', '警告', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delItemObj(row.id)
-      }).then(() => {
-        this.getDictItemList(row.dictId, row.type)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      handleItem: function (row) {
+        this.getDictItemList(row.id, row.type)
+      },
+      rowItemDel: function (row) {
+        var _this = this
+        this.$confirm('是否确认删除数据为"' + row.label + '"的数据项?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delItemObj(row.id)
+        }).then(() => {
+          this.getDictItemList(row.dictId, row.type)
+          _this.$message.success('删除成功')
+        }).catch(function () {
         })
-      }).catch(function() {
-      })
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 10 - 4
src/views/admin/file/index.vue

@@ -28,6 +28,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-del="rowDel">
         <template
           slot="menu"
@@ -109,13 +111,20 @@ export default {
         this.getList(this.page)
       })
     },
-    searchChange(form) {
+    searchChange(form, done) {
       this.getList(this.page, form)
+      done()
     },
     refreshChange() {
       this.searchForm = this.form
       this.getList(this.page)
     },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     download: function(row, index) {
       handleDown(row.fileName, row.bucketName)
     },
@@ -128,6 +137,3 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
-</style>
-

+ 11 - 12
src/views/admin/log/index.vue

@@ -28,6 +28,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-del="handleDel"/>
     </basic-container>
   </div>
@@ -79,7 +81,6 @@ export default {
       })
     },
     handleDel: function(row) {
-      var _this = this
       this.$confirm('是否确认删除ID为"' + row.id + '"的日志?', '警告', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -88,17 +89,19 @@ export default {
         return delObj(row.id)
       }).then(() => {
         this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-      }).catch(function() {
+        this.$message.success('删除成功')
       })
     },
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
     refreshChange() {
       this.getList(this.page)
@@ -106,7 +109,3 @@ export default {
   }
 }
 </script>
-
-<style lang="scss" scoped>
-</style>
-

+ 86 - 101
src/views/admin/param/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -35,127 +37,110 @@
 </template>
 
 <script>
-import { addObj, delObj, fetchList, putObj } from '@/api/admin/sys-public-param'
-import { tableOption } from '@/const/crud/admin/sys-public-param'
-import { mapGetters } from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/sys-public-param'
+  import {tableOption} from '@/const/crud/admin/sys-public-param'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Syspublicparam',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions']),
-    permissionList() {
+  export default {
+    name: 'Syspublicparam',
+    data() {
       return {
-        addBtn: this.vaildData(this.permissions.admin_syspublicparam_add, false),
-        delBtn: this.vaildData(this.permissions.admin_syspublicparam_del, false),
-        editBtn: this.vaildData(this.permissions.admin_syspublicparam_edit, false)
+        searchForm: {},
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
       }
-    }
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        descs: 'create_time',
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
     },
-    rowDel: function(row, index) {
-      var _this = this
-      this.$confirm('是否确认删除ID为' + row.publicId, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.publicId)
-      }).then(data => {
-        this.getList(this.page)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-        this.getList(this.page)
-      })
+    created() {
+    },
+    mounted: function () {
     },
-    /**
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.admin_syspublicparam_add, false),
+          delBtn: this.vaildData(this.permissions.admin_syspublicparam_del, false),
+          editBtn: this.vaildData(this.permissions.admin_syspublicparam_edit, false)
+        }
+      }
+    },
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          descs: 'create_time',
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        })
+      },
+      rowDel: function (row, index) {
+        this.$confirm('是否确认删除ID为' + row.publicId, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.publicId)
+        }).then(data => {
+          this.getList(this.page)
+          this.$message.success('删除成功')
+          this.getList(this.page)
+        })
+      },
+      /**
        * @title 数据更新
        * @param row 为当前的数据
        * @param index 为当前更新数据的行数
        * @param done 为表单关闭函数
        *
        **/
-    handleUpdate: function(row, index, done, loading) {
-      putObj(row).then(data => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+      handleUpdate: function (row, index, done, loading) {
+        putObj(row).then(data => {
+          this.$message.success('修改成功')
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
         })
-        done()
-        this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    /**
+      },
+      /**
        * @title 数据添加
        * @param row 为当前的数据
        * @param done 为表单关闭函数
        *
        **/
-    handleSave: function(row, done, loading) {
-      addObj(row).then(data => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      handleSave: function (row, done, loading) {
+        addObj(row).then(data => {
+          this.$message.success('添加成功')
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
         })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
+      },
+      refreshChange() {
         this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      }
     }
   }
-}
 </script>
-
-<style lang="scss" scoped>
-</style>

+ 13 - 4
src/views/admin/role/index.vue

@@ -27,8 +27,10 @@
         :table-loading="listLoading"
         :before-open="handleOpenBefore"
         @on-load="getList"
-        @search-change="handleFilter"
-        @refresh-change="handleRefreshChange"
+        @search-change="searchChange"
+        @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="update"
         @row-save="create">
 
@@ -180,12 +182,19 @@ export default {
         this.listLoading = false
       })
     },
-    handleRefreshChange() {
+    refreshChange() {
       this.getList(this.page)
     },
-    handleFilter(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
     handleCreate() {
       this.$refs.crud.rowAdd()

+ 82 - 82
src/views/admin/social/index.vue

@@ -28,6 +28,8 @@
         @on-load="getList"
         @refresh-change="refreshChange"
         @search-change="searchChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -36,97 +38,95 @@
 </template>
 
 <script>
-import { addObj, delObj, fetchList, putObj } from '@/api/admin/sys-social-details'
-import { tableOption } from '@/const/crud/admin/sys-social-details'
-import { mapGetters } from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/sys-social-details'
+  import {tableOption} from '@/const/crud/admin/sys-social-details'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'SysSocialDetails',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions']),
-    permissionList() {
+  export default {
+    name: 'SysSocialDetails',
+    data() {
       return {
-        addBtn: this.vaildData(this.permissions.sys_social_details_add, false),
-        delBtn: this.vaildData(this.permissions.sys_social_details_del, false),
-        editBtn: this.vaildData(this.permissions.sys_social_details_edit, false)
+        searchForm: {},
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
       }
-    }
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
     },
-    rowDel: function(row, index) {
-      var _this = this
-      this.$confirm('是否确认删除ID为' + row.id, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.id)
-      }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-        this.refreshChange()
-      }).catch(function() {
-      })
+    created() {
     },
-    handleUpdate: function(row, index, done) {
-      putObj(row).then(() => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message.success('修改成功')
-        this.refreshChange()
-        done()
-      })
+    mounted: function () {
     },
-    handleSave: function(row, done) {
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.sys_social_details_add, false),
+          delBtn: this.vaildData(this.permissions.sys_social_details_del, false),
+          editBtn: this.vaildData(this.permissions.sys_social_details_edit, false)
+        }
+      }
+    },
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        })
+      },
+      rowDel: function (row, index) {
+        var _this = this
+        this.$confirm('是否确认删除ID为' + row.id, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.id)
+        }).then(() => {
+          _this.$message.success('删除成功')
+          this.refreshChange()
+        }).catch(function () {
+        })
+      },
+      handleUpdate: function (row, index, done) {
+        putObj(row).then(() => {
+          this.$message.success('修改成功')
+          this.refreshChange()
+          done()
+        })
+      },
+      handleSave: function (row, done) {
         addObj(row).then(() => {
-            this.tableData.push(Object.assign({}, row))
-            this.$message.success('添加成功')
-            this.refreshChange()
-            done()
+          this.tableData.push(Object.assign({}, row))
+          this.$message.success('添加成功')
+          this.refreshChange()
+          done()
         })
-    },
-    refreshChange() {
-      this.getList(this.page)
-    },
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
+      },
+      refreshChange() {
+        this.getList(this.page)
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
+        done()
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      }
     }
   }
-}
 </script>
 
-<style lang="scss" scoped>
-</style>
-

+ 81 - 109
src/views/admin/tenant/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -35,124 +37,94 @@
 </template>
 
 <script>
-import { addObj, delObj, fetchList, putObj } from '@/api/admin/tenant'
-import { tableOption } from '@/const/crud/admin/tenant'
-import { mapGetters } from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/tenant'
+  import {tableOption} from '@/const/crud/admin/tenant'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Tenant',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  computed: {
-    ...mapGetters(['permissions']),
-    permissionList() {
+  export default {
+    name: 'Tenant',
+    data() {
       return {
-        addBtn: this.vaildData(this.permissions.admin_systenant_add, false),
-        delBtn: this.vaildData(this.permissions.admin_systenant_del, false),
-        editBtn: this.vaildData(this.permissions.admin_systenant_edit, false)
+        tableData: [],
+        searchForm: {},
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
       }
-    }
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      }).catch(() => {
-        this.tableLoading = false
-      })
     },
-    rowDel: function(row, index) {
-      var _this = this
-      this.$confirm('是否确认删除ID为' + row.id, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.id)
-      }).then(data => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-        this.getList(this.page)
-      })
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.admin_systenant_add, false),
+          delBtn: this.vaildData(this.permissions.admin_systenant_del, false),
+          editBtn: this.vaildData(this.permissions.admin_systenant_edit, false)
+        }
+      }
     },
-    /**
-       * @title 数据更新
-       * @param row 为当前的数据
-       * @param index 为当前更新数据的行数
-       * @param done 为表单关闭函数
-       *
-       **/
-    handleUpdate: function(row, index, done, loading) {
-      putObj(row).then(data => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        }).catch(() => {
+          this.tableLoading = false
         })
-        done()
-        this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    /**
-       * @title 数据添加
-       * @param row 为当前的数据
-       * @param done 为表单关闭函数
-       *
-       **/
-    handleSave: function(row, done, loading) {
-      addObj(row).then(data => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      },
+      rowDel: function (row, index) {
+        var _this = this
+        this.$confirm('是否确认删除ID为' + row.id, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.id)
+        }).then(data => {
+          _this.$message.success('删除成功')
+          this.getList(this.page)
+        })
+      },
+      handleUpdate: function (row, index, done, loading) {
+        putObj(row).then(data => {
+          this.$message.success('修改成功')
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
+        })
+      },
+      handleSave: function (row, done, loading) {
+        addObj(row).then(data => {
+          this.$message.success('添加成功')
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
         })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
+      },
+      refreshChange() {
         this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
     }
   }
-}
 </script>
-
-<style lang="scss" scoped>
-</style>

+ 11 - 16
src/views/admin/token/index.vue

@@ -27,6 +27,8 @@
         :permission="permissionList"
         @on-load="getList"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-del="handleDel"/>
     </basic-container>
   </div>
@@ -41,7 +43,7 @@ export default {
   name: 'Token',
   data() {
     return {
-      tableData: [],
+      tableData:[],
       page: {
         total: 0, // 总页数
         currentPage: 1, // 当前页数
@@ -84,25 +86,18 @@ export default {
       }).then(function() {
         return delObj(row.access_token)
       }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '强制下线成功',
-          type: 'success'
-        })
-      }).catch(function() {
+        _this.$message.success('强制下线成功')
       })
     },
-    /**
-       * 刷新回调
-       */
     refreshChange() {
       this.getList(this.page)
-    }
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
   }
 }
 </script>
-
-<style lang="scss" scoped>
-</style>
-

+ 171 - 183
src/views/admin/user/index.vue

@@ -24,7 +24,6 @@
           :sm="24"
           :md="5"
           class="user__tree">
-
           <avue-tree
             :option="treeOption"
             :data="treeData"
@@ -44,8 +43,10 @@
             :before-open="handleOpenBefore"
             :data="list"
             @on-load="getList"
-            @search-change="handleFilter"
-            @refresh-change="handleRefreshChange"
+            @search-change="searchChange"
+            @refresh-change="refreshChange"
+            @size-change="sizeChange"
+            @current-change="currentChange"
             @row-update="update"
             @row-save="create">
             <template slot="menuLeft">
@@ -130,193 +131,180 @@
 </template>
 
 <script>
-    import {addObj, delObj, fetchList, putObj} from '@/api/admin/user'
-    import {deptRoleList} from '@/api/admin/role'
-    import {fetchTree} from '@/api/admin/dept'
-    import {tableOption} from '@/const/crud/admin/user'
-    import {mapGetters} from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/admin/user'
+  import {deptRoleList} from '@/api/admin/role'
+  import {fetchTree} from '@/api/admin/dept'
+  import {tableOption} from '@/const/crud/admin/user'
+  import {mapGetters} from 'vuex'
 
-    export default {
-        name: 'SysUser',
-        data() {
-            return {
-                searchForm: {},
-                treeOption: {
-                    nodeKey: 'id',
-                    addBtn: false,
-                    menu: false,
-                    props: {
-                        label: 'name',
-                        value: 'id'
-                    }
-                },
-                treeData: [],
-                option: tableOption,
-                treeDeptData: [],
-                checkedKeys: [],
-                roleProps: {
-                    label: 'roleName',
-                    value: 'roleId'
-                },
-                defaultProps: {
-                    label: 'name',
-                    value: 'id'
-                },
-                page: {
-                    total: 0, // 总页数
-                    currentPage: 1, // 当前页数
-                    pageSize: 20, // 每页显示多少条,
-                    isAsc: false// 是否倒序
-                },
-                list: [],
-                listLoading: true,
-                role: [],
-                form: {},
-                rolesOptions: []
-            }
+  export default {
+    name: 'SysUser',
+    data() {
+      return {
+        searchForm: {},
+        treeOption: {
+          nodeKey: 'id',
+          addBtn: false,
+          menu: false,
+          props: {
+            label: 'name',
+            value: 'id'
+          }
         },
-        computed: {
-            ...mapGetters(['permissions'])
+        treeData: [],
+        option: tableOption,
+        treeDeptData: [],
+        checkedKeys: [],
+        roleProps: {
+          label: 'roleName',
+          value: 'roleId'
         },
-        watch: {
-            role() {
-                this.form.role = this.role
-            }
+        defaultProps: {
+          label: 'name',
+          value: 'id'
         },
-        created() {
-            this.sys_user_add = this.permissions['sys_user_add']
-            this.sys_user_edit = this.permissions['sys_user_edit']
-            this.sys_user_del = this.permissions['sys_user_del']
-            this.init()
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条,
+          isAsc: false// 是否倒序
         },
-        methods: {
-            init() {
-                fetchTree().then(response => {
-                    this.treeData = response.data.data
-                })
-            },
-            nodeClick(data) {
-                this.page.page = 1
-                this.getList(this.page, {deptId: data.id})
-            },
-            getList(page, params) {
-                this.listLoading = true
-                fetchList(Object.assign({
-                    current: page.currentPage,
-                    size: page.pageSize
-                }, params, this.searchForm)).then(response => {
-                    this.list = response.data.data.records
-                    this.page.total = response.data.data.total
-                    this.listLoading = false
-                })
-            },
-            getNodeData() {
-                deptRoleList().then(response => {
-                    this.rolesOptions = response.data.data
-                })
-            },
-            handleDept() {
-                fetchTree().then(response => {
-                    this.treeDeptData = response.data.data
-                })
-            },
-            handleFilter(param) {
-                this.searchForm = param
-                this.getList(this.page, param)
-            },
-            handleRefreshChange() {
-                this.getList(this.page)
-            },
-            handleCreate() {
-                this.$refs.crud.rowAdd()
-            },
-            handleOpenBefore(show, type) {
-                window.boxType = type
-                this.handleDept()
-                if (['edit', 'views'].includes(type)) {
-                    this.role = []
-                    for (var i = 0; i < this.form.roleList.length; i++) {
-                        this.role[i] = this.form.roleList[i].roleId
-                    }
-                    deptRoleList().then(response => {
-                        this.rolesOptions = response.data.data
-                    })
-                } else if (type === 'add') {
-                    this.role = []
-                }
-                show()
-            },
-            handleUpdate(row, index) {
-                console.log(row)
-                this.$refs.crud.rowEdit(row, index)
-                this.form.password = undefined
-            },
-            create(row, done, loading) {
-                if (this.form.phone.indexOf('*') > 0) {
-                    this.form.phone = undefined
-                }
-                addObj(this.form).then(() => {
-                    this.getList(this.page)
-                    done()
-                    this.$notify({
-                        title: '成功',
-                        message: '创建成功',
-                        type: 'success',
-                        duration: 2000
-                    })
-                }).catch(() => {
-                    loading()
-                })
-            },
-            update(row, index, done, loading) {
-                if (this.form.phone && this.form.phone.indexOf('*') > 0) {
-                    this.form.phone = undefined
-                }
-                putObj(this.form).then(() => {
-                    this.getList(this.page)
-                    done()
-                    this.$notify({
-                        title: '成功',
-                        message: '修改成功',
-                        type: 'success',
-                        duration: 2000
-                    })
-                }).catch(() => {
-                    loading()
-                })
-            },
-            deletes(row, index) {
-                this.$confirm(
-                    '此操作将永久删除该用户(用户名:' + row.username + '), 是否继续?',
-                    '提示',
-                    {
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
-                        type: 'warning'
-                    }
-                ).then(() => {
-                    delObj(row.userId)
-                        .then(() => {
-                            this.list.splice(index, 1)
-                            this.$notify({
-                                title: '成功',
-                                message: '删除成功',
-                                type: 'success',
-                                duration: 2000
-                            })
-                        })
-                        .cache(() => {
-                            this.$notify({
-                                title: '失败',
-                                message: '删除失败',
-                                type: 'error',
-                                duration: 2000
-                            })
-                        })
-                })
-            }
+        list: [],
+        listLoading: true,
+        role: [],
+        form: {},
+        rolesOptions: []
+      }
+    },
+    computed: {
+      ...mapGetters(['permissions'])
+    },
+    watch: {
+      role() {
+        this.form.role = this.role
+      }
+    },
+    created() {
+      this.sys_user_add = this.permissions['sys_user_add']
+      this.sys_user_edit = this.permissions['sys_user_edit']
+      this.sys_user_del = this.permissions['sys_user_del']
+      this.init()
+    },
+    methods: {
+      init() {
+        fetchTree().then(response => {
+          this.treeData = response.data.data
+        })
+      },
+      nodeClick(data) {
+        this.page.page = 1
+        this.getList(this.page, {deptId: data.id})
+      },
+      getList(page, params) {
+        this.listLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.list = response.data.data.records
+          this.page.total = response.data.data.total
+          this.listLoading = false
+        })
+      },
+      getNodeData() {
+        deptRoleList().then(response => {
+          this.rolesOptions = response.data.data
+        })
+      },
+      handleDept() {
+        fetchTree().then(response => {
+          this.treeDeptData = response.data.data
+        })
+      },
+      searchChange(param,done) {
+        this.searchForm = param
+        this.getList(this.page, param)
+        done()
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
+        this.getList(this.page)
+      },
+      handleCreate() {
+        this.$refs.crud.rowAdd()
+      },
+      handleOpenBefore(show, type) {
+        window.boxType = type
+        this.handleDept()
+        if (['edit', 'views'].includes(type)) {
+          this.role = []
+          for (var i = 0; i < this.form.roleList.length; i++) {
+            this.role[i] = this.form.roleList[i].roleId
+          }
+          deptRoleList().then(response => {
+            this.rolesOptions = response.data.data
+          })
+        } else if (type === 'add') {
+          this.role = []
+        }
+        show()
+      },
+      handleUpdate(row, index) {
+        console.log(row)
+        this.$refs.crud.rowEdit(row, index)
+        this.form.password = undefined
+      },
+      create(row, done, loading) {
+        if (this.form.phone.indexOf('*') > 0) {
+          this.form.phone = undefined
         }
+        addObj(this.form).then(() => {
+          this.getList(this.page)
+          done()
+          this.$notify.success('创建成功')
+        }).catch(() => {
+          loading()
+        })
+      },
+      update(row, index, done, loading) {
+        if (this.form.phone && this.form.phone.indexOf('*') > 0) {
+          this.form.phone = undefined
+        }
+        putObj(this.form).then(() => {
+          this.getList(this.page)
+          done()
+          this.$notify.success('修改成功')
+        }).catch(() => {
+          loading()
+        })
+      },
+      deletes(row, index) {
+        this.$confirm(
+          '此操作将永久删除该用户(用户名:' + row.username + '), 是否继续?',
+          '提示',
+          {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        ).then(() => {
+          delObj(row.userId)
+            .then(() => {
+              this.list.splice(index, 1)
+              this.$notify.success('删除成功')
+            })
+            .cache(() => {
+              this.$notify.error('删除失败')
+            })
+        })
+      }
     }
+  }
 </script>
 <style lang="scss">
   .user {

+ 9 - 11
src/views/daemon/execution-log/index.vue

@@ -27,6 +27,8 @@
         :permission="permissionList"
         @on-load="getList"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-del="handleDel"/>
     </basic-container>
   </div>
@@ -78,7 +80,6 @@ export default {
       })
     },
     handleDel: function(row, index) {
-      var _this = this
       this.$confirm('是否确认删除ID为' + row.id, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -86,19 +87,16 @@ export default {
       }).then(function() {
         return delObj(row.id)
       }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
+        this.$message.success('删除成功')
         this.getList(this.page)
-      }).catch(function() {
       })
     },
-    /**
-       * 刷新回调
-       */
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     refreshChange() {
       this.getList(this.page)
     }

+ 10 - 17
src/views/daemon/job-log/index.vue

@@ -9,6 +9,8 @@
         :option="tableOption"
         @on-load="getList"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @search-change="handleFilter"
         @search-reset="handleSearchReset">
         <template slot-scope="scope" slot="jobLogStatus">
@@ -76,28 +78,23 @@ export default {
         this.tableLoading = false
       })
     },
-    /**
-       * 清除全局检索条件
-       */
     handleSearchReset() {
       this.queryParams = {}
     },
-    /**
-       * 检索查询
-       */
-    handleFilter(params) {
+    handleFilter(params, done) {
       this.queryParams = params
       this.getList(this.page)
+      done()
     },
-    /**
-       * 刷新回调
-       */
     refreshChange() {
       this.getList(this.page)
     },
-    /**
-       * 获取字典显示名称并缓存
-       */
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     getDicNameCache(type) {
       remote(type).then(response => {
         const code = response.data.code
@@ -107,15 +104,11 @@ export default {
         }
       })
     },
-    /**
-       * 获取字典显示名称并缓存
-       */
     getDicNameJobExecuteStatus(value) {
       let re = ''
       this.JobExecuteStatusDicCache.forEach(obj => {
         if (obj.value === value) {
           re = obj.label
-          return
         }
       })
       return re

+ 10 - 1
src/views/daemon/job-manage/index.vue

@@ -12,6 +12,8 @@
         @row-save="save"
         @row-update="update"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @search-change="handleFilter"
         @search-reset="handleSearchReset">
         <template slot-scope="scope" slot="jobStatus">
@@ -180,9 +182,10 @@
       /**
        * 定时任务检索查询分页查询
        */
-      handleFilter(params) {
+      handleFilter(params, done) {
         this.queryParams = params
         this.getList(this.page)
+        done()
       },
       /**
        * 启动定时任务
@@ -315,6 +318,12 @@
       refreshChange() {
         this.getList(this.page)
       },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize
+      },
+      currentChange(current){
+        this.page.currentPage = current
+      },
       shutdownJobs() {
         this.$confirm(
           '即将暂停全部运行中定时任务, 是否继续?',

+ 61 - 56
src/views/daemon/job-manage/job-log.vue

@@ -9,6 +9,8 @@
           :option="tableLogOption"
           :table-loading="tableLogLoading"
           @on-load="getJobLogList"
+          @size-change="sizeChange"
+          @current-change="currentChange"
           @refresh-change="getJobLogList">
         </avue-crud>
       </el-dialog>
@@ -18,63 +20,66 @@
 </template>
 
 <script>
-    import {fetchLogList,} from '@/api/daemon/sys-job'
-    import {tableLogOption} from '@/const/crud/daemon/sys-job'
-    import {mapGetters} from 'vuex'
+  import {fetchLogList,} from '@/api/daemon/sys-job'
+  import {tableLogOption} from '@/const/crud/daemon/sys-job'
+  import {mapGetters} from 'vuex'
 
-    export default {
-        name: 'jobLog',
-        data() {
-            return {
-                tableLogData: [],
-                dialogFormVisible: false,
-                jobId: '',
-                pageLog: {
-                    total: 0, // 总页数
-                    currentPage: 1, // 当前页数
-                    pageSize: 10 // 每页显示多少条,
-                },
-                tableLogLoading: false,
-                tableLogOption: tableLogOption,
-            }
+  export default {
+    name: 'jobLog',
+    data() {
+      return {
+        tableLogData: [],
+        dialogFormVisible: false,
+        jobId: '',
+        pageLog: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 10 // 每页显示多少条,
         },
-        computed: {
-            ...mapGetters(['permissions'])
-        },
-        mounted: function () {
-        },
-        methods: {
-            init () {
-                this.dialogFormVisible = true
-                this.getJobLogList(this.pageLog)
-            },
-            /**
-             * 获取定时任务执行日志
-             */
-            getJobLog(row) {
-                this.dialogFormVisible = true
-                this.tableLogLoading = true
-                this.jobId = row.jobId
-                this.getJobLogList(this.pageLog)
-            },
-            getJobLogList(page) {
-                fetchLogList(Object.assign({
-                    descs: 'create_time',
-                    current: page.currentPage,
-                    size: page.pageSize
-                }, { jobId: this.jobId })).then(response => {
-                    this.tableLogData = response.data.data.records
-                    this.pageLog.total = response.data.data.total
-                    this.pageLog.pageSize = response.data.data.pageSize
-                    this.tableLogLoading = false
-                })
-            },
-            closeJobLogDialog() {
-                this.jobId = ''
-                this.pageLog.total = 0
-                this.pageLog.currentPage = 1
-                this.pageLog.pageSize = 10
-            },
-        }
+        tableLogLoading: false,
+        tableLogOption: tableLogOption,
+      }
+    },
+    computed: {
+      ...mapGetters(['permissions'])
+    },
+    mounted: function () {
+    },
+    methods: {
+      init() {
+        this.dialogFormVisible = true
+        this.getJobLogList(this.pageLog)
+      },
+      getJobLog(row) {
+        this.dialogFormVisible = true
+        this.tableLogLoading = true
+        this.jobId = row.jobId
+        this.getJobLogList(this.pageLog)
+      },
+      getJobLogList(page) {
+        fetchLogList(Object.assign({
+          descs: 'create_time',
+          current: page.currentPage,
+          size: page.pageSize
+        }, {jobId: this.jobId})).then(response => {
+          this.tableLogData = response.data.data.records
+          this.pageLog.total = response.data.data.total
+          this.pageLog.pageSize = response.data.data.pageSize
+          this.tableLogLoading = false
+        })
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      closeJobLogDialog() {
+        this.jobId = ''
+        this.pageLog.total = 0
+        this.pageLog.currentPage = 1
+        this.pageLog.pageSize = 10
+      },
     }
+  }
 </script>

+ 78 - 108
src/views/daemon/status-trace-log/index.vue

@@ -26,6 +26,8 @@
         :option="tableOption"
         @on-load="getList"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @search-change="searchChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
@@ -46,123 +48,91 @@
 </template>
 
 <script>
-import { addObj, delObj, fetchList, putObj } from '@/api/daemon/status-trace-log'
-import { tableOption } from '@/const/crud/daemon/status-trace-log'
-import { mapGetters } from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/daemon/status-trace-log'
+  import {tableOption} from '@/const/crud/daemon/status-trace-log'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'StatusTraceLog',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  created() {
-  },
-  mounted: function() {
-  },
-  computed: {
-    ...mapGetters(['permissions'])
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      })
-    },
-    /**
-       * @title 打开新增窗口
-       * @detail 调用crud的handleadd方法即可
-       *
-       **/
-    handleAdd: function() {
-      this.$refs.crud.rowAdd()
+  export default {
+    name: 'StatusTraceLog',
+    data() {
+      return {
+        searchForm: {},
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
+      }
     },
-    handleEdit(row, index) {
-      this.$refs.crud.rowEdit(row, index)
+    computed: {
+      ...mapGetters(['permissions'])
     },
-    handleDel(row, index) {
-      this.$refs.crud.rowDel(row, index)
-    },
-    rowDel: function(row, index) {
-      var _this = this
-      this.$confirm('是否确认删除ID为' + row.id, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.clientId)
-      }).then(() => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
         })
-      }).catch(function() {
-      })
-    },
-    /**
-       * @title 数据更新
-       * @param row 为当前的数据
-       * @param index 为当前更新数据的行数
-       * @param done 为表单关闭函数
-       *
-       **/
-    handleUpdate: function(row, index, done) {
-      putObj(row).then(() => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+      },
+      handleAdd: function () {
+        this.$refs.crud.rowAdd()
+      },
+      handleEdit(row, index) {
+        this.$refs.crud.rowEdit(row, index)
+      },
+      handleDel(row, index) {
+        this.$refs.crud.rowDel(row, index)
+      },
+      rowDel: function (row, index) {
+        this.$confirm('是否确认删除ID为' + row.id, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.clientId)
+        }).then(() => {
+          this.$message.success('删除成功')
+          this.refreshChange()
         })
-        done()
-      })
-    },
-    /**
-       * @title 数据添加
-       * @param row 为当前的数据
-       * @param done 为表单关闭函数
-       *
-       **/
-    handleSave: function(row, done) {
-      addObj(row).then(() => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      },
+      handleUpdate: function (row, index, done) {
+        putObj(row).then(() => {
+          this.$message.success('修改成功')
+          this.refreshChange()
+          done()
         })
+      },
+      handleSave: function (row, done) {
+        addObj(row).then(() => {
+          this.$message.success('添加成功')
+          this.refreshChange()
+          done()
+        })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
-      })
-    },
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    /**
-       * 刷新回调
-       */
-    refreshChange() {
-      this.getList(this.page)
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
+        this.getList(this.page)
+      }
     }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 8 - 0
src/views/gen/datasource.vue

@@ -28,6 +28,8 @@
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @refresh-change="refreshDsChange"
         @on-load="getDsList"/>
     </basic-container>
@@ -99,6 +101,12 @@
           this.dsPage.total = response.data.data.total
         })
       },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
       refreshDsChange() {
         this.getDsList(this.dsPage)
       }

+ 13 - 17
src/views/gen/form.vue

@@ -26,6 +26,8 @@
                  @on-load="getList"
                  @search-change="searchChange"
                  @refresh-change="refreshChange"
+                 @size-change="sizeChange"
+                 @current-change="currentChange"
                  @row-update="handleUpdate"
                  @row-save="handleSave"
                  @row-del="rowDel">
@@ -88,22 +90,13 @@
         }).then(function () {
           return delObj(row.id)
         }).then(data => {
-          _this.tableData.splice(index, 1)
-          _this.$message({
-            showClose: true,
-            message: '删除成功',
-            type: 'success'
-          })
+          this.$message.success('删除成功')
           this.getList(this.page)
         })
       },
       handleUpdate: function (row, index, done, loading) {
         putObj(row).then(data => {
-          this.$message({
-            showClose: true,
-            message: '修改成功',
-            type: 'success'
-          })
+          this.$message.success('修改成功')
           done()
           this.getList(this.page)
         }).catch(() => {
@@ -112,20 +105,23 @@
       },
       handleSave: function (row, done, loading) {
         addObj(row).then(data => {
-          this.$message({
-            showClose: true,
-            message: '添加成功',
-            type: 'success'
-          })
+          this.$message.success('添加成功')
           done()
           this.getList(this.page)
         }).catch(() => {
           loading();
         });
       },
-      searchChange(form) {
+      searchChange(form, done) {
         this.searchForm = form
         this.getList(this.page, form)
+        done()
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize
+      },
+      currentChange(current){
+        this.page.currentPage = current
       },
       refreshChange() {
         this.getList(this.page)

+ 8 - 0
src/views/gen/index.vue

@@ -49,6 +49,8 @@
         :table-loading="tableLoading"
         :option="tableOption"
         @on-load="getList"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @refresh-change="refreshChange">
         <template
           slot-scope="scope"
@@ -145,6 +147,12 @@
         this.formData.tableName = row.tableName
         this.box = true
       },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize
+      },
+      currentChange(current){
+        this.page.currentPage = current
+      },
       refreshChange() {
         this.getList(this.page)
       },

+ 8 - 1
src/views/mp/wxaccount/index.vue

@@ -25,6 +25,8 @@
         :table-loading="tableLoading"
         :option="tableOption"
         @on-load="getList"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @refresh-change="refreshChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
@@ -146,7 +148,12 @@ export default {
         this.getList(this.page)
       })
     },
-
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     refreshChange() {
       this.getList(this.page)
     },

+ 8 - 3
src/views/mp/wxaccountfans/index.vue

@@ -49,6 +49,8 @@
         :table-loading="tableLoading"
         :option="tableOption"
         @on-load="getList"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @refresh-change="refreshChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
@@ -165,9 +167,12 @@ export default {
         this.getList(this.page)
       })
     },
-    /**
-       * 刷新回调
-       */
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     refreshChange() {
       this.getList(this.page)
     },

+ 10 - 7
src/views/mp/wxfansmsg/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @refresh-change="refreshChange"
         @search-change="searchChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-save="handleSave"
         @row-del="rowDel">
         <template
@@ -174,18 +176,19 @@ export default {
         this.getResList(this.pageRes, { fansMsgId: this.msgId })
       })
     },
-    /**
-       * 刷新回调
-       */
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
+    },
     refreshChange() {
       this.getList(this.page)
     },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
     },
     reply: function(row) {
       this.msgId = row.id

+ 10 - 7
src/views/pay/goods/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -125,16 +127,17 @@ export default {
         loading()
       })
     },
-    /**
-       * 搜索回调
-       */
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
-    /**
-       * 刷新回调
-       */
     refreshChange() {
       this.getList(this.page)
     }

+ 97 - 100
src/views/pay/notify/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -35,115 +37,110 @@
 </template>
 
 <script>
-import {
-  fetchList,
-  addObj,
-  putObj,
-  delObj
-} from '@/api/pay/paynotifyrecord'
-import {
-  tableOption
-} from '@/const/crud/pay/paynotifyrecord'
-import {
-  mapGetters
-} from 'vuex'
+  import {addObj, delObj, fetchList, putObj} from '@/api/pay/paynotifyrecord'
+  import {tableOption} from '@/const/crud/pay/paynotifyrecord'
+  import {mapGetters} from 'vuex'
 
-export default {
-  name: 'Paynotifyrecord',
-  data() {
-    return {
-      searchForm: {},
-      tableData: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      tableLoading: false,
-      tableOption: tableOption
-    }
-  },
-  computed: {
-    ...mapGetters(['permissions']),
-    permissionList() {
+  export default {
+    name: 'Paynotifyrecord',
+    data() {
       return {
-        addBtn: this.vaildData(this.permissions.generator_paynotifyrecord_add, false),
-        delBtn: this.vaildData(this.permissions.generator_paynotifyrecord_del, false),
-        editBtn: this.vaildData(this.permissions.generator_paynotifyrecord_edit, false)
+        searchForm: {},
+        tableData: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20 // 每页显示多少条
+        },
+        tableLoading: false,
+        tableOption: tableOption
       }
-    }
-  },
-  methods: {
-    getList(page, params) {
-      this.tableLoading = true
-      fetchList(Object.assign({
-        descs: 'create_time',
-        current: page.currentPage,
-        size: page.pageSize
-      }, params, this.searchForm)).then(response => {
-        this.tableData = response.data.data.records
-        this.page.total = response.data.data.total
-        this.tableLoading = false
-      }).catch(() => {
-        this.tableLoading = false
-      })
     },
-    rowDel: function(row, index) {
-      var _this = this
-      this.$confirm('是否确认删除ID为' + row.id, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(function() {
-        return delObj(row.id)
-      }).then(data => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
-        this.getList(this.page)
-      })
+    computed: {
+      ...mapGetters(['permissions']),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permissions.generator_paynotifyrecord_add, false),
+          delBtn: this.vaildData(this.permissions.generator_paynotifyrecord_del, false),
+          editBtn: this.vaildData(this.permissions.generator_paynotifyrecord_edit, false)
+        }
+      }
     },
-    handleUpdate: function(row, index, done, loading) {
-      putObj(row).then(data => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
+    methods: {
+      getList(page, params) {
+        this.tableLoading = true
+        fetchList(Object.assign({
+          descs: 'create_time',
+          current: page.currentPage,
+          size: page.pageSize
+        }, params, this.searchForm)).then(response => {
+          this.tableData = response.data.data.records
+          this.page.total = response.data.data.total
+          this.tableLoading = false
+        }).catch(() => {
+          this.tableLoading = false
         })
-        done()
-        this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    handleSave: function(row, done, loading) {
-      addObj(row).then(data => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
+      },
+      rowDel: function (row, index) {
+        var _this = this
+        this.$confirm('是否确认删除ID为' + row.id, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(function () {
+          return delObj(row.id)
+        }).then(data => {
+          _this.tableData.splice(index, 1)
+          _this.$message({
+            showClose: true,
+            message: '删除成功',
+            type: 'success'
+          })
+          this.getList(this.page)
+        })
+      },
+      handleUpdate: function (row, index, done, loading) {
+        putObj(row).then(data => {
+          this.tableData.splice(index, 1, Object.assign({}, row))
+          this.$message({
+            showClose: true,
+            message: '修改成功',
+            type: 'success'
+          })
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
+        })
+      },
+      handleSave: function (row, done, loading) {
+        addObj(row).then(data => {
+          this.tableData.push(Object.assign({}, row))
+          this.$message({
+            showClose: true,
+            message: '添加成功',
+            type: 'success'
+          })
+          done()
+          this.getList(this.page)
+        }).catch(() => {
+          loading()
         })
+      },
+      searchChange(form, done) {
+        this.searchForm = form
+        this.getList(this.page, form)
         done()
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize
+      },
+      currentChange(current) {
+        this.page.currentPage = current
+      },
+      refreshChange() {
         this.getList(this.page)
-      }).catch(() => {
-        loading()
-      })
-    },
-    searchChange(form) {
-      this.searchForm = form
-      this.getList(this.page, form)
-    },
-    refreshChange() {
-      this.getList(this.page)
+      }
     }
   }
-}
 </script>
-
-<style lang="scss" scoped>
-</style>

+ 10 - 4
src/views/pay/orders/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -134,9 +136,16 @@ export default {
         loading()
       })
     },
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
     refreshChange() {
       this.getList(this.page)
@@ -144,6 +153,3 @@ export default {
   }
 }
 </script>
-
-<style lang="scss" scoped>
-</style>

+ 13 - 20
src/views/pay/paychannel/index.vue

@@ -27,6 +27,8 @@
         @on-load="getList"
         @search-change="searchChange"
         @refresh-change="refreshChange"
+        @size-change="sizeChange"
+        @current-change="currentChange"
         @row-update="handleUpdate"
         @row-save="handleSave"
         @row-del="rowDel"/>
@@ -89,7 +91,6 @@ export default {
       })
     },
     rowDel: function(row, index) {
-      var _this = this
       this.$confirm('是否确认删除ID为' + row.id, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -97,23 +98,13 @@ export default {
       }).then(function() {
         return delObj(row.id)
       }).then(data => {
-        _this.tableData.splice(index, 1)
-        _this.$message({
-          showClose: true,
-          message: '删除成功',
-          type: 'success'
-        })
+        this.$message.success('删除成功')
         this.getList(this.page)
       })
     },
     handleUpdate: function(row, index, done, loading) {
       putObj(row).then(data => {
-        this.tableData.splice(index, 1, Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '修改成功',
-          type: 'success'
-        })
+        this.$message.success('修改成功')
         done()
         this.getList(this.page)
       }).catch(() => {
@@ -122,21 +113,23 @@ export default {
     },
     handleSave: function(row, done, loading) {
       addObj(row).then(data => {
-        this.tableData.push(Object.assign({}, row))
-        this.$message({
-          showClose: true,
-          message: '添加成功',
-          type: 'success'
-        })
+        this.$message.success('添加成功')
         done()
         this.getList(this.page)
       }).catch(() => {
         loading()
       })
     },
-    searchChange(form) {
+    searchChange(form, done) {
       this.searchForm = form
       this.getList(this.page, form)
+      done()
+    },
+    sizeChange(pageSize){
+      this.page.pageSize = pageSize
+    },
+    currentChange(current){
+      this.page.currentPage = current
     },
     refreshChange() {
       this.getList(this.page)