Elements-SY

Merge branch 'et86' into 2023-08-14

...@@ -83,7 +83,7 @@ export function searchUrsaDestination(data) { ...@@ -83,7 +83,7 @@ export function searchUrsaDestination(data) {
83 * @param waybillNo 运单号 83 * @param waybillNo 运单号
84 * @param ursa ursa 84 * @param ursa ursa
85 * @param typeName 申报类别 85 * @param typeName 申报类别
86 - * @param siteName 站点 86 + * @param siteName 始发站
87 * @param regionArray 区域 list 87 * @param regionArray 区域 list
88 * @param areaArray 地区 list 88 * @param areaArray 地区 list
89 * @param serviceTypeArray 服务代码 list 89 * @param serviceTypeArray 服务代码 list
...@@ -124,4 +124,4 @@ export function findPreMdeReport(data) { ...@@ -124,4 +124,4 @@ export function findPreMdeReport(data) {
124 method: 'post', 124 method: 'post',
125 data: data 125 data: data
126 }) 126 })
127 -}
...\ No newline at end of file ...\ No newline at end of file
127 +}
......
...@@ -143,9 +143,9 @@ export function delFlight(data) { ...@@ -143,9 +143,9 @@ export function delFlight(data) {
143 143
144 //查询航线 144 //查询航线
145 /** 145 /**
146 - * @param fltNo 航班号 146 + * @param fltNo 航班号
147 - * @param page 页数 147 + * @param page 页数
148 - * @param size 页长 148 + * @param size 页长
149 */ 149 */
150 export function queryRoute(data) { 150 export function queryRoute(data) {
151 return request({ 151 return request({
...@@ -194,8 +194,8 @@ export function orderRoute(data) { ...@@ -194,8 +194,8 @@ export function orderRoute(data) {
194 194
195 //航线删除确认 195 //航线删除确认
196 /** 196 /**
197 - * @param fltNo 航班号 197 + * @param fltNo 航班号
198 - * @param route 航线 198 + * @param route 航线
199 */ 199 */
200 export function checkFlightRoute(data) { 200 export function checkFlightRoute(data) {
201 return request({ 201 return request({
...@@ -203,4 +203,16 @@ export function checkFlightRoute(data) { ...@@ -203,4 +203,16 @@ export function checkFlightRoute(data) {
203 method: 'post', 203 method: 'post',
204 data: data 204 data: data
205 }) 205 })
206 -}
...\ No newline at end of file ...\ No newline at end of file
206 +}
207 +
208 +//更新航线
209 +/**
210 + * @param id *
211 + */
212 +export function updateRoute(id) {
213 + return request({
214 + url: `/dictionary/updateRoute/${id}`,
215 + method: "post",
216 + data: {},
217 + });
218 +}
......
...@@ -69,7 +69,7 @@ let tableHeaders = { ...@@ -69,7 +69,7 @@ let tableHeaders = {
69 status: 1 69 status: 1
70 }, 70 },
71 { 71 {
72 - columnChineseName: "站点", 72 + columnChineseName: "始发站",
73 columnName: "siteName", 73 columnName: "siteName",
74 columnWidth: "80", 74 columnWidth: "80",
75 ext1: "sorTable", 75 ext1: "sorTable",
...@@ -671,7 +671,7 @@ let tableHeaders = { ...@@ -671,7 +671,7 @@ let tableHeaders = {
671 status: 1 671 status: 1
672 }, 672 },
673 { 673 {
674 - columnChineseName: "站点", 674 + columnChineseName: "始发站",
675 columnName: "siteName", 675 columnName: "siteName",
676 columnWidth: "80", 676 columnWidth: "80",
677 ext1: "sorTable", 677 ext1: "sorTable",
...@@ -1764,7 +1764,7 @@ let tableHeaders = { ...@@ -1764,7 +1764,7 @@ let tableHeaders = {
1764 status: 1 1764 status: 1
1765 }, 1765 },
1766 { 1766 {
1767 - columnChineseName: "站点", 1767 + columnChineseName: "始发站",
1768 columnName: "siteName", 1768 columnName: "siteName",
1769 columnWidth: "", 1769 columnWidth: "",
1770 ext1: "", 1770 ext1: "",
...@@ -1955,7 +1955,7 @@ let tableHeaders = { ...@@ -1955,7 +1955,7 @@ let tableHeaders = {
1955 status: 1 1955 status: 1
1956 }, 1956 },
1957 { 1957 {
1958 - columnChineseName: "站点", 1958 + columnChineseName: "始发站",
1959 columnName: "siteName", 1959 columnName: "siteName",
1960 columnWidth: "", 1960 columnWidth: "",
1961 ext1: "", 1961 ext1: "",
...@@ -2282,4 +2282,4 @@ let tableHeaders = { ...@@ -2282,4 +2282,4 @@ let tableHeaders = {
2282 ] 2282 ]
2283 } 2283 }
2284 2284
2285 -export default tableHeaders;
...\ No newline at end of file ...\ No newline at end of file
2285 +export default tableHeaders;
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
200 // 拖拽行更新排序 200 // 拖拽行更新排序
201 rowDrop() { 201 rowDrop() {
202 const wrapperTr = document.querySelector(".el-table__header-wrapper tr"); 202 const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
203 - console.log("wrapperTr:", wrapperTr); 203 + // console.log("wrapperTr:", wrapperTr);
204 this.sortable = Sortable.create(wrapperTr, { 204 this.sortable = Sortable.create(wrapperTr, {
205 sort: this.attrs.isDragSort, 205 sort: this.attrs.isDragSort,
206 animation: 100, 206 animation: 100,
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
226 animation: 100, 226 animation: 100,
227 delay: 0, 227 delay: 0,
228 onEnd({ newIndex, oldIndex }) { 228 onEnd({ newIndex, oldIndex }) {
229 - console.log("onEnd:", newIndex, oldIndex); 229 + // console.log("onEnd:", newIndex, oldIndex);
230 const currRow = _this.tableData.splice(oldIndex, 1)[0]; 230 const currRow = _this.tableData.splice(oldIndex, 1)[0];
231 _this.tableData.splice(newIndex, 0, currRow); 231 _this.tableData.splice(newIndex, 0, currRow);
232 }, 232 },
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
112 </el-form-item> 112 </el-form-item>
113 </el-col> 113 </el-col>
114 <el-col :span="6"> 114 <el-col :span="6">
115 - <el-form-item label="站点"> 115 + <el-form-item label="始发站">
116 <el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable> 116 <el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable>
117 </el-input> 117 </el-input>
118 </el-form-item> 118 </el-form-item>
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
73 { name: "口岸代码", value: "portName", width: "" }, 73 { name: "口岸代码", value: "portName", width: "" },
74 { name: "运单号", value: "waybillNo", width: "" }, 74 { name: "运单号", value: "waybillNo", width: "" },
75 { name: "货物状态", value: "statusName", width: "" }, 75 { name: "货物状态", value: "statusName", width: "" },
76 - { name: "站点", value: "siteName", width: "" }, 76 + { name: "始发站", value: "siteName", width: "" },
77 { name: "申报类型", value: "typeName", width: "" }, 77 { name: "申报类型", value: "typeName", width: "" },
78 { name: "URSA", value: "ursa", width: "" }, 78 { name: "URSA", value: "ursa", width: "" },
79 { name: "实际重量", value: "actualWeight", width: "" }, 79 { name: "实际重量", value: "actualWeight", width: "" },
...@@ -266,4 +266,4 @@ export default { ...@@ -266,4 +266,4 @@ export default {
266 266
267 <style> 267 <style>
268 268
269 -</style>
...\ No newline at end of file ...\ No newline at end of file
269 +</style>
......
...@@ -396,10 +396,22 @@ export default { ...@@ -396,10 +396,22 @@ export default {
396 tableEmptyText: "请添加配舱航班", 396 tableEmptyText: "请添加配舱航班",
397 tableData: [], 397 tableData: [],
398 currentIndex: 0, // 记录当前table 列的索引位置 398 currentIndex: 0, // 记录当前table 列的索引位置
399 + id: 0,
399 }; 400 };
400 }, 401 },
401 computed: {}, 402 computed: {},
402 created() { 403 created() {
404 + this.tableData = [
405 + {
406 + id: this.id++,
407 + fltNo: "",
408 + fltNoDate: "",
409 + fltRoute: "",
410 + routeList: [],
411 + isOn: "0" ? false : true,
412 + sort: "0", // 排序字段
413 + },
414 + ];
403 this.getAllDictData(); 415 this.getAllDictData();
404 this.getEdit(); 416 this.getEdit();
405 this.PostFindDestinationFltRuleByFlightNo(); 417 this.PostFindDestinationFltRuleByFlightNo();
...@@ -455,8 +467,12 @@ export default { ...@@ -455,8 +467,12 @@ export default {
455 list.map((item) => { 467 list.map((item) => {
456 routeList.push(item); 468 routeList.push(item);
457 }); 469 });
470 + let isEtesRoute = list.filter(item=>item.isEtesRoute == "Y"); // 过滤普通航线
471 + if(isEtesRoute.length == 0){
472 + this.msgError("该航班下的航线均为普通航线");
473 + }
458 this.tableData[this.currentIndex].fltRoute = ""; 474 this.tableData[this.currentIndex].fltRoute = "";
459 - this.tableData[this.currentIndex].routeList = routeList; 475 + this.tableData[this.currentIndex].routeList = isEtesRoute;
460 } else { 476 } else {
461 this.msgError("暂无航线"); 477 this.msgError("暂无航线");
462 this.tableData[this.currentIndex].routeList = []; 478 this.tableData[this.currentIndex].routeList = [];
...@@ -488,11 +504,11 @@ export default { ...@@ -488,11 +504,11 @@ export default {
488 this.tableData[this.currentIndex].routeList = []; 504 this.tableData[this.currentIndex].routeList = [];
489 this.msgError("请输入航班号"); 505 this.msgError("请输入航班号");
490 } 506 }
491 - }, 800), 507 + }, 1000),
492 // 添加 508 // 添加
493 addBtn(item) { 509 addBtn(item) {
494 - console.log("add:", item);
495 this.tableData.unshift({ 510 this.tableData.unshift({
511 + id: this.id++,
496 fltNo: "", 512 fltNo: "",
497 fltNoDate: "", 513 fltNoDate: "",
498 fltRoute: "", 514 fltRoute: "",
...@@ -500,6 +516,7 @@ export default { ...@@ -500,6 +516,7 @@ export default {
500 isOn: "0" ? false : true, 516 isOn: "0" ? false : true,
501 sort: "0", // 排序字段 517 sort: "0", // 排序字段
502 }); 518 });
519 + console.log("add:", this.tableData);
503 }, 520 },
504 // 是否爆仓 521 // 是否爆仓
505 changeCheck({ $index, row }) { 522 changeCheck({ $index, row }) {
......
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
153 this.$refs.minNumOfPieces.innerHTML = "件数范围1~100"; 153 this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
154 return false; 154 return false;
155 } 155 }
156 - } else if (Number(this.queryForm[name]) < 1) { 156 + } else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
157 this.$refs.minNumOfPieces.innerHTML = ""; 157 this.$refs.minNumOfPieces.innerHTML = "";
158 this.$refs.minNumOfPieces.innerHTML = 158 this.$refs.minNumOfPieces.innerHTML =
159 "最少件数1~100,并且最少件数不得大于最多件数"; 159 "最少件数1~100,并且最少件数不得大于最多件数";
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
192 this.$refs.minNumOfPieces.innerHTML = "件数范围1~100"; 192 this.$refs.minNumOfPieces.innerHTML = "件数范围1~100";
193 return false; 193 return false;
194 } 194 }
195 - } else if (Number(this.queryForm[name]) < 1) { 195 + } else if (this.queryForm[name] !== "" && Number(this.queryForm[name]) < 1) {
196 this.$refs.minNumOfPieces.innerHTML = ""; 196 this.$refs.minNumOfPieces.innerHTML = "";
197 this.$refs.minNumOfPieces.innerHTML = 197 this.$refs.minNumOfPieces.innerHTML =
198 "最多件数1~100,并且最多件数不得小于最小件数"; 198 "最多件数1~100,并且最多件数不得小于最小件数";
......
...@@ -22,7 +22,6 @@ export const formConfig = [ ...@@ -22,7 +22,6 @@ export const formConfig = [
22 prop: "status", 22 prop: "status",
23 width: "140px", 23 width: "140px",
24 placeholder: "请选择状态", 24 placeholder: "请选择状态",
25 - rules: { required: true, message: "请选择状态", trigger: "blur" },
26 options: { 25 options: {
27 data: [ 26 data: [
28 { 27 {
...@@ -34,8 +33,8 @@ export const formConfig = [ ...@@ -34,8 +33,8 @@ export const formConfig = [
34 label: "无效", 33 label: "无效",
35 }, 34 },
36 ], 35 ],
37 - label: "", 36 + label: "有效",
38 - value: "", 37 + value: "1",
39 }, 38 },
40 }, 39 },
41 ]; 40 ];
......
...@@ -44,7 +44,9 @@ export default { ...@@ -44,7 +44,9 @@ export default {
44 data() { 44 data() {
45 return { 45 return {
46 formConfig: formConfig, // 表单配置项 46 formConfig: formConfig, // 表单配置项
47 - queryForm: {}, // 表单参数 47 + queryForm: { // 表单参数
48 + status: "有效"
49 + },
48 pageConfig: { 50 pageConfig: {
49 // 分页配置项 51 // 分页配置项
50 isPagination: true, 52 isPagination: true,
...@@ -55,7 +57,7 @@ export default { ...@@ -55,7 +57,7 @@ export default {
55 }, 57 },
56 }, 58 },
57 tableAttr: tableAttr, // table配置项 59 tableAttr: tableAttr, // table配置项
58 - columns: columnHeader(this.editRow, this.deleteRow, this.viewRow), // 表头 60 + columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
59 tableData: tableData, // 表格数据 61 tableData: tableData, // 表格数据
60 selectionList: [], // table复选框筛选集合 62 selectionList: [], // table复选框筛选集合
61 }; 63 };
...@@ -144,7 +146,7 @@ export default { ...@@ -144,7 +146,7 @@ export default {
144 }, 146 },
145 // 删除 147 // 删除
146 deleteRow(item) { 148 deleteRow(item) {
147 - this.$confirm("是否允许删除?", "提示", { 149 + this.$confirm("是否确认删除?", "提示", {
148 confirmButtonText: "确定", 150 confirmButtonText: "确定",
149 cancelButtonText: "取消", 151 cancelButtonText: "取消",
150 type: "warning", 152 type: "warning",
...@@ -152,17 +154,9 @@ export default { ...@@ -152,17 +154,9 @@ export default {
152 }) 154 })
153 .then(() => { 155 .then(() => {
154 console.log("删除:", item); 156 console.log("删除:", item);
155 - this.$message({ 157 + this.msgSuccess("删除成功!")
156 - type: "success",
157 - message: "删除成功!",
158 - });
159 }) 158 })
160 - .catch(() => { 159 + .catch(() => {});
161 - this.$message({
162 - type: "info",
163 - message: "已取消删除",
164 - });
165 - });
166 }, 160 },
167 // 查看 161 // 查看
168 viewRow({ row }) { 162 viewRow({ row }) {
......
...@@ -460,7 +460,7 @@ ...@@ -460,7 +460,7 @@
460 <el-card shadow="never" style="width: 95%"> 460 <el-card shadow="never" style="width: 95%">
461 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 461 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
462 <el-row> 462 <el-row>
463 - <el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item"> 463 + <el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item.code">
464 <el-checkbox 464 <el-checkbox
465 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 465 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
466 :label="item.chineseName" :name="item.chineseName" 466 :label="item.chineseName" :name="item.chineseName"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 </el-form-item> 23 </el-form-item>
24 </el-col> 24 </el-col>
25 <el-col :span="6"> 25 <el-col :span="6">
26 - <el-form-item label="站点"> 26 + <el-form-item label="始发站">
27 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1"> 27 <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1">
28 </el-input> 28 </el-input>
29 </el-form-item> 29 </el-form-item>
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
106 fltNo: null, 106 fltNo: null,
107 //运单号 107 //运单号
108 waybillNo: "", 108 waybillNo: "",
109 - //站点 109 + //始发站
110 siteName: "", 110 siteName: "",
111 //ursa 111 //ursa
112 ursa: "", 112 ursa: "",
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <el-form-item label="货站名称" prop="goodsStation"> 20 <el-form-item label="货站名称" prop="goodsStation">
21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable 21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
22 :loading="goodsStationLoading" placeholder="不限"> 22 :loading="goodsStationLoading" placeholder="不限">
23 - <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item"> 23 + <el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
24 </el-option> 24 </el-option>
25 </el-select> 25 </el-select>
26 </el-form-item> 26 </el-form-item>
...@@ -279,4 +279,4 @@ export default { ...@@ -279,4 +279,4 @@ export default {
279 margin-left: 10px; 279 margin-left: 10px;
280 } 280 }
281 } 281 }
282 -</style>
...\ No newline at end of file ...\ No newline at end of file
282 +</style>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 <el-form-item label="货站名称" prop="goodsStation"> 20 <el-form-item label="货站名称" prop="goodsStation">
21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable 21 <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
22 :loading="goodsStationLoading" placeholder="不限"> 22 :loading="goodsStationLoading" placeholder="不限">
23 - <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item"> 23 + <el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
24 </el-option> 24 </el-option>
25 </el-select> 25 </el-select>
26 </el-form-item> 26 </el-form-item>
...@@ -279,4 +279,4 @@ export default { ...@@ -279,4 +279,4 @@ export default {
279 margin-left: 10px; 279 margin-left: 10px;
280 } 280 }
281 } 281 }
282 -</style>
...\ No newline at end of file ...\ No newline at end of file
282 +</style>
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
72 { name: "口岸代码", value: "portName", width: "" }, 72 { name: "口岸代码", value: "portName", width: "" },
73 { name: "运单号", value: "waybillNo", width: "" }, 73 { name: "运单号", value: "waybillNo", width: "" },
74 { name: "货物状态", value: "statusName", width: "" }, 74 { name: "货物状态", value: "statusName", width: "" },
75 - { name: "站点", value: "siteName", width: "" }, 75 + { name: "始发站", value: "siteName", width: "" },
76 { name: "申报类型", value: "typeName", width: "" }, 76 { name: "申报类型", value: "typeName", width: "" },
77 { name: "URSA", value: "ursa", width: "" }, 77 { name: "URSA", value: "ursa", width: "" },
78 { name: "实际重量", value: "actualWeight", width: "" }, 78 { name: "实际重量", value: "actualWeight", width: "" },
...@@ -286,4 +286,4 @@ export default { ...@@ -286,4 +286,4 @@ export default {
286 }; 286 };
287 </script> 287 </script>
288 288
289 -<style></style>
...\ No newline at end of file ...\ No newline at end of file
289 +<style></style>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
42 </el-form-item> 42 </el-form-item>
43 </el-form> 43 </el-form>
44 <el-row class="card2"> 44 <el-row class="card2">
45 - <el-col :span="1" v-for="item in fltBox" :key="item"> 45 + <el-col :span="1" v-for="item in fltBox" :key="item.fltNo">
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) >= 90 ? '#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>
......
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
71 const username = localStorage.getItem("username"); 71 const username = localStorage.getItem("username");
72 const password = localStorage.getItem("password"); 72 const password = localStorage.getItem("password");
73 const rememberMe = localStorage.getItem("rememberMe"); 73 const rememberMe = localStorage.getItem("rememberMe");
74 + console.log("rememberMe:", rememberMe)
74 this.loginForm = { 75 this.loginForm = {
75 username: username === undefined ? this.loginForm.username : username, 76 username: username === undefined ? this.loginForm.username : username,
76 password: password === undefined ? this.loginForm.password : password, 77 password: password === undefined ? this.loginForm.password : password,
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 </el-form-item> 56 </el-form-item>
57 </el-col> 57 </el-col>
58 <el-col :span="6"> 58 <el-col :span="6">
59 - <el-form-item label="站点"> 59 + <el-form-item label="始发站">
60 <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK" 60 <el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
61 :rows="4" clearable> 61 :rows="4" clearable>
62 </el-input> 62 </el-input>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <el-card style="margin-bottom:10px"> 3 <el-card style="margin-bottom:10px">
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>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
88 </template> 88 </template>
89 </Tables> 89 </Tables>
90 <!-- 航线表 --> 90 <!-- 航线表 -->
91 - <Tables v-else-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false" 91 + <Tables v-if="tableName === '航线'" ductName="dictionary" :selection="true" :selectFixed="false"
92 :order='true' :height="tableHeight" :data="tableData" :headerData="routeTable" :page="selectDict.page" 92 :order='true' :height="tableHeight" :data="tableData" :headerData="routeTable" :page="selectDict.page"
93 :pageSizes="[20]" :totalCount="total" :loading="loading" @currentChange="currentChange" 93 :pageSizes="[20]" :totalCount="total" :loading="loading" @currentChange="currentChange"
94 layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection" 94 layout="total,prev, pager, next, jumper, ->" @tableSelect="tableSelection"
...@@ -100,6 +100,11 @@ ...@@ -100,6 +100,11 @@
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">
103 + <el-table-column label="是否为ET86航线" align="center">
104 + <template slot-scope="scope">
105 + <el-checkbox v-model="scope.row.isEtesRoute" @change="checkboxIsEtesRoute(scope)"></el-checkbox>
106 + </template>
107 + </el-table-column>
103 <el-table-column label="操作" align="center"> 108 <el-table-column label="操作" align="center">
104 <template slot-scope="scope"> 109 <template slot-scope="scope">
105 <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete" 110 <el-button size="mini" type="text" style="color:#ff4949" icon="el-icon-delete"
...@@ -166,7 +171,7 @@ ...@@ -166,7 +171,7 @@
166 171
167 <script> 172 <script>
168 import Dialog from './dialog.vue' 173 import Dialog from './dialog.vue'
169 -import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute } from '@/api/system/dictionary.js' 174 +import { getDictNameList, getDictionaryList, getServiceCodeList, delServiceCodeCihild, delDict, flightType, delFlight, queryRoute, delRoute, checkFlightRoute, updateRoute } from '@/api/system/dictionary.js'
170 175
171 export default { 176 export default {
172 name: 'DictionaryConfig', 177 name: 'DictionaryConfig',
...@@ -217,6 +222,16 @@ export default { ...@@ -217,6 +222,16 @@ export default {
217 mounted() { 222 mounted() {
218 // this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270 223 // this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
219 }, 224 },
225 + filters: {
226 + // 是否为ET86航线
227 + isEtesRoute(val) {
228 + if(val == "N"){
229 + return "否"
230 + }else{
231 + return "是"
232 + }
233 + },
234 + },
220 watch: { 235 watch: {
221 tableName(val, oldVal) { 236 tableName(val, oldVal) {
222 this.tableName = val 237 this.tableName = val
...@@ -228,6 +243,25 @@ export default { ...@@ -228,6 +243,25 @@ export default {
228 }, 243 },
229 }, 244 },
230 methods: { 245 methods: {
246 + /*
247 + 【更新航线】
248 + 更新路由成功后不用去调查询接口,
249 + 因为即便不去刷新页面调查询接口,
250 + 当前checkBox都是当前操作的状态;
251 + 所以调不调查询接口没有意义,反而消耗后台服务;
252 + */
253 + async updateRouteSubmit(params){
254 + await updateRoute(params).then(res=>{
255 + if(res.code == 200){
256 + this.msgSuccess(res.msg)
257 + }else{
258 + this.msgError(res.msg);
259 + }
260 + }).catch(err => {
261 + console.log(err)
262 + this.msgWarning(err)
263 + })
264 + },
231 //字典名称 265 //字典名称
232 dictNameSelect() { 266 dictNameSelect() {
233 getDictNameList().then(res => { 267 getDictNameList().then(res => {
...@@ -281,6 +315,13 @@ export default { ...@@ -281,6 +315,13 @@ export default {
281 } 315 }
282 queryRoute(obj).then(res => { 316 queryRoute(obj).then(res => {
283 if (res.code === 200) { 317 if (res.code === 200) {
318 + res.data.list.map(item=>{
319 + if(item.isEtesRoute == "N"){
320 + item.isEtesRoute = false;
321 + }else{
322 + item.isEtesRoute = true;
323 + }
324 + })
284 this.tableData = res.data.list 325 this.tableData = res.data.list
285 this.total = res.data.total 326 this.total = res.data.total
286 } else { 327 } else {
...@@ -325,7 +366,15 @@ export default { ...@@ -325,7 +366,15 @@ export default {
325 } else if (this.tableName === '虚拟航班') { 366 } else if (this.tableName === '虚拟航班') {
326 this.flightDel([val.id]) 367 this.flightDel([val.id])
327 } else if (this.tableName === '航线') { 368 } else if (this.tableName === '航线') {
328 - this.routeDel({ data: [val], id: [val.id] }) 369 + /*
370 + 如果该航线是普通航线直接删,如果是ET86航线,那么要查询该航线有没有设置维度,
371 + 如果没有直接删,如果已经设置了维度是否考虑将该航线下的维度删掉再进行操作;
372 + */
373 + if(!val.isEtesRoute){ // 普通航线
374 + this.routeDel({ data: [val], id: [val.id] })
375 + }else{ // ET86航线
376 +
377 + }
329 } else { 378 } else {
330 this.dicDel([val.id]) 379 this.dicDel([val.id])
331 } 380 }
...@@ -488,6 +537,35 @@ export default { ...@@ -488,6 +537,35 @@ export default {
488 serviceCodeTableSelectAll(val) { 537 serviceCodeTableSelectAll(val) {
489 this.nowSelect = val 538 this.nowSelect = val
490 }, 539 },
540 + // 确认消息提示
541 + confirmHandle($index, row){
542 + this.$confirm(row.msg, "提示", {
543 + confirmButtonText: "确定",
544 + cancelButtonText: "取消",
545 + type: "warning",
546 + center: true,
547 + })
548 + .then(() => {
549 + this.updateRouteSubmit(row.id);
550 + })
551 + .catch(() => {
552 + this.tableData[$index].isEtesRoute = !this.tableData[$index].isEtesRoute;
553 + });
554 + },
555 + // checkBox是否设置ET86航线
556 + checkboxIsEtesRoute({ $index, row }){
557 + if(!row.isEtesRoute){
558 + /*
559 + 将ET86设置成普通航线要查询校验该航线有没有设置维度,
560 + 如果该航线设置了ET86维度是否考虑将该航线下的维度删掉再进行操作;
561 + */
562 + row.msg = "是否将该航线设置为非ET86航线?";
563 + this.confirmHandle($index, row)
564 + }else{
565 + row.msg = "是否将该航线设置为ET86航线?";
566 + this.confirmHandle($index, row)
567 + }
568 + }
491 } 569 }
492 } 570 }
493 </script> 571 </script>
......