Blame view

admin-web-master/src/views/detect/analyse.vue 31 KB
3f535f30   杨鑫   '初始'
1
2
  <template>
    <div style="background-color:#f7f7f7;padding:10px 10px;">
2bb042d7   wesley88   1
3
      <div class="zhuti ">
3f535f30   杨鑫   '初始'
4
5
6
7
8
9
10
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>招商资源监测</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">统计分析</span></div>
        </div>
        <div style="width: 100%;margin-bottom:30px;">
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
2bb042d7   wesley88   1
11
12
              <!-- <div style="margin-right: 10px;line-height:35px;">商铺/广告位资源统计</div> -->
              <!--        <el-select v-model="formSel.createDate" placeholder="所属区域" style="width: 150px;margin-right: 10px">
3f535f30   杨鑫   '初始'
13
14
15
16
17
18
19
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select>
              <el-select v-model="formSel.createDate" placeholder="经营类型" style="width: 150px;margin-right: 10px">
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select> -->
2bb042d7   wesley88   1
20
21
22
              <el-date-picker v-model="FormTime" value-format="yyyy-MM-dd" type="daterange" range-separator="-"
                start-placeholder="开始日期" end-placeholder="结束日期" style="width: 300px;margin-right: 10px;"
                prefix-icon="none">
3f535f30   杨鑫   '初始'
23
              </el-date-picker>
2bb042d7   wesley88   1
24
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff;">查询
3f535f30   杨鑫   '初始'
25
26
27
28
29
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button>
            </div>
ab818baa   杨鑫   '1'
30
31
            <div>
              <el-button @click="gitOut" style="background-color: #3F9B6A;color: #fff">导出
3f535f30   杨鑫   '初始'
32
              </el-button>
ab818baa   杨鑫   '1'
33
            </div>
3f535f30   杨鑫   '初始'
34
          </div>
2bb042d7   wesley88   1
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  
        </div>
         <div ref="contentToConvert">
        <TitleWithCircle title="商铺/广告位资源统计" style="margin: 20px 0;" />
        <div style="display:flex;">
          <div style="width:48%;height: 400px;">
            <div style="display: flex;justify-content: space-between;">
              <div style="line-height:35px;">资源数量增长趋势</div>
              <!-- <div>
                <el-select v-model="formSel.createDate" placeholder="状态" style="width: 100px;margin-right: 10px">
                  <el-option label="1" value="1" />
                  <el-option label="2" value="2" />
                </el-select>
                <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                  <el-option label="1" value="1" />
                  <el-option label="2" value="2" />
                </el-select>
              </div> -->
3f535f30   杨鑫   '初始'
53
            </div>
2bb042d7   wesley88   1
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
            <div ref="shop1ZX" style="width:100%;height: 400px;"></div>
          </div>
          <div style="width:48%;height: 400px;">
            <div style="display: flex;justify-content: space-between;">
              <div style="line-height:35px;">各资源数量统计</div>
              <!-- <div>
                <el-select v-model="formSel.createDate" placeholder="状态" style="width: 100px;margin-right: 10px">
                  <el-option label="1" value="1" />
                  <el-option label="2" value="2" />
                </el-select>
                <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                  <el-option label="1" value="1" />
                  <el-option label="2" value="2" />
                </el-select>
              </div> -->
3f535f30   杨鑫   '初始'
69
            </div>
2bb042d7   wesley88   1
70
            <div ref="shop1TJ" style="width:100%;height: 400px;"></div>
3f535f30   杨鑫   '初始'
71
72
          </div>
        </div>
2bb042d7   wesley88   1
73
74
        <TitleWithCircle title="商铺/广告位意向统计" style="margin: 20px 0;" />
        <div style="width: 100%;">
3f535f30   杨鑫   '初始'
75
76
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
2bb042d7   wesley88   1
77
              <!-- <div style="margin-right: 10px;line-height:35px;">商铺/广告位意向统计</div> -->
3f535f30   杨鑫   '初始'
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
              <!-- <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;margin-top:0px;" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button> -->
            </div>
            <!-- <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div> -->
          </div>
          <div style="display:flex;margin-top:10px;">
c3f8e431   wesley88   1
93
            <div style="width:48%;height: 400px;margin-right:20px;">
