headline-view.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691
  1. <template>
  2. <div class="accountPage">
  3. <div class="bodyBox accountBody">
  4. <div class="accountBodyLeft">
  5. <div class="accountBodyLeftCost">
  6. <div class="accountBodyLeftCostLeft">
  7. <div class="top">
  8. <div class="title">花费</div>
  9. <a-range-picker
  10. v-model="dateValue"
  11. style="width: 180px;"
  12. :allowClear="false"
  13. format="YYYY-MM-DD"
  14. :disabled-date="disabledDate"
  15. @change="onChange"
  16. />
  17. </div>
  18. <div class="costInfo">
  19. <div class="yesterdayInfo">
  20. <div style="margin-bottom:8px">昨日花费</div>
  21. <div style="font-size:14px;font-weight:600">{{ yearCostReportList.lastCost || 0 }}</div>
  22. </div>
  23. <a-divider type="vertical"/>
  24. <div class="tongbi">
  25. <div style="margin-bottom:8px">
  26. 同比
  27. <a-tooltip >
  28. <template slot="title">
  29. <span>截止此时今日与昨日的花费同比</span>
  30. </template>
  31. <a-icon type="question-circle" />
  32. </a-tooltip>
  33. </div>
  34. <div style="font-size:14px;font-weight:600">{{ yearCostReportList.compare || 0 }}</div>
  35. </div>
  36. </div>
  37. <div class="costNum">{{ yearCostReportList.nowCost || 0 }}</div>
  38. </div>
  39. <div class="accountBodyLeftCostRight">
  40. <div
  41. class="gaugeEchart"
  42. id="gaugeEchart"
  43. style="width:100%;height:200px;margin:0 auto"
  44. ref="gaugeEchart"
  45. >
  46. <a-empty/>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="accountBodyLeftOther">
  51. <div class="top">
  52. <div class="item" v-for="item in throwColumns" :key="item.dataIndex">
  53. <div class="todyCost">
  54. <span v-if="item.type === 'double'">{{ item.today }}</span>
  55. <span v-else-if="item.type === 'string'">{{ item.today }}</span>
  56. <span v-else-if="item.type === 'int'">{{ item.today }}</span>
  57. <span class="sign">
  58. <a-icon type="rise" class="rise" v-show="item.today - item.yesterday > 0"/>
  59. <a-icon type="fall" class="fall" v-show="item.today - item.yesterday < 0" />
  60. </span>
  61. </div>
  62. <div class="yesterdayCost">
  63. <span>/ 昨日: </span>
  64. <span v-if="item.type === 'double'">{{ item.yesterday }}</span>
  65. <span v-else-if="item.type === 'string'">{{ item.yesterday }}</span>
  66. <span v-else-if="item.type === 'int'">{{ item.yesterday !== 0 ? item.yesterday + '%' : 0 }}</span>
  67. </div>
  68. <span
  69. class="IndexName"
  70. :class="{'IndexNameActive': isActive === item.dataIndex}"
  71. @click="handleGetActiveIndexName(item)"
  72. >
  73. <a-tooltip>
  74. <template slot="title">
  75. <span>{{ item.title }}</span>
  76. </template>
  77. <span style="display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:105px">
  78. {{ item.title }}
  79. </span>
  80. </a-tooltip>
  81. </span>
  82. </div>
  83. </div>
  84. <div class="echart" style="margin-top:20px;position:relative">
  85. <a-spin :spinning="accountIndexEchartSpinning">
  86. <div
  87. class="accountIndexEchart"
  88. id="accountIndexEchart"
  89. style='width:100%;height:150px;margin:0 auto;'
  90. ref="accountIndexEchart"
  91. >
  92. <a-empty/>
  93. </div>
  94. </a-spin>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="accountBodyRight">
  99. <div class="accountBodyRighTitle">
  100. <div class="acount-body-content" @click="handleChangeAccount">
  101. <p class="acount-body-title">{{ topAccountMsg.accountMap && topAccountMsg.accountMap.authName }}</p>
  102. <span>
  103. <a-icon type="down" style="font-size:14px"/>
  104. </span>
  105. </div>
  106. <div class="accountBodyRighTitleID">
  107. 账户ID:{{ topAccountMsg.accountMap && topAccountMsg.accountMap.accountId }}
  108. </div>
  109. </div>
  110. <div class="accountBodyRightInfo">
  111. <div class="accountBodyRightInfoItem">
  112. <span class="name">余额:</span>
  113. <span>{{ topAccountMsg.accountMap && topAccountMsg.accountMap.validBalance }}</span>
  114. </div>
  115. <div class="accountBodyRightInfoItem">
  116. <span class="name">投放状态:</span>
  117. <span>{{ topAccountMsg.accountMap && topAccountMsg.accountMap.accountStatus === 0 ? '投放中' : '未投放' }}</span>
  118. </div>
  119. <div class="accountBodyRightInfoItem createNum">
  120. <span class="name">被拒创意数:</span>
  121. <span>0</span>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="bodyBox planBody">
  127. <div class="planBodyRight">
  128. <div class="title">
  129. <div class="titleContext">
  130. 投放数据
  131. </div>
  132. <div style="float: right;margin-top: -23px;">
  133. <a-range-picker
  134. v-model="planRangePicker"
  135. style="width:200px;"
  136. :allowClear="false"
  137. :disabled-date="disabledDate"
  138. @change="handlePlanPicker"
  139. />
  140. </div>
  141. </div>
  142. <div class="table">
  143. <a-table
  144. :columns="planColumns"
  145. :data-source="planData"
  146. :pagination="false"
  147. @change="handlePlaneSort"
  148. >
  149. <span slot="optStatus" slot-scope="text, record">
  150. <a-switch :checked="text === 'AD_STATUS_ENABLE'" @change="handleSwitchChang($event, record)"/>
  151. </span>
  152. <span slot="operator" slot-scope="text, record">
  153. <a @click="handleModifyPrice(record)">调价</a>
  154. <a-divider type="vertical"/>
  155. <a-dropdown :trigger="['click']">
  156. <a class="ant-dropdown-link" @click="e => e.preventDefault()">更多</a>
  157. <a-menu slot="overlay">
  158. <a-menu-item>
  159. <a @click="handleUpdateDirectional(record)">修改定向</a>
  160. </a-menu-item>
  161. </a-menu>
  162. </a-dropdown>
  163. </span>
  164. </a-table>
  165. <a-pagination
  166. class="pagin-table-class"
  167. :total="planTotalAll"
  168. :show-total="total => `共 ${planTotalAll} 条`"
  169. size="small"
  170. show-size-changer
  171. show-quick-jumper
  172. @change="handleOnShowSizeChange"
  173. @showSizeChange="handleOnShowSizeChange"
  174. />
  175. </div>
  176. </div>
  177. </div>
  178. <div class="bodyBox materialBody">
  179. <div class="dataPicker">
  180. <div>
  181. <a-range-picker
  182. v-model="materialDate"
  183. style="width:200px;"
  184. :allowClear="false"
  185. :disabled-date="disabledDate"
  186. @change="materialDataChange"
  187. />
  188. </div>
  189. </div>
  190. <div class="titleContext source-material"> 素材相关</div>
  191. <div class="materialBodyRight">
  192. <div class="material-table-class">
  193. <a-table
  194. :columns="materialColumns"
  195. :data-source="materialData"
  196. :pagination="false"
  197. @change="materialChange"
  198. >
  199. <span slot="posterUrl" slot-scope="text,record">
  200. <div style="background:#e8e8e8;text-align:center;border-radius:3px">
  201. <a-popover placement="right">
  202. <template slot="content">
  203. <video :src="record.videoUrl" style="width:250px" controls></video>
  204. </template>
  205. <img v-if="text" :src="text" style="width:20px">
  206. <img v-if="!text" src="@/assets/noImg.png" style="width:20px">
  207. </a-popover>
  208. </div>
  209. </span>
  210. </a-table>
  211. <a-pagination
  212. class="pagin-table-class"
  213. :total="materTotalAll"
  214. :show-total="total => `共 ${materTotalAll} 条`"
  215. size="small"
  216. show-size-changer
  217. show-quick-jumper
  218. @change="handleSourceMaterialChange"
  219. @showSizeChange="handleSourceMaterialChange"
  220. />
  221. </div>
  222. </div>
  223. </div>
  224. <!-- 修改定向的modal -->
  225. <a-modal
  226. v-model="targetVisible"
  227. title="修改定向包"
  228. @ok="handleTargethandleOk"
  229. @cancel="handleTargethandleCancel"
  230. >
  231. <div class="linkBody">
  232. <a-row>
  233. <a-col :span="6">
  234. <div style="text-align:right">已优先定向:</div>
  235. </a-col>
  236. <a-col :span="16">DMP</a-col>
  237. </a-row>
  238. <a-row style="margin-top: 20px;">
  239. <a-col :span="6">
  240. <div style="text-align:right">修改定向包:</div>
  241. </a-col>
  242. <a-col :span="16">
  243. <a-select
  244. style="width: 240px;"
  245. v-model="adAudiencePackageId"
  246. allow-clear
  247. placeholder="请选择已有定向包名称"
  248. >
  249. <a-select-option
  250. v-for="(item, index) in selectiveList"
  251. :key="index"
  252. :value="item.audience_package_id"
  253. >
  254. {{ item.name }}
  255. </a-select-option>
  256. </a-select>
  257. </a-col>
  258. </a-row>
  259. </div>
  260. </a-modal>
  261. <!-- 修改账户modal -->
  262. <a-modal
  263. :visible="accountVisible"
  264. :width="800"
  265. title="切换账户"
  266. @ok="handleAccounthandleOk"
  267. @cancel="handleAccountCancel"
  268. >
  269. <div class="linkBody" style="height:100px;display:flex;">
  270. <div style="height:32px;line-height:32px">选择账户:</div>
  271. <tree-select
  272. :appId.sync="selectaccountId"
  273. :multiple="false"
  274. request="1,3"
  275. ref="treeSelect"
  276. style="margin-bottom:8px;width:600px "
  277. >
  278. </tree-select>
  279. </div>
  280. </a-modal>
  281. <a-modal
  282. title="修改调价"
  283. v-if="budgetVisible"
  284. :visible="budgetVisible"
  285. dialog-class="mode-modal-class"
  286. @ok="handleBudgetSure"
  287. @cancel="handleBudgetCancel"
  288. >
  289. <div>
  290. <a-form-model
  291. ref="budgetForm"
  292. :model="budgetForm"
  293. :rules="budgetRules"
  294. :label-col="labelCol"
  295. :wrapper-col="wrapperCol"
  296. >
  297. <a-form-model-item label="调价" prop="budget">
  298. <a-input-number
  299. v-model="budgetForm.budget"
  300. /> 元
  301. </a-form-model-item>
  302. </a-form-model>
  303. </div>
  304. </a-modal>
  305. </div>
  306. </template>
  307. <script>
  308. import moment from 'moment';
  309. import {getAction} from '@/api/manage';
  310. import TreeSelect from '@/views/modules/Statistics/components/Treeselect.vue';
  311. import {mapGetters} from 'vuex';
  312. import {urlAcount} from './headline-view-server.js';
  313. // 引入基本模板
  314. let echarts = require('echarts');
  315. // 引入柱状图组件
  316. require('echarts/lib/chart/bar');
  317. require('echarts/lib/chart/line');
  318. require('echarts/lib/chart/map');
  319. require('echarts/lib/chart/gauge');
  320. // 引入提示框和title组件
  321. require('echarts/lib/component/tooltip');
  322. require('echarts/lib/component/title');
  323. require('echarts/lib/component/graphic');
  324. require('echarts/lib/component/toolbox');
  325. require('echarts/lib/component/legend');
  326. export default {
  327. name: 'headline-view',
  328. components: {
  329. TreeSelect
  330. },
  331. data() {
  332. return {
  333. adAudiencePackageId: '',
  334. planRangePicker: [],
  335. labelCol: {span: 4},
  336. wrapperCol: {span: 14},
  337. budgetForm: {
  338. budget: 0
  339. },
  340. budgetRules: {
  341. budget: [
  342. {required: true, message: '请输入', trigger: 'blur'}
  343. ]
  344. },
  345. budgetVisible: false,
  346. planTotalAll: 100,
  347. dateStringShow: '', // 为了账户哪儿的问号显示对应段时间
  348. selectaccountId: '', // 修改账户弹窗的value
  349. accountVisible: false,
  350. throwColumns: [
  351. {
  352. title: '转化成本',
  353. dataIndex: 'activationCost',
  354. key: 'activationCost',
  355. today: 0,
  356. yesterday: 0,
  357. type: 'double'
  358. },
  359. {
  360. title: '转化数',
  361. dataIndex: 'activation',
  362. key: 'activation',
  363. today: 0,
  364. yesterday: 0,
  365. type: 'int'
  366. },
  367. {
  368. title: '转化率',
  369. dataIndex: 'bclick',
  370. key: 'bclick',
  371. today: 0,
  372. yesterday: 0,
  373. type: 'int'
  374. },
  375. {
  376. title: '平均千次展现费用',
  377. dataIndex: 'formCount',
  378. key: 'formCount',
  379. today: 0,
  380. yesterday: 0,
  381. type: 'int'
  382. }
  383. ],
  384. newLink: '',
  385. linkVisible: false,
  386. targetVisible: false,
  387. isActive: 'activationCost',
  388. moment,
  389. materialDate: [],
  390. dateValue: [],
  391. planData: [],
  392. planPagin: {
  393. page: 1,
  394. size: 10
  395. },
  396. planColumns: [
  397. {
  398. title: '计划名称',
  399. dataIndex: 'adName',
  400. key: 'adName',
  401. align: 'center',
  402. width: 120
  403. },
  404. {
  405. title: '花费',
  406. dataIndex: 'cost',
  407. key: 'cost',
  408. align: 'center',
  409. sorter: (a, b) => a.cost - b.cost
  410. },
  411. {
  412. title: '出价',
  413. dataIndex: 'cpaBid',
  414. key: 'cpaBid',
  415. align: 'center',
  416. sorter: (a, b) => a.cpaBid - b.cpaBid
  417. },
  418. {
  419. title: '展示数',
  420. dataIndex: 'showNum',
  421. key: 'showNum',
  422. align: 'center',
  423. sorter: (a, b) => a.showNum - b.showNum
  424. },
  425. {
  426. title: '平均千次展现费用',
  427. dataIndex: 'averageShow',
  428. key: 'averageShow',
  429. align: 'center',
  430. sorter: (a, b) => a.averageShow - b.averageShow
  431. },
  432. {
  433. title: '点击数',
  434. dataIndex: 'click',
  435. key: 'click',
  436. align: 'center',
  437. sorter: (a, b) => a.click - b.click
  438. },
  439. {
  440. title: '平均点击单价',
  441. dataIndex: 'averageClick',
  442. key: 'averageClick',
  443. align: 'center',
  444. sorter: (a, b) => a.averageClick - b.averageClick
  445. },
  446. {
  447. title: '点击率',
  448. dataIndex: 'clickRate',
  449. key: 'clickRate',
  450. align: 'center',
  451. sorter: (a, b) => a.clickRate.split('%')[0] - b.clickRate.split('%')[0]
  452. },
  453. {
  454. title: '转化数',
  455. dataIndex: 'convertNum',
  456. key: 'convertNum',
  457. align: 'center',
  458. sorter: (a, b) => a.convertNum - b.convertNum
  459. },
  460. {
  461. title: '转化率',
  462. dataIndex: 'converRate',
  463. key: 'converRate',
  464. align: 'center',
  465. sorter: (a, b) => a.converRate.split('%')[0] - b.converRate.split('%')[0]
  466. },
  467. {
  468. title: '转化成本',
  469. dataIndex: 'conver',
  470. key: 'conver',
  471. align: 'center',
  472. sorter: (a, b) => a.conver - b.conver
  473. },
  474. {
  475. title: '环比',
  476. dataIndex: 'compare',
  477. key: 'compare',
  478. align: 'center'
  479. },
  480. {
  481. title: '状态',
  482. dataIndex: 'optStatus',
  483. key: 'optStatus',
  484. align: 'center',
  485. scopedSlots: {customRender: 'optStatus'}
  486. },
  487. {
  488. title: '操作',
  489. dataIndex: 'operator',
  490. key: 'operator',
  491. align: 'center',
  492. scopedSlots: {customRender: 'operator'}
  493. }
  494. ],
  495. materPagin: {
  496. page: 1,
  497. size: 10
  498. },
  499. materialColumns: [
  500. {
  501. title: '素材',
  502. dataIndex: 'posterUrl',
  503. key: 'posterUrl',
  504. align: 'center',
  505. scopedSlots: {customRender: 'posterUrl'},
  506. width: 100,
  507. fixed: 'left'
  508. },
  509. {
  510. title: '素材ID',
  511. dataIndex: 'materialId',
  512. key: 'materialId',
  513. align: 'center'
  514. },
  515. {
  516. title: '花费',
  517. dataIndex: 'cost',
  518. align: 'center',
  519. sorter: (a, b) => a.cost - b.cost
  520. },
  521. {
  522. title: '展示数',
  523. dataIndex: 'showMaterial',
  524. key: 'showMaterial',
  525. align: 'center',
  526. sorter: (a, b) => a.showMaterial - b.showMaterial
  527. },
  528. {
  529. title: '平均千次展现费用',
  530. dataIndex: 'costPerThousandShow',
  531. key: 'costPerThousandShow',
  532. align: 'center',
  533. sorter: (a, b) => a.costPerThousandShow - b.costPerThousandShow
  534. },
  535. {
  536. title: '点击数',
  537. dataIndex: 'click',
  538. key: 'click',
  539. align: 'center',
  540. sorter: (a, b) => a.click - b.click
  541. },
  542. {
  543. title: '平均点击单价',
  544. dataIndex: 'costPerClick',
  545. key: 'costPerClick',
  546. align: 'center',
  547. sorter: (a, b) => a.costPerClick - b.costPerClick
  548. },
  549. {
  550. title: '点击率',
  551. dataIndex: 'clickRate',
  552. key: 'clickRate',
  553. align: 'center',
  554. sorter: (a, b) => a.clickRate.split('%')[0] - b.clickRate.split('%')[0]
  555. },
  556. {
  557. title: '转化数',
  558. dataIndex: 'convertMaterial',
  559. key: 'convertMaterial',
  560. align: 'center',
  561. sorter: (a, b) => a.convertMaterial - b.convertMaterial
  562. },
  563. {
  564. title: '转化率',
  565. dataIndex: 'convertRate',
  566. key: 'convertRate',
  567. align: 'center',
  568. sorter: (a, b) => a.convertRate.split('%')[0] - b.convertRate.split('%')[0]
  569. },
  570. {
  571. title: '转化成本',
  572. dataIndex: 'costConvert',
  573. key: 'costConvert',
  574. align: 'center'
  575. },
  576. {
  577. title: '关联创意数',
  578. dataIndex: 'count',
  579. key: 'count',
  580. align: 'center'
  581. },
  582. {
  583. title: '上线时间',
  584. dataIndex: 'materialUploadTime',
  585. key: 'photoShow',
  586. align: 'center',
  587. scopedSlots: {customRender: 'photoShow'}
  588. }
  589. ],
  590. materialData: [],
  591. materTotalAll: 0,
  592. accountIndexEchartSpinning: false, // 账户模块的指标的echart
  593. newDataSortCode: 'charge',
  594. newDataSortType: 'DESC',
  595. materialSortCode: 'charge',
  596. materialSortType: 'DESC',
  597. directionalList: [],
  598. selectDirectionalId: undefined,
  599. topAccountMsg: {},
  600. topCostList: {},
  601. yearCostReportList: {}, // 环比数据
  602. selectiveList: [],
  603. currentUnit: {}
  604. };
  605. },
  606. mounted() {
  607. this.handleGetInit();
  608. },
  609. methods: {
  610. ...mapGetters(['userInfo']),
  611. // 获取所有的定向包的列表
  612. handleGetAdAudiencePackage(account) {
  613. const params = {
  614. accountId: account
  615. };
  616. getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', params)
  617. .then(result => {
  618. if (result.code === 0) {
  619. this.selectiveList = result.result || [];
  620. }
  621. else {
  622. this.$message.error(result.message);
  623. }
  624. })
  625. .catch(error => {
  626. console.log(error, 'eeee');
  627. });
  628. },
  629. handleChangeAccount() {
  630. this.accountVisible = true;
  631. },
  632. // 计划开关的切换事件
  633. handleSwitchChang(checked, data) {
  634. const paramsData = {
  635. adId: data.adId,
  636. optStatus: checked ? 'enable' : 'disable',
  637. accountId: this.topCostList.account.accountId
  638. };
  639. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updPlanStatus', paramsData).then(result => {
  640. if (result.code === 0) {
  641. this.$message.success(result.message);
  642. this.handleGetPlanTableList(this.topCostList);
  643. }
  644. else {
  645. this.$message.error(result.message);
  646. }
  647. }).catch(error => {
  648. console.log(error, 'eeee');
  649. });
  650. },
  651. handleUpdateDirectional(record) {
  652. this.currentUnit = record;
  653. this.targetVisible = true;
  654. },
  655. handleBudgetSure() {
  656. this.$refs.budgetForm.validate(valid => {
  657. if (valid) {
  658. const paramsData = {
  659. adId: this.currentUnit.adId,
  660. bid: this.budgetForm.budget,
  661. accountId: this.topCostList.account.accountId
  662. };
  663. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADBid', paramsData).then(result => {
  664. if (result.code === 0) {
  665. this.$message.success(result.message);
  666. this.budgetForm.budget = '';
  667. this.budgetVisible = false;
  668. this.handleGetPlanTableList(this.topCostList);
  669. }
  670. else {
  671. this.$message.error(result.message);
  672. }
  673. }).catch(error => {
  674. console.log(error, 'eeee');
  675. });
  676. }
  677. else {
  678. console.log('error submit!!');
  679. return false;
  680. }
  681. });
  682. },
  683. // 调价修改取消按钮
  684. handleBudgetCancel() {
  685. this.budgetForm.budget = '';
  686. this.budgetVisible = false;
  687. },
  688. // 调价修改确定按钮
  689. handleModifyPrice(list) {
  690. this.currentUnit = list;
  691. this.budgetVisible = true;
  692. },
  693. // 获取计划列表数据
  694. handleGetPlanTableList(data) {
  695. const paramsData = {
  696. accountId: data.account.accountId,
  697. startTime: data.startTime,
  698. endTime: data.endTime,
  699. pageNum: this.planPagin.page,
  700. pageSize: this.planPagin.size
  701. };
  702. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getReportPlanCost', paramsData).then(result => {
  703. if (result.code === 0) {
  704. this.planData = result.result.list.map(item => {
  705. item.converRate = item.converRate + '%';
  706. return item;
  707. });
  708. this.planTotalAll = result.result.total;
  709. }
  710. else {
  711. this.$message.error(result.message);
  712. }
  713. }).catch(error => {
  714. console.log(error, 'eeee');
  715. });
  716. },
  717. // 获取echarts数据
  718. handleYearOnYearCost(data) {
  719. const paramsData = {
  720. accountId: data.account.accountId,
  721. startTime: data.startTime,
  722. endTime: data.endTime
  723. };
  724. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getReportYearOnYearCost', paramsData).then(result => {
  725. if (result.code === 0) {
  726. this.yearCostReportList = result.result;
  727. this.initEchart('gaugeEchart', this.initGaugechart(result.result.costShare));
  728. this.initEchart('accountIndexEchart', this.initAccountIndexEchart(result.result, 'activationCost'));
  729. this.throwColumns[0].today = Number(result.result.nowMap.conver);
  730. this.throwColumns[0].yesterday = Number(result.result.lastMap.conver);
  731. this.throwColumns[1].today = Number(result.result.nowMap.converNum);
  732. this.throwColumns[1].yesterday = Number(result.result.lastMap.converNum);
  733. this.throwColumns[2].today = Number(result.result.nowMap.converRate);
  734. this.throwColumns[2].yesterday = Number(result.result.lastMap.converRate);
  735. this.throwColumns[3].today = Number(result.result.nowMap.averageShow);
  736. this.throwColumns[3].yesterday = Number(result.result.lastMap.averageShow);
  737. }
  738. else {
  739. this.$message.error(result.message);
  740. }
  741. }).catch(error => {
  742. console.log(error, 'eeee');
  743. });
  744. },
  745. // 初始化数据
  746. handleGetInit() {
  747. const paramsData = {
  748. userId: this.userInfo().id,
  749. type: 'bytedance'
  750. };
  751. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/initAccountIdAndTime', paramsData).then(result => {
  752. if (result.code === 0) {
  753. this.topCostList = result.result;
  754. const defaultTime = [result.result.startTime, result.result.endTime];
  755. this.dateValue = [...defaultTime];
  756. this.planRangePicker = [...defaultTime];
  757. this.materialDate = [...defaultTime];
  758. this.handleGetAccountMessage(result.result.account.accountId);
  759. this.handleYearOnYearCost(result.result);
  760. this.handleGetPlanTableList(result.result);
  761. this.handleGetmaterialData(result.result);
  762. this.handleGetAdAudiencePackage(result.result.account.accountId);
  763. }
  764. else {
  765. this.$message.error(result.message);
  766. }
  767. }).catch(error => {
  768. console.log(error, 'eeee');
  769. });
  770. },
  771. // 获取头部最右侧数据
  772. handleGetAccountMessage(value) {
  773. const paramsData = {
  774. accountId: value
  775. };
  776. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/getAccountCost', paramsData).then(result => {
  777. if (result.code === 0) {
  778. this.topAccountMsg = result.result;
  779. }
  780. else {
  781. this.$message.error(result.message);
  782. }
  783. }).catch(error => {
  784. console.log(error, 'eeee');
  785. });
  786. },
  787. // 获取素材列表数据
  788. handleGetmaterialData(data) {
  789. const paramsData = {
  790. accountId: data.account.accountId,
  791. startTime: data.startTime,
  792. endTime: data.endTime,
  793. pageNum: this.materPagin.page,
  794. pageSize: this.materPagin.size
  795. };
  796. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/selectMaterialDailyReport', paramsData).then(result => {
  797. if (result.code === 0) {
  798. this.materialData = result.result.list.map(item => {
  799. item.clickRate = item.clickRate + '%';
  800. item.convertRate = item.convertRate + '%';
  801. return item;
  802. });
  803. this.materTotalAll = result.result.total;
  804. }
  805. else {
  806. this.$message.error(result.message);
  807. }
  808. }).catch(error => {
  809. console.log(error, 'eeee');
  810. });
  811. },
  812. handleGetActiveIndexName(val) {
  813. this.isActive = val.dataIndex;
  814. this.initEchart('accountIndexEchart', this.initAccountIndexEchart(this.yearCostReportList, val.dataIndex));
  815. },
  816. // 修改定向的确定按钮
  817. handleTargethandleOk() {
  818. const paramsData = {
  819. accountId: this.topCostList.account.accountId,
  820. adId: this.currentUnit.adId,
  821. audiencePackageId: this.adAudiencePackageId
  822. };
  823. getAction(urlAcount + '/bytedance-api/advertiser/bytedanceReportController/updateADAudiencePackage', paramsData).then(result => {
  824. if (result.code === 0) {
  825. this.adAudiencePackageId = '';
  826. this.targetVisible = false;
  827. this.$message.success(result.message);
  828. this.handleGetPlanTableList(this.topCostList);
  829. }
  830. else {
  831. this.$message.error(result.message);
  832. }
  833. }).catch(error => {
  834. console.log(error, 'eeee');
  835. });
  836. },
  837. // 修改定向的取消按钮
  838. handleTargethandleCancel() {
  839. this.adAudiencePackageId = '';
  840. this.targetVisible = false;
  841. },
  842. handleAccounthandleOk() {
  843. const paramsData = {
  844. account: {
  845. accountId: this.selectaccountId
  846. },
  847. startTime: this.topCostList.startTime,
  848. endTime: this.topCostList.startTime
  849. };
  850. this.topCostList = paramsData;
  851. this.handleGetAccountMessage(this.selectaccountId);
  852. this.handleYearOnYearCost(paramsData);
  853. this.handleGetPlanTableList(paramsData);
  854. this.handleGetmaterialData(paramsData);
  855. this.handleGetAdAudiencePackage(this.selectaccountId);
  856. this.selectaccountId = '';
  857. this.accountVisible = false;
  858. },
  859. handleAccountCancel() {
  860. this.selectaccountId = '';
  861. this.accountVisible = false;
  862. },
  863. // 计划点击分页操作
  864. handleOnShowSizeChange(current, pageSize) {
  865. this.planPagin = {
  866. page: current,
  867. size: pageSize
  868. };
  869. const paramsData = {
  870. account: {
  871. accountId: this.topCostList.account.accountId
  872. },
  873. startTime: this.planRangePicker[0],
  874. endTime: this.planRangePicker[1]
  875. };
  876. this.handleGetPlanTableList(paramsData);
  877. },
  878. // 素材点击分页操作
  879. handleSourceMaterialChange(current, pageSize) {
  880. this.materPagin = {
  881. page: current,
  882. size: pageSize
  883. };
  884. const paramsData = {
  885. account: {
  886. accountId: this.topCostList.account.accountId
  887. },
  888. startTime: this.materialDate[0],
  889. endTime: this.materialDate[1]
  890. };
  891. this.handleGetmaterialData(paramsData);
  892. },
  893. // have 跳转到拒审重提-创意页面
  894. gorejectCreativePage() {
  895. this.$router.push('/Statistics/refuseDataCreatNew');
  896. },
  897. disabledDate(current) {
  898. return current && !(current > (moment().subtract(1, 'months')) && current < moment());
  899. },
  900. // 计划点击时间切换数据
  901. handlePlanPicker(date, dateString) {
  902. this.planRangePicker = dateString;
  903. this.planPagin = {
  904. page: 1,
  905. size: 10
  906. };
  907. const paramsData = {
  908. account: {
  909. accountId: this.topCostList.account.accountId
  910. },
  911. startTime: dateString[0],
  912. endTime: dateString[1]
  913. };
  914. this.handleGetPlanTableList(paramsData);
  915. },
  916. onChange(date, dateString) {
  917. if (dateString.length > 0 && dateString[0] !== dateString[1]) {
  918. let interval = date[1].diff(date[0], 'days');
  919. this.dateStringShow = `${moment(date[0]).subtract(1 + interval, 'days').format('YYYY-MM-DD')}~${moment(date[0]).subtract(1, 'days').format('YYYY-MM-DD')}`;
  920. }
  921. const paramsData = {
  922. account: {
  923. accountId: this.topCostList.account.accountId
  924. },
  925. startTime: dateString[0],
  926. endTime: dateString[1]
  927. };
  928. this.handleYearOnYearCost(paramsData);
  929. },
  930. // 获取echart的值
  931. initEchart(idName, optionName) {
  932. const chart = this.$refs[idName];
  933. if (chart) {
  934. const myChart = echarts.init(document.getElementById(idName));
  935. myChart.clear();
  936. myChart.setOption(optionName);
  937. window.addEventListener('resize', function () {
  938. myChart.resize();
  939. });
  940. }
  941. },
  942. // 素材选择时间切换数据
  943. materialDataChange(date, dateString) {
  944. this.materialDate = dateString;
  945. this.materPagin = {
  946. page: 1,
  947. size: 10
  948. };
  949. const paramsData = {
  950. account: {
  951. accountId: this.topCostList.account.accountId
  952. },
  953. startTime: dateString[0],
  954. endTime: dateString[1]
  955. };
  956. this.handleGetmaterialData(paramsData);
  957. },
  958. // 默认echarts
  959. initAccountIndexEchart(data, type) {
  960. const LastX = data.lastMap.costList.map(item => item.time);
  961. const todayX = data.nowMap.costList.map(item => item.time);
  962. let specialIdentification = '';
  963. if (todayX.length && todayX[0].indexOf('-') !== -1) {
  964. specialIdentification = '';
  965. }
  966. else {
  967. specialIdentification = '时';
  968. }
  969. let tadayShowY = [];
  970. let yestodayShowY = [];
  971. if (type === 'activationCost') {
  972. tadayShowY = data.nowMap.costList.map(item => item.conver);
  973. yestodayShowY = data.lastMap.costList.map(item => item.conver);
  974. }
  975. else if (type === 'activation') {
  976. tadayShowY = data.nowMap.costList.map(item => item.convertNum);
  977. yestodayShowY = data.lastMap.costList.map(item => item.convertNum);
  978. }
  979. else if (type === 'bclick') {
  980. tadayShowY = data.nowMap.costList.map(item => item.converRate);
  981. yestodayShowY = data.lastMap.costList.map(item => item.converRate);
  982. }
  983. else if (type === 'formCount') {
  984. tadayShowY = data.nowMap.costList.map(item => item.averageShow);
  985. yestodayShowY = data.lastMap.costList.map(item => item.averageShow);
  986. }
  987. let option = {
  988. tooltip: {
  989. trigger: 'axis',
  990. formatter: params => {
  991. let isType = '';
  992. this.throwColumns.forEach(item => {
  993. if (item.dataIndex === this.isActive) {
  994. isType = item.title;
  995. }
  996. });
  997. let option = isType + '<br/>';
  998. for (let i = 0, length = params.length; i < length; i++) {
  999. const showTime = specialIdentification === '时' ? params[i].seriesName : '';
  1000. option += `<span style="width:8px;height:8px;border-radius:50%;background:${params[i].color};display:inline-block;position:relative;top:-2px;margin-right:5px"></span>` + showTime + ' ' + params[i].axisValue + specialIdentification + ' ' + params[i].data + '<br />';
  1001. }
  1002. return option;
  1003. }
  1004. },
  1005. grid: {
  1006. left: '5px',
  1007. top: 0,
  1008. right: '5px',
  1009. bottom: 0
  1010. },
  1011. xAxis: [
  1012. {
  1013. type: 'category',
  1014. show: false,
  1015. boundaryGap: false,
  1016. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  1017. axisPointer: {
  1018. type: 'none'
  1019. }
  1020. },
  1021. {
  1022. type: 'category',
  1023. show: false,
  1024. boundaryGap: false,
  1025. data: ['1', '2', '3', '4', '5', '6', '7'],
  1026. axisPointer: {
  1027. type: 'none'
  1028. }
  1029. }
  1030. ],
  1031. yAxis: {
  1032. type: 'value',
  1033. show: false
  1034. },
  1035. series: [
  1036. {
  1037. name: '今天',
  1038. data: [],
  1039. type: 'line',
  1040. smooth: true,
  1041. showSymbol: false,
  1042. xAxisIndex: 1,
  1043. symbol: 'circle',
  1044. lineStyle: {
  1045. color: '#2461F1',
  1046. width: 3
  1047. },
  1048. itemStyle: {
  1049. color: '#2461F1',
  1050. borderWidth: 2,
  1051. borderColor: '#fff'
  1052. },
  1053. areaStyle: {
  1054. color: {
  1055. type: 'linear',
  1056. x: 0,
  1057. y: 0,
  1058. x2: 0,
  1059. y2: 1,
  1060. colorStops: [{
  1061. offset: 0, color: '#2461F1' // 0% 处的颜色
  1062. }, {
  1063. offset: 1, color: 'white' // 100% 处的颜色
  1064. }]
  1065. }
  1066. }
  1067. },
  1068. {
  1069. name: '昨天',
  1070. data: [],
  1071. type: 'line',
  1072. smooth: true,
  1073. xAxisIndex: 0,
  1074. showSymbol: false,
  1075. symbol: 'circle',
  1076. lineStyle: {
  1077. color: '#3CC6A5',
  1078. width: 3
  1079. },
  1080. itemStyle: {
  1081. color: '#3CC6A5',
  1082. borderWidth: 2,
  1083. borderColor: '#fff'
  1084. },
  1085. areaStyle: {
  1086. color: {
  1087. type: 'linear',
  1088. x: 0,
  1089. y: 0,
  1090. x2: 0,
  1091. y2: 1,
  1092. colorStops: [{
  1093. offset: 0, color: '#3CC6A5' // 0% 处的颜色
  1094. }, {
  1095. offset: 1, color: 'white' // 100% 处的颜色
  1096. }]
  1097. }
  1098. }
  1099. }
  1100. ]
  1101. };
  1102. option.xAxis[0].data = todayX;
  1103. option.xAxis[1].data = LastX;
  1104. option.series[0].data = tadayShowY;
  1105. option.series[1].data = yestodayShowY;
  1106. return option;
  1107. },
  1108. // 花费占比echarts
  1109. initGaugechart(value) {
  1110. let dataArr = value.split('%')[0];
  1111. let colorSet = {
  1112. color: '#fff'
  1113. };
  1114. let option = {
  1115. tooltip: {
  1116. formatter: '{a} <br/>{b} : {c}%'
  1117. },
  1118. series: [
  1119. {
  1120. name: '内部进度条',
  1121. type: 'gauge',
  1122. radius: '40%',
  1123. splitNumber: 10,
  1124. axisLine: {
  1125. lineStyle: {
  1126. color: [
  1127. [dataArr / 100 || 0, colorSet.color],
  1128. [1, '#111F42']
  1129. ],
  1130. width: 8
  1131. }
  1132. },
  1133. axisLabel: {
  1134. show: false
  1135. },
  1136. axisTick: {
  1137. show: false
  1138. },
  1139. splitLine: {
  1140. show: false
  1141. },
  1142. itemStyle: {
  1143. show: false
  1144. },
  1145. detail: {
  1146. formatter: function(value) {
  1147. if (value !== 0) {
  1148. let num = Math.round(value);
  1149. return parseInt(num).toFixed(0) + '%';
  1150. }
  1151. else {
  1152. return 0;
  1153. }
  1154. },
  1155. offsetCenter: [0, 52],
  1156. textStyle: {
  1157. padding: [0, 0, 0, 0],
  1158. fontSize: 18,
  1159. fontWeight: '700',
  1160. color: colorSet.color
  1161. }
  1162. },
  1163. title: { // 标题
  1164. show: true,
  1165. offsetCenter: [0, 80], // x, y,单位px
  1166. textStyle: {
  1167. color: '#fff',
  1168. fontSize: 14, // 表盘上的标题文字大小
  1169. fontWeight: 400,
  1170. fontFamily: 'PingFangSC'
  1171. }
  1172. },
  1173. data: [{
  1174. name: '花费占比',
  1175. value: dataArr
  1176. }],
  1177. pointer: {
  1178. show: true,
  1179. length: '75%',
  1180. radius: '20%',
  1181. width: 3 // 指针粗细
  1182. },
  1183. animationDuration: 4000
  1184. },
  1185. {
  1186. name: '外部刻度',
  1187. type: 'gauge',
  1188. radius: '50%',
  1189. min: 0, // 最小刻度
  1190. max: 100, // 最大刻度
  1191. splitNumber: 5, // 刻度数量
  1192. startAngle: 225,
  1193. endAngle: -45,
  1194. axisLine: {
  1195. show: true,
  1196. lineStyle: {
  1197. width: 1,
  1198. color: [
  1199. [1, 'rgba(0,0,0,0)']
  1200. ]
  1201. }
  1202. }, // 仪表盘轴线
  1203. axisLabel: {
  1204. show: true,
  1205. color: '#fff',
  1206. distance: -20,
  1207. formatter: function(v) {
  1208. switch (v + '') {
  1209. case '0':
  1210. return '0';
  1211. case '10':
  1212. return '10';
  1213. case '20':
  1214. return '20';
  1215. case '30':
  1216. return '30';
  1217. case '40':
  1218. return '40';
  1219. case '50':
  1220. return '50';
  1221. case '60':
  1222. return '60';
  1223. case '70':
  1224. return '70';
  1225. case '80':
  1226. return '80';
  1227. case '90':
  1228. return '90';
  1229. case '100':
  1230. return '100';
  1231. }
  1232. }
  1233. }, // 刻度标签。
  1234. axisTick: {
  1235. show: true,
  1236. splitNumber: 5,
  1237. lineStyle: {
  1238. color: colorSet.color, // 用颜色渐变函数不起作用
  1239. width: 1
  1240. },
  1241. length: -8
  1242. }, // 刻度样式
  1243. splitLine: {
  1244. show: true,
  1245. length: -10,
  1246. lineStyle: {
  1247. color: colorSet.color // 用颜色渐变函数不起作用
  1248. }
  1249. }, // 分隔线样式
  1250. detail: {
  1251. show: false
  1252. },
  1253. pointer: {
  1254. show: false
  1255. }
  1256. }
  1257. ]
  1258. };
  1259. return option;
  1260. },
  1261. // 投放点击排序功能
  1262. handlePlaneSort(pagination, filters, sorter, {currentDataSource}) {
  1263. if (sorter.order === 'descend') {
  1264. this.newDataSortType = 'DESC';
  1265. this.newDataSortCode = sorter.columnKey;
  1266. }
  1267. else if (sorter.order === 'ascend') {
  1268. this.newDataSortType = 'ASC';
  1269. this.newDataSortCode = sorter.columnKey;
  1270. }
  1271. else {
  1272. this.newDataSortType = 'DESC';
  1273. this.newDataSortCode = 'charge';
  1274. }
  1275. },
  1276. // 素材点击排序功能
  1277. materialChange(pagination, filters, sorter) {
  1278. console.log(sorter, 'v--sorter--sorter');
  1279. if (sorter.order === 'descend') {
  1280. this.materialSortType = 'DESC';
  1281. this.materialSortCode = sorter.columnKey;
  1282. }
  1283. else if (sorter.order === 'ascend') {
  1284. this.materialSortType = 'ASC';
  1285. this.materialSortCode = sorter.columnKey;
  1286. }
  1287. else {
  1288. this.materialSortType = 'DESC';
  1289. this.materialSortCode = 'charge';
  1290. }
  1291. }
  1292. }
  1293. };
  1294. </script>
  1295. <style lang="scss">
  1296. .accountPage .accountBody{
  1297. line-height: 1;
  1298. .ant-input {
  1299. -webkit-box-sizing: border-box;
  1300. box-sizing: border-box;
  1301. margin: 0;
  1302. padding: 0;
  1303. font-variant: tabular-nums;
  1304. list-style: none;
  1305. -webkit-font-feature-settings: 'tnum';
  1306. font-feature-settings: 'tnum';
  1307. position: relative;
  1308. display: inline-block;
  1309. width: 100%;
  1310. height: 32px;
  1311. padding: 4px 0px;
  1312. color: white;
  1313. font-size: 14px;
  1314. line-height: 1.5;
  1315. background-color: transparent;
  1316. background-image: none;
  1317. border:none;
  1318. border-radius: 4px;
  1319. -webkit-transition: all 0.3s;
  1320. transition: all 0.3s;
  1321. }
  1322. .ant-calendar-range-picker-separator {
  1323. display: inline-block;
  1324. min-width: 10px;
  1325. height: 100%;
  1326. color: white;
  1327. white-space: nowrap;
  1328. text-align: center;
  1329. vertical-align: top;
  1330. pointer-events: none;
  1331. }
  1332. .ant-divider, .ant-divider-vertical {
  1333. position: relative;
  1334. top: -0.06em;
  1335. display: inline-block;
  1336. width: 1px;
  1337. height: 2.9em;
  1338. margin: 0 8px;
  1339. vertical-align: middle;
  1340. }
  1341. }
  1342. .accountPage .materialBody{
  1343. .ant-divider, .ant-divider-vertical {
  1344. position: relative;
  1345. top: 25px;
  1346. display: inline-block;
  1347. width: 1px;
  1348. height: 366px;
  1349. margin: 0 8px;
  1350. vertical-align: middle;
  1351. }
  1352. }
  1353. .accountPage .dataMode{
  1354. .ant-divider, .ant-divider-vertical {
  1355. position: relative;
  1356. top: 10px;
  1357. display: inline-block;
  1358. width: 1px;
  1359. height: 350px;
  1360. margin: 0 8px;
  1361. vertical-align: middle;
  1362. }
  1363. }
  1364. .ant-tooltip {
  1365. max-width: 400px;
  1366. }
  1367. </style>
  1368. <style lang="scss" scoped>
  1369. .accountPage {
  1370. .common-input-long {
  1371. width: 140px !important;
  1372. }
  1373. .pagin-table-class {
  1374. display: flex;
  1375. justify-content: flex-end;
  1376. margin-top: 20px;
  1377. margin-bottom: 20px;
  1378. }
  1379. p {
  1380. margin-bottom: 0px;
  1381. }
  1382. .echart {
  1383. margin-top: 30px;
  1384. }
  1385. .bodyBox {
  1386. width: 100%;
  1387. margin-bottom: 26px;
  1388. }
  1389. .accountBody {
  1390. height: 300px;
  1391. display: flex;
  1392. justify-content: space-between;
  1393. }
  1394. .accountBodyLeft {
  1395. width: 75%;
  1396. margin-right: 26px;
  1397. padding: 20px;
  1398. display: flex;
  1399. justify-content: space-between;
  1400. }
  1401. .accountBodyRight {
  1402. width: 25%;
  1403. padding: 25px;
  1404. }
  1405. .accountBodyLeft,.accountBodyRight {
  1406. border-radius: 10px;
  1407. background: white;
  1408. }
  1409. .accountBodyLeftCost {
  1410. background: #2461F1;
  1411. border-radius: 10px;
  1412. height: 260px;
  1413. width: 40%;
  1414. flex-shrink: 0;
  1415. color: white;
  1416. display: flex;
  1417. justify-content: space-between;
  1418. padding: 20px;
  1419. }
  1420. .accountBodyLeftCostLeft {
  1421. width: 55%;
  1422. .title{
  1423. font-size: 26px;
  1424. font-weight: 700;
  1425. padding: 0;
  1426. margin-bottom: 10px;
  1427. }
  1428. .costInfo {
  1429. margin: 20px 0 0 0;
  1430. width: 70%;
  1431. display: flex;
  1432. justify-content: space-between;
  1433. }
  1434. .yesterdayInfo {
  1435. width:50%;
  1436. flex-shrink: 0;
  1437. }
  1438. .costNum{
  1439. width: 90%;
  1440. font-size: 26px;
  1441. font-weight: 700;
  1442. color:#2461F1 ;
  1443. background: white;
  1444. text-align: center;
  1445. border-radius: 10px;
  1446. margin: 20px 0;
  1447. padding: 10px 0px;
  1448. }
  1449. @media screen and (max-width:1980px) and (min-width:1560px) {
  1450. .costNum {
  1451. font-size: 22px;
  1452. }
  1453. }
  1454. @media screen and (max-width:1560px) and (min-width:1280px) {
  1455. .costNum {
  1456. font-size: 20px;
  1457. }
  1458. }
  1459. @media screen and (max-width:1280px) {
  1460. .costNum {
  1461. font-size: 18px;
  1462. }
  1463. }
  1464. }
  1465. .accountBodyLeftCostRight {
  1466. width: 45%;
  1467. }
  1468. .accountBodyLeftOther {
  1469. width: 60%;
  1470. margin-left: 15px;
  1471. padding-left: 15px;
  1472. border-left: 1px solid #eee;
  1473. position: relative;
  1474. .top {
  1475. display: flex;
  1476. justify-content: space-between;
  1477. padding-top: 8px;
  1478. }
  1479. .item {
  1480. width: 25%;
  1481. }
  1482. .todyCost {
  1483. font-size: 1.2rem;
  1484. font-weight: 700;
  1485. color:#303133;
  1486. margin-bottom: 10px;
  1487. width: 100%;
  1488. }
  1489. .sign {
  1490. font-size: 18px;
  1491. .rise {
  1492. color: #F2637B;
  1493. width: 16px;
  1494. height: 16px;
  1495. text-align: center;
  1496. transform: rotate(-30deg);
  1497. }
  1498. .fall {
  1499. color: green;
  1500. width: 16px;
  1501. height: 16px;
  1502. text-align: center;
  1503. transform: rotate(30deg);
  1504. }
  1505. .up {
  1506. width: 16px;
  1507. height: 16px;
  1508. text-align: center;
  1509. background-color: #F2637B;
  1510. border-radius: 5px;
  1511. color: white;
  1512. }
  1513. }
  1514. .yesterdayCost {
  1515. font-size: 0.89rem;
  1516. font-weight: 500;
  1517. color:#303133;
  1518. margin-bottom: 8px;
  1519. }
  1520. .IndexName {
  1521. font-size: 15px;
  1522. font-weight: 600;
  1523. color:#303133;
  1524. display: inline-block;
  1525. cursor: pointer;
  1526. }
  1527. .IndexNameActive {
  1528. color:#2461F1;
  1529. }
  1530. .IndexNameActive::after {
  1531. content: '';
  1532. display: block;
  1533. width: 15px;
  1534. height: 3px;
  1535. background: #2461F1;
  1536. position: relative;
  1537. top: 3px;
  1538. left: 50%;
  1539. margin-left: -8px;
  1540. }
  1541. .showIndex {
  1542. position: absolute;
  1543. top: -5px;
  1544. right: 0px;
  1545. font-size: 12px;
  1546. cursor: pointer;
  1547. color: #909399;
  1548. }
  1549. .showIndex:hover {
  1550. color:#2461F1;
  1551. }
  1552. }
  1553. // 第二块
  1554. .planBody{
  1555. display: flex;
  1556. justify-content: space-between;
  1557. height: auto;
  1558. }
  1559. .planBodyLeft {
  1560. width: 40%;
  1561. height: 100%;
  1562. background: white;
  1563. flex-shrink: 0;
  1564. border-radius: 10px;
  1565. }
  1566. .title {
  1567. padding: 20px 20px;
  1568. }
  1569. .titleContext {
  1570. font-size: 14px;
  1571. font-weight: 600;
  1572. color:#303133;
  1573. margin-bottom: 0;
  1574. }
  1575. .titleContext::before {
  1576. content:'';
  1577. width: 5px;
  1578. height: 5px;
  1579. border-radius: 2.5px;
  1580. background-color:#2461F1;
  1581. display: inline-block;
  1582. position: relative;
  1583. top: -2px;
  1584. }
  1585. .titleTip {
  1586. font-size: 14px;
  1587. color: #909399;
  1588. font-weight: 400;
  1589. margin-left: 20px;
  1590. }
  1591. .planBodyRight {
  1592. width: 100%;
  1593. background: white;
  1594. height: 100%;
  1595. border-radius: 10px;
  1596. }
  1597. // 素材块
  1598. .materialBody{
  1599. border-radius: 10px;
  1600. background: white;
  1601. position: relative;
  1602. display: flex;
  1603. padding:20px 20px;
  1604. .dataPicker {
  1605. position: absolute;
  1606. top: 25px;
  1607. right: 20px;
  1608. }
  1609. .source-material {
  1610. position: absolute;
  1611. top: 30px;
  1612. left: 20px;
  1613. }
  1614. }
  1615. .materialBodyRight {
  1616. width: 100%;
  1617. height: 100%;
  1618. padding-top: 60px;
  1619. .material-table-class {
  1620. height: 100%;
  1621. overflow-y: auto;
  1622. }
  1623. }
  1624. .accountBodyRighTitle {
  1625. .acount-body-content {
  1626. display: flex;
  1627. align-items: center;
  1628. .acount-body-title {
  1629. width: 340px;
  1630. font-size: 26px;
  1631. font-weight: 700;
  1632. cursor: pointer;
  1633. white-space: nowrap;
  1634. overflow: hidden;
  1635. text-overflow: ellipsis;
  1636. }
  1637. }
  1638. }
  1639. .accountBodyRighTitleID {
  1640. margin-top: 15px;
  1641. font-size: 14px;
  1642. color: #c0c4cc;
  1643. }
  1644. .accountBodyRightInfoItem {
  1645. background: rgb(238,241,255);
  1646. padding:15px 15px;
  1647. margin: 20px 0 0;
  1648. border-radius: 5px;
  1649. font-size: 16px;
  1650. white-space: nowrap;
  1651. overflow: hidden;
  1652. text-overflow: ellipsis;
  1653. .name {
  1654. font-size: 16px;
  1655. font-weight: 600;
  1656. }
  1657. }
  1658. .createNum {
  1659. cursor: pointer;
  1660. position: relative;
  1661. }
  1662. .targetBody {
  1663. border-radius: 10px;
  1664. background: white;
  1665. .dataMode{
  1666. display: flex;
  1667. justify-content: space-between;
  1668. }
  1669. .topOpt {
  1670. padding: 20px;
  1671. display: flex;
  1672. justify-content: flex-end;
  1673. }
  1674. }
  1675. .adPositionMode,
  1676. .ageMode,
  1677. .genderMode {
  1678. width: 32%;
  1679. height: 100%;
  1680. }
  1681. }
  1682. </style>