Elements-SY

modify

......@@ -5,7 +5,7 @@
</template>
<script>
export default {
name: 'App'
}
export default {
name: "App",
};
</script>
......
......@@ -462,6 +462,7 @@ export default {
deep: true,
immediate: true,
},
//
},
};
</script>
......
......@@ -183,13 +183,15 @@ export default {
methods: {
getTrCurrentHeight: debounce(function () {
this.$nextTick(() => {
const trEl =
this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
.children[0];
if (trEl) {
this.trHeight = trEl.clientHeight;
}
// const trEl =
// this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
// .children[0];
// console.log(trEl)
// if (trEl) {
// this.trHeight = trEl.clientHeight;
// }
});
}, 800),
......
......@@ -77,7 +77,7 @@ export const constantRoutes = [
component: (resolve) =>
require(["@/views/et86Config/et86RuleConfig/edit"], resolve),
name: "edit",
meta: { title: "ET86规则", icon: "user", noCache: false },
meta: { title: "ET86规则", icon: "user", noCache: true },
},
{
path: "/errorInfo",
......
......@@ -128,7 +128,7 @@ export default {
isEtesRoute.map((item) => {
routes.push({ config: false, route: item.route });
});
this.routeList = data.list;
this.routeList = isEtesRoute;
this.routesInfo = routes;
} else {
this.routeList = [];
......
......@@ -19,7 +19,7 @@ export const columnHeader = () => [
{
label: "错误信息",
prop: "msg",
align: "center",
align: "left",
minWidth: 150,
},
];
......
......@@ -199,10 +199,10 @@ export default {
});
},
// 翻页序号递增
indexAdd(index){
const page = this.pageConfig.pageData.page // 当前页码
const pagesize = this.pageConfig.pageData.size // 每页条数
return index + 1 + (page - 1) * pagesize
indexAdd(index) {
const page = this.pageConfig.pageData.page; // 当前页码
const pagesize = this.pageConfig.pageData.size; // 每页条数
return index + 1 + (page - 1) * pagesize;
},
//条数变化
handleSizeChange(e) {
......
......@@ -49,7 +49,7 @@
v-model="scope.row.flightNo"
clearable
:disabled="scope.row.edit"
@focus="inputFocus(scope)"
@focus="inputFlightNoFocus(scope)"
@blur="blurSearch"
placeholder="请输入航班号"
size="small"
......@@ -95,9 +95,9 @@
<template slot-scope="scope">
<el-select
v-model="scope.row.flightRoute"
:placeholder="scope.row.flightNo ? (scope.row.routeList.length ? '请选择' : '暂无航线') : '请先输入航班号'"
size="small"
:disabled="scope.row.edit"
@focus="inputFlightRoute(scope)"
>
<el-option
v-for="item in scope.row.routeList"
......@@ -649,8 +649,13 @@ export default {
if (isEtesRoute.length == 0) {
this.msgError("该航班下的航线均为普通航线");
}
// console.log(this.currentIndex)
// console.log(this.tableData)
// console.log(this.tableData[this.currentIndex])
// console.log(isEtesRoute)
this.tableData[this.currentIndex].flightRoute = "";
this.tableData[this.currentIndex].routeList = isEtesRoute;
// this.$set(this.tableData[this.currentIndex].routeList, index, isEtesRoute);
} else {
this.msgError("暂无航线");
this.tableData[this.currentIndex].routeList = [];
......@@ -661,7 +666,7 @@ export default {
.catch(() => {});
},
// 航班号input 聚焦事件
inputFocus({ $index }) {
inputFlightNoFocus({ $index }) {
this.currentIndex = $index;
},
// 失焦查询
......@@ -700,6 +705,15 @@ export default {
this.msgError("请输入航班号");
}
},
// 航线聚焦事件
inputFlightRoute({ $index, row }){
this.currentIndex = $index;
let params = {
fltNo: row.flightNo
}
// 航线查询
// this.getQueryRouteByFltNo(params);
},
// 添加ET86配舱航班顺位
addBtn(item) {
this.id++;
......
......@@ -38,6 +38,7 @@ import {
deleteEtesRuleById, // 删除
} from "@/api/et86";
export default {
name: "et86RuleConfig",
components: {
YlForm,
YlTable,
......@@ -45,8 +46,12 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
originOfFlightNo: "",
queryForm: {
// 表单参数
originOfFlightNo: "",
startTime: "",
endTime: "",
status: "有效",
},
pageConfig: {
......@@ -59,7 +64,12 @@ export default {
},
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.indexAdd, this.viewRow, this.editRow, this.deleteRow), // 表头
columns: columnHeader(
this.indexAdd,
this.viewRow,
this.editRow,
this.deleteRow
), // 表头
tableData: [], // 表格数据
};
},
......@@ -76,6 +86,7 @@ export default {
window.innerHeight - restTableHeight(this.$refs);
});
},
computed: {},
methods: {
// ET86查询
queryFindAllEtesRules() {
......@@ -120,10 +131,10 @@ export default {
});
},
// 翻页序号递增
indexAdd(index){
const page = this.pageConfig.pageData.page // 当前页码
const pagesize = this.pageConfig.pageData.size // 每页条数
return index + 1 + (page - 1) * pagesize
indexAdd(index) {
const page = this.pageConfig.pageData.page; // 当前页码
const pagesize = this.pageConfig.pageData.size; // 每页条数
return index + 1 + (page - 1) * pagesize;
},
//条数变化
handleSizeChange(e) {
......@@ -180,7 +191,8 @@ export default {
center: true,
})
.then(() => {
deleteEtesRuleById({ id: row.id }).then((res) => {
delete row.status;
deleteEtesRuleById(row).then((res) => {
const { code, msg } = res;
if (code == 200) {
this.searchBtn();
......