Selaa lähdekoodia

配合世利修改报表所需修改问题;整合框架,功率预测,发电能力分析,报表项目合并;开发黑色版本与白色版本

SunZehao 1 vuosi sitten
vanhempi
commit
b99ebcfb51

+ 2 - 1
.env.development

@@ -9,7 +9,8 @@ VUE_APP_TITLE = '页面标题'
 VUE_APP_GENERAT_URL = 'http://123.60.219.66:9002'
 # VUE_APP_GENERAT_URL = 'http://192.168.2.12:9002'
 # 智能报表
-VUE_APP_REPORT_URL = 'http://192.168.2.16:9001'
+VUE_APP_REPORT_URL = 'http://123.60.219.66:9001'
+# VUE_APP_REPORT_URL = 'http://192.168.2.3:9001'
 # 功率预测
 VUE_APP_BASE_URL = 'http://123.60.219.66:8086'
 

+ 3 - 1
.env.production

@@ -13,7 +13,9 @@ VUE_APP_TITLE = '页面标题'
 
 # 生产环境/重写路径(公共路径)
 VUE_APP_GENERAT_URL = 'http://123.60.219.66:9002'
-VUE_APP_REPORT_URL = 'http://192.168.2.16:9001'
+
+VUE_APP_REPORT_URL = 'http://123.60.219.66:9001'
+
 VUE_APP_BASE_URL = 'http://123.60.219.66:8086'
 
 # 百度地图KEY

+ 9 - 0
src/api/gengra.js

@@ -44,4 +44,13 @@ export function apiGetpowerprepareshow(params) {
     })
 }
 
+export function apiGetExportMsg(params) {
+    return httpRequest({
+        baseURL: process.env.VUE_APP_GENERAT_URL,
+        url: 'data/option/download',
+        method: 'get',
+        params: params
+    })
+}
+
 //******************************end*******************************************//

+ 1 - 1
src/api/report.js

@@ -21,7 +21,7 @@ export function read() {
 // 运行脚本
 export function run(data) {
     return httpRequest({
-        baseURL: process.env.VUE_APP_REPORT_URL,
+        baseURL: 'http://127.0.0.1:9001',
         url: 'script/run',
         method: 'post',
         data: data

+ 39 - 7
src/components/generatingCapacityComponent/tree.vue

@@ -39,6 +39,15 @@
 </template>
 <script>
     import httpRequest from '@/utils/request.js'
+    import {
+        saveAs
+    } from 'file-saver'
+    import {
+        apiGetExportMsg
+    } from '@/api/gengra'
+    import {
+        DebugCameraPrimitive
+    } from 'cesium'
     export default {
         props: {
             data: {
@@ -53,6 +62,12 @@
                     return '';
                 },
             },
+            type: {
+                type: String,
+                default: () => {
+                    return 'wind';
+                },
+            },
             dropdownMenu: {
                 type: Array,
                 default: () => {
@@ -101,7 +116,7 @@
                 switch (type) {
                     case 'save':
                         /**该保存功能目前暂用于风电场, combine页 */
-                        if (props.type !== 'wind') {
+                        if (this.type !== 'wind') {
                             return false
                         }
                         ElMessageBox.confirm("确认保存当前节点的拟合功率?", "保存", {
@@ -146,15 +161,32 @@
                         }).then(() => {
                             const a = document.createElement("a");
                             let childs = []
-                            childs = props.type === 'wind' ? data.childs.map((o) => o.id) : data.childs.map(
+                            childs = this.type === 'wind' ? data.childs.map((o) => o.id) : data.childs.map(
                                 (o) => o.path)
-                            const url = props.type === 'wind' ? '/data/option/download?ids=' :
+                            const url = this.type === 'wind' ? '/data/option/download?ids=' :
                                 '/export/files?filename='
                             a.href =
-                                config.baseURL + url + childs.join(",");
+                                // config.baseURL + url + childs.join(",");
+                                process.env.VUE_APP_GENERAT_URL + url + childs.join(",");
                             a.download = "";
                             a.target = '_blank'
                             a.click();
+
+                            // let that = this
+                            // let childs = []
+                            // childs = this.type === 'wind' ? data.childs.map((o) => o.id) : data.childs.map(
+                            //     (o) => o.path)
+                            // let params = {
+                            //     ids: childs.join(",")
+                            // }
+                            // apiGetExportMsg(params).then(datas => {
+                            //     let blob = new Blob([datas], {
+                            //         type: `application/vnd.ms-excel;charset=utf-8`
+                            //     })
+                            //     saveAs(blob)
+                            // }).catch((r) => {
+                            //     console.error(r)
+                            // })
                         });
                         break;
                     case "delete":
@@ -167,7 +199,7 @@
                             const repeatArr = (arr, deleteArr) => {
                                 for (const unit of arr) {
                                     if (unit.childs.length) {
-                                        deleteArr.push(...unit.childs.map((o) => props.type ===
+                                        deleteArr.push(...unit.childs.map((o) => this.type ===
                                             'wind' ? o.id : o.path));
                                     } else if (unit.children.length) {
                                         repeatArr(unit.children, deleteArr);
@@ -175,7 +207,7 @@
                                 }
                             };
                             if (data.childs.length) {
-                                deleteArr = data.childs.map((o) => props.type === 'wind' ? o.id : o
+                                deleteArr = data.childs.map((o) => this.type === 'wind' ? o.id : o
                                     .path);
                             } else if (data.children.length) {
                                 repeatArr(data.children, deleteArr);
@@ -183,7 +215,7 @@
                             let res = {
                                 code: 500
                             }
-                            if (props.type === 'wind') {
+                            if (this.type === 'wind') {
                                 res = await httpRequest.get("/generat/data/option/delete", {
                                     params: {
                                         ids: deleteArr.join(",")

+ 1 - 1
src/utils/request.js

@@ -20,7 +20,7 @@ const service = axios.create({
     // axios中请求配置有baseURL选项,表示请求URL公共部分
     baseURL: process.env.VUE_APP_GENERAT_URL,
     // 超时
-    timeout: 3000,
+    timeout: 180000,
     headers: {
         // 设置后端需要的传参类型
         'Content-Type': 'application/json;charset=utf-8',

+ 2 - 1
src/views/generatingCapacity/dataAnalysis/posAnalysis/index.vue

@@ -185,10 +185,11 @@
     const excelList = ref([]);
     const store = useStore();
 
-    const showOnlineMap = ref(false);
+    const showOnlineMap = ref(true);
     watch(
         () => router.currentRoute.value,
         (newValue, oldValue) => {
+            debugger
             // if (newValue.path === "/dataAnalysis/posAnalysis") {
             if (newValue.path.indexOf("/dataAnalysis/posAnalysis") > -1) {
                 if (newValue.query.onlineMap) {

+ 8 - 1
src/views/intelligentReporting/reporting/index.vue

@@ -43,7 +43,7 @@
                 </div>
 
                 <div class="listBot warn-table">
-                    <p>每天运行一次</p>
+                    <p class="tableTit">每天运行一次</p>
                     <el-table :data="tableData4" :height="listHeight">
                         <el-table-column label="时间" width="300">
                             <el-time-select v-model="timeValue" start="00:05" step="00:05" end="23:55"
@@ -155,6 +155,10 @@
         padding: 20px 0;
         background: #161f1e;
         border-radius: 10px;
+
+        .tableTit {
+            color: #fff;
+        }
     }
 
     .themeLight {
@@ -162,5 +166,8 @@
         background: #edeffb;
         border-radius: 10px;
 
+        .tableTit {
+            color: #161f1e;
+        }
     }
 </style>