Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2023-02-22 15:27:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
022c3526aa763f746348fcb80f9cfc0fbbc825c6
022c3526
1 parent
f0b21332
请求方法变更,超时时间修正,文本修正
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
52 deletions
src/api/preMdeConfig.js
src/permission.js
src/utils/request.js
src/views/preMdeConfig/flightToArea/index.vue
src/views/preMdeConfig/reportForm/index.vue
src/views/preMdeConfig/ursaToArea/index.vue
src/api/preMdeConfig.js
View file @
022c352
import
request
from
'@/utils/request'
import
axios
from
'axios'
;
import
settings
from
"@/settings"
import
{
getToken
}
from
'@/utils/auth'
//模板下载
export
function
downLoadTemplate
(
template
)
{
...
...
@@ -21,17 +19,11 @@ export function importFlightDestination(file, date) {
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
formData
.
append
(
"beginDate"
,
date
);
return
axios
({
return
request
({
method
:
'post'
,
url
:
settings
.
baseURL
+
'/flightDestination/importFlightDestination'
,
headers
:
{
'Authorization'
:
'Bearer '
+
getToken
()
},
data
:
formData
})
// return request({
// url: '/flightDestination/importFlightDestination',
// method: 'post',
// data: formData
// })
}
//URSA目的地批量导入
...
...
@@ -43,17 +35,11 @@ export function importUrsaDestination(file, date) {
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
formData
.
append
(
"beginDate"
,
date
);
return
axios
({
return
request
({
method
:
'post'
,
url
:
settings
.
baseURL
+
'/ursaDestination/importUrsaDestination'
,
headers
:
{
'Authorization'
:
'Bearer '
+
getToken
()
},
data
:
formData
})
// return request({
// url: '/ursaDestination/importUrsaDestination',
// method: 'post',
// data: formData
// })
}
//航班目的地查询
...
...
src/permission.js
View file @
022c352
...
...
@@ -25,10 +25,10 @@ router.beforeEach((to, from, next) => {
})
}).
catch
(
err
=>
{
Message
.
error
(
err
)
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
// next({ path: '/' })
window
.
location
.
href
=
settings
.
logout
URL
;
//wsso系统跳转
})
//
store.dispatch('LogOut').then(() => {
//
// next({ path: '/' })
// window.location.href = settings.login
URL;//wsso系统跳转
//
})
})
}
else
{
next
()
...
...
@@ -47,7 +47,7 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入
next
()
}
else
{
window
.
location
.
href
=
settings
.
log
out
URL
;
//wsso系统跳转
window
.
location
.
href
=
settings
.
log
in
URL
;
//wsso系统跳转
}
}
}
...
...
src/utils/request.js
View file @
022c352
...
...
@@ -11,7 +11,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL
:
settings
.
baseURL
,
// 超时
timeout
:
3
0000
,
timeout
:
9
0000
,
})
// request拦截器
...
...
@@ -59,8 +59,10 @@ service.interceptors.response.use(res => {
// 获取错误信息
const
msg
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'default'
]
if
(
code
===
301
)
{
MessageBox
.
confirm
(
'登录状态已过期,需重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'确定'
,
MessageBox
.
confirm
(
'登录状态已过期,需重新登录!msg:'
+
msg
,
'系统提示'
,
{
closeOnClickModal
:
false
,
showCancelButton
:
false
,
confirmButtonText
:
'重新登录'
,
type
:
'warning'
}
).
then
(()
=>
{
...
...
src/views/preMdeConfig/flightToArea/index.vue
View file @
022c352
...
...
@@ -24,8 +24,8 @@
<el-row>
<el-col :span="6">
<el-form-item label="生效日期" prop="beginDate" :rules="rules">
<el-date-picker class="formItem" v-model="formData.beginDate" type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
<el-date-picker class="formItem" v-model="formData.beginDate" type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
...
...
@@ -155,17 +155,17 @@ export default {
//上传excel
const file = option.file;
importFlightDestination(file, this.formData.beginDate).then((res) => {
if (res.
data.
code != 200) {
if (res.
data.
code == 603) {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.
data.
code === 201) {
this.msgWarning(res.
data.
msg);
this.errorData = res.data
.data
;
} else if (res.code === 201) {
this.msgWarning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
} else if (res.
data.
code === 301) {
} else if (res.code === 301) {
this.$confirm('登录状态已过期,需重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
...
...
@@ -177,7 +177,7 @@ export default {
})
)
} else {
this.msgWarning(res.
data.
msg);
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
...
...
src/views/preMdeConfig/reportForm/index.vue
View file @
022c352
...
...
@@ -30,10 +30,8 @@
</el-col>
<el-col :span="5">
<el-form-item label="URSA">
<el-select v-model="formData.ursas" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item"
:key="item">
<el-select v-model="formData.ursas" class="formItem" filterable multiple clearable placeholder="不限">
<el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
...
...
@@ -56,7 +54,7 @@
</div>
<div style="padding:10px">
<el-form label-position="right" label-width="auto" size="small">
<el-form-item label="
坐标系切换
">
<el-form-item label="
类型
">
<el-radio-group v-model="formData.dimensionName" @change="typeChange">
<el-radio label="region">区域</el-radio>
<el-radio label="area">地区</el-radio>
...
...
@@ -66,10 +64,9 @@
</el-form-item>
</el-form>
<div v-for="(item, index) in barChartData" :key="index">
<Chart :className="'chart' + index.toString()" :chartData="item" height="350px"
style="margin-bottom:10px"
:loading="loading" />
<Chart :className="'chart' + index.toString()" :chartData="item" height="350px"
style="margin-bottom:10px"
:loading="loading" />
</div>
</div>
</div>
</template>
...
...
@@ -224,6 +221,4 @@ export default {
}
</script>
<style>
</style>
\ No newline at end of file
<style></style>
\ No newline at end of file
...
...
src/views/preMdeConfig/ursaToArea/index.vue
View file @
022c352
...
...
@@ -162,17 +162,17 @@ export default {
//上传excel
const file = option.file;
importUrsaDestination(file, this.formData.beginDate).then((res) => {
if (res.
data.
code != 200) {
if (res.
data.
code == 603) {
this.$alert(res.
data.
msg, "提示", {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.
data.
code === 201) {
this.msgWarning(res.
data.
msg);
this.errorData = res.data
.data
;
} else if (res.code === 201) {
this.msgWarning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
} else if (res.
data.
code === 301) {
} else if (res.code === 301) {
this.$confirm('登录状态已过期,需重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
...
...
@@ -184,7 +184,7 @@ export default {
})
)
} else {
this.msgWarning(res.
data.
msg);
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
...
...
Please
register
or
login
to post a comment