jinhui.wang

配置整合,文本修正

...@@ -6,7 +6,16 @@ let ductLabels = { ...@@ -6,7 +6,16 @@ let ductLabels = {
6 }, 6 },
7 "releasing": { 7 "releasing": {
8 "1": "正在释放" 8 "1": "正在释放"
9 - } 9 + },
10 + "cargoAllocationDataStatus": {
11 + "已推送": "已推送",
12 + "不推送": "不推送",
13 + "已配": "已配",
14 + "手动配舱": ' ',
15 + "已释放": ' ',
16 + "原航班配舱": ' ',
17 + "顺位配舱": ' ',
18 + },
10 }, 19 },
11 "menu": {//菜单设置 20 "menu": {//菜单设置
12 "menuType": { 21 "menuType": {
......
1 import Vue from 'vue' 1 import Vue from 'vue'
2 import Router from 'vue-router' 2 import Router from 'vue-router'
3 +import settings from "@/settings"
3 4
4 Vue.use(Router) 5 Vue.use(Router)
5 6
...@@ -92,5 +93,5 @@ export default new Router({ ...@@ -92,5 +93,5 @@ export default new Router({
92 mode: 'hash', // 去掉url中的# 93 mode: 'hash', // 去掉url中的#
93 scrollBehavior: () => ({ y: 0 }), 94 scrollBehavior: () => ({ y: 0 }),
94 routes: constantRoutes, 95 routes: constantRoutes,
95 - base: '/test' 96 + base: settings.routerBase,
96 }) 97 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -39,8 +39,25 @@ module.exports = { ...@@ -39,8 +39,25 @@ module.exports = {
39 */ 39 */
40 errorLog: 'production', 40 errorLog: 'production',
41 41
42 - /** 42 + /**
43 + * logout
44 + */
45 + logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/',
46 +
47 + /**
48 + * 后端接口
49 + */
50 + baseURL: `http://47.103.140.98:7001/iMAC`,
51 + // baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器
52 + downLoadURL: `http://47.103.140.98:7001/iMAC`,
53 +
54 + /**
55 + * 项目存放地址
56 + */
57 + routerBase: '/test',
58 +
59 + /**
43 * 版本号 60 * 版本号
44 */ 61 */
45 - version:'version:1.1.0' 62 + version: 'version:1.2.0'
46 } 63 }
......
1 //import Cookies from 'js-cookie' 1 //import Cookies from 'js-cookie'
2 2
3 -const TokenKey = 'Admin-Token' 3 +const TokenKey = 'iMac-Token'
4 4
5 export function getToken() { 5 export function getToken() {
6 //return Cookies.get(TokenKey) 6 //return Cookies.get(TokenKey)
......
...@@ -3,13 +3,14 @@ import { Message, MessageBox } from 'element-ui' ...@@ -3,13 +3,14 @@ import { Message, MessageBox } from 'element-ui'
3 import store from '@/store' 3 import store from '@/store'
4 import { getToken, setToken } from '@/utils/auth' 4 import { getToken, setToken } from '@/utils/auth'
5 import errorCode from '@/utils/errorCode' 5 import errorCode from '@/utils/errorCode'
6 +import settings from "@/settings"
6 7
7 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' 8 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
8 // 创建axios实例 9 // 创建axios实例
9 const service = axios.create({ 10 const service = axios.create({
10 // axios中请求配置有baseURL选项,表示请求URL公共部分 11 // axios中请求配置有baseURL选项,表示请求URL公共部分
11 //baseURL: process.env.VUE_APP_BASE_API, 12 //baseURL: process.env.VUE_APP_BASE_API,
12 - baseURL: `http://47.103.140.98:7001/iMAC`, //阿里云服务器 13 + baseURL: settings.baseURL, //阿里云服务器
13 // baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', //uat服务器 14 // baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', //uat服务器
14 // baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器 15 // baseURL: 'http://192.168.1.133:7001/iMAC', //测试服务器
15 16
...@@ -53,7 +54,7 @@ service.interceptors.request.use(config => { ...@@ -53,7 +54,7 @@ service.interceptors.request.use(config => {
53 54
54 // 响应拦截器 55 // 响应拦截器
55 service.interceptors.response.use(res => { 56 service.interceptors.response.use(res => {
56 - if(res.headers['token']){ 57 + if (res.headers['token']) {
57 setToken(decodeURI(res.headers['token'])) 58 setToken(decodeURI(res.headers['token']))
58 } 59 }
59 // 未设置状态码则默认成功状态 60 // 未设置状态码则默认成功状态
......
1 import axios from 'axios' 1 import axios from 'axios'
2 import { getToken } from '@/utils/auth' 2 import { getToken } from '@/utils/auth'
3 +import settings from "@/settings"
3 4
4 const mimeMap = { 5 const mimeMap = {
5 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 6 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
6 zip: 'application/zip' 7 zip: 'application/zip'
7 } 8 }
8 // const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 9 // const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器
9 -const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器 10 +const baseUrl = settings.downLoadURL //阿里云服务器
10 // const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器 11 // const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器
11 12
12 export function downLoadZip(str, filename) { 13 export function downLoadZip(str, filename) {
...@@ -26,7 +27,7 @@ export function downLoadZip(str, filename) { ...@@ -26,7 +27,7 @@ export function downLoadZip(str, filename) {
26 * @param {*} res blob响应内容 27 * @param {*} res blob响应内容
27 * @param {String} mimeType MIME类型 28 * @param {String} mimeType MIME类型
28 */ 29 */
29 - export function resolveBlob(res, mimeType) { 30 +export function resolveBlob(res, mimeType) {
30 const aLink = document.createElement('a') 31 const aLink = document.createElement('a')
31 var blob = new Blob([res], { type: mimeType }) 32 var blob = new Blob([res], { type: mimeType })
32 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; 33 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
...@@ -43,9 +44,9 @@ export function downLoadZip(str, filename) { ...@@ -43,9 +44,9 @@ export function downLoadZip(str, filename) {
43 } 44 }
44 45
45 // excel导出请求 46 // excel导出请求
46 -export function downLoadXlsx(str, data,fileName) { 47 +export function downLoadXlsx(str, data, fileName) {
47 var url = baseUrl + str 48 var url = baseUrl + str
48 - return new Promise((resolve,reject)=>{ 49 + return new Promise((resolve, reject) => {
49 axios({ 50 axios({
50 method: 'post', 51 method: 'post',
51 url: url, 52 url: url,
...@@ -56,19 +57,19 @@ export function downLoadXlsx(str, data,fileName) { ...@@ -56,19 +57,19 @@ export function downLoadXlsx(str, data,fileName) {
56 //uat环境token需要做url解码处理 57 //uat环境token需要做url解码处理
57 }).then(res => { 58 }).then(res => {
58 if (res.status === 200) { 59 if (res.status === 200) {
59 - downLoadExcal(res,fileName) 60 + downLoadExcal(res, fileName)
60 } 61 }
61 resolve(res) 62 resolve(res)
62 - }).catch((err)=>{ 63 + }).catch((err) => {
63 reject(err) 64 reject(err)
64 }) 65 })
65 }) 66 })
66 } 67 }
67 68
68 //excel导出下载 69 //excel导出下载
69 -export function downLoadExcal(val,filename) { 70 +export function downLoadExcal(val, filename) {
70 const aLink = document.createElement('a') 71 const aLink = document.createElement('a')
71 - const fileName = filename+".xlsx" 72 + const fileName = filename + ".xlsx"
72 aLink.href = URL.createObjectURL(val.data) 73 aLink.href = URL.createObjectURL(val.data)
73 aLink.setAttribute('download', fileName) // 设置下载文件名称 74 aLink.setAttribute('download', fileName) // 设置下载文件名称
74 document.body.appendChild(aLink) 75 document.body.appendChild(aLink)
...@@ -79,7 +80,7 @@ export function downLoadExcal(val,filename) { ...@@ -79,7 +80,7 @@ export function downLoadExcal(val,filename) {
79 //航班预审导出 80 //航班预审导出
80 export function cargoXlsxPre(str, data) { 81 export function cargoXlsxPre(str, data) {
81 var url = baseUrl + str 82 var url = baseUrl + str
82 - return new Promise((resolve,reject)=>{ 83 + return new Promise((resolve, reject) => {
83 axios({ 84 axios({
84 method: 'post', 85 method: 'post',
85 url: url, 86 url: url,
...@@ -91,7 +92,7 @@ export function cargoXlsxPre(str, data) { ...@@ -91,7 +92,7 @@ export function cargoXlsxPre(str, data) {
91 cargoTableXlsxPre(res) 92 cargoTableXlsxPre(res)
92 } 93 }
93 resolve() 94 resolve()
94 - }).catch((err)=>{ 95 + }).catch((err) => {
95 reject(err) 96 reject(err)
96 }) 97 })
97 }) 98 })
...@@ -99,11 +100,11 @@ export function cargoXlsxPre(str, data) { ...@@ -99,11 +100,11 @@ export function cargoXlsxPre(str, data) {
99 100
100 //航班预审导出 101 //航班预审导出
101 export function cargoTableXlsxPre(val) { 102 export function cargoTableXlsxPre(val) {
102 - const aLink = document.createElement('a') 103 + const aLink = document.createElement('a')
103 - const fileName = "航班预审表.xlsx" 104 + const fileName = "航班预审表.xlsx"
104 - aLink.href = URL.createObjectURL(val.data) 105 + aLink.href = URL.createObjectURL(val.data)
105 - aLink.setAttribute('download', fileName) // 设置下载文件名称 106 + aLink.setAttribute('download', fileName) // 设置下载文件名称
106 - document.body.appendChild(aLink) 107 + document.body.appendChild(aLink)
107 - aLink.click() 108 + aLink.click()
108 - document.body.removeChild(aLink); 109 + document.body.removeChild(aLink);
109 } 110 }
......
...@@ -155,9 +155,9 @@ ...@@ -155,9 +155,9 @@
155 </div> 155 </div>
156 </el-form> 156 </el-form>
157 <Tables ref="newTables" ductName="cargo" :data="tableData" :headerData="tableHeader" :infoData="tableHeader" 157 <Tables ref="newTables" ductName="cargo" :data="tableData" :headerData="tableHeader" :infoData="tableHeader"
158 - :selection="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="limitSize" :limitStart="limitStart" 158 + :selection="true" :order="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="limitSize"
159 - :page="page" :shiftKey="shiftKey" :infoShow="false" :pageSizes="[100]" :height="tableHeight" 159 + :limitStart="limitStart" :page="page" :shiftKey="shiftKey" :infoShow="false" :pageSizes="[100]"
160 - @sizeChange="sizeChange" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" 160 + :height="tableHeight" @sizeChange="sizeChange" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
161 @currentChange="currentChange" @sortChange="sortChange"></Tables> 161 @currentChange="currentChange" @sortChange="sortChange"></Tables>
162 <el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" 162 <el-dialog title="舱位释放结果" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
163 :show-close="false" :append-to-body="true"> 163 :show-close="false" :append-to-body="true">
...@@ -165,8 +165,7 @@ ...@@ -165,8 +165,7 @@
165 <el-table-column type="index" label="序号" align="center"> 165 <el-table-column type="index" label="序号" align="center">
166 </el-table-column> 166 </el-table-column>
167 <el-table-column v-for="(item, index) in releaseHeader" header-align="center" :align="item.align" 167 <el-table-column v-for="(item, index) in releaseHeader" header-align="center" :align="item.align"
168 - :prop="item.value" :label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" 168 + :prop="item.value" :label="item.name" :key="index" :show-overflow-tooltip="true">
169 - class-name="dialogColumn">
170 </el-table-column> 169 </el-table-column>
171 </el-table> 170 </el-table>
172 <div slot="footer"> 171 <div slot="footer">
...@@ -333,6 +332,15 @@ export default { ...@@ -333,6 +332,15 @@ export default {
333 disabled: true 332 disabled: true
334 }, 333 },
335 { 334 {
335 + name: "ACCSpool",
336 + value: "accsPool",
337 + width: "120",
338 + align: "center",
339 + sorTable: true,
340 + fixed: false,
341 + disabled: true
342 + },
343 + {
336 name: "HandlingCode", 344 name: "HandlingCode",
337 value: "handingCode", 345 value: "handingCode",
338 width: "150", 346 width: "150",
...@@ -414,15 +422,6 @@ export default { ...@@ -414,15 +422,6 @@ export default {
414 disabled: true 422 disabled: true
415 }, 423 },
416 { 424 {
417 - name: "ACCSpool",
418 - value: "accsPool",
419 - width: "120",
420 - align: "center",
421 - sorTable: true,
422 - fixed: false,
423 - disabled: true
424 - },
425 - {
426 name: "货物状态", 425 name: "货物状态",
427 value: "statusName", 426 value: "statusName",
428 width: "100", 427 width: "100",
...@@ -807,19 +806,19 @@ export default { ...@@ -807,19 +806,19 @@ export default {
807 } else if (res.code === 201) { 806 } else if (res.code === 201) {
808 this.selectTable.map(item => { 807 this.selectTable.map(item => {
809 res.data['success'].map(val => { 808 res.data['success'].map(val => {
810 - val === item.id ? item.msg = item.msg + '操作成功,正在释放中。\n' : '' 809 + val === item.id ? item.msg = item.msg + '操作成功,正在释放中。' : ''
811 }) 810 })
812 res.data['accsPoolFlase'].map(val => { 811 res.data['accsPoolFlase'].map(val => {
813 - val === item.id ? item.msg = item.msg + 'Manifest状态不能释放。\n' : '' 812 + val === item.id ? item.msg = item.msg + 'Manifest状态不能释放。' : ''
814 }) 813 })
815 res.data['existReleasing'].map(val => { 814 res.data['existReleasing'].map(val => {
816 - val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。\n' : '' 815 + val === item.id ? item.msg = item.msg + '正在释放中,请勿重复释放。' : ''
817 }) 816 })
818 res.data['noFlight'].map(val => { 817 res.data['noFlight'].map(val => {
819 - val === item.id ? item.msg = item.msg + '已释放仓位。\n' : '' 818 + val === item.id ? item.msg = item.msg + '已释放仓位。' : ''
820 }) 819 })
821 res.data['pushFalse'].map(val => { 820 res.data['pushFalse'].map(val => {
822 - val === item.id ? item.msg = item.msg + '该货物不为"不推送"状态,不能释放。\n' : '' 821 + val === item.id ? item.msg = item.msg + '该货物配舱结果已回推ACCS,不能释放。' : ''
823 }) 822 })
824 }) 823 })
825 this.dialogVisible = true 824 this.dialogVisible = true
......