leftdata.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <template>
  2. <div class="backbone">
  3. <div class="BOX">
  4. <h3>待办任务</h3>
  5. <div style="display: flex">
  6. <div class="YC02" @click="getwgl">
  7. <strong class="texyellow">
  8. {{ onrelevance ? onrelevance : 0 }}</strong
  9. >
  10. <span>未关联任务</span>
  11. </div>
  12. <div class="YC02" @click="getwfx">
  13. <strong class="textred"> {{ abnormal ? abnormal : 0 }}</strong>
  14. <span>分析异常数</span>
  15. </div>
  16. <div class="YC03"></div>
  17. </div>
  18. <el-dialog title="未关联任务统计表" :visible.sync="glShow" width="40%">
  19. <!-- 外部容器设置最大高度和滚动条 -->
  20. <div style="max-height: 400px; overflow-y: auto">
  21. <el-table :data="glData" style="width: 100%">
  22. <el-table-column
  23. prop="fieldName"
  24. label="风场名称"
  25. width="180"
  26. ></el-table-column>
  27. <el-table-column
  28. prop="analysisName"
  29. label="分析名称"
  30. width="180"
  31. ></el-table-column>
  32. <el-table-column
  33. prop="createTime"
  34. label="创建时间"
  35. ></el-table-column>
  36. <el-table-column fixed="right" label="操作" width="100">
  37. <template slot-scope="scope">
  38. <el-button
  39. @click="handleClick(scope.row)"
  40. type="text"
  41. size="small"
  42. >编辑</el-button
  43. >
  44. </template>
  45. </el-table-column>
  46. </el-table>
  47. </div>
  48. </el-dialog>
  49. <el-dialog title="分析异常统计表" :visible.sync="YCShow" width="40%">
  50. <div style="max-height: 400px; overflow-y: auto">
  51. <el-table :data="FXData" style="width: 100%">
  52. <el-table-column prop="fieldName" label="风场名称" width="180">
  53. </el-table-column>
  54. <el-table-column prop="analysisName" label="分析名称" width="180">
  55. </el-table-column>
  56. <el-table-column prop="createTime" label="创建时间">
  57. </el-table-column>
  58. <el-table-column fixed="right" label="操作" width="100">
  59. <template slot-scope="scope">
  60. <el-button
  61. @click="YChandleClick(scope.row)"
  62. type="text"
  63. size="small"
  64. >编辑</el-button
  65. >
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. </div>
  70. </el-dialog>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. import {
  76. queryWaitTask,
  77. getAnalysisResultStateList,
  78. getAnalysisResultErrStateList,
  79. analysisResultList,
  80. } from "@/api/ledger.js";
  81. export default {
  82. // props: {
  83. // maplistArr: {
  84. // type: Object,
  85. // default: () => ({}),
  86. // },
  87. // defaultdata: {
  88. // type: Object,
  89. // default: () => ({}),
  90. // },
  91. // },
  92. data() {
  93. return {
  94. onrelevance: "",
  95. abnormal: "",
  96. glShow: false,
  97. YCShow: false,
  98. glData: [],
  99. FXData: [],
  100. };
  101. },
  102. created() {
  103. this.getbacklog();
  104. },
  105. mounted() {},
  106. methods: {
  107. getbacklog() {
  108. queryWaitTask().then((res) => {
  109. this.abnormal = res.data.errCount;
  110. this.onrelevance = res.data.uncorrelatedCount;
  111. });
  112. },
  113. getwgl() {
  114. const arr = {
  115. pageSize: 999,
  116. analysisState: -1,
  117. };
  118. analysisResultList(arr).then((res) => {
  119. this.glData = res.data.list;
  120. this.glShow = true;
  121. });
  122. },
  123. getwfx() {
  124. analysisResultList({ errState: 1 }).then((res) => {
  125. this.FXData = res.data.list;
  126. this.YCShow = true;
  127. });
  128. },
  129. handleClick(row) {
  130. const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
  131. const analysisState = -1;
  132. // 打开新窗口
  133. const newWindow = window.open(
  134. "/home/performance/assetssMag?id=195",
  135. "_blank"
  136. );
  137. // 等待窗口加载完成后发送消息
  138. newWindow.onload = () => {
  139. newWindow.postMessage({ fieldName, analysisState }, "*");
  140. };
  141. },
  142. YChandleClick(row) {
  143. const fieldName = row.fieldName; // 获取当前行的 fieldName 数据
  144. const errState = 1;
  145. // 打开新窗口
  146. const newWindow = window.open(
  147. "/home/performance/assetssMag?id=195",
  148. "_blank"
  149. );
  150. // 等待窗口加载完成后发送消息
  151. newWindow.onload = () => {
  152. newWindow.postMessage({ fieldName, errState }, "*");
  153. };
  154. },
  155. },
  156. };
  157. </script>
  158. <style lang="scss" scoped>
  159. .backbone {
  160. width: 300px;
  161. color: #fff;
  162. border-radius: 5px;
  163. // padding: 20px;
  164. }
  165. .BOX {
  166. background: #004f5f;
  167. display: flex;
  168. padding-left: 10px;
  169. flex-wrap: wrap;
  170. padding-bottom: 15px;
  171. color: #fff;
  172. border-radius: 5px;
  173. h3 {
  174. margin-top: 5px;
  175. }
  176. }
  177. .YC01 {
  178. width: 154px;
  179. height: 60px;
  180. background-image: url("../../../../assets/001.png");
  181. background-size: 154px 60px;
  182. background-repeat: no-repeat;
  183. background-position: center;
  184. margin-right: 15px;
  185. margin-top: 15px;
  186. text-align: center;
  187. strong {
  188. display: block;
  189. font-size: 26px;
  190. color: #4bffff;
  191. }
  192. span {
  193. display: block;
  194. font-size: 12px;
  195. }
  196. }
  197. .YC02 {
  198. width: 70px;
  199. height: 60px;
  200. background-image: url("../../../../assets/002.png");
  201. background-size: 70px 60px;
  202. background-repeat: no-repeat;
  203. background-position: center;
  204. margin-right: 15px;
  205. margin-top: 15px;
  206. text-align: center;
  207. cursor: pointer;
  208. .textred {
  209. color: #d9001b;
  210. }
  211. .texyellow {
  212. color: #facd91;
  213. }
  214. strong {
  215. display: block;
  216. font-size: 26px;
  217. color: #4bffff;
  218. }
  219. span {
  220. display: block;
  221. font-size: 12px;
  222. }
  223. }
  224. .YC03 {
  225. width: 70px;
  226. height: 60px;
  227. }
  228. .Tabtab {
  229. font-size: 12px;
  230. }
  231. ::v-deep.el-table__cell {
  232. padding: 2px 0 !important;
  233. }
  234. ::v-deep.el-table .el-table__cell {
  235. padding: 2px 0 !important;
  236. }
  237. ::v-deep.el-table--scrollable-y .el-table__body-wrapper {
  238. overflow-y: clip !important;
  239. }
  240. .titleYC {
  241. font-size: 14px;
  242. background: #214e5d;
  243. padding: 5px 0;
  244. span:nth-child(1) {
  245. margin: 0 70px 0 10px;
  246. }
  247. }
  248. .titleJQ {
  249. font-size: 14px;
  250. background: #214e5d;
  251. padding: 5px 0;
  252. span:nth-child(1) {
  253. margin: 0 15px 0 10px;
  254. }
  255. span:nth-child(2) {
  256. margin: 0 45px 0 30px;
  257. }
  258. }
  259. </style>