3f535f30   杨鑫   '初始'
94
95
96
97
98
99
100
101
102
103
104
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">租赁意向人群统计</div>
                <!-- <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div> -->
              </div>
              <div ref="shop2BT" style="width:100%;height: 400px;"></div>
            </div>
c3f8e431   wesley88   1
105
            <div style="width:48%;height: 400px;margin-right:20px;">
3f535f30   杨鑫   '初始'
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">意向申请数量</div>
                <!-- <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div> -->
              </div>
              <div ref="shop2TJ" style="width:100%;height: 400px;"></div>
            </div>
          </div>
        </div>
        <!-- <div style="width: 100%;margin-bottom:20px;">
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
              <div style="margin-right: 10px;line-height:35px;">商铺/广告位整体经营统计</div>
             <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;margin-top:0px;" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button>
            </div>
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div>
          </div>
          <div style="display:flex;margin-top:10px;">
2bb042d7   wesley88   1
138
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
139
140
141
142
143
144
145
146
147
148
149
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">经营趋势统计</div>
                <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div>
              </div>
              <div ref="shop3ZX" style="width:100%;height: 400px;"></div>
            </div>
2bb042d7   wesley88   1
150
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">营业收入情况</div>
                <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div>
              </div>
              <div ref="shop3TJ" style="width:100%;height: 400px;"></div>
            </div>
          </div>
        </div> -->
        <!-- 进度条 -->
        <!-- <div style="width: 100%;margin:20px 0;">
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
              <div style="margin-right: 10px;line-height:35px;">商户收费情况统计</div>
             <el-input placeholder="请输入商户名称" v-model="formSel.shopName" style="width:200px;margin-right:15px;" />
              <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;margin-top:0px;" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button>
            </div>
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div>
          </div>
          <div style="margin-top:10px;padding:20px">
            <div style="display:flex;margin-bottom:20px;" v-for="index in 5">
              <div style="margin-right:20px;">收费项{{index}}</div>
              <div style='width:90%'><el-progress :percentage="50"></el-progress></div>
            </div>
          </div>
        </div> -->
  
        <!-- <div style="width: 100%;margin:20px 0;">
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
              <div style="margin-right: 10px;line-height:35px;">收费位置统计</div>
              <el-input placeholder="请输入商户名称" v-model="formSel.shopName" style="width:200px;margin-right:15px;" />
              <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;margin-top:0px;" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button>
            </div>
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div>
          </div>
          <div style="margin-top:10px;padding:20px">
            <div style="display:flex;margin-bottom:20px;" v-for="index in 5">
              <div style="margin-right:20px;">线上商城{{index}}</div>
              <div style='width:90%'><el-progress :percentage="50"></el-progress></div>
            </div>
          </div>
        </div> -->
  
        <!-- <div style="width: 100%;margin-bottom:20px;">
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
              <div style="margin-right: 10px;line-height:35px;">出租、退租、续租统计</div>
              <el-select v-model="formSel.createDate" placeholder="所属区域" style="width: 150px;margin-right: 10px">
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select>
              <el-select v-model="formSel.createDate" placeholder="经营类型" style="width: 150px;margin-right: 10px">
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select>
              <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;ma" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button>
            </div>
            <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div>
          </div>
          <div style="display:flex;margin-top:10px;">
2bb042d7   wesley88   1
246
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
247
248
249
250
251
252
253
254
255
256
257
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">租赁趋势统计</div>
                <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div>
              </div>
              <div ref="shop4ZX" style="width:100%;height: 400px;"></div>
            </div>
2bb042d7   wesley88   1
258
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
259
260
261
262
263
264
265
266
267
268
269
270
271
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">租赁商户top5</div>
                <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div>
              </div>
              <div ref="shop4TJ" style="width:100%;height: 400px;"></div>
            </div>
          </div>
        </div> -->
2bb042d7   wesley88   1
272
273
        <TitleWithCircle title="合同情况统计" style="margin: 20px 0;" />
        <div style="width: 100%;">
3f535f30   杨鑫   '初始'
274
275
          <div style="display:flex;justify-content: space-between">
            <div style="display:flex;">
2bb042d7   wesley88   1
276
              <!-- <div style="margin-right: 10px;line-height:35px;">合同情况统计</div> -->
