jinhui.wang

同步uat

Showing 69 changed files with 3093 additions and 415 deletions
...@@ -60,7 +60,7 @@ export function downloadExcel(data) { ...@@ -60,7 +60,7 @@ export function downloadExcel(data) {
60 }) 60 })
61 } 61 }
62 62
63 -//释放 63 +//释放
64 export function releaseCargo(data) { 64 export function releaseCargo(data) {
65 return request({ 65 return request({
66 url: '/cargo/releaseCargo', 66 url: '/cargo/releaseCargo',
...@@ -106,3 +106,29 @@ export function getFlightsRoutes(data) { ...@@ -106,3 +106,29 @@ export function getFlightsRoutes(data) {
106 data: data 106 data: data
107 }) 107 })
108 } 108 }
109 +
110 +//航班迁转
111 +/**
112 + * @param ids * 货物id list
113 + * @param flightId * 航班id
114 + * @param route * 航线
115 + */
116 +export function batchMoveCargoToOtherFlight(data) {
117 + return request({
118 + url: '/cargo/batchMoveCargoToOtherFlight',
119 + method: 'post',
120 + data: data
121 + })
122 +}
123 +
124 +//生成历史数据文件
125 +/**
126 + * @param 同货物查询
127 + */
128 +export function historyCargo(data) {
129 + return request({
130 + url: '/cargo/historyCargo',
131 + method: 'post',
132 + data: data
133 + })
134 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -72,3 +72,29 @@ export function updateAutoPushBatch(data) { ...@@ -72,3 +72,29 @@ export function updateAutoPushBatch(data) {
72 data: data 72 data: data
73 }) 73 })
74 } 74 }
75 +
76 +//白名单自动配舱开关
77 +/**
78 + * @param updateIds idList *
79 + * @param status 状态 * 1开 0关
80 + */
81 +export function updateWhiteListSwitchBatch(data) {
82 + return request({
83 + url: '/FlightPreserveController/updateWhiteListSwitchBatch',
84 + method: 'post',
85 + data: data
86 + })
87 +}
88 +
89 +//黑名单自动配舱开关
90 +/**
91 + * @param updateIds idList *
92 + * @param status 状态 * 1开 0关
93 + */
94 +export function updateBlackListSwitchBatch(data) {
95 + return request({
96 + url: '/FlightPreserveController/updateBlackListSwitchBatch',
97 + method: 'post',
98 + data: data
99 + })
100 +}
......
...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) { ...@@ -41,6 +41,7 @@ export function batchDeleteGoods(data) {
41 /** 41 /**
42 * @param page * 页数 42 * @param page * 页数
43 * @param size * 页长 43 * @param size * 页长
44 + * @param goodsType 查询状态 1白名单 2黑名单 默认查询白名单
44 * @param goodsStation 货站名 45 * @param goodsStation 货站名
45 */ 46 */
46 export function searchGoods(data) { 47 export function searchGoods(data) {
...@@ -54,9 +55,60 @@ export function searchGoods(data) { ...@@ -54,9 +55,60 @@ export function searchGoods(data) {
54 //查询货站 55 //查询货站
55 /** 56 /**
56 */ 57 */
57 -export function findStationName() { 58 +export function findStationName(data) {
58 return request({ 59 return request({
59 url: '/goods/findStationName', 60 url: '/goods/findStationName',
60 method: 'post', 61 method: 'post',
62 + data: data
63 + })
64 +}
65 +
66 +//白名单批量导入
67 +export function uploadGoodsExcel(file, goodsStation) {
68 + let formData = new FormData();
69 + formData.append("file", file);
70 + formData.append("goodsStation", goodsStation);
71 + return request({
72 + url: '/goods/uploadGoodsExcel',
73 + method: 'post',
74 + data: formData
75 + })
76 +}
77 +
78 +//查询上传日志
79 +/**
80 + * @param page 页长 *
81 + * @param size 页数 *
82 + */
83 +export function userImportLog(data) {
84 + return request({
85 + url: '/goods/userImportLog',
86 + method: 'post',
87 + data: data
88 + })
89 +}
90 +
91 +//黑名单上传excel
92 +export function uploadGoodsBlackExce(file, goodsStation) {
93 + let formData = new FormData();
94 + formData.append("file", file);
95 + formData.append("goodsStation", goodsStation);
96 + return request({
97 + url: '/goods/uploadGoodsBlackExcel',
98 + method: 'post',
99 + data: formData
100 + })
101 +}
102 +
103 +//批量添加黑名单
104 +/**
105 + * @param goodsStation * 货站名
106 + * @param goodsList * 货品名list
107 + */
108 +export function batchAddBlackGoods(data) {
109 + return request({
110 + url: '/goods/batchAddBlackGoods',
111 + method: 'post',
112 + data: data
61 }) 113 })
62 } 114 }
...\ No newline at end of file ...\ No newline at end of file
......
1 +import request from '@/utils/request'
2 +import settings from "@/settings"
3 +
4 +//模板下载
5 +export function downLoadTemplate(template) {
6 + return request({
7 + url: '/flightInfoImport/downLoadTemplate?template=' + template,
8 + method: 'get',
9 + responseType: 'blob',
10 + })
11 +}
12 +
13 +//航班目的地批量导入
14 +/**
15 + * @param file * 文件
16 + * @param beginDate * 时间
17 + */
18 +export function importFlightDestination(file, date) {
19 + let formData = new FormData();
20 + formData.append("file", file);
21 + formData.append("beginDate", date);
22 + return request({
23 + method: 'post',
24 + url: settings.baseURL + '/flightDestination/importFlightDestination',
25 + data: formData
26 + })
27 +}
28 +
29 +//URSA目的地批量导入
30 +/**
31 + * @param file * 文件
32 + * @param beginDate * 时间
33 + */
34 +export function importUrsaDestination(file, date) {
35 + let formData = new FormData();
36 + formData.append("file", file);
37 + formData.append("beginDate", date);
38 + return request({
39 + method: 'post',
40 + url: settings.baseURL + '/ursaDestination/importUrsaDestination',
41 + data: formData
42 + })
43 +}
44 +
45 +//航班目的地查询
46 +/**
47 + * @param page * 页数
48 + * @param size * 长度
49 + * @param area 地区
50 + * @param fltNo 航班号
51 + */
52 +export function searchFlightDestination(data) {
53 + return request({
54 + url: '/flightDestination/searchFlightDestination',
55 + method: 'post',
56 + data: data
57 + })
58 +}
59 +
60 +//URSA目的地查询
61 +/**
62 + * @param page * 页数
63 + * @param size * 长度
64 + * @param area 地区
65 + * @param ursa ursa list
66 + */
67 +export function searchUrsaDestination(data) {
68 + return request({
69 + url: '/ursaDestination/searchUrsaDestination',
70 + method: 'post',
71 + data: data
72 + })
73 +}
74 +
75 +//preMde查询
76 +/**
77 + * @param flightNo 航班号
78 + * @param fltDateStart 航班开始时间
79 + * @param fltDateEnd 航班结束时间
80 + * @param flightRoute 航线
81 + * @param waybillNo 运单号
82 + * @param ursa ursa
83 + * @param typeName 申报类别
84 + * @param siteName 站点
85 + * @param regionArray 区域 list
86 + * @param areaArray 地区 list
87 + * @param serviceTypeArray 服务代码 list
88 + * @param page * 页数
89 + * @param size * 长度
90 + */
91 +export function findDmPreMdeData(data) {
92 + return request({
93 + url: '/dmPreMde/findDmPreMdeData',
94 + method: 'post',
95 + data: data
96 + })
97 +}
98 +
99 +//preMde页面查询条件
100 +/**
101 + */
102 +export function findDmPreMdeCondition(data) {
103 + return request({
104 + url: '/dmPreMde/findDmPreMdeCondition',
105 + method: 'post',
106 + data: data
107 + })
108 +}
109 +
110 +//报表查询
111 +/**
112 + * @param ursas ursaslist
113 + * @param serviceTypeArray serviceTypelist
114 + * @param regionArray 区域
115 + * @param areaArray 地区
116 + * @param pickUpDate 取件日期
117 + * @param dimensionName 维度名
118 + */
119 +export function findPreMdeReport(data) {
120 + return request({
121 + url: '/preMdeReport/findPreMdeReport',
122 + method: 'post',
123 + data: data
124 + })
125 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -11,7 +11,8 @@ export function findSourceFlightRulesApi(data) { ...@@ -11,7 +11,8 @@ export function findSourceFlightRulesApi(data) {
11 // 目标航班查询 11 // 目标航班查询
12 export function findSourceFlightAndFlightDateApi(data) { 12 export function findSourceFlightAndFlightDateApi(data) {
13 return request({ 13 return request({
14 - url: '/sourceFlight/findSourceFlightAndFlightDate', 14 + // url: '/sourceFlight/findSourceFlightAndFlightDate',
15 + url: '/sourceFlight/findActualAllocateFlightList',
15 method: 'post', 16 method: 'post',
16 data: data 17 data: data
17 }) 18 })
...@@ -19,7 +20,7 @@ export function findSourceFlightAndFlightDateApi(data) { ...@@ -19,7 +20,7 @@ export function findSourceFlightAndFlightDateApi(data) {
19 20
20 // 原航班顺位规则保存 21 // 原航班顺位规则保存
21 export function sourceFlightRulesSaveApi(data) { 22 export function sourceFlightRulesSaveApi(data) {
22 - data.dayOfWeek = data.dayOfWeek.join(';'); 23 + data.dayOfWeek = data.dayOfWeek.join(';');
23 return request({ 24 return request({
24 url: '/sourceFlight/sourceFlightRulesSave', 25 url: '/sourceFlight/sourceFlightRulesSave',
25 method: 'post', 26 method: 'post',
......
1 +import request from '@/utils/request'
2 +
3 +//特殊规则查询
4 +/**
5 + * @param page * 页数
6 + * @param size * 页长
7 + * @param shipperAccount shipperAccount集合
8 + */
9 +export function queryShipperAccountRule(data) {
10 + return request({
11 + url: 'shipperAccount/queryShipperAccountRule',
12 + method: 'post',
13 + data: data
14 + })
15 +}
16 +
17 +//特殊规则新增
18 +/**
19 + * @param id ID (修改必填)
20 + * @param shipperAccount * shipperAccount
21 + * @param flightNo * 航班号
22 + * @param flightRoute * 航线
23 + * @param flightDate * 航班日期
24 + * @param groupAllWeight 预配重量
25 + * @param includeUrsa * ursa包含
26 + * @param notIncludeUrsa ursa不包含
27 + * @param classificationList 申报类型
28 + * @param serviceCodeList servceCode
29 + */
30 +export function saveOrUpdate(data) {
31 + return request({
32 + url: 'shipperAccount/saveOrUpdate',
33 + method: 'post',
34 + data: data
35 + })
36 +}
37 +
38 +//特殊规则详情
39 +/**
40 + * @param id * ID
41 + */
42 +export function queryShipperAccountRuleById(data) {
43 + return request({
44 + url: 'shipperAccount/queryShipperAccountRuleById',
45 + method: 'post',
46 + data: data
47 + })
48 +}
49 +
50 +//特殊规则删除
51 +/**
52 + * @param accsFlightNo * 航班号
53 + * @param shipperAccount * shipperAccount
54 + * @param status * 状态 0 停用 1启用 2 已删除
55 + */
56 +export function changeStatusById(data) {
57 + return request({
58 + url: '/shipperAccount/changeStatusById',
59 + method: 'post',
60 + data: data
61 + })
62 +}
63 +
64 +//特殊规则获取释放仓位重量
65 +/**
66 + * @param id ID *
67 + */
68 +export function getReleaseWeight(data) {
69 + return request({
70 + url: '/shipperAccount/getReleaseWeight',
71 + method: 'post',
72 + data: data
73 + })
74 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -38,4 +38,58 @@ export function findCargoDataChangeLog(data) { ...@@ -38,4 +38,58 @@ export function findCargoDataChangeLog(data) {
38 url: '/cargo/findCargoDataChangeLog?accsId=' + data, 38 url: '/cargo/findCargoDataChangeLog?accsId=' + data,
39 method: 'post', 39 method: 'post',
40 }) 40 })
41 +}
42 +
43 +// 功能模块查询
44 +/**
45 + *
46 + */
47 +export function findModuleCondition() {
48 + return request({
49 + url: '/systemOperationLog/findModuleCondition',
50 + method: 'post',
51 + })
52 +}
53 +
54 +//操作日志查询
55 +/**
56 + * @param module 功能模块
57 + * @param createTimeStart 操作时间开始
58 + * @param createTimeEnd 操作时间结束
59 + * @param page 页数
60 + * @param size 页长
61 + */
62 +export function getSystemOperationLogData(data) {
63 + return request({
64 + url: '/systemOperationLog/getSystemOperationLogData',
65 + method: 'post',
66 + data: data
67 + })
68 +}
69 +
70 +//归档数据查询
71 +/**
72 + * @param createTimeStart 操作时间开始
73 + * @param createTimeEnd 操作时间结束
74 + * @param page 页数
75 + * @param size 页长
76 + */
77 +export function findArchiveCargoLog(data) {
78 + return request({
79 + url: '/archiveCargoLog/findArchiveCargoLog',
80 + method: 'post',
81 + data: data
82 + })
83 +}
84 +
85 +//查询归档文件是否可下载
86 +/**
87 + * @param object 查询结果集行数据
88 + */
89 +export function isExistZip(data) {
90 + return request({
91 + url: '/archiveCargoLog/isExistZip',
92 + method: 'post',
93 + data: data
94 + })
41 } 95 }
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
...@@ -19,7 +19,8 @@ let ductLabels = { ...@@ -19,7 +19,8 @@ let ductLabels = {
19 "7": "预审导出", 19 "7": "预审导出",
20 "8": "预审导入", 20 "8": "预审导入",
21 "9": "航班不推送修改为待推送", 21 "9": "航班不推送修改为待推送",
22 - "10": "回推ACCS" 22 + "10": "回推ACCS",
23 + "11": "航班迁转"
23 } 24 }
24 }, 25 },
25 "menu": {//菜单设置 26 "menu": {//菜单设置
...@@ -62,6 +63,16 @@ let ductLabels = { ...@@ -62,6 +63,16 @@ let ductLabels = {
62 "1": "是", 63 "1": "是",
63 "2": "否", 64 "2": "否",
64 }, 65 },
66 + "whiteListSwitch": {
67 + "1": "开启",
68 + "0": "关闭",
69 + null: '关闭'
70 + },
71 + "blackListSwitch": {
72 + "1": "开启",
73 + "0": "关闭",
74 + null: '开启'
75 + }
65 }, 76 },
66 "flightRand": {//航班顺位设置 77 "flightRand": {//航班顺位设置
67 "status": { 78 "status": {
...@@ -123,7 +134,8 @@ let ductLabels = { ...@@ -123,7 +134,8 @@ let ductLabels = {
123 "1": "pre-MD cutoff", 134 "1": "pre-MD cutoff",
124 "2": "航班迁转手动释放", 135 "2": "航班迁转手动释放",
125 "3": "预审不通过定时任务", 136 "3": "预审不通过定时任务",
126 - "4": "自动配舱" 137 + "4": "自动配舱",
138 + "5": "航班迁转"
127 }, 139 },
128 "weightMark": { 140 "weightMark": {
129 "1": "增加", 141 "1": "增加",
...@@ -135,6 +147,27 @@ let ductLabels = { ...@@ -135,6 +147,27 @@ let ductLabels = {
135 "0": "关闭", 147 "0": "关闭",
136 "1": "开启" 148 "1": "开启"
137 } 149 }
150 + },
151 + "preMdeSelect": {
152 + "manualRde": {
153 +
154 + },
155 + },
156 + 'goodsLogStation': {
157 + "status": {
158 + "0": "未处理",
159 + "1": "处理中",
160 + "2": "处理成功",
161 + "3": "处理失败"
162 + }
163 + },
164 + "archiveDataTables": {
165 + "status": {
166 + "0": "未处理",
167 + "1": "处理成功",
168 + "2": "处理失败",
169 + "3": "处理中"
170 + }
138 } 171 }
139 } 172 }
140 173
......
This diff is collapsed. Click to expand it.
...@@ -292,4 +292,19 @@ body { ...@@ -292,4 +292,19 @@ body {
292 292
293 .el-select-dropdown { 293 .el-select-dropdown {
294 max-width: 300px; 294 max-width: 300px;
295 +}
296 +
297 +.backgroundCollapse {
298 + .el-collapse-item__header {
299 + background-color: #d9ecff !important;
300 + border-bottom: 1px solid #ccc;
301 + }
302 +}
303 +
304 +.numberInput {
305 + width: 100% !important;
306 +}
307 +
308 +.el-select-dropdown__wrap {
309 + max-height: 350px !important;
295 } 310 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -81,8 +81,7 @@ export default { ...@@ -81,8 +81,7 @@ export default {
81 <style lang="scss" scoped> 81 <style lang="scss" scoped>
82 .container { 82 .container {
83 max-width: 350px; 83 max-width: 350px;
84 - min-height: 32px; 84 + height: 150px;
85 - max-height: 150px;
86 overflow-y: scroll; 85 overflow-y: scroll;
87 padding: 0; 86 padding: 0;
88 border: 1px solid #ccc; 87 border: 1px solid #ccc;
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-button v-if="buttonShow" class="mt5" size="mini" icon="el-icon-edit-outline" circle @click="visibleOpen"> 3 + <el-button v-if="buttonShow" class="mt5" size="mini" style="color:#1890ff" icon="el-icon-edit-outline" circle
4 + @click="visibleOpen">
4 </el-button> 5 </el-button>
5 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false" 6 <el-dialog title="表格显示设置" :visible.sync="open" width="40%" :close-on-click-modal="false" :show-close="false"
6 - append-to-body center> 7 + append-to-body center @close="close">
7 <div style="text-align: center"> 8 <div style="text-align: center">
8 <el-transfer style="text-align: left; display: inline-block" :data="transferData" 9 <el-transfer style="text-align: left; display: inline-block" :data="transferData"
9 :right-default-checked="rightDefaultChecked" v-model="transferValue" :titles="transferTitle" 10 :right-default-checked="rightDefaultChecked" v-model="transferValue" :titles="transferTitle"
......
1 <template> 1 <template>
2 <div class="component-upload-image"> 2 <div class="component-upload-image">
3 - <el-upload 3 + <el-upload :action="uploadImgUrl" list-type="picture-card" :on-success="handleUploadSuccess"
4 - :action="uploadImgUrl" 4 + :before-upload="handleBeforeUpload" :on-error="handleUploadError" name="file" :show-file-list="false"
5 - list-type="picture-card" 5 + :headers="headers" style="display: inline-block; vertical-align: top">
6 - :on-success="handleUploadSuccess"
7 - :before-upload="handleBeforeUpload"
8 - :on-error="handleUploadError"
9 - name="file"
10 - :show-file-list="false"
11 - :headers="headers"
12 - style="display: inline-block; vertical-align: top"
13 - >
14 <el-image v-if="!value" :src="value"> 6 <el-image v-if="!value" :src="value">
15 <div slot="error" class="image-slot"> 7 <div slot="error" class="image-slot">
16 <i class="el-icon-plus" /> 8 <i class="el-icon-plus" />
17 </div> 9 </div>
18 </el-image> 10 </el-image>
19 <div v-else class="image"> 11 <div v-else class="image">
20 - <el-image :src="value" :style="`width:150px;height:150px;`" fit="fill"/> 12 + <el-image :src="value" :style="`width:150px;height:150px;`" fit="fill" />
21 <div class="mask"> 13 <div class="mask">
22 <div class="actions"> 14 <div class="actions">
23 <span title="预览" @click.stop="dialogVisible = true"> 15 <span title="预览" @click.stop="dialogVisible = true">
...@@ -30,7 +22,7 @@ ...@@ -30,7 +22,7 @@
30 </div> 22 </div>
31 </div> 23 </div>
32 </el-upload> 24 </el-upload>
33 - <el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body> 25 + <el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body :close-on-press-escape="false">
34 <img :src="value" style="display: block; max-width: 100%; margin: 0 auto;"> 26 <img :src="value" style="display: block; max-width: 100%; margin: 0 auto;">
35 </el-dialog> 27 </el-dialog>
36 </div> 28 </div>
...@@ -45,7 +37,7 @@ export default { ...@@ -45,7 +37,7 @@ export default {
45 dialogVisible: false, 37 dialogVisible: false,
46 uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 38 uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
47 headers: { 39 headers: {
48 - Authorization: getToken(), 40 + Authorization: getToken(),
49 }, 41 },
50 }; 42 };
51 }, 43 },
...@@ -85,6 +77,7 @@ export default { ...@@ -85,6 +77,7 @@ export default {
85 <style scoped lang="scss"> 77 <style scoped lang="scss">
86 .image { 78 .image {
87 position: relative; 79 position: relative;
80 +
88 .mask { 81 .mask {
89 opacity: 0; 82 opacity: 0;
90 position: absolute; 83 position: absolute;
...@@ -93,6 +86,7 @@ export default { ...@@ -93,6 +86,7 @@ export default {
93 background-color: rgba(0, 0, 0, 0.5); 86 background-color: rgba(0, 0, 0, 0.5);
94 transition: all 0.3s; 87 transition: all 0.3s;
95 } 88 }
89 +
96 &:hover .mask { 90 &:hover .mask {
97 opacity: 1; 91 opacity: 1;
98 } 92 }
......
1 <template> 1 <template>
2 <div class="top-right-btn"> 2 <div class="top-right-btn">
3 <el-row> 3 <el-row>
4 - <el-tooltip 4 + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
5 - class="item" 5 + <el-button :size="size" circle icon="el-icon-search" @click="toggleSearch()" />
6 - effect="dark"
7 - :content="showSearch ? '隐藏搜索' : '显示搜索'"
8 - placement="top"
9 - >
10 - <el-button
11 - :size="size"
12 - circle
13 - icon="el-icon-search"
14 - @click="toggleSearch()"
15 - />
16 </el-tooltip> 6 </el-tooltip>
17 <el-tooltip class="item" effect="dark" content="刷新" placement="top"> 7 <el-tooltip class="item" effect="dark" content="刷新" placement="top">
18 - <el-button 8 + <el-button :size="size" circle icon="el-icon-refresh" @click="refresh()" />
19 - :size="size"
20 - circle
21 - icon="el-icon-refresh"
22 - @click="refresh()"
23 - />
24 </el-tooltip> 9 </el-tooltip>
25 - <el-tooltip 10 + <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
26 - class="item" 11 + <el-button :size="size" circle icon="el-icon-menu" @click="showColumn()" />
27 - effect="dark"
28 - content="显隐列"
29 - placement="top"
30 - v-if="columns"
31 - >
32 - <el-button
33 - :size="size"
34 - circle
35 - icon="el-icon-menu"
36 - @click="showColumn()"
37 - />
38 </el-tooltip> 12 </el-tooltip>
39 </el-row> 13 </el-row>
40 - <el-dialog :title="title" :visible.sync="open" append-to-body> 14 + <el-dialog :title="title" :visible.sync="open" append-to-body :close-on-press-escape="false">
41 - <el-transfer 15 + <el-transfer :titles="['显示', '隐藏']" v-model="value" :data="columns" @change="dataChange"></el-transfer>
42 - :titles="['显示', '隐藏']"
43 - v-model="value"
44 - :data="columns"
45 - @change="dataChange"
46 - ></el-transfer>
47 </el-dialog> 16 </el-dialog>
48 </div> 17 </div>
49 </template> 18 </template>
...@@ -111,6 +80,7 @@ export default { ...@@ -111,6 +80,7 @@ export default {
111 display: block; 80 display: block;
112 margin-left: 0px; 81 margin-left: 0px;
113 } 82 }
83 +
114 ::v-deep .el-transfer__button:first-child { 84 ::v-deep .el-transfer__button:first-child {
115 margin-bottom: 10px; 85 margin-bottom: 10px;
116 } 86 }
......
1 +<template>
2 + <div style="padding:10px;" v-loading="loading">
3 + <canvas :class="className" :style="{
4 + height: height, width: width
5 + }"></canvas>
6 + </div>
7 +</template>
8 +
9 +<script>
10 +import Chart from '../../assets/languages/chart.js'
11 +
12 +export default {
13 + name: '',
14 + props: {
15 + className: {
16 + type: String,
17 + default: 'chart'
18 + },
19 + width: {
20 + type: String,
21 + default: '100%'
22 + },
23 + height: {
24 + type: String,
25 + default: "350px"
26 + },
27 + chartData: {
28 + type: Object,
29 + required: true
30 + },
31 + loading: {
32 + type: Boolean,
33 + default: false
34 + }
35 + },
36 + data() {
37 + return {
38 + chart: null,
39 + padding: "10px"
40 + }
41 + },
42 + mounted() {
43 + this.$nextTick(() => {
44 + this.initChart()
45 + })
46 + },
47 + watch: {
48 + chartData: {
49 + deep: true,
50 + handler(val) {
51 + this.chartUpdata()
52 + }
53 + }
54 + },
55 + methods: {
56 + initChart() {
57 + let ctx = document.getElementsByClassName(this.className)
58 + this.chart = new Chart(ctx, this.setOptions(this.chartData))
59 + },
60 + setOptions({ names, data1, data2, data3 }) {
61 + // let setOption = ({
62 + // tooltip: {
63 + // trigger: 'axis',
64 + // axisPointer: { // 坐标轴指示器,坐标轴触发有效
65 + // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
66 + // }
67 + // },
68 + // legend: {
69 + // show: true
70 + // },
71 + // dataZoom: [
72 + // {
73 + // type: 'inside',
74 + // xAxisIndex: [0],
75 + // },
76 + // {
77 + // type: 'slider',
78 + // show: true,
79 + // start: 0,
80 + // end: 85,
81 + // handleSize: 8
82 + // },
83 + // ],
84 + // grid: {
85 + // top: '15%',
86 + // left: '2%',
87 + // right: '2%',
88 + // containLabel: true
89 + // },
90 + // xAxis: [{
91 + // type: 'category',
92 + // data: names,
93 + // axisTick: {
94 + // alignWithLabel: true
95 + // }
96 + // }],
97 + // yAxis: [{
98 + // type: 'value',
99 + // axisTick: {
100 + // show: false
101 + // }
102 + // }],
103 + // series: [{
104 + // name: '件数',
105 + // type: 'bar',
106 + // data: data1,
107 + // barWidth: '10%',
108 + // barGap: '0%',
109 + // label: {
110 + // show: true,
111 + // position: 'top',
112 + // fontSize: 14
113 + // },
114 + // animationDuration: 1000
115 + // },
116 + // {
117 + // name: '票数',
118 + // type: 'bar',
119 + // data: data2,
120 + // barWidth: '10%',
121 + // barGap: '0%',
122 + // label: {
123 + // show: true,
124 + // position: 'top',
125 + // fontSize: 14
126 + // },
127 + // animationDuration: 1000
128 + // },
129 + // {
130 + // name: '重量',
131 + // type: 'bar',
132 + // data: data3,
133 + // barWidth: '10%',
134 + // barGap: '0%',
135 + // label: {
136 + // show: true,
137 + // position: 'top',
138 + // fontSize: 14
139 + // },
140 + // animationDuration: 1000
141 + // }]
142 + // })
143 + let setOption = {
144 + type: 'bar',
145 + data: {
146 + labels: names,
147 + datasets: [{
148 + label: '件数',
149 + data: data1,
150 + backgroundColor: 'rgba(255, 99, 132, 1)',
151 + stack: 'group1'
152 + },
153 + {
154 + label: '票数',
155 + data: data2,
156 + backgroundColor: 'rgba(153, 102, 255, 1)',
157 + stack: 'group2'
158 + },
159 + {
160 + label: '重量',
161 + data: data3,
162 + backgroundColor: 'rgba(255, 205, 86, 1)',
163 + stack: 'group3'
164 + }]
165 + },
166 + options: {
167 + events: [''],
168 + hover: {
169 + intersect: false,
170 + animationDuration: 0
171 + },
172 + animation: {
173 + duration: 500,
174 + onComplete: (val) => {
175 + let ctx = val.chart.ctx
176 + ctx.textAlign = 'center';
177 + ctx.textBaseline = 'bottom';
178 + ctx.font = '14px \"Helvetica Neue\", Helvetica, Arial, sans-serif'
179 + val.chart.data.datasets.forEach((dataset, i) => {
180 + if (val.chart.isDatasetVisible(i)) {
181 + var meta = val.chart.getDatasetMeta(i);
182 + meta.data.forEach(function (bar, index) {
183 + var data = dataset.data[index];
184 + ctx.fillText(data, bar.x, bar.y - 5);
185 + });
186 + }
187 + });
188 + }
189 + },
190 + legend: {
191 + display: true
192 + },
193 + tooltips: {
194 + enabled: false,
195 + },
196 + scales: {
197 + yAxes: [{
198 + ticks: {
199 + beginAtZero: true
200 + }
201 + }]
202 + }
203 + }
204 + }
205 + return setOption
206 + },
207 + chartUpdata() {
208 + this.chart.data = {
209 + labels: this.chartData.names,
210 + datasets: [{
211 + label: '件数',
212 + data: this.chartData.data1,
213 + backgroundColor: 'rgba(255, 99, 132, 1)',
214 + stack: 'group1'
215 + },
216 + {
217 + label: '票数',
218 + data: this.chartData.data2,
219 + backgroundColor: 'rgba(153, 102, 255, 1)',
220 + stack: 'group2'
221 + },
222 + {
223 + label: '重量',
224 + data: this.chartData.data3,
225 + backgroundColor: 'rgba(255, 205, 86, 1)',
226 + stack: 'group3'
227 + }]
228 + }
229 + this.chart.update()
230 + }
231 + },
232 + beforeDestroy() {
233 + if (!this.chart) {
234 + return
235 + }
236 + this.chart.destroy()
237 + this.chart = null
238 + }
239 +}
240 +</script>
241 +
242 +<style>
243 +
244 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,44 +3,43 @@ ...@@ -3,44 +3,43 @@
3 * Copyright (c) 2019 FedEx 3 * Copyright (c) 2019 FedEx
4 */ 4 */
5 5
6 - import store from '@/store' 6 +import store from '@/store'
7 7
8 - export default { 8 +export default {
9 - inserted(el, binding, vnode) { 9 + inserted(el, binding, vnode) {
10 - const { value } = binding 10 + const { value } = binding
11 - const all_permission = "*:*:*"; 11 + const all_permission = "*:*:*";
12 - const permissions = store.getters && store.getters.permissions 12 + const permissions = store.getters && store.getters.permissions
13 - 13 +
14 - if (value && value instanceof Array && value.length > 0) { 14 + if (value && value instanceof Array && value.length > 0) {
15 - const permissionFlag = value 15 + const permissionFlag = value
16 - 16 +
17 - const hasPermissions = permissions.some(permission => { 17 + const hasPermissions = permissions.some(permission => {
18 - return all_permission === permission || permissionFlag.includes(permission) 18 + return all_permission === permission || permissionFlag.includes(permission)
19 - }) 19 + })
20 - 20 +
21 - if (!hasPermissions) { 21 + if (!hasPermissions) {
22 - el.parentNode && el.parentNode.removeChild(el) 22 + el.parentNode && el.parentNode.removeChild(el)
23 - }
24 - } else {
25 - throw new Error(`请设置操作权限标签值`)
26 } 23 }
27 - }, 24 + } else {
28 - 25 + throw new Error(`请设置操作权限标签值`)
29 - //路由权限处理
30 - routerPer(router){
31 - const permissions = store.getters && store.getters.permissions
32 - let newRouter = [];
33 - router.forEach(item => {
34 - permissions.forEach(per=>{
35 - if(item.meta.permissions == per){
36 - newRouter.push(item)
37 - }
38 - })
39 - if(item.children && item.children.length){
40 - item.children = this.routerPer(item.children)
41 - }
42 - });
43 - return newRouter
44 } 26 }
27 + },
28 +
29 + //路由权限处理
30 + routerPer(router){
31 + const permissions = store.getters && store.getters.permissions
32 + let newRouter = [];
33 + router.forEach(item => {
34 + permissions.forEach(per=>{
35 + if(item.meta.permissions == per){
36 + newRouter.push(item)
37 + }
38 + })
39 + if(item.children && item.children.length){
40 + item.children = this.routerPer(item.children)
41 + }
42 + });
43 + return newRouter
45 } 44 }
46 -
...\ No newline at end of file ...\ No newline at end of file
45 +}
......
...@@ -40,7 +40,6 @@ import { mapGetters } from "vuex" ...@@ -40,7 +40,6 @@ import { mapGetters } from "vuex"
40 import Breadcrumb from "@/components/Breadcrumb" 40 import Breadcrumb from "@/components/Breadcrumb"
41 import TopNav from "@/components/TopNav" 41 import TopNav from "@/components/TopNav"
42 import Hamburger from "@/components/Hamburger" 42 import Hamburger from "@/components/Hamburger"
43 -import { removeToken } from '@/utils/auth'
44 import settings from "@/settings" 43 import settings from "@/settings"
45 44
46 export default { 45 export default {
...@@ -89,7 +88,6 @@ export default { ...@@ -89,7 +88,6 @@ export default {
89 .then((res) => { 88 .then((res) => {
90 if (res.code === 200) { 89 if (res.code === 200) {
91 this.$store.dispatch('tagsView/delAllCachedViews') 90 this.$store.dispatch('tagsView/delAllCachedViews')
92 - this.$store.dispatch('tagsView/delAllVisitedViews')
93 // location.reload(); 91 // location.reload();
94 if (this.$route.path != '/index') { 92 if (this.$route.path != '/index') {
95 this.$router.push('/index') 93 this.$router.push('/index')
...@@ -127,7 +125,6 @@ export default { ...@@ -127,7 +125,6 @@ export default {
127 type: "warning", 125 type: "warning",
128 }).then(() => { 126 }).then(() => {
129 this.$store.dispatch("LogOut").then(() => { 127 this.$store.dispatch("LogOut").then(() => {
130 - removeToken()
131 window.location.href = settings.logoutURL;//wsso系统跳转 128 window.location.href = settings.logoutURL;//wsso系统跳转
132 }); 129 });
133 }); 130 });
......
1 <template> 1 <template>
2 - <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> 2 + <div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
3 + :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
3 <transition name="sidebarLogoFade"> 4 <transition name="sidebarLogoFade">
4 <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> 5 <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
5 <img v-if="logo" :src="logo" class="sidebar-logo"> 6 <img v-if="logo" :src="logo" class="sidebar-logo">
6 - <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> 7 + <h1 v-else class="sidebar-title"
8 + :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
9 + }} </h1>
7 </router-link> 10 </router-link>
8 <router-link v-else key="expand" class="sidebar-logo-link" to="/"> 11 <router-link v-else key="expand" class="sidebar-logo-link" to="/">
9 <img v-if="logo" :src="logo" class="sidebar-logo"> 12 <img v-if="logo" :src="logo" class="sidebar-logo">
10 - <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> 13 + <h1 class="sidebar-title"
14 + :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
15 + }} </h1>
11 </router-link> 16 </router-link>
12 </transition> 17 </transition>
13 </div> 18 </div>
...@@ -16,6 +21,8 @@ ...@@ -16,6 +21,8 @@
16 <script> 21 <script>
17 import logoImg from '@/assets/logo/logo.png' 22 import logoImg from '@/assets/logo/logo.png'
18 import variables from '@/assets/styles/variables.scss' 23 import variables from '@/assets/styles/variables.scss'
24 +import { createDecipheriv } from 'crypto';
25 +import { mapState } from 'vuex'
19 26
20 export default { 27 export default {
21 name: 'SidebarLogo', 28 name: 'SidebarLogo',
...@@ -26,19 +33,29 @@ export default { ...@@ -26,19 +33,29 @@ export default {
26 } 33 }
27 }, 34 },
28 computed: { 35 computed: {
36 + ...mapState({
37 + sidebar: state => state.app.sidebar,
38 + }),
29 variables() { 39 variables() {
30 return variables; 40 return variables;
31 }, 41 },
32 - sideTheme() { 42 + sideTheme() {
33 return this.$store.state.settings.sideTheme 43 return this.$store.state.settings.sideTheme
34 } 44 }
35 }, 45 },
36 data() { 46 data() {
37 return { 47 return {
38 title: 'IMAC管理系统', 48 title: 'IMAC管理系统',
39 - logo: logoImg 49 + logo: logoImg,
50 + logoClassName: 'sidebar-logo'
40 } 51 }
41 - } 52 + },
53 + created() {
54 + this.logoClassName = localStorage.getItem('logoName')
55 + },
56 + updated() {
57 + this.logoClassName = localStorage.getItem('logoName')
58 + },
42 } 59 }
43 </script> 60 </script>
44 61
...@@ -66,7 +83,7 @@ export default { ...@@ -66,7 +83,7 @@ export default {
66 width: 100%; 83 width: 100%;
67 84
68 & .sidebar-logo { 85 & .sidebar-logo {
69 - //width: 32px; 86 + width: auto;
70 height: 32px; 87 height: 32px;
71 vertical-align: middle; 88 vertical-align: middle;
72 margin-right: 12px; 89 margin-right: 12px;
...@@ -82,6 +99,13 @@ export default { ...@@ -82,6 +99,13 @@ export default {
82 font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; 99 font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
83 vertical-align: middle; 100 vertical-align: middle;
84 } 101 }
102 +
103 + & .sidebar-logo-mini {
104 + width: auto;
105 + height: 24px;
106 + vertical-align: middle;
107 + margin-right: 12px;
108 + }
85 } 109 }
86 110
87 &.collapse { 111 &.collapse {
......
1 <template> 1 <template>
2 - <div 2 + <div :class="{ 'has-logo': showLogo }" :style="{
3 - :class="{ 'has-logo': showLogo }" 3 + backgroundColor:
4 - :style="{ 4 + settings.sideTheme === 'theme-dark'
5 - backgroundColor: 5 + ? variables.menuBg
6 - settings.sideTheme === 'theme-dark' 6 + : variables.menuLightBg,
7 - ? variables.menuBg 7 + }">
8 - : variables.menuLightBg,
9 - }"
10 - >
11 <logo v-if="showLogo" :collapse="isCollapse" /> 8 <logo v-if="showLogo" :collapse="isCollapse" />
12 <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> 9 <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
13 - <el-menu 10 + <el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="
14 - :default-active="activeMenu"
15 - :collapse="isCollapse"
16 - :background-color="
17 settings.sideTheme === 'theme-dark' 11 settings.sideTheme === 'theme-dark'
18 ? variables.menuBg 12 ? variables.menuBg
19 : variables.menuLightBg 13 : variables.menuLightBg
20 - " 14 + " :text-color="
21 - :text-color=" 15 + settings.sideTheme === 'theme-dark'
22 - settings.sideTheme === 'theme-dark' 16 + ? variables.menuText
23 - ? variables.menuText 17 + : 'rgba(0,0,0,.65)'
24 - : 'rgba(0,0,0,.65)' 18 +" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
25 - " 19 + <sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
26 - :unique-opened="true" 20 + :base-path="route.path" />
27 - :active-text-color="settings.theme" 21 + </el-menu>
28 - :collapse-transition="false" 22 + <div class="version">{{ version }}</div>
29 - mode="vertical"
30 - >
31 - <sidebar-item
32 - v-for="(route, index) in sidebarRouters"
33 - :key="route.path + index"
34 - :item="route"
35 - :base-path="route.path"
36 - />
37 - </el-menu>
38 - <div class="version">{{ version }}</div>
39 </el-scrollbar> 23 </el-scrollbar>
40 </div> 24 </div>
41 </template> 25 </template>
......
1 <template> 1 <template>
2 - <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> 2 + <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
3 - <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> 3 + <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
4 - <sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 4 + <sidebar class="sidebar-container"
5 - <div :class="{hasTagsView:needTagsView}" class="main-container"> 5 + :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 - <div :class="{'fixed-header':fixedHeader}"> 6 + <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 + <div :class="{ 'fixed-header': fixedHeader }">
7 <navbar /> 8 <navbar />
8 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
9 </div> 10 </div>
10 <app-main /> 11 <app-main />
11 - <right-panel v-if="showSettings"> 12 + <right-panel v-if="false">
12 <settings /> 13 <settings />
13 </right-panel> 14 </right-panel>
14 </div> 15 </div>
...@@ -64,45 +65,45 @@ export default { ...@@ -64,45 +65,45 @@ export default {
64 </script> 65 </script>
65 66
66 <style lang="scss" scoped> 67 <style lang="scss" scoped>
67 - @import "~@/assets/styles/mixin.scss"; 68 +@import "~@/assets/styles/mixin.scss";
68 - @import "~@/assets/styles/variables.scss"; 69 +@import "~@/assets/styles/variables.scss";
69 70
70 - .app-wrapper { 71 +.app-wrapper {
71 - @include clearfix; 72 + @include clearfix;
72 - position: relative; 73 + position: relative;
73 - height: 100%; 74 + height: 100%;
74 - width: 100%; 75 + width: 100%;
75 76
76 - &.mobile.openSidebar { 77 + &.mobile.openSidebar {
77 - position: fixed;
78 - top: 0;
79 - }
80 - }
81 -
82 - .drawer-bg {
83 - background: #000;
84 - opacity: 0.3;
85 - width: 100%;
86 - top: 0;
87 - height: 100%;
88 - position: absolute;
89 - z-index: 999;
90 - }
91 -
92 - .fixed-header {
93 position: fixed; 78 position: fixed;
94 top: 0; 79 top: 0;
95 - right: 0;
96 - z-index: 9;
97 - width: calc(100% - #{$sideBarWidth});
98 - transition: width 0.28s;
99 } 80 }
81 +}
100 82
101 - .hideSidebar .fixed-header { 83 +.drawer-bg {
102 - width: calc(100% - 54px) 84 + background: #000;
103 - } 85 + opacity: 0.3;
86 + width: 100%;
87 + top: 0;
88 + height: 100%;
89 + position: absolute;
90 + z-index: 999;
91 +}
104 92
105 - .mobile .fixed-header { 93 +.fixed-header {
106 - width: 100%; 94 + position: fixed;
107 - } 95 + top: 0;
96 + right: 0;
97 + z-index: 9;
98 + width: calc(100% - #{$sideBarWidth});
99 + transition: width 0.28s;
100 +}
101 +
102 +.hideSidebar .fixed-header {
103 + width: calc(100% - 54px)
104 +}
105 +
106 +.mobile .fixed-header {
107 + width: 100%;
108 +}
108 </style> 109 </style>
......
...@@ -68,6 +68,15 @@ Vue.component('HeaderSetting', HeaderSetting) ...@@ -68,6 +68,15 @@ Vue.component('HeaderSetting', HeaderSetting)
68 Vue.component('Drag', Drag) 68 Vue.component('Drag', Drag)
69 69
70 Vue.use(permission) 70 Vue.use(permission)
71 +
72 +Vue.directive('focus', {
73 + inserted: function (el) {
74 + // el表示指令所绑定的元素
75 + el.querySelector('input').focus()
76 + }
77 +});
78 +
79 +
71 /** 80 /**
72 * If you don't want to use mock-server 81 * If you don't want to use mock-server
73 * you want to use MockJs for mock api 82 * you want to use MockJs for mock api
......
...@@ -25,10 +25,10 @@ router.beforeEach((to, from, next) => { ...@@ -25,10 +25,10 @@ router.beforeEach((to, from, next) => {
25 }) 25 })
26 }).catch(err => { 26 }).catch(err => {
27 Message.error(err) 27 Message.error(err)
28 - store.dispatch('LogOut').then(() => { 28 + // store.dispatch('LogOut').then(() => {
29 - // next({ path: '/' }) 29 + // // next({ path: '/' })
30 - window.location.href = settings.logoutURL;//wsso系统跳转 30 + // window.location.href = settings.loginURL;//wsso系统跳转
31 - }) 31 + // })
32 }) 32 })
33 } else { 33 } else {
34 next() 34 next()
...@@ -47,7 +47,7 @@ router.beforeEach((to, from, next) => { ...@@ -47,7 +47,7 @@ router.beforeEach((to, from, next) => {
47 // 在免登录白名单,直接进入 47 // 在免登录白名单,直接进入
48 next() 48 next()
49 } else { 49 } else {
50 - window.location.href = settings.logoutURL;//wsso系统跳转 50 + window.location.href = settings.loginURL;//wsso系统跳转
51 } 51 }
52 } 52 }
53 } 53 }
......
...@@ -62,19 +62,18 @@ export const constantRoutes = [ ...@@ -62,19 +62,18 @@ export const constantRoutes = [
62 { 62 {
63 path: 'index', 63 path: 'index',
64 component: (resolve) => require(['@/views/index'], resolve), 64 component: (resolve) => require(['@/views/index'], resolve),
65 - name: '首页', 65 + name: 'Index',
66 meta: { title: '首页', icon: 'home', noCache: true, affix: true } 66 meta: { title: '首页', icon: 'home', noCache: true, affix: true }
67 - } 67 + },
68 ] 68 ]
69 }, 69 },
70 { 70 {
71 - path: '/', 71 + path: '',
72 component: Layout, 72 component: Layout,
73 hidden: true, 73 hidden: true,
74 - redirect: 'noredirect',
75 children: [ 74 children: [
76 { 75 {
77 - path: '/info/:handle/:id|:routeStatus|:fltNo|:route|:fltDate|:status', 76 + path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status',
78 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), 77 component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
79 name: 'FlightAllocConfigInfo', 78 name: 'FlightAllocConfigInfo',
80 meta: { title: '航班配舱', icon: 'user' } 79 meta: { title: '航班配舱', icon: 'user' }
...@@ -86,18 +85,24 @@ export const constantRoutes = [ ...@@ -86,18 +85,24 @@ export const constantRoutes = [
86 meta: { title: '流水表', icon: 'user' } 85 meta: { title: '流水表', icon: 'user' }
87 }, 86 },
88 { 87 {
89 - path: '/upDateResult->:from', 88 + path: '/upDateResult',
90 component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve), 89 component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
91 name: 'UpDateResult', 90 name: 'UpDateResult',
92 - meta: { title: '导入信息', icon: 'user' } 91 + meta: { title: '错误信息提示', icon: 'user' }
92 + },
93 + {
94 + path: '/goodsLog/type=:type',
95 + component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
96 + name: 'GoodsUploadLog',
97 + meta: { title: '导入日志', icon: 'user' }
93 }, 98 },
94 ] 99 ]
95 - } 100 + },
96 ] 101 ]
97 102
98 export default new Router({ 103 export default new Router({
99 mode: 'history', // 去掉url中的# 104 mode: 'history', // 去掉url中的#
100 scrollBehavior: () => ({ y: 0 }), 105 scrollBehavior: () => ({ y: 0 }),
101 routes: constantRoutes, 106 routes: constantRoutes,
102 - base: settings.routerBase
103 -})
...\ No newline at end of file ...\ No newline at end of file
107 + base: settings.routerBase,
108 +})
......
...@@ -42,7 +42,8 @@ module.exports = { ...@@ -42,7 +42,8 @@ module.exports = {
42 /** 42 /**
43 * logout 43 * logout
44 */ 44 */
45 - logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/', 45 + loginURL: 'https://test-myapps.secure.fedex.com/L2/iMAC/',
46 + logoutURL: 'https://test-myapps.secure.fedex.com/logout/',
46 47
47 /** 48 /**
48 * 后端接口 49 * 后端接口
...@@ -58,5 +59,5 @@ module.exports = { ...@@ -58,5 +59,5 @@ module.exports = {
58 /** 59 /**
59 * 版本号 60 * 版本号
60 */ 61 */
61 - version: 'version:1.7.0' 62 + version: 'version:2.0.0'
62 } 63 }
......
...@@ -7,6 +7,7 @@ const getters = { ...@@ -7,6 +7,7 @@ const getters = {
7 token: state => state.user.token, 7 token: state => state.user.token,
8 avatar: state => state.user.avatar, 8 avatar: state => state.user.avatar,
9 name: state => state.user.name, 9 name: state => state.user.name,
10 + id: state => state.user.id,
10 activePortName: state => state.user.activePortName, 11 activePortName: state => state.user.activePortName,
11 portName: state => state.user.portName, 12 portName: state => state.user.portName,
12 introduction: state => state.user.introduction, 13 introduction: state => state.user.introduction,
......
...@@ -18,7 +18,7 @@ const mutations = { ...@@ -18,7 +18,7 @@ const mutations = {
18 //Cookies.set('sidebarStatus', 1) 18 //Cookies.set('sidebarStatus', 1)
19 localStorage.setItem('sidebarStatus', 1) 19 localStorage.setItem('sidebarStatus', 1)
20 } else { 20 } else {
21 - Cookies.set('sidebarStatus', 0) 21 + // Cookies.set('sidebarStatus', 0)
22 localStorage.setItem('sidebarStatus', 0) 22 localStorage.setItem('sidebarStatus', 0)
23 } 23 }
24 }, 24 },
......
...@@ -3,6 +3,7 @@ import { getTableHeader } from '@/api/menu' ...@@ -3,6 +3,7 @@ import { getTableHeader } from '@/api/menu'
3 import { changeCurrentPort } from "@/api/system/user.js"; 3 import { changeCurrentPort } from "@/api/system/user.js";
4 import { getToken, setToken, removeToken } from '@/utils/auth' 4 import { getToken, setToken, removeToken } from '@/utils/auth'
5 import { Message } from 'element-ui' 5 import { Message } from 'element-ui'
6 +import settings from "@/settings"
6 7
7 const user = { 8 const user = {
8 state: { 9 state: {
...@@ -101,7 +102,7 @@ const user = { ...@@ -101,7 +102,7 @@ const user = {
101 type: 'error' 102 type: 'error'
102 }) 103 })
103 this.LogOut().then(() => { 104 this.LogOut().then(() => {
104 - window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转 105 + window.location.href = settings.loginURL;//wsso系统跳转
105 }) 106 })
106 } 107 }
107 if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组 108 if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
......
...@@ -10,10 +10,10 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' ...@@ -10,10 +10,10 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
10 const service = axios.create({ 10 const service = axios.create({
11 // axios中请求配置有baseURL选项,表示请求URL公共部分 11 // axios中请求配置有baseURL选项,表示请求URL公共部分
12 baseURL: settings.baseURL, 12 baseURL: settings.baseURL,
13 -
14 // 超时 13 // 超时
15 - timeout: 30000, 14 + timeout: 90000,
16 }) 15 })
16 +
17 // request拦截器 17 // request拦截器
18 service.interceptors.request.use(config => { 18 service.interceptors.request.use(config => {
19 // 是否需要设置 token 19 // 是否需要设置 token
...@@ -52,21 +52,23 @@ service.interceptors.request.use(config => { ...@@ -52,21 +52,23 @@ service.interceptors.request.use(config => {
52 // 响应拦截器 52 // 响应拦截器
53 service.interceptors.response.use(res => { 53 service.interceptors.response.use(res => {
54 if (res.headers['token']) { 54 if (res.headers['token']) {
55 - setToken(decodeURIComponent(res.headers['token'])) 55 + setToken(res.headers['token'])
56 } 56 }
57 // 未设置状态码则默认成功状态 57 // 未设置状态码则默认成功状态
58 const code = res.data.code || 200; 58 const code = res.data.code || 200;
59 // 获取错误信息 59 // 获取错误信息
60 const msg = errorCode[code] || res.data.msg || errorCode['default'] 60 const msg = errorCode[code] || res.data.msg || errorCode['default']
61 if (code === 301) { 61 if (code === 301) {
62 - MessageBox.confirm('登录状态已过期,需重新登录', '系统提示', { 62 + MessageBox.confirm('登录状态已过期,需重新登录!msg:' + msg, '系统提示', {
63 - confirmButtonText: '确定', 63 + closeOnClickModal: false,
64 + showCancelButton: false,
65 + confirmButtonText: '重新登录',
64 type: 'warning' 66 type: 'warning'
65 } 67 }
66 ).then(() => { 68 ).then(() => {
67 store.dispatch('LogOut').then(() => { 69 store.dispatch('LogOut').then(() => {
68 // location.href = '/'; 70 // location.href = '/';
69 - window.location.href = settings.logoutURL;//wsso系统跳转 71 + window.location.href = settings.loginURL;//wsso系统跳转
70 }) 72 })
71 }); 73 });
72 } else if (code === 403) { 74 } else if (code === 403) {
......
...@@ -81,3 +81,9 @@ export function isArray(arg) { ...@@ -81,3 +81,9 @@ export function isArray(arg) {
81 } 81 }
82 return Array.isArray(arg) 82 return Array.isArray(arg)
83 } 83 }
84 +
85 +// 验证手机号码
86 +export function validPhoneNumber(value) {
87 + const reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
88 + return reg.test(value)
89 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -6,17 +6,18 @@ const mimeMap = { ...@@ -6,17 +6,18 @@ const mimeMap = {
6 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 6 xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
7 zip: 'application/zip' 7 zip: 'application/zip'
8 } 8 }
9 -const baseUrl = settings.downLoadURL //uat服务器 9 +const baseUrl = settings.downLoadURL //接口地址
10 10
11 -export function downLoadZip(str, filename) { 11 +export function downLoadZip(str, data, filename) {
12 var url = baseUrl + str 12 var url = baseUrl + str
13 axios({ 13 axios({
14 - method: 'get', 14 + method: 'post',
15 url: url, 15 url: url,
16 + data: data,
16 responseType: 'blob', 17 responseType: 'blob',
17 headers: { 'Authorization': decodeURIComponent(getToken()) } 18 headers: { 'Authorization': decodeURIComponent(getToken()) }
18 }).then(res => { 19 }).then(res => {
19 - resolveBlob(res, mimeMap.zip) 20 + resolveBlob(res, mimeMap.zip, filename)
20 }) 21 })
21 } 22 }
22 23
...@@ -25,15 +26,14 @@ export function downLoadZip(str, filename) { ...@@ -25,15 +26,14 @@ export function downLoadZip(str, filename) {
25 * @param {*} res blob响应内容 26 * @param {*} res blob响应内容
26 * @param {String} mimeType MIME类型 27 * @param {String} mimeType MIME类型
27 */ 28 */
28 -export function resolveBlob(res, mimeType) { 29 +export function resolveBlob(res, mimeType, fileName) {
29 const aLink = document.createElement('a') 30 const aLink = document.createElement('a')
30 - var blob = new Blob([res], { type: mimeType }) 31 + var blob = new Blob([res.data], { type: mimeType })
31 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; 32 // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
32 var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') 33 var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
33 - var contentDisposition = decodeURI(res.headers['content-disposition']) 34 + // var contentDisposition = decodeURI(res.headers['content-disposition'])
34 - var result = patt.exec(contentDisposition) 35 + // var result = patt.exec(contentDisposition)
35 - var fileName = result[1] 36 + // var fileName = result[1]
36 - fileName = fileName.replace(/\"/g, '')
37 aLink.href = URL.createObjectURL(blob) 37 aLink.href = URL.createObjectURL(blob)
38 aLink.setAttribute('download', fileName) // 设置下载文件名称 38 aLink.setAttribute('download', fileName) // 设置下载文件名称
39 document.body.appendChild(aLink) 39 document.body.appendChild(aLink)
...@@ -52,7 +52,6 @@ export function downLoadXlsx(str, data, fileName) { ...@@ -52,7 +52,6 @@ export function downLoadXlsx(str, data, fileName) {
52 timeout: 500000, 52 timeout: 500000,
53 responseType: 'blob', 53 responseType: 'blob',
54 headers: { 'Authorization': decodeURIComponent(getToken()) } 54 headers: { 'Authorization': decodeURIComponent(getToken()) }
55 - // headers: { 'Authorization': decodeURIComponent(getToken()) }
56 //uat环境token需要做url解码处理 55 //uat环境token需要做url解码处理
57 }).then(res => { 56 }).then(res => {
58 if (res.status === 200) { 57 if (res.status === 200) {
...@@ -107,3 +106,4 @@ export function cargoTableXlsxPre(val) { ...@@ -107,3 +106,4 @@ export function cargoTableXlsxPre(val) {
107 aLink.click() 106 aLink.click()
108 document.body.removeChild(aLink); 107 document.body.removeChild(aLink);
109 } 108 }
109 +
......
...@@ -142,12 +142,12 @@ ...@@ -142,12 +142,12 @@
142 </el-col> 142 </el-col>
143 <el-col :span="24"> 143 <el-col :span="24">
144 <el-form-item label="Handling Code"> 144 <el-form-item label="Handling Code">
145 - <el-empty description="暂无数据" v-if=" 145 + <!-- <el-empty description="暂无数据" v-if="
146 !selectData.HandlingCode || selectData.HandlingCode.length == 0 146 !selectData.HandlingCode || selectData.HandlingCode.length == 0
147 - "></el-empty> 147 + "></el-empty> -->
148 - <el-checkbox-group v-model="handingCodes" v-else> 148 + <el-checkbox-group v-model="handingCodes">
149 <el-row> 149 <el-row>
150 - <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id"> 150 + <el-col :span="2" v-for="item in selectData.HandlingCode" :key="item.id" v-if="item.status == 1">
151 <el-checkbox :label="item.chineseName" v-model="item.chineseName"> 151 <el-checkbox :label="item.chineseName" v-model="item.chineseName">
152 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> 152 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
153 </el-checkbox> 153 </el-checkbox>
...@@ -158,12 +158,12 @@ ...@@ -158,12 +158,12 @@
158 </el-col> 158 </el-col>
159 <el-col :span="24"> 159 <el-col :span="24">
160 <el-form-item label="Sub Category"> 160 <el-form-item label="Sub Category">
161 - <el-empty description="暂无数据" v-if=" 161 + <!-- <el-empty description="暂无数据" v-if="
162 !selectData.SubCategory || selectData.SubCategory.length == 0 162 !selectData.SubCategory || selectData.SubCategory.length == 0
163 - "></el-empty> 163 + "></el-empty> -->
164 - <el-checkbox-group v-model="subCategorys" v-else> 164 + <el-checkbox-group v-model="subCategorys">
165 <el-row> 165 <el-row>
166 - <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id"> 166 + <el-col :span="2" v-for="item in selectData.SubCategory" :key="item.id" v-if="item.status == 1">
167 <el-checkbox :label="item.chineseName" v-model="item.chineseName"> 167 <el-checkbox :label="item.chineseName" v-model="item.chineseName">
168 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips> 168 <Tooltips :content="item.chineseName" :refName="item.code"></Tooltips>
169 </el-checkbox> 169 </el-checkbox>
...@@ -176,17 +176,17 @@ ...@@ -176,17 +176,17 @@
176 <div style="margin: 0 0 0 10px"> 176 <div style="margin: 0 0 0 10px">
177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button> 177 <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="select(0)">查询</el-button>
178 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" 178 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
179 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(0)" :loading="downLoadingTip.downloading" 179 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(0)"
180 - :disabled="tableData.length <= 0">{{ 180 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
181 - downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果" 181 + downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
182 }}</el-button> 182 }}</el-button>
183 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini" 183 <el-button :type="downLoadingTip.downloading ? 'warning' : 'primary'" size="mini"
184 - v-hasPermi="['allocation:cargo:export']" @click="xlsx(1)" :loading="downLoadingTip.downloading" 184 + v-hasPermi="['allocation:cargo:export']" icon="el-icon-download" @click="xlsx(1)"
185 - :disabled="tableData.length <= 0">{{ 185 + :loading="downLoadingTip.downloading" :disabled="tableData.length <= 0">{{
186 - downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果" 186 + downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
187 }}</el-button> 187 }}</el-button>
188 - <el-button type="primary" size="mini" v-hasPermi="['allocation:cargo:allocation']" @click="addFit" 188 + <el-button type="primary" size="mini" icon="el-icon-plus" v-hasPermi="['allocation:cargo:allocation']"
189 - :disabled="tableSelection.length <= 0">添加到航班</el-button> 189 + @click="addFit" :disabled="tableSelection.length <= 0">添加到航班</el-button>
190 <div class="tips"> 190 <div class="tips">
191 <span style="paddingRight: 50px">总重量:{{ allWeight }}</span> 191 <span style="paddingRight: 50px">总重量:{{ allWeight }}</span>
192 <span>总件数:{{ allQty }}</span> 192 <span>总件数:{{ allQty }}</span>
...@@ -331,6 +331,7 @@ export default { ...@@ -331,6 +331,7 @@ export default {
331 }, 331 },
332 //查询 332 //查询
333 async select(val) { 333 async select(val) {
334 + this.tableSelection = []
334 this.loading = true; 335 this.loading = true;
335 this.dataInfo(); 336 this.dataInfo();
336 if (val === 0) { 337 if (val === 0) {
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog title="货物配舱" width="80%" top="5vh" :visible.sync="dialogVisible" :close-on-click-modal="false" 3 <el-dialog title="货物配舱" width="80%" top="5vh" :visible.sync="dialogVisible" :close-on-click-modal="false"
4 - :show-close="false" :append-to-body="true"> 4 + :show-close="false" :append-to-body="true" @close="dialogBeforeClose">
5 <el-divider content-position="left">已选货物信息</el-divider> 5 <el-divider content-position="left">已选货物信息</el-divider>
6 <el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row 6 <el-table :data="tableData" size="mini" height="200" max-height="200" border stripe highlight-current-row
7 style="width: 100%"> 7 style="width: 100%">
8 <el-table-column type="index" label="序号" align="center"> 8 <el-table-column type="index" label="序号" align="center">
9 </el-table-column> 9 </el-table-column>
10 <el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value" 10 <el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value"
11 - :label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter"> 11 + :label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter">
12 </el-table-column> 12 </el-table-column>
13 </el-table> 13 </el-table>
14 <el-form ref="form" class="form-header" label-position="right" label-width="auto" 14 <el-form ref="form" class="form-header" label-position="right" label-width="auto"
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 </el-tooltip> 30 </el-tooltip>
31 </div> 31 </div>
32 </template> 32 </template>
33 - <el-select class="formItem" v-model="formData.route" placeholder="不限" :disabled="routeList.length == 0"> 33 + <el-select class="formItem" v-model="formData.route" placeholder="请选择航线" :disabled="routeList.length == 0">
34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index"> 34 <el-option v-for="(item, index) in routeList" :label="item.route" :value="item.route" :key="index">
35 <Tooltips :content="item.route" :refName="item.route"></Tooltips> 35 <Tooltips :content="item.route" :refName="item.route"></Tooltips>
36 </el-option> 36 </el-option>
...@@ -65,24 +65,25 @@ export default { ...@@ -65,24 +65,25 @@ export default {
65 ids: [], 65 ids: [],
66 fltNo: undefined, 66 fltNo: undefined,
67 fltDate: undefined, 67 fltDate: undefined,
68 - route: undefined, 68 + route: null,
69 overweight: false, 69 overweight: false,
70 + notInWhite: false,
70 }, 71 },
71 cargoHeader: [ 72 cargoHeader: [
72 - { name: "口岸代码", value: "portName" }, 73 + { name: "口岸代码", value: "portName", width: "" },
73 - { name: "运单号", value: "waybillNo" }, 74 + { name: "运单号", value: "waybillNo", width: "" },
74 - { name: "货物状态", value: "statusName" }, 75 + { name: "货物状态", value: "statusName", width: "" },
75 - { name: "站点", value: "siteName" }, 76 + { name: "站点", value: "siteName", width: "" },
76 - { name: "申报类型", value: "typeName" }, 77 + { name: "申报类型", value: "typeName", width: "" },
77 - { name: "URSA", value: "ursa" }, 78 + { name: "URSA", value: "ursa", width: "" },
78 - { name: "实际重量", value: "actualWeight" }, 79 + { name: "实际重量", value: "actualWeight", width: "" },
79 - { name: "件数", value: "qty" }, 80 + { name: "件数", value: "qty", width: "" },
80 - { name: "ACCS原航班号", value: "fltNoAccs" }, 81 + { name: "ACCS原航班号", value: "fltNoAccs", width: "120" },
81 - { name: "ACCS原航班日期", value: "fltDateAccs" }, 82 + { name: "ACCS原航班日期", value: "fltDateAccs", width: "130" },
82 - { name: "品名描述", value: "nameDescription" }, 83 + { name: "品名描述", value: "nameDescription", width: "" },
83 - { name: "是否自动", value: "cargoRulesStatus" }, 84 + { name: "是否自动", value: "cargoRulesStatus", width: "" },
84 - { name: "创建人", value: "createUserName" }, 85 + { name: "创建人", value: "createUserName", width: "" },
85 - { name: "创建时间", value: "createTime" }, 86 + { name: "创建时间", value: "createTime", width: "" },
86 ], 87 ],
87 routeList: [], 88 routeList: [],
88 rules: { 89 rules: {
...@@ -120,68 +121,89 @@ export default { ...@@ -120,68 +121,89 @@ export default {
120 route: undefined, 121 route: undefined,
121 flightId: undefined, 122 flightId: undefined,
122 overweight: false, 123 overweight: false,
124 + notInWhite: false,
123 }; 125 };
124 this.routeList = [] 126 this.routeList = []
125 }, 127 },
126 //确定配舱 128 //确定配舱
127 submit() { 129 submit() {
128 - this.loading = true; 130 + this.formData.overweight = false
129 - let arr = []; 131 + this.formData.notInWhite = false
130 - this.tableData.forEach((item) => { 132 + this.$refs.form.validate(val => {
131 - arr.push(item.id); 133 + if (val) {
132 - }); 134 + this.loading = true;
133 - this.formData.ids = arr; 135 + let arr = [];
134 - this.routeList.forEach(item => { 136 + this.tableData.forEach((item) => {
135 - if (item.route === this.formData.route) { 137 + arr.push(item.id);
136 - this.formData.flightId = item.id 138 + });
139 + this.formData.ids = arr;
140 + this.routeList.forEach(item => {
141 + if (item.route === this.formData.route) {
142 + this.formData.flightId = item.id
143 + }
144 + })
145 + if (this.formData.fltNo && this.formData.fltDate) {
146 + allocationFlight(this.formData).then((res) => {
147 + //code 200 配舱成功 202重量已满需要确认 203货物不在白名单需要确认 其余code直接输出msg 接口先判断重量后判断白名单 overweight/notInWhite初始默认false
148 + if (res.code === 200) {
149 + this.loading = false;
150 + this.msgSuccess('货物配舱成功')
151 + this.cleaerForm();
152 + this.$emit("dialogBeforeClose", { close: false, reload: true });
153 + } else if (res.code === 202) {
154 + //超重航班确实是否继续配舱
155 + this.reallocationFlight(res.msg, 'overweight')
156 + } else if (res.code === 203) {
157 + //不存在白名单中确实是否继续配舱
158 + this.reallocationFlight(res.msg, 'notInWhite')
159 + } else {
160 + this.loading = false;
161 + this.msgWarning(res.msg)
162 + }
163 + }).catch(() => {
164 + this.loading = false;
165 + });
166 + } else {
167 + this.loading = false;
168 + this.msgWarning('航班号或航班日期不能为空')
169 + }
137 } 170 }
138 }) 171 })
139 - if (this.formData.fltNo && this.formData.fltDate) { 172 + },
173 + //手动配舱超重或白名单不存在提示
174 + reallocationFlight(msg, status) {
175 + this.$confirm(msg, "提示", {
176 + confirmButtonText: "确定",
177 + cancelButtonText: "取消",
178 + type: "warning",
179 + }).then(() => {
180 + if (status == 'overweight') {
181 + this.formData.overweight = true; //确定继续overweight变为true再次请求接口
182 + } else {
183 + this.formData.notInWhite = true; //确定继续notInWhite变为true再次请求接口
184 + }
140 allocationFlight(this.formData).then((res) => { 185 allocationFlight(this.formData).then((res) => {
141 - this.loading = false;
142 - //code 200 配舱成功 202 重量已满需要确认 其余code直接输出msg
143 if (res.code === 200) { 186 if (res.code === 200) {
187 + this.loading = false
144 this.msgSuccess('货物配舱成功') 188 this.msgSuccess('货物配舱成功')
145 this.cleaerForm(); 189 this.cleaerForm();
146 this.$emit("dialogBeforeClose", { close: false, reload: true }); 190 this.$emit("dialogBeforeClose", { close: false, reload: true });
147 - } else if (res.code === 202) { 191 + } else if (res.code === 203) {
148 - this.$confirm(res.msg, "提示", { 192 + this.reallocationFlight(res.msg, 'notInWhite')
149 - confirmButtonText: "确定",
150 - cancelButtonText: "取消",
151 - type: "warning",
152 - })
153 - .then(() => {
154 - this.formData.overweight = true; //确定继续overweight变为true再次请求接口
155 - allocationFlight(this.formData).then((res) => {
156 - if (res.code === 200) {
157 - this.msgSuccess('货物配舱成功')
158 - } else {
159 - this.msgWarning(res.msg)
160 - }
161 - });
162 - this.cleaerForm();
163 - this.$emit("dialogBeforeClose", { close: false, reload: true });
164 - })
165 - .catch(() => {
166 - //取消 取消当前配舱
167 - this.msgSuccess('配舱已取消')
168 - this.cleaerForm();
169 - this.$emit("dialogBeforeClose", {
170 - close: false,
171 - reload: true,
172 - });
173 - });
174 } else { 193 } else {
175 - this.loading = false;
176 this.msgWarning(res.msg) 194 this.msgWarning(res.msg)
195 + this.loading = false
177 } 196 }
178 - }).catch(() => {
179 - this.loading = false;
180 }); 197 });
181 - } else { 198 + }).catch(() => {
182 - this.loading = false; 199 + this.msgSuccess('配舱已取消')
183 - this.msgWarning('航班号或航班日期不能为空') 200 + this.loading = false
184 - } 201 + this.cleaerForm();
202 + this.$emit("dialogBeforeClose", {
203 + close: false,
204 + reload: true,
205 + });
206 + })
185 }, 207 },
186 dialogBeforeClose() { 208 dialogBeforeClose() {
187 this.cleaerForm(); 209 this.cleaerForm();
...@@ -201,6 +223,7 @@ export default { ...@@ -201,6 +223,7 @@ export default {
201 //日期选择变化 223 //日期选择变化
202 dateChange(val) { 224 dateChange(val) {
203 this.routeList = [] 225 this.routeList = []
226 + this.formData.route = null
204 if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') { 227 if (this.formData.fltNo && this.formData.fltNo != null && this.formData.fltNo != '') {
205 if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') { 228 if (this.formData.fltDate && this.formData.fltDate != null && this.formData.fltDate != '') {
206 let obj = { 229 let obj = {
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" 3 <el-dialog title="航线优先级排序" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 - append-to-body center> 4 + @close="close" append-to-body center>
5 <el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent> 5 <el-form ref="routeOrder" label-width="auto" label-position="left" size="small" @submit.native.prevent>
6 <el-form-item label="航班号:" prop="fltNo"> 6 <el-form-item label="航班号:" prop="fltNo">
7 <span>{{ fltNo }}</span> 7 <span>{{ fltNo }}</span>
...@@ -47,6 +47,8 @@ export default { ...@@ -47,6 +47,8 @@ export default {
47 }, 47 },
48 watch: { 48 watch: {
49 open(val) { 49 open(val) {
50 + this.routeList = []
51 + this.submitData = []
50 if (val) { 52 if (val) {
51 this.fltNo = this.fltData.fltNo 53 this.fltNo = this.fltData.fltNo
52 this.fltDate = this.fltData.fltDate 54 this.fltDate = this.fltData.fltDate
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
55 </Tables> 55 </Tables>
56 <!-- 查看目的航班对话框 --> 56 <!-- 查看目的航班对话框 -->
57 <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" 57 <el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false"
58 - :show-close="false" :append-to-body="true"> 58 + :show-close="false" :append-to-body="true" @close="cancelFlightDate">
59 <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate"> 59 <el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
60 <el-table-column type="index" label="序号" align="center"> 60 <el-table-column type="index" label="序号" align="center">
61 <template slot-scope="scope">{{ scope.$index + 1 }}</template> 61 <template slot-scope="scope">{{ scope.$index + 1 }}</template>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> 67 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
68 <template slot-scope="scope"> 68 <template slot-scope="scope">
69 <el-button size="mini" type="text" icon="el-icon-edit" 69 <el-button size="mini" type="text" icon="el-icon-edit"
70 - @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, scope.row.route)">查看配置维度 70 + @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, ' ', ' ')">查看配置维度
71 </el-button> 71 </el-button>
72 </template> 72 </template>
73 </el-table-column> 73 </el-table-column>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 </el-dialog> 78 </el-dialog>
79 <!-- 添加或修改对话框 --> 79 <!-- 添加或修改对话框 -->
80 <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false" 80 <el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false"
81 - :show-close="false"> 81 + :show-close="false" @close="cancel">
82 <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small"> 82 <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small">
83 <el-row> 83 <el-row>
84 <el-col :span="8"> 84 <el-col :span="8">
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
113 <el-col :span="24" style="margin-bottom: 5%"> 113 <el-col :span="24" style="margin-bottom: 5%">
114 <span style="color: #ff4949; margin-left: 10%">提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br /> 114 <span style="color: #ff4949; margin-left: 10%">提示:配载航班之间请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br />
115 <span 115 <span
116 - style="color: #ff4949; margin-left: 10%">提示:如果需要设置配载航班延迟或提前可以直接在目的航后加减【+-】天数。如:CA1053+1;CZ433-1</span> 116 + style="color: #ff4949; margin-left: 10%">提示:如果需要设置配载航班延迟或提前可以直接在目的航后加减【+-】天数。如:CA1053+1;CZ433-1</span>
117 </el-col> 117 </el-col>
118 <el-col :span="24"> 118 <el-col :span="24">
119 <el-form-item label="配载航班" prop="flightRank"> 119 <el-form-item label="配载航班" prop="flightRank">
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
268 }, 268 },
269 methods: { 269 methods: {
270 //跳转到查看,修改页面 270 //跳转到查看,修改页面
271 - handleClick(fltNo, handle, fltDate, route) { 271 + handleClick(fltNo, handle, fltDate, route, status) {
272 this.openFlightDate = false; 272 this.openFlightDate = false;
273 let obj = { 273 let obj = {
274 id: ' ', 274 id: ' ',
...@@ -277,8 +277,8 @@ export default { ...@@ -277,8 +277,8 @@ export default {
277 fltDate: fltDate != null ? fltDate : ' ', 277 fltDate: fltDate != null ? fltDate : ' ',
278 route: route, 278 route: route,
279 routeStatus: 'FlightRandConfig', 279 routeStatus: 'FlightRandConfig',
280 - status: ' ', 280 + status: status,
281 - createStatus: 1 281 + createStatus: 1,
282 } 282 }
283 this.$router.push({ 283 this.$router.push({
284 name: "FlightAllocConfigInfo", 284 name: "FlightAllocConfigInfo",
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" @tableSelectAll="tableSelectAll"> 41 layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" @tableSelectAll="tableSelectAll">
42 </Tables> 42 </Tables>
43 <el-dialog title="新增预审航班" width="20%" :visible.sync="dialogVisible" :close-on-click-modal="false" 43 <el-dialog title="新增预审航班" width="20%" :visible.sync="dialogVisible" :close-on-click-modal="false"
44 - :show-close="false" :append-to-body="true"> 44 + :show-close="false" :append-to-body="true" @close="close">
45 <el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules" 45 <el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules"
46 @submit.native.prevent> 46 @submit.native.prevent>
47 <el-form-item label="航班号" prop="addFlitNo"> 47 <el-form-item label="航班号" prop="addFlitNo">
...@@ -230,4 +230,5 @@ export default { ...@@ -230,4 +230,5 @@ export default {
230 }; 230 };
231 </script> 231 </script>
232 <style rel="stylesheet/scss" lang="scss"> 232 <style rel="stylesheet/scss" lang="scss">
233 +
233 </style> 234 </style>
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
5 <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel" 5 <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel"
6 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" 6 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
7 class="upload-demo" v-hasPermi="['base:caImport:import']"> 7 class="upload-demo" v-hasPermi="['base:caImport:import']">
8 - <el-button type="primary">点击上传</el-button> 8 + <el-button icon="el-icon-upload2" type="primary">点击上传</el-button>
9 </el-upload> 9 </el-upload>
10 </el-form-item> 10 </el-form-item>
11 <el-form-item> 11 <el-form-item>
12 - <el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:caImport:download']">下载模板</el-button> 12 + <el-button type="primary" icon="el-icon-download" @click="downloadTempleate"
13 + v-hasPermi="['base:caImport:download']">下载模板</el-button>
13 </el-form-item> 14 </el-form-item>
14 </el-form> 15 </el-form>
15 <div style="font-size: 12px; font-weight: 700"> 16 <div style="font-size: 12px; font-weight: 700">
...@@ -71,7 +72,6 @@ export default { ...@@ -71,7 +72,6 @@ export default {
71 this.$message.error("下载失败"); 72 this.$message.error("下载失败");
72 } 73 }
73 }); 74 });
74 -
75 }, 75 },
76 uploadExcel(option) { 76 uploadExcel(option) {
77 //上传excel 77 //上传excel
......
...@@ -12,11 +12,12 @@ ...@@ -12,11 +12,12 @@
12 <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel" 12 <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
13 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" 13 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
14 class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"> 14 class="upload-demo" v-hasPermi="['base:flightImport:importFlight']">
15 - <el-button type="primary">点击上传</el-button> 15 + <el-button icon="el-icon-upload2" type="primary">点击上传</el-button>
16 </el-upload> 16 </el-upload>
17 </el-form-item> 17 </el-form-item>
18 <el-form-item> 18 <el-form-item>
19 - <el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:flightImport:exportExcel']">下载模板 19 + <el-button type="primary" icon="el-icon-download" @click="downloadTempleate"
20 + v-hasPermi="['base:flightImport:exportExcel']">下载模板
20 </el-button> 21 </el-button>
21 </el-form-item> 22 </el-form-item>
22 </el-form> 23 </el-form>
......
This diff is collapsed. Click to expand it.
1 +<template>
2 + <div>
3 + <el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
4 + label-width="auto" size="small" @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="货站名称">
8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="品名">
14 + <el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入品名" maxlength="50"
15 + clearable />
16 + </el-form-item>
17 + </el-col>
18 + </el-row>
19 + </el-form>
20 + <div style="display:flex;padding:10px 20px">
21 + <el-button icon="el-icon-search" type="primary" :loading="loading" size="small" @click="selection(1)">查 询
22 + </el-button>
23 + <el-button icon="el-icon-plus" type="primary" size="small" v-hasPermi="['base:goodsBlackStation:add']"
24 + @click="add">新 增
25 + </el-button>
26 + <el-button icon="el-icon-delete" type="danger" size="small" v-hasPermi="['base:goodsBlackStation:delete']"
27 + style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
28 + 删 除
29 + </el-button>
30 + <el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
31 + @click="downloadTempleate">下载模板
32 + </el-button>
33 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 + @click="downloadExcel">
35 + 黑名单导出
36 + </el-button>
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 + v-hasPermi="['base:goodsBlackStation:add']">黑名单导入</el-button>
39 + <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
40 + </el-button>
41 + </div>
42 + <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
43 + :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
44 + :limitSize="selectionData.size" :page="selectionData.page" layout="total,prev, pager, next, jumper, ->"
45 + :pageSizes="[100]" :height="tableHeight" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll"
46 + @currentChange="currentChange">
47 + <template slot="optionColumn">
48 + <el-table-column label="操作" align="center">
49 + <template slot-scope="scope">
50 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
51 + v-hasPermi="['base:goodsBlackStation:delete']" @click="del(scope.row)">删除</el-button>
52 + </template>
53 + </el-table-column>
54 + </template>
55 + </Tables>
56 + <Dialog :open="open" :openStatus="openStatus" @close="close" />
57 + </div>
58 +</template>
59 +
60 +<script>
61 +import { downLoadTemplate } from "@/api/flightInfoImport";
62 +import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
63 +import Dialog from './dialog.vue'
64 +
65 +export default {
66 + name: 'GoodsBlackStation',
67 + components: {
68 + Dialog,
69 + },
70 + data() {
71 + return {
72 + selectionData: {
73 + goodsStation: '',
74 + goodsName: '',
75 + goodsType: 2,
76 + size: 20,
77 + page: 1
78 + },
79 + tableData: [],
80 + tableHeader: this.tableHeaders['goodsStation'],
81 + checkData: [],
82 + fileList: [],
83 + errorData: [],
84 + tableHeight: null,
85 + totalCount: 0,
86 + openStatus: '',
87 + loading: false,
88 + open: false,
89 + }
90 + },
91 + created() {
92 +
93 + },
94 + mounted() {
95 + this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
96 + this.selection(1)
97 + },
98 + watch: {
99 + $route(to, from) {
100 + if (to.name == 'GoodsStation') {
101 + this.selection()
102 + }
103 + }
104 + },
105 + methods: {
106 + //查询
107 + selection(val) {
108 + this.tableData = []
109 + this.checkData = []
110 + this.loading = true
111 + if (val === 1) {
112 + this.selectionData.page = 1
113 + }
114 + searchGoods(this.selectionData).then(res => {
115 + this.loading = false
116 + if (res.code === 200) {
117 + this.tableData = res.data.list
118 + this.totalCount = res.data.total
119 + } else {
120 + this.msgWarning(res.msg)
121 + }
122 + }).catch(err => {
123 + this.loading = false
124 + console.log(err)
125 + })
126 + },
127 + //新增
128 + add() {
129 + this.open = true
130 + this.openStatus = 'add'
131 + },
132 + //删除
133 + del(val) {
134 + this.$confirm("是否要删除这条记录!", "注意!", {
135 + confirmButtonText: "确定",
136 + cancelButtonText: '取消',
137 + type: "warning",
138 + }).then(() => {
139 + this.deleteGoods([val.id])
140 + }).catch(() => {
141 +
142 + })
143 + },
144 + //批量删除
145 + batchDel() {
146 + let arr = []
147 + this.checkData.forEach(item => {
148 + arr.push(item.id)
149 + })
150 + this.$confirm("是否要删除这些记录!", "注意!", {
151 + confirmButtonText: "确定",
152 + cancelButtonText: '取消',
153 + type: "warning",
154 + }).then(() => {
155 + this.deleteGoods(arr)
156 + }).catch(() => {
157 +
158 + })
159 + },
160 + //删除请求
161 + deleteGoods(val) {
162 + batchDeleteGoods(val).then(res => {
163 + if (res.code === 200) {
164 + this.msgSuccess('删除成功!')
165 + this.selection(1)
166 + } else {
167 + this.msgWarning(res.msg)
168 + }
169 + }).catch(err => {
170 + console.log(err)
171 + })
172 + },
173 + //导出
174 + downloadExcel() {
175 + this.open = true
176 + this.openStatus = 'downloadExcel'
177 + },
178 + //复选
179 + tableSelect(val) {
180 + this.checkData = val.selection
181 + },
182 + //全选
183 + tableSelectAll(val) {
184 + this.checkData = val
185 + },
186 + //分页
187 + currentChange(val) {
188 + this.selectionData.page = val.page
189 + this.selection()
190 + },
191 + //上传excel
192 + uploadExcel() {
193 + this.openStatus = 'uploadExcel'
194 + this.open = true
195 + },
196 + //下载模板
197 + downloadTempleate() {
198 + downLoadTemplate('goodsStation').then((res) => {
199 + if (res) {
200 + const blob = new Blob([res]);
201 + const link = document.createElement("a"); //创建a标签
202 + link.download = '黑名单货物品名模板.xlsx'; //a标签添加属性
203 + link.style.display = "none";
204 + link.href = URL.createObjectURL(blob);
205 + document.body.appendChild(link);
206 + link.click(); //执行下载
207 + URL.revokeObjectURL(link.href); //释放url
208 + document.body.removeChild(link); //释放标签
209 + } else {
210 + this.$message.error("下载失败");
211 + }
212 + })
213 + },
214 + handleRemove(file, fileList) {
215 + //清掉上传的文件
216 + this.errorData = [];
217 + this.fileList = [];
218 + },
219 + handleExceed(files) {
220 + //重复上传文件
221 + let file = {};
222 + file.file = files[0];
223 + file.name = files[0].name;
224 + this.fileList = [];
225 + this.fileList.push(file);
226 + this.uploadExcel(file);
227 + },
228 + selectLog() {
229 + this.$router.push({ name: 'GoodsUploadLog', params: { type: 2 } })
230 + },
231 + close() {
232 + this.open = false
233 + this.openStatus = ''
234 + this.selection(1)
235 + },
236 + resultClose() {
237 + this.resultOpen = false
238 + this.selection(1)
239 + }
240 + }
241 +}
242 +
243 +</script>
244 +
245 +<style lang="scss" scoped>
246 +
247 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%" 3 + <el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'"
4 - :close-on-click-modal="false" :show-close="false" append-to-body center> 4 + :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center
5 + @close="close">
5 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" 6 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> 7 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 <div v-if="openStatus == 'add'"> 8 <div v-if="openStatus == 'add'">
...@@ -15,28 +16,44 @@ ...@@ -15,28 +16,44 @@
15 </el-input> 16 </el-input>
16 </el-form-item> 17 </el-form-item>
17 </div> 18 </div>
18 - <div v-else> 19 + <div v-else-if="openStatus == 'downloadExcel'">
19 <el-form-item label="货站名称" prop="goodsStation"> 20 <el-form-item label="货站名称" prop="goodsStation">
20 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable 21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
21 :loading="goodsStationLoading" placeholder="不限"> 22 :loading="goodsStationLoading" placeholder="不限">
22 - <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" 23 + <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item">
23 - :key="item">
24 </el-option> 24 </el-option>
25 </el-select> 25 </el-select>
26 </el-form-item> 26 </el-form-item>
27 </div> 27 </div>
28 + <div v-else>
29 + <el-form-item label="货站名称" prop="uploadGoodsStation">
30 + <el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25" placeholder="请输入货站名称">
31 + </el-input>
32 + </el-form-item>
33 + <el-form-item prop="file" label-width="0px">
34 + <el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel"
35 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx"
36 + class="upload-demo">
37 + <el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button>
38 + </el-upload>
39 + </el-form-item>
40 + </div>
28 </el-form> 41 </el-form>
29 <div slot="footer" class="dialog-footer"> 42 <div slot="footer" class="dialog-footer">
30 - <el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button> 43 + <el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定
31 - <el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button> 44 + </el-button>
32 - <el-button @click="close">取 消</el-button> 45 + <el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading"
46 + @click="download">导出Excel</el-button>
47 + <el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel
48 + </el-button>
49 + <el-button style="margin-top:10px" size="small" @click="close">取 消</el-button>
33 </div> 50 </div>
34 </el-dialog> 51 </el-dialog>
35 </div> 52 </div>
36 </template> 53 </template>
37 54
38 <script> 55 <script>
39 -import { batchAddGoods, findStationName } from "@/api/goodsStation" 56 +import { batchAddGoods, findStationName, uploadGoodsExcel } from "@/api/goodsStation"
40 import { downLoadXlsx } from "@/utils/zipdownload"; 57 import { downLoadXlsx } from "@/utils/zipdownload";
41 58
42 export default { 59 export default {
...@@ -55,7 +72,9 @@ export default { ...@@ -55,7 +72,9 @@ export default {
55 return { 72 return {
56 formData: { 73 formData: {
57 goodsStation: null, 74 goodsStation: null,
58 - goodsList: '' 75 + uploadGoodsStation: null,
76 + goodsList: '',
77 + file: null
59 }, 78 },
60 goodsStationList: [], 79 goodsStationList: [],
61 rules: { 80 rules: {
...@@ -73,7 +92,23 @@ export default { ...@@ -73,7 +92,23 @@ export default {
73 trigger: "blur", 92 trigger: "blur",
74 }, 93 },
75 ], 94 ],
95 + uploadGoodsStation: [
96 + {
97 + required: true,
98 + message: "货站名称不能为空",
99 + trigger: "change",
100 + },
101 + ],
102 + file: [
103 + {
104 + required: true,
105 + message: "文件不能为空",
106 + trigger: "change",
107 + },
108 + ]
76 }, 109 },
110 + fileList: [],
111 + errorData: [],
77 goodsStationLoading: false, 112 goodsStationLoading: false,
78 downloading: false, 113 downloading: false,
79 loading: false, 114 loading: false,
...@@ -90,7 +125,7 @@ export default { ...@@ -90,7 +125,7 @@ export default {
90 //查询货站 125 //查询货站
91 getgoods() { 126 getgoods() {
92 this.goodsStationLoading = true 127 this.goodsStationLoading = true
93 - findStationName().then(res => { 128 + findStationName({ goodsType: 1 }).then(res => {
94 this.goodsStationLoading = false 129 this.goodsStationLoading = false
95 if (res.code === 200) { 130 if (res.code === 200) {
96 this.goodsStationList = res.data.list 131 this.goodsStationList = res.data.list
...@@ -104,11 +139,17 @@ export default { ...@@ -104,11 +139,17 @@ export default {
104 }, 139 },
105 //提交 140 //提交
106 submit() { 141 submit() {
107 - let obj = {} 142 + let obj = {
143 + goodsList: []
144 + }
108 obj.goodsStation = this.formData.goodsStation 145 obj.goodsStation = this.formData.goodsStation
109 this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";") 146 this.formData.goodsList = this.formData.goodsList.replace(/;/g, ";")
110 if (this.formData.goodsList != null && this.formData.goodsList != '') { 147 if (this.formData.goodsList != null && this.formData.goodsList != '') {
111 - obj.goodsList = this.formData.goodsList.split(';') 148 + this.formData.goodsList.split(';').forEach(item => {
149 + if (item != null && item != '') {
150 + obj.goodsList.push(item)
151 + }
152 + })
112 } 153 }
113 this.$refs['addForm'].validate(val => { 154 this.$refs['addForm'].validate(val => {
114 if (val) { 155 if (val) {
...@@ -128,13 +169,59 @@ export default { ...@@ -128,13 +169,59 @@ export default {
128 } 169 }
129 }) 170 })
130 }, 171 },
172 + //选择文件
173 + uploadExcel(option) {
174 + this.formData.file = option.file
175 + },
176 + //导入Excel
177 + upload() {
178 + this.loading = true
179 + if (this.formData.file != null && this.formData.file != '') {
180 + this.$refs['addForm'].validate(val => {
181 + if (val) {
182 + const file = this.formData.file;
183 + let goodsStation = this.formData.uploadGoodsStation
184 + uploadGoodsExcel(file, goodsStation).then((res) => {
185 + this.loading = false;
186 + if (res.code != 200) {
187 + if (res.code == 603) {
188 + this.$alert(res.msg, "提示", {
189 + confirmButtonText: "确定",
190 + type: "warning",
191 + });
192 + } else if (res.code === 201) {
193 + this.$message.warning(res.msg);
194 + if (res.data) {
195 + this.errorData = res.data;
196 + this.$router.push({ name: 'UpDateResult', query: { data: this.errorData, from: 'FlightInformationImport' } })
197 + }
198 + } else {
199 + this.$message.warning(res.msg);
200 + }
201 + } else {
202 + this.$message.success(res.msg);
203 + }
204 + setTimeout(() => {
205 + this.close()
206 + }, 1000);
207 + });
208 + } else {
209 + this.loading = false;
210 + }
211 + })
212 + } else {
213 + this.loading = false
214 + this.msgWarning('请选择文件后再导入!')
215 + }
216 +
217 + },
131 //导出Excel 218 //导出Excel
132 download() { 219 download() {
133 this.$refs['addForm'].validate(val => { 220 this.$refs['addForm'].validate(val => {
134 if (val) { 221 if (val) {
135 this.downloading = true 222 this.downloading = true
136 - let data = { goodsStation: this.formData.goodsStation } 223 + let data = { goodsStation: this.formData.goodsStation, goodsType: 1 }
137 - downLoadXlsx("/goods/exportGoods", data, "货站表") 224 + downLoadXlsx("/goods/exportGoods", data, "白名单货站表")
138 .then(() => { 225 .then(() => {
139 this.downloading = false 226 this.downloading = false
140 this.close() 227 this.close()
...@@ -146,12 +233,31 @@ export default { ...@@ -146,12 +233,31 @@ export default {
146 }) 233 })
147 234
148 }, 235 },
236 + handleRemove(file, fileList) {
237 + //清掉上传的文件
238 + this.errorData = [];
239 + this.fileList = [];
240 + this.formData.file = null
241 + },
242 + handleExceed(files) {
243 + //重复上传文件
244 + let file = {};
245 + file.file = files[0];
246 + file.name = files[0].name;
247 + this.fileList = [];
248 + this.fileList.push(file);
249 + this.formData.file = file
250 + this.uploadExcel(file);
251 + },
149 //取消 252 //取消
150 close() { 253 close() {
151 this.formData = { 254 this.formData = {
152 goodsStation: null, 255 goodsStation: null,
153 goodsList: null 256 goodsList: null
154 } 257 }
258 + if (this.openStatus == 'uploadExcel') {
259 + this.$refs['upload'].clearFiles()
260 + }
155 this.$refs["addForm"].clearValidate(); 261 this.$refs["addForm"].clearValidate();
156 this.$emit('close') 262 this.$emit('close')
157 } 263 }
...@@ -162,5 +268,15 @@ export default { ...@@ -162,5 +268,15 @@ export default {
162 </script> 268 </script>
163 269
164 <style lang="scss" scoped> 270 <style lang="scss" scoped>
271 +.upload-demo {
165 272
273 + .el-upload-list__item:first-child {
274 + margin-top: 5px !important;
275 + }
276 +
277 + .el-upload-list {
278 + display: inline-block;
279 + margin-left: 10px;
280 + }
281 +}
166 </style> 282 </style>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<template>
2 + <div style="padding:10px">
3 + <div style="margin-bottom:10px">
4 + <el-button type="primary" icon="el-icon-refresh" size="small" :loading="loading" @click="selectLog(1)">查 询
5 + </el-button>
6 + </div>
7 + <Tables ref="goodsLogStation" ductName="goodsLogStation" :data="logTabelData" :headerData="logTabelHeader"
8 + :selection="false" :order="true" :selectFixed="false" :loading="loading" :totalCount="logCount"
9 + :limitSize="logData.size" :page="logData.page" layout="total,prev, pager, next, jumper, ->"
10 + :pageSizes="[100]" :height="tableHeight" @currentChange="logCurrentChange">
11 + </Tables>
12 + </div>
13 +</template>
14 +
15 +<script>
16 +import { userImportLog } from "@/api/goodsStation"
17 +
18 +export default {
19 + name: 'GoodsUploadLog',
20 + data() {
21 + return {
22 + logData: {
23 + page: 1,
24 + size: 50
25 + },
26 + logTabelData: [],
27 + logTabelHeader: this.tableHeaders['goodsLogStation'],
28 + logCount: 0,
29 + tableHeight: null,
30 + loading: false,
31 + }
32 + },
33 + created() {
34 + this.selectLog()
35 + },
36 + watch: {
37 + $route(to, from) {
38 + if (to.name == 'GoodsUploadLog') {
39 + this.selectLog()
40 + }
41 + }
42 + },
43 + methods: {
44 + //日志查询
45 + selectLog(val) {
46 + this.logTabelData = []
47 + if (val === 1) {
48 + this.logData.page = 1
49 + }
50 + this.loading = true
51 + userImportLog(this.logData).then(res => {
52 + this.loading = false
53 + if (res.code === 200) {
54 + res.data.list.forEach(item => {
55 + if (this.$route.params.type == 1 && item.module == '白名单导入') {
56 + this.logTabelData.push(item)
57 + } else if (this.$route.params.type == 2 && item.module == '黑名单导入') {
58 + this.logTabelData.push(item)
59 + }
60 + })
61 + this.logCount = this.logTabelData.length
62 + } else {
63 + this.msgWarning(res.msg)
64 + }
65 + }).catch(err => {
66 + this.loading = false
67 + console.log(err)
68 + })
69 + },
70 + //日志分页
71 + logCurrentChange(val) {
72 + this.logData.page = val.page
73 + this.selectLog()
74 + },
75 + }
76 +}
77 +
78 +</script>
79 +
80 +<style lang="scss" scoped>
81 +
82 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -27,18 +27,17 @@ ...@@ -27,18 +27,17 @@
27 style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel"> 27 style="margin-left:10px" :disabled="checkData.length == 0" @click="batchDel">
28 删 除 28 删 除
29 </el-button> 29 </el-button>
30 - <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px" 30 + <el-button type="primary" icon="el-icon-download" size="small" style="margin-left:10px"
31 @click="downloadTempleate">下载模板 31 @click="downloadTempleate">下载模板
32 </el-button> 32 </el-button>
33 - <el-button icon="el-icon-download" type="primary" size="small" style="margin-right:10px" 33 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
34 @click="downloadExcel"> 34 @click="downloadExcel">
35 - 导出Excel 35 + 白名单导出
36 + </el-button>
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
38 + v-hasPermi="['base:goodsStation:add']">白名单导入</el-button>
39 + <el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
36 </el-button> 40 </el-button>
37 - <el-upload action="/goods/importGoods" name="file" :http-request="uploadExcel" :on-remove="handleRemove"
38 - :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" class="upload-demo"
39 - v-hasPermi="['base:goodsStation:add']">
40 - <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
41 - </el-upload>
42 </div> 41 </div>
43 <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" 42 <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
44 :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" 43 :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
...@@ -60,7 +59,7 @@ ...@@ -60,7 +59,7 @@
60 59
61 <script> 60 <script>
62 import { downLoadTemplate } from "@/api/flightInfoImport"; 61 import { downLoadTemplate } from "@/api/flightInfoImport";
63 -import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation" 62 +import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
64 import Dialog from './dialog.vue' 63 import Dialog from './dialog.vue'
65 64
66 export default { 65 export default {
...@@ -73,6 +72,7 @@ export default { ...@@ -73,6 +72,7 @@ export default {
73 selectionData: { 72 selectionData: {
74 goodsStation: '', 73 goodsStation: '',
75 goodsName: '', 74 goodsName: '',
75 + goodsType: 1,
76 size: 20, 76 size: 20,
77 page: 1 77 page: 1
78 }, 78 },
...@@ -189,29 +189,9 @@ export default { ...@@ -189,29 +189,9 @@ export default {
189 this.selection() 189 this.selection()
190 }, 190 },
191 //上传excel 191 //上传excel
192 - uploadExcel(option) { 192 + uploadExcel() {
193 - const file = option.file; 193 + this.openStatus = 'uploadExcel'
194 - this.loading = true; 194 + this.open = true
195 - importGoods(file, '').then((res) => {
196 - this.loading = false;
197 - if (res.code != 200) {
198 - if (res.code == 603) {
199 - this.$alert(res.msg, "提示", {
200 - confirmButtonText: "确定",
201 - type: "warning",
202 - });
203 - } else if (res.code === 201) {
204 - this.$message.warning(res.msg);
205 - this.errorData = res.data;
206 - this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
207 - } else {
208 - this.$message.warning(res.msg);
209 - }
210 - } else {
211 - this.$message.success(res.msg);
212 - this.selection(1)
213 - }
214 - });
215 }, 195 },
216 //下载模板 196 //下载模板
217 downloadTempleate() { 197 downloadTempleate() {
...@@ -219,7 +199,7 @@ export default { ...@@ -219,7 +199,7 @@ export default {
219 if (res) { 199 if (res) {
220 const blob = new Blob([res]); 200 const blob = new Blob([res]);
221 const link = document.createElement("a"); //创建a标签 201 const link = document.createElement("a"); //创建a标签
222 - link.download = '货物品名模板.xlsx'; //a标签添加属性 202 + link.download = '白名单货物品名模板.xlsx'; //a标签添加属性
223 link.style.display = "none"; 203 link.style.display = "none";
224 link.href = URL.createObjectURL(blob); 204 link.href = URL.createObjectURL(blob);
225 document.body.appendChild(link); 205 document.body.appendChild(link);
...@@ -245,6 +225,9 @@ export default { ...@@ -245,6 +225,9 @@ export default {
245 this.fileList.push(file); 225 this.fileList.push(file);
246 this.uploadExcel(file); 226 this.uploadExcel(file);
247 }, 227 },
228 + selectLog() {
229 + this.$router.push({ name: 'GoodsUploadLog', params: { type: 1 } })
230 + },
248 close() { 231 close() {
249 this.open = false 232 this.open = false
250 this.openStatus = '' 233 this.openStatus = ''
...@@ -260,16 +243,5 @@ export default { ...@@ -260,16 +243,5 @@ export default {
260 </script> 243 </script>
261 244
262 <style lang="scss" scoped> 245 <style lang="scss" scoped>
263 -.upload-demo {
264 - display: flex;
265 -
266 - .el-upload-list__item:first-child {
267 - margin-top: 5px !important;
268 - }
269 246
270 - .el-upload-list {
271 - display: inline-block;
272 - margin-left: 10px;
273 - }
274 -}
275 </style> 247 </style>
...\ No newline at end of file ...\ No newline at end of file
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" 3 <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 - append-to-body center> 4 + append-to-body center @close="close">
5 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" 5 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> 6 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 <el-form-item label="货站名称" prop="goodsStation"> 7 <el-form-item label="货站名称" prop="goodsStation">
8 <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> 8 <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
9 </el-input> 9 </el-input>
10 </el-form-item> 10 </el-form-item>
11 - <el-form-item label="航班" prop="flightList"> 11 + <el-form-item label="航班号" prop="flightList">
12 - <el-input type="textarea" v-model="flightList" rows="4" maxlength="125" placeholder="请输入航班,多个用“;”隔开"> 12 + <el-input type="textarea" v-model="flightList" rows="4" maxlength="125"
13 + placeholder="请输入航班号,多个用“;”隔开">
13 </el-input> 14 </el-input>
14 </el-form-item> 15 </el-form-item>
15 </el-form> 16 </el-form>
...@@ -62,11 +63,17 @@ export default { ...@@ -62,11 +63,17 @@ export default {
62 methods: { 63 methods: {
63 //提交 64 //提交
64 submit() { 65 submit() {
65 - let obj = {} 66 + let obj = {
67 + flightList: []
68 + }
66 obj.goodsStation = this.formData.goodsStation 69 obj.goodsStation = this.formData.goodsStation
67 if (this.formData.flightList != null && this.formData.flightList != '') { 70 if (this.formData.flightList != null && this.formData.flightList != '') {
68 this.formData.flightList = this.formData.flightList.toUpperCase() 71 this.formData.flightList = this.formData.flightList.toUpperCase()
69 - obj.flightList = this.formData.flightList.split(';') 72 + this.formData.flightList.split(';').forEach(item => {
73 + if (item != null && item != '') {
74 + obj.flightList.push(item)
75 + }
76 + })
70 } 77 }
71 this.$refs['addForm'].validate(val => { 78 this.$refs['addForm'].validate(val => {
72 if (val) { 79 if (val) {
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog title="查看日志" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false" 3 <el-dialog title="查看日志" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
4 - :show-close="false" :append-to-body="true" top="2vh"> 4 + :show-close="false" :append-to-body="true" top="2vh" @close="close">
5 <el-form class="form-header" label-position="right" label-width="auto" size="small"> 5 <el-form class="form-header" label-position="right" label-width="auto" size="small">
6 <el-row> 6 <el-row>
7 <el-col :span="4"> 7 <el-col :span="4">
......
This diff is collapsed. Click to expand it.
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 <el-row class="card2"> 44 <el-row class="card2">
45 <el-col :span="1" v-for="item in fltBox"> 45 <el-col :span="1" v-for="item in fltBox">
46 <div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })" 46 <div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
47 - :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }"> 47 + :style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
48 <div class="fltName">{{ item.fltNo }}</div> 48 <div class="fltName">{{ item.fltNo }}</div>
49 <div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }} 49 <div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
50 </div> 50 </div>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 @currentChange="currentChange" @rowClick="rowClick"> 59 @currentChange="currentChange" @rowClick="rowClick">
60 <template v-slot:percentage="scope"> 60 <template v-slot:percentage="scope">
61 <el-progress stroke-width="100" 61 <el-progress stroke-width="100"
62 - :color="(scope.row.percentage * 100).toFixed(2) >= 100 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'" 62 + :color="(scope.row.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
63 :stroke-width="18" 63 :stroke-width="18"
64 :percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))"> 64 :percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))">
65 </el-progress> 65 </el-progress>
......
1 <template> 1 <template>
2 - <div class="login" :style="display"> 2 + <div class="login">
3 <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> 3 <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
4 <h3 class="title">IMAC后台管理系统</h3> 4 <h3 class="title">IMAC后台管理系统</h3>
5 <el-form-item prop="username"> 5 <el-form-item prop="username">
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
13 <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" /> 13 <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
14 </el-input> 14 </el-input>
15 </el-form-item> 15 </el-form-item>
16 +
16 <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> --> 17 <!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox> -->
17 - <el-form-item style="width: 100%; marginTop: 44px"> 18 + <el-form-item style="width: 100%; marginTop: 65px">
18 <el-button :loading="loading" size="medium" type="primary" style="width: 100%" 19 <el-button :loading="loading" size="medium" type="primary" style="width: 100%"
19 @click.native.prevent="handleLogin"> 20 @click.native.prevent="handleLogin">
20 <span v-if="!loading">登 录</span> 21 <span v-if="!loading">登 录</span>
...@@ -30,9 +31,6 @@ ...@@ -30,9 +31,6 @@
30 </template> 31 </template>
31 32
32 <script> 33 <script>
33 -import { getCodeImg } from "@/api/login";
34 -//import Cookies from "js-cookie";
35 -import { encrypt } from "@/utils/jsencrypt";
36 34
37 export default { 35 export default {
38 name: "Login", 36 name: "Login",
...@@ -55,7 +53,6 @@ export default { ...@@ -55,7 +53,6 @@ export default {
55 }, 53 },
56 loading: false, 54 loading: false,
57 redirect: undefined, 55 redirect: undefined,
58 - display: "display:flex",
59 }; 56 };
60 }, 57 },
61 watch: { 58 watch: {
...@@ -63,8 +60,8 @@ export default { ...@@ -63,8 +60,8 @@ export default {
63 handler: function (route) { 60 handler: function (route) {
64 this.redirect = route.query && route.query.redirect; 61 this.redirect = route.query && route.query.redirect;
65 }, 62 },
66 - immediate: true 63 + immediate: true,
67 - } 64 + },
68 }, 65 },
69 created() { 66 created() {
70 this.getCookie(); 67 this.getCookie();
...@@ -101,12 +98,16 @@ export default { ...@@ -101,12 +98,16 @@ export default {
101 } 98 }
102 this.$store 99 this.$store
103 .dispatch("Login", this.loginForm) 100 .dispatch("Login", this.loginForm)
104 - .then(() => { 101 + .then(res => {
102 + this.loading = false;
103 + if (res.code != 200) {
104 + this.msgWarning(res.msg)
105 + }
105 this.$router.push({ path: this.redirect || "/" }).catch(() => { }); 106 this.$router.push({ path: this.redirect || "/" }).catch(() => { });
106 }) 107 })
107 - .catch(() => { 108 + .catch(err => {
108 this.loading = false; 109 this.loading = false;
109 - //this.getCode(); 110 + this.msgWarning(err)
110 }); 111 });
111 } 112 }
112 }); 113 });
......
1 +<template>
2 + <div style="margin: 20px">
3 + <el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row :gutter="10">
6 + <el-col :span="6">
7 + <el-form-item label="航班号">
8 + <el-input type="text" v-model="formData.fltNo" placeholder="请输入航班号"></el-input>
9 + </el-form-item>
10 + </el-col>
11 + <el-col :span="6">
12 + <el-form-item label="地区">
13 + <el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
14 + </el-form-item>
15 + </el-col>
16 + <el-col :span="4">
17 + <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
18 + @click="selection(1)">
19 + 查询</el-button>
20 + </el-col>
21 + </el-row>
22 + <el-row>
23 + <el-col :span="20">
24 + <el-row>
25 + <el-col :span="6">
26 + <el-form-item label="生效日期" prop="beginDate" :rules="rules">
27 + <el-date-picker class="formItem" v-model="formData.beginDate" type="date" placeholder="选择日期"
28 + value-format="yyyy-MM-dd" clearable>
29 + </el-date-picker>
30 + </el-form-item>
31 + </el-col>
32 + <el-col :span="12">
33 + <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
34 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
35 + accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
36 + :disabled="formData.beginDate == null">
37 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
38 + </el-button>
39 + </el-upload>
40 + </el-col>
41 + </el-row>
42 + </el-col>
43 + </el-row>
44 + </el-form>
45 + <div style="width:100%;display: flex;margin-bottom:10px">
46 + <!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
47 + 查询</el-button> -->
48 + <el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
49 + v-hasPermi="['base:flightImport:exportExcel']">
50 + 下载模板
51 + </el-button>
52 + </div>
53 + <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
54 + :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
55 + :totalCount="total" :loading="tableLoading" @currentChange="currentChange">">
56 + </Tables>
57 + </div>
58 +</template>
59 +
60 +<script>
61 +import {
62 + downLoadTemplate,
63 + importFlightDestination,
64 + searchFlightDestination
65 +} from "@/api/preMdeConfig";
66 +import settings from "@/settings"
67 +
68 +export default {
69 + name: "FlightToArea",
70 + data() {
71 + return {
72 + formData: {
73 + fltNo: null,
74 + area: null,
75 + beginDate: null,
76 + page: 1,
77 + },
78 + tableData: [],
79 + errorData: [],
80 + tableHeaders: this.tableHeaders['flightToArea'],
81 + tableHeight: null,
82 + total: 0,
83 + flightType: [],
84 + form: {
85 + type: "",
86 + region: "",
87 + },
88 + rules: {
89 + validator: (rule, value, callback) => {
90 + if (this.formData.beginDate == null) {
91 + callback(new Error('上传前请选择生效时间'))
92 + }
93 + },
94 + trigger: 'change'
95 + },
96 + fileList: [],
97 + tableLoading: false,
98 + };
99 + },
100 + created() {
101 + },
102 + mounted() {
103 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
104 + this.selection(1)
105 + },
106 + activated() {
107 + },
108 + methods: {
109 + selection(val) {
110 + this.tableData = []
111 + this.tableLoading = true
112 + if (val === 1) {
113 + this.formData.page = 1
114 + }
115 + let obj = {
116 + fltNo: this.formData.fltNo,
117 + area: this.formData.area,
118 + page: this.formData.page,
119 + size: 20
120 + }
121 + if (obj.area == '') {
122 + obj.area = null
123 + }
124 + searchFlightDestination(obj).then(res => {
125 + this.tableLoading = false
126 + if (res.code === 200) {
127 + this.tableData = res.data.list
128 + this.total = res.data.total
129 + }
130 + }).catch(err => {
131 + this.tableLoading = false
132 + console.log(err)
133 + })
134 + },
135 + downloadTempleate() {
136 + let downloadType = "flightDestination";
137 + let fileName = "航班目的地模板.xlsx";
138 + downLoadTemplate(downloadType).then((res) => {
139 + if (res) {
140 + const blob = new Blob([res]);
141 + const link = document.createElement("a"); //创建a标签
142 + link.download = fileName; //a标签添加属性
143 + link.style.display = "none";
144 + link.href = URL.createObjectURL(blob);
145 + document.body.appendChild(link);
146 + link.click(); //执行下载
147 + URL.revokeObjectURL(link.href); //释放url
148 + document.body.removeChild(link); //释放标签
149 + } else {
150 + this.$message.error("下载失败");
151 + }
152 + });
153 + },
154 + uploadExcel(option) {
155 + //上传excel
156 + const file = option.file;
157 + importFlightDestination(file, this.formData.beginDate).then((res) => {
158 + if (res.code != 200) {
159 + if (res.code == 603) {
160 + this.$alert(res.msg, "提示", {
161 + confirmButtonText: "确定",
162 + type: "warning",
163 + });
164 + } else if (res.code === 201) {
165 + this.msgWarning(res.msg);
166 + this.errorData = res.data;
167 + this.$router.push({ name: 'UpDateResult', query: { data: this.errorData, from: 'FlightToArea' } })
168 + } else {
169 + this.msgWarning(res.msg);
170 + }
171 + } else {
172 + this.msgSuccess("导入成功");
173 + this.selection(1)
174 + }
175 + });
176 + },
177 + handleRemove(file, fileList) {
178 + //清掉上传的文件
179 + this.fileList = [];
180 + this.selection()
181 + },
182 + handleExceed(files) {
183 + //重复上传文件
184 + let file = {};
185 + file.file = files[0];
186 + file.name = files[0].name;
187 + this.fileList = [];
188 + this.fileList.push(file);
189 + this.uploadExcel(file);
190 + },
191 + currentChange(val) {
192 + this.formData.page = val.page
193 + this.selection()
194 + },
195 + upload() {
196 + this.$refs.selectForm.validateField('beginDate')
197 + }
198 + },
199 +};
200 +</script>
201 +<style rel="stylesheet/scss" lang="scss">
202 +.upload-demo {
203 + display: flex;
204 + margin-left: 10px;
205 + float: none !important;
206 +}
207 +
208 +.el-upload-list {
209 + display: inline-block;
210 + margin-left: 10px;
211 + vertical-align: top;
212 +}
213 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form ref="preMdeSelectForm" class="form-header" label-position="right" label-width="auto" size="small"
4 + :model="formData">
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="区域">
8 + <el-select class="formItem" v-model="formData.regionArray" filterable multiple clearable
9 + placeholder="不限">
10 + <el-option v-for="item in selectData.region" :label="item" :value="item" :key="item">
11 + </el-option>
12 + </el-select>
13 + </el-form-item>
14 + </el-col>
15 + <el-col :span="6">
16 + <el-form-item label="地区">
17 + <el-select class="formItem" v-model="formData.areaArray" filterable multiple clearable
18 + placeholder="不限">
19 + <el-option v-for="item in selectData.area" :label="item" :value="item" :key="item">
20 + </el-option>
21 + </el-select>
22 + </el-form-item>
23 + </el-col>
24 + <el-col :span="6">
25 + <el-form-item label="申报类别">
26 + <el-select class="formItem" v-model="formData.typeName" filterable clearable placeholder="不限">
27 + <el-option v-for="item in selectData.declarationCategory" :label="item.chineseName"
28 + :value="item.chineseName" :key="item.id">
29 + </el-option>
30 + </el-select>
31 + </el-form-item>
32 + </el-col>
33 + <el-col :span="6">
34 + <el-form-item label="服务类型">
35 + <el-select class="formItem" v-model="formData.serviceTypeArray" filterable clearable
36 + placeholder="不限">
37 + <el-option v-for="item in selectData.serviceType" :label="item.chineseName"
38 + :value="item.chineseName" :key="item.id">
39 + </el-option>
40 + </el-select>
41 + </el-form-item>
42 + </el-col>
43 + </el-row>
44 + <el-row>
45 + <el-col :span="6">
46 + <el-form-item label="运单号">
47 + <el-input type="textarea" v-model="formData.waybillNo" class="formItem"
48 + placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
49 + </el-form-item>
50 + </el-col>
51 + <el-col :span="6">
52 + <el-form-item label="URSA">
53 + <el-input type="textarea" v-model="formData.ursa" class="formItem" placeholder="S_;P_;E2"
54 + :rows="4" clearable>
55 + </el-input>
56 + </el-form-item>
57 + </el-col>
58 + <el-col :span="6">
59 + <el-form-item label="站点">
60 + <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
61 + :rows="4" clearable>
62 + </el-input>
63 + </el-form-item>
64 + </el-col>
65 + <el-col :span="6">
66 + <el-form-item label="ACCS原航班日期">
67 + <el-date-picker class="formItem" type="daterange" v-model="accsDate" range-separator="至"
68 + start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
69 + </el-date-picker>
70 + </el-form-item>
71 + </el-col>
72 + </el-row>
73 + <el-row>
74 + <el-col :span="6">
75 + <el-form-item label="ACCS原航班号">
76 + <el-input type="text" class="formItem" v-model="formData.flightNo" placeholder="请输入航班号"
77 + clearable>
78 + </el-input>
79 + </el-form-item>
80 + </el-col>
81 + <el-col :span="6">
82 + <el-form-item label="ACCS航线">
83 + <el-input type="text" class="formItem" v-model="formData.flightRoute" placeholder="请输入航线"
84 + clearable>
85 + </el-input>
86 + </el-form-item>
87 + </el-col>
88 + </el-row>
89 + </el-form>
90 + <div class="ml20 mb20">
91 + <el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
92 + </el-button>
93 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
94 + :loading="downloading" @click="downloadExcel" v-hasPermi="['base:preMde:export']">
95 + 导出全部查询结果
96 + </el-button>
97 + <span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
98 + </div>
99 + <Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
100 + :selection="false" :order="true" :totalCount="totalCount" :pageSizes="[100]" :loading="tableLoading"
101 + :limitSize="formData.size" :height="tableHeight" @currentChange="currentChange">
102 + </Tables>
103 + </div>
104 +</template>
105 +
106 +<script>
107 +import {
108 + findDmPreMdeData,
109 + findDmPreMdeCondition
110 +} from "@/api/preMdeConfig";
111 +import { downLoadXlsx } from "@/utils/zipdownload";
112 +
113 +export default {
114 + name: 'PreMdeSelect',
115 + data() {
116 + return {
117 + formData: {
118 + regionArray: [],
119 + areaArray: [],
120 + serviceTypeArray: null,
121 + page: 1,
122 + size: 100,
123 + },
124 + selectData: {
125 + serviceType: [],
126 + declarationCategory: [],
127 + region: [],
128 + area: []
129 + },
130 + tableData: [],
131 + tableHeader: this.tableHeaders['preMdeSelect'],
132 + accsDate: [],
133 + valueFormat: "yyyy-MM-dd",
134 + tableHeight: null,
135 + tableLoading: false,
136 + downloading: false,
137 + totalCount: 0,
138 + }
139 + },
140 + created() {
141 + this.selectOptionData()
142 + },
143 + mounted() {
144 + this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
145 + this.select(0)
146 + },
147 + watch: {
148 + $route(to, from) {
149 + if (to.name == 'PreMdeSelect') {
150 + this.selection()
151 + }
152 + }
153 + },
154 + methods: {
155 + //查询条件
156 + selectOptionData() {
157 + findDmPreMdeCondition().then(res => {
158 + if (res.code == 200) {
159 + this.selectData = res.data
160 + } else {
161 + this.msgWarning(res.msg)
162 + }
163 + }).catch(err => {
164 + console.log(err)
165 + })
166 + },
167 + //查询
168 + select(val) {
169 + this.tableLoading = true
170 + let obj = JSON.parse(JSON.stringify(this.datainfo(this.formData)))
171 + if (this.accsDate != null && this.accsDate.length > 0) {
172 + obj.fltDateStart = this.accsDate[0]
173 + obj.fltDateEnd = this.accsDate[1]
174 + } else {
175 + obj.fltDateStart = null
176 + obj.fltDateEnd = null
177 + }
178 + findDmPreMdeData(obj).then(res => {
179 + this.tableLoading = false
180 + if (res.code == 200) {
181 + this.tableData = res.data.list
182 + this.totalCount = res.data.total
183 + } else {
184 + this.msgWarning(res.msg)
185 + }
186 + }).catch(err => {
187 + this.tableLoading = false
188 + console.log(err)
189 + })
190 + },
191 + //导出
192 + downloadExcel() {
193 + this.downloading = true
194 + let data = this.datainfo(this.formData)
195 + if (this.accsDate != null && this.accsDate.length > 0) {
196 + data.fltDateStart = this.accsDate[0]
197 + data.fltDateEnd = this.accsDate[1]
198 + } else {
199 + data.fltDateStart = null
200 + data.fltDateEnd = null
201 + }
202 + downLoadXlsx("/dmPreMde/excel", data, "Pre-MDE查询表")
203 + .then(() => {
204 + this.downloading = false
205 + })
206 + .catch(() => {
207 + this.downloading = false
208 + });
209 + },
210 + //数据处理
211 + datainfo(val) {
212 + if (val.ursa && val.ursa != null && val.ursa != '') {
213 + val.ursa = val.ursa.toUpperCase().replace(/;/g, ';')
214 + }
215 + if (val.siteName && val.siteName != null && val.siteName != '') {
216 + val.siteName = val.siteName.toUpperCase().replace(/;/g, ';')
217 + }
218 + if (val.flightNo && val.flightNo != null && val.flightNo != '') {
219 + val.flightNo = val.flightNo.toUpperCase()
220 + }
221 + if (val.flightRoute && val.flightRoute != null && val.flightRoute != '') {
222 + val.flightRoute = val.flightRoute.toUpperCase()
223 + }
224 + if (val.regionArray != null && val.regionArray.length == 0) {
225 + val.regionArray = null
226 + }
227 + if (val.areaArray != null && val.areaArray.length == 0) {
228 + val.areaArray = null
229 + }
230 + if (val.serviceTypeArray != null && val.serviceTypeArray.length == 0) {
231 + val.serviceTypeArray = null
232 + }
233 + return val
234 + },
235 + //翻页
236 + currentChange(val) {
237 + this.formData.page = val.page
238 + this.select()
239 + }
240 + }
241 +}
242 +</script>
243 +
244 +<style>
245 +
246 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 +<template>
2 + <div>
3 + <el-form ref="reportForm" class="form-header" :model="formData" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row>
6 + <el-col :span="4">
7 + <el-form-item label="取件日期">
8 + <el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
9 + value-format="yyyy-MM-dd" clearable>
10 + </el-date-picker>
11 + </el-form-item>
12 + </el-col>
13 + <el-col :span="5">
14 + <el-form-item label="区域">
15 + <el-select v-model="formData.regionArray" class="formItem" filterable multiple clearable
16 + placeholder="不限">
17 + <el-option v-for="item in selectOptionList.region" :label="item" :value="item" :key="item">
18 + </el-option>
19 + </el-select>
20 + </el-form-item>
21 + </el-col>
22 + <el-col :span="5">
23 + <el-form-item label="地区">
24 + <el-select v-model="formData.areaArray" class="formItem" filterable multiple clearable
25 + placeholder="不限">
26 + <el-option v-for="item in selectOptionList.area" :label="item" :value="item" :key="item">
27 + </el-option>
28 + </el-select>
29 + </el-form-item>
30 + </el-col>
31 + <el-col :span="5">
32 + <el-form-item label="URSA">
33 + <el-select v-model="formData.ursas" class="formItem" filterable multiple clearable placeholder="不限">
34 + <el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item" :key="item">
35 + </el-option>
36 + </el-select>
37 + </el-form-item>
38 + </el-col>
39 + <el-col :span="5">
40 + <el-form-item label="Service Type">
41 + <el-select v-model="formData.serviceTypeArray" class="formItem" filterable multiple clearable
42 + placeholder="不限">
43 + <el-option v-for="item in selectOptionList.serviceType" :label="item.chineseName"
44 + :value="item.chineseName" :key="item.id">
45 + </el-option>
46 + </el-select>
47 + </el-form-item>
48 + </el-col>
49 + </el-row>
50 + </el-form>
51 + <div class="ml20 mt20 mb20">
52 + <el-button type="primary" icon="el-icon-search" size="small" :loading="loading" @click="select(0)">查 询
53 + </el-button>
54 + </div>
55 + <div style="padding:10px">
56 + <el-form label-position="right" label-width="auto" size="small">
57 + <el-form-item label="类型">
58 + <el-radio-group v-model="formData.dimensionName" @change="typeChange">
59 + <el-radio label="region">区域</el-radio>
60 + <el-radio label="area">地区</el-radio>
61 + <el-radio label="ursa">URSA</el-radio>
62 + <el-radio label="serviceType">Service Type</el-radio>
63 + </el-radio-group>
64 + </el-form-item>
65 + </el-form>
66 + <div v-for="(item, index) in barChartData" :key="index">
67 + <Chart :className="'chart' + index.toString()" :chartData="item" height="350px" style="margin-bottom:10px"
68 + :loading="loading" />
69 + </div>
70 + </div>
71 + </div>
72 +</template>
73 +
74 +<script>
75 +import Chart from '@/components/echarts/echarts-series.vue'
76 +import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
77 +
78 +export default {
79 + components: {
80 + Chart
81 + },
82 + data() {
83 + return {
84 + formData: {
85 + ursas: [],
86 + serviceTypeArray: [],
87 + regionArray: [],
88 + areaArray: [],
89 + pickUpDate: null,
90 + dimensionName: 'region',
91 + },
92 + tableHeader: this.tableHeaders['report'],
93 + barChartData: [],
94 + selectOptionList: {
95 + ursaList: ["A_", "B_", "C_", "D_", "E_", "F_", "G_", "H_", "I_", "J_", "K_", "L_", "M_", "N_", "O_", "P_", "Q_", "R_", "S_", "T_", "U_", 'V_', "W_", "X_", "Y_", "Z_", '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_'],
96 + serviceType: [],
97 + region: [],
98 + area: [],
99 + },
100 + tableHeight: null,
101 + totalCount: 10,
102 + loading: false
103 + }
104 + },
105 + created() {
106 + this.formData.pickUpDate = this.nowDate()
107 + this.getOption()
108 + this.select()
109 + },
110 + activated() {
111 + this.select()
112 + },
113 + mounted() {
114 + this.tableHeight = window.innerHeight - this.$refs.reportForm.$el.offsetHeight - 240
115 + },
116 + methods: {
117 + getOption() {
118 + findDmPreMdeCondition().then(res => {
119 + if (res.code === 200) {
120 + this.selectOptionList.serviceType = res.data.serviceType
121 + this.selectOptionList.region = res.data.region
122 + this.selectOptionList.area = res.data.area
123 + } else {
124 + this.msgWarning(res.msg)
125 + }
126 + }).catch(err => {
127 + console.log(err)
128 + })
129 + },
130 + select(val) {
131 + this.loading = true
132 + let obj = {}
133 + if (this.formData.ursas.length > 0) {
134 + obj.ursas = this.formData.ursas
135 + } else {
136 + obj.ursas = null
137 + }
138 + if (this.formData.serviceTypeArray.length > 0) {
139 + obj.serviceTypeArray = this.formData.serviceTypeArray
140 + } else {
141 + obj.serviceTypeArray = null
142 + }
143 + if (this.formData.regionArray.length > 0) {
144 + obj.regionArray = this.formData.regionArray
145 + } else {
146 + obj.regionArray = null
147 + }
148 + if (this.formData.areaArray.length > 0) {
149 + obj.areaArray = this.formData.areaArray
150 + } else {
151 + obj.areaArray = null
152 + }
153 + obj.pickUpDate = this.formData.pickUpDate
154 + obj.dimensionName = this.formData.dimensionName
155 + findPreMdeReport(obj).then(res => {
156 + this.loading = false
157 + if (res.code === 200) {
158 + if (res.data.dimensionList && res.data.dimensionList.length > 0) {
159 + this.dataHandle(res.data.dimensionList, 8)
160 + } else {
161 + this.msgWarning('未查询到数据')
162 + }
163 + } else {
164 + this.msgWarning(res.msg)
165 + }
166 + }).catch(err => {
167 + this.loading = false
168 + console.log(err)
169 + })
170 + },
171 + typeChange(val) {
172 + this.select()
173 + },
174 + dataHandle(val, num) {
175 + this.barChartData = []
176 + let obj = {
177 + names: [],
178 + data1: [],
179 + data2: [],
180 + data3: []
181 + }
182 + val.forEach(item => {
183 + obj.names.push(item.name)
184 + obj.data1.push(item.totalPcs)
185 + obj.data2.push(item.total)
186 + obj.data3.push(item.totalWeight)
187 + })
188 + this.arrList(obj.names, num).forEach((item, index) => {
189 + let objItem = {
190 + names: [],
191 + data1: [],
192 + data2: [],
193 + data3: [],
194 + }
195 + objItem.names = item
196 + objItem.data1 = this.arrList(obj.data1, num)[index]
197 + objItem.data2 = this.arrList(obj.data2, num)[index]
198 + objItem.data3 = this.arrList(obj.data3, num)[index]
199 + this.barChartData.push(objItem)
200 + })
201 + },
202 + arrList(list, last) {
203 + let index = 0
204 + let arr = []
205 + if (list.length < last) {
206 + arr.push(list)
207 + } else {
208 + while (index < list.length) {
209 + arr.push(list.slice(index, index += last))
210 + index++
211 + }
212 + }
213 + return arr
214 + },
215 + currentChange(val) {
216 + this.formData.page = val.page
217 + this.select()
218 + }
219 + }
220 +
221 +}
222 +</script>
223 +
224 +<style></style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
4 <!-- <el-table-column label="行号" prop="line" width="50" align="center"> 4 <!-- <el-table-column label="行号" prop="line" width="50" align="center">
5 </el-table-column> --> 5 </el-table-column> -->
6 <el-table-column label="序号" type="index" width="70" align="center" /> 6 <el-table-column label="序号" type="index" width="70" align="center" />
7 + <el-table-column label="运单号" prop="waybillNo" width="150" v-if="fromRoute == 'queryCargo'" />
7 <el-table-column label="错误信息" prop="errorMessage"> 8 <el-table-column label="错误信息" prop="errorMessage">
8 <template slot-scope="scope"> 9 <template slot-scope="scope">
9 - {{scope.row}} 10 + <span v-if="fromRoute == 'queryCargo'">{{ scope.row.errorMessage }}</span>
11 + <span v-else> {{ scope.row }}</span>
10 <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key"> 12 <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key">
11 {{ m }} 13 {{ m }}
12 </div> --> 14 </div> -->
...@@ -31,17 +33,16 @@ export default { ...@@ -31,17 +33,16 @@ export default {
31 } 33 }
32 }, 34 },
33 created() { 35 created() {
34 - this.tableData = this.$route.params.data 36 + this.tableData = this.$route.query.data
35 - this.fromRoute = this.$route.params.from 37 + this.fromRoute = this.$route.query.from
36 }, 38 },
37 - wactch: { 39 + activated() {
38 - dialogVisible(val) { 40 + this.tableData = this.$route.query.data
39 - if (val) { 41 + this.fromRoute = this.$route.query.from
40 - }
41 - }
42 }, 42 },
43 methods: { 43 methods: {
44 close() { 44 close() {
45 + this.$store.dispatch('tagsView/delView', this.$route)
45 this.$store.state.tagsView.visitedViews.splice( 46 this.$store.state.tagsView.visitedViews.splice(
46 this.$store.state.tagsView.visitedViews.findIndex( 47 this.$store.state.tagsView.visitedViews.findIndex(
47 (item) => item.path === this.$route.path 48 (item) => item.path === this.$route.path
...@@ -53,6 +54,4 @@ export default { ...@@ -53,6 +54,4 @@ export default {
53 } 54 }
54 </script> 55 </script>
55 56
56 -<style lang="scss" scoped>
57 -
58 -</style>
...\ No newline at end of file ...\ No newline at end of file
57 +<style lang="scss" scoped></style>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<template>
2 + <div style="margin: 20px">
3 + <el-form ref="selectForm" :model="formData" class="form-header" label-position="right" label-width="auto"
4 + size="small">
5 + <el-row :gutter="10">
6 + <el-col :span="6">
7 + <el-form-item label="URSA">
8 + <el-input type="textarea" v-model="formData.ursa" placeholder="URSA之间用分号分隔,例:F2;F3;P_" rows="2">
9 + </el-input>
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="地区">
14 + <el-input type="text" v-model="formData.area" placeholder="请输入地区"></el-input>
15 + </el-form-item>
16 + </el-col>
17 + <el-col :span="4">
18 + <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading"
19 + @click="selection(1)">
20 + 查询</el-button>
21 + </el-col>
22 + </el-row>
23 + <el-row>
24 + <el-col :span="20">
25 + <el-row>
26 + <el-col :span="6">
27 + <el-form-item label="生效日期" prop="beginDate" :rules="rules">
28 + <el-date-picker class="formItem" v-model="formData.beginDate" type="date" placeholder="选择日期"
29 + value-format="yyyy-MM-dd" clearable>
30 + </el-date-picker>
31 + </el-form-item>
32 + </el-col>
33 + <el-col :span="12">
34 + <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
35 + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
36 + accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
37 + :disabled="formData.beginDate == null">
38 + <el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
39 + </el-button>
40 + </el-upload>
41 + </el-col>
42 + </el-row>
43 + </el-col>
44 + </el-row>
45 + </el-form>
46 + <div style="width:100%;display: flex;margin-bottom:10px">
47 + <!-- <el-button type="primary" size="small" icon="el-icon-search" :loading="tableLoading" @click="selection(1)">
48 + 查询</el-button> -->
49 + <el-button type="primary" icon="el-icon-download" size="small" @click="downloadTempleate"
50 + v-hasPermi="['base:flightImport:exportExcel']">
51 + 下载模板
52 + </el-button>
53 + </div>
54 + <Tables ref="flightToArea" ductName="flightToArea" :selection="false" :selectFixed="false" :order='true'
55 + :height="tableHeight" :data="tableData" :headerData="tableHeaders" :page="formData.page" :pageSizes="[20]"
56 + :totalCount="total" :loading="tableLoading" @currentChange="currentChange"
57 + layout="total,prev, pager, next, jumper, ->">
58 + </Tables>
59 + </div>
60 +</template>
61 +
62 +<script>
63 +import {
64 + downLoadTemplate,
65 + importUrsaDestination,
66 + searchUrsaDestination
67 +} from "@/api/preMdeConfig";
68 +import settings from "@/settings"
69 +
70 +export default {
71 + name: "UrsaToArea",
72 + data() {
73 + return {
74 + formData: {
75 + ursa: null,
76 + area: null,
77 + page: 1,
78 + },
79 + tableData: [],
80 + errorData: [],
81 + tableHeaders: this.tableHeaders['ursaToArea'],
82 + tableHeight: null,
83 + total: 0,
84 + flightType: [],
85 + form: {
86 + type: "",
87 + region: "",
88 + },
89 + rules: {
90 + validator: (rule, value, callback) => {
91 + if (this.formData.beginDate == null) {
92 + callback(new Error('上传前请选择生效时间'))
93 + }
94 + },
95 + trigger: 'change'
96 + },
97 + fileList: [],
98 + tableLoading: false,
99 + };
100 + },
101 + created() {
102 + },
103 + mounted() {
104 + this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
105 + this.selection(1)
106 + },
107 + activated() {
108 + },
109 + methods: {
110 + selection(val) {
111 + this.tableData = []
112 + this.tableLoading = true
113 + if (val === 1) {
114 + this.formData.page = 1
115 + }
116 + let obj = {
117 + area: this.formData.area,
118 + page: this.formData.page,
119 + size: 20
120 + }
121 + if (this.formData.ursa && this.formData.ursa != null && this.formData.ursa != '') {
122 + obj.ursa = this.formData.ursa.split(';')
123 + } else {
124 + obj.ursa = null
125 + }
126 + if (obj.area == '') {
127 + obj.area = null
128 + }
129 + searchUrsaDestination(obj).then(res => {
130 + this.tableLoading = false
131 + if (res.code === 200) {
132 + this.tableData = res.data.list
133 + this.total = res.data.total
134 + } else {
135 + this.msgWarning(res.msg)
136 + }
137 + }).catch(err => {
138 + this.tableLoading = false
139 + console.log(err)
140 + })
141 + },
142 + downloadTempleate() {
143 + let downloadType = "ursaDestination";
144 + let fileName = "URSA目的地模板.xlsx";
145 + downLoadTemplate(downloadType).then((res) => {
146 + if (res) {
147 + const blob = new Blob([res]);
148 + const link = document.createElement("a"); //创建a标签
149 + link.download = fileName; //a标签添加属性
150 + link.style.display = "none";
151 + link.href = URL.createObjectURL(blob);
152 + document.body.appendChild(link);
153 + link.click(); //执行下载
154 + URL.revokeObjectURL(link.href); //释放url
155 + document.body.removeChild(link); //释放标签
156 + } else {
157 + this.$message.error("下载失败");
158 + }
159 + });
160 + },
161 + uploadExcel(option) {
162 + //上传excel
163 + const file = option.file;
164 + importUrsaDestination(file, this.formData.beginDate).then((res) => {
165 + if (res.code != 200) {
166 + if (res.code == 603) {
167 + this.$alert(res.msg, "提示", {
168 + confirmButtonText: "确定",
169 + type: "warning",
170 + });
171 + } else if (res.code === 201) {
172 + this.msgWarning(res.msg);
173 + this.errorData = res.data;
174 + this.$router.push({ name: 'UpDateResult', query: { data: this.errorData, from: 'FlightInformationImport' } })
175 + } else {
176 + this.msgWarning(res.msg);
177 + }
178 + } else {
179 + this.msgSuccess("导入成功");
180 + this.selection(1)
181 + }
182 + });
183 + },
184 + handleRemove(file, fileList) {
185 + //清掉上传的文件
186 + this.fileList = [];
187 + this.selection()
188 + },
189 + handleExceed(files) {
190 + //重复上传文件
191 + let file = {};
192 + file.file = files[0];
193 + file.name = files[0].name;
194 + this.fileList = [];
195 + this.fileList.push(file);
196 + this.uploadExcel(file);
197 + },
198 + currentChange(val) {
199 + this.formData.page = val.page
200 + this.selection()
201 + },
202 + upload() {
203 + this.$refs.selectForm.validateField('beginDate')
204 + }
205 + },
206 +};
207 +</script>
208 +<style rel="stylesheet/scss" lang="scss">
209 +.upload-demo {
210 + display: flex;
211 + margin-left: 10px;
212 + float: none !important;
213 +}
214 +
215 +.el-upload-list {
216 + display: inline-block;
217 + margin-left: 10px;
218 + vertical-align: top;
219 +}
220 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog :title="title" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" 3 <el-dialog :title="title" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
4 - append-to-body center> 4 + @close="close" append-to-body center>
5 <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small" 5 <el-form ref="add" :model="newDictionary" label-width="auto" label-position="left" size="small"
6 :rules="rules" @submit.native.prevent> 6 :rules="rules" @submit.native.prevent>
7 <!-- 新增虚拟航班 --> 7 <!-- 新增虚拟航班 -->
...@@ -26,13 +26,16 @@ ...@@ -26,13 +26,16 @@
26 <div v-else-if="dictName == '航线'"> 26 <div v-else-if="dictName == '航线'">
27 <div v-if="status == 'add'"> 27 <div v-if="status == 'add'">
28 <el-form-item label="航班号" prop="fltNo"> 28 <el-form-item label="航班号" prop="fltNo">
29 - <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="50"> 29 + <el-input type="text" v-model="newDictionary.fltNo" placeholder="请输入航班号" maxlength="20">
30 </el-input> 30 </el-input>
31 </el-form-item> 31 </el-form-item>
32 <el-form-item label="航线" prop="route"> 32 <el-form-item label="航线" prop="route">
33 <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40"> 33 <el-input type="text" v-model="newDictionary.route" placeholder="请输入航线" maxlength="40">
34 </el-input> 34 </el-input>
35 </el-form-item> 35 </el-form-item>
36 + <el-form-item>
37 + <div style="color:#ff4949;line-height: 30px;">注意:此处不能添加虚拟航班!</div>
38 + </el-form-item>
36 </div> 39 </div>
37 <div v-else-if="status == 'sort'"> 40 <div v-else-if="status == 'sort'">
38 <el-form-item label="航班号" prop="fltNo"> 41 <el-form-item label="航班号" prop="fltNo">
...@@ -81,7 +84,8 @@ ...@@ -81,7 +84,8 @@
81 </template> 84 </template>
82 85
83 <script> 86 <script>
84 -import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, queryRoute, orderRoute } from '@/api/system/dictionary.js' 87 +import { addDict, addDictBatch, addServiceCodeBatch, addFlight, addRoute, orderRoute } from '@/api/system/dictionary.js'
88 +import { queryRouteByFltNo } from "@/api/destinationFlight"
85 89
86 export default { 90 export default {
87 props: { 91 props: {
...@@ -154,7 +158,7 @@ export default { ...@@ -154,7 +158,7 @@ export default {
154 } else if (this.status == 'sort') { 158 } else if (this.status == 'sort') {
155 this.newDictionary = this.addDictionary.serviceCodeKey 159 this.newDictionary = this.addDictionary.serviceCodeKey
156 this.title = '航线排序' 160 this.title = '航线排序'
157 - queryRoute({ fltNo: this.newDictionary.fltNo }).then(res => { 161 + queryRouteByFltNo({ fltNo: this.newDictionary.fltNo }).then(res => {
158 if (res.code === 200) { 162 if (res.code === 200) {
159 this.routeList = res.data.list 163 this.routeList = res.data.list
160 } else { 164 } else {
...@@ -377,4 +381,5 @@ export default { ...@@ -377,4 +381,5 @@ export default {
377 </script> 381 </script>
378 382
379 <style> 383 <style>
384 +
380 </style> 385 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
4 <!-- cardHeader --> 4 <!-- cardHeader -->
5 <div slot="header" class="clearfix"> 5 <div slot="header" class="clearfix">
6 <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' : 6 <span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
7 - tableName == 7 + tableName ==
8 - '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表" 8 + '虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
9 }}</span> 9 }}</span>
10 <div style="float: right; padding: 3px 0"> 10 <div style="float: right; padding: 3px 0">
11 <span class="selectLabel mr10">切换字典表</span> 11 <span class="selectLabel mr10">切换字典表</span>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
96 <template v-slot:fltNo="scope"> 96 <template v-slot:fltNo="scope">
97 <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })"> 97 <el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })">
98 {{ 98 {{
99 - scope.row.fltNo 99 + scope.row.fltNo
100 }}<i class="el-icon-link"></i> </el-link> 100 }}<i class="el-icon-link"></i> </el-link>
101 </template> 101 </template>
102 <template slot="optionColumn"> 102 <template slot="optionColumn">
...@@ -314,7 +314,6 @@ export default { ...@@ -314,7 +314,6 @@ export default {
314 }, 314 },
315 //修改 315 //修改
316 // upDate(val) { 316 // upDate(val) {
317 - // console.log(val)
318 // this.status = val.status 317 // this.status = val.status
319 // this.addDictionary = val.data 318 // this.addDictionary = val.data
320 // this.open = true 319 // this.open = true
......
1 +<template>
2 + <div class="menuDrawer">
3 + <el-dialog :title="drawerTitle" width="50%" :visible.sync="dialogVisible" :close-on-click-modal="false"
4 + :show-close="false" :append-to-body="true" @close="handleClose">
5 + <el-form ref="userForm" :model="menuForm" :disabled="menuFormDisabled" :rules="rules" label-width="auto"
6 + style="margin: 10px">
7 + <el-row>
8 + <el-col :span="12">
9 + <el-form-item label="菜单名称" prop="">
10 + <!-- <el-input
11 + placeholder="请输入权限名"
12 + :disabled="menuFormDisabled"
13 + v-model="menuData.userName"
14 + size="mini"
15 + ></el-input> -->
16 + </el-form-item>
17 + </el-col>
18 + <el-col :span="12">
19 + <el-form-item label="菜单路由" prop="">
20 + <!-- <el-input
21 + placeholder="请输入权限名"
22 + :disabled="menuFormDisabled"
23 + v-model="menuData.userName"
24 + size="mini"
25 + ></el-input> -->
26 + </el-form-item>
27 + </el-col>
28 + <el-col :span="12">
29 + <el-form-item label="组件名称" prop="">
30 + <!-- <el-input
31 + placeholder="请输入权限名"
32 + :disabled="menuFormDisabled"
33 + v-model="menuData.userName"
34 + size="mini"
35 + ></el-input> -->
36 + </el-form-item>
37 + </el-col>
38 + <el-col :span="24">
39 + <el-form-item label="菜单状态" prop="">
40 + <el-switch v-model="menuData.menuStatus" active-color="#13ce66" inactive-color="#ff4949"
41 + :disabled="menuFormDisabled"></el-switch>
42 + </el-form-item>
43 + </el-col>
44 + <el-col :span="24">
45 + <el-form-item label="图标选择" prop="">
46 + <iconSelect @selected="selected"></iconSelect>
47 + </el-form-item>
48 + </el-col>
49 + <el-col :span="24">
50 + <el-form-item label="权限设置" prop="">
51 + <el-col :span="6">
52 + <el-radio label="页面" size="medium"></el-radio>
53 + </el-col>
54 + <el-col :span="6">
55 + <el-radio label="按钮" size="medium"></el-radio>
56 + </el-col>
57 + <el-col :span="24">
58 + <el-card shadow="never">
59 + <el-input placeholder=""></el-input>
60 + </el-card>
61 + </el-col>
62 + </el-form-item>
63 + </el-col>
64 + </el-row>
65 + </el-form>
66 +
67 + <div slot="footer">
68 + <el-button @click="handleClose">取 消</el-button>
69 + <el-button type="primary" @click="submit">确 定</el-button>
70 + </div>
71 + </el-dialog>
72 + </div>
73 +</template>
74 +
75 +<script>
76 +import iconSelect from "@/components/IconSelect";
77 +export default {
78 + components: {
79 + iconSelect,
80 + },
81 + props: {
82 + drawerTitle: {
83 + type: String,
84 + default: "",
85 + },
86 + menuFormDisabled: {
87 + type: Boolean,
88 + default: false,
89 + },
90 + dialogVisible: {
91 + type: Boolean,
92 + default: false,
93 + },
94 + menuData: {
95 + type: Object,
96 + default: null,
97 + },
98 + },
99 + data() {
100 + return {
101 + menuForm: {},
102 + rules: {}
103 + };
104 + },
105 + updated() {
106 + this.menuForm = this.menuData;
107 + },
108 + watch: {
109 + dialogVisible(val, oldVal) {
110 + if (val) {
111 + this.menuForm = this.menuData;
112 + }
113 + }
114 + },
115 + methods: {
116 + handleClose() {
117 + this.$emit("handleClose", false);
118 + },
119 + selected(val) {
120 + console.log(val);
121 + },
122 + submit() { },
123 + },
124 +};
125 +</script>
126 +
127 +<style>
128 +
129 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -44,9 +44,13 @@ ...@@ -44,9 +44,13 @@
44 <script> 44 <script>
45 import { getAllAuth, updateStatus } from "@/api/system/user.js"; 45 import { getAllAuth, updateStatus } from "@/api/system/user.js";
46 import dictLabels from "@/assets/languages/dictLabels.js"; 46 import dictLabels from "@/assets/languages/dictLabels.js";
47 +import Drawer from "./drawer.vue";
47 48
48 export default { 49 export default {
49 name: "MenuConfig", 50 name: "MenuConfig",
51 + components: {
52 + Drawer,
53 + },
50 data() { 54 data() {
51 return { 55 return {
52 drawer: false, 56 drawer: false,
......
1 <template> 1 <template>
2 <div class="roleDrawer"> 2 <div class="roleDrawer">
3 <el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" destroy-on-close 3 <el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" destroy-on-close
4 - :close-on-click-modal="false" :wrapperClosable="false" :show-close="false"> 4 + :close-on-click-modal="false" :wrapperClosable="false" :show-close="false" @close="handleClose">
5 <el-form ref="roleForm" :model="roleForm" label-width="auto" :rules="rules" size="mini" style="margin: 10px" 5 <el-form ref="roleForm" :model="roleForm" label-width="auto" :rules="rules" size="mini" style="margin: 10px"
6 @submit.native.prevent> 6 @submit.native.prevent>
7 <el-row :gutter="10"> 7 <el-row :gutter="10">
...@@ -176,4 +176,5 @@ export default { ...@@ -176,4 +176,5 @@ export default {
176 </script> 176 </script>
177 177
178 <style> 178 <style>
179 +
179 </style> 180 </style>
...\ No newline at end of file ...\ No newline at end of file
......
This diff is collapsed. Click to expand it.
1 +<template>
2 + <div style="padding:20px 0">
3 + <el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px"
4 + @submit.native.prevent size="small">
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="发件人账号">
8 + <el-input type="textarea" v-model="selectionData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
9 + maxlength="50" rows="4" />
10 + </el-form-item>
11 + </el-col>
12 + </el-row>
13 + </el-form>
14 + <div style="margin-left:20px;margin-bottom:10px">
15 + <el-button icon="el-icon-search" type="primary" size="small" @click="selection(1)">查 询
16 + </el-button>
17 + <el-button v-hasPermi="['log:superAllocation:add']" icon="el-icon-plus" type="primary" size="small"
18 + @click="add">添 加
19 + </el-button>
20 + </div>
21 + <Tables ref="supserAllocation" ductName="supserAllocation" :data="tableData" :headerData="tableHeader"
22 + :selection="false" :order="true" :selectFixed="false" :pagination="true" :totalCount="totalCount"
23 + :loading="loading" :limitSize="selectionData.size" :page="selectionData.page"
24 + layout="total,prev, pager, next, jumper, ->" :pageSizes="[100]" :height="tableHeight"
25 + @currentChange="currentChange">
26 + <template slot="optionColumn">
27 + <el-table-column label="操作" width="250" align="center">
28 + <template slot-scope="scope">
29 + <el-button size="mini" type="text" v-if="scope.row.status != 0" icon="el-icon-edit"
30 + v-hasPermi="['log:superAllocation:update']" @click="update(scope.row, 'update')">修改
31 + </el-button>
32 + <el-button type="text" v-if="scope.row.status === 1" size="mini" icon="el-icon-video-pause"
33 + v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
34 + 停 用</el-button>
35 + <el-button type="text" v-if="scope.row.status === 0" size="mini" icon="el-icon-video-pause"
36 + v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
37 + 启 用</el-button>
38 + <el-button type="text" icon="el-icon-document-copy" size="mini"
39 + v-hasPermi="['log:superAllocation:copy']" @click="update(scope.row, 'copy')">复 制
40 + </el-button>
41 + <el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
42 + v-hasPermi="['log:superAllocation:delete']" @click="del(scope.row)">删除</el-button>
43 + </template>
44 + </el-table-column>
45 + </template>
46 + </Tables>
47 + <Dialog :dialogVisible="dialogVisible" :ruleData="ruleData" :status="dialogStatus" @close="close" />
48 + </div>
49 +</template>
50 +
51 +<script>
52 +import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById, getReleaseWeight } from "@/api/supserAllocation"
53 +import Dialog from './dialog.vue';
54 +
55 +export default {
56 + name: 'SuperAllocation',
57 + components: {
58 + Dialog
59 + },
60 + data() {
61 + return {
62 + selectionData: {
63 + shipperAccount: null,
64 + page: 1,
65 + size: 20,
66 + },
67 + tableData: [],
68 + tableHeader: this.tableHeaders['superAllocation'],
69 + ruleData: {
70 + classificationList: [],
71 + serviceCodeList: []
72 + },
73 + dialogStatus: 'add',
74 + tableHeight: null,
75 + totalCount: 0,
76 + dialogVisible: false,
77 + loading: false,
78 + }
79 + },
80 + created() {
81 + },
82 + mounted() {
83 + this.tableHeight = window.innerHeight - this.$refs.supserAllocation.$el.offsetHeight - 250
84 + this.selection(1)
85 + },
86 + methods: {
87 + //查询
88 + selection(val) {
89 + this.tableData = []
90 + this.loading = true
91 + if (val === 1) {
92 + this.selectionData.page = 1
93 + }
94 + queryShipperAccountRule(this.selectionData).then(res => {
95 + this.loading = false
96 + if (res.code === 200) {
97 + this.tableData = res.data.list
98 + this.totalCount = res.data.total
99 + } else {
100 + this.msgWarning(res.msg)
101 + }
102 + }).catch(err => {
103 + this.loading = false
104 + console.log(err)
105 + })
106 + },
107 + //新增
108 + add() {
109 + this.dialogStatus = 'add'
110 + this.dialogVisible = true
111 + },
112 + //修改
113 + update(val, status) {
114 + this.dialogStatus = status
115 + queryShipperAccountRuleById({ id: val.id }).then(res => {
116 + if (res.code === 200) {
117 + this.ruleData = res.data
118 + if (this.ruleData.classificationList == null || this.ruleData.classificationList.length < 1) {
119 + this.ruleData.classificationList = []
120 + }
121 + if (this.ruleData.serviceCodeList == null || this.ruleData.serviceCodeList.length < 1) {
122 + this.ruleData.serviceCodeList = []
123 + }
124 + if (status == 'copy') {
125 + this.ruleData.id = undefined
126 + }
127 + this.dialogVisible = true
128 + } else {
129 + this.msgWarning(res.msg)
130 + }
131 + }).catch(err => {
132 + console.log(err)
133 + })
134 + },
135 + //删除
136 + del(val) {
137 + getReleaseWeight({ id: val.id }).then(res => {
138 + if (res.code === 200) {
139 + this.$confirm(`是否要删除记录!预计释放舱位${res.data}`, "注意!", {
140 + confirmButtonText: "确定",
141 + cancelButtonText: '取消',
142 + type: "warning",
143 + }).then(() => {
144 + changeStatusById({ id: val.id, status: 2 }).then(res => {
145 + if (res.code === 200) {
146 + this.msgSuccess(`删除成功!已释放舱位${res.data}`)
147 + this.selection(1)
148 + } else {
149 + this.msgWarning(res.msg)
150 + }
151 + }).catch(err => {
152 + console.log(err)
153 + })
154 + }).catch(() => { })
155 + } else {
156 + this.msgWarning(res.code)
157 + }
158 + }).catch(err => {
159 + console.log(err)
160 + })
161 + },
162 + //停用启用
163 + changeStatus(val) {
164 + let status = 0
165 + let tip = ''
166 + if (val.status == 0) {
167 + status = 1
168 + tip = '启用'
169 + } else if (val.status == 1) {
170 + status = 0
171 + tip = '停用'
172 + }
173 + if (tip === "停用") {
174 + getReleaseWeight({ id: val.id }).then(res => {
175 + if (res.code === 200) {
176 + this.$confirm(`预计释放舱位为${res.data},是否确定!`, "注意!", {
177 + confirmButtonText: "确定",
178 + cancelButtonText: '取消',
179 + type: "warning",
180 + }).then(() => {
181 + this.statusChange({ id: val.id, status: status })
182 + }).catch(() => { })
183 + } else {
184 + this.msgWarning(res.msg)
185 + }
186 + }).catch(err => {
187 + console.log(err)
188 + })
189 + } else {
190 + this.$confirm(`是否要${tip}记录!`, "注意!", {
191 + confirmButtonText: "确定",
192 + cancelButtonText: '取消',
193 + type: "warning",
194 + }).then(() => {
195 + this.statusChange({ id: val.id, status: status })
196 + }).catch(() => { })
197 + }
198 + },
199 + //复制
200 + copy(val) {
201 + this.dialogStatus = 'copy'
202 + this.ruleData = JSON.parse(JSON.stringify(val))
203 + this.ruleData.id = undefined
204 + this.dialogVisible = true
205 + },
206 + //状态修改请求
207 + statusChange(val) {
208 + changeStatusById(val).then(res => {
209 + if (res.code === 200) {
210 + if (val.tip == '停用') {
211 + this.msgSuccess(`${val.tip}成功!已释放${res.data}`)
212 + } else {
213 + this.msgSuccess(`${val.tip}成功!`)
214 + }
215 + this.selection(1)
216 + } else {
217 + this.msgWarning(res.msg)
218 + }
219 + }).catch(err => {
220 + console.log(err)
221 + })
222 + },
223 + //关闭
224 + close() {
225 + this.dialogVisible = false
226 + this.ruleData = {}
227 + this.selection(1)
228 + },
229 + //翻页
230 + currentChange(val) {
231 + this.selectionData.page = val.page
232 + this.selection()
233 + },
234 + }
235 +}
236 +
237 +</script>
238 +
239 +<style lang="scss" scoped>
240 +
241 +</style>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <div class="userDrawer"> 2 <div class="userDrawer">
3 <el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" :close-on-click-modal="false" 3 <el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" :close-on-click-modal="false"
4 - :wrapperClosable="false" :show-close="false"> 4 + :wrapperClosable="false" :show-close="false" @close="handleClose">
5 <el-form ref="userForm" :model="userForm" label-width="auto" :rules="rules" style="margin: 10px" 5 <el-form ref="userForm" :model="userForm" label-width="auto" :rules="rules" style="margin: 10px"
6 @submit.native.prevent> 6 @submit.native.prevent>
7 <el-row :gutter="10"> 7 <el-row :gutter="10">
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
244 roleIds: [], 244 roleIds: [],
245 }; 245 };
246 this.clearValidate('userForm') 246 this.clearValidate('userForm')
247 - this.$emit("handleClose", false); 247 + this.$emit("handleClose");
248 }, 248 },
249 //提交 249 //提交
250 submit() { 250 submit() {
...@@ -276,4 +276,5 @@ export default { ...@@ -276,4 +276,5 @@ export default {
276 </script> 276 </script>
277 277
278 <style> 278 <style>
279 +
279 </style> 280 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
41 >修改密码</el-button 41 >修改密码</el-button
42 > --> 42 > -->
43 <el-button :type="scope.row.isValid == 1 ? 'warning' : 'primary'" size="mini" 43 <el-button :type="scope.row.isValid == 1 ? 'warning' : 'primary'" size="mini"
44 - v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ scope.row.isValid == 1 ? "停用" : "启用" 44 + v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{
45 + scope.row.isValid == 1 ? "停用" : "启用"
45 }}</el-button> 46 }}</el-button>
46 <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户 47 <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户
47 </el-button> 48 </el-button>
...@@ -236,7 +237,7 @@ export default { ...@@ -236,7 +237,7 @@ export default {
236 .catch(() => { }); 237 .catch(() => { });
237 }, 238 },
238 handleClose(val) { 239 handleClose(val) {
239 - this.drawer = val; 240 + this.drawer = false;
240 this.userData = {}; 241 this.userData = {};
241 this.selectUser(); 242 this.selectUser();
242 }, 243 },
...@@ -253,4 +254,5 @@ export default { ...@@ -253,4 +254,5 @@ export default {
253 </script> 254 </script>
254 255
255 <style> 256 <style>
257 +
256 </style> 258 </style>
...\ No newline at end of file ...\ No newline at end of file
......
1 +<template>
2 + <div>
3 + <el-form ref="archiveDataForm" class="form-header" :model="selectForm" label-width="auto" size="small"
4 + @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="操作时间">
8 + <el-date-picker class="formItem" v-model="selectForm.dateList" type="daterange"
9 + range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
10 + value-format="yyyy-MM-dd" clearable>
11 + </el-date-picker>
12 + </el-form-item>
13 + </el-col>
14 + </el-row>
15 + </el-form>
16 + <div class="ml20 mb20">
17 + <el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
18 + </el-button>
19 + </div>
20 + <Tables ref="archiveDataTables" ductName="archiveDataTables" :order="true" :border='true' :data="data"
21 + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
22 + :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[20]" :totalCount="total"
23 + :loading="loading" @currentChange="currentChange">
24 + <template v-slot:queryParameter="scope">
25 + <el-popover placement="top" width="350" trigger="hover">
26 + <ul style="height:300px;overflow-y:scroll;"
27 + v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
28 + <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')"
29 + :key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
30 + </ul>
31 + <el-button type="text" slot="reference">查 看</el-button>
32 + </el-popover>
33 + </template>
34 + <template v-slot:downloadPath="scope">
35 + <el-button v-if="scope.row.downloadPath != null && scope.row.status == 1" type="text" size="mini"
36 + icon="el-icon-download" @click="download(scope.row)">下载
37 + </el-button>
38 + <span v-else>暂无下载</span>
39 + </template>
40 + </Tables>
41 + </div>
42 +</template>
43 +
44 +<script>
45 +import { findArchiveCargoLog, isExistZip } from "@/api/system/logConfig.js";
46 +import { downLoadZip } from "@/utils/zipdownload";
47 +
48 +export default {
49 + data() {
50 + return {
51 + selectForm: {
52 + dateList: [],
53 + page: 1,
54 + size: 20
55 + },
56 + data: [],
57 + tableHeader: this.tableHeaders['archiveData'],
58 + tableHeight: null,
59 + total: 0,
60 + loading: false,
61 + }
62 + },
63 + created() {
64 + this.selectLog()
65 + },
66 + mounted() {
67 + this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
68 + },
69 + methods: {
70 + selectLog(val) {
71 + this.loading = true
72 + if (val == 1) {
73 + this.selectForm.page = 1
74 + }
75 + let obj = {}
76 + if (this.selectForm.dateList && this.selectForm.dateList.length > 0) {
77 + obj.createTimeStart = this.selectForm.dateList[0]
78 + obj.createTimeEnd = this.selectForm.dateList[1]
79 + }
80 + obj.page = this.selectForm.page
81 + obj.size = this.selectForm.size
82 + findArchiveCargoLog(obj).then(res => {
83 + this.loading = false
84 + if (res.code === 200) {
85 + this.data = res.data.list
86 + this.total = res.data.total
87 + } else {
88 + this.msgWarning(res.msg)
89 + }
90 + }).catch(err => {
91 + this.loading = true
92 + console.log(err)
93 + })
94 + },
95 + download(val) {
96 + isExistZip(val).then(res => {
97 + if (res.code === 200) {
98 + setTimeout(() => {
99 + let url = '/archiveCargoLog/downloadZip'
100 + let filename = val.packageName
101 + downLoadZip(url, val, filename)
102 + }, 500);
103 + } else {
104 + this.msgWarning(res.msg)
105 + }
106 + }).catch(err => {
107 + console.log(err)
108 + })
109 + },
110 + currentChange(val) {
111 + this.selectForm.page = val.page
112 + this.selectLog()
113 + }
114 + }
115 +}
116 +</script>
117 +
118 +<style lang="scss" scoped>
119 +
120 +</style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -69,12 +69,19 @@ ...@@ -69,12 +69,19 @@
69 </template> 69 </template>
70 <template v-slot:flightFltNo="scope"> 70 <template v-slot:flightFltNo="scope">
71 <el-link v-if="scope.row.allocDimId" type="primary" 71 <el-link v-if="scope.row.allocDimId" type="primary"
72 - @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1 } })"> 72 + @click="$router.push({ name: 'FlightAllocConfigInfo', params: { id: scope.row.allocDimId, handle: 'detail', fltNo: scope.row.flightFltNo, fltDate: scope.row.flightFltDate ? scope.row.flightFltDate : ' ', routeStatus: 'dmLog', route: scope.row.currentFlightRoute ? scope.row.currentFlightRoute : ' ', status: ' ', createStatus: 1, } })">
73 {{ 73 {{
74 scope.row.flightFltNo 74 scope.row.flightFltNo
75 }}<i class="el-icon-link"></i> </el-link> 75 }}<i class="el-icon-link"></i> </el-link>
76 <span v-else>{{ scope.row.flightFltNo }}</span> 76 <span v-else>{{ scope.row.flightFltNo }}</span>
77 </template> 77 </template>
78 + <template v-slot:remarksDetail="scope">
79 + <span v-if="scope.row.remarksDetail == null || scope.row.remarksDetail == ''">{{ scope.row.remarksDetail
80 + }}</span>
81 + <div v-else>
82 + <div v-for="item in scope.row.remarksDetail.split('\\r\\n')">{{ item }}</div>
83 + </div>
84 + </template>
78 </Tables> 85 </Tables>
79 </div> 86 </div>
80 </template> 87 </template>
...@@ -137,7 +144,7 @@ export default { ...@@ -137,7 +144,7 @@ export default {
137 getDmDataList(this.selectForm).then((res) => { 144 getDmDataList(this.selectForm).then((res) => {
138 this.loading = false; 145 this.loading = false;
139 if (res.code === 200) { 146 if (res.code === 200) {
140 - this.total = res.data.total; 147 + this.total = res.data.total
141 if (res.data.total === 0) { 148 if (res.data.total === 0) {
142 this.msgWarning('未查询到数据') 149 this.msgWarning('未查询到数据')
143 } else { 150 } else {
......
...@@ -64,6 +64,7 @@ export default { ...@@ -64,6 +64,7 @@ export default {
64 }, 64 },
65 //返回 65 //返回
66 close() { 66 close() {
67 + this.$store.dispatch('tagsView/delView', this.$route)
67 this.$store.state.tagsView.visitedViews.splice( 68 this.$store.state.tagsView.visitedViews.splice(
68 this.$store.state.tagsView.visitedViews.findIndex( 69 this.$store.state.tagsView.visitedViews.findIndex(
69 (item) => item.path === this.$route.path 70 (item) => item.path === this.$route.path
......
1 +<template>
2 + <div>
3 + <el-form ref="operationLogForm" class="form-header" :model="selectForm" label-width="auto" size="small"
4 + @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
7 + <el-form-item label="功能模块">
8 + <el-select v-model="selectForm.module" class="formItem" placeholder="不限" clearable>
9 + <el-option v-for="item in moduleList" :label="item" :value="item" :key="item"></el-option>
10 + </el-select>
11 + </el-form-item>
12 + </el-col>
13 + <el-col :span="6">
14 + <el-form-item label="操作描述">
15 + <el-input v-model="selectForm.describe" class="formItem" placeholder="请输入操作描述" clearable>
16 + </el-input>
17 + </el-form-item>
18 + </el-col>
19 + <el-col :span="6">
20 + <el-form-item label="操作人">
21 + <el-input v-model="selectForm.userName" class="formItem" placeholder="请输入操作人" clearable>
22 + </el-input>
23 + </el-form-item>
24 + </el-col>
25 + <el-col :span="6">
26 + <el-form-item label="操作时间">
27 + <el-date-picker class="formItem" v-model="dateList" type="daterange" range-separator="至"
28 + start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
29 + </el-date-picker>
30 + </el-form-item>
31 + </el-col>
32 + </el-row>
33 + </el-form>
34 + <div class="ml20 mb20">
35 + <el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
36 + </el-button>
37 + </div>
38 + <Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data"
39 + :headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false" :height="tableHeight"
40 + :page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total"
41 + :loading="loading" @currentChange="currentChange">
42 + <template v-slot:result="scope">
43 + <span>
44 + {{ scope.row.result != null && typeof JSON.parse(scope.row.result) == 'object' ?
45 + JSON.parse(scope.row.result).msg :
46 + scope.row.result
47 + }}
48 + </span>
49 + </template>
50 + <template v-slot:remark="scope">
51 + <!-- <el-popover placement="top" width="400" trigger="hover"
52 + v-if="scope.row.remark != null && scope.row.remark != ''">
53 + <ul style="height:300px;overflow-y:scroll;">
54 + <li v-for="(item, index) in scope.row.remark.split('\n')" :key="index"
55 + style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
56 + </ul>
57 + <el-button type="text" slot="reference">查 看</el-button>
58 + </el-popover> -->
59 + <div>
60 + {{ scope.row.remark }}
61 + </div>
62 + </template>
63 + <template v-slot:requestParameters="scope">
64 + <el-popover placement="top" width="400" trigger="hover"
65 + v-if="scope.row.requestParameters != null && scope.row.requestParameters != ''">
66 + <ul style="height:300px;overflow-y:scroll;">
67 + <li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.requestParameters)).split(',')"
68 + :key="index" style="border-bottom:1px solid #E4E7ED;margin-bottom:5px">{{ item }}</li>
69 + </ul>
70 + <el-button type="text" slot="reference">查 看</el-button>
71 + </el-popover>
72 + </template>
73 + </Tables>
74 + </div>
75 +</template>
76 +
77 +<script>
78 +import { findModuleCondition, getSystemOperationLogData } from "@/api/system/logConfig.js";
79 +
80 +export default {
81 + name: 'OperationLog',
82 + data() {
83 + return {
84 + selectForm: {
85 + module: null,
86 + describe: null,
87 + userName: null,
88 + page: 1,
89 + size: 100
90 + },
91 + data: [],
92 + tableHeader: this.tableHeaders['operationLog'],
93 + moduleList: [],
94 + dateList: [],
95 + defaultProps: {
96 + children: 'children',
97 + label: 'label'
98 + },
99 + tableHeight: null,
100 + total: 0,
101 + loading: false
102 + }
103 + },
104 + created() {
105 + this.getModule()
106 + this.selectLog(1)
107 + },
108 + activated() {
109 + this.selectLog();
110 + },
111 + mounted() {
112 + this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
113 + },
114 + methods: {
115 + getModule() {
116 + findModuleCondition().then(res => {
117 + if (res.code === 200) {
118 + this.moduleList = res.data.module
119 + } else {
120 + this.msgWarning(res.msg)
121 + }
122 + }).catch(err => {
123 + console.log(err)
124 + })
125 + },
126 + selectLog(val) {
127 + this.loading = true
128 + this.data = []
129 + if (val == 1) {
130 + this.selectForm.page = 1
131 + }
132 + let obj = {}
133 + obj.module = this.selectForm.module
134 + if (this.dateList && this.dateList.length > 0) {
135 + obj.createTimeStart = this.dateList[0]
136 + obj.createTimeEnd = this.dateList[1]
137 + } else {
138 + obj.createTimeStart = null
139 + obj.createTimeEnd = null
140 + }
141 + obj.describe = this.selectForm.describe
142 + obj.userName = this.selectForm.userName
143 + obj.page = this.selectForm.page
144 + obj.size = this.selectForm.size
145 + getSystemOperationLogData(obj).then(res => {
146 + this.loading = false
147 + if (res.code === 200) {
148 + this.data = res.data.list
149 + this.total = res.data.total
150 + } else {
151 + this.msgWarning(res.msg)
152 + }
153 + }).catch(err => {
154 + this.loading = false
155 + console.log(err)
156 + })
157 + },
158 + currentChange(val) {
159 + this.selectForm.page = val.page
160 + this.selectLog()
161 + }
162 + }
163 +}
164 +
165 +</script>
166 +
167 +<style lang="scss" scoped>
168 +
169 +</style>
...\ No newline at end of file ...\ No newline at end of file