|
@@ -317,7 +317,8 @@
|
|
|
</a-radio-group>
|
|
|
<a-range-picker format="YYYY-MM-DD" style="float: right;" v-model="priceRangeDate"
|
|
|
:disabled-date="disabledDate" :allowClear="false" dropdownClassName="range-pick-echart"
|
|
|
- @change="changePriceRangeDate" />
|
|
|
+ @change="changePriceRangeDate" @openChange="onOpenChange"
|
|
|
+ @calendarChange="onCalendarChange" />
|
|
|
|
|
|
<div class="chart-container">
|
|
|
<div class="chart" ref="chart" v-if="chartPie"></div>
|
|
@@ -563,15 +564,26 @@
|
|
|
calendarPriceRangeChange(date) {
|
|
|
this.selectPriceDate = date[0]
|
|
|
},
|
|
|
+ onOpenChange (status) {
|
|
|
+ // 清空禁用时间段的设置
|
|
|
+ this.selectPriceDate = null
|
|
|
+ },
|
|
|
+ onCalendarChange (dates) {
|
|
|
+ // 获取手动选择的时间段起始值
|
|
|
+ this.selectPriceDate = dates[0]
|
|
|
+ },
|
|
|
//根据选择的开始时间/结束时间,动态渲染要禁用的日期
|
|
|
disabledDate(current) {
|
|
|
- if (this.selectPriceDate) {
|
|
|
- let selectV = moment(this.selectPriceDate, 'YYYY-MM-DD').valueOf()
|
|
|
- return current > moment(new Date(selectV + this.offsetDays), 'YYYY-MM-DD') ||
|
|
|
- current < moment(new Date(selectV - this.offsetDays), 'YYYY-MM-DD')
|
|
|
- } else {
|
|
|
- return current && current > moment().endOf('day')
|
|
|
- }
|
|
|
+ if (!this.selectPriceDate) return current && current > moment().endOf('day')
|
|
|
+ return (current && current < moment(this.selectPriceDate).subtract(1, 'M').startOf('day')) || current > moment(this.selectPriceDate).add(1, 'M').endOf('day') || current && current > moment().endOf('day')
|
|
|
+ // if (this.selectPriceDate) {
|
|
|
+ // let selectV = moment(this.selectPriceDate, 'YYYY-MM-DD').valueOf()
|
|
|
+ // return current > moment(new Date(selectV + this.offsetDays), 'YYYY-MM-DD') ||
|
|
|
+ // current < moment(new Date(selectV - this.offsetDays), 'YYYY-MM-DD')
|
|
|
+ // } else {
|
|
|
+
|
|
|
+ // return current && current > moment().endOf('day')
|
|
|
+ // }
|
|
|
|
|
|
},
|
|
|
|
|
@@ -620,6 +632,8 @@
|
|
|
this.getAction(process.env.VUE_APP_BASE_MATERIAL_URL + '/boss/bossDataExhibitionController/getCompanyMeterialConsume', paramsTwo).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
resultArray = res.result;
|
|
|
+ // resultArray.push({area:'聚义',cost:2050422.25},{area:'华南',cost:5050422.25})
|
|
|
+ // console.log(resultArray);
|
|
|
if (resultArray.length > 0) {
|
|
|
this.emptyShowTwo = true;
|
|
|
resultArray.forEach(element => {
|
|
@@ -771,7 +785,7 @@
|
|
|
itemGap: 20,
|
|
|
itemWidth: 15,
|
|
|
itemHeight: 10,
|
|
|
- padding: [-20, 0, 0, 80],
|
|
|
+ padding: [-45, 0, 0, 80],
|
|
|
bottom: '55%',
|
|
|
formatter: function (name) { //该函数用于设置图例显示后的百分比
|
|
|
var data = list
|
|
@@ -869,7 +883,12 @@
|
|
|
}, {
|
|
|
value: payPersonNum[5],
|
|
|
itemStyle: {
|
|
|
- color: '#40E0D0'
|
|
|
+ color: 'rgba(0,255,127,1.0)'
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ value: payPersonNum[6],
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(255,192,203,1.0)'
|
|
|
}
|
|
|
},
|
|
|
]
|
|
@@ -907,6 +926,16 @@
|
|
|
itemStyle: {
|
|
|
color: 'rgba(182,105,86,.1)'
|
|
|
}
|
|
|
+ },{
|
|
|
+ value: Math.max.apply(null, payPersonNum),
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(0,255,127,.1)'
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ value: Math.max.apply(null, payPersonNum),
|
|
|
+ itemStyle: {
|
|
|
+ color: 'rgba(255,192,203,.1)'
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
if (VALUE1.length != VALUE2.length) {
|
|
@@ -963,7 +992,7 @@
|
|
|
echarts.graphic.registerShape('CubeLeft', CubeLeft)
|
|
|
echarts.graphic.registerShape('CubeRight', CubeRight)
|
|
|
echarts.graphic.registerShape('CubeTop', CubeTop)
|
|
|
- const MAX = [300, 300, 300, 300, 300, 300]
|
|
|
+ const MAX = [300, 300, 300, 300, 300, 300,300]
|
|
|
const VALUE = payPersonNum
|
|
|
let option = {
|
|
|
backgroundColor: "transparent",
|