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
2022-05-23 11:41:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8bb65aa93c9ce273748d4a821d31da752df40075
8bb65aa9
1 parent
6935723b
配置整合,文本修正
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
35 deletions
src/assets/languages/dictLabels.js
src/router/index.js
src/settings.js
src/utils/auth.js
src/utils/request.js
src/utils/zipdownload.js
src/views/basicInformation/queryCargo/index.vue
src/assets/languages/dictLabels.js
View file @
8bb65aa
...
...
@@ -6,7 +6,16 @@ let ductLabels = {
},
"releasing"
:
{
"1"
:
"正在释放"
}
},
"cargoAllocationDataStatus"
:
{
"已推送"
:
"已推送"
,
"不推送"
:
"不推送"
,
"已配"
:
"已配"
,
"手动配舱"
:
' '
,
"已释放"
:
' '
,
"原航班配舱"
:
' '
,
"顺位配舱"
:
' '
,
},
},
"menu"
:
{
//菜单设置
"menuType"
:
{
...
...
src/router/index.js
View file @
8bb65aa
import
Vue
from
'vue'
import
Router
from
'vue-router'
import
settings
from
"@/settings"
Vue
.
use
(
Router
)
...
...
@@ -92,5 +93,5 @@ export default new Router({
mode
:
'hash'
,
// 去掉url中的#
scrollBehavior
:
()
=>
({
y
:
0
}),
routes
:
constantRoutes
,
base
:
'/test'
base
:
settings
.
routerBase
,
})
\ No newline at end of file
...
...
src/settings.js
View file @
8bb65aa
...
...
@@ -40,7 +40,24 @@ module.exports = {
errorLog
:
'production'
,
/**
* logout
*/
logoutURL
:
'https://test-myapps.secure.fedex.com/purpleid/signout/'
,
/**
* 后端接口
*/
baseURL
:
`http://47.103.140.98:7001/iMAC`
,
// baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器
downLoadURL
:
`http://47.103.140.98:7001/iMAC`
,
/**
* 项目存放地址
*/
routerBase
:
'/test'
,
/**
* 版本号
*/
version
:
'version:1.1
.0'
version
:
'version:1.2
.0'
}
...
...
src/utils/auth.js
View file @
8bb65aa
//import Cookies from 'js-cookie'
const
TokenKey
=
'
Admin
-Token'
const
TokenKey
=
'
iMac
-Token'
export
function
getToken
()
{
//return Cookies.get(TokenKey)
...
...
src/utils/request.js
View file @
8bb65aa
...
...
@@ -3,13 +3,14 @@ import { Message, MessageBox } from 'element-ui'
import
store
from
'@/store'
import
{
getToken
,
setToken
}
from
'@/utils/auth'
import
errorCode
from
'@/utils/errorCode'
import
settings
from
"@/settings"
axios
.
defaults
.
headers
[
'Content-Type'
]
=
'application/json;charset=utf-8'
// 创建axios实例
const
service
=
axios
.
create
({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.VUE_APP_BASE_API,
baseURL
:
`http://47.103.140.98:7001/iMAC`
,
//阿里云服务器
baseURL
:
settings
.
baseURL
,
//阿里云服务器
// baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', //uat服务器
// baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器
...
...
@@ -53,7 +54,7 @@ service.interceptors.request.use(config => {
// 响应拦截器
service
.
interceptors
.
response
.
use
(
res
=>
{
if
(
res
.
headers
[
'token'
])
{
if
(
res
.
headers
[
'token'
])
{
setToken
(
decodeURI
(
res
.
headers
[
'token'
]))
}
// 未设置状态码则默认成功状态
...
...
src/utils/zipdownload.js
View file @
8bb65aa
import
axios
from
'axios'
import
{
getToken
}
from
'@/utils/auth'
import
settings
from
"@/settings"
const
mimeMap
=
{
xlsx
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
zip
:
'application/zip'
}
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器
const
baseUrl
=
'http://47.103.140.98:7001/iMAC'
//阿里云服务器
const
baseUrl
=
settings
.
downLoadURL
//阿里云服务器
// const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器
export
function
downLoadZip
(
str
,
filename
)
{
...
...
@@ -26,7 +27,7 @@ export function downLoadZip(str, filename) {
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export
function
resolveBlob
(
res
,
mimeType
)
{
export
function
resolveBlob
(
res
,
mimeType
)
{
const
aLink
=
document
.
createElement
(
'a'
)
var
blob
=
new
Blob
([
res
],
{
type
:
mimeType
})
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
...
...
@@ -43,9 +44,9 @@ export function downLoadZip(str, filename) {
}
// excel导出请求
export
function
downLoadXlsx
(
str
,
data
,
fileName
)
{
export
function
downLoadXlsx
(
str
,
data
,
fileName
)
{
var
url
=
baseUrl
+
str
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
method
:
'post'
,
url
:
url
,
...
...
@@ -56,19 +57,19 @@ export function downLoadXlsx(str, data,fileName) {
//uat环境token需要做url解码处理
}).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
downLoadExcal
(
res
,
fileName
)
downLoadExcal
(
res
,
fileName
)
}
resolve
(
res
)
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
reject
(
err
)
})
})
}
//excel导出下载
export
function
downLoadExcal
(
val
,
filename
)
{
export
function
downLoadExcal
(
val
,
filename
)
{
const
aLink
=
document
.
createElement
(
'a'
)
const
fileName
=
filename
+
".xlsx"
const
fileName
=
filename
+
".xlsx"
aLink
.
href
=
URL
.
createObjectURL
(
val
.
data
)
aLink
.
setAttribute
(
'download'
,
fileName
)
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
)
...
...
@@ -79,7 +80,7 @@ export function downLoadExcal(val,filename) {
//航班预审导出
export
function
cargoXlsxPre
(
str
,
data
)
{
var
url
=
baseUrl
+
str
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
method
:
'post'
,
url
:
url
,
...
...
@@ -91,7 +92,7 @@ export function cargoXlsxPre(str, data) {
cargoTableXlsxPre
(
res
)
}
resolve
()
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
reject
(
err
)
})
})
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
8bb65aa
...
...
@@ -155,9 +155,9 @@
</div>
</el-form>
<Tables ref="newTables" ductName="cargo" :data="tableData" :headerData="tableHeader" :infoData="tableHeader"
:selection="true" :
totalCount="totalCount" :loading="tableLoading" :limitSize="limitSize" :limitStart="limitStart
"
:
page="page" :shiftKey="shiftKey" :infoShow="false" :pageSizes="[100]" :height="tableHeight
"
@sizeChange="sizeChange" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
:selection="true" :
order="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="limitSize
"
:
limitStart="limitStart" :page="page" :shiftKey="shiftKey" :infoShow="false" :pageSizes="[100]
"
:height="tableHeight"
@sizeChange="sizeChange" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
@currentChange="currentChange" @sortChange="sortChange"></Tables>
<el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true">
...
...
@@ -165,8 +165,7 @@
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in releaseHeader" header-align="center" :align="item.align"
:prop="item.value" :label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true"
class-name="dialogColumn">
:prop="item.value" :label="item.name" :key="index" :show-overflow-tooltip="true">
</el-table-column>
</el-table>
<div slot="footer">
...
...
@@ -333,6 +332,15 @@ export default {
disabled: true
},
{
name: "ACCSpool",
value: "accsPool",
width: "120",
align: "center",
sorTable: true,
fixed: false,
disabled: true
},
{
name: "HandlingCode",
value: "handingCode",
width: "150",
...
...
@@ -414,15 +422,6 @@ export default {
disabled: true
},
{
name: "ACCSpool",
value: "accsPool",
width: "120",
align: "center",
sorTable: true,
fixed: false,
disabled: true
},
{
name: "货物状态",
value: "statusName",
width: "100",
...
...
@@ -807,19 +806,19 @@ export default {
} else if (res.code === 201) {
this.selectTable.map(item => {
res.data['success'].map(val => {
val === item.id ? item.msg = item.msg + '操作成功,正在释放中。
\n
' : ''
val === item.id ? item.msg = item.msg + '操作成功,正在释放中。' : ''
})
res.data['accsPoolFlase'].map(val => {
val === item.id ? item.msg = item.msg + 'Manifest状态不能释放。
\n
' : ''
val === item.id ? item.msg = item.msg + 'Manifest状态不能释放。' : ''
})
res.data['existReleasing'].map(val => {
val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。
\n
' : ''
val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : ''
})
res.data['noFlight'].map(val => {
val === item.id ? item.msg = item.msg + '已释放仓位。
\n
' : ''
val === item.id ? item.msg = item.msg + '已释放仓位。' : ''
})
res.data['pushFalse'].map(val => {
val === item.id ? item.msg = item.msg + '该货物
不为"不推送"状态,不能释放。\n
' : ''
val === item.id ? item.msg = item.msg + '该货物
配舱结果已回推ACCS,不能释放。
' : ''
})
})
this.dialogVisible = true
...
...
Please
register
or
login
to post a comment