index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. <template>
  2. <el-card shadow="always" class="box-card" v-loading="loading">
  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.analysisFinishTime
  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. export default {
  191. name: "AnalysisInformation",
  192. components: {
  193. Map,
  194. },
  195. props: {
  196. initBatchCode: {
  197. default: "",
  198. type: String,
  199. },
  200. },
  201. data() {
  202. return {
  203. loading: false,
  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. await getWindEngineGroup({ engineCode }).then((res) => {
  240. if (res.code === 200) {
  241. this.windDetail = res.data;
  242. }
  243. });
  244. },
  245. async getWindEngList() {
  246. this.loading = true;
  247. try {
  248. const res = await getWindEngineGroup({
  249. engineCode: this.engineCode,
  250. });
  251. this.loading = false;
  252. this.windDetail = res.data;
  253. } catch (error) {
  254. this.loading = false;
  255. console.error(error);
  256. }
  257. },
  258. //获取分析信息
  259. async getFieldInfoMess() {
  260. //分析详情
  261. try {
  262. this.loading = true;
  263. const res = await getFieldInfo({ batchCode: this.initBatchCode });
  264. if (res.code === 200) {
  265. this.fieldInfo = res.data.fieldInfo; //风场信息
  266. this.analysisInfo = res.data.analysisInfo; //分析类型编号
  267. }
  268. } catch (err) {
  269. } finally {
  270. this.loading = false;
  271. }
  272. },
  273. handleChange(val) {
  274. console.log(val);
  275. },
  276. },
  277. };
  278. </script>
  279. <style scoped lang="scss">
  280. .completeAssetssType {
  281. display: flex;
  282. flex-wrap: wrap;
  283. .el-tag {
  284. margin-right: 10px;
  285. margin-bottom: 10px;
  286. }
  287. ::v-deep .el-tag--warning {
  288. background-color: #0080803a !important;
  289. border-color: #0080803a !important;
  290. color: #008080 !important;
  291. }
  292. }
  293. .el-card__body {
  294. width: 100%;
  295. height: 100%;
  296. // margin-bottom: 20px !important;
  297. }
  298. .content {
  299. width: 100%;
  300. display: flex;
  301. justify-content: space-between;
  302. // align-items: flex-start;
  303. /* 上对齐 */
  304. height: 100%;
  305. border-bottom: 1px solid #ebeef5;
  306. /* 确保内容区域有高度 */
  307. }
  308. .box-min {
  309. padding: 10px;
  310. color: #303133;
  311. h4 {
  312. color: #303133;
  313. // border-bottom: 1px solid #ebeef5;
  314. font-size: 13px;
  315. font-weight: 500;
  316. margin-bottom: 10px;
  317. }
  318. ::v-deep .analysisTypes {
  319. h6 {
  320. font-weight: 500 !important;
  321. font-size: 12px;
  322. margin: 5px 0;
  323. }
  324. }
  325. .analysisTypes:last-child {
  326. margin-bottom: 50px;
  327. }
  328. }
  329. .left {
  330. width: 70%;
  331. // flex: 1;
  332. .box-content-min {
  333. padding: 10px;
  334. // border-bottom: 1px solid #ebeef5;
  335. color: #303133;
  336. h4 {
  337. color: #303133;
  338. // border-bottom: 1px solid #ebeef5;
  339. font-size: 13px;
  340. font-weight: 500;
  341. margin-bottom: 10px;
  342. }
  343. }
  344. .analysisCompletionUnit {
  345. display: flex;
  346. flex-wrap: wrap;
  347. margin: 20px 0;
  348. padding-bottom: 10px;
  349. .itemAnalysisCompletionUnit {
  350. text-align: center;
  351. margin-bottom: 10px;
  352. border: #eaeef6 solid 1px;
  353. margin-right: 10px;
  354. border-radius: 10px;
  355. padding: 10px 5px;
  356. span {
  357. font-size: 12px;
  358. }
  359. .WindPower3 {
  360. padding: 10px 5px;
  361. text-align: center;
  362. }
  363. }
  364. }
  365. }
  366. .right {
  367. width: 30%;
  368. height: 100%;
  369. /* 确保容器高度为100% */
  370. // flex: 1;
  371. display: flex;
  372. justify-content: center;
  373. align-items: center;
  374. }
  375. .right .map-ditu {
  376. width: 100%;
  377. /* 设置地图的宽度 */
  378. height: 40vh;
  379. border-radius: 90px;
  380. /* 设置地图的高度 */
  381. }
  382. .box-card {
  383. width: 100%;
  384. height: 100%;
  385. overflow-y: scroll;
  386. /* 滚动条整体样式 */
  387. &::-webkit-scrollbar {
  388. width: 6px; /* 滚动条宽度 */
  389. }
  390. /* 滚动条轨道 */
  391. &::-webkit-scrollbar-track {
  392. background: #f5f7fa;
  393. border-radius: 3px;
  394. }
  395. /* 滚动条滑块 */
  396. &::-webkit-scrollbar-thumb {
  397. background: #c0c4cc;
  398. border-radius: 3px;
  399. }
  400. /* 滚动条滑块悬停时 */
  401. &::-webkit-scrollbar-thumb:hover {
  402. background: #909399;
  403. }
  404. .box-header {
  405. padding: 10px;
  406. border-bottom: 1px solid #ebeef5;
  407. color: #303133;
  408. h4 {
  409. color: #303133;
  410. font-size: 13px;
  411. font-weight: 500;
  412. // margin-bottom: 10px;
  413. }
  414. }
  415. .box-header-min {
  416. padding: 10px;
  417. font-size: 14px;
  418. color: #606266;
  419. line-height: 22px;
  420. .headerMessage {
  421. font-size: 16px;
  422. }
  423. }
  424. }
  425. </style>