SandTable_old.vue 9.7 KB

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