Lmm il y a 1 an
Parent
commit
986e6fee50
1 fichiers modifiés avec 11 ajouts et 2 suppressions
  1. 11 2
      src/App.vue

+ 11 - 2
src/App.vue

@@ -86,7 +86,7 @@ export default {
 	data() {
 		return {
 			queryParams: {
-				page_index: 0,
+				page_index: 1,
 				page_size: 10,
 				project_id: undefined,
 				box_id: undefined,
@@ -116,8 +116,16 @@ export default {
 	methods: {
 		/** 获取项目列表 */
 		getProjects() {
+			var params =  {
+				page_index: Math.max(0, this.queryParams.page_index - 1),
+				page_size: this.queryParams.page_size,
+				project_id: this.queryParams.project_id,
+				box_id: this.queryParams.box_id,
+				online_status: this.queryParams.online_status,
+				run_mode: this.queryParams.run_mode
+			};
 			axios
-				.post('http://47.110.15.40:9001/proj/reportList', this.queryParams)
+				.post('http://47.110.15.40:9001/proj/reportList', params)
 				.then(resp => {
 					let data = resp.data || {};
 					let result = data.result || {};
@@ -235,6 +243,7 @@ export default {
 			});
 			return data;
 		},
+		
 		objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 			const span = column["property"] + "-span";
 			if(row[span]) {