From 5af00a33d09f29a032bc0b1aee57c64440c9e0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Wed, 1 Jan 2020 21:17:05 +0800 Subject: [PATCH] :arrow_up: Upgrading dependencies. spring boot admin 2.2.2 --- pig-codegen/src/main/resources/template/crud.js.vm | 1 + .../src/main/resources/template/index.vue.vm | 14 +++++++++++--- pig-monitor/pom.xml | 5 +++++ .../pig/monitor/PigMonitorApplication.java | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pig-codegen/src/main/resources/template/crud.js.vm b/pig-codegen/src/main/resources/template/crud.js.vm index ba643de4..dcaa6388 100755 --- a/pig-codegen/src/main/resources/template/crud.js.vm +++ b/pig-codegen/src/main/resources/template/crud.js.vm @@ -22,6 +22,7 @@ export const tableOption = { stripe: true, menuAlign: 'center', align: 'center', + searchMenuSpan: 6, column: [ #foreach ($column in $columns) { diff --git a/pig-codegen/src/main/resources/template/index.vue.vm b/pig-codegen/src/main/resources/template/index.vue.vm index c092ab98..21278cd5 100755 --- a/pig-codegen/src/main/resources/template/index.vue.vm +++ b/pig-codegen/src/main/resources/template/index.vue.vm @@ -10,6 +10,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"> @@ -63,7 +65,6 @@ }) }, rowDel: function (row, index) { - var _this = this this.$confirm('是否确认删除ID为' + row.$pk.lowerAttrName, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -71,7 +72,7 @@ }).then(function () { return delObj(row.$pk.lowerAttrName) }).then(data => { - _this.$message.success('删除成功') + this.$message.success('删除成功') this.getList(this.page) }) }, @@ -93,9 +94,16 @@ loading(); }); }, - searchChange(form) { + sizeChange(pageSize){ + this.page.pageSize = pageSize + }, + currentChange(current){ + this.page.currentPage = current + }, + searchChange(form, done) { this.searchForm = form this.getList(this.page, form) + done() }, refreshChange() { this.getList(this.page) diff --git a/pig-monitor/pom.xml b/pig-monitor/pom.xml index b8f2f9ec..7810593e 100755 --- a/pig-monitor/pom.xml +++ b/pig-monitor/pom.xml @@ -51,6 +51,11 @@ org.springframework.boot spring-boot-starter-undertow + + + org.springframework.boot + spring-boot-starter-web + org.springframework.boot diff --git a/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java b/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java index 367fac7c..1929c047 100755 --- a/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java +++ b/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java @@ -19,7 +19,7 @@ package com.pig4cloud.pig.monitor; import de.codecentric.boot.admin.server.config.EnableAdminServer; import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.SpringCloudApplication; /** * @author lengleng @@ -27,7 +27,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * 监控中心 */ @EnableAdminServer -@SpringBootApplication +@SpringCloudApplication public class PigMonitorApplication { public static void main(String[] args) {