SandTable.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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. <PanelSand class="left-panel" title="气象预测" subTitle="AM10:52 实况">
  9. <weather class="pd-t-16" />
  10. </PanelSand>
  11. <PanelSand class="left-panel mg-t-16" title="等级评估">
  12. <RankTable :data="levelTableData"></RankTable>
  13. </PanelSand>
  14. <PanelSand class="left-panel mg-t-16" title="等级评估">
  15. <RankTable :data="levelTableData"></RankTable>
  16. </PanelSand>
  17. <PanelSandToolbar class="left-panel mg-t-16" title="部件">
  18. <template v-slot:tools>
  19. <div class="exchange" @click="exchange1">
  20. <span :class="exchangeBtn1 ? 'gray' : 'green'">次数</span>
  21. <i class="green fa fa-exchange mg-l-8 mg-r-8"></i>
  22. <span :class="exchangeBtn1 ? 'green' : 'gray'">库存</span>
  23. </div>
  24. </template>
  25. <template v-slot:default>
  26. <RadarPieChart height="20.6vh" />
  27. </template>
  28. </PanelSandToolbar>
  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 class="sand-table-bottom" v-if="showPanel">
  91. <Ppanel title="利用小时"></Ppanel>
  92. <Ppanel title="设备可利用率" class="stb-p"></Ppanel>
  93. <Ppanel title="MTBF" class="stb-p"></Ppanel>
  94. <Ppanel title="MTTR" class="stb-p"></Ppanel>
  95. <Ppanel title="MTTF" class="stb-p"></Ppanel>
  96. </div>
  97. </div>
  98. </template>
  99. <script>
  100. import ThreeModel1 from "./component/ThreeModel1.vue";
  101. import PanelSand from "@com/coms/panel/panel-sand.vue";
  102. import PanelSandToolbar from "@com/coms/panel/panel-sand-toolbar.vue";
  103. import Weather from "./component/weather.vue";
  104. import StBack from "./component/st-back.vue";
  105. import Table from "@com/coms/table/table.vue";
  106. import RankTable from "./component/rank-table.vue";
  107. import Ppanel from "./component/p-panel.vue";
  108. import RadarPieChart from "@com/chart/pie/radar-pie-chart.vue";
  109. export default {
  110. // 名称
  111. name: "SandTable",
  112. // 使用组件
  113. components: {
  114. ThreeModel1,
  115. PanelSand,
  116. PanelSandToolbar,
  117. Weather,
  118. Table,
  119. RadarPieChart,
  120. StBack,
  121. RankTable,
  122. Ppanel,
  123. },
  124. // 数据
  125. data() {
  126. return {
  127. videoShow: true,
  128. showPanel: false,
  129. exchangeBtn: false,
  130. exchangeBtn1: false,
  131. ForecastPower: [
  132. {
  133. name: "今日预测电量",
  134. value: 103.62,
  135. total: 150,
  136. },
  137. {
  138. name: "月预测发电量",
  139. value: 98.62,
  140. total: 100,
  141. },
  142. ],
  143. tableData: {
  144. column: [
  145. {
  146. name: "标题",
  147. field: "v1",
  148. is_num: false,
  149. is_light: false,
  150. },
  151. {
  152. name: "标题",
  153. field: "v2",
  154. is_num: false,
  155. is_light: false,
  156. },
  157. {
  158. name: "标题",
  159. field: "v3",
  160. width: "150px",
  161. is_num: false,
  162. is_light: false,
  163. },
  164. {
  165. name: "标题",
  166. field: "v4",
  167. is_num: false,
  168. is_light: false,
  169. },
  170. ],
  171. data: [
  172. {
  173. v1: "内容内容",
  174. v2: "内容内容",
  175. v3: "内容内容内容内容内容",
  176. v4: "内容内容",
  177. is_light: false,
  178. },
  179. {
  180. v1: "内容内容",
  181. v2: "内容内容",
  182. v3: "内容内容内容内容内容",
  183. v4: "内容内容",
  184. is_light: false,
  185. },
  186. {
  187. v1: "内容内容",
  188. v2: "内容内容",
  189. v3: "内容内容内容内容内容",
  190. v4: "内容内容",
  191. is_light: false,
  192. },
  193. {
  194. v1: "内容内容",
  195. v2: "内容内容",
  196. v3: "内容内容内容内容内容",
  197. v4: "内容内容",
  198. is_light: false,
  199. },
  200. ],
  201. },
  202. levelTableData: {
  203. column: [{
  204. name: "编号",
  205. field: "no",
  206. },{
  207. name: "等级",
  208. field: "level",
  209. },{
  210. name: "分数",
  211. field: "score",
  212. }],
  213. data: [{
  214. no: "MHS_A01",
  215. level: "AAA",
  216. score: 98,
  217. },{
  218. no: "MHS_A02",
  219. level: "AAA",
  220. score: 95,
  221. },{
  222. no: "MHS_A01",
  223. level: "AA",
  224. score: 94,
  225. },{
  226. no: "MHS_A02",
  227. level: "BB",
  228. score: 92,
  229. },{
  230. no: "MHS_A01",
  231. level: "BB",
  232. score: 90,
  233. }],
  234. },
  235. };
  236. },
  237. // 函数
  238. methods: {
  239. when: function() {
  240. this.showPanel = true;
  241. },
  242. exchange: function () {
  243. this.exchangeBtn = !this.exchangeBtn;
  244. },
  245. exchange1: function () {
  246. this.exchangeBtn1 = !this.exchangeBtn1;
  247. },
  248. },
  249. // 生命周期钩子
  250. beforeCreate() {
  251. // 创建前
  252. },
  253. created() {
  254. // 创建后
  255. },
  256. beforeMount() {
  257. // 渲染前
  258. },
  259. mounted() {
  260. // 渲染后
  261. },
  262. beforeUpdate() {
  263. // 数据更新前
  264. },
  265. updated() {
  266. // 数据更新后
  267. },
  268. };
  269. </script>
  270. <style lang="less">
  271. .sand-table {
  272. width: 100%;
  273. height: 91.667vh;
  274. position: relative;
  275. .i3dback {
  276. position: fixed;
  277. z-index: -1;
  278. width: 100vw;
  279. height: 100vh;
  280. top: 0;
  281. left: 0;
  282. }
  283. .i3dcloud {
  284. position: absolute;
  285. z-index: 2;
  286. width: 100vw;
  287. height: 100vh;
  288. top: 0;
  289. left: 0;
  290. }
  291. .left-panel {
  292. width: 360px;
  293. }
  294. .right-panel {
  295. width: 36.852vh;
  296. }
  297. .three-model-layer {
  298. position: absolute;
  299. width: 100%;
  300. height: 100%;
  301. z-index: 1;
  302. }
  303. .sand-table-left {
  304. position: absolute;
  305. left: 0;
  306. top: 0;
  307. z-index: 2;
  308. }
  309. .sand-table-right {
  310. position: absolute;
  311. right: 0;
  312. top: 0;
  313. z-index: 2;
  314. }
  315. .sand-table-bottom {
  316. position: absolute;
  317. right: calc(50vw - 50.463vh);
  318. bottom: 0;
  319. z-index: 2;
  320. display: flex;
  321. .stb-p {
  322. margin-left: 0.926vh;
  323. }
  324. }
  325. .pre-img-box {
  326. display: flex;
  327. align-items: center;
  328. justify-content: center;
  329. margin-top: 0.556vh;
  330. padding: 0;
  331. .pre-img {
  332. width: 95%;
  333. height: 8.657vh;
  334. }
  335. }
  336. .person-info-box {
  337. display: flex;
  338. .header {
  339. width: 75px;
  340. }
  341. }
  342. .table {
  343. width: calc(100% + 2.963vh);
  344. margin-left: -1.481vh;
  345. margin-bottom: -1.481vh;
  346. .com-table thead tr th,
  347. .com-table tr td {
  348. padding: 0.556vh 0;
  349. }
  350. }
  351. .exchange {
  352. cursor: pointer;
  353. }
  354. }
  355. </style>