couponDetail.vue 25.7 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
<!--  -->
<template>
  <div>
    <div class="pending">
      <el-tabs v-model="activeName">
        <el-tab-pane label="活动信息" name="first">
          <div class="shop_info">
            <h3 class="detail_title">店铺信息</h3>
            <div class="shopInfo_left">
              <p class="detail_text">
                <span>活动名称:</span>
                <span class="text">{{ form.activityName }}</span>
              </p>
              <p class="detail_text">
                <span>活动介绍:</span>
                <span class="text">{{ form.activityIntroduce }}</span>
              </p>
              <p class="detail_text">
                <span>报名时间:</span>
                <span
                  class="text"
                >{{ form.signStartTime }}-{{ form.signEndTime }}</span>
              </p>
              <p class="detail_text">
                <span>起止时间:</span>
                <span
                  class="text"
                >{{ form.activityStartTime }}-{{ form.activityEndTime }}</span>
              </p>
              <p class="detail_text">
                <span>活动保证金:</span>
                <span class="text textColor ">
                  <el-radio-group v-model="form.ifBond">
                    <el-radio :label="1" disabled>需要</el-radio>
                    <el-radio :label="0" disabled>不需要</el-radio>
                  </el-radio-group>
                </span>
              </p>
              <p v-if="form.ifBond" class="detail_text">
                <span>保证金金额:</span>
                <span class="text">{{ form.bondMoney }}</span>
              </p>
              <!-- <p v-if="form.activityLabel" class="detail_text">
                <span>活动标签:</span>
                <span class="mf">
                  <el-tag type="warning" effect="dark">{{
                    form.activityLabel
                  }}</el-tag>
                </span>
              </p> -->
            </div>
            <div class="shopInfo_right">
              <img v-if="form.image" :src="form.image" alt="">
            </div>
          </div>
          <div class="shop_info">
            <h3 class="detail_title">优惠规则</h3>
            <p v-if="form.discountMode" class="detail_text">
              <span>优惠方式:</span>
              <span class="text">
                <el-radio-group v-model="form.discountMode">
                  <el-radio :label="1" disabled>满减</el-radio>
                  <el-radio :label="2" disabled>优惠券</el-radio>
                </el-radio-group>
              </span>
            </p>
            <p v-if="form.couponContent" class="detail_text">
              <span>优惠内容:</span>
              <span v-if="form.discountMode === 1" class="text">
                减 {{ form.couponContent }} 元
              </span>
              <span v-if="form.discountMode === 2" class="text">
                {{ form.couponContent }}折
              </span>
            </p>
            <p v-if="form.threshold" class="detail_text">
              <span>使用门槛:</span>
              <span class="text">
                <div>
                  满 {{ form.threshold }} 元
                </div>
              </span>
            </p>
            <p v-if="form.number" class="detail_text">
              <span>发放数量:</span>
              <span class="text">
                {{ form.number }}张
              </span>
            </p>
            <p v-if="form.receiveType" class="detail_text">
              <span>领取次数:</span>
              <span v-if="form.receiveType === 2" class="text">
                {{ form.frequency }}次
              </span>
              <span v-else class="text">
                无限制
              </span>
            </p>
            <p class="detail_text">
              <span>同步微信卡包:</span>
              <el-checkbox v-model="form.syncCard" :true-label="1" :false-label="0" :disabled="true"></el-checkbox>
            </p>
          </div>
          <div v-if="form.syncCard === 1" class="sync_card_info">
            <h3 class="detail_title">卡券同步设置</h3>
            <p v-if="form.cardTitle" class="detail_text">
              <span>卡券标题:</span>
              <span class="text">
                {{ form.cardTitle }}
              </span>
            </p>
            <p v-if="form.cardColor" class="detail_text">
              <span>券主题颜色:</span>
              <span class="color-box" :style="{'backgroundColor': bgColors[form.cardColor]}"></span>
              <span class="text">
                {{ form.cardColor }}
              </span>
            </p>
            <p v-if="form.cardNotice" class="detail_text">
              <span>使用须知:</span>
              <span class="text">
                <div>
                  {{ form.cardNotice }}
                </div>
              </span>
            </p>
          </div>
        </el-tab-pane>
        <!-- 参与店铺 -->
        <el-tab-pane label="参与店铺" name="second">
          <div class="formSearch">
            <el-form
              :inline="true"
              :model="formInline"
              class="demo-form-inline"
            >
              <el-form-item label="店铺名称">
                <el-input
                  v-model="formInline.shopName"
                  placeholder="请输入店铺名称"
                />
              </el-form-item>
              <el-form-item label="店铺编码">
                <el-input
                  v-model="formInline.shopCode"
                  placeholder="请输入店铺编码"
                />
              </el-form-item>
              <el-form-item label="审核状态">
                <el-select
                  v-model="formInline.state"
                  placeholder="请选择审核状态"
                >
                  <el-option label="待审核" value="0" />
                  <el-option label="报名成功" value="1" />
                  <el-option label="报名失败" value="2" />
                </el-select>
              </el-form-item>
              <el-form-item>
                <el-button  style="background-color: #3F9B6A;color: #fff" @click="search">查询</el-button>
              </el-form-item>
            </el-form>
          </div>
          <div class="tableBox">
            <el-table
              ref="multipleTable"
              :data="tableData"
             :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
              tooltip-effect="dark"

            >
              <el-table-column label="店铺名称" width="220">
                <template slot-scope="scope">{{ scope.row.shopName }}</template>
              </el-table-column>
              <el-table-column prop="shopCode" label="店铺编码" />
              <el-table-column prop="productNumber" label="参与商品数" />
              <el-table-column prop="examine" label="审核次数" />
              <el-table-column label="审核状态">
                <template slot-scope="scope">
                  <span v-if="scope.row.state == 0">待审核</span>
                  <span v-if="scope.row.state == 1">报名成功</span>
                  <span v-if="scope.row.state == 2">报名失败</span>
                </template>
              </el-table-column>
              <el-table-column label="操作" show-overflow-tooltip>
                <template slot-scope="scope">
                  <div class="btnList">
                    <div
                       class="tableBtn greens"
                      @click="seeMore(scope.row)"
                    >查看商品</div>
                    <div
                       class="tableBtn greens"
                      @click="checkList(scope.row)"
                    >审核记录</div>
                    <div
                      v-if="scope.row.state === 0"
                       class="tableBtn greens"
                      @click="examine(scope.row)"
                    >审核</div>
                    <div
                      v-if="scope.row.state === 1"
                      class="tableBtn greens"
                      @click="liquidation(scope.row)"
                    >清退</div>
                  </div>
                </template>
              </el-table-column>
            </el-table>
            <div class="fenye">
              <el-pagination
                :current-page="currentPage"
                :page-sizes="[10, 20, 50, 100]"
                :page-size="10"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
              />
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane :lazy="true" label="数据图表" name="chart">
          <div class="chartPage" v-loading="chartLoading">
            <div class="topChart">
              <MapChart v-if="cityData.length > 0" class="mapCanvas" :city-data="cityData" />
              <RankComponent
                class="rank"
                :title="'商家成交排行榜'"
                :subtitle="'成交额/元'"
                :rank-data="dealData"
              />
              <RankComponent
                class="rank"
                :title="'畅销商品排行榜'"
                :subtitle="'售卖个数/个'"
                :rank-data="sealsDate"
              />
            </div>
            <div class="minChart">
              <DistributionChart class="distribut" :chart-data="pieData" />
              <TypePie class="typePie" :classify-data="classifyData" />
            </div>
            <div class="bottomChart">
              <TrendChart class="trend" :chart-data="trendData" />
            </div>
          </div>
          <!-- <List :list-id="couponId" /> -->
        </el-tab-pane>
        <el-tab-pane :lazy="true" label="数据详情" name="detail">
          <TableData
            :table-data="shopTable"
            :total="shopTableTotal"
            @handleCurrentChange="pageGetShopTable"
            @handleSizeChange="sizeGetShopTable"
            @export="exportShopTable"
          />
        </el-tab-pane>
      </el-tabs>
    </div>

    <!-- ******************************************************弹框开始***************************************************************** -->
    <!-- 审核记录弹框 -->
    <el-dialog
      title="审核记录"
      :visible.sync="checkDIa"
      center
      width="30%"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      :modal="false"
    >
      <div class="diaddStyle">
        <el-table
          ref="multipleTable"
          :data="checkLists"
        :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
          tooltip-effect="dark"
        >
          <el-table-column label="动态" width="220">
            <template slot-scope="scope">{{
              scope.row.operationDescribtion
            }}</template>
          </el-table-column>
          <el-table-column prop="createTime" label="时间" />
          <el-table-column prop="name" label="操作人" />
          <el-table-column prop="remark" label="其他信息" />
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button style="background-color: #3F9B6A;color: #fff" @click="checkDIa = false">确定</el-button>
      </span>
    </el-dialog>

    <!-- 活动商品记录弹框 -->
    <el-dialog
      title="活动商品"
      :visible.sync="foodsDia"
      center
      width="70%"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      :modal="false"
    >
      <div class="diaddStyle">
        <el-table
          ref="multipleTable"
          :data="tableDatas"
          :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
          tooltip-effect="dark"
        >
          <el-table-column label="产品主图" width="220">
            <template slot-scope="scope">
              <img :src="scope.row.image" width="50" height="50" alt srcset>
            </template>
          </el-table-column>
          <el-table-column prop="productName" label="产品名称" />
          <el-table-column prop="productId" label="产品id" />
          <el-table-column prop="price" label="售价(元)" />
          <el-table-column prop="originalPrice" label="原价(元)" />
          <el-table-column prop="stockNumber" label="库存(件)" />
          <el-table-column prop="volume" label="累计销量(件)" />
          <el-table-column label="上架状态">
            <template slot-scope="scope">
              <span v-if="scope.row.shelveState == 1">上架</span>
              <span v-if="scope.row.shelveState == 0">下架</span>
            </template>
          </el-table-column>
        </el-table>
        <div class="fenye">
          <el-pagination
            :current-page="currentPages"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :total="totals"
            @size-change="handleSizeChanges"
            @current-change="handleCurrentChanges"
          />
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button style="background-color: #3F9B6A;color: #fff" @click="foodsDia = false">确定</el-button>
      </span>
    </el-dialog>

    <!-- 审核清退 -->
    <el-dialog
      :title="checkObj.title"
      :visible.sync="checkObj.show"
      center
      width="30%"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      :modal="false"
    >
      <div v-if="checkObj.type === 1" class="diaddStyle">
        <el-form ref="form" :model="addform" label-width="80px">
          <el-form-item label="审核状态">
            <el-radio-group v-model="addform.state">
              <el-radio label="1">报名成功</el-radio>
              <el-radio label="2">报名失败</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="备注">
            <el-input v-model="addform.remark" type="textarea" />
          </el-form-item>
        </el-form>
      </div>
      <div v-else class="diaddStyle">
        <div class="text">确认要清退本商家吗?</div>
        <div class="text">清退后商家的所有商品将退出本次活动</div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button style="background-color: #3F9B6A;color: #fff" @click="enter">确定</el-button>
        <el-button @click="checkDIa = checkObj.show = false" class="buttonHover"
              style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">取消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