3f535f30   杨鑫   '初始'
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
              <!-- <el-select v-model="formSel.createDate" placeholder="所属区域" style="width: 150px;margin-right: 10px">
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select>
              <el-select v-model="formSel.createDate" placeholder="经营类型" style="width: 150px;margin-right: 10px">
                <el-option label="1" value="1" />
                <el-option label="2" value="2" />
              </el-select>
              <el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder="开始日期"
                end-placeholder="结束日期" style="width: 200px;margin-right: 10px;ma" prefix-icon="none">
              </el-date-picker>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">检索
              </el-button>
              <el-button @click="resetting" class="buttonHover"
                style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">重置
              </el-button> -->
            </div>
            <!-- <div>
              <el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">导出
              </el-button>
            </div> -->
          </div>
          <div style="display:flex;margin-top:10px;">
2bb042d7   wesley88   1
300
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
301
302
303
304
305
306
307
308
309
310
311
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">合同签约数量趋势</div>
                <!-- <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div> -->
              </div>
              <div ref="shop5ZX" style="width:100%;height: 400px;"></div>
            </div>
2bb042d7   wesley88   1
312
            <div style="width:48%;height: 400px;">
3f535f30   杨鑫   '初始'
313
314
315
316
317
318
319
320
321
322
323
324
325
              <div style="display: flex;justify-content: space-between;">
                <div style="line-height:35px;">签约数量占比</div>
                <!-- <div>
                  <el-select v-model="formSel.createDate" placeholder="类型" style="width: 100px;margin-right: 10px">
                    <el-option label="1" value="1" />
                    <el-option label="2" value="2" />
                  </el-select>
                </div> -->
              </div>
              <div ref="shop5BT" style="width:100%;height: 400px;"></div>
            </div>
          </div>
        </div>
2bb042d7   wesley88   1
326
      </div>
3f535f30   杨鑫   '初始'
327
328
329
330
331
332
      </div>
  
    </div>
  </template>
  
  <script>
2bb042d7   wesley88   1
333
334
335
    import html2canvas from 'html2canvas'
    import jsPDF from 'jspdf'
    import TitleWithCircle from '@/components/top/index';
3f535f30   杨鑫   '初始'
336
337
338
339
    import {
      statistical,
    } from '@/api/information'
    import * as echarts from 'echarts'
2bb042d7   wesley88   1
340
341
342
    import {
      async
    } from 'q';
