已删除34个文件
已修改26个文件
已添加34个文件
已重命名2个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "presets": [["es2015", { "modules": false }]], |
| | | "plugins": [ |
| | | [ |
| | | "component", |
| | | { |
| | | "libraryName": "element-ui", |
| | | "styleLibraryName": "theme-chalk" |
| | | } |
| | | ] |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | # å¼åç¯å¢ï¼å¼åæ¶æ£å¸¸é½ç¨è¿ä¸ª |
| | | NODE_ENV = development |
| | | # å½åç¯å¢ï¼å¼åç¯å¢ï¼å¯ä»¥é便修æ¹ï¼é
åæå
å¤é
ç½®ä¸æ¤æä»¶åå |
| | | VUE_APP_URL_ENV = development |
| | | # æå
åæä»¶å¤¹åå |
| | | VUE_APP_outputDir = development |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | # æ£å¼ç¯å¢ï¼æå
é½ç¨è¿ä¸ªæ£å¸¸çå°±è¡ï¼ä¸ç¨æ¹ |
| | | NODE_ENV = production |
| | | # å½åç¯å¢ï¼æ£å¼å
ï¼testæ£å¼å
ï¼å¯ä»¥é便修æ¹ï¼é
åæå
å¤é
ç½®ä¸æ¤æä»¶åå å¯ä»¥æ¹ |
| | | VUE_APP_URL_ENV = production |
| | | # æå
åæä»¶å¤¹åå |
| | | VUE_APP_outputDir = dist-production |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # ç .env.development éé¢ç注é |
| | | NODE_ENV = production |
| | | VUE_APP_URL_ENV = test |
| | | VUE_APP_outputDir = dist-test |
| | |
| | | .DS_Store |
| | | node_modules |
| | | /dist |
| | | /dist-* |
| | | |
| | | |
| | | # local env files |
| | | .env.local |
| | |
| | | npm-debug.log* |
| | | yarn-debug.log* |
| | | yarn-error.log* |
| | | pnpm-debug.log* |
| | | |
| | | # Editor directories and files |
| | | .idea |
| | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | MIT License |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | Copyright (c) 2022 daidai |
| | | |
| | | 1. Definitions. |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | The above copyright notice and this permission notice shall be included in all |
| | | copies or substantial portions of the Software. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| | | SOFTWARE. |
| | |
| | | **QQ交æµç¾¤ï¼ 713105837 弿ºé¡¹ç®Vue/Vue3/React-big-screen交æµç¾¤** |
| | | |
| | | QQ群äºç»´ç ï¼ |
| | | |
| | |  |
| | | ## é¡¹ç®æè¿° |
| | | |
| | | ## ä¸ãé¡¹ç®æè¿° |
| | | |
| | | - ä¸ä¸ªåºäº VueãDatavãEchart æ¡æ¶ç " **æ°æ®å¤§å±é¡¹ç®** "ï¼éè¿ Vue ç»ä»¶å®ç°æ°æ®å¨æå·æ°æ¸²æï¼å
é¨å¾è¡¨å¯å®ç°èªç±æ¿æ¢ãé¨åå¾è¡¨ä½¿ç¨ DataV èªå¸¦ç»ä»¶ï¼å¯è¿è¡æ´æ¹ï¼è¯¦æ
请ç¹å»ä¸æ¹ DataV ææ¡£ã |
| | | |
| | | - [**Vue3 çæ¬è¯·ç¹å»è¿éæ¥çï¼ä½¿ç¨ Hooks+TypeScript å®ç°ï¼å
¨æ°å
容çä½ æ¢ç´¢!**](https://gitee.com/MTrun/vue-big-screen-plugin) |
| | | - [**React çæ¬è¯·ç¹å»è¿éæ¥çï¼å
¨æ°çé¢è¶
级好çï¼ï¼ï¼**](https://gitee.com/MTrun/react-big-screen) |
| | | æ ¹æ®å¥è·å§é¢æ¡ç**[vue-big-screen](https://gitee.com/MTrun/big-screen-vue-datav)**弿ºæ¡æ¶åºç¡ä¸è¿è¡ä¿®æ¹ã |
| | | |
| | | - 项ç®éè¦å
¨å±å±ç¤ºï¼æ F11ï¼ã |
| | | |
| | | - 项ç®é¨ååºå使ç¨äºå
¨å±æ³¨åæ¹å¼ï¼å¢å äºæå
ä½ç§¯ï¼å¨å®é
è¿ç¨ä¸è¯·ä½¿ç¨ **æéå¼å
¥**ã |
| | | - æå项ç®ä¹åï¼å»ºè®®æç
§èªå·±çåè½åºåéå½åæä»¶ï¼ç°ä»¥ç®åçä½ç½®è¿è¡åºåã |
| | | - 项ç®ç¯å¢ï¼Vue-cli-3.0ãDataV-2.7.3ãEcharts-4.6.0(妿5.xçæ¬æé®é¢ï¼è¯·åæ¢å°4.xçæ¬)ãWebpack-4.0ãNpm-6.13ãNode-v12.16ã |
| | | |
| | | - 项ç®ç¯å¢ï¼Vue-cliãDataVãEchartsãWebpackãNpmãNodeï¼axios,mockã |
| | | |
| | | - 请æå master 忝ç代ç ï¼å
¶ä½åæ¯æ¯å¼å忝ã |
| | | - éè¦å
¶å®å°å¾æ°æ®çï¼è¯·æ¥çæçå
¶å®é¡¹ç®ï¼æä¸ä¸ªå°å¾åéï¼ |
| | | |
| | | - å¨é¡¹ç®publicç®å½ä¸åæ¾å°å¾æ°æ®åéï¼æ ¹æ®å°å¸ç¼åæ¾ã |
| | | |
| | | |
| | | åæ
龿¥ï¼ |
| | | |
| | | 1. [Vue 宿¹ææ¡£](https://cn.vuejs.org/v2/guide/instance.html) |
| | | 2. [DataV 宿¹ææ¡£](http://datav.jiaminghi.com/guide/) |
| | | 3. [echarts å®ä¾](https://echarts.apache.org/examples/zh/index.html)ï¼[echarts API ææ¡£](https://echarts.apache.org/zh/api.html#echarts) |
| | | 4. [é¡¹ç® gitee å°åï¼å½å
é度快ï¼](https://gitee.com/MTrun/big-screen-vue-datav) |
| | | 1. [Vue 宿¹ææ¡£](https://gitee.com/link?target=https%3A%2F%2Fcn.vuejs.org%2Fv2%2Fguide%2Finstance.html) |
| | | 2. [DataV 宿¹ææ¡£](https://gitee.com/link?target=http%3A%2F%2Fdatav.jiaminghi.com%2Fguide%2F) |
| | | 3. [echarts å®ä¾](https://gitee.com/link?target=https%3A%2F%2Fecharts.apache.org%2Fexamples%2Fzh%2Findex.html)ï¼[echarts API ææ¡£](https://gitee.com/link?target=https%3A%2F%2Fecharts.apache.org%2Fzh%2Fapi.html%23echarts) |
| | | 4. [mock.jså®ç½](http://mockjs.com/examples.html) |
| | | 5. [axioså®ç½](https://axios-http.com/) |
| | | |
| | | 项ç®å±ç¤º |
| | |  |
| | | **项ç®å±ç¤º** |
| | | |
| | | ## äºãä¸»è¦æä»¶ä»ç» |
| | |  |
| | | |
| | | | æä»¶ | ä½ç¨/åè½ | |
| | | | ------------------- | --------------------------------------------------------------------- | |
| | | | main.js | 主ç®å½æä»¶ï¼å¼å
¥ Echart/DataV çæä»¶ | |
| | | | utils | å·¥å
·å½æ°ä¸ mixins 彿°ç | |
| | | | views/ index.vue | 项ç®ä¸»ç»æ | |
| | | | views/å
¶ä½æä»¶ | çé¢å个åºåç»ä»¶ï¼æç
§ä½ç½®æ¥å½åï¼ | |
| | | | assets | éæèµæºç®å½ï¼æ¾ç½® logo ä¸èæ¯å¾ç | |
| | | | assets / style.scss | éç¨ CSS æä»¶ï¼å
¨å±é¡¹ç®å¿«æ·æ ·å¼è°è | |
| | | | assets / index.scss | Index çé¢ç CSS æä»¶ | |
| | | | components/echart | ææ echart å¾è¡¨ï¼æç
§ä½ç½®æ¥å½åï¼ | |
| | | | common/... | å
¨å±å°è£
ç ECharts å flexible æä»¶ä»£ç ï¼éé
å±å¹å°ºå¯¸ï¼å¯å®å¶åä¿®æ¹ï¼ | |
| | | ### 项ç®é¢è§å°å |
| | | |
| | | ## ä¸ã使ç¨ä»ç» |
| | | [https://www.daidaibg.com/bigscreen](https://www.daidaibg.com/bigscreen) |
| | | |
| | | ### å¯å¨é¡¹ç® |
| | | ### 项ç®ä»åºå°å |
| | | |
| | | éè¦æåå®è£
好 `nodejs` ä¸ `yarn`,ä¸è½½é¡¹ç®åå¨é¡¹ç®ä¸»ç®å½ä¸è¿è¡ `yarn` æåä¾èµå
ãå®è£
å®ä¾èµå
ä¹åç¶åä½¿ç¨ `vue-cli` æè
ç´æ¥ä½¿ç¨å½ä»¤`npm run serve`ï¼å°±å¯ä»¥å¯å¨é¡¹ç®ï¼å¯å¨é¡¹ç®åéè¦æå¨å
¨å±ï¼æ F11ï¼ã妿ç¼è¯é¡¹ç®çæ¶åæç¤ºæ²¡æ DataV æ¡æ¶çä¾èµï¼è¾å
¥ `npm install @jiaminghi/data-view` æè
`yarn add @jiaminghi/data-view` è¿è¡æå¨å®è£
ã |
| | | **githubå°å** |
| | | |
| | | ### å°è£
ç»ä»¶æ¸²æå¾è¡¨ |
| | | [https://github.com/daidaibg/IofTV-Screen](https://github.com/daidaibg/IofTV-Screen) |
| | | |
| | | ææç ECharts å¾è¡¨é½æ¯åºäº `common/echart/index.vue` å°è£
ç»ä»¶å建çï¼å·²ç»å¯¹æ°æ®åå±å¹æ¹å¨è¿è¡äºçå¬ï¼è½å¤å¨ææ¸²æå¾è¡¨æ°æ®å大å°ãå¨çå¬çªå£å°å¤§ç模åï¼ä½¿ç¨äºé²æå½æ°æ¥æ§å¶æ´æ°é¢çï¼è约æµè§å¨æ§è½ã |
| | | **Giteeå°å** |
| | | |
| | | 项ç®é
ç½®äºé»è®¤ç ECharts å¾è¡¨æ ·å¼ï¼æä»¶å°åï¼`common/echart/theme.json`ã |
| | | [https://gitee.com/daidaibg/IofTV-Screen](https://gitee.com/daidaibg/IofTV-Screen) |
| | | |
| | | å°è£
çæ¸²æå¾è¡¨ç»ä»¶æ¯æä¼ å
¥ä»¥ä¸åæ°ï¼å¯æ ¹æ®ä¸å¡éæ±èªè¡æ·»å /å é¤ã |
| | | ### vue3+viteçæ¬å°å |
| | | |
| | | åæ°åç§° | ç±»å | ä½ç¨/åè½ | |
| | | | -------------------| --------- | ------------------------------| |
| | | | id | String | å¯ä¸ idï¼æ¸²æå¾è¡¨çèç¹ï¼éå¿
å¡«ï¼ä½¿ç¨äº $elï¼| |
| | | | className | String | classæ ·å¼åç§°ï¼éå¿
å¡«ï¼ | |
| | | | options | Object | ECharts é
ç½®ï¼å¿
å¡«ï¼ | |
| | | | height | String | å¾è¡¨é«åº¦ï¼å»ºè®®å¡«ï¼ | |
| | | | width | String | å¾è¡¨å®½åº¦ï¼å»ºè®®å¡«ï¼ | |
| | | **githubå°å** |
| | | |
| | | ### å¨ææ¸²æå¾è¡¨ |
| | | [https://github.com/daidaibg/IofTV-Screen-Vue3](https://github.com/daidaibg/IofTV-Screen-Vue3) |
| | | |
| | | å¨ææ¸²æå¾è¡¨æ¡ä¾ä¸º `components` ç®å½ä¸å个å¾è¡¨ç»ä»¶ï¼index æä»¶è´è´£æ°æ®è·ååå¤çï¼chart æä»¶è´è´£çå¬åæ°æ®æ¸²æã |
| | | **Giteeå°å** |
| | | |
| | | chart æä»¶ç主è¦é»è¾ä¸ºï¼ |
| | | [https://gitee.com/daidaibg/IofTV-Screen-Vue3](https://gitee.com/daidaibg/IofTV-Screen-Vue3) |
| | | |
| | | ```html |
| | | ### 1.1.0çæ¬å¼å§éç¨èªéåºç»ä»¶æ¹å¼ï¼ä¸å使ç¨mixinæ¹å¼ã |
| | | |
| | | ### æ»å¨è®¾ç½®ï¼èªéåºè®¾ç½® |
| | | |
| | | 项ç®ä¸å¯ä»¥è¿è¡æ»å¨é
ç½®ï¼å
容æ¯å¦æ»å¨ |
| | | |
| | | ç¹å»å³ä¸è§è®¾ç½®æé® |
| | |  |
| | | |
| | | |
| | | |
| | | å¯ä»¥è¿è¡ä»¥ä¸é
ç½®ï¼å¯ä»¥èªè¡ä»£ç ä¸è¿è¡ä¿®æ¹æå¢å é
ç½® |
| | | |
| | | |
| | | |
| | |  |
| | | |
| | | |
| | | |
| | | ## 2ãä¸»è¦æä»¶ä»ç» |
| | | |
| | | | æä»¶ | ä½ç¨/åè½ | |
| | | | ----------------- | ------------------------------------------------------------ | |
| | | | main.js | 主ç®å½æä»¶ï¼å¼å
¥ Echart/DataV çæä»¶ | |
| | | | utils | å·¥å
·å½æ°ä¸ mixins 彿°ç | |
| | | | views/ home.vue | 项ç®ä¸»ç»æ | |
| | | | views/å
¶ä½æä»¶ | çé¢å个åºåç»ä»¶ï¼æç
§ä½ç½®æ¥å½åï¼ | |
| | | | assets | éæèµæºç®å½ï¼æ¾ç½® logo ä¸èæ¯å¾ç | |
| | | | assets / css/ | éç¨ CSS æä»¶ï¼å
¨å±é¡¹ç®å¿«æ·æ ·å¼è°è | |
| | | | components/echart | ææ echart å¾è¡¨ï¼æç
§ä½ç½®æ¥å½åï¼ | |
| | | | common/... | å
¨å±å°è£
ç ECharts å flexible æä»¶ä»£ç ï¼éé
å±å¹å°ºå¯¸ï¼å¯å®å¶åä¿®æ¹ï¼ | |
| | | | api/api.js | æ¥å£å°è£
æä»¶ | |
| | | | mock | æ¨¡ææ°æ®æ¥å£å°å | |
| | | |
| | | ### |
| | | |
| | | ## 使ç¨ä»ç» |
| | | |
| | | ### å®è£
|
| | | |
| | | ```npm |
| | | npm install |
| | | ``` |
| | | ### å¯å¨ |
| | | |
| | | ```npm |
| | | npm start |
| | | ``` |
| | | |
| | | [æ¥ä¸æ¥è·é¢æ¡çå·®ä¸å¤è¿æ¯ç颿¡çææ¡£å§](https://gitee.com/MTrun/big-screen-vue-datav/tree/master#%E4%B8%89%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D) |
| | | |
| | | https://gitee.com/MTrun/big-screen-vue-datav/tree/master#%E4%B8%89%E4%BD%BF%E7%94%A8%E4%BB%8B%E7%BB%8D |
| | | |
| | | ### åæ¶mockæ¨¡ææ°æ® |
| | | |
| | | ```javascript |
| | | // src\main.jsæä»¶ |
| | | æä¸é¢è¿å¥è¯æ³¨éæå°±å¯ä»¥äºã |
| | | require('./mock/mock')//æ¯å¦ä½¿ç¨mock |
| | | ``` |
| | | |
| | | ## èªéåºç¼©æ¾ç»ä»¶ |
| | | |
| | | ### 注æ |
| | | |
| | | éç¨Scaleæ¹å¼ï¼ä¼èªå¨ç»ç»ä»¶ç¶å
ç´ æ·»å overflow:hidden |
| | | |
| | | ### ä½¿ç¨ |
| | | |
| | | ```vue |
| | | <template> |
| | | <div> |
| | | <Echart :options="options" id="id" height="height" width="width" ></Echart> |
| | | </div> |
| | | <scale-screen width="1920" height="1080"> |
| | | <div> |
| | | <v-chart>....</v-chart> |
| | | <v-chart>....</v-chart> |
| | | <v-chart>....</v-chart> |
| | | <v-chart>....</v-chart> |
| | | <v-chart>....</v-chart> |
| | | </div> |
| | | </scale-screen> |
| | | </template> |
| | | |
| | | <script> |
| | | // å¼å
¥å°è£
ç»ä»¶ |
| | | import Echart from '@/common/echart' |
| | | import ScaleScreen from 'scale-screen' |
| | | |
| | | export default { |
| | | // å®ä¹é
ç½®æ°æ® |
| | | data(){ return { options: {}}}, |
| | | // 声æç»ä»¶ |
| | | components: { Echart}, |
| | | // æ¥æ¶æ°æ® |
| | | props: { |
| | | cdata: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | }, |
| | | // è¿è¡çå¬ï¼ä¹å¯ä»¥ä½¿ç¨ computed 计ç®å±æ§å®ç°æ¤åè½ |
| | | watch: { |
| | | cdata: { |
| | | handler (newData) { |
| | | this.options ={ |
| | | // è¿éç¼å ECharts é
ç½® |
| | | } |
| | | }, |
| | | // ç«å³çå¬ |
| | | immediate: true, |
| | | // 深度çå¬ |
| | | deep: true |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | ``` |
| | | |
| | | ### å¤ç¨å¾è¡¨ç»ä»¶ |
| | | |
| | | å¤ç¨å¾è¡¨ç»ä»¶æ¡ä¾ä¸ºä¸é´é¨åç `ä»»å¡éè¿çä¸ä»»å¡è¾¾æ ç` 模åï¼ä¸¤ä¸ªå¾è¡¨ç±»ä¼¼ï¼åºå«å¨äºé¢è²åä¸»è¦æ¸²ææ°æ®ãåªéè¦ä¼ å
¥å¯¹åºçå¯ä¸ id åæ ·å¼ï¼ç¶åå¨å¤ç¨çç»ä»¶ `components/echart/center/centerChartRate` éè¿è¡æ¥æ¶å¹¶å¨å¯¹åºä½ç½®èµå¼å³å¯ã |
| | | |
| | | å¦ï¼å¨è°ç¨å¤ `views/center.vue` éå»å®ä¹å¥½æ°æ®å¹¶ä¼ å
¥ç»ä»¶ |
| | | |
| | | ```js |
| | | //ç»ä»¶è°ç¨ |
| | | <span>仿¥ä»»å¡éè¿ç</span> |
| | | <centerChart :id="rate[0].id" :tips="rate[0].tips" :colorObj="rate[0].colorData" /> |
| | | |
| | | <span>仿¥ä»»å¡è¾¾æ ç</span> |
| | | <centerChart :id="rate[1].id" :tips="rate[1].tips" :colorObj="rate[1].colorData" /> |
| | | |
| | | ... |
| | | import centerChart from "@/components/echart/center/centerChartRate"; |
| | | |
| | | data() { |
| | | return { |
| | | rate: [ |
| | | { |
| | | id: "centerRate1", |
| | | tips: 60, |
| | | ... |
| | | }, |
| | | { |
| | | id: "centerRate2", |
| | | tips: 40, |
| | | colorData: { |
| | | ... |
| | | } |
| | | } |
| | | ] |
| | | name:'Demo', |
| | | components:{ |
| | | VScaleScreen |
| | | } |
| | | } |
| | | </script> |
| | | ``` |
| | | ### API |
| | | | 屿§ | 说æ | ç±»å | é»è®¤å¼ | |
| | | | ------------ | ------------------------------------------------------------ | -------------------------------- | ------ | |
| | | | selfAdaption | æ¯å¦è¿è¡èªéåº | Boolean | true | |
| | | | width | 大å±å®½åº¦ | `Number` or `String` | 1920 | |
| | | | height | 大å±é«åº¦ | `Number` or `String` | 1080 | |
| | | | autoScale | èªéåºé
ç½®ï¼é
置为booleanç±»åæ¶ï¼ä¸ºå¯å¨æè
å
³éèªéåºï¼é
置为对象æ¶ï¼è¥x为trueï¼x轴产çè¾¹è·ï¼y为trueæ¶ï¼y轴产çè¾¹è·ï¼å¯ç¨fullScreenæ¶æ¤é
置失æ | Boolean or {x:boolean,y:boolean} | true | |
| | | | delay | çªå£ååé²æå»¶è¿æ¶é´ | Number | 500 | |
| | | | fullScreen | å
¨å±èªéåºï¼å¯ç¨æ¤é
置项æ¶ä¼å卿伏ææï¼åæ¶autoScale失æï¼éå¿
è¦æ
åµä¸ä¸å»ºè®®å¼å¯ | Boolean | false | |
| | | | boxStyle | ä¿®æ¹å®¹å¨æ ·å¼ï¼å¦å±
ä¸å±ç¤ºæ¶ä¾§è¾¹èæ¯è²ï¼ç¬¦åVueååç»å®styleæ åæ ¼å¼ | Object | null | |
| | | | wrapperStyle | ä¿®æ¹èªéåºåºåæ ·å¼ï¼ç¬¦åVueååç»å®styleæ åæ ¼å¼ | Object | null | |
| | | |
| | | ### æ´æ¢è¾¹æ¡ |
| | | ## å
¬ç¨ç»ä»¶ |
| | | |
| | | è¾¹æ¡æ¯ä½¿ç¨äº DataV èªå¸¦çç»ä»¶ï¼åªéè¦å» views ç®å½ä¸å»å¯»æ¾å¯¹åºçä½ç½®å»æ¥æ¾å¹¶æ¿æ¢å°±å¯ä»¥ï¼å
·ä½çç§ç±»è¯·å» DavaV å®ç½æ¥ç |
| | | å¦ï¼ |
| | | å°è£
äºé¤é¢æ¡å¤ä¸ªå«ç¨å°çç»ä»¶ |
| | | |
| | | ```html |
| | | <dv-border-box-1></dv-border-box-1> |
| | | <dv-border-box-2></dv-border-box-2> |
| | | <dv-border-box-3></dv-border-box-3> |
| | | ``` |
| | | ### 5.1 messageæ¶æ¯æç¤º |
| | | |
| | | ### æ´æ¢å¾è¡¨ |
| | | å 为åå¼å§æ²¡æ³çç¨ç¬¬ä¸æ¹æç¤ºåºï¼èªå·±ç®åå°è£
äºä¸ä¸ªã |
| | | |
| | | ç´æ¥è¿å
¥ `components/echart` ä¸çæä»¶ä¿®æ¹æä½ è¦ç echarts æ¨¡æ ·ï¼å¯ä»¥å»[echarts 宿¹ç¤¾åº](https://gallery.echartsjs.com/explore.html#sort=rank~timeframe=all~author=all)é颿¥çæ¡ä¾ã |
| | | 注ï¼ç»ä»¶å
é¨ç®ååªæwarningï¼ç±»åï¼å¦æéè¦å
¶ä»ç±»åèªå·±ç»ä»¶å
æ·»å ã |
| | | |
| | | ### Mixins è§£å³èªéåºéé
åè½ |
| | | |
| | | ä½¿ç¨ mixins 注å
¥è§£å³äºçé¢å¤§å°åå¨å¾è¡¨èªéåºéé
çåè½ï¼å½æ°å¨ `utils/resizeMixins.js` ä¸ï¼åºç¨å¨ `common/echart/index.vue` çå°è£
渲æç»ä»¶ï¼ä¸»è¦æ¯å¯¹ `this.chart` è¿è¡äºåè½æ³¨å
¥ã |
| | | |
| | | ### å±å¹éé
|
| | | |
| | | 1.5 çæ¬é¡¹ç®æ¾å¼äº flexible æä»¶æ¹æ¡ï¼å° rem æ¹åpxï¼ä½¿ç¨æ´æµç¨éç¨ç `css3ï¼scale` ç¼©æ¾æ¹æ¡ï¼éè¿ `ref` æå `views/index`ï¼å±å¹æ¹åæ¶ç¼©æ¾å
容ã项ç®çåºåå°ºå¯¸æ¯ `1920px*1080px`ï¼æä»¥æ¯æåæ¯ä¾å±å¹ 100% å¡«å
ï¼å¦æé忝ä¾åä¼èªå¨è®¡ç®æ¯ä¾å±
ä¸å¡«å
ï¼ä¸è¶³çé¨ååçç½ãå®ç°ä»£ç å¨ `src/utils/userDraw` ï¼å¦ææå
¶å®çéé
æ¹æ¡ï¼æ¬¢è¿äº¤æµã |
| | | |
| | | ### è¯·æ±æ°æ® |
| | | |
| | | ç°å¨çé¡¹ç®æªä½¿ç¨ååç«¯æ°æ®è¯·æ±ï¼å»ºè®®ä½¿ç¨ axios è¿è¡æ°æ®è¯·æ±ï¼å¨ main.js ä½ç½®è¿è¡å
¨å±é
ç½®ã |
| | | |
| | | - axios ç main.js é
ç½®åèèä¾ï¼å 人èå¼ï¼ |
| | | å å¨main.js注åå
¨å±å¯ä»¥ç´æ¥ä½¿ç¨ï¼ä¸éè¦å¼å
¥ |
| | | |
| | | ```js |
| | | import axios from 'axios'; |
| | | |
| | | //ææ¹æ³æ¾å°vueçååä¸ï¼è¿æ ·å°±å¯ä»¥å
¨å±ä½¿ç¨äº |
| | | Vue.prototype.$http = axios.create({ |
| | | //设置20ç§è¶
æ¶æ¶é´ |
| | | timeout: 20000, |
| | | baseURL: 'http://172.0.0.1:80080', //è¿éåå端å°å |
| | | }); |
| | | this.$Message({ |
| | | text: res.msg, |
| | | type: 'warning' |
| | | }) |
| | | //ä¹å¯ä»¥è¿æ · |
| | | this.$Message.warning(res.msg) |
| | | ``` |
| | | |
| | | ## åãæ´æ°æ
åµ |
| | | | åæ° | æè¿° | é»è®¤å¼ | ç±»å | å¯éå¼ | |
| | | | :--: | :------: | :-----: | :----: | :-----: | |
| | | | text | æç¤ºæå | - | string | - | |
| | | | type | å¼¹çªç±»å | warning | string | warning | |
| | | |
| | | 1. å¢å äº Echart ç»ä»¶å¤ç¨çåè½ï¼å¦ï¼ä¸é´ä»»å¡è¾¾æ çç两个ç¾åæ¯å¾ä½¿ç¨çæ¯åä¸ä¸ªç»ä»¶ã |
| | | 2. ä¿®å¤äºå¤´é¨å³ä¾§ç徿¡æ¡ä¸å¯¹ç§°çé®é¢ã |
| | | 3. ä½¿ç¨ Mixins 注å
¥å¾è¡¨ååºå¼ä»£ç ï¼scaleæ¹æ¡ä¹åæ é使ç¨ï¼ã |
| | | 4. vue-awesome æ¹ææéå¼å
¥çæ¹å¼ã |
| | | 5. å°è£
渲æå½æ°ï¼æ½ç¦»äºæ°æ®ä½¿é»è¾æ´å æ¸
æ°ã |
| | | 6. æ°å¢å°å¾ç»ä»¶ï¼å¹¶æ·»å èªå¨è½®æåè½ |
| | | 7. å°éé
æ¹æ¡ä» rem æ¹æ scale |
| | | ## äºãå
¶ä½ |
| | | ### 5.2 å¤è¾¹æ¡ |
| | | |
| | | è¿ä¸ªé¡¹ç®æ¯ä¸ªäººçä½åï¼é¾å
伿é®é¢å BUGï¼å¦ææé®é¢è¯·è¿è¡è¯è®ºï¼æä¹ä¼å°½å廿´æ°ï¼èªå·±ä¹å¨å端å¦ä¹ çè·¯ä¸ï¼æ¬¢è¿äº¤æµï¼é常æè°¢ï¼ |
| | | å 为æç项ç®å¤è¾¹æ¡å ä¹ä¸æ ·ï¼è¿ætitle,æä»¥å°è£
äºæ¤ç»ä»¶ã |
| | | |
| | | æ ¹æ®èªå·±éæ±æ´æ¹ï¼æ´æ¢å¤è¾¹æ¡ï¼src\components\item-wrap\item-wrap.vueï¼ä¸æ´æ¢ã |
| | | |
| | | ```vue |
| | | <ItemWrap |
| | | title="ææ¯title" |
| | | > |
| | | <div>ææ¯è°ï¼</div> |
| | | </ItemWrap> |
| | | ``` |
| | | |
| | | | åæ° | æè¿° | é»è®¤å¼ | ç±»å | å¯éå¼ | |
| | | | :---: | :--: | :----: | :----: | :----: | |
| | | | title | æ 头 | - | string | - | |
| | | |
| | | ## ä¸é´å°å¾ |
| | | |
| | | ### åæµ·æ¾éæ§å¶ |
| | | |
| | | æ ¹æ®éæ±æ¥ï¼**ä¿®æ¹æ¤å¼è¯·å·æ°é¡µé¢** |
| | | |
| | | ```indexs/center-map.vue``` æä»¶ä¸```isSouthChinaSea```åé é»è®¤ä¸æ¾ç¤ºåæµ·(false),为```true```çæ¶åæ¾ç¤ºåæµ· |
| | | |
| | | ``` |
| | | isSouthChinaSea:false,//é»è®¤ä¸æ¾ç¤ºåæµ·ï¼æ¹ä¸ºtrue坿¾ç¤ºåæµ· |
| | | ``` |
| | | |
| | | ## å
¨å±åæ° |
| | | |
| | | ### filter |
| | | |
| | | çæµæ°æ®é¡¹ç»ä¸è¿æ»¤ï¼ä¿ç两ä½å°æ°ã |
| | | |
| | | ```vue |
| | | {{10.23123|montionFilter }} |
| | | ``` |
| | | |
| | | ## 大å±äº¤æµåé¦ï¼é¢æ¡çç¾¤ï¼ |
| | | |
| | | ### 大å±QQ群 |
| | | |
| | | QQ群å·ï¼713105837 |
| | | |
| | | ### 大å±äºç»´ç |
| | | |
| | | QQ群äºç»´ç ï¼ |
| | | |
| | |  |
| | | |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> --> |
| | | <meta name="viewport" content="width=device-width,user-scalable=yes, initial-scale=0.4, maxmum-scale=1.0, minimum-scale=0.4"> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| | | <title><%= htmlWebpackPlugin.options.title %></title> |
| | | </head> |
| | | <body> |
| | | <noscript> |
| | | <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
| | | </noscript> |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | </html> |
| | | <html lang=""> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
| | | <link href="./style.css" rel="stylesheet"> |
| | | |
| | | <title> |
| | | å¤§å± |
| | | </title> |
| | | |
| | | </head> |
| | | |
| | | <body> |
| | | <noscript> |
| | | <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. |
| | | Please enable it to continue.</strong> |
| | | </noscript> |
| | | <div id="app"> |
| | | <div class="container_nomount"> |
| | | <div class="loading"> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | </div> |
| | | <h2>Loading...</h2> |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-01-12 14:06:47 |
| | | * @LastEditors: daidai |
| | | * @LastEditTime: 2022-03-01 17:55:49 |
| | | * @FilePath: \web-pc\src\pages\big-screen\App.vue |
| | | --> |
| | | <template> |
| | | <div id="app"> |
| | | <router-view /> |
| | | <router-view/> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | #app { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background-color: #020308; |
| | | overflow: hidden; |
| | | background-color: #03050C; |
| | | // overflow: hidden; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | // è¿ä¸ªæ¶axiosçé
ç½® |
| | | import axios from 'axios'; |
| | | // import { config } from 'vue/types/umd'; |
| | | axios.defaults.baseURL = 'http://localhost:8098';//'http://192.168.2.110:8098';// |
| | | axios.defaults.withCredentials=true; |
| | | axios.defaults.crossDomain=true; |
| | | axios.defaults.baseURL = 'http://10.30.4.92:9283';//'http://192.168.2.51:8099'; //'http://localhost:8099'; //'http://192.168.2.51:8099';// |
| | | axios.defaults.headers.post["Content-Type"]="application/json;charset=utf-8"; |
| | | // é误信æ¯å¤ç |
| | | const errorHandle = (status, other) => { |
| | | switch (status) { |
| | |
| | | // console.log(config); |
| | | if(localStorage.elementToken){ |
| | | config.headers.Authorization=localStorage.elementToken; |
| | | config.headers.con; |
| | | } |
| | | // console.log(config); |
| | | return config; |
| | |
| | | // console.log(); |
| | | // console.log(response.data.token); |
| | | // response.headers['Authorization'] = response.data.token; |
| | | return response.status=== 200 ? Promise.resolve(response): Promise.reject(response); |
| | | return response.status=== 200 ? response.data: response.data; |
| | | }, function (error) { |
| | | // 对ååºé误åç¹ä»ä¹ |
| | | const {response}=error; |
| | |
| | | errorHandle(response.status,response.data.message) |
| | | return Promise.reject(response.data); |
| | | }else{ |
| | | console.log('æäº'); |
| | | |
| | | } |
| | | }); |
| | | export default axios; |
| | |
| | | import axios from './ajax'; |
| | | import axios from './ajax'; |
| | | //æåæ§è¡ä»»å¡ç»è®¡ |
| | | export function Floorfault (data) { |
| | | return axios.post('/api/Large/ProMonthTaskStatistics', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | //æåè´§ä½ç»è®¡ |
| | | export function ProLocationStatistics (data) { |
| | | return axios.post('/api/Large/ProLocationStatistics?id=7', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | //æåè¿ä¸å¤©ç»è®¡ |
| | | export function Productions (data) { |
| | | return axios.post('/api/Large/Productions', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | //æååºåºäº§éç»è®¡ |
| | | export function ProductionsOut (data) { |
| | | return axios.post('/api/Large/ProductionsOut', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | //æåæè¡ |
| | | export function ProductionRanking (data) { |
| | | return axios.post('/api/Large/ProductionRanking', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
| | | //æååºå |
| | | export function ProductionStock (data) { |
| | | return axios.post('/api/Large/ProductionStock', data)//è¿åçæ¶promieså¯¹è±¡ï¼æä»¥ç´æ¥returnåºå»å°±å¥½äº |
| | | } |
ÎļþÃû´Ó CodeManagement/BigScreenVue/src/components/echart/centerLeft/centerLeft3Chart/chart.vue ÐÞ¸Ä |
| | |
| | | <div> |
| | | <Echart |
| | | :options="options" |
| | | id="centreLeft3Chart" |
| | | id="centreLeft1Chart" |
| | | height="220px" |
| | | width="260px" |
| | | width="360px" |
| | | ></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Echart from '@/common/echart' |
| | | import * as echarts from 'echarts'; |
| | | export default { |
| | | data () { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | components: { |
| | | Echart, |
| | | echarts, |
| | | }, |
| | | props: { |
| | | cdata: { |
| | |
| | | color: [ |
| | | "#37a2da", |
| | | "#32c5e9", |
| | | "#ccc", |
| | | "#9fe6b8", |
| | | "#ffdb5c", |
| | | "#ff9f7f", |
| | | "#fb7293", |
| | | "#e7bcf3", |
| | | "#8378ea" |
| | | ], |
| | | legend:{ |
| | | textStyle:{ |
| | | color:"#ffffff", |
| | | fontSize:18 |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "è´§ä½ç¶æ", |
| | | name: "éè¿çç»è®¡", |
| | | type: "pie", |
| | | radius: [10, 50], |
| | | // roseType: "area", |
| | | center: ["50%", "40%"], |
| | | radius: [20, 60], |
| | | roseType: "area", |
| | | center: ["50%", "50%"], |
| | | data: newData.seriesData |
| | | } |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <Chart :cdata="cdata" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Chart from './chart.vue'; |
| | | import axios from 'axios'; |
| | | export default { |
| | | data () { |
| | | return { |
| | | cdata: { |
| | | xData: ["空æ", "宿", "å¾
æ£", "åæ ¼", "æ£ä¿®ä¸"], |
| | | seriesData: [] |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | Chart, |
| | | }, |
| | | mounted () { |
| | | this.changeTiming() |
| | | }, |
| | | methods: { |
| | | changeTiming() { |
| | | this.changeNumber() |
| | | setInterval(() => { |
| | | this.changeNumber() |
| | | }, 3000) |
| | | }, |
| | | changeNumber() { |
| | | axios.post("http://localhost:8098/api/VV_Container/GetContainerMessage", { |
| | | MainData: { |
| | | AGVName: "è´æ" |
| | | } |
| | | }).then((res) => { |
| | | let GetLocationEmptyOrStored = [ |
| | | {value:res.empty+1,name:'空æ'}, |
| | | {value:res.full+1,name:"宿"}, |
| | | {value:res.waitCheck+1,name:"å¾
æ£"}, |
| | | {value:res.qualified+1,name:"åæ ¼"}, |
| | | {value:res.checkIng+1,name:"æ£ä¿®ä¸"} |
| | | ] |
| | | this.cdata.seriesData = GetLocationEmptyOrStored |
| | | }).catch((res) => { |
| | | console.log(res) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
ÎļþÃû´Ó CodeManagement/BigScreenVue/src/common/echart/index.vue ÐÞ¸Ä |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:29:08 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-09-27 15:05:45 |
| | | * @FilePath: \web-pc\src\pages\big-screen\components\echart\index.vue |
| | | --> |
| | | <template> |
| | | <div :id="id" :class="className" :style="{ height: height, width: width }" /> |
| | | </template> |
| | | |
| | | <script> |
| | | import tdTheme from './theme.json' // å¼å
¥é»è®¤ä¸»é¢ |
| | | import '../map/fujian.js' |
| | | |
| | | import * as echarts from 'echarts'; |
| | | export default { |
| | | name: 'echart', |
| | | props: { |
| | |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '2.5rem' |
| | | default: '100%' |
| | | }, |
| | | options: { |
| | | type: Object, |
| | |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.$echarts.registerTheme('tdTheme', tdTheme); // è¦çé»è®¤ä¸»é¢ |
| | | this.initChart(); |
| | | }, |
| | | beforeDestroy () { |
| | |
| | | methods: { |
| | | initChart () { |
| | | // åå§åechart |
| | | this.chart = this.$echarts.init(this.$el, 'tdTheme') |
| | | this.chart = echarts.init(this.$el) |
| | | this.chart.setOption(this.options, true) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-01 09:16:22 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-09-29 15:12:34 |
| | | * @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue |
| | | --> |
| | | <template> |
| | | <dv-border-box-13 class="lr_titles"> |
| | | <div class="item_title" v-if="title !== ''"> |
| | | <div class="zuo"></div> |
| | | <span class="title-inner"> {{ title }} </span> |
| | | <div class="you"></div> |
| | | </div> |
| | | <div |
| | | :class="title !== '' ? 'item_title_content' : 'item_title_content_def'" |
| | | > |
| | | <slot></slot> |
| | | </div> |
| | | </dv-border-box-13> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return {}; |
| | | }, |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: () => "", |
| | | }, |
| | | }, |
| | | created() {}, |
| | | |
| | | mounted() {}, |
| | | methods: {}, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | $item-title-height: 38px; |
| | | $item_title_content-height: calc(100% - 38px); |
| | | |
| | | .lr_titles { |
| | | box-sizing: border-box; |
| | | |
| | | :deep(.border-box-content) { |
| | | box-sizing: border-box; |
| | | padding: 6px 16px 0px; |
| | | } |
| | | |
| | | .item_title { |
| | | height: $item-title-height; |
| | | line-height: $item-title-height; |
| | | width: 100%; |
| | | color: #31abe3; |
| | | text-align: center; |
| | | // background: linear-gradient(to right, transparent, #0f0756, transparent); |
| | | position: relative; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .zuo, |
| | | .you { |
| | | width: 58px; |
| | | height: 14px; |
| | | background-image: url("../../assets/img/titles/zuo.png"); |
| | | } |
| | | |
| | | .you { |
| | | transform: rotate(180deg); |
| | | } |
| | | .title-inner { |
| | | font-weight: 900; |
| | | letter-spacing: 2px; |
| | | background: linear-gradient( |
| | | 92deg, |
| | | #0072ff 0%, |
| | | #00eaff 48.8525390625%, |
| | | #01aaff 100% |
| | | ); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | } |
| | | } |
| | | |
| | | .item_title_content { |
| | | height: $item_title_content-height; |
| | | } |
| | | |
| | | .item_title_content_def { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class='kong'> |
| | | <slot></slot> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | props:{ |
| | | data:{ |
| | | type:Array, |
| | | default:()=>[] |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | init(){ |
| | | }, |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang='scss' scoped> |
| | | .kong{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-02 17:07:40 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-04-26 11:41:27 |
| | | * @FilePath: \web-pc\src\pages\big-screen\components\message\message.vue |
| | | --> |
| | | <template> |
| | | <div class="messages" v-if="visible"> |
| | | <svg fill="none" viewBox="0 0 16 16" width="1em" height="1em" class="message-icon"> |
| | | <path fill="currentColor" d="M15 8A7 7 0 101 8a7 7 0 0014 0zM8.5 4v5.5h-1V4h1zm-1.1 7h1.2v1.2H7.4V11z" |
| | | fill-opacity="0.9" v-if="'warning'==type"></path> |
| | | </svg> |
| | | {{ text }} |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | text: "", |
| | | type:'warning' |
| | | }; |
| | | }, |
| | | props: {}, |
| | | created() { }, |
| | | |
| | | mounted() { }, |
| | | methods: { |
| | | init(param) { |
| | | clearTimeout(this.timer); |
| | | this.visible = true; |
| | | this.text = param.text || ""; |
| | | this.type = param.type || "success"; |
| | | this.timer = setTimeout(() => { |
| | | this.visible = false; |
| | | clearTimeout(this.timer); |
| | | }, 2000); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .messages { |
| | | position: fixed; |
| | | min-width: 200px; |
| | | top: 160px; |
| | | left: 50%; |
| | | transform: translate(-50%, 0); |
| | | border: solid 1px #4b4b4b; |
| | | // box-shadow: 0 16px 24px rgba(0, 0, 0, 0.14), 0 6px 30px rgba(0, 0, 0, 12%), |
| | | // 0 8px 10px rgba(0, 0, 0, 20%), inset 0 0.5px 0 #5e5e5e, |
| | | // inset 0.5px 0 0 #5e5e5e, inset 0 -0.5px 0 #5e5e5e, inset -0.5px 0 0 #5e5e5e; |
| | | width: fit-content; |
| | | border-radius: 6px; |
| | | display: flex; |
| | | align-items: center; |
| | | z-index: 999; |
| | | color: rgba(255, 255, 255, 0.9); |
| | | background-color: #242424; |
| | | line-height: 22px; |
| | | font-size: 14px; |
| | | padding: 13px 16px; |
| | | |
| | | .message-icon { |
| | | color: #cf6e2d; |
| | | font-size: 20px; |
| | | margin-right: 8px; |
| | | fill: currentColor; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class='reacquire flex justify-center blocks cursor-pointer' :style="{ lineHeight: lineHeight }" |
| | | @click="getData"> |
| | | <span> |
| | | éæ°è·å |
| | | </span> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | components: {}, |
| | | props: { |
| | | lineHeight: { |
| | | type: String, |
| | | default: '200px' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | init() { |
| | | }, |
| | | getData(e){ |
| | | this.$emit("onclick",e) |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang='scss' scoped> |
| | | .reacquire { |
| | | |
| | | user-select:none; |
| | | color: rgb(168, 168, 168); |
| | | span:hover{ |
| | | color:$primary-color ; |
| | | text-decoration: underline; |
| | | } |
| | | } |
| | | |
| | | .blocks { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: wei |
| | | * @description: 大å±èªéåºå®¹å¨ç»ä»¶ |
| | | * @LastEditTime: 2022-09-09 16:42:40 |
| | | --> |
| | | <template> |
| | | <!-- <section class="screen-box" :style="boxStyle"> --> |
| | | <div class="screen-wrapper" ref="screenWrapper" :style="wrapperStyle"> |
| | | <slot></slot> |
| | | </div> |
| | | <!-- </section> --> |
| | | </template> |
| | | <script> |
| | | /** |
| | | * 鲿彿° |
| | | * @param {T} fn |
| | | * @param {number} delay |
| | | * @return |
| | | */ |
| | | function debounce(fn, delay) { |
| | | let timer = null; |
| | | return function (...args) { |
| | | timer = setTimeout( |
| | | () => { |
| | | typeof fn === "function" && fn.apply(null, args); |
| | | clearTimeout(timer); |
| | | }, |
| | | delay > 0 ? delay : 100 |
| | | ); |
| | | }; |
| | | } |
| | | |
| | | export default { |
| | | name: "VScaleScreen", |
| | | props: { |
| | | width: { |
| | | type: [String, Number], |
| | | default: 1920, |
| | | }, |
| | | height: { |
| | | type: [String, Number], |
| | | default: 1080, |
| | | }, |
| | | fullScreen: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | autoScale: { |
| | | type: [Object, Boolean], |
| | | default: true, |
| | | }, |
| | | selfAdaption: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | delay: { |
| | | type: Number, |
| | | default: 500, |
| | | }, |
| | | boxStyle: { |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | wrapperStyle: { |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | currentWidth: 0, |
| | | currentHeight: 0, |
| | | originalWidth: 0, |
| | | originalHeight: 0, |
| | | onResize: null, |
| | | observer: null, |
| | | }; |
| | | }, |
| | | watch: { |
| | | selfAdaption(val) { |
| | | if (val) { |
| | | this.resize(); |
| | | this.addListener(); |
| | | } else { |
| | | this.clearListener(); |
| | | this.clearStyle(); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | screenWrapper() { |
| | | return this.$refs["screenWrapper"]; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initSize() { |
| | | return new Promise((resolve, reject) => { |
| | | // console.log("åå§åæ ·å¼"); |
| | | //ç»ç¶å
ç´ è®¾ç½® overflow:hidden |
| | | this.screenWrapper.parentNode.style.overflow = "hidden"; |
| | | this.screenWrapper.parentNode.scrollLeft = 0; |
| | | this.screenWrapper.parentNode.scrollTop = 0; |
| | | |
| | | this.$nextTick(() => { |
| | | // region è·å大å±çå®å°ºå¯¸ |
| | | if (this.width && this.height) { |
| | | this.currentWidth = this.width; |
| | | this.currentHeight = this.height; |
| | | } else { |
| | | this.currentWidth = this.screenWrapper.clientWidth; |
| | | this.currentHeight = this.screenWrapper.clientHeight; |
| | | } |
| | | // endregion |
| | | // region è·åç»å¸å°ºå¯¸ |
| | | if (!this.originalHeight || !this.originalWidth) { |
| | | this.originalWidth = window.screen.width; |
| | | this.originalHeight = window.screen.height; |
| | | } |
| | | // endregion |
| | | resolve(); |
| | | }); |
| | | }); |
| | | }, |
| | | updateSize() { |
| | | if (this.currentWidth && this.currentHeight) { |
| | | this.screenWrapper.style.width = `${this.currentWidth}px`; |
| | | this.screenWrapper.style.height = `${this.currentHeight}px`; |
| | | } else { |
| | | this.screenWrapper.style.width = `${this.originalWidth}px`; |
| | | this.screenWrapper.style.height = `${this.originalHeight}px`; |
| | | } |
| | | }, |
| | | handleAutoScale(scale) { |
| | | if (!this.autoScale) return; |
| | | const screenWrapper = this.screenWrapper; |
| | | const domWidth = screenWrapper.clientWidth; |
| | | const domHeight = screenWrapper.clientHeight; |
| | | const currentWidth = document.body.clientWidth; |
| | | const currentHeight = document.body.clientHeight; |
| | | screenWrapper.style.transform = `scale(${scale},${scale}) `; |
| | | let mx = Math.max((currentWidth - domWidth * scale) / 2, 0); |
| | | let my = Math.max((currentHeight - domHeight * scale) / 2, 0); |
| | | if (typeof this.autoScale === "object") { |
| | | // @ts-ignore |
| | | !this.autoScale.x && (mx = 0); |
| | | // @ts-ignore |
| | | !this.autoScale.y && (my = 0); |
| | | } |
| | | // console.log({ |
| | | // mx, |
| | | // my, |
| | | // currentWidth, |
| | | // currentHeight, |
| | | // domWidth, |
| | | // domHeight, |
| | | // scale, |
| | | // }); |
| | | this.screenWrapper.style.margin = `${my}px ${mx}px`; |
| | | }, |
| | | updateScale() { |
| | | const screenWrapper = this.screenWrapper; |
| | | // è·åçå®è§å£å°ºå¯¸ |
| | | const currentWidth = document.body.clientWidth; |
| | | const currentHeight = document.body.clientHeight; |
| | | // è·å大屿ç»ç宽é«onResize |
| | | const realWidth = this.currentWidth || this.originalWidth; |
| | | const realHeight = this.currentHeight || this.originalHeight; |
| | | // 计ç®ç¼©æ¾æ¯ä¾ |
| | | const widthScale = currentWidth / realWidth; |
| | | const heightScale = currentHeight / realHeight; |
| | | // console.log({currentWidth, currentHeight,realWidth,realHeight}); |
| | | |
| | | // è¥è¦éºæ»¡å
¨å±ï¼åæç
§åèªæ¯ä¾ç¼©æ¾ |
| | | if (this.fullScreen) { |
| | | screenWrapper.style.transform = `scale(${widthScale},${heightScale})`; |
| | | return false; |
| | | } |
| | | // æç
§å®½é«æå°æ¯ä¾è¿è¡ç¼©æ¾ |
| | | const scale = Math.min(widthScale, heightScale); |
| | | this.handleAutoScale(scale); |
| | | }, |
| | | initMutationObserver() { |
| | | const screenWrapper = this.screenWrapper; |
| | | const observer = (this.observer = new MutationObserver(() => { |
| | | this.onResize(); |
| | | })); |
| | | |
| | | observer.observe(screenWrapper, { |
| | | attributes: true, |
| | | attributeFilter: ["style"], |
| | | attributeOldValue: true, |
| | | }); |
| | | }, |
| | | clearListener() { |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | addListener() { |
| | | window.addEventListener("resize", this.onResize); |
| | | }, |
| | | clearStyle() { |
| | | // console.log("æ¸
é¤"); |
| | | const screenWrapper = this.screenWrapper; |
| | | screenWrapper.parentNode.style.overflow = "auto"; |
| | | |
| | | screenWrapper.style = ""; |
| | | }, |
| | | async resize() { |
| | | if (!this.selfAdaption) { |
| | | return; |
| | | } |
| | | await this.initSize(); |
| | | this.updateSize(); |
| | | this.updateScale(); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.onResize = debounce(() => { |
| | | this.resize(); |
| | | }, this.delay); |
| | | this.$nextTick(() => { |
| | | if (this.selfAdaption) { |
| | | this.resize(); |
| | | this.addListener(); |
| | | } |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearListener(); |
| | | // this.observer.disconnect() |
| | | }, |
| | | }; |
| | | // |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .screen-box { |
| | | overflow: hidden; |
| | | background-size: 100% 100%; |
| | | background: #000; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .screen-wrapper { |
| | | transition-property: all; |
| | | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| | | transition-duration: 500ms; |
| | | position: relative; |
| | | overflow: hidden; |
| | | z-index: 100; |
| | | transform-origin: left top; |
| | | } |
| | | </style> |
| | |
| | | import Vue from 'vue'; |
| | | import App from './App.vue'; |
| | | import router from './router'; |
| | | import store from './store'; |
| | | import dataV from '@jiaminghi/data-view'; |
| | | // å¼å
¥å
¨å±css |
| | | import './assets/scss/style.scss'; |
| | | // æéå¼å
¥vue-awesome徿 |
| | | import Icon from 'vue-awesome/components/Icon'; |
| | | import 'vue-awesome/icons/chart-bar.js'; |
| | | import 'vue-awesome/icons/chart-area.js'; |
| | | import 'vue-awesome/icons/chart-pie.js'; |
| | | import 'vue-awesome/icons/chart-line.js'; |
| | | import 'vue-awesome/icons/align-left.js'; |
| | | import ElementUI from 'element-ui'; |
| | | import axios from 'axios'; |
| | | import VueAxios from 'vue-axios'; |
| | | /* |
| | | * @Author: daidai |
| | | * @Date: 2022-01-12 14:05:56 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2023-08-07 17:12:07 |
| | | * @FilePath: \web-pc\src\pages\big-screen\main.js |
| | | */ |
| | | import Vue from "vue"; |
| | | import App from "./App.vue"; |
| | | import router from './router' |
| | | import store from './store' |
| | | import {loading,borderBox13,digitalFlop,capsuleChart,borderBox8} from '@jiaminghi/data-view' |
| | | import { Radio,Button,RadioGroup } from 'element-ui' |
| | | import Echart from './components/echart/index.vue' |
| | | import ItemWrap from './components/item-wrap/item-wrap.vue' |
| | | import Message from './components/message/message.vue' |
| | | import Reacquire from './components/reacquire/reacquire.vue' |
| | | import Messages from './components/message/message' |
| | | import dataV from '@jiaminghi/data-view' |
| | | import "vue-easytable/libs/theme-default/index.css"; |
| | | import '@/assets/css/public.scss' |
| | | import "@/assets/css/index.scss" |
| | | |
| | | //å¼å
¥echart |
| | | //4.x å¼ç¨æ¹å¼ |
| | | import echarts from 'echarts' |
| | | //5.x å¼ç¨æ¹å¼ä¸ºæéå¼ç¨ |
| | | //å¸æä½¿ç¨5.xçæ¬çè¯,éè¦å¨package.json䏿´æ°çæ¬å·,并忢å¼ç¨æ¹å¼ |
| | | //import * as echarts from 'echarts' |
| | | Vue.prototype.$echarts = echarts |
| | | |
| | | import * as filters from '@/directives/filters' |
| | | |
| | | require('./mock/mock')//æ¯å¦ä½¿ç¨mock |
| | | Vue.config.productionTip = false; |
| | | Vue.use(VueAxios, axios) |
| | | // å
¨å±æ³¨å |
| | | Vue.component('icon', Icon); |
| | | Vue.use(dataV); |
| | | Vue.use(ElementUI) |
| | | |
| | | // èªå®ä¹ç»ä»¶ |
| | | Vue.component("Echart",Echart) |
| | | Vue.component("ItemWrap",ItemWrap) |
| | | Vue.component("Message",Message) |
| | | Vue.component("Reacquire",Reacquire) |
| | | Vue.prototype.$Message = Messages |
| | | // elementç»ä»¶ |
| | | Vue.use(Radio); |
| | | Vue.use(Button); |
| | | Vue.use(RadioGroup) |
| | | |
| | | // datavç»ä»¶ |
| | | Vue.use(loading) |
| | | Vue.use(borderBox13) |
| | | Vue.use(borderBox8) |
| | | Vue.use(digitalFlop) |
| | | Vue.use(capsuleChart) |
| | | |
| | | // å
¨å±æ°æ®è¿æ»¤å¨ |
| | | Object.keys(filters).forEach(k => Vue.filter(k, filters[k])); |
| | | new Vue({ |
| | | router, |
| | | store, |
| | | render: (h) => h(App), |
| | | }).$mount('#app'); |
| | | render: h => h(App) |
| | | }).$mount("#app"); |
| | |
| | | import Vue from 'vue' |
| | | import VueRouter from 'vue-router' |
| | | /* |
| | | * @Author: daidai |
| | | * @Date: 2022-01-12 14:22:29 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-04-28 14:53:02 |
| | | * @FilePath: \web-pc\src\pages\big-screen\router\index.js |
| | | */ |
| | | import Vue from "vue"; |
| | | import VueRouter from "vue-router"; |
| | | |
| | | Vue.use(VueRouter) |
| | | Vue.use(VueRouter); |
| | | |
| | | const routes = [{ |
| | | const routes = [ { |
| | | path: '/', |
| | | name: 'index', |
| | | component: () => import('../views/index.vue') |
| | | }] |
| | | redirect: '/index', |
| | | }, |
| | | { |
| | | path: '/home', |
| | | name: 'home', |
| | | component: () => import(/* webpackChunkName: "LSD.bighome" */ '../views/home.vue'), |
| | | children:[ |
| | | { |
| | | path: '/index', |
| | | name: 'index', |
| | | component: () => import(/* webpackChunkName: "LSD.bighome" */ '../views/indexs/index.vue'), |
| | | } |
| | | ] |
| | | }, |
| | | ]; |
| | | const router = new VueRouter({ |
| | | mode: "hash", |
| | | // base: process.env.BASE_URL, |
| | | routes |
| | | }) |
| | | }); |
| | | |
| | | export default router |
| | | export default router; |
| | |
| | | import Vue from 'vue' |
| | | import Vuex from 'vuex' |
| | | /* |
| | | * @Author: your name |
| | | * @Date: 2021-07-26 09:32:49 |
| | | * @LastEditTime: 2022-04-26 09:12:33 |
| | | * @LastEditors: Please set LastEditors |
| | | * @Description: In User Settings Edit |
| | | * @FilePath: \web-pc\src\pages\big-screen\store\index.js |
| | | */ |
| | | import Vuex from 'vuex'; |
| | | import Vue from 'vue'; |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | | const modulesFiles = require.context('./modules', true, /\.js$/) |
| | | const modules = modulesFiles.keys().reduce((modules, modulePath) => { |
| | | const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') |
| | | const value = modulesFiles(modulePath) |
| | | modules[moduleName]=value.default |
| | | modules[moduleName].namespaced = true; //æå¼å½åç©ºé´ |
| | | return modules |
| | | }, {}) |
| | | export default new Vuex.Store({ |
| | | modules, |
| | | state: { |
| | | |
| | | }, |
| | | mutations: { |
| | | setCollapsed(state,value){ |
| | | }, |
| | | }, |
| | | actions: { |
| | | getUserdata({commit}){ |
| | | |
| | | }, |
| | | |
| | | }, |
| | | modules: { |
| | | } |
| | | |
| | | }) |
| | |
| | | /* |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 10:48:02 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-04-26 14:55:41 |
| | | * @FilePath: \web-pc\src\pages\big-screen\utils\drawMixin.js |
| | | */ |
| | | // å±å¹éé
mixin 彿° |
| | | |
| | | // * é»è®¤ç¼©æ¾å¼ |
| | |
| | | data() { |
| | | return { |
| | | // * 宿¶å½æ° |
| | | drawTiming: null |
| | | drawTiming: null, |
| | | } |
| | | }, |
| | | computed: { |
| | | isScale(){ |
| | | return this.$store.state.setting.isScale |
| | | } |
| | | }, |
| | | mounted () { |
| | | if(!this.isScale){ |
| | | return |
| | | } |
| | | this.calcRate() |
| | | window.addEventListener('resize', this.resize) |
| | | }, |
| | | beforeDestroy () { |
| | | window.removeEventListener('resize', this.resize) |
| | | window.removeEventListener('resize', this.resize) |
| | | }, |
| | | methods: { |
| | | calcRate () { |
| | |
| | | } |
| | | }, |
| | | resize () { |
| | | if(!this.isScale){ |
| | | return |
| | | } |
| | | clearTimeout(this.drawTiming) |
| | | this.drawTiming = setTimeout(() => { |
| | | this.calcRate() |
| | |
| | | /* |
| | | * @Author: daidai |
| | | * @Date: 2022-02-23 08:59:26 |
| | | * @LastEditors: daidai |
| | | * @LastEditTime: 2022-02-24 17:11:58 |
| | | * @FilePath: \big-screen-vue-datav\src\utils\index.js |
| | | */ |
| | | |
| | | /** |
| | | * @param {Function} fn 鲿彿° |
| | | * @param {Number} delay å»¶è¿æ¶é´ |
| | |
| | | }, delay); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * @param {date} time éè¦è½¬æ¢çæ¶é´ |
| | | * @param {String} fmt éè¦è½¬æ¢çæ ¼å¼ å¦ yyyy-MM-ddãyyyy-MM-dd HH:mm:ss |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-01-12 14:23:32 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-09-09 14:47:24 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\home.vue |
| | | --> |
| | | <template> |
| | | <!-- <div id="index" ref="appRef" class="index_home" :class="{ pageisScale: isScale }"> --> |
| | | <ScaleScreen |
| | | :width="1920" |
| | | :height="1080" |
| | | class="scale-wrap" |
| | | :selfAdaption="$store.state.setting.isScale" |
| | | > |
| | | <div class="bg"> |
| | | <dv-loading v-if="loading">Loading...</dv-loading> |
| | | <div v-else class="host-body"> |
| | | <!-- å¤´é¨ s --> |
| | | <div class="d-flex jc-center title_wrap"> |
| | | <div class="zuojuxing"></div> |
| | | <div class="youjuxing"></div> |
| | | <div class="guang"></div> |
| | | <div class="d-flex jc-center"> |
| | | <div class="title"> |
| | | <span class="title-text">æ·®å®ç¹åæåæ°æ®å±ç¤ºå¹³å°</span> |
| | | </div> |
| | | </div> |
| | | <div class="timers"> |
| | | {{ dateYear }} {{ dateWeek }} {{ dateDay }} |
| | | <i |
| | | class="blq-icon-shezhi02" |
| | | style="margin-left: 10px" |
| | | @click="showSetting" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | <!-- å¤´é¨ e--> |
| | | <!-- å
容 s--> |
| | | <router-view></router-view> |
| | | <!-- å
容 e --> |
| | | </div> |
| | | </div> |
| | | <Setting ref="setting" /> |
| | | </ScaleScreen> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <script> |
| | | import { formatTime } from "../utils/index.js"; |
| | | import Setting from "./setting.vue"; |
| | | import ScaleScreen from "@/components/scale-screen/scale-screen.vue"; |
| | | export default { |
| | | components: { Setting, ScaleScreen }, |
| | | data() { |
| | | return { |
| | | timing: null, |
| | | loading: true, |
| | | dateDay: null, |
| | | dateYear: null, |
| | | dateWeek: null, |
| | | weekday: ["卿¥", "å¨ä¸", "å¨äº", "å¨ä¸", "å¨å", "å¨äº", "å¨å
"], |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | computed: {}, |
| | | created() {}, |
| | | mounted() { |
| | | this.timeFn(); |
| | | this.cancelLoading(); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timing); |
| | | }, |
| | | methods: { |
| | | showSetting() { |
| | | this.$refs.setting.init(); |
| | | }, |
| | | timeFn() { |
| | | this.timing = setInterval(() => { |
| | | this.dateDay = formatTime(new Date(), "HH: mm: ss"); |
| | | this.dateYear = formatTime(new Date(), "yyyy-MM-dd"); |
| | | this.dateWeek = this.weekday[new Date().getDay()]; |
| | | }, 1000); |
| | | }, |
| | | cancelLoading() { |
| | | let timer = setTimeout(() => { |
| | | this.loading = false; |
| | | clearTimeout(timer); |
| | | }, 500); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "./home.scss"; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="center_bottom"> |
| | | <Echart |
| | | :options="options" |
| | | id="bottomLeftChart" |
| | | class="echarts_bottom" |
| | | ></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { currentGET } from "api/modules"; |
| | | import { graphic } from "echarts"; |
| | | import {Productions} from "@/api/http.js" |
| | | import axios from 'axios' |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: { |
| | | tooltip: { |
| | | trigger: "axis", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | formatter: function (params) { |
| | | // æ·»å åä½ |
| | | var result = params[0].name + "<br>"; |
| | | params.forEach(function (item) { |
| | | if (item.value) { |
| | | result += |
| | | item.marker + |
| | | " " + |
| | | "产é" + |
| | | " : " + |
| | | item.value + |
| | | "PCS</br>"; |
| | | } else { |
| | | result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | } |
| | | }); |
| | | return result; |
| | | }, |
| | | }, |
| | | legend: { |
| | | data: ["åä½ï¼PCS"], |
| | | textStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | top: "-5", |
| | | }, |
| | | grid: { |
| | | left: "50px", |
| | | right: "40px", |
| | | bottom: "30px", |
| | | top: "20px", |
| | | }, |
| | | xAxis: { |
| | | data: ['8/12','8/13','8/14','8/15','8/16','8/17','8/18'], |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | splitLine: { show: true }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | | }, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "åä½ï¼PCS", |
| | | type: "bar", |
| | | barWidth: 20, |
| | | itemStyle: { |
| | | normal: { |
| | | borderRadius: 5, |
| | | color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#956FD4" }, |
| | | { offset: 1, color: "#3EACE5" }, |
| | | ]), |
| | | // label: { |
| | | // show: true, //å¼å¯æ¾ç¤º |
| | | // position: 'top', //å¨ä¸æ¹æ¾ç¤º |
| | | // textStyle: { //æ°å¼æ ·å¼ |
| | | // color: '#bdbae2', |
| | | // fontSize: 10 |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | data: ['200','180','190','185','190','188','195'], |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | props: {}, |
| | | mounted() { |
| | | this.getData(); |
| | | this.changeTiming(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData() |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | changeTiming() { |
| | | this.timer=setInterval(() => { |
| | | this.getData(); |
| | | }, 3000); |
| | | }, |
| | | async getData() { |
| | | // this.numberData.forEach((item, index) => { |
| | | // item.number.number[0] += ++index |
| | | // item.number = { ...item.number } |
| | | // }) |
| | | var rep = await Productions(); |
| | | console.log(rep); |
| | | //è·årepä¸å¯¹è±¡ççtoday弿´åææ°ç» |
| | | var todays= rep.map((item) => { |
| | | return item.today; |
| | | }); |
| | | //è·årepä¸å¯¹è±¡ççpcsCounts弿´åææ°ç» |
| | | var pcsCounts= rep.map((item) => { |
| | | return item.pcsCounts; |
| | | }); |
| | | console.log(todays); |
| | | this.options = { |
| | | tooltip: { |
| | | trigger: "axis", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | formatter: function (params) { |
| | | // æ·»å åä½ |
| | | var result = params[0].name + "<br>"; |
| | | params.forEach(function (item) { |
| | | if (item.value) { |
| | | result += |
| | | item.marker + |
| | | " " + |
| | | "产é" + |
| | | " : " + |
| | | item.value + |
| | | "PCS</br>"; |
| | | } else { |
| | | result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | } |
| | | }); |
| | | return result; |
| | | }, |
| | | }, |
| | | legend: { |
| | | data: ["åä½ï¼PCS"], |
| | | textStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | top: "-5", |
| | | }, |
| | | grid: { |
| | | left: "60px", |
| | | right: "40px", |
| | | bottom: "30px", |
| | | top: "20px", |
| | | }, |
| | | xAxis: { |
| | | data: todays.reverse(), |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | splitLine: { show: true }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | | }, |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "åä½ï¼PCS", |
| | | type: "bar", |
| | | barWidth: 20, |
| | | itemStyle: { |
| | | borderRadius: 5, |
| | | color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#956FD4" }, |
| | | { offset: 1, color: "#3EACE5" }, |
| | | ]), |
| | | }, |
| | | data: pcsCounts.reverse(), |
| | | }, |
| | | ], |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | |
| | | // async getData() { |
| | | // this.pageflag = true; |
| | | // let rep = await Timefault((a)=>{ |
| | | // console.log(a); |
| | | // }); |
| | | |
| | | // this.init(rep); |
| | | // currentGET("big6", { companyName: this.companyName }).then((res) => { |
| | | // console.log("æ
éæ¶é¿ç»è®¡", res); |
| | | |
| | | // // if (res.success) { |
| | | // // this.init(res.data); |
| | | // // console.log("æµè¯2",res.data); |
| | | // // } else { |
| | | // // this.pageflag = false; |
| | | // // this.$Message({ |
| | | // // text: res.msg, |
| | | // // type: "warning", |
| | | // // }); |
| | | // // } |
| | | // }); |
| | | // }, |
| | | // init(val) { |
| | | // console.log(val); |
| | | // this.options = { |
| | | // tooltip: { |
| | | // trigger: "axis", |
| | | // backgroundColor: "rgba(0,0,0,.6)", |
| | | // borderColor: "rgba(147, 235, 248, .8)", |
| | | // textStyle: { |
| | | // color: "#FFF", |
| | | // }, |
| | | // formatter: function (params) { |
| | | // // æ·»å åä½ |
| | | // var result = params[0].name + "<br>"; |
| | | // params.forEach(function (item) { |
| | | // if (item.value) { |
| | | // result += |
| | | // item.marker + |
| | | // " " + |
| | | // "åæ ¼äº§é" + |
| | | // " : " + |
| | | // item.value + |
| | | // "ç®±</br>"; |
| | | // } else { |
| | | // result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | // } |
| | | // }); |
| | | // return result; |
| | | // }, |
| | | // }, |
| | | // legend: { |
| | | // data: ["åä½ï¼ç®±"], |
| | | // textStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // top: "-5", |
| | | // }, |
| | | // grid: { |
| | | // left: "50px", |
| | | // right: "40px", |
| | | // bottom: "30px", |
| | | // top: "20px", |
| | | // }, |
| | | // xAxis: { |
| | | // data: [val[6].datetime,val[5].datetime,val[4].datetime,val[3].datetime, |
| | | // val[2].datetime,val[1].datetime,val[0].datetime], |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // }, |
| | | // axisTick: { |
| | | // show: false, |
| | | // }, |
| | | // }, |
| | | // yAxis: [ |
| | | // { |
| | | // splitLine: { show: true }, |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // }, |
| | | // axisLabel: { |
| | | // formatter: "{value}", |
| | | // }, |
| | | // } |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // name: "åä½ï¼ç®±", |
| | | // type: "bar", |
| | | // barWidth: 20, |
| | | // itemStyle: { |
| | | // borderRadius: 5, |
| | | // color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | // { offset: 0, color: "#956FD4" }, |
| | | // { offset: 1, color: "#3EACE5" }, |
| | | // ]), |
| | | // }, |
| | | // data: [val[6].qty,val[5].qty,val[4].qty,val[3].qty, |
| | | // val[2].qty,val[1].qty,val[0].qty], |
| | | // }, |
| | | // ], |
| | | // }; |
| | | // }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .center_bottom { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .echarts_bottom { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-01 11:17:39 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-09-29 15:50:18 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\center-map.vue |
| | | --> |
| | | <template> |
| | | <div class="centermap"> |
| | | <!-- <div class="maptitle"> |
| | | <div class="zuo"></div> |
| | | <span class="titletext">{{ maptitle }}</span> |
| | | <div class="you"></div> |
| | | </div> --> |
| | | <div class="mapwrap"> |
| | | <dv-border-box-13> |
| | | <img class="Screen" src="../../assets/img/3DScreen.png" width="700px" height="392px" alt=""> |
| | | <!-- <div class="quanguo" @click="getData('china')" v-if="code !== 'china'"> |
| | | ä¸å½ |
| | | </div> |
| | | |
| | | <Echart id="CenterMap" :options="options" ref="CenterMap" /> --> |
| | | </dv-border-box-13> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import xzqCode from "../../utils/map/xzqCode"; |
| | | import { currentGET } from "api/modules"; |
| | | import * as echarts from "echarts"; |
| | | import { GETNOBASE } from "api"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | maptitle: "å°é¨ä»¶ä»åºé¢è§å¾", |
| | | options: {}, |
| | | code: "china", //china 代表ä¸å½ å
¶ä»å°å¸æ¯è¡æ¿ç¼ç |
| | | echartBindClick: false, |
| | | isSouthChinaSea: false, //æ¯å¦è¦å±ç¤ºåæµ·ç¾¤å² ä¿®æ¹æ¤å¼è¯·å·æ°é¡µé¢ |
| | | }; |
| | | }, |
| | | created() {}, |
| | | |
| | | mounted() { |
| | | // console.log(xzqCode); |
| | | this.getData("china"); |
| | | }, |
| | | methods: { |
| | | getData(code) { |
| | | // currentGET("big8", { regionCode: code }).then((res) => { |
| | | // console.log("设å¤åå¸", res); |
| | | // if (res.success) { |
| | | // this.getGeojson(res.data.regionCode, res.data.dataList); |
| | | // this.mapclick(); |
| | | // } else { |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | }, |
| | | /** |
| | | * @description: è·ågeojson |
| | | * @param {*} name china 表示ä¸å½ å
¶ä»çä»½è¡æ¿åºç¼ç |
| | | * @param {*} mydata æ¥å£è¿ååè¡¨æ°æ® |
| | | * @return {*} |
| | | */ |
| | | async getGeojson(name, mydata) { |
| | | this.code = name; |
| | | //妿è¦å±ç¤ºå海群å²å¹¶ä¸å±ç¤ºçæ¯ä¸å½çè¯ |
| | | let geoname=name |
| | | if (this.isSouthChinaSea && name == "china") { |
| | | geoname = "chinaNanhai"; |
| | | } |
| | | //å¦æææ³¨åå°å¾çè¯å°±ä¸ç¨å注å äº |
| | | let mapjson = echarts.getMap(name); |
| | | if (mapjson) { |
| | | mapjson = mapjson.geoJSON; |
| | | } else { |
| | | mapjson = await GETNOBASE(`./map-geojson/${geoname}.json`).then((res) => { |
| | | return res; |
| | | }); |
| | | echarts.registerMap(name, mapjson); |
| | | } |
| | | let cityCenter = {}; |
| | | let arr = mapjson.features; |
| | | //æ ¹æ®geojsonè·åç份ä¸å¿ç¹ |
| | | arr.map((item) => { |
| | | cityCenter[item.properties.name] = |
| | | item.properties.centroid || item.properties.center; |
| | | }); |
| | | let newData = []; |
| | | mydata.map((item) => { |
| | | if (cityCenter[item.name]) { |
| | | newData.push({ |
| | | name: item.name, |
| | | value: cityCenter[item.name].concat(item.value), |
| | | }); |
| | | } |
| | | }); |
| | | this.init(name, mydata, newData); |
| | | }, |
| | | init(name, data, data2) { |
| | | // console.log(data2); |
| | | let top = 45; |
| | | let zoom = 1.05; |
| | | let option = { |
| | | backgroundColor: "rgba(0,0,0,0)", |
| | | tooltip: { |
| | | show: false, |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | }, |
| | | visualMap: { |
| | | left: 20, |
| | | bottom: 20, |
| | | pieces: [ |
| | | { gte: 1000, label: "1000个以ä¸" }, // ä¸æå® maxï¼è¡¨ç¤º max 为æ é大ï¼Infinityï¼ã |
| | | { gte: 600, lte: 999, label: "600-999个" }, |
| | | { gte: 200, lte: 599, label: "200-599个" }, |
| | | { gte: 50, lte: 199, label: "49-199个" }, |
| | | { gte: 10, lte: 49, label: "10-49个" }, |
| | | { lte: 9, label: "1-9个" }, // ä¸æå® minï¼è¡¨ç¤º min 为æ é大ï¼-Infinityï¼ã |
| | | ], |
| | | inRange: { |
| | | // æ¸åé¢è²ï¼ä»å°å°å¤§ |
| | | color: [ |
| | | "#c3d7df", |
| | | "#5cb3cc", |
| | | "#8abcd1", |
| | | "#66a9c9", |
| | | "#2f90b9", |
| | | "#1781b5", |
| | | ], |
| | | }, |
| | | textStyle: { |
| | | color: "#fff", |
| | | }, |
| | | }, |
| | | geo: { |
| | | map: name, |
| | | roam: false, |
| | | selectedMode: false, //æ¯å¦å
许éä¸å¤ä¸ªåºå |
| | | zoom: zoom, |
| | | top: top, |
| | | // aspectScale: 0.78, |
| | | show: false, |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "MAP", |
| | | type: "map", |
| | | map: name, |
| | | // aspectScale: 0.78, |
| | | data: data, |
| | | // data: [1,100], |
| | | selectedMode: false, //æ¯å¦å
许éä¸å¤ä¸ªåºå |
| | | zoom: zoom, |
| | | geoIndex: 1, |
| | | top: top, |
| | | tooltip: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | if (params.data) { |
| | | return params.name + "ï¼" + params.data["value"]; |
| | | } else { |
| | | return params.name; |
| | | } |
| | | }, |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | }, |
| | | label: { |
| | | show: false, |
| | | color: "#000", |
| | | // position: [-10, 0], |
| | | formatter: function (val) { |
| | | // console.log(val) |
| | | if (val.data !== undefined) { |
| | | return val.name.slice(0, 2); |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | rich: {}, |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: false, |
| | | }, |
| | | itemStyle: { |
| | | areaColor: "#389BB7", |
| | | borderWidth: 1, |
| | | }, |
| | | }, |
| | | itemStyle: { |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | borderWidth: 1, |
| | | areaColor: { |
| | | type: "radial", |
| | | x: 0.5, |
| | | y: 0.5, |
| | | r: 0.8, |
| | | colorStops: [ |
| | | { |
| | | offset: 0, |
| | | color: "rgba(147, 235, 248, 0)", // 0% å¤çé¢è² |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "rgba(147, 235, 248, .2)", // 100% å¤çé¢è² |
| | | }, |
| | | ], |
| | | globalCoord: false, // 缺为 false |
| | | }, |
| | | shadowColor: "rgba(128, 217, 248, .3)", |
| | | shadowOffsetX: -2, |
| | | shadowOffsetY: 2, |
| | | shadowBlur: 10, |
| | | }, |
| | | }, |
| | | { |
| | | data: data2, |
| | | type: "effectScatter", |
| | | coordinateSystem: "geo", |
| | | symbolSize: function (val) { |
| | | return 4; |
| | | // return val[2] / 50; |
| | | }, |
| | | legendHoverLink: true, |
| | | showEffectOn: "render", |
| | | rippleEffect: { |
| | | // period: 4, |
| | | scale: 6, |
| | | color: "rgba(255,255,255, 1)", |
| | | brushType: "fill", |
| | | }, |
| | | tooltip: { |
| | | show: true, |
| | | formatter: function (params) { |
| | | if (params.data) { |
| | | return params.name + "ï¼" + params.data["value"][2]; |
| | | } else { |
| | | return params.name; |
| | | } |
| | | }, |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | }, |
| | | label: { |
| | | formatter: (param) => { |
| | | return param.name.slice(0, 2); |
| | | }, |
| | | |
| | | fontSize: 11, |
| | | offset: [0, 2], |
| | | position: "bottom", |
| | | textBorderColor: "#fff", |
| | | textShadowColor: "#000", |
| | | textShadowBlur: 10, |
| | | textBorderWidth: 0, |
| | | color: "#FFF", |
| | | show: true, |
| | | }, |
| | | // colorBy: "data", |
| | | itemStyle: { |
| | | color: "rgba(255,255,255,1)", |
| | | borderColor: "rgba(2255,255,255,2)", |
| | | borderWidth: 4, |
| | | shadowColor: "#000", |
| | | shadowBlur: 10, |
| | | }, |
| | | }, |
| | | ], |
| | | //å¨ç»ææ |
| | | // animationDuration: 1000, |
| | | // animationEasing: 'linear', |
| | | // animationDurationUpdate: 1000 |
| | | }; |
| | | this.options = option; |
| | | }, |
| | | message(text) { |
| | | this.$Message({ |
| | | text: text, |
| | | type: "warning", |
| | | }); |
| | | }, |
| | | mapclick() { |
| | | if (this.echartBindClick) return; |
| | | //åå»åæ¢å°çº§å°å¾ï¼å½mapCodeæå¼,说æå¯ä»¥åæ¢å°ä¸çº§å°å¾ |
| | | this.$refs.CenterMap.chart.on("click", (params) => { |
| | | // console.log(params); |
| | | let xzqData = xzqCode[params.name]; |
| | | if (xzqData) { |
| | | this.getData(xzqData.adcode); |
| | | } else { |
| | | this.message("ææ ä¸çº§å°å¸!"); |
| | | } |
| | | }); |
| | | this.echartBindClick = true; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .centermap { |
| | | margin-bottom: 30px; |
| | | |
| | | .maptitle { |
| | | height: 60px; |
| | | display: flex; |
| | | justify-content: center; |
| | | padding-top: 10px; |
| | | box-sizing: border-box; |
| | | |
| | | .titletext { |
| | | font-size: 28px; |
| | | font-weight: 900; |
| | | letter-spacing: 6px; |
| | | background: linear-gradient( |
| | | 92deg, |
| | | #0072ff 0%, |
| | | #00eaff 48.8525390625%, |
| | | #01aaff 100% |
| | | ); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | margin: 0 10px; |
| | | } |
| | | |
| | | .zuo, |
| | | .you { |
| | | background-size: 100% 100%; |
| | | width: 29px; |
| | | height: 20px; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .zuo { |
| | | background: url("../../assets/img/xiezuo.png") no-repeat; |
| | | } |
| | | |
| | | .you { |
| | | background: url("../../assets/img/xieyou.png") no-repeat; |
| | | } |
| | | } |
| | | |
| | | .mapwrap { |
| | | height: 548px; |
| | | width: 100%; |
| | | // padding: 0 0 10px 0; |
| | | box-sizing: border-box; |
| | | position: relative; |
| | | |
| | | .quanguo { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: -46px; |
| | | width: 80px; |
| | | height: 28px; |
| | | border: 1px solid #00eded; |
| | | border-radius: 10px; |
| | | color: #00f7f6; |
| | | text-align: center; |
| | | line-height: 26px; |
| | | letter-spacing: 6px; |
| | | cursor: pointer; |
| | | box-shadow: 0 2px 4px rgba(0, 237, 237, 0.5), |
| | | 0 0 6px rgba(0, 237, 237, 0.4); |
| | | } |
| | | } |
| | | } |
| | | .Screen{ |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 60px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-04 09:23:59 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-05-07 11:05:02 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\index.vue |
| | | --> |
| | | <template> |
| | | <div class="contents"> |
| | | <div class="contetn_left"> |
| | | <div class="pagetab"> |
| | | |
| | | </div> |
| | | <!-- <ItemWrap class="contetn_left-top contetn_lr-item" title="æ
é--ç§ç±»é¢ç"> |
| | | <LeftCenter /> |
| | | </ItemWrap> --> |
| | | |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æåæ§è¡ä»»å¡ç»è®¡" |
| | | > |
| | | <stationone/> |
| | | </ItemWrap> |
| | | |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æååºå屿§åå¸" |
| | | > |
| | | <stationtwo/> |
| | | </ItemWrap> |
| | | |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æåè´§ä½ç¶æä¿¡æ¯" |
| | | > |
| | | <stationthree/> |
| | | </ItemWrap> |
| | | |
| | | </div> |
| | | <div class="contetn_center"> |
| | | <div style="height:70vh;margin-bottom: -30px"> |
| | | <LeftBottom/> |
| | | </div> |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æååºåå±ç¤ºä¿¡æ¯" |
| | | style="padding: 0 10px 16px 10px" |
| | | > |
| | | <RightCenter /> |
| | | </ItemWrap> |
| | | </div> |
| | | <div class="contetn_right"> |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æå产åä¿¡æ¯æè¡" |
| | | style="padding: 0 10px 16px 10px" |
| | | > |
| | | <passtwo /> |
| | | </ItemWrap> |
| | | |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æåå
¥åºäº§éç»è®¡" |
| | | style="padding: 0 10px 16px 10px" |
| | | > |
| | | <CenterBottom /> |
| | | </ItemWrap> |
| | | |
| | | <ItemWrap |
| | | class="contetn_left-bottom contetn_lr-item" |
| | | title="æååºåºäº§éç»è®¡" |
| | | > |
| | | <plan /> |
| | | </ItemWrap> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import LeftTop from './left-top.vue' |
| | | import LeftCenter from "./left-center.vue"; |
| | | import LeftBottom from "./left-bottom.vue"; |
| | | import CenterMap from "./center-map.vue"; |
| | | import CenterBottom from "./center-bottom.vue"; |
| | | import RightTop from "./right-top.vue"; |
| | | import RightCenter from "./right-center.vue"; |
| | | import RightBottom from "./right-bottom.vue"; |
| | | import LeftCenterRight from "./left-center-right.vue"; |
| | | import stationone from './station-one.vue' |
| | | import stationtwo from './station-two.vue' |
| | | import stationthree from './station-three.vue' |
| | | import stationfour from './station-four.vue' |
| | | import passtwo from './pass-two.vue' |
| | | import plan from './plan.vue' |
| | | export default { |
| | | components: { |
| | | LeftTop, |
| | | LeftCenter, |
| | | LeftCenterRight, |
| | | LeftBottom, |
| | | CenterMap, |
| | | RightTop, |
| | | RightCenter, |
| | | RightBottom, |
| | | CenterBottom, |
| | | stationone, |
| | | stationtwo, |
| | | stationthree, |
| | | stationfour, |
| | | passtwo, |
| | | plan |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | |
| | | mounted() {}, |
| | | methods: { |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | // å
容 |
| | | .contents { |
| | | .contetn_left, |
| | | .contetn_right { |
| | | width: 540px; |
| | | box-sizing: border-box; |
| | | // padding: 16px 0; |
| | | } |
| | | |
| | | .contetn_center { |
| | | width: 720px; |
| | | } |
| | | |
| | | //å·¦å³ä¸¤ä¾§ ä¸ä¸ªå |
| | | .contetn_lr-item { |
| | | height: 310px; |
| | | } |
| | | |
| | | .contetn_center_top { |
| | | width: 100%; |
| | | } |
| | | |
| | | // ä¸é´ |
| | | .contetn_center { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | } |
| | | |
| | | .contetn_center-bottom { |
| | | height: 315px; |
| | | } |
| | | |
| | | //左边 å³è¾¹ ç»æä¸æ · |
| | | .contetn_left, |
| | | .contetn_right { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | position: relative; |
| | | |
| | | |
| | | } |
| | | } |
| | | .labels { |
| | | flex-shrink: 0; |
| | | font-size: 24px; |
| | | color: rgba(255, 255, 255, 0.6); |
| | | float: left; |
| | | margin-right: 11.5%; |
| | | } |
| | | .labelsd { |
| | | flex-shrink: 0; |
| | | font-size: 24px; |
| | | color: rgba(255, 255, 255, 0.6); |
| | | float: left; |
| | | margin-left: 6%; |
| | | } |
| | | |
| | | @keyframes rotating { |
| | | 0% { |
| | | -webkit-transform: rotate(0) scale(1); |
| | | transform: rotate(0) scale(1); |
| | | } |
| | | 50% { |
| | | -webkit-transform: rotate(180deg) scale(1.1); |
| | | transform: rotate(180deg) scale(1.1); |
| | | } |
| | | 100% { |
| | | -webkit-transform: rotate(360deg) scale(1); |
| | | transform: rotate(360deg) scale(1); |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <div id="name" style="width: 100%; height: 100%"> |
| | | <Echart :options="options" style="width: 100%; height: 100%"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import { ProLocationStatistics } from "@/api/http.js"; |
| | | import * as echarts from 'echarts'; |
| | | let style = { |
| | | fontSize: 24, |
| | | }; |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageflag: true, |
| | | myChart: {}, |
| | | options: {}, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.options = { |
| | | backgroundColor: '#0a1256', |
| | | //æµ®å¨æ¡ |
| | | tooltip: {}, |
| | | //å¾ä¾ |
| | | legend: { |
| | | right: '12%', |
| | | bottom: '4%', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: '13' |
| | | }, |
| | | itemGap: 20, |
| | | itemWidth: 10, |
| | | itemHeight: 10, |
| | | icon: 'circle', |
| | | data: ['PM2.5', 'CO2', 'SO'] |
| | | }, |
| | | grid: { |
| | | left: '8%', |
| | | top: '15%', |
| | | bottom: '14%', |
| | | width: '86%', |
| | | }, |
| | | visualMap: [{ |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#69dbf7' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'SO', |
| | | seriesIndex: 2 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#1be57a' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'CO2', |
| | | seriesIndex: 1 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#feb01e' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'PM2.5', |
| | | seriesIndex: 0 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#69dbf7' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'SO', |
| | | seriesIndex: 5 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#1be57a' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'CO2', |
| | | seriesIndex: 4 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#feb01e' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'PM2.5', |
| | | seriesIndex: 3 |
| | | }], |
| | | //xè½´ |
| | | xAxis: { |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#132987' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#FFF', |
| | | fontSize: 12 |
| | | }, |
| | | }, |
| | | //å»åº¦çº¿ |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | //åæ è½´æ¾ç¤ºå¼ |
| | | data: ["1æ¶", "2æ¶", "3æ¶", "4æ¶", "5æ¶", "6æ¶", "7æ¶", "8æ¶"] |
| | | }, |
| | | //yè½´ |
| | | yAxis: { |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { // æ¹åyè½´åä½é¢è²åå¤§å° |
| | | //formatter: '{value} m³ ', // ç»yè½´æ·»å åä½ |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 12, |
| | | }, |
| | | }, |
| | | //åæ è½´çº¿ |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | //å»åº¦çº¿ |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | //å¨gridåºåä¸çåé线 |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#132987', |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | // |
| | | series: [{ |
| | | name: 'PM2.5', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#feb01e' |
| | | }, |
| | | data: [43, 50, 41, 18, 28, 25, 26, 40], |
| | | }, { |
| | | name: 'CO2', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#1be57a' |
| | | }, |
| | | data: [21, 30, 37, 39, 23, 37, 5, 50] |
| | | }, { |
| | | name: 'SO', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#69dbf7' |
| | | }, |
| | | data: [76, 58, 60, 38, 49, 59, 78, 60] |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'PM2.5', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#feb01e' |
| | | }, { |
| | | offset: 1, |
| | | color: 'rgba(254,176,30,.3)' |
| | | }]) |
| | | }, |
| | | data: [43, 50, 41, 18, 28, 25, 26, 40] |
| | | |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'CO2', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#1be57a' |
| | | }, { |
| | | offset: 1, |
| | | color: 'rgba(27,229,122,.3)' |
| | | }]) |
| | | }, |
| | | data: [21, 30, 37, 39, 23, 37, 5, 50] |
| | | |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'SO', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#69dbf7' |
| | | }, { |
| | | offset: 1, |
| | | color: '#aefbc3' |
| | | }]) |
| | | }, |
| | | markLine: { |
| | | symbol: "none", |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | } |
| | | }, |
| | | lineStyle: { |
| | | type: "solid", |
| | | color: 'rgba(210,56,56,.6)', |
| | | width: 2 |
| | | }, |
| | | data: [{ |
| | | yAxis: 60 |
| | | }] |
| | | }, |
| | | data: [76, 58, 60, 38, 49, 59, 78, 60] |
| | | |
| | | }] |
| | | }; |
| | | }, |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | var rep = await ProLocationStatistics(); |
| | | this.options = { |
| | | backgroundColor: '#0a1256', |
| | | //æµ®å¨æ¡ |
| | | tooltip: {}, |
| | | //å¾ä¾ |
| | | legend: { |
| | | right: '12%', |
| | | bottom: '4%', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: '13' |
| | | }, |
| | | itemGap: 20, |
| | | itemWidth: 10, |
| | | itemHeight: 10, |
| | | icon: 'circle', |
| | | data: ['æåå
¥åº', 'æååºåº', 'æååæ¡'] |
| | | }, |
| | | grid: { |
| | | left: '8%', |
| | | top: '15%', |
| | | bottom: '14%', |
| | | width: '86%', |
| | | }, |
| | | visualMap: [{ |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#69dbf7' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'æåå
¥åº', |
| | | seriesIndex: 2 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#1be57a' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'æååºåº', |
| | | seriesIndex: 1 |
| | | }, { |
| | | type: 'piecewise', |
| | | show: false, |
| | | pieces: [{ |
| | | gt: 0, |
| | | lte: 60, |
| | | color: '#feb01e' |
| | | }, { |
| | | gte: 60, |
| | | color: '#e5421b' |
| | | }], |
| | | seriesName: 'æååæ¡', |
| | | seriesIndex: 0 |
| | | }], |
| | | //xè½´ |
| | | xAxis: { |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: '#132987' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: '#FFF', |
| | | fontSize: 12 |
| | | }, |
| | | }, |
| | | //å»åº¦çº¿ |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | //åæ è½´æ¾ç¤ºå¼ |
| | | data: ["04/19", "04/20", "04/21", "04/22", "04/23", "04/24", "04/25"] |
| | | }, |
| | | //yè½´ |
| | | yAxis: { |
| | | axisLabel: { // æ¹åyè½´åä½é¢è²åå¤§å° |
| | | //formatter: '{value} m³ ', // ç»yè½´æ·»å åä½ |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 12, |
| | | }, |
| | | }, |
| | | //åæ è½´çº¿ |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | //å»åº¦çº¿ |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | //å¨gridåºåä¸çåé线 |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: '#132987', |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | // |
| | | series: [{ |
| | | name: 'æåå
¥åº', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#feb01e' |
| | | }, |
| | | data: [160, 156, 150, 180, 170, 200, 20], |
| | | }, { |
| | | name: 'æååºåº', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#1be57a' |
| | | }, |
| | | data: [80, 115, 120, 130, 91, 99, 20] |
| | | }, { |
| | | name: 'æååæ¡', |
| | | type: 'line', |
| | | symbolSize: [0, 0], |
| | | itemStyle: { |
| | | color: '#69dbf7' |
| | | }, |
| | | data: [70, 113, 118, 111, 89, 99, 32] |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'æåå
¥åº', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#feb01e' |
| | | }, { |
| | | offset: 1, |
| | | color: 'rgba(254,176,30,.3)' |
| | | }]) |
| | | }, |
| | | data: [160, 156, 150, 180, 170, 200, 20] |
| | | |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'æååºåº', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#1be57a' |
| | | }, { |
| | | offset: 1, |
| | | color: 'rgba(27,229,122,.3)' |
| | | }]) |
| | | }, |
| | | data: [80, 115, 120, 130, 91, 99, 20] |
| | | |
| | | }, { //æ°´æ³¢çº¹ç¹ |
| | | name: 'æååæ¡', |
| | | type: 'effectScatter', |
| | | symbolSize: [5, 5], |
| | | rippleEffect: { |
| | | period: 1, |
| | | scale: 4, |
| | | brushType: 'fill' |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ |
| | | offset: 0, |
| | | color: '#69dbf7' |
| | | }, { |
| | | offset: 1, |
| | | color: '#aefbc3' |
| | | }]) |
| | | }, |
| | | markLine: { |
| | | symbol: "none", |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | } |
| | | }, |
| | | lineStyle: { |
| | | type: "solid", |
| | | color: 'rgba(210,56,56,.6)', |
| | | width: 2 |
| | | }, |
| | | data: [{ |
| | | yAxis: 60 |
| | | }] |
| | | }, |
| | | data: [70, 113, 118, 111, 89, 99, 32] |
| | | |
| | | }] |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-10-25 09:18:22 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <Echart id="leftcenterright" :options="options" class="left_center_inner" v-if="pageflag" ref="charts" /> |
| | | <Reacquire v-else @onclick="getData" style="line-height:200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentPOST } from 'api/modules' |
| | | import {Equipmentfault} from "@/api/http.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | countUserNumData: { |
| | | HoistNum: 0, |
| | | decoderNum: 0, |
| | | uncoderNum: 0, |
| | | elevatorNum:0, |
| | | TransmissionlineNum:0, |
| | | totalNum: 0 |
| | | }, |
| | | pageflag: true, |
| | | timer: null |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | this.changeTiming(); |
| | | }, |
| | | beforeDestroy() { |
| | | // this.clearData() |
| | | |
| | | }, |
| | | methods: { |
| | | changeTiming() { |
| | | setInterval(() => { |
| | | this.getData(); |
| | | }, 5000); |
| | | }, |
| | | // clearData() { |
| | | // if (this.timer) { |
| | | // clearInterval(this.timer) |
| | | // this.timer = null |
| | | // } |
| | | // }, |
| | | async getData() { |
| | | this.pageflag = true |
| | | // this.pageflag =false |
| | | |
| | | // currentPOST('big1').then(res => { |
| | | |
| | | // //åªæå°ä¸æ¬¡ |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§", res); |
| | | // } |
| | | // if (res.success) { |
| | | // // this.countUserNumData = res.data |
| | | // this.$nextTick(() => { |
| | | // this.init() |
| | | // }) |
| | | |
| | | // } else { |
| | | // this.pageflag = false |
| | | // this.$Message({ |
| | | // text: res.msg, |
| | | // type: 'warning' |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | |
| | | let rep = await Equipmentfault((a)=>{ |
| | | console.log(a); |
| | | }); |
| | | |
| | | this.countUserNumData = rep; |
| | | this.$nextTick(() => { |
| | | this.init() |
| | | }) |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return |
| | | } |
| | | let looper = (a) => { |
| | | this.getData() |
| | | }; |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | let myChart = this.$refs.charts.chart |
| | | myChart.on('mouseover', params => { |
| | | this.clearData() |
| | | }); |
| | | myChart.on('mouseout', params => { |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | }); |
| | | }, |
| | | init() { |
| | | let total = this.countUserNumData.total; |
| | | let colors = ["#ECA444", "#33A1DB", "#56B557","#ffb8c6","#FF21FA"]; |
| | | let piedata = { |
| | | name: "æ
é设å¤é¢ç", |
| | | type: "pie", |
| | | radius: ["40%", "70%"], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 4, |
| | | borderColor: "rgba(0,0,0,0)", |
| | | borderWidth: 2, |
| | | }, |
| | | |
| | | color: colors, |
| | | data: [ |
| | | // { |
| | | // value: 0, |
| | | // name: "åè¦", |
| | | // label: { |
| | | // shadowColor: colors[0], |
| | | // }, |
| | | // }, |
| | | { |
| | | value: this.countUserNumData.elevator, |
| | | name: "æåæºæ
é", |
| | | label: { |
| | | shadowColor: colors[0], |
| | | }, |
| | | }, |
| | | { |
| | | value: this.countUserNumData.discremover, |
| | | name: "æç æºæ
é", |
| | | label: { |
| | | shadowColor: colors[2], |
| | | }, |
| | | }, |
| | | { |
| | | value: this.countUserNumData.rgVcCar, |
| | | name: "åå车æ
é", |
| | | label: { |
| | | shadowColor: colors[1], |
| | | }, |
| | | }, |
| | | { |
| | | value: this.countUserNumData.pipeline, |
| | | name: "è¾é线æ
é", |
| | | label: { |
| | | shadowColor: colors[4], |
| | | }, |
| | | } |
| | | ], |
| | | }; |
| | | this.options = { |
| | | title: { |
| | | // zlevel: 0, |
| | | text: ["{value|" + total + "}", "{name|æ»æ°}"].join("\n"), |
| | | top: "center", |
| | | left: "center", |
| | | textStyle: { |
| | | rich: { |
| | | value: { |
| | | color: "#ffffff", |
| | | fontSize: 24, |
| | | fontWeight: "bold", |
| | | lineHeight: 20, |
| | | }, |
| | | name: { |
| | | color: "#ffffff", |
| | | lineHeight: 20, |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | top: "5%", |
| | | left: "center", |
| | | }, |
| | | series: [ |
| | | //å±ç¤ºåç¹ |
| | | { |
| | | ...piedata, |
| | | tooltip: { show: true }, |
| | | label: { |
| | | formatter: " {b|{b}}", |
| | | // formatter: " {b|{b}} \n {c|{c}个} {per|{d}%} ", |
| | | // position: "outside", |
| | | rich: { |
| | | b: { |
| | | color: "#fff", |
| | | fontSize: 12, |
| | | lineHeight: 26, |
| | | }, |
| | | c: { |
| | | color: "#31ABE3", |
| | | fontSize: 14, |
| | | }, |
| | | per: { |
| | | color: "#31ABE3", |
| | | fontSize: 14, |
| | | }, |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 30, // ç¬¬ä¸æ®µçº¿ é¿åº¦ |
| | | length2: 46, // ç¬¬äºæ®µçº¿ é¿åº¦ |
| | | show: true, |
| | | |
| | | }, |
| | | emphasis: { |
| | | show: true, |
| | | }, |
| | | }, |
| | | { |
| | | ...piedata, |
| | | tooltip: { show: true }, |
| | | itemStyle: {}, |
| | | label: { |
| | | backgroundColor: "inherit", //åç¹é¢è²ï¼autoï¼æ å°çç³»åè² |
| | | height: 0, |
| | | width: 0, |
| | | lineHeight: 0, |
| | | borderRadius: 2.5, |
| | | shadowBlur: 8, |
| | | shadowColor: "auto", |
| | | padding: [2.5, -2.5, 2.5, -2.5], |
| | | }, |
| | | labelLine: { |
| | | length: 30, // ç¬¬ä¸æ®µçº¿ é¿åº¦ |
| | | length2: 46, // ç¬¬äºæ®µçº¿ é¿åº¦ |
| | | show: false, |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-10-25 09:18:22 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <Echart id="leftCenter" :options="options" class="left_center_inner" v-if="pageflag" ref="charts" /> |
| | | <Reacquire v-else @onclick="getData" style="line-height:200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from 'api/modules' |
| | | import {Failuremode} from "@/api/http.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | countUserNumData: { |
| | | lockNum: 0, |
| | | onlineNum: 0, |
| | | offlineNum: 0, |
| | | totalNum: 0 |
| | | }, |
| | | pageflag: true, |
| | | timer: null |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | this.changeTiming(); |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | // this.clearData() |
| | | }, |
| | | methods: { |
| | | changeTiming() { |
| | | setInterval(() => { |
| | | this.getData(); |
| | | }, 5000); |
| | | }, |
| | | // clearData() { |
| | | // if (this.timer) { |
| | | // clearInterval(this.timer) |
| | | // this.timer = null |
| | | // } |
| | | // }, |
| | | async getData() { |
| | | // this.pageflag = true |
| | | let rep = await Failuremode((a)=>{ |
| | | console.log(a); |
| | | }); |
| | | this.countUserNumData = { |
| | | offlineNum: rep.overtime, |
| | | onlineNum: rep.sensitization, |
| | | lockNum: rep.rgVcCar, |
| | | totalNum: rep.total |
| | | }, |
| | | this.$nextTick(() => { |
| | | this.init() |
| | | }) |
| | | // this.pageflag =false |
| | | |
| | | // currentGET('big1').then(res => { |
| | | // //åªæå°ä¸æ¬¡ |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.countUserNumData = res.data |
| | | // this.$nextTick(() => { |
| | | // this.init() |
| | | // }) |
| | | |
| | | // } else { |
| | | // this.pageflag = false |
| | | // this.$Message({ |
| | | // text: res.msg, |
| | | // type: 'warning' |
| | | // }) |
| | | // } |
| | | // }) |
| | | |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return |
| | | } |
| | | let looper = (a) => { |
| | | this.getData() |
| | | }; |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | let myChart = this.$refs.charts.chart |
| | | myChart.on('mouseover', params => { |
| | | this.clearData() |
| | | }); |
| | | myChart.on('mouseout', params => { |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | }); |
| | | }, |
| | | init() { |
| | | let total = this.countUserNumData.totalNum; |
| | | let colors = ["#ECA444", "#33A1DB", "#56B557","#ffb8c6"]; |
| | | let piedata = { |
| | | name: "æ
éç§ç±»é¢ç", |
| | | type: "pie", |
| | | radius: ["42%", "65%"], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 4, |
| | | borderColor: "rgba(0,0,0,0)", |
| | | borderWidth: 2, |
| | | }, |
| | | |
| | | color: colors, |
| | | data: [ |
| | | // { |
| | | // value: 0, |
| | | // name: "åè¦", |
| | | // label: { |
| | | // shadowColor: colors[0], |
| | | // }, |
| | | // }, |
| | | { |
| | | value: this.countUserNumData.onlineNum, |
| | | name: "å
çµæ
é", |
| | | label: { |
| | | shadowColor: colors[0], |
| | | }, |
| | | }, |
| | | { |
| | | value: this.countUserNumData.lockNum, |
| | | name: "åå车æ
é", |
| | | label: { |
| | | shadowColor: colors[2], |
| | | }, |
| | | }, |
| | | // { |
| | | // value: this.countUserNumData.onlineNum, |
| | | // name: "è¶
é使
é", |
| | | // label: { |
| | | // shadowColor: colors[1], |
| | | // }, |
| | | // }, |
| | | { |
| | | value: this.countUserNumData.offlineNum, |
| | | name: "è¶
æ¶æ
é", |
| | | label: { |
| | | shadowColor: colors[3], |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | this.options = { |
| | | title: { |
| | | // zlevel: 0, |
| | | text: ["{value|" + total + "}", "{name|æ»æ°}"].join("\n"), |
| | | top: "center", |
| | | left: "center", |
| | | textStyle: { |
| | | rich: { |
| | | value: { |
| | | color: "#ffffff", |
| | | fontSize: 24, |
| | | fontWeight: "bold", |
| | | lineHeight: 20, |
| | | }, |
| | | name: { |
| | | color: "#ffffff", |
| | | lineHeight: 20, |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: "item", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | top: "5%", |
| | | left: "center", |
| | | }, |
| | | series: [ |
| | | //å±ç¤ºåç¹ |
| | | { |
| | | ...piedata, |
| | | tooltip: { show: true }, |
| | | label: { |
| | | formatter: " {b|{b}}", |
| | | // position: "outside", |
| | | rich: { |
| | | b: { |
| | | color: "#fff", |
| | | fontSize: 12, |
| | | lineHeight: 26, |
| | | }, |
| | | c: { |
| | | color: "#31ABE3", |
| | | fontSize: 14, |
| | | }, |
| | | per: { |
| | | color: "#31ABE3", |
| | | fontSize: 14, |
| | | }, |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 30, // ç¬¬ä¸æ®µçº¿ é¿åº¦ |
| | | length2: 46, // ç¬¬äºæ®µçº¿ é¿åº¦ |
| | | show: true, |
| | | |
| | | }, |
| | | emphasis: { |
| | | show: true, |
| | | }, |
| | | }, |
| | | { |
| | | ...piedata, |
| | | tooltip: { show: true }, |
| | | itemStyle: {}, |
| | | label: { |
| | | backgroundColor: "inherit", //åç¹é¢è²ï¼autoï¼æ å°çç³»åè² |
| | | height: 0, |
| | | width: 0, |
| | | lineHeight: 0, |
| | | borderRadius: 2.5, |
| | | shadowBlur: 8, |
| | | shadowColor: "auto", |
| | | padding: [2.5, -2.5, 2.5, -2.5], |
| | | }, |
| | | labelLine: { |
| | | length: 30, // ç¬¬ä¸æ®µçº¿ é¿åº¦ |
| | | length2: 46, // ç¬¬äºæ®µçº¿ é¿åº¦ |
| | | show: false, |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <ul class="user_Overview flex" v-if="pageflag"> |
| | | <li class="user_Overview-item" style="color: #00fdfa"> |
| | | <div class="user_Overview_nums allnum "> |
| | | <dv-digital-flop :config="onlineconfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>䏿¥¼è´§æ¶</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #07f7a8"> |
| | | <div class="user_Overview_nums online"> |
| | | <dv-digital-flop :config="config" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>äºæ¥¼è´§æ¶</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #e3b337"> |
| | | <div class="user_Overview_nums offline"> |
| | | <dv-digital-flop :config="offlineconfig" style="width:100%;height:100%;" /> |
| | | |
| | | </div> |
| | | <p>å
楼货æ¶</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #f5023d"> |
| | | <div class="user_Overview_nums laramnum"> |
| | | <dv-digital-flop :config="laramnumconfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>䏿¥¼è´§æ¶</p> |
| | | </li> |
| | | </ul> |
| | | <Reacquire v-else @onclick="getData" line-height="200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from 'api/modules' |
| | | import {Floorfault} from "@/api/http.js" |
| | | let style = { |
| | | fontSize: 24 |
| | | } |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | userOverview: { |
| | | alarmNum: 2, |
| | | offlineNum: 3, |
| | | onlineNum: 5, |
| | | totalNum: 10, |
| | | }, |
| | | pageflag: true, |
| | | timer: null, |
| | | config: { |
| | | number: [100], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#00fdfa", |
| | | fill: "#00fdfa", |
| | | }, |
| | | }, |
| | | onlineconfig: { |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#07f7a8", |
| | | fill: "#07f7a8", |
| | | }, |
| | | }, |
| | | offlineconfig: { |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#e3b337", |
| | | fill: "#e3b337", |
| | | }, |
| | | }, |
| | | laramnumconfig: { |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#f5023d", |
| | | fill: "#f5023d", |
| | | }, |
| | | } |
| | | |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData() |
| | | |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | let rep = await Floorfault((a)=>{ |
| | | console.log(a); |
| | | }); |
| | | this.onlineconfig = { |
| | | ...this.onlineconfig, |
| | | number: [rep.threefloor] |
| | | } |
| | | this.config = { |
| | | ...this.config, |
| | | number: [rep.fivefloor] |
| | | } |
| | | this.offlineconfig = { |
| | | ...this.offlineconfig, |
| | | number: [rep.sixfloor] |
| | | } |
| | | this.laramnumconfig = { |
| | | ...this.laramnumconfig, |
| | | number: [rep.sevenfloor] |
| | | } |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return |
| | | } |
| | | let looper = (a) => { |
| | | this.getData() |
| | | }; |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ''; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <div id="name" style="width: 100%; height: 100%"> |
| | | <Echart :options="options" style="width: 100%; height: 100%"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import { ProductionRanking } from "@/api/http.js"; |
| | | import * as echarts from 'echarts'; |
| | | let style = { |
| | | fontSize: 24, |
| | | }; |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageflag: true, |
| | | myChart: {}, |
| | | options: {}, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | // import echarts from 'echarts' |
| | | var charts = { // æé¡ºåºæåä»å¤§å°å° |
| | | cityList: ['38å·ç¹ï¼1ï¼', '38å·ç¹ï¼2ï¼', '15å·ç¹', '16å·ç¹', '24å·ç¹'], |
| | | cityData: [7500, 6200, 5700, 4200, 3500] |
| | | } |
| | | var top10CityList = charts.cityList |
| | | var top10CityData = charts.cityData |
| | | var color = ['rgba(248,195,248', 'rgba(100,255,249', 'rgba(135,183,255', 'rgba(248,195,248', 'rgba(100,255,249'] |
| | | |
| | | let lineY = [] |
| | | for (var i = 0; i < charts.cityList.length; i++) { |
| | | var x = i |
| | | if (x > color.length - 1) { |
| | | x = color.length - 1 |
| | | } |
| | | var data = { |
| | | name: charts.cityList[i], |
| | | color: color[x] + ')', |
| | | value: top10CityData[i], |
| | | itemStyle: { |
| | | normal: { |
| | | show: true, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ |
| | | offset: 0, |
| | | color: color[x] + ', 0.3)' |
| | | }, { |
| | | offset: 1, |
| | | color: color[x] + ', 1)' |
| | | }], false), |
| | | barBorderRadius: 10 |
| | | }, |
| | | emphasis: { |
| | | shadowBlur: 15, |
| | | shadowColor: 'rgba(0, 0, 0, 0.1)' |
| | | } |
| | | } |
| | | } |
| | | lineY.push(data) |
| | | } |
| | | |
| | | console.log(lineY) |
| | | this.options= { |
| | | backgroundColor:'#000', |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | grid: { |
| | | borderWidth: 0, |
| | | top: '10%', |
| | | left: '5%', |
| | | right: '15%', |
| | | bottom: '3%' |
| | | }, |
| | | color: color, |
| | | yAxis: [{ |
| | | type: 'category', |
| | | inverse: true, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false, |
| | | inside: false |
| | | }, |
| | | data: top10CityList |
| | | }, { |
| | | type: 'category', |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: true, |
| | | inside: false, |
| | | textStyle: { |
| | | color: '#b3ccf8', |
| | | fontSize: '14', |
| | | fontFamily: 'PingFangSC-Regular' |
| | | }, |
| | | formatter: function (val) { |
| | | return `${val}k` |
| | | } |
| | | }, |
| | | splitArea: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | data: top10CityData |
| | | }], |
| | | xAxis: { |
| | | type: 'value', |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | } |
| | | }, |
| | | series: [{ |
| | | name: '', |
| | | type: 'bar', |
| | | zlevel: 2, |
| | | barWidth: '10px', |
| | | data: lineY, |
| | | animationDuration: 1500, |
| | | label: { |
| | | normal: { |
| | | color: '#b3ccf8', |
| | | show: true, |
| | | position: [0, '-24px'], |
| | | textStyle: { |
| | | fontSize: 16 |
| | | }, |
| | | formatter: function (a, b) { |
| | | return a.name |
| | | } |
| | | } |
| | | } |
| | | }], |
| | | animationEasing: 'cubicOut' |
| | | } |
| | | }, |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | var rep = await ProductionRanking(); |
| | | var cityLists= rep.map((item,index) => { |
| | | return '#'+(index+1)+' 产å'+item.pCode; |
| | | }); |
| | | var cityDatas= rep.map((item,index) => { |
| | | return item.qtys; |
| | | }); |
| | | var charts = { // æé¡ºåºæåä»å¤§å°å° |
| | | cityList: cityLists, |
| | | cityData: cityDatas |
| | | } |
| | | var top10CityList = charts.cityList |
| | | var top10CityData = charts.cityData |
| | | var color = ['rgba(248,195,248', 'rgba(100,255,249', 'rgba(135,183,255', 'rgba(248,195,248', 'rgba(100,255,249'] |
| | | |
| | | let lineY = [] |
| | | for (var i = 0; i < charts.cityList.length; i++) { |
| | | var x = i |
| | | if (x > color.length - 1) { |
| | | x = color.length - 1 |
| | | } |
| | | var data = { |
| | | name: charts.cityList[i], |
| | | color: color[x] + ')', |
| | | value: top10CityData[i], |
| | | itemStyle: { |
| | | normal: { |
| | | show: true, |
| | | color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ |
| | | offset: 0, |
| | | color: color[x] + ', 0.3)' |
| | | }, { |
| | | offset: 1, |
| | | color: color[x] + ', 1)' |
| | | }], false), |
| | | barBorderRadius: 10 |
| | | }, |
| | | emphasis: { |
| | | shadowBlur: 15, |
| | | shadowColor: 'rgba(0, 0, 0, 0.1)' |
| | | } |
| | | } |
| | | } |
| | | lineY.push(data) |
| | | } |
| | | |
| | | console.log(lineY) |
| | | this.options= { |
| | | backgroundColor:'#000', |
| | | title: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | grid: { |
| | | borderWidth: 0, |
| | | top: '10%', |
| | | left: '5%', |
| | | right: '15%', |
| | | bottom: '3%' |
| | | }, |
| | | color: color, |
| | | yAxis: [{ |
| | | type: 'category', |
| | | inverse: true, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false, |
| | | inside: false |
| | | }, |
| | | data: top10CityList |
| | | }, { |
| | | type: 'category', |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: true, |
| | | inside: false, |
| | | textStyle: { |
| | | color: '#b3ccf8', |
| | | fontSize: '14', |
| | | fontFamily: 'PingFangSC-Regular' |
| | | }, |
| | | formatter: function (val) { |
| | | return `${val}PCS` |
| | | } |
| | | }, |
| | | splitArea: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | data: top10CityData.reverse() |
| | | }], |
| | | xAxis: { |
| | | type: 'value', |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | show: false |
| | | } |
| | | }, |
| | | series: [{ |
| | | name: '', |
| | | type: 'bar', |
| | | zlevel: 2, |
| | | barWidth: '10px', |
| | | data: lineY, |
| | | animationDuration: 1500, |
| | | label: { |
| | | normal: { |
| | | color: '#b3ccf8', |
| | | show: true, |
| | | position: [0, '-24px'], |
| | | textStyle: { |
| | | fontSize: 16 |
| | | }, |
| | | formatter: function (a, b) { |
| | | return a.name |
| | | } |
| | | } |
| | | } |
| | | }], |
| | | animationEasing: 'cubicOut' |
| | | } |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="center_bottom"> |
| | | <Echart |
| | | :options="options" |
| | | id="bottomLeftChart" |
| | | class="echarts_bottom" |
| | | ></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { currentGET } from "api/modules"; |
| | | import { graphic } from "echarts"; |
| | | import {ProductionsOut} from "@/api/http.js" |
| | | import axios from 'axios' |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: { |
| | | tooltip: { |
| | | trigger: "axis", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | formatter: function (params) { |
| | | // æ·»å åä½ |
| | | var result = params[0].name + "<br>"; |
| | | params.forEach(function (item) { |
| | | if (item.value) { |
| | | result += |
| | | item.marker + |
| | | " " + |
| | | "产é" + |
| | | " : " + |
| | | item.value + |
| | | "PCS</br>"; |
| | | } else { |
| | | result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | } |
| | | }); |
| | | return result; |
| | | }, |
| | | }, |
| | | legend: { |
| | | data: ["åä½ï¼PCS"], |
| | | textStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | top: "-5", |
| | | }, |
| | | grid: { |
| | | left: "60px", |
| | | right: "0px", |
| | | bottom: "30px", |
| | | top: "20px", |
| | | }, |
| | | xAxis: { |
| | | data: ['8/12','8/13','8/14','8/15','8/16','8/17','8/18'], |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | splitLine: { show: true }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | | }, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "åä½ï¼PCS", |
| | | type: "bar", |
| | | barWidth: 20, |
| | | itemStyle: { |
| | | normal: { |
| | | borderRadius: 5, |
| | | color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#956FD4" }, |
| | | { offset: 1, color: "#3EACE5" }, |
| | | ]), |
| | | // label: { |
| | | // show: true, //å¼å¯æ¾ç¤º |
| | | // position: 'top', //å¨ä¸æ¹æ¾ç¤º |
| | | // textStyle: { //æ°å¼æ ·å¼ |
| | | // color: '#bdbae2', |
| | | // fontSize: 10 |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | data: ['200','180','190','185','190','188','195'], |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | props: {}, |
| | | mounted() { |
| | | this.getData(); |
| | | this.changeTiming(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData() |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | changeTiming() { |
| | | this.timer=setInterval(() => { |
| | | this.getData(); |
| | | }, 3000); |
| | | }, |
| | | async getData() { |
| | | // this.numberData.forEach((item, index) => { |
| | | // item.number.number[0] += ++index |
| | | // item.number = { ...item.number } |
| | | // }) |
| | | var rep = await ProductionsOut(); |
| | | console.log(rep); |
| | | //è·årepä¸å¯¹è±¡ççtoday弿´åææ°ç» |
| | | var todays= rep.map((item) => { |
| | | return item.today; |
| | | }); |
| | | //è·årepä¸å¯¹è±¡ççpcsCounts弿´åææ°ç» |
| | | var pcsCounts= rep.map((item) => { |
| | | return item.pcsCounts; |
| | | }); |
| | | console.log(todays); |
| | | this.options = { |
| | | tooltip: { |
| | | trigger: "axis", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | formatter: function (params) { |
| | | // æ·»å åä½ |
| | | var result = params[0].name + "<br>"; |
| | | params.forEach(function (item) { |
| | | if (item.value) { |
| | | result += |
| | | item.marker + |
| | | " " + |
| | | "产é" + |
| | | " : " + |
| | | item.value + |
| | | "PCS</br>"; |
| | | } else { |
| | | result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | } |
| | | }); |
| | | return result; |
| | | }, |
| | | }, |
| | | legend: { |
| | | data: ["åä½ï¼PCS"], |
| | | textStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | top: "-5", |
| | | }, |
| | | grid: { |
| | | left: "60px", |
| | | right: "40px", |
| | | bottom: "30px", |
| | | top: "20px", |
| | | }, |
| | | xAxis: { |
| | | data: todays.reverse(), |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | splitLine: { show: true }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#B4B4B4", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | | }, |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "åä½ï¼PCS", |
| | | type: "bar", |
| | | barWidth: 20, |
| | | itemStyle: { |
| | | borderRadius: 5, |
| | | color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#956FD4" }, |
| | | { offset: 1, color: "#3EACE5" }, |
| | | ]), |
| | | }, |
| | | data: pcsCounts.reverse(), |
| | | }, |
| | | ], |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | |
| | | // async getData() { |
| | | // this.pageflag = true; |
| | | // let rep = await Timefault((a)=>{ |
| | | // console.log(a); |
| | | // }); |
| | | |
| | | // this.init(rep); |
| | | // currentGET("big6", { companyName: this.companyName }).then((res) => { |
| | | // console.log("æ
éæ¶é¿ç»è®¡", res); |
| | | |
| | | // // if (res.success) { |
| | | // // this.init(res.data); |
| | | // // console.log("æµè¯2",res.data); |
| | | // // } else { |
| | | // // this.pageflag = false; |
| | | // // this.$Message({ |
| | | // // text: res.msg, |
| | | // // type: "warning", |
| | | // // }); |
| | | // // } |
| | | // }); |
| | | // }, |
| | | // init(val) { |
| | | // console.log(val); |
| | | // this.options = { |
| | | // tooltip: { |
| | | // trigger: "axis", |
| | | // backgroundColor: "rgba(0,0,0,.6)", |
| | | // borderColor: "rgba(147, 235, 248, .8)", |
| | | // textStyle: { |
| | | // color: "#FFF", |
| | | // }, |
| | | // formatter: function (params) { |
| | | // // æ·»å åä½ |
| | | // var result = params[0].name + "<br>"; |
| | | // params.forEach(function (item) { |
| | | // if (item.value) { |
| | | // result += |
| | | // item.marker + |
| | | // " " + |
| | | // "åæ ¼äº§é" + |
| | | // " : " + |
| | | // item.value + |
| | | // "ç®±</br>"; |
| | | // } else { |
| | | // result += item.marker + " " + item.seriesName + " : - </br>"; |
| | | // } |
| | | // }); |
| | | // return result; |
| | | // }, |
| | | // }, |
| | | // legend: { |
| | | // data: ["åä½ï¼ç®±"], |
| | | // textStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // top: "-5", |
| | | // }, |
| | | // grid: { |
| | | // left: "50px", |
| | | // right: "40px", |
| | | // bottom: "30px", |
| | | // top: "20px", |
| | | // }, |
| | | // xAxis: { |
| | | // data: [val[6].datetime,val[5].datetime,val[4].datetime,val[3].datetime, |
| | | // val[2].datetime,val[1].datetime,val[0].datetime], |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // }, |
| | | // axisTick: { |
| | | // show: false, |
| | | // }, |
| | | // }, |
| | | // yAxis: [ |
| | | // { |
| | | // splitLine: { show: true }, |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: "#B4B4B4", |
| | | // }, |
| | | // }, |
| | | // axisLabel: { |
| | | // formatter: "{value}", |
| | | // }, |
| | | // } |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // name: "åä½ï¼ç®±", |
| | | // type: "bar", |
| | | // barWidth: 20, |
| | | // itemStyle: { |
| | | // borderRadius: 5, |
| | | // color: new graphic.LinearGradient(0, 0, 0, 1, [ |
| | | // { offset: 0, color: "#956FD4" }, |
| | | // { offset: 1, color: "#3EACE5" }, |
| | | // ]), |
| | | // }, |
| | | // data: [val[6].qty,val[5].qty,val[4].qty,val[3].qty, |
| | | // val[2].qty,val[1].qty,val[0].qty], |
| | | // }, |
| | | // ], |
| | | // }; |
| | | // }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .center_bottom { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .echarts_bottom { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-01 15:27:58 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-05-07 11:24:14 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\right-center.vue |
| | | --> |
| | | <template> |
| | | <div v-if="pageflag" class="right_center_wrap beautify-scroll-def" :class="{ 'overflow-y-auto': !sbtxSwiperFlag }"> |
| | | <component :is="components" :data="list" :class-option="defaultOption"> |
| | | <ul class="right_center "> |
| | | <li class="right_center_item" v-for="(item, i) in list" :key="i"> |
| | | <span class="orderNum">{{ i + 1 }}</span> |
| | | <div class="inner_right"> |
| | | <div class="dibu"></div> |
| | | <div class="flex"> |
| | | <div class="info"> |
| | | <span class="labels ">设å¤IDï¼</span> |
| | | <span class="contents zhuyao"> {{ item.gatewayno }}</span> |
| | | </div> |
| | | <div class="info"> |
| | | <span class="labels">åå·ï¼</span> |
| | | <span class="contents "> {{ item.terminalno }}</span> |
| | | </div> |
| | | <div class="info"> |
| | | <span class="labels">åè¦å¼ï¼</span> |
| | | <span class="contents warning"> {{ item.alertvalue | montionFilter }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="flex"> |
| | | |
| | | <div class="info"> |
| | | <span class="labels"> å°åï¼</span> |
| | | <span class="contents ciyao" style="font-size:12px"> {{ item.provinceName }}/{{ item.cityName }}/{{ item.countyName }}</span> |
| | | </div> |
| | | <div class="info time"> |
| | | <span class="labels">æ¶é´ï¼</span> |
| | | <span class="contents" style="font-size:12px"> {{ item.createtime }}</span> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="flex"> |
| | | |
| | | <div class="info"> |
| | | <span class="labels">æ¥è¦å
容ï¼</span> |
| | | <span class="contents ciyao" :class="{ warning: item.alertdetail }"> {{ item.alertdetail || 'æ ' |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | </component> |
| | | </div> |
| | | <Reacquire v-else @onclick="getData" style="line-height:200px" /> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from 'api/modules' |
| | | import vueSeamlessScroll from 'vue-seamless-scroll' // vue2å¼å
¥æ¹å¼ |
| | | import Kong from '../../components/kong.vue' |
| | | export default { |
| | | components: { vueSeamlessScroll, Kong }, |
| | | |
| | | data() { |
| | | return { |
| | | list: [], |
| | | pageflag: true, |
| | | defaultOption: { |
| | | ...this.$store.state.setting.defaultOption, |
| | | limitMoveNum: 3, |
| | | singleHeight: 250, |
| | | step:0, |
| | | } |
| | | |
| | | }; |
| | | }, |
| | | computed: { |
| | | sbtxSwiperFlag() { |
| | | let ssyjSwiper = this.$store.state.setting.ssyjSwiper |
| | | if (ssyjSwiper) { |
| | | this.components = vueSeamlessScroll |
| | | } else { |
| | | this.components = Kong |
| | | } |
| | | return ssyjSwiper |
| | | } |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | |
| | | mounted() { }, |
| | | methods: { |
| | | getData() { |
| | | this.pageflag = true |
| | | // this.pageflag =false |
| | | currentGET('big5', { limitNum: 50 }).then(res => { |
| | | console.log('宿¶é¢è¦', res); |
| | | if (res.success) { |
| | | this.list = res.data.list |
| | | let timer = setTimeout(() => { |
| | | clearTimeout(timer) |
| | | this.defaultOption.step=this.$store.state.setting.defaultOption.step |
| | | }, this.$store.state.setting.defaultOption.waitTime); |
| | | } else { |
| | | this.pageflag = false |
| | | this.$Message.warning(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .right_center { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .right_center_item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: auto; |
| | | padding: 10px; |
| | | font-size: 14px; |
| | | color: #fff; |
| | | |
| | | .orderNum { |
| | | margin: 0 20px 0 -20px; |
| | | } |
| | | |
| | | |
| | | .inner_right { |
| | | position: relative; |
| | | height: 100%; |
| | | width: 400px; |
| | | flex-shrink: 0; |
| | | line-height: 1.5; |
| | | |
| | | .dibu { |
| | | position: absolute; |
| | | height: 2px; |
| | | width: 104%; |
| | | background-image: url("../../assets/img/zuo_xuxian.png"); |
| | | bottom: -12px; |
| | | left: -2%; |
| | | background-size: cover; |
| | | } |
| | | } |
| | | |
| | | .info { |
| | | margin-right: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .labels { |
| | | flex-shrink: 0; |
| | | font-size: 12px; |
| | | color: rgba(255, 255, 255, 0.6); |
| | | } |
| | | |
| | | .zhuyao { |
| | | color: $primary-color; |
| | | font-size: 15px; |
| | | } |
| | | |
| | | .ciyao { |
| | | color: rgba(255, 255, 255, 0.8); |
| | | } |
| | | |
| | | .warning { |
| | | color: #E6A23C; |
| | | font-size: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .right_center_wrap { |
| | | overflow: hidden; |
| | | width: 100%; |
| | | height: 250px; |
| | | } |
| | | |
| | | .overflow-y-auto { |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <div id="name" style="width: 100%; height: 100%"> |
| | | <Echart :options="options" style="width: 100%; height: 100%"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import { ProductionStock } from "@/api/http.js"; |
| | | import * as echarts from 'echarts'; |
| | | let style = { |
| | | fontSize: 24, |
| | | }; |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageflag: true, |
| | | myChart: {}, |
| | | options: {}, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | var data1 = [{ |
| | | text: 'æ¬ææ¶æéé¢(ä¸å
)', |
| | | value: '588,10', |
| | | color: '#5dd054' |
| | | }, { |
| | | text: 'æ¬å¹´æ¶æéé¢(ä¸å
)', |
| | | value: '14,131', |
| | | color: '#097ff9' |
| | | }, { |
| | | text: 'æ¶ææ»éé¢(ä¸å
)', |
| | | value: '12,131', |
| | | color: '#ff6804' |
| | | }]; |
| | | |
| | | function dataFormat(v = { |
| | | value: '12345,12', |
| | | color: '#5dd054' |
| | | }) { |
| | | return [{ |
| | | value: 0, |
| | | name: v.value, |
| | | itemStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient( |
| | | 0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: '#00feff' |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: v.color |
| | | } |
| | | ] |
| | | ) |
| | | } |
| | | }, |
| | | label: { |
| | | normal: { |
| | | textStyle: { |
| | | fontSize: 30, |
| | | fontWeight: 500, |
| | | color: '#fff' |
| | | } |
| | | } |
| | | } |
| | | }] |
| | | } |
| | | |
| | | function childrenFun(str = 'æé®') { |
| | | return [{ |
| | | type: 'rect', |
| | | left: 'center', |
| | | top: 'center', |
| | | shape: { |
| | | width: 150, |
| | | height: 40, |
| | | r: 20 |
| | | }, |
| | | style: { |
| | | fill: '#4709f9', |
| | | shadowColor:'#f909a1', |
| | | shadowOffsetX:3, |
| | | shadowOffsetY:3, |
| | | lineWidth:2, |
| | | shadowBlur:10 |
| | | // stroke: '#00feff' |
| | | } |
| | | }, { |
| | | type: 'text', |
| | | left: 'center', |
| | | top: 'center', |
| | | style: { |
| | | fill: '#fff', |
| | | text: str, |
| | | font: '14px Microsoft YaHei' |
| | | } |
| | | }] |
| | | } |
| | | |
| | | |
| | | this.options = { |
| | | backgroundColor:'#04184A', |
| | | legend: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | series: [{ |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['18%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[0]) |
| | | }, { |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['50%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[1]) |
| | | }, { |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['82%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[2]) |
| | | }], |
| | | graphic: { |
| | | elements: [{ |
| | | type: 'group', |
| | | left: '11%', |
| | | bottom: '40%', |
| | | z: 100, |
| | | children: childrenFun(data1[0].text) |
| | | }, |
| | | { |
| | | type: 'group', |
| | | left: '43%', |
| | | bottom: '40%', |
| | | z: 100, |
| | | children: childrenFun(data1[1].text) |
| | | }, |
| | | { |
| | | type: 'group', |
| | | left: '75%', |
| | | bottom: '40%', |
| | | z: 100, |
| | | children: childrenFun(data1[2].text) |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | var rep = await ProductionStock(); |
| | | var data1 = [{ |
| | | text: 'æååºå(PCS)', |
| | | value: rep.cpCount, |
| | | color: '#5dd054' |
| | | }, { |
| | | text: 'ç ååºå(PCS)', |
| | | value: rep.yfCount, |
| | | color: '#097ff9' |
| | | }, { |
| | | text: 'å°¾æ°åºå(PCS)', |
| | | value: rep.wsCount, |
| | | color: '#ff6804' |
| | | }]; |
| | | |
| | | function dataFormat(v = { |
| | | value: '12345,12', |
| | | color: '#5dd054' |
| | | }) { |
| | | return [{ |
| | | value: 0, |
| | | name: v.value, |
| | | itemStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient( |
| | | 0, 0, 0, 1, [{ |
| | | offset: 0, |
| | | color: '#00feff' |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: v.color |
| | | } |
| | | ] |
| | | ) |
| | | } |
| | | }, |
| | | label: { |
| | | normal: { |
| | | textStyle: { |
| | | fontSize: 30, |
| | | fontWeight: 500, |
| | | color: '#fff' |
| | | } |
| | | } |
| | | } |
| | | }] |
| | | } |
| | | |
| | | function childrenFun(str = 'æé®') { |
| | | return [{ |
| | | type: 'rect', |
| | | left: 'center', |
| | | top: 'center', |
| | | shape: { |
| | | width: 150, |
| | | height: 40, |
| | | r: 50 |
| | | }, |
| | | style: { |
| | | fill: '#67C23A', |
| | | // stroke: '#00feff' |
| | | } |
| | | }, { |
| | | type: 'text', |
| | | left: 'center', |
| | | top: 'center', |
| | | style: { |
| | | fill: '#fff', |
| | | text: str, |
| | | font: '14px Microsoft YaHei' |
| | | } |
| | | }] |
| | | } |
| | | |
| | | |
| | | this.options = { |
| | | legend: { |
| | | show: false |
| | | }, |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | series: [{ |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['18%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[0]) |
| | | }, { |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['50%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[1]) |
| | | }, { |
| | | type: 'pie', |
| | | radius: [65, 73], |
| | | center: ['82%', '40%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | position: 'center' |
| | | } |
| | | }, |
| | | data: dataFormat(data1[2]) |
| | | }], |
| | | graphic: { |
| | | elements: [{ |
| | | type: 'group', |
| | | left: '6.5%', |
| | | bottom: '10%', |
| | | z: 100, |
| | | children: childrenFun(data1[0].text) |
| | | }, |
| | | { |
| | | type: 'group', |
| | | left: '38.5%', |
| | | bottom: '10%', |
| | | z: 100, |
| | | children: childrenFun(data1[1].text) |
| | | }, |
| | | { |
| | | type: 'group', |
| | | left: '70.5%', |
| | | bottom: '10%', |
| | | z: 100, |
| | | children: childrenFun(data1[2].text) |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-01 14:13:04 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-09-27 15:04:49 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\right-top.vue |
| | | --> |
| | | <template> |
| | | <Echart |
| | | id="rightTop" |
| | | :options="option" |
| | | class="right_top_inner" |
| | | v-if="pageflag" |
| | | ref="charts" |
| | | /> |
| | | <Reacquire v-else @onclick="getData" style="line-height: 200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import {graphic} from "echarts" |
| | | export default { |
| | | data() { |
| | | return { |
| | | option: {}, |
| | | pageflag: false, |
| | | timer: null, |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | |
| | | mounted() { |
| | | this.getData(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | getData() { |
| | | this.pageflag = true; |
| | | // this.pageflag =false |
| | | currentGET("big4").then((res) => { |
| | | if (!this.timer) { |
| | | console.log("æ¥è¦æ¬¡æ°", res); |
| | | } |
| | | if (res.success) { |
| | | this.countUserNumData = res.data; |
| | | this.$nextTick(() => { |
| | | this.init(res.data.dateList, res.data.numList, res.data.numList2), |
| | | this.switper(); |
| | | }); |
| | | } else { |
| | | this.pageflag = false; |
| | | this.$Message({ |
| | | text: res.msg, |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | let myChart = this.$refs.charts.chart; |
| | | myChart.on("mouseover", (params) => { |
| | | this.clearData(); |
| | | }); |
| | | myChart.on("mouseout", (params) => { |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }); |
| | | }, |
| | | init(xData, yData, yData2) { |
| | | this.option = { |
| | | xAxis: { |
| | | type: "category", |
| | | data: xData, |
| | | boundaryGap: false, // ä¸çç½ï¼ä»åç¹å¼å§ |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(31,99,163,.2)", |
| | | }, |
| | | }, |
| | | axisLine: { |
| | | // show:false, |
| | | lineStyle: { |
| | | color: "rgba(31,99,163,.1)", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | color: "#7EB7FD", |
| | | fontWeight: "500", |
| | | }, |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(31,99,163,.2)", |
| | | }, |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "rgba(31,99,163,.1)", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | color: "#7EB7FD", |
| | | fontWeight: "500", |
| | | }, |
| | | }, |
| | | tooltip: { |
| | | trigger: "axis", |
| | | backgroundColor: "rgba(0,0,0,.6)", |
| | | borderColor: "rgba(147, 235, 248, .8)", |
| | | textStyle: { |
| | | color: "#FFF", |
| | | }, |
| | | }, |
| | | grid: { |
| | | //å¸å± |
| | | show: true, |
| | | left: "10px", |
| | | right: "30px", |
| | | bottom: "10px", |
| | | top: "28px", |
| | | containLabel: true, |
| | | borderColor: "#1F63A3", |
| | | }, |
| | | series: [ |
| | | { |
| | | data: yData, |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //å»é¤ç¹ |
| | | name: "æ¥è¦1次æ°", |
| | | color: "rgba(252,144,16,.7)", |
| | | areaStyle: { |
| | | //å³ï¼ä¸ï¼å·¦ï¼ä¸ |
| | | color: new graphic.LinearGradient( |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | [ |
| | | { |
| | | offset: 0, |
| | | color: "rgba(252,144,16,.7)", |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "rgba(252,144,16,.0)", |
| | | }, |
| | | ], |
| | | false |
| | | ), |
| | | }, |
| | | markPoint: { |
| | | data: [ |
| | | { |
| | | name: "æå¤§å¼", |
| | | type: "max", |
| | | valueDim: "y", |
| | | symbol: "rect", |
| | | symbolSize: [60, 26], |
| | | symbolOffset: [0, -20], |
| | | itemStyle: { |
| | | color: "rgba(0,0,0,0)", |
| | | }, |
| | | label: { |
| | | color: "#FC9010", |
| | | backgroundColor: "rgba(252,144,16,0.1)", |
| | | borderRadius: 6, |
| | | padding: [7, 14], |
| | | borderWidth: 0.5, |
| | | borderColor: "rgba(252,144,16,.5)", |
| | | formatter: "æ¥è¦1ï¼{c}", |
| | | }, |
| | | }, |
| | | { |
| | | name: "æå¤§å¼", |
| | | type: "max", |
| | | valueDim: "y", |
| | | symbol: "circle", |
| | | symbolSize: 6, |
| | | itemStyle: { |
| | | color: "#FC9010", |
| | | shadowColor: "#FC9010", |
| | | shadowBlur: 8, |
| | | }, |
| | | label: { |
| | | formatter: "", |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | { |
| | | data: yData2, |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //å»é¤ç¹ |
| | | name: "æ¥è¦2次æ°", |
| | | color: "rgba(9,202,243,.7)", |
| | | areaStyle: { |
| | | //å³ï¼ä¸ï¼å·¦ï¼ä¸ |
| | | color: new graphic.LinearGradient( |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | [ |
| | | { |
| | | offset: 0, |
| | | color: "rgba(9,202,243,.7)", |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "rgba(9,202,243,.0)", |
| | | }, |
| | | ], |
| | | false |
| | | ), |
| | | }, |
| | | markPoint: { |
| | | data: [ |
| | | { |
| | | name: "æå¤§å¼", |
| | | type: "max", |
| | | valueDim: "y", |
| | | symbol: "rect", |
| | | symbolSize: [60, 26], |
| | | symbolOffset: [0, -20], |
| | | itemStyle: { |
| | | color: "rgba(0,0,0,0)", |
| | | }, |
| | | label: { |
| | | color: "#09CAF3", |
| | | backgroundColor: "rgba(9,202,243,0.1)", |
| | | |
| | | borderRadius: 6, |
| | | borderColor: "rgba(9,202,243,.5)", |
| | | padding: [7, 14], |
| | | formatter: "æ¥è¦2ï¼{c}", |
| | | borderWidth: 0.5, |
| | | }, |
| | | }, |
| | | { |
| | | name: "æå¤§å¼", |
| | | type: "max", |
| | | valueDim: "y", |
| | | symbol: "circle", |
| | | symbolSize: 6, |
| | | itemStyle: { |
| | | color: "#09CAF3", |
| | | shadowColor: "#09CAF3", |
| | | shadowBlur: 8, |
| | | }, |
| | | label: { |
| | | formatter: "", |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .right_top_inner { |
| | | margin-top: -8px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <ul class="user_Overview flex" v-if="pageflag"> |
| | | <li class="user_Overview-item" style="color: #00fdfa"> |
| | | <div class="user_Overview_nums allnum "> |
| | | <dv-digital-flop :config="onlineconfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>10å·æ£ä¿®å°</p> |
| | | <br> |
| | | <p>{{stationstate[9].station_state}}</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #07f7a8"> |
| | | <div class="user_Overview_nums online"> |
| | | <dv-digital-flop :config="config" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>11å·æ£ä¿®å°</p> |
| | | <br> |
| | | <p>{{stationstate[10].station_state}}</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #e3b337"> |
| | | <div class="user_Overview_nums offline"> |
| | | <dv-digital-flop :config="offlineconfig" style="width:100%;height:100%;" /> |
| | | |
| | | </div> |
| | | <p>12å·æ£ä¿®å°</p> |
| | | <br> |
| | | <p>{{stationstate[11].station_state}}</p> |
| | | </li> |
| | | </ul> |
| | | <Reacquire v-else @onclick="getData" line-height="200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from 'api/modules' |
| | | import {Floorfault} from "@/api/http.js" |
| | | let style = { |
| | | fontSize: 24 |
| | | } |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | stationstate:[], |
| | | userOverview: { |
| | | alarmNum: 2, |
| | | offlineNum: 3, |
| | | onlineNum: 5, |
| | | totalNum: 10, |
| | | }, |
| | | pageflag: true, |
| | | timer: null, |
| | | config: { |
| | | number: [100], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#00fdfa", |
| | | fill: "#00fdfa", |
| | | }, |
| | | }, |
| | | onlineconfig: { |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#07f7a8", |
| | | fill: "#07f7a8", |
| | | }, |
| | | }, |
| | | offlineconfig: { |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#e3b337", |
| | | fill: "#e3b337", |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData() |
| | | |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | let rep = await Floorfault((a)=>{ |
| | | }); |
| | | this.stationstate=rep; |
| | | this.onlineconfig = { |
| | | ...this.onlineconfig, |
| | | number: [rep[9].station_qty] |
| | | } |
| | | this.config = { |
| | | ...this.config, |
| | | number: [rep[10].station_qty] |
| | | } |
| | | this.offlineconfig = { |
| | | ...this.offlineconfig, |
| | | number: [rep[11].station_qty] |
| | | } |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return |
| | | } |
| | | let looper = (a) => { |
| | | this.getData() |
| | | }; |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ''; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <ul class="user_Overview flex" v-if="pageflag"> |
| | | <li class="user_Overview-item" style="color: #00fdfa"> |
| | | <div class="user_Overview_nums allnum "> |
| | | <dv-digital-flop :config="inboundConfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>æåå
¥åº</p> |
| | | <br> |
| | | <!-- <p>{{stationstate[0].station_state}}</p> --> |
| | | <!-- <p v-if="stationstate[0].station_state == 'æ£ä¿®ä¸'">{{stationstate[0].station_checkName}}</p> --> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #07f7a8"> |
| | | <div class="user_Overview_nums online"> |
| | | <dv-digital-flop :config="outboundConfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>æååºåº</p> |
| | | <br> |
| | | <!-- <p>{{stationstate[1].station_state}}</p> --> |
| | | <!-- <p v-if="stationstate[1].station_state == 'æ£ä¿®ä¸'">{{stationstate[1].station_checkName}}</p> --> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #E6A23C"> |
| | | <div class="user_Overview_nums offline"> |
| | | <dv-digital-flop :config="backConfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>æååæ¡</p> |
| | | <br> |
| | | <!-- <p>{{stationstate[1].station_state}}</p> --> |
| | | <!-- <p v-if="stationstate[1].station_state == 'æ£ä¿®ä¸'">{{stationstate[1].station_checkName}}</p> --> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #f56c6c"> |
| | | <div class="user_Overview_nums laramnum"> |
| | | <dv-digital-flop :config="surplusConfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>æåéåº</p> |
| | | <br> |
| | | <!-- <p>{{stationstate[1].station_state}}</p> --> |
| | | <!-- <p v-if="stationstate[1].station_state == 'æ£ä¿®ä¸'">{{stationstate[1].station_checkName}}</p> --> |
| | | </li> |
| | | <!-- <li class="user_Overview-item" style="color: #e3b337"> |
| | | <div class="user_Overview_nums offline"> |
| | | <dv-digital-flop :config="offlineconfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>3å·æ£ä¿®å°</p> |
| | | <br> |
| | | <p>{{stationstate[2].station_state}}</p> |
| | | <p v-if="stationstate[2].station_state == 'æ£ä¿®ä¸'">{{stationstate[2].station_checkName}}</p> |
| | | </li> |
| | | <li class="user_Overview-item" style="color: #e3b337"> |
| | | <div class="user_Overview_nums offline"> |
| | | <dv-digital-flop :config="offlineconfig" style="width:100%;height:100%;" /> |
| | | </div> |
| | | <p>4å·æ£ä¿®å°</p> |
| | | <br> |
| | | <p>{{stationstate[3].station_state}}</p> |
| | | <p v-if="stationstate[3].station_state == 'æ£ä¿®ä¸'">{{stationstate[3].station_checkName}}</p> |
| | | </li> --> |
| | | </ul> |
| | | <Reacquire v-else @onclick="getData" line-height="200px"> |
| | | éæ°è·å |
| | | </Reacquire> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from 'api/modules' |
| | | import {Floorfault} from "@/api/http.js" |
| | | let style = { |
| | | fontSize: 24 |
| | | } |
| | | export default { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | userOverview: { |
| | | alarmNum: 2, |
| | | offlineNum: 3, |
| | | onlineNum: 5, |
| | | totalNum: 10, |
| | | }, |
| | | stationstate:[], |
| | | pageflag: true, |
| | | timer: null, |
| | | backConfig: { //æååæ¡ |
| | | number: [9999], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#00fdfa", |
| | | fill: "#E6A23C", |
| | | }, |
| | | }, |
| | | surplusConfig: { //æå使 |
| | | number: [100], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#00fdfa", |
| | | fill: "#f56c6c", |
| | | }, |
| | | }, |
| | | inboundConfig: { //æåå
¥åº |
| | | number: [100], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#00fdfa", |
| | | fill: "#00fdfa", |
| | | }, |
| | | }, |
| | | outboundConfig: { //æååºåº |
| | | number: [0], |
| | | content: '{nt}', |
| | | style: { |
| | | ...style, |
| | | // stroke: "#07f7a8", |
| | | fill: "#07f7a8", |
| | | }, |
| | | }, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData() |
| | | |
| | | }, |
| | | methods: { |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | var rep = await Floorfault(); |
| | | |
| | | this.inboundConfig={ |
| | | ...this.inboundConfig, |
| | | number: [rep.inboundCount] |
| | | } |
| | | this.outboundConfig={ |
| | | ...this.outboundConfig, |
| | | number: [rep.outboundCount] |
| | | } |
| | | this.backConfig={ |
| | | ...this.backConfig, |
| | | number: [rep.backboundCount] |
| | | } |
| | | this.surplusConfig={ |
| | | ...this.surplusConfig, |
| | | number: [rep.surplusCount] |
| | | } |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [rep[0].station_qty] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [rep[1].station_qty] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [rep[2].station_qty] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [rep[3].station_qty] |
| | | // } |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return |
| | | } |
| | | let looper = (a) => { |
| | | this.getData() |
| | | }; |
| | | this.timer = setInterval(looper, this.$store.state.setting.echartsAutoTime); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ''; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <div id="name" style="width: 100%; height: 100%"> |
| | | <Echart :options="options" style="width: 100%; height: 100%"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import { ProLocationStatistics } from "@/api/http.js"; |
| | | let style = { |
| | | fontSize: 24, |
| | | }; |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageflag: true, |
| | | myChart: {}, |
| | | options: {}, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | var img = |
| | | "data:image/png;base64,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"; |
| | | var trafficWay = [ |
| | | { |
| | | name: "éå®", |
| | | value: 10, |
| | | }, |
| | | { |
| | | name: "空é²", |
| | | value: 10, |
| | | }, |
| | | { |
| | | name: "æè´§", |
| | | value: 30, |
| | | }, |
| | | ]; |
| | | var data = []; |
| | | var color = ["#ffa800", "#67C23A", "#ff5b00"]; |
| | | for (var i = 0; i < trafficWay.length; i++) { |
| | | data.push( |
| | | { |
| | | value: trafficWay[i].value, |
| | | name: trafficWay[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | borderWidth: 5, |
| | | shadowBlur: 20, |
| | | borderColor: color[i], |
| | | shadowColor: color[i], |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | value: 2, |
| | | name: "", |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | show: false, |
| | | }, |
| | | labelLine: { |
| | | show: false, |
| | | }, |
| | | color: "rgba(0, 0, 0, 0)", |
| | | borderColor: "rgba(0, 0, 0, 0)", |
| | | borderWidth: 0, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | } |
| | | var seriesOption = [ |
| | | { |
| | | name: "", |
| | | type: "pie", |
| | | clockWise: false, |
| | | radius: [70, 80], |
| | | hoverAnimation: false, |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | show: true, |
| | | position: "outside", |
| | | color: "#ddd", |
| | | formatter: function (params) { |
| | | var percent = 0; |
| | | var total = 0; |
| | | for (var i = 0; i < trafficWay.length; i++) { |
| | | total += trafficWay[i].value; |
| | | } |
| | | percent = ((params.value / total) * 100).toFixed(0); |
| | | if (params.name !== "") { |
| | | return percent + "%"; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 30, |
| | | length2: 100, |
| | | show: true, |
| | | color: "#00ffff", |
| | | }, |
| | | }, |
| | | }, |
| | | data: data, |
| | | }, |
| | | ]; |
| | | this.options = { |
| | | color: color, |
| | | title: { |
| | | text: "", |
| | | top: "48%", |
| | | textAlign: "center", |
| | | left: "49%", |
| | | textStyle: { |
| | | color: "#fff", |
| | | fontSize: 22, |
| | | fontWeight: "400", |
| | | }, |
| | | }, |
| | | graphic: { |
| | | elements: [ |
| | | { |
| | | type: "image", |
| | | z: 3, |
| | | style: { |
| | | image: img, |
| | | width: 178, |
| | | height: 178, |
| | | }, |
| | | left: "center", |
| | | top: "center", |
| | | position: [100, 100], |
| | | }, |
| | | ], |
| | | }, |
| | | tooltip: { |
| | | show: false, |
| | | }, |
| | | legend: { |
| | | icon: "circle", |
| | | orient: "horizontal", |
| | | // x: 'left', |
| | | data: ["éå®", "空é²", "æè´§"], |
| | | left: 0, |
| | | top: 0, |
| | | align: "right", |
| | | textStyle: { |
| | | color: "#fff", |
| | | }, |
| | | itemGap: 20, |
| | | }, |
| | | toolbox: { |
| | | show: false, |
| | | }, |
| | | series: seriesOption, |
| | | }; |
| | | }, |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | var rep = await ProLocationStatistics(); |
| | | |
| | | var img = |
| | | "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMYAAADGCAYAAACJm/9dAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxMzggNzkuMTU5ODI0LCAyMDE2LzA5LzE0LTAxOjA5OjAxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+IEmuOgAAE/9JREFUeJztnXmQVeWZxn/dIA2UgsriGmNNrEQNTqSio0IEFXeFkqi4kpngEhXjqMm4MIldkrE1bnGIMmPcUkOiIi6gJIragLKI0Songo5ZJlHGFTADaoRuhZ4/nnPmnO4+l+7bfc85d3l+VV18373n3Ptyvve53/5+da1L6jDdYjgwBhgNHALMBn6Sq0VdcxlwGvACsAx4HliTq0VlRlNzY+LrfTO2o5LoDxwOHAmMA/4WiP+KzM3DqCJpAA4K/i4F2oBXgWbgWWAxsDEv48oZC6M9Q4EJwInAMcDAfM0pOXXA14K/y4FPgQXAfOBxYF1+ppUXFgYMBiYCp6PaoU+B694HFqEmyVJgVSbW9Y6bgCeBb6Am4GHALrH3B6L/+0RgM6pFHgQeAzZkaWi5UVejfYx64AjgXOAk1OToSCtqajyFHGZlVsalzH7oB+BYJJR+Cde0oKbi3cBCYEtWxmVNoT5GrQljGHAecD7wxYT3P0bNirlIEB9lZ1ouDEICOQk1H7dLuOYt4C7gZ8Da7EzLhloXxv7AJcCZdK4dWpAIHkDt7FrtjA5A/aszkFiSntP9wAzgP7M1LT0KCaM+YzuyZixy+leAb9O+sN9AHdDd0S/mbGpXFKD/+2z0LHZHz+aN2PsN6Bm+gjrsY7M2MEuqVRhHoU7yYjS6FPI5MAc4FNgHzUN4JKYz69Cz2Qc9qzno2YUcjZ7t8iBddVSbMEYDzwFPA6Nir28Afgx8CZiERpVM91iKntnfoGcYH606BNUez6GRr6qhWoSxF/AoKsQxsdfXAj9AHe2rgNXZm1Y1/A96hl8E/pn2HfExwBJUBntlb1rpqXRhbA/cDLyGxuJDPgSuBPYErqPGx+RLzAagCT3bK9GzDpmIyuJmVDYVS6UKow74e+APwPeIxuI/AX6Emkw3opldkw6fome8F3rmnwSv90Nl8gdURhU57FmJwtgHdfx+jpZwgCag7gW+DFyDa4gsWY+e+ZdRGYSTgUNRGS1GZVZRVJIwtgF+iMbQ4/2IF4ADgHOA93Kwy4j3UBkcgMokZAwqsx+iMqwIKkUYI4AXgelEzab1wAVoNOSVnOwynXkFlckFqIxAZTYdleGInOwqinIXRh1wMfASMDL2+hxgb+BOqngdTwWzBZXN3qisQkaisryYMu97lLMwhgHzgJ+ivRGgIcJJwd8HOdllus8HROUVDu/2R2U6D5VxWVKuwjgEVcnjY689jqrhOYl3mHJmDiq7x2OvjUdlfEguFnVBOQrju2gmdbcgvwmYitbweFtm5bIGleFUVKagMn4OlXlZUU7C6A/MQqs3w9GLN4ADgZloW6apbNpQWR5ItEBxG1Tms4iazLlTLsLYCW2IOTv22iNor3Il7JQzxbEKle0jsdfORj6wUy4WdaAchDEC+A1RW3MzcAVwKtW/UaiW+QiV8RWozEE+8Bu0yzBX8hbGwaiNuUeQ/xi1Q2/CTadaoA2V9Umo7EG+8Dw57/fIUxhHAs8AOwb5t9Cy8fm5WWTyYj4q+7eC/PZoOfspeRmUlzBOBn4FbBvkX0XVaLUEHDDFsxL5wG+DfAOKWHJOHsbkIYwpaAtluLRjEdol5nVO5j20tmpRkO+DAjFclLUhWQvjUhSSJYzdNA84DneyTcRHyCfmBfk64HYUbjQzshTGVOBWojUys9GoREuGNpjKoAX5xuwgXwfcQoY1R1bCmILWx4SimAWcBXyW0febyuMz5COzgnxYc0zJ4suzEMZEFKwrFMVDKAzL5oJ3GCM2I195KMjXIV86Ke0vTlsYR6CRhbBPMReYjEVhus9mNCseRpfvg5pYR6T5pWkKYz8UNSIcfVqIzmpoTfE7TXXyGfKdhUG+H/Kt1GbI0xLGMODXKJI4aIz6m1gUpue0Ih8Kw4MORj6Wyp6ONITRADyBwjyC4hEdjwMUmN6zAUU+fDPI7458LSlafa9IQxh3oZWToP/ICcDbKXyPqU3WouDT4Q/tQcjnSkqphXEJ6lyDOk2T8TIPU3pW0n4QZzLyvZJRSmGMQislQ65C1ZwxafAEioQYchPt4xX3ilIJYygaaw5HoB5BM5XGpMmtwMNBuh/ywaGFL+8+pRBGHYpAF+7R/h2anfR+CpM2bWj1bbhNdjfki70OzVMKYVxEFM1jE955Z7Il3AkYHvoznhKsqeqtML6KIluHfB93tk32rEK+F3Iz8s0e0xth9EXVVhjZ4QkUAcKYPPg3orhV/YH76MVx3b0RxhXA3wXpdehoYPcrTF60oRN5w6PjDkQ+2iN6Kox9UOj3kAtxMDSTP2uQL4ZcA+zbkw/qiTDqULUVTsM/RDRkZkzePEy0TL0B+WrRo1Q9Eca3iEKbrKfEM47GlIBLgP8N0mPQyU5FUawwdqDz7Lajjpty4wPg6lj+RqIwTd2iWGE0Ei3zXUEKi7eMKRF3IR8F+ew1W7m2E8UI4ytEEydbUIRqH9piypWOPnoR8uFuUYwwbiKKQj4LeLmIe43Jg5eJgilsQ/tuwFbprjBGEy37+IT27TdjypmriY5aHo/OB+yS7grjulj6JzhqoKkc3gNui+X/pTs3dUcYRxMNz/4FLyc3lcfNyHdBvnxMVzd0RxiNsfQNeO+2qTw2IN8N6XKEqithjCXaFbUWuKNndhmTOzOJ1lGNoovzN7oSxrRY+jbg057bZUyu/BX1j0OmFboQti6Mkah/AVr64SXlptKZiXwZ5NsjC124NWFcGkvfHftAYyqV9bRfrXFpoQvrWpckLjwcigKl9Qc+B74ErC6hgcbkxR7Af6NNTK3Abk3Njes6XlSoxvgO0c68R7EoTPWwGvk0KLLIBUkXJQmjHu3GC5lRWruMyZ24T58zbdy1nXSQJIxxwJ5B+nVgWentMiZXliHfBvn6kR0vSBJG/JTMu0tvkzFlQdy3O53S1LHzPRht8mhA56DtTjQpYkw1MQR4h8jXd25qbvz/kdeONcZEor3cT2FRmOrlQ3S+Bsjn2x1f1lEYZ8TSD6RolDHlwP2x9JnxN+JNqWHAu2h892NgZ7wExFQ3A4H3ge3QkQK7NjU3roH2NcaJRJHb5mNRmOrnU+TroEMvw8147YQxIZaeizG1QdzXTwwTYVNqAOpoD0Q99GGoOWVMtTMIRTBsQBHThzQ1N24Ma4zDkCgAFmNRmBqhqbnxI+C5IDsAOByiplR85m9BhnYZUw48FUsfCcnCeCYzc4wpD+I+Pw7UxxiOhqzq0HDtbgk3GlOVNDUrpMG0cde+A+yKjhPYuR7F2QknM57PxTpj8ifsZ9QBh9ajYGohS7O3x5iyIL6KfFQ9cHDsBQvD1Cpx3z+4LzAHnV3Whg75M6YWWQVciZpSrYX2fBtTE4Sd746U4pxvY6oOC8OYBCwMYxKwMIxJwMIwJgELw5gELAxjErAwjEnAwjAmAQvDmAQsDGMSsDCMScDCMCYBC8OYBCwMYxKwMIxJwMIwJgELw5gELAxjErAwjEnAwjAmAQvDmAQsDGMSsDCMScDCMCYBC8OYBCwMYxKwMIxJwMIwJgELw5gELAxjErAwjEnAwjAmAQvDmAQsDGMSsDCMScDCMCYBC8OYBCwMYxLoC1wKNABtwC3A5lwtMiYHpo27tg/wPaAOaO0LnAqMCt5fAPw2J9uMyZMRwI+D9PJ6YEXszW9kb48xZUHc91fUA8sKvGlMLTE6ll5eDyxF/QuAMdnbY0xZMDb4tw1YUg+sAVYGL+6K2lrG1AzTxl07Avk+wMqm5sY14XBtc+y6o7I1y5jcift8M0TzGM/E3jgmM3OMKQ+OjaWfBahrXVIHMABYBwwEWoBhwMdZW2dMDgxC3YkGYCMwpKm5cWNYY2wEng7SDcBx2dtnTC4ci3weYEFTc+NGaL8k5IlY+qSsrDImZ+K+/qsw0VEYnwfpE1GzyphqZgDyddBSqMfDN+LCWAssCtLbAeMzMc2Y/DgB+TrAwqbmxjXhGx1X194fS5+WtlXG5MyZsfQD8Tc6CmMuGpUCOB4YkqJRxuTJEOTjIJ9/LP5mR2GsR+IA9dS/lappxuTHZKLRqLlNzY3r428mbVS6N5Y+Ny2rjMmZuG/f2/HNJGE8C7wZpPel/apDY6qB0cBXg/SbBLPdcZKEsQW4J5a/pORmGZMvcZ++p6m5cUvHCwrt+f53ok74N4E9SmyYMXmxB/JpgFbk650oJIx1wOwg3Rf4bklNMyY/LkY+DfBgU3PjuqSLthYl5LZY+lxg+xIZZkxeDAbOi+VvK3Th1oTxCtHCwu2BC3tvlzG5chHRD/wzyMcT6SquVFMsfRleP2Uql4HIh0Ou39rFXQnjOWB5kB4GTO25XcbkylTkwyCfXrSVa7sViXB6LH0VaqcZU0kMRr4b8qOubuiOMBagmgNgR+Dy4u0yJle+j3wX5MtPdXVDd2PX/iCWvhzYpTi7jMmNXVAY2pAfFLowTneFsZRoh9+2dNFxMaaMuB75LMiHl3bnpmKinf8T8FmQngwcUMS9xuTBAchXQb57RXdvLEYYvwNmxu77aZH3G5MlHX10JvBGMTcXw3S0BRbgYNrPIhpTTpyHfBS0xGn6Vq7tRLHC+AtqUoVcD+xU5GcYkzbDad8PvgL5brfpSVPoP4iGb3cA/rUHn2FMmsxAvgnwPPDzYj+gJ8JoQ+umwmXppwGn9OBzjEmDU4gCebQgX20rfHkyPe08/xft22wzUfVlTJ4MB+6I5acDr/fkg3ozqnQj8FKQHgbchc4vMyYP6pAPhj/QLyMf7RG9EcbnwLeBTUF+Al6abvLjQuSDoCbUPxBF1iya3s5DvEb7SZNbgP16+ZnGFMsI4OZY/irkmz2mFBN0twPzg3R/YA4KrW5MFgxCPjcgyD9JCUZKSyGMNmAK8E6Q/wqK0+P+hkmbOhTRZu8g/w5qQhU9CtWRUi3pWIuGyFqD/MnoMHFj0uRyoqmCVuSDawpf3n1KudZpGe1nxW/AEdNNeownOrAe5HvLClxbNKVeBDgD+EWQ7gPMwp1xU3r2Q77VJ8j/AvleyUhjdex5wItBejA6pWb3FL7H1CbD0AEv4RbrF0lhMWsawtiExpPfDvJfAH6N94qb3jMYhXTaM8i/jXxtU6Ebekpa+ynWoLMHNgT5/YBHgX4pfZ+pfvohH9o/yG9APlaSznZH0txotBLFCA1Hqo5AYT8tDlMs2yDfOSLItyLfWpnWF6a9A28hcBY6+A90Qma802RMV/RBnevwdNXN6IiwhWl+aRZbUx8GvkM06TIJuA+Lw3RNH+Qrk4J8G3A+8EjaX5zVnu170JkEoTgmA79EVaQxSWyDaoowmEEb8qFOpx+lQZbBDG5HM5WhOE4DHsJ9DtOZfsg3Tg/ybSho2u1ZGZB1lI/bUFUY73M8hRcdmohBaCFg2KdoQ+ez3JqlEXmEv7mb9uuqDkd7yB3d0OyMfCEcfdqMfkjvKHhHSuQVF+oR4ETgr0F+fxSB2stHapcRwAtE8xQtwBnohzRz8gyY9gxwJFFYkz3RIrAT8jLI5MYJ6IdxzyC/HjgO7bPIhbwjCa4ADgNWB/ntgHlopaT3c1Q/dahTPQ+VPcgXxtLF+RVpk7cwQLOXB6FqFDR2fSPeCVjthDvvbiKa01qBfOHVvIwKKQdhALyPOly/jL12Mlo5OSIXi0yajEBle3LstfvRQMz7uVjUgXIRBmiF5NnAPxJFVd8bhei5CDetqoE6VJYvEW1H/QyV+VmksEq2p5STMEJmoF+OcA95fzRcNxcHdatkhqMyvAOVKaiMD6PEm4xKQTkKAzQ6NRJtcgqZgPojp+ZikekNp6CymxB7bT4q4+WJd+RMuQoDFGBhPKpmwyp2OFoqMBtHWa8EhgMPok52WNtvQjPZE4iOlCg7ylkYoOUAM4ADaX9Y+SQUP/d8yv//UIvUo7J5gyjAMqgMD0Rrnnod4iZNKsWpVqFhvEaipSQ7AHcCS1CVbMqDkahM7iQKxd+Kyu4gVJZlT6UIAzR6MZ3owYeMQgF878HrrfJkF1QGL6MyCQl/uKYTjTaWPZUkjJDX0czoFHSEFOj/MQX4PXAtDryQJYPRM/89KoPQp9YF+bH0MBR/nlSiMEDt0/vQWPhMoqjW2wLXAH9Ey0oG5mJdbTAQPeM/omceHhn8OSqTfVAZlXVfohCVKoyQD4GpwNdQiJ6QoWhZyZ+BaXhpSSkZhJ7pn9EzHhp770lUFlOJavOKpNKFEfI6WqF5KO37H8OB69DCtBtQjCvTM76ADnxcjZ5pfLJ1CXr2x1OBzaYkqkUYIUuBMcAxRIsSQe3gK4E/oTmQ0dmbVrGMRs/sT+jciXj/bQVwLHrmS7M3LT2qTRghT6ORkcODdEhfNAeyFB0schmwY+bWlT9D0LN5DT2rSejZhTyNnu0hwILMrcuAahVGyGJUe3wdHWnbEntvX7SP+F3gMbTUZAC1ywAkgMfQGqZb0TMKaUHP8OvomS7O1rxsqWtdUlOLVoejGdnzgD0S3v8IreGZi4I0fJydabmwHWoKTUR9tKRBitXo0MefkVI4zDxpam5MfL3WhBFSj/Z/nI/W7DQkXNOCdpE9jbbhVsSMbTcYARwFHI2aQ4X+748jQTQDWzKzLmMKCaNv4qvVzxbg2eBve/SLeTowjmg3WQP6NT02yL+Lmg/Lgr9VRGGAypU+SAijg7/DgF0LXLsZiWA2Cp68PgP7ypZarTEKMQzVIOPRr+rWJgivRkPA5cxVaIi1EJ+i2vAJVEOU7WrXtHCN0T3WovU+96DO6OEoksk4FNqn0n9F2tC+iGZUWy4CNuZqUZliYRRmI5pND2fUd0JDwKPRMGVLgfvKiRa0EegF1PxbDnyQq0UVwv8BNYmwIpIWBvwAAAAASUVORK5CYII="; |
| | | var trafficWay = [ |
| | | { |
| | | name: "éå®", |
| | | value: rep.lockCount, |
| | | }, |
| | | { |
| | | name: "空é²", |
| | | value: rep.freeCount, |
| | | }, |
| | | { |
| | | name: "æè´§", |
| | | value: rep.inStockCount, |
| | | }, |
| | | ]; |
| | | var data = []; |
| | | var color = ["#ffa800", "#67C23A", "#ff5b00"]; |
| | | for (var i = 0; i < trafficWay.length; i++) { |
| | | data.push( |
| | | { |
| | | value: trafficWay[i].value, |
| | | name: trafficWay[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | borderWidth: 5, |
| | | shadowBlur: 20, |
| | | borderColor: color[i], |
| | | shadowColor: color[i], |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | value: 2, |
| | | name: "", |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | show: false, |
| | | }, |
| | | labelLine: { |
| | | show: false, |
| | | }, |
| | | color: "rgba(0, 0, 0, 0)", |
| | | borderColor: "rgba(0, 0, 0, 0)", |
| | | borderWidth: 0, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | } |
| | | var seriesOption = [ |
| | | { |
| | | name: "", |
| | | type: "pie", |
| | | clockWise: false, |
| | | radius: [70, 80], |
| | | hoverAnimation: false, |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | show: true, |
| | | position: "outside", |
| | | color: "#ddd", |
| | | formatter: function (params) { |
| | | var percent = 0; |
| | | var total = 0; |
| | | for (var i = 0; i < trafficWay.length; i++) { |
| | | total += trafficWay[i].value; |
| | | } |
| | | percent = ((params.value / total) * 100).toFixed(0); |
| | | if (params.name !== "") { |
| | | return percent + "%"; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | }, |
| | | labelLine: { |
| | | length: 30, |
| | | length2: 100, |
| | | show: true, |
| | | color: "#00ffff", |
| | | }, |
| | | }, |
| | | }, |
| | | data: data, |
| | | }, |
| | | ]; |
| | | this.options = { |
| | | color: color, |
| | | title: { |
| | | text: `æ»é\n${rep.lockCount+rep.freeCount+rep.inStockCount}`, |
| | | top: "40%", |
| | | textAlign: "center", |
| | | left: "49%", |
| | | textStyle: { |
| | | color: "#fff", |
| | | fontSize: 22, |
| | | fontWeight: "400", |
| | | }, |
| | | }, |
| | | graphic: { |
| | | elements: [ |
| | | { |
| | | type: "image", |
| | | z: 3, |
| | | style: { |
| | | image: img, |
| | | width: 178, |
| | | height: 178, |
| | | }, |
| | | left: "center", |
| | | top: "center", |
| | | position: [100, 100], |
| | | }, |
| | | ], |
| | | }, |
| | | tooltip: { |
| | | show: false, |
| | | }, |
| | | legend: { |
| | | icon: "circle", |
| | | orient: "horizontal", |
| | | // x: 'left', |
| | | data: ["éå®", "空é²", "æè´§"], |
| | | left: 0, |
| | | top: 0, |
| | | align: "right", |
| | | textStyle: { |
| | | color: "#fff", |
| | | }, |
| | | itemGap: 20, |
| | | }, |
| | | toolbox: { |
| | | show: false, |
| | | }, |
| | | series: seriesOption, |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-02-28 16:16:42 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-07-20 17:57:11 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue |
| | | --> |
| | | <template> |
| | | <div id="name" style="width: 100%; height: 100%"> |
| | | <Echart :options="options" style="width: 100%; height: 100%"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { currentGET } from "api/modules"; |
| | | import { ProductionStock } from "@/api/http.js"; |
| | | import * as echarts from 'echarts'; |
| | | let style = { |
| | | fontSize: 24, |
| | | }; |
| | | export default { |
| | | data() { |
| | | return { |
| | | pageflag: true, |
| | | myChart: {}, |
| | | options: {}, |
| | | }; |
| | | }, |
| | | filters: { |
| | | numsFilter(msg) { |
| | | return msg || 0; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getData(); |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearData(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | let dataPie = [ |
| | | |
| | | { |
| | | value: 410, |
| | | name: 'ä¼ä¸' |
| | | }, |
| | | { |
| | | value: 380, |
| | | name: 'æ¿åº' |
| | | }, |
| | | { |
| | | value: 501, |
| | | name: '个人' |
| | | }, |
| | | ]; |
| | | let colorPie = ['#173852', '#0b2036', '#002e49']; |
| | | let colorWrap = ['#3087d6', '#afe1ff', '#4be1ff']; |
| | | let baseDataPie = [], |
| | | baseDataWrap = []; |
| | | for (var i = 0; i < dataPie.length; i++) { |
| | | baseDataPie.push({ |
| | | value: dataPie[i].value, |
| | | name: dataPie[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | borderWidth: 50, |
| | | |
| | | borderColor: colorPie[i], |
| | | |
| | | } |
| | | } |
| | | }); |
| | | baseDataWrap.push({ |
| | | value: dataPie[i].value, |
| | | name: dataPie[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | color: colorWrap[i], |
| | | borderWidth: 10, |
| | | borderColor: colorWrap[i], |
| | | shadowBlur: 50, |
| | | shadowColor: 'rgba(48, 135, 214, 0.3)', |
| | | } |
| | | } |
| | | }, { |
| | | value: 10, |
| | | name: '', |
| | | itemStyle: { |
| | | normal: { |
| | | color: 'transparent', |
| | | borderWidth: 10, |
| | | borderColor: 'transparent', |
| | | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | this.options = { |
| | | backgroundColor: '#021228', |
| | | title: { |
| | | text: 'æ¥è¦æ»æ°', |
| | | subtext: '10,225', |
| | | textStyle: { |
| | | color: '#00b5f3', |
| | | fontSize: 12, |
| | | |
| | | }, |
| | | subtextStyle: { |
| | | align: 'center', |
| | | fontSize: 18, |
| | | color: ['#85c7e3'], |
| | | fontWeight:800 |
| | | }, |
| | | x: '38%', |
| | | y: 'center', |
| | | }, |
| | | tooltip: { |
| | | show: true, |
| | | trigger: 'item', |
| | | formatter: "{a}ï¼{b} <br/>å æ¯ï¼{d}%" |
| | | }, |
| | | legend: { |
| | | data: ['ä¼ä¸', 'æ¿åº', '个人'], |
| | | icon: 'vertical', |
| | | right: '1%', |
| | | top: 'center', |
| | | orient: 'vertical', |
| | | itemGap: 20, |
| | | itemWidth: 15, |
| | | itemHeight: 8, |
| | | |
| | | formatter: function(name) { |
| | | let target; |
| | | for (let i = 0; i < dataPie.length; i++) { |
| | | if (dataPie[i].name === name) { |
| | | target = dataPie[i].value |
| | | } |
| | | } |
| | | let arr = [name, target]; |
| | | return arr.join("\n") |
| | | |
| | | }, |
| | | textStyle: { |
| | | lineHeight: 20, |
| | | color: '#9ed2f5', |
| | | |
| | | }, |
| | | }, |
| | | grid: { |
| | | left: '1%', // ä¸å®¹å¨å·¦ä¾§çè·ç¦» |
| | | right: '1%', // ä¸å®¹å¨å³ä¾§çè·ç¦» |
| | | top: '1%', // ä¸å®¹å¨é¡¶é¨çè·ç¦» |
| | | bottom: '1%', // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '', |
| | | type: 'pie', |
| | | clockWise: false, //顺æ¶å è½½ |
| | | hoverAnimation: false, //é¼ æ ç§»å
¥å大 |
| | | center: ['40%', '50%'], |
| | | radius: ['80%', '81%'], |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | }, |
| | | data: baseDataWrap |
| | | }, |
| | | { |
| | | |
| | | name: 'æ¥è¦', |
| | | type: 'pie', |
| | | color: colorPie, |
| | | selectedMode: 'single', |
| | | radius: ['55%', '58%'], |
| | | center: ['40%', '50%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | } |
| | | }, |
| | | |
| | | data: baseDataPie |
| | | }, |
| | | |
| | | ] |
| | | }; |
| | | }, |
| | | clearData() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, |
| | | async getData() { |
| | | this.pageflag = true; |
| | | // currentGET("big2").then((res) => { |
| | | // if (!this.timer) { |
| | | // console.log("è®¾å¤æ»è§2", res); |
| | | // } |
| | | // if (res.success) { |
| | | // this.userOverview = res.data; |
| | | // this.onlineconfig = { |
| | | // ...this.onlineconfig, |
| | | // number: [1] |
| | | // } |
| | | // this.config = { |
| | | // ...this.config, |
| | | // number: [7] |
| | | // } |
| | | // this.offlineconfig = { |
| | | // ...this.offlineconfig, |
| | | // number: [4] |
| | | // } |
| | | // this.laramnumconfig = { |
| | | // ...this.laramnumconfig, |
| | | // number: [10] |
| | | // } |
| | | // this.switper(); |
| | | // } else { |
| | | // this.pageflag = false; |
| | | // this.$Message.warning(res.msg); |
| | | // } |
| | | // }); |
| | | // var rep = await ProductionStock(); |
| | | let dataPie = [ |
| | | { |
| | | value: 430, |
| | | name: 'åºå产å' |
| | | }, |
| | | ]; |
| | | let colorPie = ['#173852']; |
| | | let colorWrap = ['#3087d6']; |
| | | let baseDataPie = [], |
| | | baseDataWrap = []; |
| | | for (var i = 0; i < dataPie.length; i++) { |
| | | baseDataPie.push({ |
| | | value: dataPie[i].value, |
| | | name: dataPie[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | borderWidth: 50, |
| | | |
| | | borderColor: colorPie[i], |
| | | |
| | | } |
| | | } |
| | | }); |
| | | baseDataWrap.push({ |
| | | value: dataPie[i].value, |
| | | name: dataPie[i].name, |
| | | itemStyle: { |
| | | normal: { |
| | | color: colorWrap[i], |
| | | borderWidth: 10, |
| | | borderColor: colorWrap[i], |
| | | shadowBlur: 50, |
| | | shadowColor: 'rgba(48, 135, 214, 0.3)', |
| | | } |
| | | } |
| | | }, { |
| | | value: 10, |
| | | name: '', |
| | | itemStyle: { |
| | | normal: { |
| | | color: 'transparent', |
| | | borderWidth: 10, |
| | | borderColor: 'transparent', |
| | | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | this.options = { |
| | | title: { |
| | | text: 'äº§åæ»æ°', |
| | | subtext: '430', |
| | | textStyle: { |
| | | color: '#00b5f3', |
| | | fontSize: 12, |
| | | |
| | | }, |
| | | subtextStyle: { |
| | | align: 'center', |
| | | fontSize: 18, |
| | | color: ['#85c7e3'], |
| | | fontWeight:800 |
| | | }, |
| | | x: '33%', |
| | | y: 'center', |
| | | }, |
| | | tooltip: { |
| | | show: true, |
| | | trigger: 'item', |
| | | formatter: "{a}ï¼{b} <br/>å æ¯ï¼{d}%" |
| | | }, |
| | | legend: { |
| | | data: ['åºå产å'], |
| | | icon: 'vertical', |
| | | right: '1%', |
| | | top: 'center', |
| | | orient: 'vertical', |
| | | itemGap: 20, |
| | | itemWidth: 15, |
| | | itemHeight: 8, |
| | | |
| | | formatter: function(name) { |
| | | let target; |
| | | for (let i = 0; i < dataPie.length; i++) { |
| | | if (dataPie[i].name === name) { |
| | | target = dataPie[i].value |
| | | } |
| | | } |
| | | let arr = [name, target]; |
| | | return arr.join("\n") |
| | | |
| | | }, |
| | | textStyle: { |
| | | lineHeight: 20, |
| | | color: '#9ed2f5', |
| | | |
| | | }, |
| | | }, |
| | | grid: { |
| | | left: '1%', // ä¸å®¹å¨å·¦ä¾§çè·ç¦» |
| | | right: '1%', // ä¸å®¹å¨å³ä¾§çè·ç¦» |
| | | top: '1%', // ä¸å®¹å¨é¡¶é¨çè·ç¦» |
| | | bottom: '1%', // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '', |
| | | type: 'pie', |
| | | clockWise: false, //顺æ¶å è½½ |
| | | hoverAnimation: false, //é¼ æ ç§»å
¥å大 |
| | | center: ['40%', '50%'], |
| | | radius: ['80%', '81%'], |
| | | tooltip: { |
| | | show: false |
| | | }, |
| | | label: { |
| | | normal: { |
| | | show: false |
| | | } |
| | | }, |
| | | data: baseDataWrap |
| | | }, |
| | | { |
| | | |
| | | name: 'ç§ç±»', |
| | | type: 'pie', |
| | | color: colorPie, |
| | | selectedMode: 'single', |
| | | radius: ['55%', '58%'], |
| | | center: ['40%', '50%'], |
| | | hoverAnimation: false, |
| | | label: { |
| | | normal: { |
| | | show: false, |
| | | } |
| | | }, |
| | | |
| | | data: baseDataPie |
| | | }, |
| | | |
| | | ] |
| | | }; |
| | | this.switper(); |
| | | }, |
| | | //轮询 |
| | | switper() { |
| | | if (this.timer) { |
| | | return; |
| | | } |
| | | let looper = (a) => { |
| | | this.getData(); |
| | | }; |
| | | this.timer = setInterval( |
| | | looper, |
| | | this.$store.state.setting.echartsAutoTime |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | .user_Overview { |
| | | li { |
| | | flex: 1; |
| | | |
| | | p { |
| | | text-align: center; |
| | | height: 16px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .user_Overview_nums { |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | line-height: 100px; |
| | | font-size: 22px; |
| | | margin: 50px auto 30px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | &.bgdonghua::before { |
| | | animation: rotating 14s linear infinite; |
| | | } |
| | | } |
| | | |
| | | .allnum { |
| | | // background-image: url("../../assets/img/left_top_lan.png"); |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lan.png"); |
| | | } |
| | | } |
| | | |
| | | .online { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_lv.png"); |
| | | } |
| | | } |
| | | |
| | | .offline { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_huang.png"); |
| | | } |
| | | } |
| | | |
| | | .laramnum { |
| | | &::before { |
| | | background-image: url("../../assets/img/left_top_hong.png"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <transition name="yh-setting-fade"> |
| | | <div class="setting" :class="{ settingShow: settingShow }" v-show="settingShow"> |
| | | <div class="setting_dislog" @click="settingShow = false"> |
| | | |
| | | </div> |
| | | <div class="setting_inner"> |
| | | <div class="setting_header"> |
| | | 设置 |
| | | </div> |
| | | <div class="setting_body"> |
| | | <!-- <div class="left_shu"> 宿¶çæµ</div> --> |
| | | <div class="left_shu"> å
¨å±è®¾ç½®</div> |
| | | <div class="setting_item"> |
| | | <span class="setting_label"> |
| | | æ¯å¦è¿è¡èªå¨éé
<span class="setting_label_tip">(é»è®¤å辨ç1920*1080)</span>: |
| | | </span> |
| | | <div class="setting_content"> |
| | | <el-radio-group v-model="isScaleradio" @change="(val) => radiochange(val, 'isScale')"> |
| | | <el-radio :label="true">æ¯</el-radio> |
| | | <el-radio :label="false">å¦</el-radio> |
| | | </el-radio-group> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- <div class="left_shu"> 宿¶çæµ</div> |
| | | <div class="setting_item"> |
| | | <span class="setting_label"> |
| | | è®¾å¤æéèªå¨è½®è¯¢: <span class="setting_label_tip"></span> |
| | | </span> |
| | | <div class="setting_content"> |
| | | <el-radio-group v-model="sbtxradio" @change="(val) => radiochange(val, 'sbtxSwiper')"> |
| | | <el-radio :label="true">æ¯</el-radio> |
| | | <el-radio :label="false">å¦</el-radio> |
| | | </el-radio-group> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="setting_item"> |
| | | <span class="setting_label"> |
| | | 宿¶é¢è¦è½®æ: |
| | | </span> |
| | | <div class="setting_content"> |
| | | <el-radio-group v-model="ssyjradio" @change="(val) => radiochange(val, 'ssyjSwiper')"> |
| | | <el-radio :label="true">æ¯</el-radio> |
| | | <el-radio :label="false">å¦</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> --> |
| | | <div class="flex justify-center"> |
| | | <!-- <el-button type="primary" round size="mini">ç¡®å®</el-button> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </transition> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | settingShow: false, |
| | | sbtxradio:true, |
| | | ssyjradio: true, |
| | | isScaleradio:true, |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | init() { |
| | | this.settingShow = true |
| | | }, |
| | | radiochange(val, type) { |
| | | this.$store.commit('setting/updateSwiper', { val, type }) |
| | | if(type==='isScale'){ |
| | | // this.$router.go(0) |
| | | // location.reload() |
| | | // window.location.href=window.location.href+"?t="+Date.now() |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.$store.commit('setting/initSwipers') |
| | | this.sbtxradio = this.$store.state.setting.sbtxSwiper, |
| | | this.ssyjradio = this.$store.state.setting.ssyjSwiper, |
| | | this.isScaleradio = this.$store.state.setting.isScale; |
| | | }, |
| | | mounted() { |
| | | document.body.appendChild(this.$el); |
| | | }, |
| | | beforeDestroy() { |
| | | }, |
| | | destroyed() { |
| | | if (this.$el && this.$el.parentNode) { |
| | | this.$el.parentNode.removeChild(this.$el); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang='scss' scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Author: daidai |
| | | * @Date: 2022-03-04 09:52:25 |
| | | * @LastEditors: daidai |
| | | * @LastEditTime: 2022-03-04 11:03:40 |
| | | * @FilePath: \web-pc\src\pages\big-screen\view\tjfx\tjfx.vue |
| | | --> |
| | | <template> |
| | | <div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang='scss' scoped> |
| | | |
| | | |
| | | </style> |
| | |
| | | const path = require('path') |
| | | const resolve = dir => { |
| | | return path.join(__dirname, dir) |
| | | /* |
| | | * @Author: daidai |
| | | * @Date: 2021-11-22 14:57:15 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-04-29 15:12:50 |
| | | */ |
| | | const path = require("path"); |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir); |
| | | } |
| | | |
| | | module.exports = { |
| | | publicPath: './', |
| | | devServer:{ |
| | | host:'0.0.0.0', |
| | | port:8090 |
| | | outputDir: process.env.VUE_APP_outputDir || 'dist', |
| | | assetsDir: 'static', |
| | | filenameHashing: true, |
| | | lintOnSave: false, |
| | | runtimeCompiler: false, |
| | | transpileDependencies: [], |
| | | productionSourceMap: false, |
| | | css: { |
| | | // æ¯å¦ä½¿ç¨csså离æä»¶ ExtractTextPlugin |
| | | extract: process.env.NODE_ENV === "production" ? true : false,//æ¯å¦å°ç»ä»¶ä¸ç CSS æåè³ä¸ä¸ªç¬ç«ç CSS æä»¶ä¸ (è䏿¯å¨ææ³¨å
¥å° JavaScript ä¸ç inline 代ç )ã |
| | | sourceMap: false,//æ¯å¦ä¸º CSS å¼å¯ source mapã设置为 true ä¹åå¯è½ä¼å½±åæå»ºçæ§è½ã |
| | | loaderOptions: { |
| | | sass: { |
| | | prependData: `@import "@/assets/css/variable.scss";` |
| | | } |
| | | }, |
| | | requireModuleExtension: true, |
| | | }, |
| | | chainWebpack: config => { |
| | | |
| | | chainWebpack: (config) => { |
| | | // é
ç½®å«å |
| | | config.resolve.alias |
| | | .set('_c', resolve('src/components')) // key,valueèªè¡å®ä¹ï¼æ¯å¦.set('@@', resolve('src/components')) |
| | | .set('@', resolve('src')) |
| | | .set('assets', resolve('src/assets')) |
| | | .set('assetsBig', resolve('src/pages/big-screen/assets')) |
| | | .set('components', resolve('src/components')) |
| | | .set('views', resolve('src/views')) |
| | | .set('api', resolve('src/api')) |
| | | .set('lib', resolve('src/lib')) |
| | | |
| | | if (process.env.NODE_ENV === "production") { |
| | | // å é¤ç³»ç»é»è®¤çsplitChunk |
| | | config.optimization.delete("splitChunks"); |
| | | } |
| | | // å é¤é¢å è½½ |
| | | // // ç§»é¤ prefetch æä»¶ |
| | | // config.plugins.delete('prefetch-index') |
| | | // // ç§»é¤ preload æä»¶ |
| | | // config.plugins.delete('preload-index'); |
| | | // config.optimization.minimizer('terser').tap((args) => { |
| | | // // å»é¤ç产ç¯å¢console |
| | | // args[0].terserOptions.compress.drop_console = true |
| | | // return args |
| | | // }) |
| | | }, |
| | | lintOnSave: false |
| | | } |
| | | configureWebpack: config => { |
| | | // ç»è¾åºçjsåç§°æ·»å hash |
| | | config.output.filename = "static/js/[name].[hash].js"; |
| | | config.output.chunkFilename = "static/js/[name].[hash].js"; |
| | | config.optimization = { |
| | | splitChunks: { |
| | | cacheGroups: { |
| | | // æ½ç¦»ææå
¥å£çå
¬ç¨èµæºä¸ºä¸ä¸ªchunk |
| | | common: { |
| | | name: "chunk-common", |
| | | chunks: "initial", |
| | | minChunks: 2, |
| | | maxInitialRequests: 5, |
| | | minSize: 0, |
| | | priority: 1, |
| | | reuseExistingChunk: true, |
| | | enforce: true |
| | | }, |
| | | // æ½ç¦»node_modulesä¸çåºä¸ºä¸ä¸ªchunk |
| | | // vendors: { |
| | | // name: "chunk-vendors", |
| | | // test: /[\\/]node_modules[\\/]/, |
| | | // chunks: "initial", |
| | | // priority: 2, |
| | | // reuseExistingChunk: true, |
| | | // enforce: true |
| | | // }, |
| | | element: { |
| | | name: "chunk-element-ui", |
| | | test: /[\\/]node_modules[\\/]element-ui[\\/]/, |
| | | chunks: "all", |
| | | priority: 3, |
| | | reuseExistingChunk: true, |
| | | enforce: true |
| | | }, |
| | | yhhtUi: { |
| | | name: "chunk-yhht-ui", |
| | | test: /[\\/]node_modules[\\/]yhht-ui[\\/]/, |
| | | chunks: "all", |
| | | priority: 4, |
| | | reuseExistingChunk: true, |
| | | enforce: true |
| | | }, |
| | | datav: { |
| | | name: "chunk-datav", |
| | | test: /[\\/]node_modules[\\/]@jiaminghi[\\/]data-view[\\/]/, |
| | | chunks: "all", |
| | | priority: 4, |
| | | reuseExistingChunk: true, |
| | | enforce: true |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | // æ¯å¦ä¸º Babel æ TypeScript ä½¿ç¨ thread-loaderã该é项å¨ç³»ç»ç CPU æå¤äºä¸ä¸ªå
æ ¸æ¶èªå¨å¯ç¨ï¼ä»
ä½ç¨äºç产æå»ºã |
| | | parallel: require('os').cpus().length > 1, |
| | | devServer: { |
| | | // '/api':{ |
| | | // target: 'http://192.168.8.211:8098/', |
| | | // // è·¨åé
ç½® |
| | | // changeOrigin: true, |
| | | // // è·¯å¾éå |
| | | // pathRewrite:{ |
| | | // '^/api': '/' |
| | | // } |
| | | // } |
| | | }, |
| | | pluginOptions: { |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("空æç´æ¥åºåº")] |
| | | TrayInToOut = 107, |
| | | |
| | | /// <summary> |
| | | /// ç«è¦åºåº |
| | | /// </summary> |
| | | [Description("ç«è¦åºåº")] |
| | | OutFireAlarm = 500, |
| | | } |
| | | |
| | | public enum TaskRelocationTypeEnum |
| | |
| | | /// <param name="deviceNo"></param> |
| | | /// <returns></returns> |
| | | Dt_Task QueryRelocationTask(string deviceNo); |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢æ¯å¦åå¨ç«è¦ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="deviceNo"></param> |
| | | /// <returns></returns> |
| | | Dt_Task QueryOutFireAlarmTask(string deviceNo); |
| | | } |
| | | } |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <_PublishTargetUrl>E:\GET\BaiBuSanLouNew\CodeManagement\WCS\WIDESEAWCS_Server\WIDESEAWCS_Server\bin\Debug\net6.0\publish\</_PublishTargetUrl> |
| | | <History>True|2025-04-21T07:19:45.4644293Z||;True|2025-04-21T14:45:38.3552372+08:00||;True|2025-04-21T14:44:01.6152039+08:00||;True|2025-04-21T14:22:37.4989518+08:00||;True|2025-04-18T10:22:32.9554647+08:00||;True|2025-04-18T09:51:29.1384947+08:00||;True|2025-04-18T09:46:26.7326043+08:00||;True|2025-04-18T09:43:19.2433438+08:00||;False|2025-04-18T09:42:10.6513617+08:00||;True|2025-04-17T16:04:03.4011403+08:00||;True|2025-04-17T16:00:41.6595004+08:00||;True|2025-04-17T14:49:41.2104816+08:00||;True|2025-04-17T14:27:37.3613209+08:00||;True|2025-04-17T13:55:36.7316380+08:00||;True|2025-04-17T13:10:06.6039892+08:00||;True|2025-04-17T12:07:35.7350054+08:00||;True|2025-04-17T11:00:00.9151591+08:00||;True|2025-04-17T10:57:57.3417841+08:00||;True|2025-04-17T10:47:23.2976245+08:00||;True|2025-04-17T10:41:39.7210960+08:00||;True|2025-04-17T10:19:33.9192570+08:00||;True|2025-04-17T10:16:34.7379074+08:00||;True|2025-04-17T10:08:53.3641425+08:00||;True|2025-04-17T09:53:51.9356344+08:00||;True|2025-03-27T13:37:49.9939026+08:00||;True|2025-03-27T13:29:20.1926150+08:00||;True|2025-03-26T23:19:20.7301591+08:00||;True|2025-03-26T23:17:14.1194337+08:00||;True|2025-03-26T23:06:39.1521743+08:00||;True|2025-03-26T22:45:13.0771457+08:00||;True|2025-03-26T15:49:56.7831444+08:00||;True|2025-03-26T11:17:59.8156703+08:00||;True|2025-03-25T10:07:06.2413400+08:00||;True|2025-03-24T22:07:19.1662430+08:00||;True|2025-03-24T17:46:50.5366700+08:00||;True|2025-03-23T22:21:52.3680226+08:00||;True|2025-03-23T22:04:03.0344904+08:00||;True|2025-03-23T18:11:25.3235647+08:00||;True|2025-03-23T16:46:42.6441101+08:00||;True|2025-03-22T17:15:44.8475192+08:00||;True|2025-03-22T16:40:56.2937788+08:00||;True|2025-03-22T16:16:19.5470008+08:00||;True|2025-03-22T15:49:39.1178646+08:00||;True|2025-03-22T15:44:56.2071472+08:00||;True|2025-03-22T15:38:57.0439012+08:00||;True|2025-03-22T15:02:20.9416020+08:00||;True|2025-03-22T14:33:13.6730569+08:00||;True|2025-03-21T23:34:47.6039521+08:00||;True|2025-03-21T02:10:54.8314020+08:00||;True|2025-03-18T16:25:46.4649995+08:00||;True|2025-02-19T11:41:36.9348078+08:00||;True|2025-02-18T18:28:41.9967285+08:00||;True|2025-02-18T18:25:36.2264950+08:00||;True|2025-02-18T10:30:56.5234743+08:00||;True|2025-02-15T15:24:40.7310549+08:00||;True|2025-02-15T14:26:13.5854743+08:00||;True|2025-02-15T14:23:09.9103735+08:00||;True|2025-02-15T14:11:58.0255348+08:00||;True|2025-02-15T13:55:31.3438054+08:00||;True|2025-02-15T13:47:31.3307267+08:00||;True|2025-02-15T13:46:24.9001959+08:00||;True|2025-02-15T13:23:47.4161644+08:00||;True|2025-02-15T13:10:20.4988808+08:00||;True|2025-02-15T13:05:10.7619905+08:00||;True|2025-02-15T12:55:42.2397751+08:00||;True|2025-02-15T12:43:42.1819119+08:00||;True|2025-02-15T10:19:42.3871047+08:00||;True|2025-01-03T16:15:25.4007394+08:00||;True|2025-01-03T15:59:55.6586669+08:00||;True|2025-01-03T15:58:54.7953589+08:00||;True|2025-01-03T15:54:46.8938743+08:00||;True|2025-01-03T15:30:32.7439557+08:00||;True|2025-01-03T15:27:53.2337341+08:00||;True|2025-01-03T15:24:30.7045349+08:00||;True|2025-01-02T14:13:36.7820311+08:00||;</History> |
| | | <History>True|2025-04-24T04:21:20.2135420Z||;True|2025-04-24T12:16:36.7251179+08:00||;True|2025-04-21T15:19:45.4644293+08:00||;True|2025-04-21T14:45:38.3552372+08:00||;True|2025-04-21T14:44:01.6152039+08:00||;True|2025-04-21T14:22:37.4989518+08:00||;True|2025-04-18T10:22:32.9554647+08:00||;True|2025-04-18T09:51:29.1384947+08:00||;True|2025-04-18T09:46:26.7326043+08:00||;True|2025-04-18T09:43:19.2433438+08:00||;False|2025-04-18T09:42:10.6513617+08:00||;True|2025-04-17T16:04:03.4011403+08:00||;True|2025-04-17T16:00:41.6595004+08:00||;True|2025-04-17T14:49:41.2104816+08:00||;True|2025-04-17T14:27:37.3613209+08:00||;True|2025-04-17T13:55:36.7316380+08:00||;True|2025-04-17T13:10:06.6039892+08:00||;True|2025-04-17T12:07:35.7350054+08:00||;True|2025-04-17T11:00:00.9151591+08:00||;True|2025-04-17T10:57:57.3417841+08:00||;True|2025-04-17T10:47:23.2976245+08:00||;True|2025-04-17T10:41:39.7210960+08:00||;True|2025-04-17T10:19:33.9192570+08:00||;True|2025-04-17T10:16:34.7379074+08:00||;True|2025-04-17T10:08:53.3641425+08:00||;True|2025-04-17T09:53:51.9356344+08:00||;True|2025-03-27T13:37:49.9939026+08:00||;True|2025-03-27T13:29:20.1926150+08:00||;True|2025-03-26T23:19:20.7301591+08:00||;True|2025-03-26T23:17:14.1194337+08:00||;True|2025-03-26T23:06:39.1521743+08:00||;True|2025-03-26T22:45:13.0771457+08:00||;True|2025-03-26T15:49:56.7831444+08:00||;True|2025-03-26T11:17:59.8156703+08:00||;True|2025-03-25T10:07:06.2413400+08:00||;True|2025-03-24T22:07:19.1662430+08:00||;True|2025-03-24T17:46:50.5366700+08:00||;True|2025-03-23T22:21:52.3680226+08:00||;True|2025-03-23T22:04:03.0344904+08:00||;True|2025-03-23T18:11:25.3235647+08:00||;True|2025-03-23T16:46:42.6441101+08:00||;True|2025-03-22T17:15:44.8475192+08:00||;True|2025-03-22T16:40:56.2937788+08:00||;True|2025-03-22T16:16:19.5470008+08:00||;True|2025-03-22T15:49:39.1178646+08:00||;True|2025-03-22T15:44:56.2071472+08:00||;True|2025-03-22T15:38:57.0439012+08:00||;True|2025-03-22T15:02:20.9416020+08:00||;True|2025-03-22T14:33:13.6730569+08:00||;True|2025-03-21T23:34:47.6039521+08:00||;True|2025-03-21T02:10:54.8314020+08:00||;True|2025-03-18T16:25:46.4649995+08:00||;True|2025-02-19T11:41:36.9348078+08:00||;True|2025-02-18T18:28:41.9967285+08:00||;True|2025-02-18T18:25:36.2264950+08:00||;True|2025-02-18T10:30:56.5234743+08:00||;True|2025-02-15T15:24:40.7310549+08:00||;True|2025-02-15T14:26:13.5854743+08:00||;True|2025-02-15T14:23:09.9103735+08:00||;True|2025-02-15T14:11:58.0255348+08:00||;True|2025-02-15T13:55:31.3438054+08:00||;True|2025-02-15T13:47:31.3307267+08:00||;True|2025-02-15T13:46:24.9001959+08:00||;True|2025-02-15T13:23:47.4161644+08:00||;True|2025-02-15T13:10:20.4988808+08:00||;True|2025-02-15T13:05:10.7619905+08:00||;True|2025-02-15T12:55:42.2397751+08:00||;True|2025-02-15T12:43:42.1819119+08:00||;True|2025-02-15T10:19:42.3871047+08:00||;True|2025-01-03T16:15:25.4007394+08:00||;True|2025-01-03T15:59:55.6586669+08:00||;True|2025-01-03T15:58:54.7953589+08:00||;True|2025-01-03T15:54:46.8938743+08:00||;True|2025-01-03T15:30:32.7439557+08:00||;True|2025-01-03T15:27:53.2337341+08:00||;True|2025-01-03T15:24:30.7045349+08:00||;True|2025-01-02T14:13:36.7820311+08:00||;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.LogHelper; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error($"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ã"); |
| | | QuartzLogger.WriteLogToFile($"Info_å容任å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | } |
| | | QuartzLogger.WriteLogToFile($"Info_å容任å¡å®æ", $"ä»»å¡å®æ,ä»»å¡å·:ã{taskNum}ãè¿ååæ°ã{JsonConvert.SerializeObject(content)}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content; |
| | | } |
| | | //public override WebResponseContent DeleteData(Dt_Task entity) |
| | | //{ |
| | | // return base.DeleteData(entity); |
| | | //} |
| | | } |
| | | } |
| | |
| | | task.NextAddress = item.TargetAddress; |
| | | } |
| | | // 夿任å¡ç®æ å°ååè·¯å¾æ¯å¦æ»¡è¶³ç¹å®æ¡ä»¶ |
| | | else if ((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ")|| task.Roadway.Contains("CH"))) |
| | | else if (((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ")|| task.Roadway.Contains("CH")))|| task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | { |
| | | // 设置任å¡ç¶æä¸ºåºåºæ°å»º |
| | | task.TaskState = (int)TaskOutStatusEnum.OutNew; |
| | |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error($"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ã"); |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.Message}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æå¼å¸¸,ä»»å¡å·:ã{taskNum}ãå¼å¸¸ä¿¡æ¯ã{ex.StackTrace}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | } |
| | | QuartzLogger.WriteLogToFile($"Info_ä»»å¡å®æ", $"ä»»å¡å®æ,ä»»å¡å·:ã{taskNum}ãè¿ååæ°ã{JsonConvert.SerializeObject(content)}ã{Environment.NewLine}{Environment.NewLine}"); |
| | | return content; |
| | |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskRelocationTypeEnum.Relocation && x.TaskState == (int)TaskStatus.Created); |
| | | } |
| | | |
| | | public Dt_Task QueryOutFireAlarmTask(string deviceNo) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm && x.TaskState == (int)TaskOutStatusEnum.OutNew); |
| | | } |
| | | |
| | | public Dt_Task QueryExecutingTaskByBarcode(string barcode, string nextAddress) |
| | | { |
| | | return BaseDal.QueryFirst(x => x.PalletCode == barcode && x.NextAddress == nextAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy); |
| | |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001")) |
| | | if ((task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001"))||task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | { |
| | | var TASKHTY = task.Adapt<Dt_Task_Hty>(); |
| | | _taskRepository.DeleteData(task); |
| | |
| | | private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | Dt_Task task = null; |
| | | |
| | | task = _taskService.QueryOutFireAlarmTask(commonStackerCrane.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | return task; |
| | | } |
| | | if (commonStackerCrane.LastTaskType == null) |
| | | { |
| | | task = _taskService.QueryStackerCraneTask(commonStackerCrane.DeviceCode); |
| | |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | if (task.Roadway.Contains("GW")) |
| | | if (task.Roadway.Contains("GW") || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | { |
| | | string[] endCodes = task.NextAddress.Split("-"); |
| | | stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]); |
| | |
| | | } |
| | | else |
| | | { |
| | | if ((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ") || task.Roadway.Contains("CH"))) |
| | | if (((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ") || task.Roadway.Contains("CH"))) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) |
| | | { |
| | | string[] endCodes = task.NextAddress.Split("-"); |
| | | stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]); |
| | |
| | | { |
| | | Dt_Task task; |
| | | |
| | | task = _taskService.QueryOutFireAlarmTask(commonStackerCrane.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | return task; |
| | | } |
| | | |
| | | task = _taskService.QueryRelocationTask(commonStackerCrane.DeviceCode); |
| | | if (task != null) |
| | | { |
| | |
| | | /// å··é |
| | | /// </summary> |
| | | public string Roadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ID |
| | | /// </summary> |
| | | public string LocationCode { get; set; } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("ç´æ¥åºåº")] |
| | | InToOut = 106, |
| | | |
| | | /// <summary> |
| | | /// ç«è¦åºåº |
| | | /// </summary> |
| | | [Description("ç«è¦åºåº")] |
| | | OutFireAlarm = 500, |
| | | } |
| | | |
| | | public enum TaskRelocationTypeEnum |
| | |
| | | |
| | | #endregion åºåºä»»å¡å®æ |
| | | |
| | | #region ç«è¦ä»»å¡å®æ |
| | | public async Task<WebResponseContent> CompleteOutFireAlarmTaskAsync(Dt_Task task, DtStockInfo stock) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | (var loc, var tas) = UpdateStockAndTaskStatus(stock, task); |
| | | var taskHty = task.Adapt<Dt_Task_Hty>(); |
| | | taskHty.FinishTime = DateTime.Now; |
| | | taskHty.OperateType = App.User.UserName != null ? (int)OperateTypeEnum.äººå·¥å®æ : (int)OperateTypeEnum.èªå¨å®æ; |
| | | taskHty.Creater = App.User.UserName != null ? App.User.UserName : "System"; |
| | | |
| | | DtStockInfo_Hty stockInfo_Hty = stock.Adapt<DtStockInfo_Hty>(); |
| | | stockInfo_Hty.ModifyDate = DateTime.Now; |
| | | |
| | | // äºå¡å¤ç |
| | | await _unitOfWorkManage.UseTranAsync(async () => |
| | | { |
| | | if (task.TaskType != (int)TaskOutboundTypeEnum.OutQuality) |
| | | { |
| | | await DeleteStockInfoAsync(stock.Id); |
| | | await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); |
| | | await AddStockInfoHtyAsync(stockInfo_Hty); |
| | | await UpdateLocationAsync(loc); //è´¨æ£ä»»å¡éè¦æç»éå®åºä½ |
| | | } |
| | | await DeleteTaskAsync(task.TaskId); |
| | | await AddTaskHtyAsync(taskHty); |
| | | }); |
| | | return content.OK("ä»»å¡å®ææå", task.Remark); |
| | | } |
| | | #endregion |
| | | |
| | | #region ç§»åºä»»å¡å®æ |
| | | |
| | | /// <summary> |
| | |
| | | case (int)TaskOutboundTypeEnum.OutNG: |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "åºåºä»»å¡", ""); |
| | | return await CompleteStackTaskAsync(task, stock); |
| | | |
| | | case (int)TaskOutboundTypeEnum.OutFireAlarm: |
| | | |
| | | LogFactory.GetLog("ä»»å¡å®æ").InfoFormat(true, "ç«è¦ä»»å¡", ""); |
| | | return await CompleteOutFireAlarmTaskAsync(task, stock); |
| | | |
| | | case (int)TaskRelocationTypeEnum.Relocation: |
| | | return await CompleteTransferTaskAsync(task, stock); |
| | |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·ååºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetStockInfo() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | |
| | | if (emergencyTask == null) throw new Exception("ç«è¦åæ°ä¸ºç©º"); |
| | | |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == emergencyTask.row && x.Column == emergencyTask.column && x.Layer == emergencyTask.layer && x.AreaId == emergencyTask.zone); |
| | | if (locationInfo == null) |
| | | string[] strings = emergencyTask.LocationCode.Split("-"); |
| | | |
| | | string[] Roadways = strings[0].Select(x => x.ToString()).ToArray(); |
| | | string Roadway = string.Empty; |
| | | switch (Roadways[0]) |
| | | { |
| | | throw new Exception("æªç¥åºä½"); |
| | | case "J": |
| | | Roadway = "JZSC" + Roadways[1]; |
| | | break; |
| | | case "G": |
| | | Roadway = "GWSC" + Roadways[1]; |
| | | break; |
| | | case "C": |
| | | Roadway = "CWSC" + Roadways[1]; |
| | | break; |
| | | default: throw new Exception("æªè¯å«åºä½ç¼ç "); |
| | | } |
| | | |
| | | //æ¥æ¾æ¶é²ç«å° |
| | | var station = _stationManagerRepository.QueryFirst(t => t.Roadway == locationInfo.RoadwayNo |
| | | && t.stationType == (int)StationManager.FireStation |
| | | /*&& t. == "Enable"*/); |
| | | if (station == null) |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | throw new Exception("æ¶é²ç«å°æªé
ç½®!"); |
| | | } |
| | | |
| | | //æ¥æ¾åºåä¿¡æ¯ |
| | | var stockInfo = _stockInfoRepository.QueryFirst(x => x.LocationCode == locationInfo.LocationCode && x.LocationInfo.RoadwayNo == locationInfo.RoadwayNo); |
| | | //æçç |
| | | string barcode = string.Empty; |
| | | if (stockInfo != null) |
| | | { |
| | | barcode = stockInfo.PalletCode; |
| | | } |
| | | else |
| | | { |
| | | //æ åºåä¿¡æ¯ï¼çæéæºæçç |
| | | barcode = "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000); |
| | | } |
| | | |
| | | Dt_Task fireTask = BaseDal.QueryFirst(x => x.TaskType == 500 && x.SourceAddress == locationInfo.LocationCode && x.Roadway == station.Roadway); |
| | | |
| | | if (fireTask != null) |
| | | { |
| | | throw new Exception("已添å ç«è¦åºåºä»»å¡"); |
| | | } |
| | | |
| | | int taskNum = BaseDal.GetTaskNo().Result; |
| | | Dt_Task task = new Dt_Task |
| | | { |
| | | CreateDate = DateTime.Now, |
| | | Creater = "DTS", |
| | | CurrentAddress = locationInfo.LocationCode, |
| | | Grade = 1, |
| | | Dispatchertime = DateTime.Now, |
| | | PalletCode = barcode, |
| | | Roadway = station.Roadway, |
| | | SourceAddress = locationInfo.LocationCode, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskType = 500, |
| | | TargetAddress = station.stationLocation, |
| | | NextAddress = station.stationChildCode, |
| | | TaskNum = taskNum, //_taskRepository.GetTaskNo().Result, |
| | | TaskId = 0, |
| | | }; |
| | | |
| | | // å°è¯æ·»å æ°ä»»å¡ |
| | | WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | { |
| | | TaskNum = task.TaskNum.Value, |
| | | Grade = 1, |
| | | PalletCode = task.PalletCode, |
| | | RoadWay = task.Roadway, |
| | | SourceAddress = task.SourceAddress, |
| | | TargetAddress = task.TargetAddress, |
| | | TaskState = task.TaskState.Value, |
| | | Id = 0, |
| | | TaskType = 500, |
| | | }; |
| | | |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue; |
| | | var ReceiveByWMSTask = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveByWMSTask)?.ConfigValue; |
| | | if (ReceiveByWMSTask == null || ipAddress == null) |
| | | { |
| | | throw new Exception("WMS IP æªé
ç½®"); |
| | | } |
| | | var wmsIpAddrss = ipAddress + ReceiveByWMSTask; |
| | | |
| | | var respon = HttpHelper.Post(wmsIpAddrss, JsonConvert.SerializeObject(taskDTO)); |
| | | if (respon != null) |
| | | { |
| | | WebResponseContent respone = JsonConvert.DeserializeObject<WebResponseContent>(respon.ToString()); |
| | | if (respone.Status) |
| | | DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Convert.ToInt16(strings[1]) && x.Column == Convert.ToInt16(strings[2]) && x.Layer == (i == 0 ? Convert.ToInt16(strings[3]) * 2 - 1 : Convert.ToInt16(strings[3]) * 2) && x.RoadwayNo == Roadway); |
| | | if (locationInfo == null) |
| | | { |
| | | var taskId = BaseDal.AddData(task); |
| | | throw new Exception("æªç¥åºä½"); |
| | | } |
| | | |
| | | //æ¥æ¾æ¶é²ç«å° |
| | | var station = _stationManagerRepository.QueryFirst(t => t.Roadway == locationInfo.RoadwayNo && t.stationType == (int)StationManager.FireStation); |
| | | if (station == null) |
| | | { |
| | | throw new Exception("æ¶é²ç«å°æªé
ç½®!"); |
| | | } |
| | | |
| | | //æ¥æ¾åºåä¿¡æ¯ |
| | | var stockInfo = _stockInfoRepository.QueryFirst(x => x.LocationCode == locationInfo.LocationCode && x.LocationInfo.RoadwayNo == locationInfo.RoadwayNo); |
| | | //æçç |
| | | string barcode = string.Empty; |
| | | if (stockInfo != null) |
| | | { |
| | | barcode = stockInfo.PalletCode; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("WCSå¤ç失败:" + respone.Message); |
| | | //æ åºåä¿¡æ¯ï¼çæéæºæçç |
| | | barcode = "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("请æ±å¤ç失败"); |
| | | |
| | | Dt_Task fireTask = BaseDal.QueryFirst(x => x.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm && x.SourceAddress == locationInfo.LocationCode && x.Roadway == station.Roadway); |
| | | |
| | | if (fireTask != null) |
| | | { |
| | | throw new Exception("已添å ç«è¦åºåºä»»å¡"); |
| | | } |
| | | |
| | | int taskNum = BaseDal.GetTaskNo().Result; |
| | | Dt_Task task = new Dt_Task |
| | | { |
| | | CreateDate = DateTime.Now, |
| | | Creater = "DTS", |
| | | CurrentAddress = locationInfo.LocationCode, |
| | | Grade = i == 0 ? 5 : 3, |
| | | Dispatchertime = DateTime.Now, |
| | | PalletCode = barcode, |
| | | Roadway = station.Roadway, |
| | | SourceAddress = locationInfo.LocationCode, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskType = (int)TaskOutboundTypeEnum.OutFireAlarm, |
| | | TargetAddress = station.stationLocation, |
| | | NextAddress = station.stationLocation, |
| | | TaskNum = taskNum, //_taskRepository.GetTaskNo().Result, |
| | | TaskId = 0, |
| | | }; |
| | | |
| | | // å°è¯æ·»å æ°ä»»å¡ |
| | | WMSTaskDTO taskDTO = new WMSTaskDTO() |
| | | { |
| | | TaskNum = task.TaskNum.Value, |
| | | Grade = 1, |
| | | PalletCode = task.PalletCode, |
| | | RoadWay = task.Roadway, |
| | | SourceAddress = task.SourceAddress, |
| | | TargetAddress = task.TargetAddress, |
| | | TaskState = task.TaskState.Value, |
| | | Id = 0, |
| | | TaskType = task.TaskType, |
| | | }; |
| | | |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue; |
| | | var ReceiveByWMSTask = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.ReceiveByWMSTask)?.ConfigValue; |
| | | if (ReceiveByWMSTask == null || ipAddress == null) |
| | | { |
| | | throw new Exception("WMS IP æªé
ç½®"); |
| | | } |
| | | var wmsIpAddrss = ipAddress + ReceiveByWMSTask; |
| | | |
| | | var respon = HttpHelper.Post(wmsIpAddrss, JsonConvert.SerializeObject(taskDTO)); |
| | | if (respon != null) |
| | | { |
| | | WebResponseContent respone = JsonConvert.DeserializeObject<WebResponseContent>(respon.ToString()); |
| | | if (respone.Status) |
| | | { |
| | | var taskId = BaseDal.AddData(task); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("WCSå¤ç失败:" + respone.Message); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("请æ±å¤ç失败"); |
| | | } |
| | | } |
| | | LogFactory.GetLog("DTSç«è¦åºåº").Info(true, $"\r\r--------------------------------------"); |
| | | LogFactory.GetLog("DTSç«è¦åºåº").Info(true, obj.ToJsonString()); |
| | |
| | | // TODO 夿å¨éæ°é |
| | | |
| | | var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine && x.fromArea == "CW"); |
| | | var needCount = needBarcode.inLineNum; |
| | | var needCount = needBarcode.inLineNum = BaseDal.QueryData(x => x.TargetAddress == STATION.stationChildCode).Count(); |
| | | //var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count; |
| | | if (needCount < needBarcode.cacheNum) |
| | | { |