diff --git a/src/views/dashboard/SingleMonthEcharts.vue b/src/views/dashboard/SingleMonthEcharts.vue
index 998cb7c..624ac64 100644
--- a/src/views/dashboard/SingleMonthEcharts.vue
+++ b/src/views/dashboard/SingleMonthEcharts.vue
@@ -4,6 +4,7 @@
@@ -39,6 +40,8 @@
+
+
@@ -72,6 +75,7 @@ import {MonthData} from '@views/statisticalReport/statisticData'
import {getAction} from '@api/manage'
import {formatMoney} from '@/utils/formatMoney'
import JYearDate from '@comp/jero/JYearDate'
+import SingleMonthComparisonModal from '@views/dashboard/modules/SingleMonthComparisonModal'
const columns = [
{
@@ -104,6 +108,7 @@ columns.push({
export default {
name: 'SingleMonthEcharts',
components:{
+ SingleMonthComparisonModal,
JYearDate
},
mixins: [JeroListMixin],
@@ -129,6 +134,10 @@ export default {
},
methods: {
formatMoney,
+ // 比对
+ handleComparison () {
+ this.$refs.singleMonthComparisonModal.open()
+ },
loadData(arg) {
if (!this.url.list) {
this.$message.error('请设置url.list属性!')
diff --git a/src/views/dashboard/SingleMonthTotalEcharts.vue b/src/views/dashboard/SingleMonthTotalEcharts.vue
index 140425c..568bf89 100644
--- a/src/views/dashboard/SingleMonthTotalEcharts.vue
+++ b/src/views/dashboard/SingleMonthTotalEcharts.vue
@@ -71,7 +71,7 @@ echarts.use([
ToolboxComponent
])
import {JeroListMixin} from '@/mixins/JeroListMixin'
-import {MonthDataTotal} from '@views/statisticalReport/statisticData'
+import {MonthData} from '@views/statisticalReport/statisticData'
import {getAction} from '@api/manage'
import {formatMoney} from '@/utils/formatMoney'
import JYearDate from '@comp/jero/JYearDate'
@@ -86,7 +86,7 @@ const columns = [
scopedSlots: {customRender: 'text'}
},
]
-MonthDataTotal.map(tt => {
+MonthData.map(tt => {
columns.push({
title: tt.name,
align: 'center',
@@ -155,7 +155,7 @@ export default {
]
dataSource.map((item, index) => {
- let keyItem = MonthDataTotal.find(ele => Number(ele.value) === (index + 1))
+ let keyItem = MonthData.find(ele => Number(ele.value) === (index + 1))
if (keyItem) {
let key = keyItem.key
tableData[0][key] = item.estimatedArrivalMoney // 预估收入金额--也可能放在第一条
@@ -195,7 +195,7 @@ export default {
},
initEcharts() {
// 处理x轴数据
- let xData = MonthDataTotal.reduce((pre, val) => {
+ let xData = MonthData.reduce((pre, val) => {
return pre.concat(val.name)
}, [])
diff --git a/src/views/dashboard/modules/SingleMonthComparisonModal.vue b/src/views/dashboard/modules/SingleMonthComparisonModal.vue
new file mode 100644
index 0000000..6f5f2ba
--- /dev/null
+++ b/src/views/dashboard/modules/SingleMonthComparisonModal.vue
@@ -0,0 +1,686 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 比对
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ text }}
+ {{ text }}
+
+
+
+
+
+ {{ formatMoney(text) }}
+ {{ formatMoney(text) }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/dashboard/modules/SingleMonthTotalComparisonModal.vue b/src/views/dashboard/modules/SingleMonthTotalComparisonModal.vue
index 7792c4a..7fd24be 100644
--- a/src/views/dashboard/modules/SingleMonthTotalComparisonModal.vue
+++ b/src/views/dashboard/modules/SingleMonthTotalComparisonModal.vue
@@ -5,7 +5,7 @@
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
- fullscreen
+ :fullscreen.sync="fullscreen"
:footer="null"
@cancel="handleCancel"
cancelText="关闭">
@@ -15,12 +15,12 @@
-
+
-
+
@@ -34,7 +34,7 @@
-
+
@@ -124,10 +124,12 @@ export default {
data () {
return {
columns,
- title: '比对',
- width: 800,
+ title: '全院经营数据统计 (累计) 比对',
+ width: 1000,
visible: false,
confirmLoading: false,
+ // 是否全屏
+ fullscreen: true,
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
@@ -149,6 +151,14 @@ export default {
dataSource: [],
}
},
+ watch: {
+ // 弹框大小改变时重置统计图大小
+ fullscreen () {
+ this.$nextTick(() => {
+ this.myChart && this.myChart.resize()
+ })
+ }
+ },
methods: {
formatMoney,
// 查询
@@ -292,6 +302,7 @@ export default {
}
},
legend: {
+ type: 'scroll',
data: legend,
right: '2%'
},
@@ -605,7 +616,6 @@ export default {
option && myChart.setOption(option)
window.addEventListener('resize', () => {
- console.log('resize')
myChart.resize()
})
},