Эх сурвалжийг харах

feat: 正式环境配置;回采视频拉流端口修改

wangshuang 11 сар өмнө
parent
commit
0ef478cea4

+ 4 - 2
.env

@@ -31,7 +31,8 @@ VUE_APP_NAME = '浪潮屏媒安播云平台'
 VUE_APP_GATEWAY = ''
 
 # base api
-VUE_APP_BASE_API = '/prod-api'
+#VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = 'http://172.31.33.2:20001/prod-api'
 
 # minio
 VUE_APP_MINIO = '/oss-api'
@@ -43,7 +44,8 @@ VUE_APP_THUMBNAIL_ORIGIN = ''
 # keycloak
 # 默认需要realm-manager下的view-user,用于查看用户信息
 # 管理员需要realm-manager下的view-realm,用于查看租户、角色、凭证等信息
-VUE_APP_KEYCLOAK_OPTIONS_URL = '/auth'
+#VUE_APP_KEYCLOAK_OPTIONS_URL = '/auth'
+VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://172.31.33.2:20005/auth'
 VUE_APP_KEYCLOAK_OPTIONS_REALM = 'smsb'
 VUE_APP_KEYCLOAK_OPTIONS_CLIENTID = 'frontend-api'
 VUE_APP_KEYCLOAK_OPTIONS_ONLOAD = 'login-required'

+ 3 - 3
.env.development

@@ -1,9 +1,9 @@
 ENV = 'alpha'
 
 #VUE_APP_BASE_API = '/dev-api'
-VUE_APP_BASE_API = 'http://172.31.33.2:20001/prod-api'
+VUE_APP_BASE_API = '/prod-api'
 
-VUE_APP_MINIO = '/dev-api/oss-api'
+VUE_APP_MINIO = 'http://172.31.33.2:20001/oss-api'
 
 VUE_APP_THUMBNAIL = '/dev-api/api/imageproxy'
 
@@ -23,7 +23,7 @@ VUE_APP_OFFLINE_MAP_PROXY = '/tiles'
 #VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://10.58.110.5:9080/auth'
 
 #VUE_APP_GATEWAY = '192.168.2.120'
-#VUE#_APP_KEYCLOAK_OPTIONS_URL = 'http://192.168.2.120:9080/auth'
+#VUE_APP_KEYCLOAK_OPTIONS_URL = 'http://192.168.2.120:9080/auth'
 
 # 孙村服务器
 VUE_APP_GATEWAY = '172.31.33.2'

+ 22 - 17
src/components/dialog/TemplateAssetChooseDialog/index.vue

@@ -243,25 +243,27 @@
             />
           </div>
           <!--          放在底层,用截图封面图片-->
-          <div
-            ref="canvas"
-            style="position: absolute;top:0px;left: 0px;z-index: -1;"
-            class="l-flex__none"
-            :style="canvasStyles"
-          >
+          <div style="position: absolute;top:10px;left: 10px;z-index: -1;">
             <div
-              class="c-viewer__canvas has-bg"
-              :style="[transformStyles, styles]"
+              ref="canvas"
+
+              class="l-flex__none"
+              :style="canvasStyles"
             >
               <div
-                class="c-viewer__background has-bg"
-                :style="backgroundStyles"
-              />
-              <widget
-                v-for="item in widgets"
-                :key="item.id"
-                :node="item"
-              />
+                class="c-viewer__canvas has-bg"
+                :style="[transformStyles, styles]"
+              >
+                <div
+                  class="c-viewer__background has-bg"
+                  :style="backgroundStyles"
+                />
+                <widget
+                  v-for="item in widgets"
+                  :key="item.id"
+                  :node="item"
+                />
+              </div>
             </div>
           </div>
         </div>
@@ -341,6 +343,7 @@ export default {
       assets: [],
       tableAssets: [],
       duration: 10,
+      resolutionRatio: '',
       options: {},
       isStream: false,
       selectedWidget: null, //
@@ -597,6 +600,8 @@ export default {
           try {
             console.log('showProgram', data)
             console.log('itemJsonStr', JSON.parse(data.itemJsonStr))
+            this.resolutionRatio = data.resolutionRatio
+            console.log('resolutionRatio--', this.resolutionRatio)
             const { id, status, name, resolutionRatio, itemJsonStr } = data
             const [width, height] = resolutionRatio.split('x')
             if (!width || !height) {
@@ -902,7 +907,7 @@ export default {
         //   ...options
         // })
         const result = await saveTemplate({
-          resolutionRatio: '1920x1080',
+          resolutionRatio: this.resolutionRatio,
           duration: getDuration(this.node),
           itemJsonStr: JSON.stringify(toJSON(this.node)),
           keyNameList: getUsedAssets(this.node),

+ 2 - 1
src/components/service/external/DevicePlayer/index.vue

@@ -187,6 +187,7 @@ export default {
       this.loadingQuality = true
       getRecordConfig(this.device.id, { custom: true }).then(
         ({ data }) => {
+          console.log('data获取回采配置', data)
           if (data) {
             this.loadingQuality = false
             this.onUpdateRecordConfig(data)
@@ -330,7 +331,7 @@ export default {
         return urlObj.href.slice(0, -1) // 多出一个/
       }
       let url = GATEWAY
-      url = replacePort(url, ['9111', '9112', '9113'][this.$REQUEST_LIMIT.limit])
+      url = replacePort(url, ['20001'][this.$REQUEST_LIMIT.limit])
       this.$REQUEST_LIMIT.limit = (this.$REQUEST_LIMIT.limit + 1) % 3
       this.playUrl(`${url}/live/${this.recordConfig.stream}.flv?vhost=__defaultVhost__`)
     },

+ 19 - 8
vue.config.js

@@ -40,17 +40,28 @@ module.exports = {
   assetsDir: '',
   lintOnSave: !isProd,
   productionSourceMap: false,
+  // devServer: {
+  //   port,
+  //   open: false,
+  //   overlay: {
+  //     warnings: false,
+  //     errors: true
+  //   },
+  //   before: require('./mock/mock-server.js'),
+  //   staticOptions: {
+  //     redirect: true
+  //   }
+  // },
   devServer: {
     port,
-    open: false,
-    overlay: {
-      warnings: false,
-      errors: true
-    },
-    before: require('./mock/mock-server.js'),
-    staticOptions: {
-      redirect: true
+    open: true,
+    proxy: {
+      [process.env.VUE_APP_BASE_API]: {
+        target: `http://172.31.33.2:20001`,
+        changeOrigin: true
+      }
     }
+    // disableHostCheck: true
   },
   configureWebpack: {
     // provide the app's title in webpack's name field, so that