Browse Source

外配置路径

zhengnaiwen_citu 4 months ago
parent
commit
7cf9342c43
3 changed files with 10 additions and 2 deletions
  1. 2 0
      .env.development
  2. 1 0
      .env.production
  3. 7 2
      src/views/salary/calculate/index.vue

+ 2 - 0
.env.development

@@ -5,3 +5,5 @@ VUE_APP_MODE = 'development'
 
 # VUE_APP_BASE_API = 'http://192.168.3.149:7654'
 VUE_APP_BASE_API = '/api'
+
+VUE_APP_DATA_OPS = 'https://company.citupro.com:18183'

+ 1 - 0
.env.production

@@ -6,4 +6,5 @@ VUE_APP_MODE = 'production'
 
 VUE_APP_BASE_API = '/op/base'
 
+VUE_APP_DATA_OPS = 'https://company.citupro.com:18183'
 

+ 7 - 2
src/views/salary/calculate/index.vue

@@ -1,12 +1,17 @@
 <template>
   <div class="white" style="height: 100%; box-sizing: border-box;">
-    <iframe src="https://company.citupro.com:18183/dataFactory/production-line-monitor1?aaa=111" width="100%" height="100%" frameborder="0"></iframe>
+    <iframe :src="`${baseSrc}/dataFactory/production-line-monitor1?aaa=324`" width="100%" height="100%" frameborder="0"></iframe>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'salary-calculate'
+  name: 'salary-calculate',
+  data () {
+    return {
+      baseSrc: process.env.VUE_APP_DATA_OPS
+    }
+  }
 }
 </script>