SandTable.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div class="sand-table">
  3. <ThreeModel class="three-model-layer" @when="when"></ThreeModel>
  4. <div class="sand-table-left" v-if="showPanel">
  5. <PanelSand class="left-panel" title="板块标题" subTitle="AM10:52 实况">
  6. <weather class="pd-t-16" />
  7. </PanelSand>
  8. <PanelSand class="left-panel mg-t-16" title="板块标题">
  9. <div class="pd-t-16">
  10. <list-bar-chart-2 :list="ForecastPower" height="8vh" />
  11. </div>
  12. </PanelSand>
  13. <PanelSand class="left-panel mg-t-16" title="板块标题">
  14. <div class="pd-t-16">
  15. <div class="fdl-title">
  16. <i class="fa fa-bolt green font-md mg-r-8"></i>
  17. <span class="green font-md mg-r-16">发电量</span>
  18. <span class="white font-num font-lg mg-r-8">2834.9</span>
  19. <span class="white font-sm">亿元</span>
  20. </div>
  21. <power-plan />
  22. </div>
  23. </PanelSand>
  24. <PanelSand class="left-panel mg-t-16" title="板块标题">
  25. <power-review />
  26. </PanelSand>
  27. </div>
  28. <div class="sand-table-right" v-if="showPanel">
  29. <PanelSand class="right-panel" title="板块标题">
  30. <el-row>
  31. <el-col :span="12" class="pre-img-box">
  32. <img v-if="!videoShow" class="pre-img" :src="require('@assets/png/p1.jpg')" />
  33. <video v-if="videoShow" class="pre-img" width="179" height="100" controls>
  34. <source :src="require('@assets/png/p.mp4')" type="video/mp4">
  35. 您的浏览器不支持 video 标签。
  36. </video>
  37. </el-col>
  38. <el-col :span="12" class="pre-img-box">
  39. <img class="pre-img" :src="require('@assets/png/p2.jpg')" />
  40. </el-col>
  41. </el-row>
  42. <el-row>
  43. <el-col :span="12" class="pre-img-box">
  44. <img class="pre-img" :src="require('@assets/png/p3.jpg')" />
  45. </el-col>
  46. <el-col :span="12" class="pre-img-box">
  47. <img class="pre-img" :src="require('@assets/png/p4.jpg')" />
  48. </el-col>
  49. </el-row>
  50. <el-row>
  51. <el-col :span="12" class="pre-img-box">
  52. <img class="pre-img" :src="require('@assets/png/p5.jpg')" />
  53. </el-col>
  54. <el-col :span="12" class="pre-img-box">
  55. <img class="pre-img" :src="require('@assets/png/p6.jpg')" />
  56. </el-col>
  57. </el-row>
  58. </PanelSand>
  59. <PanelSand class="right-panel mg-t-16" title="板块标题">
  60. <div class="person-info-box mg-t-16">
  61. <img class="header mg-r-8 bg-green" :src="require('@assets/logo.png')" />
  62. <div class="person-info">
  63. <div class="green font-lg" style="font-weight: bold;">张三</div>
  64. <div class="white font-sm">
  65. <span>职务:高级检修工</span>
  66. <span class="mg-l-16">当前任务编号 000000</span>
  67. </div>
  68. <div class="white font-sm">平均检修时间 <span class="green">5</span> 小时</div>
  69. </div>
  70. </div>
  71. <div class="table mg-t-8">
  72. <Table :data="tableData" />
  73. </div>
  74. </PanelSand>
  75. <PanelSandToolbar class="right-panel mg-t-16" title="风险隐患详情">
  76. <template v-slot:tools>
  77. <div class="exchange" @click="exchange">
  78. <span :class="exchangeBtn ? 'gray' : 'green'">预警</span>
  79. <i class="green fa fa-exchange mg-l-8 mg-r-8"></i>
  80. <span :class="exchangeBtn ? 'green' : 'gray'">时长</span>
  81. </div>
  82. </template>
  83. <template v-slot:default>
  84. <RadarPieChart height="21vh" />
  85. </template>
  86. </PanelSandToolbar>
  87. </div>
  88. </div>
  89. </template>
  90. <script>
  91. import ThreeModel from "./component/ThreeModel.vue";
  92. import PanelSand from "@com/coms/panel/panel-sand.vue";
  93. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  94. import Weather from "./component/weather.vue";
  95. import ListBarChart2 from "@com/chart/bar/list-bar-chart2.vue";
  96. import PowerPlan from "./component/power-plan.vue";
  97. import PowerReview from "./component/power-review.vue";
  98. import Table from "@com/coms/table/table.vue";
  99. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  100. export default {
  101. // 名称
  102. name: "SandTable",
  103. // 使用组件
  104. components: {
  105. ThreeModel,
  106. PanelSand,
  107. PanelSandToolbar,
  108. Weather,
  109. ListBarChart2,
  110. PowerPlan,
  111. PowerReview,
  112. Table,
  113. RadarPieChart,
  114. },
  115. // 数据
  116. data() {
  117. return {
  118. videoShow: true,
  119. showPanel: false,
  120. exchangeBtn: false,
  121. ForecastPower: [
  122. {
  123. name: "今日预测电量",
  124. value: 103.62,
  125. total: 150,
  126. },
  127. {
  128. name: "月预测发电量",
  129. value: 98.62,
  130. total: 100,
  131. },
  132. ],
  133. tableData: {
  134. column: [
  135. {
  136. name: "标题",
  137. field: "v1",
  138. is_num: false,
  139. is_light: false,
  140. },
  141. {
  142. name: "标题",
  143. field: "v2",
  144. is_num: false,
  145. is_light: false,
  146. },
  147. {
  148. name: "标题",
  149. field: "v3",
  150. width: "150px",
  151. is_num: false,
  152. is_light: false,
  153. },
  154. {
  155. name: "标题",
  156. field: "v4",
  157. is_num: false,
  158. is_light: false,
  159. },
  160. ],
  161. data: [
  162. {
  163. v1: "内容内容",
  164. v2: "内容内容",
  165. v3: "内容内容内容内容内容",
  166. v4: "内容内容",
  167. is_light: false,
  168. },
  169. {
  170. v1: "内容内容",
  171. v2: "内容内容",
  172. v3: "内容内容内容内容内容",
  173. v4: "内容内容",
  174. is_light: false,
  175. },
  176. {
  177. v1: "内容内容",
  178. v2: "内容内容",
  179. v3: "内容内容内容内容内容",
  180. v4: "内容内容",
  181. is_light: false,
  182. },
  183. {
  184. v1: "内容内容",
  185. v2: "内容内容",
  186. v3: "内容内容内容内容内容",
  187. v4: "内容内容",
  188. is_light: false,
  189. },
  190. ],
  191. },
  192. };
  193. },
  194. // 函数
  195. methods: {
  196. when: function() {
  197. this.showPanel = true;
  198. },
  199. exchange: function () {
  200. this.exchangeBtn = !this.exchangeBtn;
  201. },
  202. },
  203. // 生命周期钩子
  204. beforeCreate() {
  205. // 创建前
  206. },
  207. created() {
  208. // 创建后
  209. },
  210. beforeMount() {
  211. // 渲染前
  212. },
  213. mounted() {
  214. // 渲染后
  215. },
  216. beforeUpdate() {
  217. // 数据更新前
  218. },
  219. updated() {
  220. // 数据更新后
  221. },
  222. };
  223. </script>
  224. <style lang="less">
  225. .sand-table {
  226. width: 100%;
  227. height: 91.667vh;
  228. position: relative;
  229. .left-panel {
  230. width: 36.852vh;
  231. }
  232. .right-panel {
  233. width: 36.852vh;
  234. }
  235. .three-model-layer {
  236. position: absolute;
  237. width: 100%;
  238. height: 100%;
  239. z-index: 1;
  240. }
  241. .sand-table-left {
  242. position: absolute;
  243. left: 0;
  244. top: 0;
  245. z-index: 2;
  246. }
  247. .sand-table-right {
  248. position: absolute;
  249. right: 0;
  250. top: 0;
  251. z-index: 2;
  252. }
  253. .pre-img-box {
  254. display: flex;
  255. align-items: center;
  256. justify-content: center;
  257. margin-top: 0.556vh;
  258. padding: 0;
  259. .pre-img {
  260. width: 98%;
  261. }
  262. }
  263. .person-info-box {
  264. display: flex;
  265. .header {
  266. width: 75px;
  267. }
  268. }
  269. .table {
  270. width: calc(100% + 2.963vh);
  271. margin-left: -1.481vh;
  272. margin-bottom: -1.481vh;
  273. .com-table thead tr th,
  274. .com-table tr td {
  275. padding: 0.556vh 0;
  276. }
  277. }
  278. .exchange {
  279. cursor: pointer;
  280. }
  281. }
  282. </style>