Browse Source

优化测试环境下的访问地址及其他优化

master
李磊 3 years ago
parent
commit
e97d1a690e
  1. 8
      .env.test
  2. 2
      .gitignore
  3. 2
      public/index.html
  4. 2
      src/store/modules/user.js
  5. 25
      src/views/flow/template.vue
  6. 2
      vue.config.js

8
.env.test

@ -1,13 +1,13 @@
# 测试环境相关配置 # 测试环境相关配置
# 微服务IP # 微服务IP
VUE_APP_SERVER_ADDRESS = 'test.mingansei.com' VUE_APP_SERVER_ADDRESS = 'test.sdma.mingansei.com'
# 省局数据后台IP # 省局数据后台IP
VUE_APP_SJ_BASE_IP_ADDRESS = 'test.mingansei.com' VUE_APP_SJ_BASE_IP_ADDRESS = 'test.sdma.mingansei.com'
# 微服务地址 # 微服务地址
VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}:9100' VUE_APP_SERVER_API = 'http://${VUE_APP_SERVER_ADDRESS}'
# 业务后台访问地址 # 业务后台访问地址
VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/' VUE_APP_BASE_API = '${VUE_APP_SERVER_API}/sdma-manage/'
@ -22,4 +22,4 @@ VUE_APP_SJ_API = 'http://${VUE_APP_SJ_BASE_IP_ADDRESS}:9092/SJSE/'
VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/' VUE_APP_PREVIEW_API = '${VUE_APP_SERVER_API}/sdma-preview/'
# websocket连接地址 # websocket连接地址
VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}:9100/sdma-websocket/websocket/' VUE_APP_WEBSOCKET = 'ws://${VUE_APP_SERVER_ADDRESS}/sdma-websocket/websocket/'

2
.gitignore

@ -1,6 +1,6 @@
.DS_Store .DS_Store
node_modules node_modules
/jinan /sdmaFront
# local env files # local env files
.env.local .env.local

2
public/index.html

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>JNFront</title> <title>SdmaFront</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

2
src/store/modules/user.js

@ -22,7 +22,7 @@ const user = {
allUser: [], allUser: [],
allCategory: [], allCategory: [],
messageCount: [], messageCount: [],
prodName: process.env.NODE_ENV === 'test' ? '/jinan' : '' // 开发环境下为空,生产环境下请设置为tomcat项目名称。(例如:/dist) prodName: process.env.NODE_ENV === 'test' ? '/sdmaFront' : '' // 开发环境下为空,生产环境下请设置为tomcat项目名称。(例如:/dist)
}, },
mutations: { mutations: {
SET_USER: (state, userInfo) => { SET_USER: (state, userInfo) => {

25
src/views/flow/template.vue

@ -63,6 +63,19 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-select
v-model="listQuery.tempCategory"
placeholder="模板类型"
style="width: 200px"
clearable
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="handleFilter"> <el-button type="primary" icon="el-icon-search" @click="handleFilter">
查询 查询
</el-button> </el-button>
@ -274,14 +287,18 @@ export default {
{ {
value: 'YSJL', value: 'YSJL',
label: '原始记录' label: '原始记录'
}, }, {
{
value: 'JYBG', value: 'JYBG',
label: '检验报告' label: '检验报告'
}, }, {
{
value: 'OTHER', value: 'OTHER',
label: '其他' label: '其他'
}, {
value: 'HZD',
label: '回执单'
}, {
value: 'RWD',
label: '任务单'
} }
], ],
formTemplate: {}, formTemplate: {},

2
vue.config.js

@ -10,7 +10,7 @@ const name = pkg.name || 'sdma-front' // page title
const port = process.env.NODE_ENV === 'development' ? 9527 : 8090 const port = process.env.NODE_ENV === 'development' ? 9527 : 8090
console.log(process.env.NODE_ENV === 'development') console.log(process.env.NODE_ENV === 'development')
module.exports = { module.exports = {
publicPath: './', publicPath: process.env.NODE_ENV === 'test' ? '/sdmaFront' : './',
outputDir: 'sdmaFront', outputDir: 'sdmaFront',
assetsDir: 'static', assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development' ? 'error' : false, lintOnSave: process.env.NODE_ENV === 'development' ? 'error' : false,

Loading…
Cancel
Save