Merge branch 'feature-particulate-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into feature-particulate-renpy
This commit is contained in:
commit
e74839183b
22
src/views/statistics/commom.js
Normal file
22
src/views/statistics/commom.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
const compareDate = function (start, end) {
|
||||||
|
if (start == null || start.length==0 || end == null || end.length ==0) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var arr=start.split("-");
|
||||||
|
var starttime=new Date(arr[0],parseInt(arr[1]-1),arr[2]);
|
||||||
|
var starttimes=starttime.getTime();
|
||||||
|
|
||||||
|
var arrs=end.split("-");
|
||||||
|
var endtime=new Date(arrs[0],parseInt(arrs[1]-1),arrs[2]);
|
||||||
|
var endtimes=endtime.getTime();
|
||||||
|
|
||||||
|
var intervalTime = endtimes-starttimes;//两个日期相差的毫秒数 一天86400000毫秒
|
||||||
|
var Inter_Days = ((intervalTime).toFixed(2)/86400000)+1;//加1,是让同一天的两个日期返回一天
|
||||||
|
|
||||||
|
return Inter_Days;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export {
|
||||||
|
compareDate
|
||||||
|
}
|
|
@ -90,6 +90,7 @@ const columns = [
|
||||||
dataIndex: 'aveWindSpeed',
|
dataIndex: 'aveWindSpeed',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
import { compareDate } from "../../commom"
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction } from '../../../../api/manage'
|
import { getAction } from '../../../../api/manage'
|
||||||
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
||||||
|
@ -122,12 +123,9 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
this.queryParam = {
|
|
||||||
startTime: "2023-01-01",
|
|
||||||
endTime: "2023-07-10",
|
|
||||||
stationIds: [209, 210]
|
|
||||||
}
|
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
|
@ -141,6 +139,9 @@ export default {
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.info("Maximum timespan duration is 10 days. Please, change start or end date.")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
findStationList() {
|
findStationList() {
|
||||||
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
||||||
|
|
|
@ -74,6 +74,7 @@ const columns = [
|
||||||
dataIndex: 'alertText',
|
dataIndex: 'alertText',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
import { compareDate } from "../../commom"
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction } from '../../../../api/manage'
|
import { getAction } from '../../../../api/manage'
|
||||||
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
||||||
|
@ -106,12 +107,14 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
this.queryParam = {
|
// this.queryParam = {
|
||||||
startTime: "2023-01-01",
|
// startTime: "2023-01-01",
|
||||||
endTime: "2023-07-10",
|
// endTime: "2023-07-10",
|
||||||
stationIds: [209, 210]
|
// stationIds: [209, 210]
|
||||||
}
|
// }
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
|
@ -125,6 +128,9 @@ export default {
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.info("Maximum timespan duration is 10 days. Please, change start or end date.")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
findStationList() {
|
findStationList() {
|
||||||
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
||||||
|
|
|
@ -70,6 +70,7 @@ const columns = [
|
||||||
dataIndex: 'sohId',
|
dataIndex: 'sohId',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
import { compareDate } from "../../commom"
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import { getAction } from '../../../../api/manage'
|
import { getAction } from '../../../../api/manage'
|
||||||
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
import dateFormat from '../../../../components/jeecg/JEasyCron/format-date'
|
||||||
|
@ -102,12 +103,14 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchQueryData() {
|
searchQueryData() {
|
||||||
|
let days = compareDate(this.queryParam.startTime, this.queryParam.endTime)
|
||||||
|
if (days <= 10) {
|
||||||
this.isImmediate = false
|
this.isImmediate = false
|
||||||
this.queryParam = {
|
// this.queryParam = {
|
||||||
startTime: "2023-01-01",
|
// startTime: "2023-01-01",
|
||||||
endTime: "2023-07-10",
|
// endTime: "2023-07-10",
|
||||||
stationIds: [209, 210]
|
// stationIds: [209, 210]
|
||||||
}
|
// }
|
||||||
let params = {
|
let params = {
|
||||||
...this.queryParam,
|
...this.queryParam,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
|
@ -121,6 +124,9 @@ export default {
|
||||||
this.dataSource = res.result.records
|
this.dataSource = res.result.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.info("Maximum timespan duration is 10 days. Please, change start or end date.")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
findStationList() {
|
findStationList() {
|
||||||
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
getAction(this.url.findStationList, { menuName: '' }).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user