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:20:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9beb0a8ef11816c1f35ad392bb8754d26bdd768b
9beb0a8e
1 parent
8f3fc8f5
请求方法调用变更,bug修复
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
58 deletions
src/api/preMdeConfig.js
src/permission.js
src/settings.js
src/views/preMdeConfig/flightToArea/index.vue
src/views/preMdeConfig/ursaToArea/index.vue
src/api/preMdeConfig.js
View file @
9beb0a8
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,12 @@ 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
()
},
//
headers: { 'Authorization': 'Bearer ' + getToken() },
data
:
formData
})
// return request({
// url: '/flightDestination/importFlightDestination',
// method: 'post',
// data: formData
// })
}
//URSA目的地批量导入
...
...
@@ -43,17 +36,12 @@ 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
()
},
//
headers: { 'Authorization': 'Bearer ' + getToken() },
data
:
formData
})
// return request({
// url: '/ursaDestination/importUrsaDestination',
// method: 'post',
// data: formData
// })
}
//航班目的地查询
...
...
src/permission.js
View file @
9beb0a8
...
...
@@ -23,10 +23,7 @@ router.beforeEach((to, from, next) => {
})
})
}).
catch
(
err
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
next
({
path
:
'/'
})
})
})
}
else
{
next
()
...
...
src/settings.js
View file @
9beb0a8
...
...
@@ -42,6 +42,7 @@ module.exports = {
/**
* logout
*/
loginURL
:
'http://47.103.140.98/test/login'
,
logoutURL
:
'http://47.103.140.98/test/login'
,
/**
...
...
src/views/preMdeConfig/flightToArea/index.vue
View file @
9beb0a8
...
...
@@ -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,29 +155,18 @@ 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);
} else if (res.code === 201) {
this.msgWarning(res.msg);
this.errorData = res.data.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
} else if (res.data.code === 301) {
this.$confirm('登录状态已过期,需重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
confirmButtonText: '重新登录',
type: 'warning'
}).then(
this.$store.dispatch('LogOut').then(() => {
window.location.href = settings.loginURL;//wsso系统跳转
})
)
} else {
this.msgWarning(res.
data.
msg);
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
...
...
src/views/preMdeConfig/ursaToArea/index.vue
View file @
9beb0a8
...
...
@@ -25,8 +25,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>
...
...
@@ -162,29 +162,18 @@ 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) {
this.$confirm('登录状态已过期,需重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
confirmButtonText: '重新登录',
type: 'warning'
}).then(
this.$store.dispatch('LogOut').then(() => {
window.location.href = settings.loginURL;//wsso系统跳转
})
)
} else {
this.msgWarning(res.
data.
msg);
this.msgWarning(res.msg);
}
} else {
this.msgSuccess("导入成功");
...
...
@@ -211,6 +200,7 @@ export default {
this.selection()
},
upload() {
console.log(1)
this.$refs.selectForm.validateField('beginDate')
}
},
...
...
Please
register
or
login
to post a comment