// import List from '../component'
import MapChart from '@/views/active/couponlist/component/mapChart.vue'
import DistributionChart from '@/views/active/couponlist/component/chartDistribution.vue'
import RankComponent from '@/views/active/couponlist/component/rank.vue'
import TypePie from '@/views/active/couponlist/component/typePie.vue'
import TrendChart from '@/views/active/couponlist/component/trendChart.vue'

import TableData from '@/views/active/component/dataTable.vue'

import {
  getCouponShops,
  getCouponDetail,
  exportCouponData,
  getShopDatas,
  // getStats,
  getCharts
} from '@/api/active/active_coupon.js'
import {
  activeGetExamines,
  activeGetProducts,
  activeLiquidation,
  activExamine,
  excel_shop_detail
} from '@/api/active'

export default {
  components: {
    // List,
    TableData,
    MapChart,
    DistributionChart,
    RankComponent,
    TypePie,
    TrendChart
  },
  data () {
    return {
      activeName: 'first',
      couponId: null,
      radio: '1',
      formInline: {
        activityId: 0,
        shopName: '', // 店铺名称
        shopCode: '', // 店铺编码
        state: '', // 审核状态 0-待审核 1-报名成功 2-报名失败
        page: 1,
        signType: 1, // 1-平台优惠券 2-平台秒杀 3-平台限时折扣
        pageSize: 10
      },
      addform: {
        signId: '', // 报名id
        state: '1', // 审核状态 1-报名成功 2-报名失败
        remark: '' // 备注
      },
      checkObj: {},
      form: {},
      tableData: [], // 店铺数据
      tableDatas: [], // 活动商品
      checkLists: [],
      total: 1,
      totals: 1,
      currentPage: 1,
      currentPages: 1,
      checkDIa: false,
      foodsDia: false,
      signId: '',
      shopTableQuery: {
        activityId: 0,
        page: 1,
        pageSize: 10
      },
      shopTableTotal: 0,
      shopTable: [],
      // chart数据
      chartLoading: false,
      pieData: {},
      cityData: [],
      dealData: [], // 成交数据
      sealsDate: [], // 畅销商品排行
      classifyData: [],
      trendData: {},
      bgColors: {
        'Color010': '#638359',
        'Color020': '#2C9F67',
        'Color030': '#509FC9',
        'Color040': '#5885CF',
        'Color050': '#9062C0',
        'Color060': '#D09A45',
        'Color070': '#E48138',
        'Color080': '#EE903C',
        'Color090': '#DD6549',
        'Color100': '#CC463D'
      }
    }
  },
  props: {
    activityId: {
      type: Number,
      default: 0
    }
  },
  watch: {
    activityId: {
      handler (nVal, oVal) {
        if (nVal) {
          this.couponId = parseInt(nVal)
          this.formInline.activityId = this.couponId
          this.getAll(this.formInline)
          this.shopTableQuery.activityId = this.couponId
          this.getShopTable()
          this.shopTableQuery.activityId = this.couponId
          this.getChartData()
          this.getDetails()
        } else {
          this.pieData = {}
          this.cityData = []
          this.dealData = []
          this.sealsDate = []
          this.classifyData = []
          this.trendData = {}
        }
      }
    }
  },
  created () {
    this.couponId = parseInt(this.activityId) || null
    this.formInline.activityId = this.couponId
    this.getAll(this.formInline)
    this.shopTableQuery.activityId = this.couponId
    this.getShopTable()
    this.shopTableQuery.activityId = this.couponId
    this.getChartData()
    this.getDetails()
  },
  methods: {
    // 活动信息查询
    async getDetails () {
      const res = await getCouponDetail({ activityId: this.couponId })
      this.form = res.data
    },
    // 查询参与店铺
    async getAll (formInline) {
      // const res = await activeGetShops(formInline)
      const res = await getCouponShops(formInline)
      this.tableData = res.data.list
      this.total = res.data.total
    },
    // 初始化查询所有活动商品
    async getProducts (formInline) {
      const res = await activeGetProducts(formInline)
      this.tableDatas = res.data.list
      this.totals = res.data.total
    },
    handleSizeChange (val) {
      this.formInline.pageSize = val
      this.getAll(this.formInline)
    },
    handleCurrentChange (val) {
      this.formInline.page = val
      this.getAll(this.formInline)
    },
    handleSizeChanges (val) {
      this.getProducts({
        signId: this.signId,
        page: 1,
        pageSize: val
      })
    },
    handleCurrentChanges (val) {
      this.getProducts({
        signId: this.signId,
        page: val,
        pageSize: 10
      })
    },
    // 查询
    search () {
      this.total = 1
      this.formInline.page = 1
      this.getAll(this.formInline)
    },
    /** 活动详情相关接口 */
    // 查询活动数据详情
    async getShopTable () {
      const res = await getShopDatas(this.shopTableQuery)
      this.shopTable = res.data.list
      this.shopTableTotal = res.data.total
    },
    pageGetShopTable (e) {
      this.shopTableQuery.page = e
      this.getShopTable()
    },
    sizeGetShopTable (e) {
      this.shopTableQuery.pageSize = e
      this.getShopTable()
    },
    // 导出表格数据
    exportShopTable () {
      excel_shop_detail(this.formInline).then(res => {
        const blob = new Blob([res])
        const fileName = '商家数据明细表.xlsx'
        if ('download' in document.createElement('a')) {
          // 非IE下载
          const elink = document.createElement('a')
          elink.download = fileName
          elink.style.display = 'none'
          elink.href = URL.createObjectURL(blob)
          document.body.appendChild(elink)
          elink.click()
          URL.revokeObjectURL(elink.href) // 释放URL 对象
          document.body.removeChild(elink)
        } else {
          // IE10+下载
          navigator.msSaveBlob(blob, fileName)
        }
      })
    },
    // 查询图表
    async getChartData () {
      this.chartLoading = true
      this.pieData = {}
      this.cityData = []
      this.dealData = []
      this.sealsDate = []
      this.classifyData = []
      this.trendData = {}
      getCharts(this.shopTableQuery)
        .then(res => {
          this.pieData = Object.assign(
            { cityPeople: res.data.cityPeople },
            { newOlds: res.data.newOlds },
            { terminals: res.data.terminals },
            { systems: res.data.systems }
          )
          this.cityData = res.data.cities || []
          this.dealData = res.data.shopRankings.map(item => {
            item.rankName = item.shopName
            item.ranks = item.money
            return item
          }) || []
          this.sealsDate = res.data.productRankings.map(item => {
            item.rankName = item.productName
            item.ranks = item.total
            return item
          }) || []
          this.classifyData = res.data.classifies || []
          this.trendData = res.data.trend || {}
          this.chartLoading = false
        })
        .catch(err => {
          console.log(err)
          this.chartLoading = false
        })
    },
    // 审核记录
    async checkList (row) {
      this.checkDIa = true
      const res = await activeGetExamines({
        only: `${row.shopId}-${row.activityId}-${row.signId}`
      })
      this.checkLists = res.data
    },
    // 查看
    seeMore (row) {
      this.foodsDia = true
      this.signId = row.signId
      this.getProducts({
        signId: this.signId,
        page: 1,
        pageSize: 10
      })
    },
    // 处理
    async examine (row) {
      this.addform.signId = row.signId
      this.checkObj = {
        title: '审核',
        show: true,
        arr: row,
        type: 1
      }
    },
    // 清退
    async liquidation (row) {
      this.checkObj = {
        title: '清退',
        show: true,
        arr: row,
        type: 2
      }
    },
    // 确定
    async enter () {
      if (this.checkObj.type === 1) {
        const res = await activExamine(this.addform)
        if (res.code === '') {
          this.$message({
            message: '处理成功',
            type: 'success'
          })
          this.checkObj.show = false
          this.getAll(this.formInline)
        }
      } else {
        const res = await activeLiquidation({
          signId: this.checkObj.arr.signId
        })
        if (res.code === '') {
          this.$message({
            message: '清退成功',
            type: 'success'
          })
          this.checkObj.show = false
          this.getAll(this.formInline)
        }
      }
    },
    // 导出数据
    async exportData () {
      const res = await exportCouponData({ discountId: this.discountId })
      if (!res) {
        return
      }
      const blob = new Blob([res])
      const fileName = '商家数据明细表.xlsx'
      if ('download' in document.createElement('a')) {
        // 非IE下载
        const elink = document.createElement('a')
        elink.download = fileName
        elink.style.display = 'none'
        elink.href = URL.createObjectURL(blob)
        document.body.appendChild(elink)
        elink.click()
        URL.revokeObjectURL(elink.href) // 释放URL 对象
        document.body.removeChild(elink)
      } else {
        // IE10+下载
        navigator.msSaveBlob(blob, fileName)
      }
    }
  }
}
</script>
<style lang='scss' scoped>
@import url("../../../styles/elDialog.scss");
.pending {

}
.fenye {
  margin-top: 20px;
}
 

