Commit 2242831b5484d32a4da5d29352d3a09dedddbdfd
1 parent
32daf0ed
进出场
Showing
4 changed files
with
50 additions
and
22 deletions
src/components/orderMessage/index.vue
| ... | ... | @@ -68,7 +68,6 @@ |
| 68 | 68 | orgIds: [10003,10005] |
| 69 | 69 | }).then((response)=>{ |
| 70 | 70 | let data = response.data.data |
| 71 | - console.log(data) | |
| 72 | 71 | this.list = data; |
| 73 | 72 | setInterval(this.scroll, 2000) |
| 74 | 73 | }).catch((response)=>{ |
| ... | ... | @@ -109,6 +108,7 @@ |
| 109 | 108 | line-height: 40px; |
| 110 | 109 | font-size: 14px; |
| 111 | 110 | li{ |
| 111 | + height: 40px; | |
| 112 | 112 | float: left; |
| 113 | 113 | padding-left: 0; |
| 114 | 114 | padding-left: 30px; |
| ... | ... | @@ -116,6 +116,7 @@ |
| 116 | 116 | background-position: 10px center; |
| 117 | 117 | background-repeat: no-repeat; |
| 118 | 118 | list-style: none; |
| 119 | + overflow: hidden; | |
| 119 | 120 | } |
| 120 | 121 | .orderNum{ |
| 121 | 122 | width: 80px; | ... | ... |
src/components/weekAndDay/index.vue
src/components/weekAndDay/uDay.vue
| ... | ... | @@ -25,21 +25,38 @@ |
| 25 | 25 | * 进出场折线图 |
| 26 | 26 | * */ |
| 27 | 27 | mounted() { |
| 28 | - this.lineChart=this.createLine(); | |
| 29 | - window.addEventListener('resize', function() { | |
| 30 | - this.lineChart.resize() | |
| 31 | - }.bind(this)); | |
| 28 | + | |
| 29 | + this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForToday',{ | |
| 30 | + orgIds: [10003,10005] | |
| 31 | + }).then((response)=>{ | |
| 32 | + let data = response.data.data | |
| 33 | + console.log(data) | |
| 34 | + let xData=[],inNum=[],outNum=[] | |
| 35 | + for(let i=0;i<data.length;i++){ | |
| 36 | + xData.push(data[i].queryDate) | |
| 37 | + inNum.push(data[i].inNum) | |
| 38 | + outNum.push(data[i].outNum) | |
| 39 | + } | |
| 40 | + | |
| 41 | + this.lineChart=this.createLine(xData,inNum,outNum); | |
| 42 | + window.addEventListener('resize', function() { | |
| 43 | + this.lineChart.resize() | |
| 44 | + }.bind(this)); | |
| 45 | + }).catch((response)=>{ | |
| 46 | + console.log(response); | |
| 47 | + }) | |
| 48 | + | |
| 32 | 49 | }, |
| 33 | 50 | methods: { |
| 34 | - createLine(){ | |
| 51 | + createLine(xAxis_data,series_in,series_out){ | |
| 35 | 52 | // 基于准备好的dom,初始化echarts实例 |
| 36 | 53 | let lineChart = echarts.init(document.querySelector('.lineChart')); |
| 37 | 54 | let axisLineColor="#10377c"; |
| 38 | 55 | let axisLabelColor="#7c8799"; |
| 39 | 56 | let legend_data=['进场', '出场']; |
| 40 | - let xAxis_data=['06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00']; | |
| 41 | - let series_in=[220, 182, 191, 134, 150, 120,100]; | |
| 42 | - let series_out=[120, 82, 125, 145, 122, 191,150]; | |
| 57 | + // let xAxis_data=['06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00']; | |
| 58 | + // let series_in=[220, 182, 191, 134, 150, 120,100]; | |
| 59 | + // let series_out=[120, 82, 125, 145, 122, 191,150]; | |
| 43 | 60 | const option={ |
| 44 | 61 | grid: { |
| 45 | 62 | top: 13,left: 10, | ... | ... |
src/components/weekAndDay/uWeek.vue
| ... | ... | @@ -23,25 +23,39 @@ |
| 23 | 23 | } |
| 24 | 24 | }, |
| 25 | 25 | mounted() { |
| 26 | - this.weekChart=this.createLine(); | |
| 27 | - window.addEventListener('resize', function() { | |
| 28 | - this.weekChart.resize() | |
| 29 | - }.bind(this)); | |
| 26 | + this.axios.post('urban/intelligence/orderPark/queryOrderParkNumForLastWeek',{ | |
| 27 | + orgIds: [10003,10005] | |
| 28 | + }).then((response)=>{ | |
| 29 | + let data = response.data.data | |
| 30 | + let xData=[],inNum=[],outNum=[] | |
| 31 | + for(let i=0;i<data.length;i++){ | |
| 32 | + xData.push(data[i].queryDate) | |
| 33 | + inNum.push(data[i].inNum) | |
| 34 | + outNum.push(data[i].outNum) | |
| 35 | + } | |
| 36 | + this.weekChart=this.createLine(xData,inNum,outNum); | |
| 37 | + window.addEventListener('resize', function() { | |
| 38 | + this.weekChart.resize() | |
| 39 | + }.bind(this)); | |
| 40 | + }).catch((response)=>{ | |
| 41 | + console.log(response); | |
| 42 | + }) | |
| 43 | + | |
| 30 | 44 | }, |
| 31 | 45 | methods: { |
| 32 | - createLine(){ | |
| 46 | + createLine(xAxis_data,series_in,series_out){ | |
| 33 | 47 | // 基于准备好的dom,初始化echarts实例 |
| 34 | 48 | let lineChart = echarts.init(document.querySelector('.weekChart')); |
| 35 | 49 | let axisLineColor="#10377c"; |
| 36 | 50 | let axisLabelColor="#7c8799"; |
| 37 | 51 | let legend_data=['进场', '出场']; |
| 38 | - let xAxis_data=['10/1', '10/2', '10/3', '10/4', '10/5', '10/6', '10/7']; | |
| 39 | - let series_in=[220, 182, 191, 134, 150, 120,100]; | |
| 40 | - let series_out=[120, 82, 125, 145, 122, 191,150]; | |
| 52 | + // let xAxis_data=['10/1', '10/2', '10/3', '10/4', '10/5', '10/6', '10/7']; | |
| 53 | + // let series_in=[220, 182, 191, 134, 150, 120,100]; | |
| 54 | + // let series_out=[120, 82, 125, 145, 122, 191,150]; | |
| 41 | 55 | const option={ |
| 42 | 56 | grid: { |
| 43 | 57 | top: 13,left: 10, |
| 44 | - right: 10,bottom: 20, | |
| 58 | + right: 20,bottom: 20, | |
| 45 | 59 | containLabel: true |
| 46 | 60 | }, |
| 47 | 61 | tooltip: { | ... | ... |