SandTable_old1.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613
  1. <template>
  2. <div class="sand-table">
  3. <img :src="require('@assets/png/3dback.png')" class="i3dback">
  4. <img :src="require('@assets/png/3dcloud.png')" class="i3dcloud">
  5. <StBack></StBack>
  6. <ThreeModel1 class="three-model-layer" @when="when"></ThreeModel1>
  7. <div class="sand-table-left" v-if="showPanel">
  8. <div class="com-panel-sand">
  9. <div class="com-panel-sand-header font-sm white">
  10. <div class="sand-time">{{sandTime}}</div>
  11. <div class="sand-date mg-b-8">{{sandDate}}</div>
  12. </div>
  13. <div class="com-panel-body">
  14. <div class="weather-box">
  15. <div class="weather-item">
  16. <div class="weather-icon">
  17. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  18. <svg-icon svgid="svg-天气1" />
  19. </div>
  20. </div>
  21. <div class="weather-info">
  22. <div class="font-sm white">天气</div>
  23. <div class="font-lg green">多云转晴</div>
  24. </div>
  25. </div>
  26. <div class="weather-item">
  27. <div class="weather-icon">
  28. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  29. <svg-icon svgid="svg-温度1" />
  30. </div>
  31. </div>
  32. <div class="weather-info">
  33. <div class="font-sm white">温度</div>
  34. <div>
  35. <span class="font-lg green">26</span>
  36. <span class="font-sm white mg-l-8">℃</span>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="weather-item">
  41. <div class="weather-icon">
  42. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  43. <svg-icon svgid="svg-风速" />
  44. </div>
  45. </div>
  46. <div class="weather-info">
  47. <div class="font-sm white">风向</div>
  48. <div>
  49. <span class="font-lg green">4-5</span>
  50. <span class="font-sm white mg-l-8">级 西北风</span>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="weather-item">
  55. <div class="weather-icon">
  56. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  57. <svg-icon svgid="svg-能见度" />
  58. </div>
  59. </div>
  60. <div class="weather-info">
  61. <div class="font-sm white">能见度</div>
  62. <div>
  63. <span class="font-lg green">20</span>
  64. <span class="font-sm white mg-l-8">KM</span>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="weather-item">
  69. <div class="weather-icon">
  70. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  71. <svg-icon svgid="svg-湿度1" />
  72. </div>
  73. </div>
  74. <div class="weather-info">
  75. <div class="font-sm white">湿度</div>
  76. <div>
  77. <span class="font-lg green">75.0</span>
  78. <span class="font-sm white mg-l-8">%</span>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="weather-item">
  83. <div class="weather-icon">
  84. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  85. <svg-icon svgid="svg-气压1" />
  86. </div>
  87. </div>
  88. <div class="weather-info">
  89. <div class="font-sm white">气压</div>
  90. <div>
  91. <span class="font-lg green">994</span>
  92. <span class="font-sm white mg-l-8">kPa</span>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="weather-item">
  97. <div class="weather-icon">
  98. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  99. <svg-icon svgid="svg-日出1" />
  100. </div>
  101. </div>
  102. <div class="weather-info">
  103. <div class="font-sm white">日出时间</div>
  104. <div class="font-lg green">04:36</div>
  105. </div>
  106. </div>
  107. <div class="weather-item">
  108. <div class="weather-icon">
  109. <div class="svg-icon svg-icon-lg svg-icon-white other-icon">
  110. <svg-icon svgid="svg-日落1" />
  111. </div>
  112. </div>
  113. <div class="weather-info">
  114. <div class="font-sm white">日落时间</div>
  115. <div class="font-lg green">18:50</div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="sand-table-right" v-if="showPanel">
  123. <PanelSand class="right-panel" title="板块标题">
  124. <el-row>
  125. <el-col :span="12" class="pre-img-box">
  126. <img v-if="!videoShow" class="pre-img" :src="require('@assets/png/p1.jpg')" />
  127. <video v-if="videoShow" class="pre-img" width="179" height="100" controls>
  128. <source :src="require('@assets/png/p.mp4')" type="video/mp4">
  129. 您的浏览器不支持 video 标签。
  130. </video>
  131. </el-col>
  132. <el-col :span="12" class="pre-img-box">
  133. <img class="pre-img" :src="require('@assets/png/p2.jpg')" />
  134. </el-col>
  135. </el-row>
  136. <el-row>
  137. <el-col :span="12" class="pre-img-box">
  138. <img class="pre-img" :src="require('@assets/png/p3.jpg')" />
  139. </el-col>
  140. <el-col :span="12" class="pre-img-box">
  141. <img class="pre-img" :src="require('@assets/png/p4.jpg')" />
  142. </el-col>
  143. </el-row>
  144. <el-row>
  145. <el-col :span="12" class="pre-img-box">
  146. <img class="pre-img" :src="require('@assets/png/p5.jpg')" />
  147. </el-col>
  148. <el-col :span="12" class="pre-img-box">
  149. <img class="pre-img" :src="require('@assets/png/p6.jpg')" />
  150. </el-col>
  151. </el-row>
  152. </PanelSand>
  153. <PanelSand class="right-panel mg-t-16" title="板块标题">
  154. <div class="person-info-box mg-t-16">
  155. <img class="header mg-r-8 bg-green" :src="require('@assets/logo.png')" />
  156. <div class="person-info">
  157. <div class="green font-lg" style="font-weight: bold;">张三</div>
  158. <div class="white font-sm">
  159. <span>职务:高级检修工</span>
  160. <span class="mg-l-16">当前任务编号 000000</span>
  161. </div>
  162. <div class="white font-sm">平均检修时间 <span class="green">5</span> 小时</div>
  163. </div>
  164. </div>
  165. <div class="table mg-t-8">
  166. <Table :data="tableData" />
  167. </div>
  168. </PanelSand>
  169. <PanelSandToolbar class="right-panel mg-t-16" title="风险隐患详情">
  170. <template v-slot:tools>
  171. <div class="exchange" @click="exchange">
  172. <span :class="exchangeBtn ? 'gray' : 'green'">预警</span>
  173. <i class="green fa fa-exchange mg-l-8 mg-r-8"></i>
  174. <span :class="exchangeBtn ? 'green' : 'gray'">时长</span>
  175. </div>
  176. </template>
  177. <template v-slot:default>
  178. <RadarPieChart height="21vh" />
  179. </template>
  180. </PanelSandToolbar>
  181. </div>
  182. <div class="sand-table-bottom">
  183. <div class="stb-chart-panel">
  184. <PercentCard2></PercentCard2>
  185. </div>
  186. <div class="stb-chart-panel">
  187. <PercentCard2 title="年计划完成率"></PercentCard2>
  188. </div>
  189. <div class="stb-count-panel">
  190. <div class="stb-count-panel-icon">日</div>
  191. <div class="stb-count-panel-info mg-l-16">
  192. <div class="white font-sm">今日预测发电量</div>
  193. <div class="mg-t-8">
  194. <span class="green font-num font-lg">994.76</span>
  195. <span class="white font-sm mg-l-8">kWh</span>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="stb-count-panel">
  200. <div class="stb-count-panel-icon">月</div>
  201. <div class="stb-count-panel-info mg-l-16">
  202. <div class="white font-sm">月预测发电量</div>
  203. <div class="mg-t-8">
  204. <span class="green font-num font-lg">994.76</span>
  205. <span class="white font-sm mg-l-8">kWh</span>
  206. </div>
  207. </div>
  208. </div>
  209. <div class="stb-count-panel">
  210. <div class="stb-count-panel-icon">
  211. <div class="svg-icon svg-icon-sm svg-icon-gray-l">
  212. <svg-icon svgid="svg-风速" />
  213. </div>
  214. </div>
  215. <div class="stb-count-panel-info mg-l-16">
  216. <div class="white font-sm">风速</div>
  217. <div class="mg-t-8">
  218. <span class="green font-num font-lg">994.76</span>
  219. <span class="white font-sm mg-l-8">kWh</span>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="stb-count-panel">
  224. <div class="stb-count-panel-icon">
  225. <div class="svg-icon svg-icon-sm svg-icon-gray-l">
  226. <svg-icon svgid="svg-功率" />
  227. </div>
  228. </div>
  229. <div class="stb-count-panel-info mg-l-16">
  230. <div class="white font-sm">功率</div>
  231. <div class="mg-t-8">
  232. <span class="green font-num font-lg">994.76</span>
  233. <span class="white font-sm mg-l-8">kWh</span>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </template>
  240. <script>
  241. import ThreeModel1 from "./component/ThreeModel1.vue";
  242. import PanelSand from "@com/coms/panel/panel-sand.vue";
  243. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  244. import StBack from "./component/st-back.vue";
  245. import Table from "@com/coms/table/table.vue";
  246. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  247. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  248. import PercentCard2 from "@com/coms/cards/percent-card-2.0.1.vue";
  249. export default {
  250. // 名称
  251. name: "SandTable",
  252. // 使用组件
  253. components: {
  254. ThreeModel1,
  255. PanelSand,
  256. PanelSandToolbar,
  257. Table,
  258. RadarPieChart,
  259. StBack,
  260. SvgIcon,
  261. PercentCard2,
  262. },
  263. // 数据
  264. data() {
  265. return {
  266. videoShow: true,
  267. showPanel: false,
  268. exchangeBtn: false,
  269. ForecastPower: [
  270. {
  271. name: "今日预测电量",
  272. value: 103.62,
  273. total: 150,
  274. },
  275. {
  276. name: "月预测发电量",
  277. value: 98.62,
  278. total: 100,
  279. },
  280. ],
  281. tableData: {
  282. column: [
  283. {
  284. name: "标题",
  285. field: "v1",
  286. is_num: false,
  287. is_light: false,
  288. },
  289. {
  290. name: "标题",
  291. field: "v2",
  292. is_num: false,
  293. is_light: false,
  294. },
  295. {
  296. name: "标题",
  297. field: "v3",
  298. width: "150px",
  299. is_num: false,
  300. is_light: false,
  301. },
  302. {
  303. name: "标题",
  304. field: "v4",
  305. is_num: false,
  306. is_light: false,
  307. },
  308. ],
  309. data: [
  310. {
  311. v1: "内容内容",
  312. v2: "内容内容",
  313. v3: "内容内容内容内容内容",
  314. v4: "内容内容",
  315. is_light: false,
  316. },
  317. {
  318. v1: "内容内容",
  319. v2: "内容内容",
  320. v3: "内容内容内容内容内容",
  321. v4: "内容内容",
  322. is_light: false,
  323. },
  324. {
  325. v1: "内容内容",
  326. v2: "内容内容",
  327. v3: "内容内容内容内容内容",
  328. v4: "内容内容",
  329. is_light: false,
  330. },
  331. {
  332. v1: "内容内容",
  333. v2: "内容内容",
  334. v3: "内容内容内容内容内容",
  335. v4: "内容内容",
  336. is_light: false,
  337. },
  338. ],
  339. },
  340. sandTime: "00:00:00",
  341. sandDate: "0000年00月00日 星期日",
  342. };
  343. },
  344. // 函数
  345. methods: {
  346. when: function() {
  347. this.showPanel = true;
  348. },
  349. exchange: function () {
  350. this.exchangeBtn = !this.exchangeBtn;
  351. },
  352. initDateTime: function () {
  353. const days = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
  354. const setDateTime = () => {
  355. let myDate = new Date();
  356. let year = myDate.getFullYear();
  357. let month = myDate.getMonth() + 1;
  358. month = month < 10 ? `0${month}` : month;
  359. let day = myDate.getDate();
  360. day = day < 10 ? `0${day}` : day;
  361. let xq = days[myDate.getDay()];
  362. let hour = myDate.getHours();
  363. let minute = myDate.getMinutes();
  364. minute = minute < 10 ? `0${minute}` : minute;
  365. let second = myDate.getSeconds();
  366. second = second < 10 ? `0${second}` : second;
  367. this.sandTime = `${hour}:${minute}:${second}`;
  368. this.sandDate = `${year}年${month}月${day}日 ${xq}`;
  369. window.requestAnimationFrame(setDateTime);
  370. };
  371. setDateTime();
  372. },
  373. },
  374. // 生命周期钩子
  375. beforeCreate() {
  376. // 创建前
  377. },
  378. created() {
  379. // 创建后
  380. },
  381. beforeMount() {
  382. // 渲染前
  383. },
  384. mounted() {
  385. // 渲染后
  386. this.initDateTime();
  387. },
  388. beforeUpdate() {
  389. // 数据更新前
  390. },
  391. updated() {
  392. // 数据更新后
  393. },
  394. };
  395. </script>
  396. <style lang="less">
  397. .sand-table {
  398. width: 100%;
  399. height: 91.667vh;
  400. position: relative;
  401. .com-panel-sand {
  402. background: #53626826;
  403. padding: 0 1.481vh 1.481vh 1.481vh;
  404. border-top: 1px solid #15a952;
  405. position: relative;
  406. // width: 18.519vh;
  407. &::after {
  408. content: "";
  409. position: absolute;
  410. width: 5px;
  411. height: 5px;
  412. background: #15a952;
  413. right: -2.5px;
  414. top: -2.5px;
  415. }
  416. .com-panel-sand-header {
  417. text-align: left;
  418. position: relative;
  419. padding: 0.833vh 0;
  420. border-bottom: 1px solid #15a95266;
  421. .sand-time {
  422. color: #15A952;
  423. font-weight: 400;
  424. font-size: 24px;
  425. }
  426. .sand-date {
  427. font-size: 12px;
  428. font-weight: 400;
  429. color: #FFFFFF;
  430. }
  431. &::after,
  432. &::before {
  433. content: "";
  434. position: absolute;
  435. bottom: -1px;
  436. width: 15px;
  437. height: 1px;
  438. background: #15a952;
  439. }
  440. &::after {
  441. left: 0;
  442. }
  443. &::before {
  444. right: 0;
  445. }
  446. .com-panel-sand-sub-title {
  447. position: absolute;
  448. right: 0;
  449. top: 0.833vh;
  450. }
  451. }
  452. .weather-box {
  453. .weather-item {
  454. display: flex;
  455. align-items: center;
  456. margin-top: 16px;
  457. .weather-icon {
  458. margin-right: 12px;
  459. }
  460. }
  461. }
  462. }
  463. .i3dback {
  464. position: fixed;
  465. z-index: -1;
  466. width: 100vw;
  467. height: 100vh;
  468. top: 0;
  469. left: 0;
  470. }
  471. .i3dcloud {
  472. position: absolute;
  473. z-index: 2;
  474. width: 100vw;
  475. height: 100vh;
  476. top: 0;
  477. left: 0;
  478. }
  479. .left-panel {
  480. width: 36.852vh;
  481. }
  482. .right-panel {
  483. width: 36.852vh;
  484. }
  485. .three-model-layer {
  486. position: absolute;
  487. width: 100%;
  488. height: 100%;
  489. z-index: 1;
  490. }
  491. .sand-table-left {
  492. position: absolute;
  493. left: 0;
  494. top: 0;
  495. z-index: 2;
  496. }
  497. .sand-table-right {
  498. position: absolute;
  499. right: 0;
  500. top: 0;
  501. z-index: 2;
  502. }
  503. .sand-table-bottom {
  504. position: absolute;
  505. left: 18vh;
  506. bottom: 0;
  507. z-index: 2;
  508. display: flex;
  509. .stb-chart-panel {
  510. background: #53626826;
  511. margin-right: 4px;
  512. padding: 0 16px;
  513. height: 64px;
  514. }
  515. .stb-count-panel {
  516. margin: 0 16px;
  517. display: flex;
  518. height: 64px;
  519. align-items: center;
  520. .stb-count-panel-icon {
  521. width: 37px;
  522. height: 37px;
  523. background: #5362684D;
  524. position: relative;
  525. display: flex;
  526. align-items: center;
  527. justify-content: center;
  528. font-size: 20px;
  529. color: #94A4AB;
  530. &::after,
  531. &::before {
  532. content: '';
  533. position: absolute;
  534. width: 3px;
  535. height: 3px;
  536. background: #15A952;
  537. top: 17px;
  538. }
  539. &::after {
  540. left: -3px;
  541. }
  542. &::before {
  543. right: -3px;
  544. }
  545. }
  546. }
  547. }
  548. .pre-img-box {
  549. display: flex;
  550. align-items: center;
  551. justify-content: center;
  552. margin-top: 0.556vh;
  553. padding: 0;
  554. .pre-img {
  555. width: 98%;
  556. }
  557. }
  558. .person-info-box {
  559. display: flex;
  560. .header {
  561. width: 75px;
  562. }
  563. }
  564. .table {
  565. width: calc(100% + 2.963vh);
  566. margin-left: -1.481vh;
  567. margin-bottom: -1.481vh;
  568. .com-table thead tr th,
  569. .com-table tr td {
  570. padding: 0.556vh 0;
  571. }
  572. }
  573. .exchange {
  574. cursor: pointer;
  575. }
  576. }
  577. </style>