Forráskód Böngészése

报表路径调整为读取配置数据

cfort 2 éve
szülő
commit
090a145c04
4 módosított fájl, 36 hozzáadás és 18 törlés
  1. 8 1
      public/config.js
  2. 20 10
      src/components/jbd-panel/index.vue
  3. 2 0
      src/constant.js
  4. 6 7
      src/plugins/ibps/index.js

+ 8 - 1
public/config.js

@@ -59,8 +59,15 @@
         I18N_LOCALE: 'zh-CN',
         I18N_FALLBACK_LOCALE: 'zh-CN',
 
+        //================其他配置=====================
         //element 颜色
-        ELEMENT_COLOR: '#409EFF'
+        ELEMENT_COLOR: '#409EFF',
+        // 系统版本
+        VERSION: '1.0.0',
+        // 系统名称
+        SYSTEM_NAME: '深圳市罗湖医院集团细胞质量检测实验室LIMS系统',
+        // 润乾报表根目录
+        REPORT_PATH: '罗医细胞质量检测实验室'
     }
 
 })(window)

+ 20 - 10
src/components/jbd-panel/index.vue

@@ -7,14 +7,24 @@
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
 <template>
-  <div class="jbd-sys-title">
-      <!--<span  class="jbd-sys-title-cont-center" style="margin-left: 40px;float: left;">金通实验室认证认可LIMS系统V2.0</span>-->
-      <span  class="jbd-sys-title-cont-center" style="margin-left: 40px;float: left;">深圳市罗湖医院集团细胞质量检测实验室LIMS系统</span>
-       <span style="float: right; " class="jbd-sys-title-contact">
-         </br>
-       深圳市金源信通科技有限公司开发 <i style="margin-left: 10px;" class="el-icon-phone"/> 0755-2642-4403
-       <i style="margin-left: 20px;" class="el-icon-phone"/> 181 2638 3365
+    <div class="jbd-sys-title">
+        <!--<span  class="jbd-sys-title-cont-center" style="margin-left: 40px;float: left;">金通实验室认证认可LIMS系统V2.0</span>-->
+        <span class="jbd-sys-title-cont-center" style="margin-left: 40px;float: left;">{{ systemName }}</span>
+        <span style="float: right; " class="jbd-sys-title-contact">
+            <br>
+            深圳市金源信通科技有限公司开发 <i style="margin-left: 10px;" class="el-icon-phone" /> 0755-2642-4403
+            <i style="margin-left: 20px;" class="el-icon-phone" /> 181 2638 3365
 
-     </span>
-  </div>
-</template>
+        </span>
+    </div>
+</template>
+<script>
+import { SYSTEM_NAME } from '@/constant'
+export default {
+    data () {
+        return {
+            systemName: SYSTEM_NAME
+        }
+    }
+}
+</script>

+ 2 - 0
src/constant.js

@@ -57,3 +57,5 @@ export const I18N_LOCALE = __IBPS_CONFIG__.I18N_LOCALE || 'zh-CN'
 export const I18N_FALLBACK_LOCALE = __IBPS_CONFIG__.I18N_FALLBACK_LOCALE || 'zh-CN'
 
 export const ELEMENT_COLOR = __IBPS_CONFIG__.ELEMENT_COLOR || '#409EFF'
+export const SYSTEM_NAME = __IBPS_CONFIG__.SYSTEM_NAME || '深圳市罗湖医院集团细胞质量检测实验室LIMS系统'
+export const REPORT_PATH = __IBPS_CONFIG__.REPORT_PATH || ''

+ 6 - 7
src/plugins/ibps/index.js

@@ -36,7 +36,7 @@ import pluginLog from '@/plugins/log'
 import pluginOpen from '@/plugins/open'
 // 平台配置文件
 import setting from '@/setting.js'
-import { BASE_URL } from '@/constant'
+import { BASE_URL, REPORT_PATH } from '@/constant'
 import env from '@/env'
 
 export default {
@@ -55,8 +55,7 @@ export default {
         Vue.prototype.$buildTime = env.VUE_APP_BUILD_TIME
 
         Vue.prototype.$ibpsUrl = env.VUE_APP_BASE_API_0_0_TEST
-        const reportPath = '罗医细胞质量检测实验室'
-        Vue.prototype.$reportFilePath = reportPath
+        Vue.prototype.$reportFilePath = REPORT_PATH
         // 格式化参数
         const getParams = (params) => {
             const parts = params.split('&')
@@ -78,11 +77,11 @@ export default {
         }
         const timer = setInterval(() => { // 定时循环添加参数
             if (getToken()) {
-                //报表路径
-                Vue.prototype.$reportPash = `${BASE_URL}demo/reportJsp/showReport.jsp?access_token=${getToken()}&rpx=${reportPath}/`
-                Vue.prototype.$getReportFile = downloadReport //通过方法函数,拼接url,并将字符串格式化
+                // 报表路径
+                Vue.prototype.$reportPash = `${BASE_URL}demo/reportJsp/showReport.jsp?access_token=${getToken()}&rpx=${REPORT_PATH}/`
+                Vue.prototype.$getReportFile = downloadReport // 通过方法函数,拼接url,并将字符串格式化
                 Vue.prototype.$getFileDow = `${BASE_URL}ibps/platform/v3/file/download?attachmentId=` // 文件下载地址
-                clearInterval(timer) //添加成功后即删除定时任务
+                clearInterval(timer) // 添加成功后即删除定时任务
             }
         }, 500)