3f535f30   杨鑫   '初始'
343
    export default {
2bb042d7   wesley88   1
344
345
346
      components: {
        TitleWithCircle,
      },
3f535f30   杨鑫   '初始'
347
348
349
350
351
352
353
354
355
      name: 'atmosphereGl',
      data() {
        return {
          currentPage: 1,
          radio1: 0,
          total: 100,
          flag: false,
          pageSize: 10,
          tableData: [],
2bb042d7   wesley88   1
356
          FormTime: [],
3f535f30   杨鑫   '初始'
357
          pageindex: {
2bb042d7   wesley88   1
358
359
            startTime: "1990-09-11",
            endTime: "2024-11-09"
3f535f30   杨鑫   '初始'
360
361
362
363
364
365
366
367
          },
          formSel: {
  
          }
        }
      },
      computed: {},
      created() {
c3f8e431   wesley88   1
368
369
370
371
372
373
374
375
        //获取今天日期和一个月前的日期
        let today = new Date();
        let monthAgo = new Date();
        monthAgo.setMonth(monthAgo.getMonth() - 1);
        monthAgo.setDate(monthAgo.getDate() + 1);
        this.pageindex.startTime = monthAgo.toISOString().slice(0, 10);
        this.pageindex.endTime = today.toISOString().slice(0, 10);
        this.FormTime = [
2bb042d7   wesley88   1
376
377
          this.pageindex.startTime,
          this.pageindex.endTime
c3f8e431   wesley88   1
378
379
        ]
        console.error(this.pageindex)
3f535f30   杨鑫   '初始'
380
381
382
383
384
        this.getAll()
  
      },
      mounted() {
  
e5b57447   杨鑫   '分包问卷'
385
386
387
        // this.charDam1()
        // this.charDam2()
        // this.charDam3()
3f535f30   杨鑫   '初始'
388
389
390
        // this.charDam4()
        // this.charDam5()
  
e5b57447   杨鑫   '分包问卷'
391
392
        // this.charDam7()
  
3f535f30   杨鑫   '初始'
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
        // this.charDam9()
      },
      methods: {
        charDam(datas) {
          let Dom = this.$refs.shop2TJ
          let myChart = echarts.init(Dom)
          let processedData = datas.map(item => ({
            name: item.trendDate,
            value: item.trendQuantity
          }))
          let option = {
            legend: {},
            tooltip: {},
            xAxis: {
              type: 'category',
2bb042d7   wesley88   1
408
              data: processedData.map(item => item.name),
3f535f30   杨鑫   '初始'
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
            },
            yAxis: {
              type: 'value',
            },
            grid: {
              left: '1%',
              right: '1%',
              top: '5%',
              bottom: '6%',
              containLabel: true
            },
            series: [{
              type: 'bar',
              color: '#3f9b6a',
              data: processedData.map(item => item.value),
2bb042d7   wesley88   1
424
            }]
3f535f30   杨鑫   '初始'
425
426
427
          };
          option && myChart.setOption(option);
        },
e5b57447   杨鑫   '分包问卷'
428
        charDam1(datas) {
3f535f30   杨鑫   '初始'
429
430
          let Dom = this.$refs.shop1ZX
          let myChart = echarts.init(Dom);
e5b57447   杨鑫   '分包问卷'
431
432
433
434
435
  
          let processedData = datas.map(item => ({
            name: item.trendDate || '11',
            value: item.trendQuantity
          }))
2bb042d7   wesley88   1
436
437
438
439
          processedData.push({
            name: '',
            value: 0
          })
3f535f30   杨鑫   '初始'
440
441
442
          let option = {
            xAxis: {
              type: 'category',
2bb042d7   wesley88   1
443
              data: ['商铺', '场地', '广告位'],
3f535f30   杨鑫   '初始'
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
            },
            yAxis: {
              type: 'value',
              max: 50
            },
            grid: {
              left: '1%',
              right: '5%',
              top: '5%',
              bottom: '6%',
              containLabel: true
            },
            series: [{ // 设置线条颜色
              lineStyle: {
                color: '#3f9b6a', // 这里设置为红色
                width: 2, // 线条宽度
              },
e5b57447   杨鑫   '分包问卷'
461
              data: processedData.map(item => item.value),
3f535f30   杨鑫   '初始'
462
463
464
465
466
              type: 'line'
            }]
          }
          option && myChart.setOption(option);
        },
e5b57447   杨鑫   '分包问卷'
467
        charDam2(datas) {
3f535f30   杨鑫   '初始'
468
469
          let Dom = this.$refs.shop2BT
          let myChart = echarts.init(Dom);
e5b57447   杨鑫   '分包问卷'
470
471
472
473
474
475
          let processedData = datas.map(item => ({
            name: item.trendDate,
            value: item.trendQuantity
          }))
  
  
3f535f30   杨鑫   '初始'
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
          let option = {
            tooltip: {
              trigger: 'item'
            },
            legend: {
              top: '5%',
              left: 'right'
            },
            series: [{
              type: 'pie',
              radius: ['40%', '70%'],
              avoidLabelOverlap: false,
              itemStyle: {
                borderRadius: 10,
                borderColor: '#fff',
                borderWidth: 2
              },
              label: {
                show: false,
                position: 'center'
              },
              emphasis: {
                label: {
                  show: true,
                  fontSize: 40,
                  fontWeight: 'bold'
                }
              },
              labelLine: {
                show: false
              },
              color: ['#3f9b6a', 'rgb(61,182,211)'],
2bb042d7   wesley88   1
508
              data: processedData,
3f535f30   杨鑫   '初始'
509
510
511
512
            }]
          }
          option && myChart.setOption(option);
        },
e5b57447   杨鑫   '分包问卷'
513
        charDam3(datas) {
3f535f30   杨鑫   '初始'
514
515
          let Dom = this.$refs.shop1TJ
          let myChart = echarts.init(Dom);
e5b57447   杨鑫   '分包问卷'
516
517
518
519
520
  
          let processedData = datas.map(item => ({
            // name: item.trendDate || '11',
            value: item.trendQuantity
          }))
3f535f30   杨鑫   '初始'
521
522
523
          let option = {
            legend: {},
            tooltip: {},
2bb042d7   wesley88   1
524
525
526
527
            xAxis: {
              type: 'category',
              data: ['商铺', '场地', '广告位'],
            },
3f535f30   杨鑫   '初始'
528
529
530
531
532
533
534
535
536
537
538
539
540
            yAxis: {
              type: 'value',
              max: 50
            },
            grid: {
              left: '1%',
              right: '1%',
              top: '5%',
              bottom: '6%',
              containLabel: true
            },
            series: [{
              type: 'bar',
e5b57447   杨鑫   '分包问卷'
541
542
              color: '#3f9b6a',
              data: processedData.map(item => item.value),
3f535f30   杨鑫   '初始'
543
              type: 'line'
2bb042d7   wesley88   1
544
            }, ]
3f535f30   杨鑫   '初始'
545
546
547
          };
          option && myChart.setOption(option);
        },
e5b57447   杨鑫   '分包问卷'
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
        // charDam4() {
        //   let Dom = this.$refs.shop4ZX
        //   let myChart = echarts.init(Dom);
        //   let option = {
        //     xAxis: {
        //       type: 'category',
        //       data: ['2024-07', '2024-08', '2024-09', '2024-10', '2024-11', '2024-12', '2024-13']
        //     },
        //     yAxis: {
        //       type: 'value'
        //     },
        //     grid: {
        //       left: '1%',
        //       right: '1%',
        //       top: '5%',
        //       bottom: '6%',
        //       containLabel: true
        //     },
        //     series: [{ // 设置线条颜色
        //       lineStyle: {
        //         color: '#3f9b6a', // 这里设置为红色
        //         width: 2, // 线条宽度
        //       },
        //       data: [0,0, 0, 1, 0, 0],
        //       type: 'line'
        //     }]
        //   }
        //   option && myChart.setOption(option);
  
        // },
        // charDam5() {
        //   let Dom = this.$refs.shop4TJ
        //   let myChart = echarts.init(Dom);
        //   let option = {
        //     tooltip: {
        //       trigger: 'axis',
        //       axisPointer: {
        //         type: 'shadow'
        //       }
        //     },
        //     grid: {
        //       left: '3%',
        //       right: '4%',
        //       bottom: '3%',
        //       containLabel: true
        //     },
        //     xAxis: {
        //       type: 'value',
        //       boundaryGap: [0, 0.01]
        //     },
        //     yAxis: {
        //       type: 'category',
        //       data: ['商户A', '商户B', '商户C', '商户D', '商户E', ]
        //     },
        //     series: [{
        //       lineStyle: {
        //         color: '#3f9b6a', // 这里设置为红色
        //         width: 2, // 线条宽度
        //       },
        //       name: '2011',
        //       type: 'bar',
        //       data: [2, 4, 5, 4, 1, 5]
        //     }]
        //   };
        //   option && myChart.setOption(option);
        // },
3f535f30   杨鑫   '初始'
614
615
616
617
618
619
620
621
622
623
624
        charDam6(datas) {
  
          let Dom = this.$refs.shop5ZX
          let myChart = echarts.init(Dom)
          let processedData = datas.map(item => ({
            name: item.trendDate,
            value: item.trendQuantity
          }))
          let option = {
            xAxis: {
              type: 'category',
2bb042d7   wesley88   1
625
              data: processedData.map(item => item.name),
3f535f30   杨鑫   '初始'
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
            },
            yAxis: {
              type: 'value'
            },
            grid: {
              left: '1%',
              right: '1%',
              top: '5%',
              bottom: '6%',
              containLabel: true
            },
            series: [{ // 设置线条颜色
              lineStyle: {
                color: '#3f9b6a', // 这里设置为红色
                width: 2, // 线条宽度
              },
2bb042d7   wesley88   1
642
              data: processedData.map(item => item.value),
3f535f30   杨鑫   '初始'
643
644
645
646
647
648
649
650
651
652
              type: 'line'
            }]
          }
          option && myChart.setOption(option);
  
  
        },
        charDam7(datas) {
          let Dom = this.$refs.shop5BT
          let myChart = echarts.init(Dom);
e5b57447   杨鑫   '分包问卷'
653
  
3f535f30   杨鑫   '初始'
654
          let processedData = datas.map(item => ({
e5b57447   杨鑫   '分包问卷'
655
            name: '签约数',
3f535f30   杨鑫   '初始'
656
657
            value: item.trendQuantity
          }))
e5b57447   杨鑫   '分包问卷'
658
659
  
          // processedData.push({name:'签约数',value:0})
3f535f30   杨鑫   '初始'
660
          let option = {
2bb042d7   wesley88   1
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
            tooltip: {
              trigger: 'item'
            },
            legend: {
              top: '5%',
              left: 'center'
            },
            series: [{
              type: 'pie',
              radius: ['40%', '70%'],
              avoidLabelOverlap: false,
              itemStyle: {
                borderRadius: 10,
                borderColor: '#fff',
                borderWidth: 2
              },
              label: {
                show: false,
                position: 'center'
              },
              emphasis: {
                label: {
                  show: true,
                  fontSize: 40,
                  fontWeight: 'bold'
                }
              },
              labelLine: {
                show: false
              },
              data: processedData
            }]
3f535f30   杨鑫   '初始'
693
          }
e5b57447   杨鑫   '分包问卷'
694
          option && myChart.setOption(option);
3f535f30   杨鑫   '初始'
695
        },
3f535f30   杨鑫   '初始'
696
  
2bb042d7   wesley88   1
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
        // charDam9(){
  
        //     let Dom = this.$refs.shop3TJ
        //     let myChart = echarts.init(Dom);
        //     let option = {
        //       tooltip: {
        //         trigger: 'axis',
        //         axisPointer: {
        //           type: 'shadow'
        //         }
        //       },
        //       grid: {
        //         left: '3%',
        //         right: '4%',
        //         bottom: '3%',
        //         containLabel: true
        //       },
        //       xAxis: {
        //         type: 'value',
        //         boundaryGap: [0, 0.01]
        //       },
        //       yAxis: {
        //         type: 'category',
        //         data: ['商户A', '商户B', '商户C', '商户D', '商户E', ]
        //       },
        //       series: [{
        //         lineStyle: {
        //           color: '#3f9b6a', // 这里设置为红色
        //           width: 2, // 线条宽度
        //         },
        //         name: '2011',
        //         type: 'bar',
        //         data: [1, 2, 3, 4, 5, 10]
        //       }]
        //     };
        //     option && myChart.setOption(option);
  
        // },
3f535f30   杨鑫   '初始'
735
736
737
  
        async getAll() {
          const res = await statistical(this.pageindex)
f692f3a5   wesley88   1
738
          console.log(res)
3f535f30   杨鑫   '初始'
739
          this.charDam(res.data.seekingIntentionStatistics)
e5b57447   杨鑫   '分包问卷'
740
          this.charDam2(res.data.seekingIntentionStatistics)
3f535f30   杨鑫   '初始'
741
          this.charDam6(res.data.contractTrend)
e5b57447   杨鑫   '分包问卷'
742
  
3f535f30   杨鑫   '初始'
743
          this.charDam7(res.data.basicQueryTrends)
2bb042d7   wesley88   1
744
          let trends = [...res.data.shopTrend, ...res.data.venueTrend, ...res.data.advertisingTrend]
e5b57447   杨鑫   '分包问卷'
745
746
  
          this.charDam1(trends)
2bb042d7   wesley88   1
747
          this.charDam3(trends)
3f535f30   杨鑫   '初始'
748
749
750
751
752
753
754
        },
        handleSizeChange() {
  
        },
        handleCurrentChange() {
  
        },
2bb042d7   wesley88   1
755
756
757
758
759
760
761
762
763
764
765
766
        resetting() {
          let today = new Date();
          let monthAgo = new Date();
          monthAgo.setMonth(monthAgo.getMonth() - 1);
          monthAgo.setDate(monthAgo.getDate() + 1);
          this.pageindex.startTime = monthAgo.toISOString().slice(0, 10);
          this.pageindex.endTime = today.toISOString().slice(0, 10);
          this.FormTime = [
            this.pageindex.startTime,
            this.pageindex.endTime
          ]
          this.getAll()
3f535f30   杨鑫   '初始'
767
        },
2bb042d7   wesley88   1
768
        async onSubmit() {
3f535f30   杨鑫   '初始'
769
  
2bb042d7   wesley88   1
770
          let Msg = {
3f535f30   杨鑫   '初始'
771
            startTime: this.FormTime[0],
2bb042d7   wesley88   1
772
            endTime: this.FormTime[1]
3f535f30   杨鑫   '初始'
773
774
775
          }
          const res = await statistical(Msg)
          this.charDam(res.data.seekingIntentionStatistics)
e5b57447   杨鑫   '分包问卷'
776
          this.charDam2(res.data.seekingIntentionStatistics)
3f535f30   杨鑫   '初始'
777
          this.charDam6(res.data.contractTrend)
2bb042d7   wesley88   1
778
779
          this.charDam7(res.data.basicQueryTrends)
          let trends = [...res.data.shopTrend, ...res.data.venueTrend, ...res.data.advertisingTrend]
e5b57447   杨鑫   '分包问卷'
780
781
  
          this.charDam1(trends)
2bb042d7   wesley88   1
782
          this.charDam3(trends)
e5b57447   杨鑫   '分包问卷'
783
  
3f535f30   杨鑫   '初始'
784
        },
2bb042d7   wesley88   1
785
786
787
788
789
        async gitOut() {
          const content = this.$refs.contentToConvert;
  
          // 使用 html2canvas 将 div 渲染为画布
          const canvas = await html2canvas(content);
ab818baa   杨鑫   '1'
790
  
2bb042d7   wesley88   1
791
792
793
794
795
796
797
798
799
800
801
802
803
804
          // 获取画布的图像数据
          const imgData = canvas.toDataURL('image/png');
  
          // 创建一个新的 PDF 文档
          const pdf = new jsPDF('p', 'mm', 'a4');
  
          // 添加图像到 PDF,第二个参数是图像格式,第三个参数是缩放比例
          const imgWidth = 190; // 图像的宽度(mm)
          const imgHeight = (canvas.height * imgWidth) / canvas.width; // 保持图像的宽高比
  
          pdf.addImage(imgData, 'PNG', 10, 10, imgWidth, imgHeight); // 10, 10 是图像在 PDF 中的位置(mm)
  
          // 保存 PDF 文件
          pdf.save('downloaded.pdf');
ab818baa   杨鑫   '1'
805
        },
3f535f30   杨鑫   '初始'
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
      }
    }
  </script>
  
  <style scoped>
    .zhuti {
      padding: 0 20px 20px 20px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #Fff;
  
    }
  
    /deep/ .el-form-item__content {
      line-height: 0;
    }
  
