index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. <template>
  2. <div style="font-size: 0; background-color: #fff">
  3. <img
  4. :src="
  5. 'https://cxzx.smcic.net/zhoubao/assets/tv' + $route.query.date + '.jpg'
  6. "
  7. width="100%"
  8. class="content"
  9. style="margin-bottom: 1em; display: block"
  10. alt=""
  11. />
  12. <p
  13. class="content"
  14. :style="
  15. 'font-weight: 700; padding: 0.5em 3px;font-size: ' + fontSize + 'px;'
  16. "
  17. v-html="title1.desc"
  18. ></p>
  19. <div :style="'height: ' + fontSize + 'px;'"></div>
  20. <div class="TraditionalAndXian" :style="'font-size:' + fontSize + 'px'">
  21. <div class="content">
  22. <!-- <div class="titleTop">
  23. <p v-text="title.company"></p>
  24. <p v-text="title.name"></p>
  25. <p v-text="title.title"></p>
  26. </div> -->
  27. <div class="itemHead">
  28. <van-row>
  29. <van-col span="4" class="td"> 省排名 </van-col>
  30. <van-col span="6" class="td"> 频道 </van-col>
  31. <van-col span="5">
  32. <van-popover
  33. v-model="fene"
  34. trigger="click"
  35. @select="fene = !fene"
  36. >
  37. <div style="padding: 5px">
  38. 市场份额=本频道收视率/所有频道收视率
  39. </div>
  40. <template #reference>
  41. <p class="td">市场份额</p>
  42. </template>
  43. </van-popover>
  44. </van-col>
  45. <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
  46. <van-col span="7">
  47. <van-popover
  48. v-model="shichang"
  49. trigger="click"
  50. @select="shichang = !shichang"
  51. >
  52. <div style="padding: 5px">
  53. 市场份额=本频道收视率/所有频道收视率
  54. </div>
  55. <template #reference>
  56. <p class="td">周人均时长(分)</p>
  57. </template>
  58. </van-popover>
  59. </van-col>
  60. <van-col span="2" class="td">
  61. <img
  62. src="../../../assets/image/shou.gif"
  63. width="26px"
  64. alt=""
  65. style="vertical-align: middle; transform: rotate(45deg)"
  66. />
  67. </van-col>
  68. </van-row>
  69. </div>
  70. <div v-for="(v, o) in platfromData1 || []" :key="v.name">
  71. <div
  72. style="border-bottom: 1px dashed #eee; margin: 11px 0 0 0"
  73. v-if="o === 50"
  74. ></div>
  75. <van-row
  76. :style="v.shanxi_channel ? 'background: #F5DEB3' : ''"
  77. class="item"
  78. @click="() => showPopup(o)"
  79. >
  80. <van-col
  81. span="4"
  82. :class="{ td: true }"
  83. :style="{ color: color[o] || '#000', fontWeight: 600 }"
  84. >
  85. {{ v.rank }}
  86. </van-col>
  87. <van-col
  88. :style="v.shanxi_channel ? 'font-weight: 600' : ''"
  89. span="6"
  90. :class="{ td: true }"
  91. >
  92. {{ v.channelname }}
  93. </van-col>
  94. <van-col span="5" :class="{ td: true }">
  95. {{ formatNum(v.occrate, 2) }}%
  96. <van-icon
  97. v-if="v.occrate_change !== '相等'"
  98. name="down"
  99. :color="v.occrate_change === '上升' ? '#f00' : '#04c15f'"
  100. :class="{ rise: v.occrate_change === '上升' }"
  101. />
  102. </van-col>
  103. <van-col span="7" :class="{ td: true }">
  104. {{ timeFormat(v.user_duration) }}
  105. <van-icon
  106. v-if="v.user_duration_change !== '相等'"
  107. name="down"
  108. :color="v.user_duration_change === '上升' ? '#f00' : '#04c15f'"
  109. :class="{ rise: v.user_duration_change === '上升' }"
  110. />
  111. </van-col>
  112. <van-col span="2" class="td" style="cursor: pointer">
  113. <van-icon name="arrow" />
  114. </van-col>
  115. </van-row>
  116. </div>
  117. <van-popup
  118. :style="{ height: '100%', width: '100%' }"
  119. position="right"
  120. v-model="show1"
  121. >
  122. <div class="main">
  123. <van-cell
  124. title-style="flex: 3"
  125. :title="ratios1.schedulename"
  126. :label="ratios1.channelname"
  127. >
  128. <div
  129. @click="show = false"
  130. :style="
  131. 'color: #5470c6;cursor:pointer;font-size:' + fontSize + 'px'
  132. "
  133. >
  134. <van-icon name="revoke" />
  135. {{ ratios1.channelname }}
  136. </div>
  137. </van-cell>
  138. <van-cell-group title="视听收视新指标">
  139. <van-row>
  140. <van-col span="7" class="td" style="text-align: right">
  141. 收视总时长:
  142. </van-col>
  143. <van-col span="5" class="td">
  144. {{ ratios1.timecount }}小时
  145. </van-col>
  146. <van-col span="7" class="td" style="text-align: right">
  147. 收视总次数:
  148. </van-col>
  149. <van-col span="5" class="td">
  150. {{ ratios1.hitcount }}
  151. </van-col>
  152. <van-col span="7" class="td" style="text-align: right">
  153. 周活跃户数:
  154. </van-col>
  155. <van-col span="5" class="td">
  156. {{ ratios1.usrcount }}
  157. </van-col>
  158. <van-col span="7" class="td" style="text-align: right">
  159. 周接触频次:
  160. </van-col>
  161. <van-col span="5" class="td">
  162. {{ formatType1(ratios1.touchfreq, 1) }}次
  163. </van-col>
  164. </van-row>
  165. </van-cell-group>
  166. <van-cell-group title="传统指标">
  167. <van-row>
  168. <van-col span="5" class="td"> 到达率: </van-col>
  169. <van-col span="5" class="td"
  170. >{{ formatNum(ratios1.reachrate, 2) }}%
  171. </van-col>
  172. <van-col span="7" class="td"> 周人均时长: </van-col>
  173. <van-col span="7" class="td"
  174. >{{ timeFormat(ratios1.user_duration, 0) }}分钟
  175. </van-col>
  176. <van-col span="5" class="td"> 收视率: </van-col>
  177. <van-col span="5" class="td">
  178. {{ formatNum(ratios1.watchrate, 2) }}%
  179. </van-col>
  180. <van-col span="7" class="td"> 市场占有率: </van-col>
  181. <van-col span="7" class="td"
  182. >{{ formatNum(ratios1.occrate, 2) }}%
  183. </van-col>
  184. <van-col span="5" class="td"> 忠诚度: </van-col>
  185. <van-col span="5" class="td"
  186. >{{ formatNum(ratios1.loyalty, 2) }}%
  187. </van-col>
  188. </van-row>
  189. </van-cell-group>
  190. <div ref="pie"></div>
  191. <div ref="day"></div>
  192. </div>
  193. <div class="bottom content">
  194. 本数据由<span style="color: red"
  195. >“陕西广电融媒体集团大数据平台”</span
  196. >提供。
  197. <p>
  198. 技术支持:
  199. <span style="white-space: nowrap">白帆13325452244 </span>
  200. <span style="white-space: nowrap">陈科18629350958。</span>
  201. </p>
  202. </div>
  203. </van-popup>
  204. </div>
  205. </div>
  206. <img
  207. :src="
  208. 'https://cxzx.smcic.net/zhoubao/assets/xatv' +
  209. $route.query.date +
  210. '.jpg'
  211. "
  212. width="100%"
  213. class="content"
  214. style="margin-bottom: 1em; display: block"
  215. alt=""
  216. />
  217. <p
  218. class="content"
  219. :style="
  220. 'font-weight: 700; padding: 0.5em 3px;font-size: ' + fontSize + 'px;'
  221. "
  222. v-html="title.desc"
  223. ></p>
  224. <div class="TraditionalAndXian" :style="'font-size:' + fontSize + 'px'">
  225. <div class="content">
  226. <!-- <div class="titleTop">
  227. <p v-text="title.company"></p>
  228. <p v-text="title.name"></p>
  229. <p v-text="title.title"></p>
  230. </div> -->
  231. <div class="itemHead">
  232. <van-row>
  233. <van-col span="4" class="td"> 排名 </van-col>
  234. <van-col span="6" class="td"> 频道 </van-col>
  235. <van-col span="5">
  236. <p class="td">市场份额</p>
  237. </van-col>
  238. <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
  239. <van-col span="7">
  240. <p class="td">周人均时长(分)</p>
  241. </van-col>
  242. <van-col span="2" class="td">
  243. <img
  244. src="../../../assets/image/shou.gif"
  245. width="26px"
  246. alt=""
  247. style="vertical-align: middle; transform: rotate(45deg)"
  248. />
  249. </van-col>
  250. </van-row>
  251. </div>
  252. <div v-for="(v, o) in platfromData || []" :key="v.name">
  253. <div
  254. style="border-bottom: 1px dashed #eee; margin: 11px 0 0 0"
  255. v-if="o === 50"
  256. ></div>
  257. <van-row
  258. :style="v.shanxi_channel ? 'background: #F5DEB3' : ''"
  259. class="item"
  260. @click="() => showPopup(o)"
  261. >
  262. <van-col
  263. span="4"
  264. :class="{ td: true }"
  265. :style="{ color: color[o] || '#000', fontWeight: 600 }"
  266. >
  267. {{ v.rank }}
  268. </van-col>
  269. <van-col
  270. :style="v.shanxi_channel ? 'font-weight: 600' : ''"
  271. span="6"
  272. :class="{ td: true }"
  273. >
  274. {{ v.channelname }}
  275. </van-col>
  276. <van-col span="5" :class="{ td: true }">
  277. {{ formatNum(v.occrate, 2) }}%
  278. <van-icon
  279. v-if="v.occrate_change !== '相等'"
  280. name="down"
  281. :color="v.occrate_change === '上升' ? '#f00' : '#04c15f'"
  282. :class="{ rise: v.occrate_change === '上升' }"
  283. />
  284. </van-col>
  285. <van-col span="7" :class="{ td: true }">
  286. {{ timeFormat(v.user_duration) }}
  287. <van-icon
  288. v-if="v.user_duration_change !== '相等'"
  289. name="down"
  290. :color="v.user_duration_change === '上升' ? '#f00' : '#04c15f'"
  291. :class="{ rise: v.user_duration_change === '上升' }"
  292. />
  293. </van-col>
  294. <van-col span="2" class="td" style="cursor: pointer">
  295. <van-icon name="arrow" />
  296. </van-col>
  297. </van-row>
  298. </div>
  299. <van-popup
  300. :style="{ height: '100%', width: '100%' }"
  301. position="right"
  302. v-model="show"
  303. >
  304. <div class="main">
  305. <van-cell
  306. title-style="flex: 3"
  307. :title="ratios.schedulename"
  308. :label="ratios.channelname"
  309. >
  310. <div
  311. @click="show = false"
  312. :style="
  313. 'color: #5470c6;cursor:pointer;font-size:' + fontSize + 'px'
  314. "
  315. >
  316. <van-icon name="revoke" />
  317. {{ ratios.channelname }}
  318. </div>
  319. </van-cell>
  320. <van-cell-group title="视听收视新指标">
  321. <van-row>
  322. <van-col span="7" class="td" style="text-align: right">
  323. 收视总时长:
  324. </van-col>
  325. <van-col span="5" class="td">
  326. {{ ratios.timecount }}小时
  327. </van-col>
  328. <van-col span="7" class="td" style="text-align: right">
  329. 收视总次数:
  330. </van-col>
  331. <van-col span="5" class="td">
  332. {{ ratios.hitcount }}
  333. </van-col>
  334. <van-col span="7" class="td" style="text-align: right">
  335. 周活跃户数:
  336. </van-col>
  337. <van-col span="5" class="td">
  338. {{ ratios.usrcount }}
  339. </van-col>
  340. <van-col span="7" class="td" style="text-align: right">
  341. 周接触频次:
  342. </van-col>
  343. <van-col span="5" class="td">
  344. {{ formatType1(ratios.touchfreq, 2) }}次
  345. </van-col>
  346. </van-row>
  347. </van-cell-group>
  348. <van-cell-group title="传统指标">
  349. <van-row>
  350. <van-col span="5" class="td"> 到达率: </van-col>
  351. <van-col span="5" class="td"
  352. >{{ formatNum(ratios.reachrate, 2) }}%
  353. </van-col>
  354. <van-col span="7" class="td"> 周人均时长: </van-col>
  355. <van-col span="7" class="td"
  356. >{{ timeFormat(ratios.user_duration, 0) }}分钟
  357. </van-col>
  358. <van-col span="5" class="td"> 收视率: </van-col>
  359. <van-col span="5" class="td">
  360. {{ formatNum(ratios.watchrate, 2) }}%
  361. </van-col>
  362. <van-col span="7" class="td"> 市场占有率: </van-col>
  363. <van-col span="7" class="td"
  364. >{{ formatNum(ratios.occrate, 2) }}%
  365. </van-col>
  366. <van-col span="5" class="td"> 忠诚度: </van-col>
  367. <van-col span="5" class="td"
  368. >{{ formatNum(ratios.loyalty, 2) }}%
  369. </van-col>
  370. </van-row>
  371. </van-cell-group>
  372. <div ref="pie"></div>
  373. <div ref="day"></div>
  374. </div>
  375. <div class="bottom content">
  376. 本数据由<span style="color: red"
  377. >“陕西广电融媒体集团大数据平台”</span
  378. >提供。
  379. <p>数据来源:西安市有线电视机顶盒全样本数据。</p>
  380. <p>
  381. 技术支持:
  382. <span style="white-space: nowrap">白帆13325452244 </span>
  383. <span style="white-space: nowrap">陈科18629350958。</span>
  384. </p>
  385. </div>
  386. </van-popup>
  387. </div>
  388. <div class="bottom content">
  389. 本数据由<span style="color: red">“陕西广电融媒体集团大数据平台”</span
  390. >提供。
  391. <p>数据来源:西安市有线电视机顶盒全样本数据。</p>
  392. <p>
  393. 技术支持:
  394. <span style="white-space: nowrap">白帆13325452244 </span>
  395. <span style="white-space: nowrap">陈科18629350958。</span>
  396. </p>
  397. </div>
  398. </div>
  399. </div>
  400. </template>
  401. <script>
  402. // @ is an alias to /src
  403. import watermark from "watermark-package";
  404. import {
  405. Col as vanCol,
  406. Row as vanRow,
  407. Icon as vanIcon,
  408. Popup as vanPopup,
  409. cellGroup as vanCellGroup,
  410. Cell as vanCell,
  411. Popover as vanPopover,
  412. } from "vant";
  413. import "vant/lib/popover/style/index";
  414. import "vant/lib/cell-group/style/index";
  415. import "vant/lib/cell/style/index";
  416. import "vant/lib/popup/style/index";
  417. import "vant/lib/icon/style/index";
  418. import "vant/lib/col/style/index";
  419. import "vant/lib/row/style/index";
  420. // import {} from "../utils/tool";
  421. import Dayjs from "dayjs";
  422. import { jsonZhouXian, jsonZhou } from "../../../api/index";
  423. import echarts from "../../../utils/echarts";
  424. export default {
  425. name: "TraditionalAndXian",
  426. data() {
  427. return {
  428. shichang: false,
  429. fene: false,
  430. fontSize: 17,
  431. show: false,
  432. show1: false,
  433. charts: undefined,
  434. ratios: {},
  435. ratios1: {},
  436. platfromData: [],
  437. platfromData1: [],
  438. color: ["#ff0036", "#ff9b00", "#ffcc00"],
  439. echarts: undefined,
  440. dayEcharts: undefined,
  441. title: {},
  442. title1: {},
  443. width: document.body.offsetWidth || 0,
  444. };
  445. },
  446. watch: {},
  447. mounted() {
  448. if (
  449. this.$route.query.auto !==
  450. "06fd56cdf5a6cfc3a2139cc8514d05aa0439ee8c1fb4d81145bc9647"
  451. )
  452. return;
  453. this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
  454. if (document.body.offsetWidth > 677) this.fontSize = 22;
  455. watermark.setWaterMark({
  456. w_texts: ["陕西视听大数据"],
  457. w_options: {
  458. w_opacity: "0.1",
  459. },
  460. });
  461. const time = new Date(this.$route.query.date);
  462. let D = new Date(time);
  463. const lasetDay = new Dayjs(D.getTime() - D.getDay() * 86400000);
  464. const firstDay = new Dayjs(lasetDay - 6 * 86400000);
  465. jsonZhouXian({
  466. start: firstDay.format("YYYYMMDD"),
  467. end: lasetDay.format("YYYYMMDD"),
  468. time: Date.now(),
  469. })
  470. .then(res => {
  471. const title = {
  472. company: res.company || "",
  473. name: res.name || "",
  474. title: res.title || "",
  475. desc: res.desc || "",
  476. };
  477. this.title = title;
  478. this.platfromData = res.list || [];
  479. this.$emit("start", {
  480. status: 200,
  481. });
  482. })
  483. .catch(err => {
  484. this.$emit("start", {
  485. status: err,
  486. });
  487. });
  488. jsonZhou({
  489. start: firstDay.format("YYYYMMDD"),
  490. end: lasetDay.format("YYYYMMDD"),
  491. time: Date.now(),
  492. })
  493. .then(res => {
  494. const title = {
  495. company: res.company || "",
  496. name: res.name || "",
  497. title: res.title || "",
  498. desc: res.desc || "",
  499. };
  500. this.title1 = title;
  501. this.platfromData1 = res.list || [];
  502. this.$emit("start", {
  503. status: 200,
  504. });
  505. })
  506. .catch(err => {
  507. this.$emit("start", {
  508. status: err,
  509. });
  510. });
  511. window.onresize = () => {
  512. const doc = document.body;
  513. const width = doc.offsetWidth - 32;
  514. let height = (width / 4) * 3;
  515. this.width = document.body.offsetWidth || 0;
  516. this.dayEcharts &&
  517. this.dayEcharts.resize({
  518. width,
  519. height: width,
  520. });
  521. this.echarts &&
  522. this.echarts.resize({
  523. width,
  524. height,
  525. });
  526. };
  527. },
  528. computed: {},
  529. methods: {
  530. formatType1(num, W) {
  531. let N = this.formatNum(num, W || 0);
  532. if (N >= 100000000) {
  533. N = (N / 100000000).toFixed(W || 0) - 0 + "亿";
  534. } else if (N >= 10000) {
  535. N = (N / 10000).toFixed(W || 0) - 0 + "万";
  536. } else {
  537. N = Number(N).toFixed(W || 0) - 0;
  538. }
  539. return N;
  540. },
  541. formatNum(num, w) {
  542. if (isNaN(num)) return 0;
  543. return Number(num).toFixed(w || 4) - 0;
  544. },
  545. formatType(num, W) {
  546. let N = this.formatNum(num, 2);
  547. let wei = "";
  548. if (N >= 100000000) {
  549. N = (N / 100000000).toFixed(W || 2);
  550. wei = "亿";
  551. } else if (N >= 10000) {
  552. N = (N / 10000).toFixed(W || 2);
  553. wei = "万";
  554. }
  555. N = N.toString().split(".");
  556. return {
  557. N: (N[0] || 0) * 1,
  558. P: N[1] || 0,
  559. wei,
  560. };
  561. },
  562. timeFormat(t, w) {
  563. const Time = t || 0;
  564. let out = Time.toFixed(w || 0) - 0;
  565. return out;
  566. },
  567. showPopup(i) {
  568. this.show = true;
  569. const reaios = JSON.parse(JSON.stringify(this.platfromData[i] || {}));
  570. reaios.hitcount = this.formatType1(reaios.hitcount, 1);
  571. reaios.usrcount = this.formatType1(reaios.usrcount, 1);
  572. reaios.timecount = this.formatType1(reaios.timecount / 60, 0);
  573. this.ratios = reaios;
  574. this.$nextTick(() => {
  575. this.upEcharts();
  576. this.dayEchartsFun();
  577. });
  578. },
  579. dayEchartsFun() {
  580. this.dayEcharts && this.dayEcharts.clear && this.dayEcharts.clear();
  581. if (!this.dayEcharts) {
  582. const doc = document.body;
  583. const width = doc.offsetWidth - 32;
  584. let height = (width / 4) * 3;
  585. if (height > 400) height = 400;
  586. this.dayEcharts = echarts.init(
  587. this.$refs.day,
  588. {},
  589. {
  590. width,
  591. height,
  592. }
  593. );
  594. }
  595. const key = [],
  596. value = [];
  597. this.ratios.detail_list.map(v => {
  598. let val = v.usrcount;
  599. key.push(v.dt);
  600. value.push(val);
  601. });
  602. this.dayEcharts.setOption({
  603. title: {
  604. text: "家庭户收视规模",
  605. subtext: this.ratios.usrcount_compare
  606. ? this.ratios.usrcount_compare + " 单位:户"
  607. : "单位:户",
  608. textStyle: {
  609. fontSize: this.fontSize * 1.05,
  610. },
  611. subtextStyle: {
  612. fontSize: this.fontSize,
  613. },
  614. },
  615. tooltip: {
  616. show: true,
  617. trigger: "axis",
  618. },
  619. xAxis: {
  620. type: "category",
  621. boundaryGap: false,
  622. data: key,
  623. axisLabel: {
  624. interval: 0,
  625. rotate: 60,
  626. },
  627. },
  628. grid: {
  629. right: "5px",
  630. left: "40px",
  631. },
  632. yAxis: {
  633. type: "value",
  634. axisLabel: {
  635. formatter: e => {
  636. const T = this.formatType(e);
  637. let out = T.N;
  638. if (T.P > 0) out += "." + (T.P - 0);
  639. out += T.wei;
  640. return out;
  641. },
  642. },
  643. },
  644. series: [
  645. {
  646. type: "line",
  647. data: value,
  648. },
  649. ],
  650. });
  651. },
  652. upEcharts() {
  653. this.echarts && this.echarts.clear && this.echarts.clear();
  654. if (!this.echarts) {
  655. const doc = document.body;
  656. const width = doc.offsetWidth - 32;
  657. let height = width;
  658. if (height > 667) height = 667;
  659. this.echarts = echarts.init(
  660. this.$refs.pie,
  661. {},
  662. {
  663. width,
  664. height,
  665. }
  666. );
  667. }
  668. this.echarts.setOption({
  669. title: {
  670. text: "观看时长用户分布",
  671. subtext: "单位:%",
  672. textStyle: {
  673. fontSize: this.fontSize * 1.05,
  674. },
  675. },
  676. color: [
  677. "#87cefa",
  678. "#00bfff",
  679. "#1e90ff",
  680. "#0000ff",
  681. "#00008b",
  682. "#191970",
  683. "#000080",
  684. "#0000cd",
  685. "#4169e1",
  686. "#6495ed",
  687. ],
  688. series: [
  689. {
  690. name: "Nightingale Chart",
  691. type: "pie",
  692. radius: [30, 70],
  693. center: ["50%", "50%"],
  694. emphasis: {
  695. //使用emphasis
  696. disable: false,
  697. scale: false, //不缩放
  698. scaleSize: 0, //为了防止失效直接设置未0
  699. },
  700. data: this.ratios.duration_list.map(v => {
  701. let bfb = (v.value * 100).toFixed(0) - 0;
  702. return {
  703. value: bfb,
  704. name: v.range + "\n 占比" + bfb + "%",
  705. };
  706. }),
  707. },
  708. ],
  709. });
  710. },
  711. },
  712. beforeUnmount() {},
  713. components: {
  714. vanCol,
  715. vanRow,
  716. vanIcon,
  717. vanPopup,
  718. vanCell,
  719. vanCellGroup,
  720. vanPopover,
  721. },
  722. };
  723. </script>
  724. <style scoped>
  725. .TraditionalAndXian {
  726. background-color: #fff;
  727. padding: 5px;
  728. height: 100%;
  729. overflow-y: auto;
  730. box-sizing: border-box;
  731. }
  732. .bottom {
  733. border: 4px solid #0983a8;
  734. background-color: #cdcdcd;
  735. margin-top: 1em;
  736. padding: 10px;
  737. font-size: 0.85rem;
  738. padding-left: 5px;
  739. font-weight: 600;
  740. overflow: hidden;
  741. }
  742. .td {
  743. text-align: center;
  744. line-height: 2.5em;
  745. overflow: hidden;
  746. white-space: nowrap;
  747. text-overflow: ellipsis;
  748. }
  749. .td2 {
  750. line-height: 1.5em;
  751. white-space: initial;
  752. }
  753. .item {
  754. overflow: hidden;
  755. border-radius: 3px;
  756. margin-top: 11px;
  757. background-color: #f5f6f8;
  758. }
  759. .itemHead {
  760. margin-top: 0;
  761. background-color: #f5f6f8;
  762. }
  763. .main {
  764. padding: 0.5em;
  765. }
  766. .content {
  767. margin: 0 auto;
  768. max-width: 667px;
  769. }
  770. .rise {
  771. /* 上升 */
  772. transform: rotate(180deg);
  773. }
  774. .titleTop {
  775. padding: 1em 0;
  776. font-weight: 600;
  777. background-image: linear-gradient(to right, #014392, #008fc4, #00428c);
  778. color: #fff;
  779. text-align: center;
  780. }
  781. </style>
  782. <style>
  783. .van-cell-group__title {
  784. font-size: 1.1rem;
  785. padding-left: 8px;
  786. color: #000;
  787. font-weight: 600;
  788. }
  789. </style>