analyse copy.vue 28.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 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 138 139 140 141 142 143 144 145 146 147 148 149 150 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 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 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 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 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 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 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 693 694 695 696 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 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 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
<template>
	<div style="background-color:#f7f7f7;padding:10px 10px;">
		<div class="zhuti ">
			<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;">
						<!-- <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="FormTime" value-format="yyyy-MM-dd" type="daterange"
							range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
							style="width: 300px;margin-right: 10px;" 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="gitOut" style="background-color: #3F9B6A;color: #fff">导出
						</el-button>
					</div>
				</div>

			</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> -->
						</div>
						<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> -->
						</div>
						<div ref="shop1TJ" style="width:100%;height: 400px;"></div>
					</div>
				</div>
				<TitleWithCircle title="商铺/广告位意向统计" style="margin: 20px 0;" />
				<div style="width: 100%;">
					<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;">
						<div style="width:48%;height: 400px;margin-right:20px;">
							<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>
						<div style="width:48%;height: 400px;margin-right:20px;">
							<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;">
          <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>
              </div>
            </div>
            <div ref="shop3ZX" 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>
              </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;">
          <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>
              </div>
            </div>
            <div ref="shop4ZX" 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;">租赁商户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> -->
				<TitleWithCircle title="合同情况统计" style="margin: 20px 0;" />
				<div style="width: 100%;">
					<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;">
						<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>
              </div> -->
							</div>
							<div ref="shop5ZX" 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>
              </div> -->
							</div>
							<div ref="shop5BT" style="width:100%;height: 400px;"></div>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
</template>

<script>
	import html2canvas from 'html2canvas'
	import jsPDF from 'jspdf'
	import TitleWithCircle from '@/components/top/index';
	import {
		statistical,
	} from '@/api/information'
	import * as echarts from 'echarts'
	import {
		async
	} from 'q';
	export default {
		components: {
			TitleWithCircle,
		},
		name: 'atmosphereGl',
		data() {
			return {
				currentPage: 1,
				radio1: 0,
				total: 100,
				flag: false,
				pageSize: 10,
				tableData: [],
				FormTime: [],
				pageindex: {
					startTime: "1990-09-11",
					endTime: "2024-11-09"
				},
				formSel: {

				}
			}
		},
		computed: {},
		created() {
			//获取今天日期和一个月前的日期
			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
			]
			console.error(this.pageindex)
			this.getAll()

		},
		mounted() {

			// this.charDam1()
			// this.charDam2()
			// this.charDam3()
			// this.charDam4()
			// this.charDam5()

			// this.charDam7()

			// 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',
						data: processedData.map(item => item.name),
					},
					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),
					}]
				};
				option && myChart.setOption(option);
			},
			charDam1(datas) {
				let Dom = this.$refs.shop1ZX
				let myChart = echarts.init(Dom);

				let processedData = datas.map(item => ({
					name: item.trendDate || '11',
					value: item.trendQuantity
				}))
				processedData.push({
					name: '',
					value: 0
				})
				let option = {
					xAxis: {
						type: 'category',
						data: ['商铺', '场地', '广告位'],
					},
					yAxis: {
						type: 'value',
						max: 50
					},
					grid: {
						left: '1%',
						right: '5%',
						top: '5%',
						bottom: '6%',
						containLabel: true
					},
					series: [{ // 设置线条颜色
						lineStyle: {
							color: '#3f9b6a', // 这里设置为红色
							width: 2, // 线条宽度
						},
						data: processedData.map(item => item.value),
						type: 'line'
					}]
				}
				option && myChart.setOption(option);
			},
			charDam2(datas) {
				let Dom = this.$refs.shop2BT
				let myChart = echarts.init(Dom);
				let processedData = datas.map(item => ({
					name: item.trendDate,
					value: item.trendQuantity
				}))


				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)'],
						data: processedData,
					}]
				}
				option && myChart.setOption(option);
			},
			charDam3(datas) {
				let Dom = this.$refs.shop1TJ
				let myChart = echarts.init(Dom);

				let processedData = datas.map(item => ({
					// name: item.trendDate || '11',
					value: item.trendQuantity
				}))
				let option = {
					legend: {},
					tooltip: {},
					xAxis: {
						type: 'category',
						data: ['商铺', '场地', '广告位'],
					},
					yAxis: {
						type: 'value',
						max: 50
					},
					grid: {
						left: '1%',
						right: '1%',
						top: '5%',
						bottom: '6%',
						containLabel: true
					},
					series: [{
						type: 'bar',
						color: '#3f9b6a',
						data: processedData.map(item => item.value),
						type: 'line'
					}, ]
				};
				option && myChart.setOption(option);
			},
			// 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);
			// },
			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',
						data: processedData.map(item => item.name),
					},
					yAxis: {
						type: 'value'
					},
					grid: {
						left: '1%',
						right: '1%',
						top: '5%',
						bottom: '6%',
						containLabel: true
					},
					series: [{ // 设置线条颜色
						lineStyle: {
							color: '#3f9b6a', // 这里设置为红色
							width: 2, // 线条宽度
						},
						data: processedData.map(item => item.value),
						type: 'line'
					}]
				}
				option && myChart.setOption(option);


			},
			charDam7(datas) {
				let Dom = this.$refs.shop5BT
				let myChart = echarts.init(Dom);

				let processedData = datas.map(item => ({
					name: '签约数',
					value: item.trendQuantity
				}))

				// processedData.push({name:'签约数',value:0})
				let option = {
					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
					}]
				}
				option && myChart.setOption(option);
			},

			// 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);

			// },

			async getAll() {
				const res = await statistical(this.pageindex)
				console.log(res)
				this.charDam(res.data.seekingIntentionStatistics)
				this.charDam2(res.data.seekingIntentionStatistics)
				this.charDam6(res.data.contractTrend)

				this.charDam7(res.data.basicQueryTrends)
				let trends = [...res.data.shopTrend, ...res.data.venueTrend, ...res.data.advertisingTrend]

				this.charDam1(trends)
				this.charDam3(trends)
			},
			handleSizeChange() {

			},
			handleCurrentChange() {

			},
			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()
			},
			async onSubmit() {

				let Msg = {
					startTime: this.FormTime[0],
					endTime: this.FormTime[1]
				}
				const res = await statistical(Msg)
				this.charDam(res.data.seekingIntentionStatistics)
				this.charDam2(res.data.seekingIntentionStatistics)
				this.charDam6(res.data.contractTrend)
				this.charDam7(res.data.basicQueryTrends)
				let trends = [...res.data.shopTrend, ...res.data.venueTrend, ...res.data.advertisingTrend]

				this.charDam1(trends)
				this.charDam3(trends)

			},
			async gitOut() {
				const content = this.$refs.contentToConvert;

				// 使用 html2canvas 将 div 渲染为画布
				const canvas = await html2canvas(content);

				// 获取画布的图像数据
				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');
			},
		}
	}
</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;
	}



	.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>