123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654 |
- <template>
- <br />
- <el-card style="margin: 0 1em;">
- <div class="title_card">重点客户</div>
- <br />
- <el-button-group style="margin-left: 1.5em">
- <el-button
- size="small"
- type="primary"
- v-for="(item, i) in hard_important_list"
- :key="'hard_important' + i"
- :plain="hard_important_act !== i"
- @click="() => hard_important_change(i)"
- >
- {{ item.text }}
- </el-button>
- </el-button-group>
- <br />
- <el-row>
- <el-col :span="12">
- <com-table
- title="硬广-广告主投放top10"
- :child="true"
- :tableList="hardMarster"
- >
- <template #cols>
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="50"
- />
- <el-table-column
- show-overflow-tooltip
- align="center"
- property="name"
- label="栏目主名称"
- />
- <el-table-column align="center" property="pinci">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 1
- ? 'color: red'
- : ''
- "
- >
- 频次(次)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.pinci) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="timeSize">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 2
- ? 'color: red'
- : ''
- "
- >
- 时长(秒)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.timeSize) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="fee" label="">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 3
- ? 'color: red'
- : ''
- "
- >
- 费用
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.fee) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="fee" label="环比">
- <template #default="scope">
- <svg
- t="1646702687390"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2028"
- width="20"
- v-if="scope.row[
- hard_important_list[hard_important_act].proportionType
- ] -
- scope.row.compare[
- hard_important_list[hard_important_act].proportionType
- ] <
- 0"
- height="20"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <path
- d="M558.933333 853.333333V128h-42.666666v733.866667l-145.066667-145.066667-29.866667 29.866667 192 192 192-192-29.866666-29.866667-136.533334 136.533333z"
- fill="#50b1e6"
- p-id="2029"
- ></path>
- </svg>
- <svg
- t="1646702847605"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2299"
- width="20"
- v-if="scope.row[
- hard_important_list[hard_important_act].proportionType
- ] -
- scope.row.compare[
- hard_important_list[hard_important_act].proportionType
- ] >
- 0"
- height="20"
- >
- <path
- d="M507.733333 213.333333v725.333334h42.666667V204.8l145.066667 145.066667 29.866666-29.866667L533.333333 128 341.333333 320l29.866667 29.866667L507.733333 213.333333z"
- fill="#ff5757"
- p-id="2300"
- ></path>
- </svg>
- </template>
- </el-table-column>
- </template>
- </com-table>
- </el-col>
- <el-col :span="12">
- <com-table
- title="硬广-品牌投放top10"
- :tableList="hardBrand"
- :child="true"
- >
- <template #cols>
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="50"
- />
- <el-table-column
- show-overflow-tooltip
- align="center"
- property="name"
- label="品牌名称"
- />
- <el-table-column align="center" property="pinci">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 1
- ? 'color: red'
- : ''
- "
- >
- 频次(次)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.pinci) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="timeSize">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 2
- ? 'color: red'
- : ''
- "
- >
- 时长(秒)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.timeSize) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="fee" label="">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 3
- ? 'color: red'
- : ''
- "
- >
- 费用
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.fee) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="fee" label="环比">
- <template #default="scope">
- <svg
- t="1646702687390"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2028"
- width="20"
- v-if="scope.row[
- hard_important_list[hard_important_act].proportionType
- ] -
- scope.row.compare[
- hard_important_list[hard_important_act].proportionType
- ] <
- 0"
- height="20"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <path
- d="M558.933333 853.333333V128h-42.666666v733.866667l-145.066667-145.066667-29.866667 29.866667 192 192 192-192-29.866666-29.866667-136.533334 136.533333z"
- fill="#50b1e6"
- p-id="2029"
- ></path>
- </svg>
- <svg
- t="1646702847605"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2299"
- width="20"
- v-if="scope.row[
- hard_important_list[hard_important_act].proportionType
- ] -
- scope.row.compare[
- hard_important_list[hard_important_act].proportionType
- ] >
- 0"
- height="20"
- >
- <path
- d="M507.733333 213.333333v725.333334h42.666667V204.8l145.066667 145.066667 29.866666-29.866667L533.333333 128 341.333333 320l29.866667 29.866667L507.733333 213.333333z"
- fill="#ff5757"
- p-id="2300"
- ></path>
- </svg>
- </template>
- </el-table-column>
- </template>
- </com-table>
- </el-col>
- </el-row>
- <br />
- <div style="border-top: 1px dashed #eee"></div>
- <br />
- <el-button-group style="margin-left: 1.5em">
- <el-button
- size="small"
- type="primary"
- v-for="(item, i) in soft_important_list"
- :key="'soft_important' + i"
- :plain="soft_important_act !== i"
- @click="() => soft_important_change(i)"
- >
- {{ item.text }}
- </el-button>
- </el-button-group>
- <br />
- <el-row>
- <el-col :span="12">
- <com-table
- title="软广-广告主投放top10"
- :tableList="softMarster"
- :child="true"
- >
- <template #cols>
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="50"
- />
- <el-table-column
- show-overflow-tooltip
- align="center"
- property="name"
- label="栏目主名称"
- />
- <el-table-column align="center" property="pinci">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 1
- ? 'color: red'
- : ''
- "
- >
- 频次(次)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.pinci) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="timeSize">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 2
- ? 'color: red'
- : ''
- "
- >
- 时长(秒)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.timeSize) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="fee" label="环比">
- <template #default="scope">
- <svg
- t="1646702687390"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2028"
- width="20"
- v-if="scope.row[
- soft_important_list[this.soft_important_act].proportionType
- ] -
- scope.row.compare[
- soft_important_list[this.soft_important_act].proportionType
- ] <
- 0"
- height="20"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <path
- d="M558.933333 853.333333V128h-42.666666v733.866667l-145.066667-145.066667-29.866667 29.866667 192 192 192-192-29.866666-29.866667-136.533334 136.533333z"
- fill="#50b1e6"
- p-id="2029"
- ></path>
- </svg>
- <svg
- t="1646702847605"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2299"
- width="20"
- v-if="scope.row[
- soft_important_list[this.soft_important_act].proportionType
- ] -
- scope.row.compare[
- soft_important_list[this.soft_important_act].proportionType
- ] >
- 0"
- height="20"
- >
- <path
- d="M507.733333 213.333333v725.333334h42.666667V204.8l145.066667 145.066667 29.866666-29.866667L533.333333 128 341.333333 320l29.866667 29.866667L507.733333 213.333333z"
- fill="#ff5757"
- p-id="2300"
- ></path>
- </svg>
- </template>
- </el-table-column>
- </template>
- </com-table>
- </el-col>
- <el-col :span="12">
- <com-table
- title="软广-品牌投放top10"
- :tableList="softBrand"
- :child="true"
- >
- <template #cols>
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="50"
- />
- <el-table-column
- show-overflow-tooltip
- align="center"
- property="name"
- label="品牌名称"
- />
- <el-table-column align="center" property="pinci">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 1
- ? 'color: red'
- : ''
- "
- >
- 频次(次)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.pinci) }}
- </template>
- </el-table-column>
- <el-table-column align="center" property="timeSize">
- <template #header>
- <span
- :style="
- hard_important_list[hard_important_act].type === 2
- ? 'color: red'
- : ''
- "
- >
- 时长(秒)
- </span>
- </template>
- <template #default="scope">
- {{ numFor(scope.row.timeSize) }}
- </template>
- </el-table-column>
- <el-table-column align="center" label="环比">
- <template #default="scope">
- <svg
- t="1646702687390"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2028"
- width="20"
- v-if="scope.row[
- soft_important_list[this.soft_important_act].proportionType
- ] -
- scope.row.compare[
- soft_important_list[this.soft_important_act].proportionType
- ] <
- 0"
- height="20"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <path
- d="M558.933333 853.333333V128h-42.666666v733.866667l-145.066667-145.066667-29.866667 29.866667 192 192 192-192-29.866666-29.866667-136.533334 136.533333z"
- fill="#50b1e6"
- p-id="2029"
- ></path>
- </svg>
- <svg
- t="1646702847605"
- class="icon"
- viewBox="0 0 1024 1024"
- version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- p-id="2299"
- width="20"
- v-if="scope.row[
- soft_important_list[this.soft_important_act].proportionType
- ] -
- scope.row.compare[
- soft_important_list[this.soft_important_act].proportionType
- ] >
- 0"
- height="20"
- >
- <path
- d="M507.733333 213.333333v725.333334h42.666667V204.8l145.066667 145.066667 29.866666-29.866667L533.333333 128 341.333333 320l29.866667 29.866667L507.733333 213.333333z"
- fill="#ff5757"
- p-id="2300"
- ></path>
- </svg>
- </template>
- </el-table-column>
- </template>
- </com-table>
- </el-col>
- </el-row>
- </el-card>
- </template>
- <script>
- // @ is an alias to /src
- // import config from "@/config/index";
- import comTable from "./table.vue";
- import { industryList } from "@/api/index.js";
- export default {
- name: "AdvertisingEye",
- data() {
- return {
- soft_important_act: 0,
- hard_important_act: 0,
- hard_important_list: [
- {
- text: "时长",
- proportionType: "timeSize",
- type: 2,
- },
- {
- text: "频次",
- proportionType: "pinci",
- type: 1,
- },
- {
- text: "费用",
- proportionType: "fee",
- type: 3,
- },
- ],
- soft_important_list: [
- {
- text: "时长",
- proportionType: "timeSize",
- type: 2,
- },
- {
- text: "频次",
- proportionType: "pinci",
- type: 1,
- },
- ],
- hardMarster: [],
- hardBrand: [],
- softMarster: [],
- softBrand: [],
- };
- },
- mounted() {
- this.init();
- },
- computed: {},
- props: {
- title: String,
- industry: Number,
- industryRang: Number,
- },
- watch: {
- industryRang() {
- this.init();
- },
- industry() {
- this.init();
- },
- },
- filter: {},
- methods: {
- numFor(num) {
- if (!num) return 0;
- if (isNaN(num)) return 0;
- if (num >= 100000000) return (num / 100000000).toFixed(2) + "亿";
- if (num >= 10000) return (num / 10000).toFixed(2) + "万";
- return num;
- },
- init() {
- this.getHard();
- this.getSoft();
- },
- getHard() {
- Promise.all([
- industryList({
- tableType: 8,
- dataType: this.hard_important_list[this.hard_important_act].type,
- indexTime: this.industryRang + 1,
- }),
- industryList({
- tableType: 9,
- dataType: this.hard_important_list[this.hard_important_act].type,
- indexTime: this.industryRang + 1,
- }),
- ]).then(([marster, brand]) => {
- let realBrand = brand.filter(v => v.linkType === "2");
- for (let i = 0; i < brand.length; i++) {
- const v = brand[i];
- if (v.linkType === "2") continue;
- realBrand.map((item, o) => {
- if (item.name === v.name) realBrand[o].compare = v;
- });
- }
- let realMarster = marster.filter(v => v.linkType === "2");
- for (let i = 0; i < marster.length; i++) {
- const v = marster[i];
- if (v.linkType === "2") continue;
- realMarster.map((item, o) => {
- if (item.name === v.name) realMarster[o].compare = v;
- });
- }
- this.hardMarster = realMarster || [];
- this.hardBrand = realBrand || [];
- });
- },
- getSoft() {
- Promise.all([
- industryList({
- tableType: 10,
- dataType: this.soft_important_list[this.soft_important_act].type,
- indexTime: this.industryRang + 1,
- }),
- industryList({
- tableType: 11,
- dataType: this.soft_important_list[this.soft_important_act].type,
- indexTime: this.industryRang + 1,
- }),
- ]).then(([marster, brand]) => {
- let realBrand = brand.filter(v => v.linkType === "2");
- for (let i = 0; i < brand.length; i++) {
- const v = brand[i];
- if (v.linkType === "2") continue;
- realBrand.map((item, o) => {
- if (item.name === v.name) realBrand[o].compare = v;
- });
- }
- let realMarster = marster.filter(v => v.linkType === "2");
- for (let i = 0; i < marster.length; i++) {
- const v = marster[i];
- if (v.linkType === "2") continue;
- realMarster.map((item, o) => {
- if (item.name === v.name) realMarster[o].compare = v;
- });
- }
- this.softMarster = realMarster || [];
- this.softBrand = realBrand || [];
- });
- },
- hard_important_change(i) {
- this.hard_important_act = i;
- this.getHard();
- },
- soft_important_change(i) {
- this.soft_important_act = i;
- this.getSoft();
- },
- },
- beforeUnmount: function() {},
- components: {
- comTable,
- },
- };
- </script>
- <style></style>
|