2bb042d7   wesley88   1
822
  
3f535f30   杨鑫   '初始'
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
  
    .formSearch {
      position: relative;
      margin-top: 30px;
      display: flex;
      width: 100%;
      height: 30px;
      font-size: 14px;
      margin-bottom: 10px;
    }
  
    .greens {
      color: #3F9B6A;
    }
  
  
    .fenye {
      margin-top: 20px;
      display: flex;
      justify-content: flex-start;
      position: relative;
    }
  
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
      background-color: #3F9B6A;
    }
  
    .el-row {
      margin-bottom: 20px;
    }
  
    :last-child {
      margin-bottom: 0;
    }
  
    .el-col {
      border-radius: 4px;
    }
  
    .bg-purple-dark {
      background: #99a9bf;
    }
  
    .bg-purple {
      background: #d3dce6;
    }
  
    .bg-purple-light {
      background: #e5e9f2;
    }
  
    .grid-content {
      border-radius: 4px;
      min-height: 36px;
    }
  
    .row-bg {
      padding: 10px 0;
      background-color: #f9fafc;
    }
  
    /deep/ .bg-purple[data-v-0e3fe4ec] {
      background: #fff;
      height: 50px;
    }
  
    /deep/ .el-form--label-top .el-form-item__label {
      padding: 0;
    }
  
    .demo-input-suffix {
      display: flex;
      margin-right: 20px;
    }
  
    .pagination {
      text-align: right;
      line-height: 20px;
    }
  
    /deep/ .el-pagination__total {
      margin-top: 4px;
    }
  
    ::v-deep .el-select .el-input.is-focus .el-input__inner {
      border-color: #3F9B6A
    }
  
    /deep/ .el-dialog__header {
      background-color: #fff;
      padding: 0
    }
  
    /deep/ .el-radio__input.is-checked .el-radio__inner {
      border-color: #3F9B6A;
      background: #3F9B6A;
    }
  
    ::v-deep .buttonHover:hover {
      color: #3f9b6a !important;
      border-color: #c5e1d2 !important;
      background-color: #ecf5f0 !important;
      outline: none;
    }
  </style>