|
@@ -0,0 +1,52 @@
|
|
|
+<template>
|
|
|
+ <AnalysisPage class="white pa-3" :search-api="getSalaryStatistics" :search-config="searchConfig" :value-fn="valueFn"></AnalysisPage>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ getSalaryStatistics
|
|
|
+} from '@/api/salary'
|
|
|
+import AnalysisPage from '@/components/Analysis'
|
|
|
+export default {
|
|
|
+ name: 'trendStatistics',
|
|
|
+ components: {
|
|
|
+ AnalysisPage
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ getSalaryStatistics,
|
|
|
+ searchConfig: [
|
|
|
+ {
|
|
|
+ label: '时间范围',
|
|
|
+ type: 'datePicker',
|
|
|
+ prop: 'month',
|
|
|
+ options: {
|
|
|
+ rangeSeparator: '至',
|
|
|
+ startPlaceholder: '开始时间',
|
|
|
+ endPlaceholder: '结束时间',
|
|
|
+ valueFormat: 'yyyy-MM-dd',
|
|
|
+ type: 'daterange'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ valueFn (data) {
|
|
|
+ const { month, ...obj } = data
|
|
|
+ if (!month || !month.length) {
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...obj,
|
|
|
+ startDate: month[0],
|
|
|
+ endDate: month[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+</style>
|