You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1002 lines
25 KiB

2 days ago
2 days ago
4 weeks ago
4 weeks ago
4 weeks ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
4 weeks ago
2 weeks ago
2 days ago
2 weeks ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
4 weeks ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
4 weeks ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
2 days ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
3 weeks ago
2 weeks ago
2 weeks ago
3 weeks ago
3 weeks ago
2 weeks ago
2 days ago
2 weeks ago
2 days ago
2 weeks ago
2 weeks ago
2 days ago
  1. <template>
  2. <div class="market-temperature">
  3. <div class="container">
  4. <div class="border3">
  5. <section class="chart-section">
  6. <div>
  7. <div class="trapezoid">
  8. <span>{{ companyName }}</span>
  9. <span>{{ stockCode }}</span>
  10. </div>
  11. <div ref="KlineCanvs" class="KlineClass"></div>
  12. </div>
  13. </section>
  14. </div>
  15. <div class="border4">
  16. <div class="border1">
  17. <div class="title">
  18. <img :src="biaoti" alt="标题" class="titleImg" />
  19. <div class="titleContent">
  20. {{ calendarDate }}
  21. </div>
  22. </div>
  23. <div class="secondTitle">
  24. <div v-for="item in week" :key="item" class="secondTitleItems">
  25. <div class="secondTitleItem">{{ item }}</div>
  26. </div>
  27. </div>
  28. <div class="calendar">
  29. <div v-for="row in 5" :key="row" class="calendarCol">
  30. <div
  31. v-for="item in currentData.slice((row - 1) * 7, row * 7)"
  32. :key="item"
  33. class="calendarRow"
  34. >
  35. <div
  36. class="calendarItem"
  37. :style="{ backgroundColor: item.color }"
  38. >
  39. <div v-if="item.month" class="month">
  40. <div class="monthContent">
  41. {{ months[item.month - 1] }}
  42. </div>
  43. </div>
  44. <div class="calendarItemTitle">{{ item.day }}</div>
  45. <div
  46. class="calendarItemContent"
  47. v-if="item.stock_temperature == ''"
  48. >
  49. <img :src="suoding" alt="锁定" class="ciImg" />
  50. </div>
  51. <div
  52. class="calendarItemContent"
  53. v-else-if="item.stock_temperature == '休市'"
  54. >
  55. 休市
  56. </div>
  57. <div class="calendarItemContent" v-else>
  58. <div v-if="isIndexCode">
  59. {{ item.market_temperature }}
  60. </div>
  61. <div v-else>
  62. {{ item.market_temperature }} |
  63. {{ item.stock_temperature }}
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <!-- <el-table :data="groupedWDRL" border :row-style="tableRowStyle" header-cell-class-name="table_header"
  72. :cell-style="tableCellStyle" :column-width="cellWidth">
  73. <el-table-column v-for="(day, colIndex) in ['一', '二', '三', '四', '五', '六', '日']" :key="colIndex" :label="day">
  74. <template #default="{ $index: rowIndex }">
  75. <div v-if="getDayData(rowIndex, colIndex + 1)">
  76. <p class="WDRL_date">
  77. {{ formatDate(getDayData(rowIndex, colIndex + 1).date) }}
  78. <span class="month-display">{{ formatMonth(getDayData(rowIndex, colIndex + 1).date) }}</span>
  79. </p>
  80. <p class="WDRL_data">
  81. <template v-if="isIndexCode">
  82. <span v-if="getDayData(rowIndex, colIndex + 1).market_temperature">
  83. {{ getDayData(rowIndex, colIndex + 1).market_temperature }}
  84. </span>
  85. </template>
  86. <template v-else>
  87. <template v-if="isBothRest(rowIndex, colIndex + 1)">休市</template>
  88. <template v-else>
  89. <span v-if="getDayData(rowIndex, colIndex + 1).stock_temperature">
  90. {{ getDayData(rowIndex, colIndex + 1).stock_temperature }}
  91. </span>
  92. <span v-if="shouldShowDivider(rowIndex, colIndex + 1)"> | </span>
  93. <span v-if="getDayData(rowIndex, colIndex + 1).market_temperature">
  94. {{ getDayData(rowIndex, colIndex + 1).market_temperature }}
  95. </span>
  96. </template>
  97. </template>
  98. </p>
  99. </div>
  100. <div v-else-if="shouldShowRest(rowIndex, colIndex + 1)">
  101. <p class="WDRL_date">休市</p>
  102. </div>
  103. </template>
  104. </el-table-column>
  105. </el-table> -->
  106. </div>
  107. </div>
  108. </div>
  109. </template>
  110. <script setup>
  111. import {
  112. ref,
  113. computed,
  114. onMounted,
  115. defineExpose,
  116. defineProps,
  117. onUnmounted,
  118. onBeforeUnmount,
  119. } from "vue";
  120. import * as echarts from "echarts";
  121. import biaoti from "../../assets/img/AiEmotion/标题.png";
  122. import jiaobiao from "../../assets/img/AiEmotion/角标.png";
  123. import suoding from "../../assets/img/AiEmotion/锁定.png";
  124. import moment from "moment";
  125. const props = defineProps({
  126. companyName: {
  127. type: String,
  128. default: "",
  129. },
  130. stockCode: {
  131. type: String,
  132. default: "",
  133. },
  134. });
  135. const color = ref([
  136. "#32A3FF",
  137. "#2BD977",
  138. "#A239FF",
  139. "#FF7945",
  140. "#FF5289",
  141. "#5791CB",
  142. ]);
  143. const months = ref([
  144. "1月",
  145. "2月",
  146. "3月",
  147. "4月",
  148. "5月",
  149. "6月",
  150. "7月",
  151. "8月",
  152. "9月",
  153. "10月",
  154. "11月",
  155. "12月",
  156. ]);
  157. const calendarDate = ref();
  158. const week = ref(["周一", "周二", "周三", "周四", "周五", "周六", "周日"]);
  159. const KlineCanvs = ref();
  160. const WDRL = ref([]);
  161. const klineDataRaw = ref([]); // 用于存储 K 线图数据
  162. let chartInstance = null; // 存储图表实例
  163. const indexCodes = [
  164. "NDX",
  165. "DJIA",
  166. "SPX",
  167. "STI",
  168. "KLSE",
  169. "TSX",
  170. "N225",
  171. "KS11",
  172. "JKSE",
  173. "1A0001",
  174. "HSI",
  175. "I63",
  176. "VNINDE",
  177. ];
  178. const isIndexCode = computed(() => indexCodes.includes(props.code));
  179. const currentData = ref([]);
  180. const fetchCalendarData = () => {
  181. const monthTitle = ref([]);
  182. currentData.value = JSON.parse(JSON.stringify(WDRL.value));
  183. for (let i = 0; i < currentData.value.length; i++) {
  184. const day = moment(currentData.value[i].date).date();
  185. currentData.value[i].day = day;
  186. if (i == 0 || day == 1) {
  187. monthTitle.value.push({
  188. year: moment(currentData.value[i].date).year(),
  189. month: moment(currentData.value[i].date).month() + 1,
  190. });
  191. currentData.value[i].month =
  192. moment(currentData.value[i].date).month() + 1;
  193. }
  194. const tp = currentData.value[i].stock_temperature;
  195. if (tp == "" || tp == null || tp == "休市") {
  196. currentData.value[i].color = color.value[5];
  197. } else {
  198. if (tp <= "20") {
  199. currentData.value[i].color = color.value[0];
  200. } else if (parseInt(tp) <= "50") {
  201. currentData.value[i].color = color.value[1];
  202. } else if (parseInt(tp) <= "70") {
  203. currentData.value[i].color = color.value[2];
  204. } else if (parseInt(tp) <= "90") {
  205. currentData.value[i].color = color.value[3];
  206. } else {
  207. currentData.value[i].color = color.value[4];
  208. }
  209. }
  210. }
  211. const stDate = monthTitle.value[0];
  212. const edDate = monthTitle.value[monthTitle.value.length - 1];
  213. calendarDate.value = `${stDate.year}${stDate.month}月 ~`;
  214. if (stDate.year != edDate.year) {
  215. calendarDate.value += `${edDate.year}${edDate.month}`;
  216. } else {
  217. calendarDate.value += `${edDate.month}`;
  218. }
  219. console.log(currentData.value);
  220. };
  221. // 分组 WDRL 数据
  222. // const groupedWDRL = computed(() => {
  223. // const result = [];
  224. // for (let i = 0; i < WDRL.value.length; i += 7) {
  225. // result.push(WDRL.value.slice(i, i + 7));
  226. // }
  227. // return result;
  228. // });
  229. // 获取指定日期的数据
  230. // function getDayData(rowIndex, dayIndex) {
  231. // const weekData = groupedWDRL.value[rowIndex];
  232. // if (weekData && weekData.length >= dayIndex) {
  233. // return weekData[dayIndex - 1] || {};
  234. // }
  235. // return {};
  236. // }
  237. // 判断是否显示分隔符
  238. // function shouldShowDivider(rowIndex, dayIndex) {
  239. // const data = getDayData(rowIndex, dayIndex);
  240. // return data?.market_temperature && data?.stock_temperature;
  241. // }
  242. // 判断是否都休市
  243. // function isBothRest(rowIndex, colIndex) {
  244. // const data = getDayData(rowIndex, colIndex);
  245. // return (
  246. // data &&
  247. // data.stock_temperature === "休市" &&
  248. // data.market_temperature === "休市"
  249. // );
  250. // }
  251. // 判断是否显示休市信息
  252. // function shouldShowRest(rowIndex, dayIndex) {
  253. // const data = getDayData(rowIndex, dayIndex);
  254. // if (data && (data.stock_temperature || data.market_temperature)) return false;
  255. // const flatIndex = rowIndex * 7 + (dayIndex - 1);
  256. // const targetDay = WDRL.value[flatIndex];
  257. // if (!targetDay || !targetDay.date) return false;
  258. // const [year, month, day] = targetDay.date.split("/").map(Number);
  259. // if (!year || !month || !day) return false;
  260. // const dateObj = new Date(year, month - 1, day);
  261. // const today = new Date();
  262. // if (
  263. // dateObj.getMonth() !== today.getMonth() ||
  264. // dateObj.getFullYear() !== today.getFullYear()
  265. // )
  266. // return false;
  267. // const weekday = dateObj.getDay();
  268. // return weekday >= 1 && weekday <= 5;
  269. // }
  270. // 格式化月份
  271. // function formatMonth(dateStr) {
  272. // if (!dateStr) return "";
  273. // const month = dateStr.split("/")[1];
  274. // const map = {
  275. // "01": "一月",
  276. // "02": "二月",
  277. // "03": "三月",
  278. // "04": "四月",
  279. // "05": "五月",
  280. // "06": "六月",
  281. // "07": "七月",
  282. // "08": "八月",
  283. // "09": "九月",
  284. // 10: "十月",
  285. // 11: "十一月",
  286. // 12: "十二月",
  287. // };
  288. // return map[month] || "";
  289. // }
  290. // 格式化日期
  291. // function formatDate(dateStr) {
  292. // if (!dateStr) return "";
  293. // return dateStr.split("/")[2];
  294. // }
  295. // 设置表格单元格样式
  296. // function tableCellStyle({ row, column, rowIndex, columnIndex }) {
  297. // const data = getDayData(rowIndex, columnIndex + 1);
  298. // let value = isIndexCode.value
  299. // ? Number(data?.market_temperature)
  300. // : Number(data?.stock_temperature);
  301. // if (isNaN(value)) return { backgroundColor: "#4b759f", color: "white" };
  302. // if (value >= 90) return { backgroundColor: "#BD0000", color: "white" };
  303. // else if (value >= 70) return { backgroundColor: "#FF5638", color: "white" };
  304. // else if (value >= 50) return { backgroundColor: "#C929E6", color: "white" };
  305. // else if (value >= 20) return { backgroundColor: "#00AB00", color: "white" };
  306. // else if (value > 0) return { backgroundColor: "#87CEEB", color: "white" };
  307. // else return { backgroundColor: "#4b759f", color: "white" };
  308. // }
  309. // function tableRowStyle() {
  310. // // 动态调整行高
  311. // const containerWidth = document.querySelector(".border4")?.offsetWidth || 0;
  312. // const rowHeight = containerWidth * 0.1; // 根据容器宽度的比例调整行高
  313. // return { height: `${rowHeight}px` };
  314. // }
  315. // // 动态计算单元格宽度
  316. // const containerWidth = document.querySelector(".border4")?.offsetWidth || 0;
  317. // const cellWidth = containerWidth / 7;
  318. // 初始化图表
  319. function initChart(raw, klineDataRawValue, WDRLValue) {
  320. if (!raw || !klineDataRawValue || !WDRLValue) {
  321. console.error(
  322. "initChart: raw, klineDataRawValue or WDRLValue is undefined"
  323. );
  324. return;
  325. }
  326. // 如果已存在图表实例,先销毁
  327. if (chartInstance) {
  328. chartInstance.dispose();
  329. chartInstance = null;
  330. }
  331. // 处理 K 线图数据
  332. const klineData = klineDataRawValue.map((item) => {
  333. const open = item[1];
  334. const close = item[2];
  335. const low = item[3];
  336. const high = item[4];
  337. return [open, close, low, high];
  338. });
  339. // 计算K线数据的最小值和最大值
  340. let minPrice = Infinity;
  341. let maxPrice = -Infinity;
  342. klineDataRawValue.forEach((item) => {
  343. const low = item[3];
  344. const high = item[4];
  345. minPrice = Math.min(minPrice, low);
  346. maxPrice = Math.max(maxPrice, high);
  347. });
  348. // 计算小于最小值的整数作为y轴最小值
  349. const yAxisMin = Math.floor(minPrice);
  350. // 计算大于最大值的整数作为y轴最大值
  351. const yAxisMax = Math.ceil(maxPrice);
  352. // 温度日历
  353. WDRL.value = WDRLValue;
  354. klineDataRaw.value = klineDataRawValue;
  355. fetchCalendarData();
  356. const dateLabels = raw.map((item) => item[0]);
  357. const marketData = raw.map((item) => Math.round(item[1]));
  358. const stockData = raw.map((item) => Math.round(item[2]));
  359. // 创建新的图表实例
  360. chartInstance = echarts.init(KlineCanvs.value);
  361. chartInstance.setOption({
  362. tooltip: {
  363. trigger: "axis",
  364. axisPointer: {
  365. type: "cross",
  366. crossStyle: {
  367. color: "#999",
  368. width: 1,
  369. type: "dashed",
  370. },
  371. lineStyle: {
  372. color: "#999",
  373. width: 1,
  374. type: "dashed",
  375. },
  376. },
  377. formatter: function (params) {
  378. if (params && params.length > 0) {
  379. let result = `日期: ${params[0].name}<br/>`;
  380. params.forEach((param) => {
  381. if (param.seriesType === "candlestick") {
  382. const open = param.data[1];
  383. const close = param.data[2];
  384. const low = param.data[3];
  385. const high = param.data[4];
  386. result += `${param.seriesName}<br/>开: ${open}<br/>收: ${close}<br/>低: ${low}<br/>高: ${high}<br/>`;
  387. } else if (param.seriesType === "line") {
  388. result += `${param.seriesName}: ${param.value}<br/>`;
  389. }
  390. });
  391. return result;
  392. }
  393. return "";
  394. },
  395. },
  396. legend: {
  397. data: ["K线", "市场温度", "股票温度"],
  398. textStyle: { color: "white", fontSize: 18 },
  399. },
  400. xAxis: {
  401. type: "category",
  402. data: dateLabels,
  403. axisLine: { lineStyle: { color: "#00BFFF" } },
  404. axisLabel: {
  405. color: "#FFFFFF",
  406. fontSize: 12,
  407. fontWeight: "bold",
  408. },
  409. axisTick: { lineStyle: { color: "#00BFFF" } },
  410. axisPointer: {
  411. show: true,
  412. type: "line",
  413. lineStyle: {
  414. color: "#999",
  415. width: 1,
  416. type: "dashed",
  417. },
  418. label: {
  419. show: true,
  420. color: "black",
  421. },
  422. },
  423. },
  424. yAxis: [
  425. {
  426. min: yAxisMin,
  427. max: yAxisMax,
  428. axisLine: { lineStyle: { color: "#00FF7F" } },
  429. axisLabel: {
  430. color: "#FFFFFF",
  431. fontSize: 12,
  432. fontWeight: "bold",
  433. },
  434. axisTick: { lineStyle: { color: "#00FF7F" } },
  435. splitLine: {
  436. show: false,
  437. lineStyle: {
  438. color: "#333333",
  439. type: "solid",
  440. opacity: 0.3,
  441. },
  442. },
  443. axisPointer: {
  444. show: true,
  445. type: "line",
  446. label: {
  447. show: true,
  448. color: "black",
  449. },
  450. lineStyle: {
  451. color: "#999",
  452. width: 1,
  453. type: "dashed",
  454. },
  455. },
  456. },
  457. {
  458. min: 0,
  459. max: 100,
  460. position: "right",
  461. axisLabel: {
  462. color: "#FFFF00",
  463. fontSize: 12,
  464. fontWeight: "bold",
  465. },
  466. axisLine: { lineStyle: { color: "#FF1493", width: 2 } },
  467. axisTick: { lineStyle: { color: "#FF1493" } },
  468. splitLine: {
  469. show: false,
  470. lineStyle: {
  471. color: "#444444",
  472. type: "solid",
  473. opacity: 0.3,
  474. },
  475. },
  476. axisPointer: {
  477. show: true,
  478. type: "line",
  479. lineStyle: {
  480. color: "#999",
  481. width: 1,
  482. type: "dashed",
  483. },
  484. label: {
  485. show: true,
  486. color: "black",
  487. },
  488. },
  489. },
  490. ],
  491. color: ["#f00", "white"],
  492. series: [
  493. {
  494. name: "K线",
  495. type: "candlestick",
  496. data: klineData,
  497. itemStyle: {
  498. normal: {
  499. color: "#00FF00", // 阳线红色
  500. color0: "#FF0000", // 阴线绿色
  501. borderColor: "#00FF00", // 阳线边框红色
  502. borderColor0: "#FF0000", // 阴线边框绿色
  503. },
  504. },
  505. },
  506. {
  507. name: "市场温度",
  508. type: "line",
  509. yAxisIndex: 1,
  510. data: marketData,
  511. },
  512. {
  513. name: "股票温度",
  514. type: "line",
  515. yAxisIndex: 1,
  516. data: stockData,
  517. },
  518. ],
  519. // 添加 dataZoom 组件
  520. dataZoom: [
  521. {
  522. type: "slider",
  523. xAxisIndex: 0,
  524. filterMode: "filter",
  525. textStyle: {
  526. color: "white",
  527. },
  528. bottom: "0%", // 下移数据缩放滑块
  529. },
  530. {
  531. type: "inside",
  532. xAxisIndex: 0,
  533. filterMode: "filter",
  534. },
  535. ],
  536. });
  537. // 防抖函数,避免频繁触发resize
  538. const debounce = (func, wait) => {
  539. let timeout;
  540. return function executedFunction(...args) {
  541. const later = () => {
  542. clearTimeout(timeout);
  543. func(...args);
  544. };
  545. clearTimeout(timeout);
  546. timeout = setTimeout(later, wait);
  547. };
  548. };
  549. // 监听窗口大小变化
  550. const resizeHandler = debounce(() => {
  551. if (chartInstance && !chartInstance.isDisposed()) {
  552. try {
  553. chartInstance.resize();
  554. adjustCellFontSize(); // 同时调整表格字体大小
  555. console.log("股市温度计图表已重新调整大小");
  556. } catch (error) {
  557. console.error("股市温度计图表resize失败:", error);
  558. }
  559. }
  560. }, 100); // 100ms防抖延迟
  561. // 移除之前的监听器(如果存在)
  562. if (window.marketTempResizeHandler) {
  563. window.removeEventListener("resize", window.marketTempResizeHandler);
  564. }
  565. // 添加新的监听器
  566. window.addEventListener("resize", resizeHandler);
  567. // 存储resize处理器以便后续清理
  568. window.marketTempResizeHandler = resizeHandler;
  569. // 添加容器大小监听器
  570. const chartContainer = document.querySelector(".KlineClass");
  571. if (chartContainer && window.ResizeObserver) {
  572. const containerObserver = new ResizeObserver(
  573. debounce(() => {
  574. if (chartInstance && !chartInstance.isDisposed()) {
  575. try {
  576. chartInstance.resize();
  577. console.log("股市温度计容器大小变化,图表已调整");
  578. } catch (error) {
  579. console.error("股市温度计容器resize失败:", error);
  580. }
  581. }
  582. }, 100)
  583. );
  584. containerObserver.observe(chartContainer);
  585. window.marketTempContainerObserver = containerObserver;
  586. }
  587. // 初始调整字体大小
  588. adjustCellFontSize();
  589. }
  590. // 调整单元格字体大小
  591. function adjustCellFontSize() {
  592. const table = document.querySelector(".border4 .el-table");
  593. if (table) {
  594. const tableWidth = table.offsetWidth;
  595. const cellWidth = tableWidth / 7; // 假设一周 7 天
  596. const fontSize = Math.min(cellWidth * 0.15, 20); // 根据单元格宽度动态计算字体大小
  597. const dateElements = document.querySelectorAll(".WDRL_date");
  598. const dataElements = document.querySelectorAll(".WDRL_data");
  599. dateElements.forEach((el) => {
  600. el.style.fontSize = `${fontSize}px`;
  601. });
  602. dataElements.forEach((el) => {
  603. el.style.fontSize = `${fontSize * 0.8}px`;
  604. });
  605. }
  606. }
  607. // 组件卸载时清理资源
  608. onBeforeUnmount(() => {
  609. // 销毁图表实例
  610. if (chartInstance) {
  611. chartInstance.dispose();
  612. chartInstance = null;
  613. }
  614. // 移除窗口resize监听器
  615. if (window.marketTempResizeHandler) {
  616. window.removeEventListener("resize", window.marketTempResizeHandler);
  617. window.marketTempResizeHandler = null;
  618. }
  619. // 清理容器观察器
  620. if (window.marketTempContainerObserver) {
  621. window.marketTempContainerObserver.disconnect();
  622. window.marketTempContainerObserver = null;
  623. }
  624. });
  625. defineExpose({ initChart });
  626. </script>
  627. <style scoped>
  628. .WDRL_date {
  629. margin-top: 2px;
  630. text-align: center;
  631. font-size: 1.6vw;
  632. font-weight: bold;
  633. padding-top: 0%;
  634. position: relative;
  635. }
  636. .month-display {
  637. position: absolute;
  638. top: 0;
  639. right: 0;
  640. font-size: 1vw;
  641. color: rgb(58, 58, 58);
  642. }
  643. .WDRL_data {
  644. margin-top: 5px;
  645. text-align: center;
  646. font-size: 1vw;
  647. font-weight: bold;
  648. }
  649. .table_header {
  650. color: white;
  651. background: #2a2a2a;
  652. }
  653. .KlineClass {
  654. width: 100%;
  655. height: 600px;
  656. }
  657. .market-temperature {
  658. min-height: 100vh;
  659. /* background-color: rgb(0, 22, 65); */
  660. }
  661. .container {
  662. margin: 0 auto;
  663. /* padding: 20px; */
  664. max-width: 80vw;
  665. padding-bottom: 10%;
  666. }
  667. .border3 {
  668. margin-top: 40px;
  669. border-radius: 8px;
  670. padding: 20px;
  671. margin-left: 0;
  672. width: 100%;
  673. height: 100%;
  674. box-sizing: border-box;
  675. overflow: hidden;
  676. }
  677. .border4 {
  678. margin-top: 40px;
  679. border-radius: 8px;
  680. padding: 20px;
  681. width: 80%;
  682. margin-left: 8%;
  683. height: 48vw;
  684. overflow: visible;
  685. }
  686. .border4 .el-table {
  687. height: auto !important;
  688. max-height: none !important;
  689. }
  690. .border4 .el-table__body-wrapper {
  691. height: auto !important;
  692. max-height: none !important;
  693. overflow: visible !important;
  694. }
  695. .border4 .el-table__body {
  696. height: auto !important;
  697. }
  698. /* 手机端适配样式 */
  699. @media only screen and (max-width: 768px) {
  700. .KlineClass {
  701. width: 100%;
  702. height: 300px;
  703. }
  704. .border4 {
  705. margin-top: 0px;
  706. border-radius: 8px;
  707. padding: 0px;
  708. width: 100%;
  709. margin-left: 0%;
  710. height: 80vw;
  711. overflow: visible;
  712. }
  713. .border4 .el-table {
  714. height: auto !important;
  715. max-height: none !important;
  716. }
  717. .border4 .el-table__body-wrapper {
  718. height: auto !important;
  719. max-height: none !important;
  720. overflow: visible !important;
  721. }
  722. .border4 .el-table__body {
  723. height: auto !important;
  724. }
  725. .el-table .hidden-columns {
  726. position: absolute;
  727. visibility: hidden;
  728. z-index: -1;
  729. }
  730. .border3 {
  731. margin-top: 25px;
  732. border-radius: 8px;
  733. padding: 20px;
  734. margin-left: -13px;
  735. width: 100%;
  736. height: 100%;
  737. }
  738. .WDRL_date {
  739. font-size: 4.2vw;
  740. }
  741. .month-display {
  742. font-size: 1.8vw;
  743. }
  744. .WDRL_data {
  745. font-size: 3vw;
  746. }
  747. .el-table .cell {
  748. box-sizing: border-box;
  749. line-height: 23px;
  750. overflow: hidden;
  751. overflow-wrap: break-word;
  752. padding: 0 12px;
  753. text-overflow: ellipsis;
  754. white-space: normal;
  755. text-align: center;
  756. }
  757. .month {
  758. width: 80%;
  759. height: 70% !important;
  760. top: -4vw !important;
  761. right: -0.5vw;
  762. }
  763. .monthContent {
  764. margin-top: 1.8vw !important;
  765. font-weight: bold;
  766. font-size: 1.2vw;
  767. }
  768. .calendarItemTitle {
  769. font-size: 2.2vw !important;
  770. }
  771. .calendarItemContent {
  772. font-size: 2.2vw !important;
  773. }
  774. }
  775. .border1 {
  776. border: 2px solid #14bddb;
  777. background-color: #1f669e;
  778. width: 100%;
  779. height: 100%;
  780. border-radius: 1%;
  781. position: relative;
  782. display: flex;
  783. flex-direction: column;
  784. align-items: center;
  785. padding-bottom: 20px;
  786. /* margin: 0px; */
  787. }
  788. .border1::before {
  789. content: "";
  790. position: absolute;
  791. top: -2.5px;
  792. left: -2.5px;
  793. width: 20px;
  794. height: 20px;
  795. border-top: 3px solid #00ffff; /* 左上角颜色 */
  796. border-left: 3px solid #00ffff;
  797. border-top-left-radius: 8px;
  798. }
  799. .border1::after {
  800. content: "";
  801. position: absolute;
  802. bottom: -2px;
  803. right: -2px;
  804. width: 20px;
  805. height: 20px;
  806. border-bottom: 3px solid #00ffff; /* 右下角颜色 */
  807. border-right: 3px solid #00ffff;
  808. border-bottom-right-radius: 8px;
  809. }
  810. @font-face {
  811. font-family: "方正新综艺简体";
  812. src: url("../../assets/fonts/方正新综艺简体.ttf") format("truetype");
  813. font-weight: normal;
  814. font-style: normal;
  815. font-display: swap;
  816. }
  817. .title {
  818. width: 100%;
  819. margin-bottom: 0px;
  820. position: relative;
  821. }
  822. .titleImg {
  823. width: 100%;
  824. margin-top: 10px;
  825. }
  826. .titleContent {
  827. font-family: "方正新综艺简体";
  828. font-size: calc(10px + 1.5vw);
  829. color: #00ffff;
  830. position: absolute;
  831. bottom: 42%;
  832. left: 30px;
  833. }
  834. .secondTitle {
  835. width: 100%;
  836. height: 35px;
  837. display: flex;
  838. justify-content: center;
  839. }
  840. .secondTitleItems {
  841. width: 13.5%;
  842. height: 100%;
  843. display: flex;
  844. }
  845. .secondTitleItem {
  846. border: 1px solid #03a7ce;
  847. background-color: #0b3c73;
  848. width: 100%;
  849. color: #ffffff;
  850. display: flex;
  851. justify-content: center;
  852. align-items: center;
  853. }
  854. .calendar {
  855. margin-top: 30px;
  856. width: 100%;
  857. height: 70%;
  858. display: flex;
  859. justify-content: center;
  860. flex-direction: column;
  861. }
  862. .calendarCol {
  863. width: 100%;
  864. height: 100%;
  865. display: flex;
  866. justify-content: center;
  867. }
  868. .calendarRow {
  869. width: 13.5%;
  870. height: 100%;
  871. }
  872. .calendarItem {
  873. border: 1px solid #0060af;
  874. width: 100%;
  875. height: 100%;
  876. display: flex;
  877. flex-direction: column;
  878. justify-content: center;
  879. border-radius: 10px;
  880. color: #ffffff;
  881. position: relative;
  882. /* font-size: 1.5vw; */
  883. }
  884. .month {
  885. position: absolute;
  886. background-image: url("../../assets/img/AiEmotion/角标.png");
  887. background-size: 100% 100%;
  888. background-repeat: no-repeat;
  889. width: 80%;
  890. height: 80%;
  891. display: flex;
  892. justify-content: center;
  893. /* align-items: center; */
  894. top: -2vw;
  895. right: -0.5vw;
  896. z-index: 1;
  897. }
  898. .monthContent {
  899. margin-top: 1.2vw;
  900. font-weight: bold;
  901. font-size: 1.2vw;
  902. }
  903. .calendarItemTitle {
  904. width: 100%;
  905. text-align: center;
  906. font-weight: bold;
  907. font-size: 1.2vw;
  908. }
  909. .calendarItemContent {
  910. width: 100%;
  911. /* text-align: center; */
  912. display: flex;
  913. justify-content: center;
  914. align-items: center;
  915. font-weight: bold;
  916. font-size: 1.2vw;
  917. }
  918. .ciImg {
  919. width: 20%;
  920. }
  921. </style>