处理分页查询报错的问题
This commit is contained in:
		
							parent
							
								
									51303a266f
								
							
						
					
					
						commit
						995931c822
					
				|  | @ -1,6 +1,7 @@ | |||
| import Vue from 'vue' | ||||
| import { axios } from '@/utils/request' | ||||
| import signMd5Utils from '@/utils/encryption/signMd5Utils' | ||||
| import qs from "qs"; | ||||
| 
 | ||||
| const api = { | ||||
|   user: '/mock/api/user', | ||||
|  | @ -65,6 +66,9 @@ export function getAction(url,parameter) { | |||
|     url: url, | ||||
|     method: 'get', | ||||
|     params: parameter, | ||||
|     paramsSerializer: function (params) {   | ||||
|       return qs.stringify(params, { arrayFormat: "repeat" });   | ||||
|     }, | ||||
|     headers: signHeader | ||||
|   }) | ||||
| } | ||||
|  |  | |||
|  | @ -128,7 +128,8 @@ export default { | |||
|       url: { | ||||
|         list: '/alarmLog/findPage' | ||||
|       }, | ||||
|       pieTotal:0 | ||||
|       pieTotal: 0, | ||||
|       paramsArg: {} | ||||
|     } | ||||
|   }, | ||||
|   mounted () { | ||||
|  | @ -138,7 +139,12 @@ export default { | |||
|     getUid() { | ||||
|       return (Math.random()+new Date().getTime()).toString(32).slice(0,8) | ||||
|     }, | ||||
|     handleSearch({ startDate, endDate,types }) { | ||||
|     handleSearch({ startDate, endDate, types }) { | ||||
|       this.paramsArg = { | ||||
|         startDate, | ||||
|         endDate, | ||||
|         types | ||||
|       } | ||||
|       this.getAlarmLogBar({ startDate, endDate }) | ||||
|       this.getTypeAlarmPie({ startDate, endDate }) | ||||
|       this.getAlarmLogTable({ startDate, endDate, types }) | ||||
|  | @ -164,7 +170,7 @@ export default { | |||
|       let params = { | ||||
|         pageNo: this.ipagination.current, | ||||
|         pageSize: this.ipagination.pageSize, | ||||
|         type:obj.types, | ||||
|         type:obj.types || null, | ||||
|         startDate:obj.startDate, | ||||
|         endDate:obj.endDate | ||||
|       } | ||||
|  | @ -261,12 +267,12 @@ export default { | |||
|     handlePageChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|       this.getAlarmLogTable() | ||||
|       this.getAlarmLogTable(this.paramsArg) | ||||
|     }, | ||||
|     handleSizeChange(current, size) { | ||||
|       this.ipagination.current = current | ||||
|       this.ipagination.pageSize = size | ||||
|       this.getAlarmLogTable() | ||||
|       this.getAlarmLogTable(this.paramsArg) | ||||
|     }, | ||||
|     handleTabChange(key) { | ||||
|       console.log(key); | ||||
|  |  | |||
|  | @ -34,6 +34,7 @@ | |||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import dateFormat from '@/components/jeecg/JEasyCron/format-date' | ||||
| import SearchBar from '../../components/searchBar'; | ||||
| import TableList from '../../components/tableList.vue'; | ||||
| import { getAction,postAction,httpAction,deleteAction } from '@/api/manage' | ||||
|  | @ -79,11 +80,12 @@ export default { | |||
|       nameOptions: [], | ||||
|       dataSource: [], | ||||
|       loading: false, | ||||
|        | ||||
|       paramsArg: {} | ||||
|     } | ||||
|   }, | ||||
|   mounted () { | ||||
|     this.getDbList(); | ||||
|     this.getDbAlarmHistory({startDate:dateFormat(new Date(), 'yyyy-MM-dd'),endDate:dateFormat(new Date(), 'yyyy-MM-dd')}) | ||||
|   }, | ||||
|   methods: { | ||||
|     getDbList() { | ||||
|  | @ -101,13 +103,17 @@ export default { | |||
|       }) | ||||
|     }, | ||||
|     handleSearch({ startDate, endDate, names }) { | ||||
|       console.log(startDate, endDate, names); | ||||
|       this.paramsArg = { | ||||
|         startDate, | ||||
|         endDate, | ||||
|         names | ||||
|       } | ||||
|       this.getDbAlarmHistory({ startDate, endDate, names }) | ||||
|     }, | ||||
|     getDbAlarmHistory(obj) { | ||||
|       this.loading = true | ||||
|       let params = { | ||||
|         sourceId: obj.names, | ||||
|         sourceId: obj.names||null, | ||||
|         startDate:obj.startDate, | ||||
|         endDate: obj.endDate, | ||||
|         pageNo: this.ipagination.current, | ||||
|  | @ -129,12 +135,12 @@ export default { | |||
|     handlePageChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|       this.getDbAlarmHistory() | ||||
|       this.getDbAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|     handleSizeChange(current, size) { | ||||
|       this.ipagination.current = current | ||||
|       this.ipagination.pageSize = size | ||||
|       this.getDbAlarmHistory() | ||||
|       this.getDbAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  |  | |||
|  | @ -34,6 +34,7 @@ | |||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import dateFormat from '@/components/jeecg/JEasyCron/format-date' | ||||
| import SearchBar from '../../components/searchBar'; | ||||
| import TableList from '../../components/tableList.vue'; | ||||
| import { getAction,postAction,httpAction,deleteAction } from '@/api/manage' | ||||
|  | @ -79,11 +80,12 @@ export default { | |||
|       nameOptions: [], | ||||
|       dataSource: [], | ||||
|       loading: false, | ||||
|        | ||||
|       paramsArg: {} | ||||
|     } | ||||
|   }, | ||||
|   mounted () { | ||||
|     this.getEmailList(); | ||||
|     this.getEmailAlarmHistory({startDate:dateFormat(new Date(), 'yyyy-MM-dd'),endDate:dateFormat(new Date(), 'yyyy-MM-dd')}) | ||||
|   }, | ||||
|   methods: { | ||||
|     getEmailList() { | ||||
|  | @ -101,13 +103,17 @@ export default { | |||
|       }) | ||||
|     }, | ||||
|     handleSearch({ startDate, endDate, names }) { | ||||
|       console.log(startDate, endDate, names); | ||||
|       this.paramsArg = { | ||||
|         startDate, | ||||
|         endDate, | ||||
|         names | ||||
|       } | ||||
|       this.getEmailAlarmHistory({ startDate, endDate, names }) | ||||
|     }, | ||||
|     getEmailAlarmHistory(obj) { | ||||
|       this.loading = true | ||||
|       let params = { | ||||
|         sourceId: obj.names, | ||||
|         sourceId: obj.names||null, | ||||
|         startDate:obj.startDate, | ||||
|         endDate: obj.endDate, | ||||
|         pageNo: this.ipagination.current, | ||||
|  | @ -129,12 +135,12 @@ export default { | |||
|     handlePageChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|       this.getEmailAlarmHistory() | ||||
|       this.getEmailAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|     handleSizeChange(current, size) { | ||||
|       this.ipagination.current = current | ||||
|       this.ipagination.pageSize = size | ||||
|       this.getEmailAlarmHistory() | ||||
|       this.getEmailAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  |  | |||
|  | @ -34,6 +34,7 @@ | |||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import dateFormat from '@/components/jeecg/JEasyCron/format-date' | ||||
| import SearchBar from '../../components/searchBar'; | ||||
| import TableList from '../../components/tableList.vue'; | ||||
| import { getAction,postAction,httpAction,deleteAction } from '@/api/manage' | ||||
|  | @ -79,11 +80,12 @@ export default { | |||
|       nameOptions: [], | ||||
|       dataSource: [], | ||||
|       loading: false, | ||||
|        | ||||
|       paramsArg: {} | ||||
|     } | ||||
|   }, | ||||
|   mounted () { | ||||
|     this.getServerList(); | ||||
|     this.getServerAlarmHistory({startDate:dateFormat(new Date(), 'yyyy-MM-dd'),endDate:dateFormat(new Date(), 'yyyy-MM-dd')}) | ||||
|   }, | ||||
|   methods: { | ||||
|     getServerList() { | ||||
|  | @ -101,13 +103,17 @@ export default { | |||
|       }) | ||||
|     }, | ||||
|     handleSearch({ startDate, endDate, names }) { | ||||
|       console.log(startDate, endDate, names); | ||||
|       this.paramsArg = { | ||||
|         startDate, | ||||
|         endDate, | ||||
|         names | ||||
|       } | ||||
|       this.getServerAlarmHistory({ startDate, endDate, names }) | ||||
|     }, | ||||
|     getServerAlarmHistory(obj) { | ||||
|       this.loading = true | ||||
|       let params = { | ||||
|         sourceId: obj.names, | ||||
|         sourceId: obj.names||null, | ||||
|         startDate:obj.startDate, | ||||
|         endDate: obj.endDate, | ||||
|         pageNo: this.ipagination.current, | ||||
|  | @ -129,12 +135,12 @@ export default { | |||
|     handlePageChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|       this.getServerAlarmHistory() | ||||
|       this.getServerAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|     handleSizeChange(current, size) { | ||||
|       this.ipagination.current = current | ||||
|       this.ipagination.pageSize = size | ||||
|       this.getServerAlarmHistory() | ||||
|       this.getServerAlarmHistory(this.paramsArg) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user