.greens {
    color: #3F9B6A;
  }
.diaddStyle {
  .text {
    text-align: center;
  }
}
.detail_title {
  font-size: 22px;
  color: #333333;
  position: relative;
  margin: 50px 20px 20px;
  &:before {
    content: "";
    display: block;
    position: absolute;
    top: 5px;
    left: -20px;
    width: 4px;
    height: 24px;
    background-color: #3f9b6a;
  }
}
.detail_text {
  margin: 12px 0;
  padding: 0 120px;
  //  font-size: 16px;
  .text {
    color: #666666;
    line-height: 40px;
    margin-left: 20px;
    div{
      display: inline-block;
    }
  }
  .Margin{
    margin-left: 90px;
  }
}
.shop_info{
  overflow: hidden;
  .shopInfo_left,.shopInfo_right{
    float: left;
  }
  .shopInfo_right{
    margin-left: 160px;
    width: 200px;
    height: 200px;
    img{
      width: 100%;

    }
  }
}
.sync_card_info {
  .color-box {
    width: 30px;
    height: 30px;
    display: inline-block;
    vertical-align: middle;
  }
}
.mf {
  margin-left: 20px;
  .el-tag{
    margin-bottom: 20px;
  }
}
// radio默认选中修改颜色
.el-radio__input.is-disabled+span.el-radio__label {
  color: #3f9b6a !important;
}
.chartPage{
  .topChart{
    height: 530px;
    display: flex;
    .mapCanvas{
      flex: 1;
      border: 1px solid #efefef;
      padding: 8px 3px;
    }
    .rank{
      flex: 1;
    }
  }
  .minChart{
    margin: 12px 0;
    padding: 8px;
    height: 600px;
    box-sizing: content-box;
    display: flex;
    border: 1px solid #efefef;
    .distribut{
      flex: 1;
    }
    .typePie{
      flex: 1;
    }
  }
  .bottomChart{
    .trend{
      height: 500px;
    }
  }
}
  ::v-deep .buttonHover:hover{
    color:#3f9b6a !important;
    border-color: #c5e1d2 !important;
    background-color: #ecf5f0 !important;
    outline: none;
  }
</style>