index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <template>
  2. <el-card shadow="always" class="box-card">
  3. <div class="box-header">
  4. <h4>分析介绍:</h4>
  5. <div class="box-header-min">
  6. <el-descriptions>
  7. <el-descriptions-item label="分析主题">{{
  8. analysisInfo.analysisName
  9. }}</el-descriptions-item>
  10. <el-descriptions-item label="分析人">{{
  11. analysisInfo.updateByName
  12. }}</el-descriptions-item>
  13. <el-descriptions-item label="分析简述">{{
  14. analysisInfo.sketch
  15. }}</el-descriptions-item>
  16. <el-descriptions-item label="分析创建时间">
  17. {{ analysisInfo.createTime }}
  18. </el-descriptions-item>
  19. <el-descriptions-item label="分析开始执行时间">{{
  20. analysisInfo.analysisStartTime
  21. }}</el-descriptions-item>
  22. <el-descriptions-item label="分析完成时间">{{
  23. analysisInfo.analysisEndTime
  24. }}</el-descriptions-item>
  25. </el-descriptions>
  26. <!-- <div v-if="analysisInfo.dataEndTime || analysisInfo.dataStartTime">
  27. 分析数据时间跨度为{{ analysisInfo.dataEndTime }}至{{
  28. analysisInfo.dataStartTime
  29. }}。
  30. </div>
  31. <div v-if="analysisInfo.analysisFinishTime">
  32. 分析完成时间为{{ analysisInfo.analysisFinishTime }}。数据分析人
  33. <span class="headerMessage">{{ analysisInfo.updateByName }}</span
  34. >。
  35. </div> -->
  36. </div>
  37. </div>
  38. <div class="box-header">
  39. <h4>风场信息:</h4>
  40. <div class="box-header-min">
  41. <div>
  42. {{ fieldInfo.fieldName }}位于{{ fieldInfo.provinceName
  43. }}{{ fieldInfo.cityName }}
  44. ,海拔高度为
  45. <span class="headerMessage"> {{ fieldInfo.elevationHeight }} </span>米
  46. ,所在经纬度为经度
  47. <span class="headerMessage"> {{ fieldInfo.longitude }} </span>° ,纬度
  48. <span class="headerMessage">{{ fieldInfo.latitude }} </span>°
  49. </div>
  50. <div>
  51. 该风电场由{{ fieldInfo.companyName }}管理,风场总容量为
  52. <span class="headerMessage"
  53. >{{ fieldInfo.ratedCapacityNumber }} MW
  54. </span>
  55. ,共安装
  56. <span class="headerMessage">{{ fieldInfo.engineCount }} 台</span>
  57. 风机,使用的机型为
  58. <span class="headerMessage">
  59. {{
  60. fieldInfo.engineMillTypes && fieldInfo.engineMillTypes.join(",")
  61. }}
  62. </span>
  63. </div>
  64. <div v-if="analysisInfo.dataEndTime || analysisInfo.dataStartTime">
  65. 分析数据时间跨度为{{ analysisInfo.dataStartTime }}至{{
  66. analysisInfo.dataEndTime
  67. }}。
  68. </div>
  69. <div v-if="analysisInfo.analysisFinishTime">
  70. 分析完成时间为{{ analysisInfo.analysisFinishTime }}。数据分析人
  71. <span class="headerMessage">{{ analysisInfo.updateByName }}</span
  72. >。
  73. </div>
  74. </div>
  75. </div>
  76. <div class="content">
  77. <div class="left">
  78. <div class="box-content-min">
  79. <h4>分析完成机组:</h4>
  80. <div
  81. class="analysisCompletionUnit"
  82. v-if="analysisInfo && analysisInfo.windEngineGroups?.length > 0"
  83. >
  84. <div
  85. class="itemAnalysisCompletionUnit"
  86. v-for="itemData in analysisInfo.windEngineGroups"
  87. :key="itemData.engineCode"
  88. >
  89. <el-popover
  90. placement="right"
  91. width="600"
  92. trigger="hover"
  93. @show="getEngineInfo(itemData.engineCode)"
  94. >
  95. <el-descriptions class="margin-top" size="mini" border>
  96. <!-- :column="3" -->
  97. <el-descriptions-item>
  98. <template slot="label"> 风机名称 </template>
  99. {{ windDetail.engineName }}
  100. </el-descriptions-item>
  101. <!-- <el-descriptions-item>
  102. <template slot="label"> 机型编号 </template>
  103. {{ windDetail.millTypeCode }}
  104. </el-descriptions-item> -->
  105. <el-descriptions-item>
  106. <template slot="label"> 额定容量 </template>
  107. {{ windDetail.ratedCapacity }}/KW
  108. </el-descriptions-item>
  109. <el-descriptions-item>
  110. <template slot="label"> 轮毂高度 </template>
  111. {{ windDetail.hubHeight }}/米
  112. </el-descriptions-item>
  113. <el-descriptions-item>
  114. <template slot="label"> 海拔高度 </template>
  115. {{ windDetail.elevationHeight }}/米
  116. </el-descriptions-item>
  117. <el-descriptions-item>
  118. <template slot="label"> 经度 </template>
  119. {{ windDetail.longitude }}
  120. </el-descriptions-item>
  121. <el-descriptions-item>
  122. <template slot="label"> 纬度 </template>
  123. {{ windDetail.latitude }}
  124. </el-descriptions-item>
  125. <el-descriptions-item>
  126. <template slot="label"> 是否标杆风机 </template>
  127. {{ windDetail.sightcing == 1 ? "是" : "否" }}
  128. </el-descriptions-item>
  129. <el-descriptions-item>
  130. <template slot="label"> 额定风速 </template>
  131. {{ windDetail.rated_wind_speed }} m/s
  132. </el-descriptions-item>
  133. <el-descriptions-item>
  134. <template slot="label"> 切入风速 </template>
  135. {{ windDetail.ratedCutInWindspeed }} m/s
  136. </el-descriptions-item>
  137. <el-descriptions-item>
  138. <template slot="label"> 切出风速 </template>
  139. {{ windDetail.ratedCutOutWindspeed }} m/s
  140. </el-descriptions-item>
  141. </el-descriptions>
  142. <div slot="reference">
  143. <SvgIcons
  144. name="WindPower3"
  145. class="WindPower3"
  146. width="40px"
  147. height="42px"
  148. color="#222"
  149. ></SvgIcons>
  150. <span>{{ itemData.engineName }}机组</span>
  151. </div>
  152. <!-- <el-button>click 激活</el-button> -->
  153. </el-popover>
  154. </div>
  155. </div>
  156. <el-empty v-else description="暂无分析完成机组"></el-empty>
  157. </div>
  158. </div>
  159. <div class="right">
  160. <Map :batchCode="initBatchCode" :fieldCode="fieldInfo.fieldCode"></Map>
  161. </div>
  162. </div>
  163. <div class="box-min">
  164. <h4>完成分析类型:</h4>
  165. <template v-if="analysisInfo && analysisInfo.analysisTypes?.length > 0">
  166. <div
  167. class="analysisTypes"
  168. v-for="analysis in analysisInfo.analysisTypes"
  169. :key="analysis.id"
  170. >
  171. <h6>{{ analysis.typeName }}:</h6>
  172. <div class="completeAssetssType">
  173. <el-tag
  174. v-for="analysisChild in analysis.children"
  175. :key="analysisChild.id"
  176. type="warning"
  177. >{{ analysisChild.typeName }}
  178. </el-tag>
  179. </div>
  180. </div>
  181. </template>
  182. <el-empty v-else description="暂无完成分析类型"></el-empty>
  183. </div>
  184. </el-card>
  185. </template>
  186. <script>
  187. import Map from "../map/index.vue";
  188. import { getFieldInfo } from "@/api/overview";
  189. import { getWindEngineGroup } from "@/api/ledger";
  190. import { aW } from "plotly.js-dist";
  191. export default {
  192. name: "AnalysisInformation",
  193. components: {
  194. Map,
  195. },
  196. props: {
  197. initBatchCode: {
  198. default: "",
  199. type: String,
  200. },
  201. },
  202. data() {
  203. return {
  204. fieldInfo: {
  205. fieldCode: "",
  206. }, //风场信息
  207. fieldCode: "", //风场编号
  208. analysisInfo: {}, //分析类型编号
  209. activeNames: ["1", "2", "3"],
  210. data: [
  211. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  212. ],
  213. windDetail: {},
  214. };
  215. },
  216. watch: {
  217. initBatchCode(newVal, oldVal) {
  218. if (newVal) {
  219. this.getFieldInfoMess();
  220. }
  221. },
  222. },
  223. mounted() {
  224. if (this.$route.query.batchCode) {
  225. this.initBatchCode = this.$route.query.batchCode;
  226. }
  227. if (this.$route.query.fieldCode) {
  228. this.fieldInfo.fieldCode = this.$route.query.fieldCode;
  229. }
  230. },
  231. created() {
  232. if (this.initBatchCode !== "") {
  233. this.getFieldInfoMess();
  234. }
  235. },
  236. methods: {
  237. //获取风机信息
  238. async getEngineInfo(engineCode) {
  239. console.log(engineCode, "engineCode");
  240. await getWindEngineGroup({ engineCode }).then((res) => {
  241. console.log(res, "res");
  242. if (res.code === 200) {
  243. this.windDetail = res.data;
  244. }
  245. });
  246. },
  247. async getWindEngList() {
  248. this.loading = true;
  249. try {
  250. const res = await getWindEngineGroup({
  251. engineCode: this.engineCode,
  252. });
  253. this.loading = false;
  254. this.windDetail = res.data;
  255. } catch (error) {
  256. this.loading = false;
  257. console.error(error);
  258. }
  259. },
  260. //获取分析信息
  261. async getFieldInfoMess() {
  262. //分析详情
  263. try {
  264. const res = await getFieldInfo({ batchCode: this.initBatchCode });
  265. if (res.code === 200) {
  266. this.fieldInfo = res.data.fieldInfo; //风场信息
  267. this.analysisInfo = res.data.analysisInfo; //分析类型编号
  268. }
  269. } catch (err) {}
  270. },
  271. handleChange(val) {
  272. console.log(val);
  273. },
  274. },
  275. };
  276. </script>
  277. <style scoped lang="scss">
  278. .completeAssetssType {
  279. display: flex;
  280. flex-wrap: wrap;
  281. .el-tag {
  282. margin-right: 10px;
  283. margin-bottom: 10px;
  284. }
  285. ::v-deep .el-tag--warning {
  286. background-color: #0080803a !important;
  287. border-color: #0080803a !important;
  288. color: #008080 !important;
  289. }
  290. }
  291. .el-card__body {
  292. width: 100%;
  293. height: 100%;
  294. // margin-bottom: 20px !important;
  295. }
  296. .content {
  297. width: 100%;
  298. display: flex;
  299. justify-content: space-between;
  300. // align-items: flex-start;
  301. /* 上对齐 */
  302. height: 100%;
  303. border-bottom: 1px solid #ebeef5;
  304. /* 确保内容区域有高度 */
  305. }
  306. .box-min {
  307. padding: 10px;
  308. color: #303133;
  309. h4 {
  310. color: #303133;
  311. // border-bottom: 1px solid #ebeef5;
  312. font-size: 13px;
  313. font-weight: 500;
  314. margin-bottom: 10px;
  315. }
  316. ::v-deep .analysisTypes {
  317. h6 {
  318. font-weight: 500 !important;
  319. font-size: 12px;
  320. margin: 5px 0;
  321. }
  322. }
  323. .analysisTypes:last-child {
  324. margin-bottom: 50px;
  325. }
  326. }
  327. .left {
  328. width: 70%;
  329. // flex: 1;
  330. .box-content-min {
  331. padding: 10px;
  332. // border-bottom: 1px solid #ebeef5;
  333. color: #303133;
  334. h4 {
  335. color: #303133;
  336. // border-bottom: 1px solid #ebeef5;
  337. font-size: 13px;
  338. font-weight: 500;
  339. margin-bottom: 10px;
  340. }
  341. }
  342. .analysisCompletionUnit {
  343. display: flex;
  344. flex-wrap: wrap;
  345. margin: 20px 0;
  346. padding-bottom: 10px;
  347. .itemAnalysisCompletionUnit {
  348. text-align: center;
  349. margin-bottom: 10px;
  350. border: #eaeef6 solid 1px;
  351. margin-right: 10px;
  352. border-radius: 10px;
  353. padding: 10px 5px;
  354. span {
  355. font-size: 12px;
  356. }
  357. .WindPower3 {
  358. padding: 10px 5px;
  359. text-align: center;
  360. }
  361. }
  362. }
  363. }
  364. .right {
  365. width: 30%;
  366. height: 100%;
  367. /* 确保容器高度为100% */
  368. // flex: 1;
  369. display: flex;
  370. justify-content: center;
  371. align-items: center;
  372. }
  373. .right .map-ditu {
  374. width: 100%;
  375. /* 设置地图的宽度 */
  376. height: 40vh;
  377. border-radius: 90px;
  378. /* 设置地图的高度 */
  379. }
  380. .box-card {
  381. width: 100%;
  382. height: 100%;
  383. overflow-y: scroll;
  384. /* 滚动条整体样式 */
  385. &::-webkit-scrollbar {
  386. width: 6px; /* 滚动条宽度 */
  387. }
  388. /* 滚动条轨道 */
  389. &::-webkit-scrollbar-track {
  390. background: #f5f7fa;
  391. border-radius: 3px;
  392. }
  393. /* 滚动条滑块 */
  394. &::-webkit-scrollbar-thumb {
  395. background: #c0c4cc;
  396. border-radius: 3px;
  397. }
  398. /* 滚动条滑块悬停时 */
  399. &::-webkit-scrollbar-thumb:hover {
  400. background: #909399;
  401. }
  402. .box-header {
  403. padding: 10px;
  404. border-bottom: 1px solid #ebeef5;
  405. color: #303133;
  406. h4 {
  407. color: #303133;
  408. font-size: 13px;
  409. font-weight: 500;
  410. // margin-bottom: 10px;
  411. }
  412. }
  413. .box-header-min {
  414. padding: 10px;
  415. font-size: 14px;
  416. color: #606266;
  417. line-height: 22px;
  418. .headerMessage {
  419. font-size: 16px;
  420. }
  421. }
  422. }
  423. </style>