index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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. <div>
  7. {{ fieldInfo.fieldName }}位于{{ fieldInfo.provinceName
  8. }}{{ fieldInfo.cityName }}
  9. ,海拔高度为
  10. <span class="headerMessage"> {{ fieldInfo.elevationHeight }} </span>
  11. ,所在经纬度为经度
  12. <span class="headerMessage"> {{ fieldInfo.longitude }} </span>
  13. ,纬度
  14. <span class="headerMessage">{{ fieldInfo.latitude }} </span>。
  15. </div>
  16. <div>
  17. 该风电场由大唐研究院管理,风场总容量为
  18. <span class="headerMessage"
  19. >{{ fieldInfo.ratedCapacityNumber }} MW
  20. </span>
  21. ,共安装
  22. <span class="headerMessage">{{ fieldInfo.engineCount }} 台</span>
  23. 风机,使用的机型为
  24. <span class="headerMessage">
  25. {{
  26. fieldInfo.engineMillTypes && fieldInfo.engineMillTypes.join(",")
  27. }}
  28. </span>
  29. </div>
  30. <div>
  31. 分析数据时间跨度为2025年1月20日至2025年2月20日,分析完成时间为2025年1月20日10:10:10。数据分析人
  32. <span class="headerMessage"> {{ analysisInfo.updateByName }}</span
  33. >。
  34. </div>
  35. </div>
  36. </div>
  37. <div class="content">
  38. <div class="left">
  39. <div class="box-content-min">
  40. <h4>完成分析类型:</h4>
  41. <template
  42. v-if="analysisInfo && analysisInfo.analysisTypes?.length > 0"
  43. >
  44. <div class="completeAssetssType">
  45. <el-tag
  46. v-for="analysis in analysisInfo.analysisTypes"
  47. :key="analysis.analysisTypeName"
  48. type="warning"
  49. >{{ analysis.analysisTypeName }}
  50. </el-tag>
  51. </div>
  52. </template>
  53. <el-empty v-else description="暂无完成分析类型"></el-empty>
  54. </div>
  55. <div class="box-content-min">
  56. <h4>分析完成机组:</h4>
  57. <div
  58. class="analysisCompletionUnit"
  59. v-if="analysisInfo && analysisInfo.windEngineGroups?.length > 0"
  60. >
  61. <div
  62. class="itemAnalysisCompletionUnit"
  63. v-for="itemData in analysisInfo.windEngineGroups"
  64. :key="itemData.engineCode"
  65. >
  66. <SvgIcons
  67. name="WindPower3"
  68. class="WindPower3"
  69. width="40px"
  70. height="42px"
  71. color="#222"
  72. ></SvgIcons>
  73. <span>{{ itemData.engineName }}#机组</span>
  74. </div>
  75. </div>
  76. <el-empty v-else description="暂无分析完成机组"></el-empty>
  77. </div>
  78. </div>
  79. <div class="right">
  80. <Map :batchCode="initBatchCode" :fieldCode="fieldInfo.fieldCode"></Map>
  81. </div>
  82. </div>
  83. </el-card>
  84. </template>
  85. <script>
  86. import Map from "../map/index.vue";
  87. import { getFieldInfo } from "@/api/overview";
  88. import { getWindEngineGroup } from "@/api/ledger";
  89. export default {
  90. name: "AnalysisInformation",
  91. components: {
  92. Map,
  93. },
  94. props: {
  95. initBatchCode: {
  96. default: "",
  97. type: String,
  98. },
  99. },
  100. data() {
  101. return {
  102. fieldInfo: {
  103. fieldCode: "",
  104. }, //风场信息
  105. fieldCode: "", //风场编号
  106. analysisInfo: {}, //分析类型编号
  107. activeNames: ["1", "2", "3"],
  108. data: [
  109. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  110. ],
  111. };
  112. },
  113. watch: {
  114. initBatchCode(newVal, oldVal) {
  115. console.log(newVal, oldVal, "分析信息内容更新");
  116. this.getFieldInfoMess();
  117. },
  118. },
  119. mounted() {
  120. if (this.$route.query.batchCode) {
  121. this.initBatchCode = this.$route.query.batchCode;
  122. }
  123. if (this.$route.query.fieldCode) {
  124. this.fieldInfo.fieldCode = this.$route.query.fieldCode;
  125. }
  126. },
  127. created() {
  128. this.getFieldInfoMess();
  129. },
  130. methods: {
  131. async getWindEngList() {
  132. this.loading = true;
  133. try {
  134. const res = await getWindEngineGroup({
  135. engineCode: this.engineCode,
  136. });
  137. this.loading = false;
  138. this.windDetail = res.data;
  139. } catch (error) {
  140. this.loading = false;
  141. console.error(error);
  142. }
  143. },
  144. //获取分析信息
  145. async getFieldInfoMess() {
  146. //分析详情
  147. try {
  148. const res = await getFieldInfo({ batchCode: this.initBatchCode });
  149. if (res.code === 200) {
  150. this.fieldInfo = res.data.fieldInfo; //风场信息
  151. this.analysisInfo = res.data.analysisInfo; //分析类型编号
  152. }
  153. } catch (err) {}
  154. },
  155. handleChange(val) {
  156. console.log(val);
  157. },
  158. },
  159. };
  160. </script>
  161. <style scoped lang="scss">
  162. .completeAssetssType {
  163. display: flex;
  164. flex-wrap: wrap;
  165. .el-tag {
  166. margin-right: 10px;
  167. margin-bottom: 10px;
  168. }
  169. ::v-deep .el-tag--warning {
  170. background-color: #fdf6ec !important;
  171. border-color: #faecd8 !important;
  172. color: #e6a23c !important;
  173. }
  174. }
  175. .el-card__body {
  176. width: 100%;
  177. height: 100%;
  178. // margin-bottom: 20px !important;
  179. }
  180. .content {
  181. width: 100%;
  182. display: flex;
  183. justify-content: space-between;
  184. align-items: flex-start;
  185. /* 上对齐 */
  186. height: 100%;
  187. /* 确保内容区域有高度 */
  188. }
  189. .left {
  190. width: 60%;
  191. // flex: 1;
  192. .box-content-min {
  193. padding: 10px;
  194. border-bottom: 1px solid #ebeef5;
  195. color: #303133;
  196. h4 {
  197. color: #303133;
  198. // border-bottom: 1px solid #ebeef5;
  199. font-size: 13px;
  200. font-weight: 500;
  201. margin-bottom: 10px;
  202. }
  203. }
  204. .analysisCompletionUnit {
  205. display: flex;
  206. flex-wrap: wrap;
  207. margin: 20px 0;
  208. .itemAnalysisCompletionUnit {
  209. text-align: center;
  210. margin-bottom: 10px;
  211. border: #eaeef6 solid 1px;
  212. margin-right: 10px;
  213. border-radius: 10px;
  214. padding: 10px 5px;
  215. .WindPower3 {
  216. padding: 10px 5px;
  217. text-align: center;
  218. }
  219. }
  220. }
  221. }
  222. .right {
  223. width: 40%;
  224. height: 100%;
  225. /* 确保容器高度为100% */
  226. // flex: 1;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. }
  231. .right .map-ditu {
  232. width: 100%;
  233. /* 设置地图的宽度 */
  234. height: 60vh;
  235. border-radius: 90px;
  236. /* 设置地图的高度 */
  237. }
  238. .box-card {
  239. width: 100%;
  240. height: 100%;
  241. overflow-y: scroll;
  242. .box-header {
  243. padding: 10px;
  244. border-bottom: 1px solid #ebeef5;
  245. color: #303133;
  246. h4 {
  247. color: #303133;
  248. font-size: 13px;
  249. font-weight: 500;
  250. margin-bottom: 10px;
  251. }
  252. }
  253. .box-header-min {
  254. padding: 10px;
  255. font-size: 14px;
  256. color: #606266;
  257. line-height: 40px;
  258. .headerMessage {
  259. font-size: 16px;
  260. }
  261. }
  262. }
  263. </style>