Elements-SY

modify

...@@ -143,15 +143,9 @@ export function delFlight(data) { ...@@ -143,15 +143,9 @@ export function delFlight(data) {
143 143
144 //查询航线 144 //查询航线
145 /** 145 /**
146 -<<<<<<< HEAD
147 * @param fltNo 航班号 146 * @param fltNo 航班号
148 * @param page 页数 147 * @param page 页数
149 * @param size 页长 148 * @param size 页长
150 -=======
151 - * @param fltNo 航班号
152 - * @param page 页数
153 - * @param size 页长
154 ->>>>>>> test
155 */ 149 */
156 export function queryRoute(data) { 150 export function queryRoute(data) {
157 return request({ 151 return request({
...@@ -211,3 +205,11 @@ export function checkFlightRoute(data) { ...@@ -211,3 +205,11 @@ export function checkFlightRoute(data) {
211 }) 205 })
212 } 206 }
213 207
208 +//更新航线
209 +export function updateRoute(data) {
210 + return request({
211 + url: `/dictionary/updateRoute`,
212 + method: "post",
213 + data: data,
214 + });
215 +}
......
...@@ -418,8 +418,11 @@ export default { ...@@ -418,8 +418,11 @@ export default {
418 418
419 <style lang="scss"> 419 <style lang="scss">
420 .tablePagination { 420 .tablePagination {
421 - margin-top: 10px;
422 text-align: right; 421 text-align: right;
422 + height: 25px;
423 + margin-bottom: 10px;
424 + margin-top: 15px;
425 + padding: 10px 20px !important;
423 } 426 }
424 427
425 .w-table { 428 .w-table {
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 <sidebar class="sidebar-container" 4 <sidebar class="sidebar-container"
5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 <div :class="{ hasTagsView: needTagsView }" class="main-container"> 6 <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 - <div :class="{ 'fixed-header': fixedHeader }" ref="headerRef"> 7 + <div class="headerRef" :class="{ 'fixed-header': fixedHeader }" ref="headerRef">
8 <navbar /> 8 <navbar />
9 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
10 </div> 10 </div>
11 - <app-main /> 11 + <app-main ref="appMainBlock" />
12 <right-panel v-if="false"> 12 <right-panel v-if="false">
13 <settings /> 13 <settings />
14 </right-panel> 14 </right-panel>
......
...@@ -23,10 +23,10 @@ export default { ...@@ -23,10 +23,10 @@ export default {
23 if (isMobile) { 23 if (isMobile) {
24 store.dispatch("app/toggleDevice", "mobile"); 24 store.dispatch("app/toggleDevice", "mobile");
25 store.dispatch("app/closeSideBar", { withoutAnimation: true }); 25 store.dispatch("app/closeSideBar", { withoutAnimation: true });
26 - } 26 + };
27 - this.$nextTick(()=>{ 27 + this.$nextTick(() => {
28 this.getBlockCurrentHeight(); 28 this.getBlockCurrentHeight();
29 - }) 29 + });
30 }, 30 },
31 methods: { 31 methods: {
32 // use $_ for mixins properties 32 // use $_ for mixins properties
...@@ -45,5 +45,11 @@ export default { ...@@ -45,5 +45,11 @@ export default {
45 } 45 }
46 } 46 }
47 }, 47 },
48 + getBlockCurrentHeight() {
49 + let appHeaderHeight = this.$refs.headerRef.clientHeight;
50 + let appMainHeight = this.$refs.appMainBlock.$el.clientHeight;
51 + this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight);
52 + this.$store.dispatch("app/setAppMainBlockCH", appMainHeight);
53 + },
48 }, 54 },
49 }; 55 };
......
...@@ -10,6 +10,8 @@ const state = { ...@@ -10,6 +10,8 @@ const state = {
10 device: "desktop", 10 device: "desktop",
11 //size: Cookies.get('size') || 'medium' 11 //size: Cookies.get('size') || 'medium'
12 size: localStorage.getItem("size") || "medium", 12 size: localStorage.getItem("size") || "medium",
13 + headerBlockClientHeight: null,
14 + appMainBlockClientHeight: null,
13 }; 15 };
14 16
15 const mutations = { 17 const mutations = {
...@@ -41,8 +43,10 @@ const mutations = { ...@@ -41,8 +43,10 @@ const mutations = {
41 SET_APPHEADERBLOCKCH: (state, height) => { 43 SET_APPHEADERBLOCKCH: (state, height) => {
42 state.headerBlockClientHeight = height; 44 state.headerBlockClientHeight = height;
43 }, 45 },
46 + SET_APPMAINBLOCKCH: (state, height) => {
47 + state.appMainBlockClientHeight = height;
48 + },
44 } 49 }
45 -
46 const actions = { 50 const actions = {
47 toggleSideBar({ commit }) { 51 toggleSideBar({ commit }) {
48 commit("TOGGLE_SIDEBAR"); 52 commit("TOGGLE_SIDEBAR");
...@@ -56,6 +60,12 @@ const actions = { ...@@ -56,6 +60,12 @@ const actions = {
56 setSize({ commit }, size) { 60 setSize({ commit }, size) {
57 commit("SET_SIZE", size); 61 commit("SET_SIZE", size);
58 }, 62 },
63 + setAppHeaderBlockCH({ commit }, height) {
64 + commit("SET_APPHEADERBLOCKCH", height);
65 + },
66 + setAppMainBlockCH({ commit }, height) {
67 + commit("SET_APPMAINBLOCKCH", height);
68 + },
59 }; 69 };
60 70
61 export default { 71 export default {
......
...@@ -416,7 +416,8 @@ function getPropertyValue(el) { ...@@ -416,7 +416,8 @@ function getPropertyValue(el) {
416 ); 416 );
417 } 417 }
418 418
419 -// 获取页面内除了table其他模块所占的高 419 +// 获取页面内除了table其他模块所占的高,
420 +// 以及margin-top margin-bottom padding-top padding-bottom
420 export function restTableHeight($refs) { 421 export function restTableHeight($refs) {
421 let heigth = 0; 422 let heigth = 0;
422 Object.keys($refs).map((key) => { 423 Object.keys($refs).map((key) => {
...@@ -448,5 +449,7 @@ export function restTableHeight($refs) { ...@@ -448,5 +449,7 @@ export function restTableHeight($refs) {
448 heigth += getPropertyValue($refs[key]); 449 heigth += getPropertyValue($refs[key]);
449 } 450 }
450 }); 451 });
451 - return heigth; 452 + // 右边栏top-header全局组件的高
453 + let topHeaderClientHeight = document.querySelector(".headerRef").clientHeight;
454 + return heigth + topHeaderClientHeight;
452 } 455 }
......
...@@ -674,7 +674,6 @@ export default { ...@@ -674,7 +674,6 @@ export default {
674 } else { 674 } else {
675 obj.route = this.$route.params.route ? this.$route.params.route : '' 675 obj.route = this.$route.params.route ? this.$route.params.route : ''
676 } 676 }
677 -
678 this.getRouteDimension(obj) 677 this.getRouteDimension(obj)
679 } 678 }
680 } 679 }
...@@ -691,7 +690,7 @@ export default { ...@@ -691,7 +690,7 @@ export default {
691 }, 690 },
692 activated() { 691 activated() {
693 this.routeSatus = this.$route.params.routeStatus 692 this.routeSatus = this.$route.params.routeStatus
694 - if (!this.$route.params.createStatus) { 693 + if (!this.$route.params.createStatus && this.$route.params.createStatus !== undefined) {
695 if (this.$route.params.handle == 'add') { 694 if (this.$route.params.handle == 'add') {
696 if (this.infoForm.fltNo && this.infoForm.fltNo != null && this.infoForm.fltNo != '') { 695 if (this.infoForm.fltNo && this.infoForm.fltNo != null && this.infoForm.fltNo != '') {
697 this.getRoutes(this.infoForm.fltNo) 696 this.getRoutes(this.infoForm.fltNo)
...@@ -715,7 +714,6 @@ export default { ...@@ -715,7 +714,6 @@ export default {
715 } else { 714 } else {
716 obj.route = this.$route.params.route ? this.$route.params.route : '' 715 obj.route = this.$route.params.route ? this.$route.params.route : ''
717 } 716 }
718 -
719 this.getRouteDimension(obj) 717 this.getRouteDimension(obj)
720 } 718 }
721 } 719 }
...@@ -776,11 +774,14 @@ export default { ...@@ -776,11 +774,14 @@ export default {
776 this.infoForm.list = [] 774 this.infoForm.list = []
777 let obj = { 775 let obj = {
778 purposeOfFlightNo: val.fltNo, 776 purposeOfFlightNo: val.fltNo,
779 - flightDate: val.fltDate, 777 + flightDate: val.fltDate, //
780 flightRoute: val.route, 778 flightRoute: val.route,
781 flightRouteListStr: val.flightRouteListStr, 779 flightRouteListStr: val.flightRouteListStr,
782 status: val.status ? val.status : '' 780 status: val.status ? val.status : ''
783 } 781 }
782 + if(this.$route.params.handle == "updated"){
783 + delete obj.flightRoute
784 + }
784 if (this.$route.params.handle != 'add') { 785 if (this.$route.params.handle != 'add') {
785 findDestinationFltRuleByFlightNo(obj).then(res => { 786 findDestinationFltRuleByFlightNo(obj).then(res => {
786 if (res.code === 200) { 787 if (res.code === 200) {
...@@ -841,7 +842,8 @@ export default { ...@@ -841,7 +842,8 @@ export default {
841 } 842 }
842 }) 843 })
843 } 844 }
844 - } else { 845 + }
846 + else {
845 //未请求到数据 847 //未请求到数据
846 if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') { 848 if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
847 let params = { 849 let params = {
...@@ -977,13 +979,41 @@ export default { ...@@ -977,13 +979,41 @@ export default {
977 console.log(err) 979 console.log(err)
978 }) 980 })
979 } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') { 981 } else if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
980 - this.routeList.forEach((route) => { 982 + let query = {
983 + purposeOfFlightNo: val.fltNo,
984 + flightRoute: val.route,
985 + flightRouteListStr: val.flightRouteListStr,
986 + status: val.status ? val.status : ''
987 + }
988 + //航班类型Purple Tail展示全部航线维度
989 + findDestinationFltRuleByFlightNo(query).then(result => {
990 + const { code, data } = result;
991 + if(code == 200){
992 + this.routeList = data.routeList;
993 + let routesStatus = 1
994 + if(data.routeList.length){
995 + this.routeList.forEach(route => {
996 + data.list.forEach(item => {
997 + if (route.route === item.flightRoute) {
998 + routesStatus = 2
999 + // item.id = undefined
1000 + // item.status = undefined
1001 + // item.flightRoute = this.infoForm.route
1002 + // item.routePriority = route.routePriority
1003 + this.infoForm.list.push(this.dataHandle(item))
1004 + }
1005 + })
1006 + if (routesStatus == 1) {
981 this.infoForm.list.push({ 1007 this.infoForm.list.push({
982 purposeOfFlightNo: this.infoForm.fltNo, 1008 purposeOfFlightNo: this.infoForm.fltNo,
983 ruleDate: this.infoForm.fltDate, 1009 ruleDate: this.infoForm.fltDate,
984 flightRoute: route.route, 1010 flightRoute: route.route,
985 routePriority: route.routePriority, 1011 routePriority: route.routePriority,
986 }) 1012 })
1013 + }
1014 + })
1015 + }
1016 + }
987 }) 1017 })
988 } 1018 }
989 } 1019 }
......
...@@ -42,24 +42,24 @@ ...@@ -42,24 +42,24 @@
42 <el-col :span="6"> 42 <el-col :span="6">
43 <el-form-item label="运单号"> 43 <el-form-item label="运单号">
44 <el-input ref='userInfo' type="textarea" v-model="formData.waybillNo" class="formItem" 44 <el-input ref='userInfo' type="textarea" v-model="formData.waybillNo" class="formItem"
45 - placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input> 45 + placeholder="请输入运单号(回车间隔)" :rows="1" :maxlength="12000" clearable></el-input>
46 </el-form-item> 46 </el-form-item>
47 </el-col> 47 </el-col>
48 <el-col :span="6"> 48 <el-col :span="6">
49 <el-form-item label="配载航班号"> 49 <el-form-item label="配载航班号">
50 - <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="4" 50 + <el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002" :rows="1"
51 clearable @change="planeNoChange"></el-input> 51 clearable @change="planeNoChange"></el-input>
52 </el-form-item> 52 </el-form-item>
53 </el-col> 53 </el-col>
54 <el-col :span="6"> 54 <el-col :span="6">
55 <el-form-item label="URSA"> 55 <el-form-item label="URSA">
56 - <el-input type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="4" clearable> 56 + <el-input type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="1" clearable>
57 </el-input> 57 </el-input>
58 </el-form-item> 58 </el-form-item>
59 </el-col> 59 </el-col>
60 <el-col :span="6"> 60 <el-col :span="6">
61 <el-form-item label="始发站"> 61 <el-form-item label="始发站">
62 - <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable> 62 + <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="1" clearable>
63 </el-input> 63 </el-input>
64 </el-form-item> 64 </el-form-item>
65 </el-col> 65 </el-col>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
156 <el-col :span="6"> 156 <el-col :span="6">
157 <el-form-item label="发件人账号"> 157 <el-form-item label="发件人账号">
158 <el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem" 158 <el-input ref='userInfo' type="textarea" v-model="formData.shipperAccount" class="formItem"
159 - placeholder="请输入发件人账号(;间隔)" :rows="4" :maxlength="12000" clearable></el-input> 159 + placeholder="请输入发件人账号(;间隔)" :rows="1" :maxlength="12000" clearable></el-input>
160 </el-form-item> 160 </el-form-item>
161 </el-col> 161 </el-col>
162 </el-row> 162 </el-row>
......
...@@ -506,6 +506,41 @@ export default { ...@@ -506,6 +506,41 @@ export default {
506 serviceCodeTableSelectAll(val) { 506 serviceCodeTableSelectAll(val) {
507 this.nowSelect = val 507 this.nowSelect = val
508 }, 508 },
509 + // 确认消息提示
510 + confirmHandle($index, row){
511 + this.$confirm(row.msg, "提示", {
512 + confirmButtonText: "确定",
513 + cancelButtonText: "取消",
514 + type: "warning",
515 + center: true,
516 + })
517 + .then(() => {
518 + let params = {
519 + id: row.id,
520 + fltNo: row.fltNo,
521 + route: row.route,
522 + isEtesRoute: row.isEtesRoute ? "Y" : "N"
523 + }
524 + this.updateRouteSubmit(params);
525 + })
526 + .catch(() => {
527 + this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute;
528 + });
529 + },
530 + // checkBox是否设置ET86航线
531 + checkboxIsEtesRoute({ $index, row }){
532 + if(!row.isEtesRoute){
533 + /*
534 + 将ET86设置成普通航线要查询校验该航线有没有设置维度,
535 + 如果该航线设置了ET86维度是否考虑将该航线下的维度删掉再进行操作;
536 + */
537 + row.msg = "是否将该航线设置为非ET86航线?";
538 + this.confirmHandle($index, row)
539 + }else{
540 + row.msg = "是否将该航线设置为ET86航线?";
541 + this.confirmHandle($index, row)
542 + }
543 + }
509 } 544 }
510 } 545 }
511 </script> 546 </script>
......