|
@@ -10,7 +10,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="block">
|
|
|
- <item-title title="月用工统计"></item-title>
|
|
|
+ <item-title title="月用工平均值"></item-title>
|
|
|
<div class="box" ref="chart1"></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -212,8 +212,8 @@ export default {
|
|
|
const tempObj = {}
|
|
|
const hData = this.huamingce_config.data
|
|
|
|
|
|
- for (let i = 4; i > 0; i--) {
|
|
|
- this.yonggongjihua_config.header.push(dayjs().subtract(i, 'day').format('MM-DD'))
|
|
|
+ for (let i = 1; i < 5; i++) {
|
|
|
+ this.yonggongjihua_config.header.push(dayjs().add(i, 'day').format('MM-DD'))
|
|
|
}
|
|
|
dayjs().format('YYYY-MM-DD');
|
|
|
for (const item of hData) {
|
|
@@ -227,6 +227,7 @@ export default {
|
|
|
}
|
|
|
var data = []
|
|
|
var data1 = []
|
|
|
+ console.log('tempObj',tempObj)
|
|
|
for (const key of Object.keys(tempObj)) {
|
|
|
data.push([key, tempObj[key], '-'])
|
|
|
var max = tempObj[key]
|
|
@@ -237,8 +238,108 @@ export default {
|
|
|
data1.push([key, RandomNumBoth(min, max), RandomNumBoth(min, max), RandomNumBoth(min, max), RandomNumBoth(min, max)])
|
|
|
}
|
|
|
this.renshu_config.data = data
|
|
|
+ console.log('data1',data1)
|
|
|
|
|
|
- this.yonggongjihua_config.data = data1
|
|
|
+ this.yonggongjihua_config.data = [
|
|
|
+ [
|
|
|
+ "防水",
|
|
|
+ 8,
|
|
|
+ 9,
|
|
|
+ 2,
|
|
|
+ 1
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "喷漆",
|
|
|
+ 2,
|
|
|
+ 1,
|
|
|
+ 2,
|
|
|
+ 2
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "外墙",
|
|
|
+ 20,
|
|
|
+ 23,
|
|
|
+ 9,
|
|
|
+ 19
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "架子工",
|
|
|
+ 26,
|
|
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,26 +375,29 @@ export default {
|
|
|
|
|
|
var riqi = []
|
|
|
var data2 = []
|
|
|
- for (var i = 10; i >= 0; i--) {
|
|
|
+ for (var i = 6; i >= 0; i--) {
|
|
|
var r = dayjs().subtract(i, 'day')
|
|
|
var rStr = r.format('MM-DD')
|
|
|
riqi.push(rStr)
|
|
|
var d = r.format('D')
|
|
|
console.log('d', d)
|
|
|
- if (d == 5 || d == 30) {
|
|
|
- data2.push(22)
|
|
|
+ if (d == 16) {
|
|
|
+ data2.push(133)
|
|
|
+ } else if (d == 15) {
|
|
|
+ data2.push(161)
|
|
|
+ } else if (d == 14) {
|
|
|
+ data2.push(197)
|
|
|
+ } else if (d == 13) {
|
|
|
+ data2.push(203)
|
|
|
} else if (d == 12) {
|
|
|
- data2.push(40)
|
|
|
- } else {
|
|
|
- if (d % 10 > 8) {
|
|
|
- data2.push(48)
|
|
|
- } else if (d % 10 > 5) {
|
|
|
- data2.push(43)
|
|
|
- } else {
|
|
|
- data2.push(43)
|
|
|
- }
|
|
|
+ data2.push(184)
|
|
|
+ } else if (d == 11) {
|
|
|
+ data2.push(190)
|
|
|
+ } else if (d == 10) {
|
|
|
+ data2.push(168)
|
|
|
}
|
|
|
}
|
|
|
+ console.log('data2',data2)
|
|
|
const option2 = {
|
|
|
xAxis: {
|
|
|
type: 'category',
|