Analysis.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <template>
  2. <div class="analysis">
  3. <!-- 工作看板 -->
  4. <board :title="title[0]">
  5. <div>
  6. <work-infos :dataList="workInfos" @workInfoClick="handleWorkInfoClick">
  7. </work-infos>
  8. <div class="table-content">
  9. <table-content
  10. :tableItems="tableItems"
  11. :height="height"
  12. :shows="tableShows"
  13. :listData="tableData"
  14. >
  15. <template v-slot:handleState="slotProps">
  16. {{ slotProps.row.handleState ? "已处理" : "未处理" }}
  17. </template>
  18. </table-content>
  19. </div>
  20. </div>
  21. </board>
  22. <!-- 存栏情况 -->
  23. <board :title="title[1]">
  24. <div>
  25. <div>
  26. <!-- 存栏结构 -->
  27. <chart-inventory-pie :data="inventoryPieData"></chart-inventory-pie>
  28. <!-- 存栏变动 -->
  29. <chart-inventory-lines
  30. :data="inventoryLinesData"
  31. ></chart-inventory-lines>
  32. </div>
  33. <div>
  34. <!-- 存栏计数 -->
  35. <inventory-items :data="inventoryItemsData"></inventory-items>
  36. </div>
  37. </div>
  38. </board>
  39. <!-- 生产情况 -->
  40. <board :title="title[2]">
  41. <!-- 环形图 -->
  42. <production-donuts :data="productionPercents"></production-donuts>
  43. <!-- 8个格子 -->
  44. <production-items :data="productionItems"></production-items>
  45. </board>
  46. <!-- 经营分析 -->
  47. <board :title="title[3]">
  48. <!-- 成本分析 -->
  49. <div class="cost">
  50. <div class="cost-content">
  51. <div class="cost-left">
  52. <cost-pie :data="costPieData" :title="costTitles[costIndex]">
  53. </cost-pie>
  54. </div>
  55. <div class="cost-right">
  56. <cost-histogram
  57. :data="costHisData"
  58. :xAxisData="costTitles"
  59. @changeCostIndex="changeCostIndex"
  60. >
  61. </cost-histogram>
  62. </div>
  63. </div>
  64. <h3 class="label">成本分析</h3>
  65. </div>
  66. <!-- 重要指标 -->
  67. <div class="important">
  68. <div class="condition">
  69. <el-select
  70. size="small"
  71. v-model="importantValue"
  72. style="margin-right: 20px"
  73. @change="changeImportantValue"
  74. >
  75. <el-option
  76. v-for="item in importantOptions"
  77. :key="item.type"
  78. :label="item.label"
  79. :value="item.type"
  80. >
  81. </el-option>
  82. </el-select>
  83. <el-date-picker
  84. v-model="importantDates"
  85. size="small"
  86. type="daterange"
  87. range-separator="至"
  88. start-placeholder="开始日期"
  89. end-placeholder="结束日期"
  90. value-format="yyyy-MM-dd"
  91. @change="changeImportantDates"
  92. >
  93. </el-date-picker>
  94. </div>
  95. <div class="important-chart">
  96. <important-line
  97. :listData="importantData"
  98. v-bind="importantTitle"
  99. ></important-line>
  100. </div>
  101. </div>
  102. <!-- 销售情况 -->
  103. <div class="sales">
  104. <div class="sales-condition">
  105. <el-date-picker
  106. v-model="getSalesDates"
  107. type="datetimerange"
  108. :picker-options="pickerOptions"
  109. range-separator="至"
  110. start-placeholder="开始日期"
  111. end-placeholder="结束日期"
  112. align="right"
  113. size="small"
  114. >
  115. </el-date-picker>
  116. </div>
  117. <div class="sales-content">
  118. <div class="sales-left">
  119. <div class="up">
  120. <label>本周销售额</label>
  121. <span>{{ weekSales }}元</span>
  122. <div class="sales-change">
  123. <div>
  124. <div
  125. class="triangle-change"
  126. :class="
  127. weekSalesChange > 0 ? 'triangle-up' : 'triangle-down'
  128. "
  129. ></div>
  130. <span :class="weekSalesChange > 0 ? 'color-up' : 'color-down'"
  131. >{{ weekSalesChange }}%</span
  132. >
  133. &nbsp;&nbsp;&nbsp;同比上周
  134. </div>
  135. </div>
  136. </div>
  137. <div class="down">
  138. <label>本周销售量</label>
  139. <span>{{ weekSalesVolume }}元</span>
  140. <div class="sales-change">
  141. <div>
  142. <div
  143. class="triangle-change"
  144. :class="
  145. weekSalesVolumeChange > 0
  146. ? 'triangle-up'
  147. : 'triangle-down'
  148. "
  149. ></div>
  150. <span
  151. :class="
  152. weekSalesVolumeChange > 0 ? 'color-up' : 'color-down'
  153. "
  154. >
  155. {{ weekSalesVolumeChange }}%
  156. </span>
  157. &nbsp;&nbsp;&nbsp;同比上周
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <div class="sales-right">
  163. <sales-chart :data="salesChartData"></sales-chart>
  164. </div>
  165. </div>
  166. </div>
  167. </board>
  168. <!-- 应收排名 -->
  169. <!-- <board :title="title[4]">
  170. <table-content
  171. :tableItems="yingshouTableItems"
  172. :height="height"
  173. :shows="yingshouTableShows"
  174. :listData="yingshouTableData"
  175. >
  176. </table-content>
  177. </board> -->
  178. <!-- 应付排名 -->
  179. <board :title="title[5]">
  180. <table-content
  181. :tableItems="yingshouTableItems"
  182. :height="height"
  183. :shows="yingshouTableShows"
  184. :listData="yingfuTableData"
  185. >
  186. </table-content>
  187. </board>
  188. <!-- 安全库存报警 -->
  189. <board :title="title[6]">
  190. <table-content
  191. :tableItems="safetyTableItems"
  192. :height="height"
  193. :shows="safetyTableShows"
  194. :listData="safetyTableData"
  195. >
  196. </table-content>
  197. <table-footer
  198. :totals="total"
  199. :size="size"
  200. @sizeChange="sizeChange"
  201. @pageChange="pageChange"
  202. >
  203. </table-footer>
  204. </board>
  205. </div>
  206. </template>
  207. <script>
  208. import Board from "components/board/index.vue";
  209. import WorkInfos from "./analysis/WorkInfos.vue";
  210. import TableContent from "components/newTable/TableContent.vue";
  211. import ChartInventoryPie from "./analysis/ChartInventoryPie.vue";
  212. import ChartInventoryLines from "./analysis/ChartInventoryLines.vue";
  213. import InventoryItems from "./analysis/InventoryItems.vue";
  214. import ProductionDonuts from "./analysis/ProductionDonuts.vue";
  215. import ProductionItems from "./analysis/ProductionItems.vue";
  216. import CostPie from "./analysis/CostPie.vue";
  217. import CostHistogram from "./analysis/CostHistogram.vue";
  218. import ImportantLine from "./analysis/ImportantLine.vue";
  219. import SalesChart from "./analysis/SalesChart.vue";
  220. import TableFooter from "../../components/TableFooter";
  221. import { tableItems, tableShows } from "./analysis/table.config";
  222. import {
  223. yingshouTableItems,
  224. yingshouTableShows,
  225. } from "./analysis/yingshouTable.config";
  226. import {
  227. safetyTableItems,
  228. safetyTableShows,
  229. } from "./analysis/safetyTable.config";
  230. // import { formItems } from './analysis/salesXForm.config'
  231. import {
  232. getInventoryLines,
  233. getInventoryAndProduct,
  234. getSalesChange,
  235. getSalesChart,
  236. // getCosts,
  237. // getYingShou,
  238. getYingFu,
  239. } from "utils/api";
  240. import {
  241. getWorkTotal,
  242. getWorkInfos,
  243. getSafeInventory,
  244. getProductionCondition,
  245. getImportantData,
  246. getCostData,
  247. } from "utils/chenApi";
  248. export default {
  249. name: "Analysis",
  250. components: {
  251. Board,
  252. WorkInfos,
  253. TableContent,
  254. ChartInventoryPie,
  255. ChartInventoryLines,
  256. InventoryItems,
  257. ProductionDonuts,
  258. ProductionItems,
  259. CostPie,
  260. CostHistogram,
  261. ImportantLine,
  262. // XForm,
  263. SalesChart,
  264. TableFooter,
  265. },
  266. data() {
  267. return {
  268. title: [
  269. "工作看板",
  270. "存栏情况",
  271. "生产情况",
  272. "经营分析",
  273. "应收排名",
  274. "应付排名",
  275. "安全库存报警",
  276. ],
  277. workInfos: [
  278. {
  279. label: "预警信息",
  280. number: 10,
  281. },
  282. {
  283. label: "断奶数量",
  284. number: 1150,
  285. },
  286. {
  287. label: "配种数量",
  288. number: 1540,
  289. },
  290. {
  291. label: "转舍计划",
  292. number: 108,
  293. },
  294. {
  295. label: "分娩数量",
  296. number: 180,
  297. },
  298. {
  299. label: "日常计划",
  300. number: 10,
  301. },
  302. {
  303. label: "天才计划",
  304. number: 10,
  305. },
  306. {
  307. label: "保健计划",
  308. number: 10,
  309. },
  310. ],
  311. tableItems: [],
  312. tableShows: {},
  313. height: 300,
  314. tableData: [],
  315. // 存栏情况
  316. inventoryLinesData: {}, // 折线图数据
  317. inventoryPieData: [], // 环形图数据
  318. inventoryItemsData: [], // 下面块图的数据
  319. // 生产情况
  320. productionPercents: [], // 百分比
  321. productionItems: [], // 下面块图的数据
  322. // 经营分析
  323. costTitles: ["总成本", "基础猪群", "保育猪群", "育肥猪群", "后备猪群"], // 成本分析 - 被选中的名字
  324. costIndex: 0, // 成本分析 - 名字数组的 index
  325. costPieData: {}, // 经营分析 - 成本分析环形图
  326. costHisData: [], // 经营分析 - 柱状图
  327. // 重要指标
  328. importantOptions: [
  329. {
  330. type: 1,
  331. label: "配种指标",
  332. },
  333. {
  334. type: 2,
  335. label: "分娩指标",
  336. },
  337. {
  338. type: 3,
  339. label: "断奶指标",
  340. },
  341. {
  342. type: 4,
  343. label: "成活率指标",
  344. },
  345. ],
  346. importantValue: 1,
  347. importantDates: [],
  348. importantData: [], // 重要指标折线图数据
  349. importantTitle: {}, // 重要指标的名称
  350. // 销售额
  351. // salesFormItems: [],
  352. salesDay: 2, //默认选择本周
  353. weekSales: 1545252,
  354. weekSalesChange: 10,
  355. weekSalesVolume: 1000,
  356. weekSalesVolumeChange: -10,
  357. getSalesDates: [], // 销售图的时间选择
  358. pickerOptions: {
  359. // 快捷选项
  360. shortcuts: [
  361. {
  362. text: "最近一周",
  363. onClick(picker) {
  364. const end = new Date();
  365. const start = new Date();
  366. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  367. picker.$emit("pick", [start, end]);
  368. },
  369. },
  370. {
  371. text: "最近一个月",
  372. onClick(picker) {
  373. const end = new Date();
  374. const start = new Date();
  375. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  376. picker.$emit("pick", [start, end]);
  377. },
  378. },
  379. {
  380. text: "最近三个月",
  381. onClick(picker) {
  382. const end = new Date();
  383. const start = new Date();
  384. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  385. picker.$emit("pick", [start, end]);
  386. },
  387. },
  388. ],
  389. },
  390. salesChartData: {}, // 销售图的数据
  391. // 应收排名
  392. yingshouTableItems: [],
  393. yingshouTableShows: {},
  394. yingshouTableData: [],
  395. // 应付排名
  396. yingfuTableData: [],
  397. // 安全库存报警
  398. safetyTableItems: [],
  399. safetyTableShows: {},
  400. safetyTableData: [],
  401. total: 0,
  402. size: 20,
  403. pageNum: 1,
  404. };
  405. },
  406. mounted() {
  407. // this.salesFormItems = formItems
  408. this.tableItems = tableItems;
  409. this.tableShows = tableShows;
  410. this.yingshouTableItems = yingshouTableItems;
  411. this.yingshouTableShows = yingshouTableShows;
  412. this.safetyTableItems = safetyTableItems;
  413. this.safetyTableShows = safetyTableShows;
  414. /** 获取网络请求数据 */
  415. this.initInventoryLines();
  416. this.initInventoryAndProduct();
  417. this.initSalesChange();
  418. this.initSalesChart();
  419. // this.initYingShou();
  420. this.initYingFu();
  421. this.initWorkBoard(); // 工作看板
  422. this.initSafeInventory(); // 安全库存报警
  423. this.initProductionCondition(); // 生产情况
  424. this.initImportantData(); // 重要指标
  425. this.initCostData(); // 成本分析
  426. },
  427. methods: {
  428. handleWorkInfoClick(item) {
  429. console.log(item);
  430. },
  431. // 修改size
  432. sizeChange(val) {
  433. this.size = val;
  434. this.init();
  435. },
  436. // 修改页数
  437. pageChange(val) {
  438. this.pageNum = val;
  439. this.init();
  440. },
  441. init() {
  442. let params = {
  443. pageNum: this.pageNum,
  444. pageSize: this.size,
  445. searchStr: this.keyword,
  446. };
  447. console.log(params);
  448. // 获取后端数据
  449. },
  450. // 销售额选中日期
  451. salesSetDay(data) {
  452. this.salesDay = data;
  453. console.log(this.salesDay);
  454. },
  455. // 销售额选中日周月
  456. salesOnClickType(data) {
  457. console.log(data);
  458. },
  459. // 工作看板
  460. initWorkBoard() {
  461. getWorkTotal({}).then(async (res) => {
  462. this.workInfos = res.data;
  463. const result = await getWorkInfos({});
  464. this.tableData = result.data;
  465. });
  466. },
  467. // 存栏情况 - 存栏变动折线图数据请求
  468. initInventoryLines() {
  469. getInventoryLines({}).then((res) => {
  470. if (res.code === 10000) {
  471. this.inventoryLinesData = res.data;
  472. } else {
  473. this.inventoryLinesData = {
  474. boarStock: [],
  475. fatpigStock: [],
  476. griceStock: [],
  477. month: [],
  478. pigletStock: [],
  479. sowStock: [],
  480. };
  481. }
  482. });
  483. },
  484. // 存栏情况 + 生产情况
  485. initInventoryAndProduct() {
  486. getInventoryAndProduct({}).then((res) => {
  487. if (res.code === 10000) {
  488. // this.inventoryLinesData = res.data
  489. console.log(res.data);
  490. // this.inventoryPieData = res.data.slice(0, 6)
  491. this.inventoryPieData = [
  492. res.data["sow_stock"],
  493. res.data["boar_stock"],
  494. res.data["grice_stock"],
  495. res.data["piglet_stock"],
  496. res.data["fatpig_stock"],
  497. ];
  498. this.inventoryItemsData = [
  499. res.data["sow_stock"].stockQuantity,
  500. res.data["sow_stock_1"].stockQuantity,
  501. res.data["sow_stock_2"].stockQuantity,
  502. res.data["sow_stock_3"].stockQuantity,
  503. res.data["boar_stock"].stockQuantity,
  504. res.data["business_stock"].stockQuantity,
  505. ];
  506. // this.productionPercents = [
  507. // res.data[12].rate * 100,
  508. // res.data[13].rate * 100,
  509. // res.data[14].rate * 100,
  510. // res.data[15].rate * 100,
  511. // res.data[16].rate * 100,
  512. // ];
  513. // this.productionPercents = [res.data[12].rate*100, res.data[13].rate*100, res.data[14].rate*100, res.data[15].rate*100, res.data[16].rate*100]
  514. // this.productionItems = [res.data[17].stockQuantity, res.data[18].stockQuantity, res.data[19].stockQuantity, res.data[20].stockQuantity, res.data[21].stockQuantity, res.data[22].stockQuantity, res.data[23].stockQuantity, res.data[24].stockQuantity]
  515. } else {
  516. // this.inventoryLinesData = {
  517. // boarStock: [],
  518. // fatpigStock: [],
  519. // griceStock: [],
  520. // month: [],
  521. // pigletStock: [],
  522. // sowStock: []
  523. // }
  524. }
  525. });
  526. },
  527. // 经营分析 - 销售改变
  528. initSalesChange() {
  529. getSalesChange({}).then((res) => {
  530. if (res.code === 10000) {
  531. this.weekSales = res.data.quantityAll;
  532. this.weekSalesChange = res.data.quantityType
  533. ? res.data.quantityPercentage
  534. : -res.data.quantityPercentage;
  535. this.weekSalesVolume = res.data.saleAll;
  536. this.weekSalesVolumeChange = res.data.saleType
  537. ? res.data.salePercentage
  538. : -res.data.salePercentage;
  539. } else {
  540. this.weekSales = 0;
  541. this.weekSalesChange = 0;
  542. this.weekSalesVolume = 0;
  543. this.weekSalesVolumeChange = 0;
  544. }
  545. });
  546. },
  547. // 经营分析 - 销售情况图
  548. initSalesChart() {
  549. const params = {
  550. beginDate: this.getSalesDates[0] || "",
  551. endDate: this.getSalesDates[1] || "",
  552. };
  553. console.log("我要放参数了", params);
  554. getSalesChart(params).then((res) => {
  555. if (res.code === 10000) {
  556. this.salesChartData = res.data;
  557. console.log(this.salesChartData);
  558. }
  559. });
  560. },
  561. // 经营分析 - 成本分析
  562. initCostData() {
  563. getCostData({}).then((res) => {
  564. console.log(res);
  565. if (res.code === 10000) {
  566. this.costHisData = [
  567. res.data["total"],
  568. res.data["baseGroup"],
  569. res.data["pigletGroup"],
  570. res.data["fattenPig"],
  571. res.data["replaceGilt"],
  572. ];
  573. this.costPieData = this.costHisData[this.costIndex];
  574. }
  575. });
  576. },
  577. // // 应收排名
  578. // initYingShou() {
  579. // getYingShou({}).then((res) => {
  580. // console.log("应收", res);
  581. // if (res.code === 10000) {
  582. // this.yingshouTableData = res.data;
  583. // }
  584. // });
  585. // },
  586. // 应付排名
  587. initYingFu() {
  588. getYingFu({}).then((res) => {
  589. console.log("应付", res);
  590. if (res.code === 10000) {
  591. this.yingfuTableData = res.data;
  592. }
  593. });
  594. },
  595. // 安全库存报警
  596. initSafeInventory() {
  597. getSafeInventory({
  598. current: this.size,
  599. size: this.pageNum,
  600. }).then((res) => {
  601. console.log(res);
  602. });
  603. },
  604. // 生产情况
  605. initProductionCondition() {
  606. getProductionCondition({}).then((res) => {
  607. console.log(res.data);
  608. if (res.code === 10000) {
  609. this.productionPercents = [
  610. { ...res.data["grice_rate"], color: "rgb(112,249,250)" },
  611. { ...res.data["piglet_rate"], color: "rgb(51, 211, 137)" },
  612. { ...res.data["fatpig_rate"], color: "rgb(255, 125, 0)" },
  613. { ...res.data["break_rate"], color: "rgb(2, 167, 240)" },
  614. { ...res.data["breed_rate"], color: "rgb(112, 0, 217)" },
  615. ];
  616. this.productionItems = [
  617. res.data["avg_farrow_1"].stockQuantity,
  618. res.data["avg_farrow_2"].stockQuantity,
  619. res.data["avg_farrow_3"].stockQuantity,
  620. res.data["break_grice"].stockQuantity,
  621. res.data["avg_weight"].stockQuantity,
  622. res.data["avg_weight"].stockQuantity, // FIXME: 没有数据,随便放一个先
  623. res.data["nest_times"].stockQuantity,
  624. res.data["psy"].stockQuantity,
  625. ];
  626. }
  627. });
  628. },
  629. // 重要指标折线图
  630. initImportantData() {
  631. getImportantData({
  632. startDate: this.importantDates[0],
  633. endDate: this.importantDates[1],
  634. type: this.importantValue,
  635. }).then((res) => {
  636. const types = [
  637. ["break_rate"],
  638. ["avg_farrow_1", "avg_farrow_2", "avg_farrow_3"],
  639. ["avg_weight", "break_grice"],
  640. ["fatpig_rate", "grice_rate", "piglet_rate"],
  641. ];
  642. this.importantData = [];
  643. types[this.importantValue - 1].forEach((type) => {
  644. this.importantData.push(res.data[type]);
  645. });
  646. this.importantTitle = {
  647. isPercentage: res.data["isPercentage"],
  648. isWeight: res.data["isWeight"],
  649. isHead: res.data["isHead"],
  650. };
  651. console.log("重要指标数据----------------", this.importantTitle);
  652. });
  653. },
  654. // 重要指标的 type 改变
  655. changeImportantValue() {
  656. this.initImportantData();
  657. },
  658. // 重要指标的时间改变
  659. changeImportantDates() {
  660. this.initImportantData();
  661. },
  662. // 成本分析 - 数据改变
  663. changeCostIndex(value) {
  664. this.costIndex = value;
  665. this.costPieData = this.costHisData[value];
  666. },
  667. },
  668. watch: {
  669. getSalesDates(newValue) {
  670. this.getSalesDates = newValue;
  671. this.initSalesChart();
  672. },
  673. },
  674. };
  675. </script>
  676. <style scoped>
  677. .analysis {
  678. width: 100%;
  679. height: 100%;
  680. box-sizing: border-box;
  681. padding: 20px;
  682. }
  683. .table-content {
  684. padding: 10px 15px 12px;
  685. }
  686. /* 成本分析echarts图排列 */
  687. .cost {
  688. border-bottom: 1px solid rgba(228, 228, 228, 1);
  689. position: relative;
  690. }
  691. .cost > .select {
  692. position: absolute;
  693. right: 0;
  694. margin: 20px;
  695. }
  696. .cost-content {
  697. padding-top: 20px;
  698. display: flex;
  699. }
  700. .cost-left {
  701. flex: 1;
  702. }
  703. .cost-right {
  704. flex: 1;
  705. }
  706. .cost > .label {
  707. text-align: center;
  708. font-weight: bold;
  709. font-size: 18px;
  710. }
  711. /* 重要指标 */
  712. .important {
  713. padding: 20px;
  714. position: relative;
  715. border-bottom: 1px solid rgba(228, 228, 228, 1);
  716. }
  717. .important > .condition {
  718. position: absolute;
  719. right: 0;
  720. margin-right: 20px;
  721. }
  722. .important-chart {
  723. margin-top: 20px;
  724. }
  725. /* 销售情况 */
  726. .sales {
  727. padding: 20px;
  728. padding-bottom: 0;
  729. }
  730. .sales-condition {
  731. margin-left: 250px;
  732. }
  733. .sales-content {
  734. padding-top: 20px;
  735. width: 100%;
  736. display: flex;
  737. flex-direction: row;
  738. justify-content: space-around;
  739. }
  740. .sales-left {
  741. width: 15%;
  742. line-height: 25px;
  743. padding-top: 30px;
  744. }
  745. .sales-left > .up {
  746. margin-bottom: 20px;
  747. }
  748. .sales-left > .up > label,
  749. .sales-left > .down > label {
  750. display: block;
  751. text-align: center;
  752. font-size: 13px;
  753. color: #999;
  754. }
  755. .sales-left > .up > span,
  756. .sales-left > .down > span {
  757. display: block;
  758. text-align: center;
  759. font-size: 16px;
  760. color: #333;
  761. }
  762. .sales-left > .up > .sales-change,
  763. .sales-left > .down > .sales-change {
  764. display: flex;
  765. justify-content: space-around;
  766. font-size: 13px;
  767. }
  768. /* 三角形 */
  769. .triangle-change {
  770. display: inline-block;
  771. width: 8px;
  772. height: 8px;
  773. border-style: solid;
  774. border-width: 8px;
  775. margin-right: 20px;
  776. }
  777. .triangle-up {
  778. border-color: transparent transparent rgb(238, 16, 16) transparent;
  779. }
  780. .triangle-down {
  781. border-color: rgb(2, 112, 2) transparent transparent transparent;
  782. position: relative;
  783. top: 7px;
  784. }
  785. .color-up {
  786. color: rgb(238, 16, 16);
  787. }
  788. .color-down {
  789. color: rgb(2, 112, 2);
  790. }
  791. /* 销售情况右侧 */
  792. .sales-right {
  793. width: 85%;
  794. border-left: 1px solid rgba(228, 228, 228, 1);
  795. height: 300px;
  796. }
  797. </style>