headline-view.vue 65 KB

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