Elements-SY

modify

import request from "@/utils/request";
// ET86查询
/**
* @param createTimeStart; 开始时间
* @param createTimeEnd; 结束时间
* @param status; 1-有效 0-无效 不传查全部
*/
export function findAllEtesRules(data) {
return request({
url: "/etes/findAllEtesRules",
method: "post",
data: data,
});
}
// ET86新增
export function add(data) {
return request({
url: "/etes/add",
method: "post",
data: data,
});
}
// ET86详情
export function findEtesRuleById(data) {
return request({
url: "/etes/findEtesRuleById",
method: "post",
data: data,
});
}
// ET86编辑
export function update(data) {
return request({
url: "/etes/udpate",
method: "post",
data: data,
});
}
......@@ -114,6 +114,7 @@
:style="{ width: item.width }"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
:value-format="item.format"
clearable
>
</el-date-picker>
......
......@@ -27,8 +27,8 @@
:header-cell-class-name="headerCellClassName"
>
<template v-if="columns.length">
<template v-for="(item, index) in columns">
<column v-if="!item.hidden" :key="index" :attrs="item"></column>
<template v-for="item in columns">
<column v-if="!item.hidden" :key="item.id" :attrs="item"></column>
</template>
</template>
<slot name="column" v-else></slot>
......
......@@ -81,11 +81,25 @@ export const constantRoutes = [
children: [],
},
{
path: "/et86/:edit",
path: "/et86/:name",
component: (resolve) =>
require(["@/views/allocationConfig/et86/edit"], resolve),
name: "edit",
meta: { title: "编辑", icon: "user" },
beforeEnter: (to, from, next) => {
const { params } = to;
if (params.title == "edit") {
to.params.title = "编辑"
to.params.icon = "user";
}else if (params.title == "detail") {
to.params.title = "详情";
to.params.icon = "user";
}else{
to.params.title = "新增";
to.params.icon = "user";
}
next();
},
},
{
path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status",
......
......@@ -155,7 +155,7 @@ export const inputBlurValidate = {
// 报价值【申报价值可以为空为0】
validateCustomVal(value, customVal) {
if (value.length) {
this.queryForm[customVal] = Number(value);
this[customVal] = Number(value);
let coin = {
minCNYCustomVal: "minCNYCustomVal",
maxCNYCustomVal: "minCNYCustomVal",
......@@ -170,20 +170,20 @@ export const inputBlurValidate = {
};
let markCoin = false;
if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") {
if (this.queryForm.minCNYCustomVal && this.queryForm.maxCNYCustomVal) {
markCoin = Number(this.queryForm.maxCNYCustomVal) < Number(this.queryForm.minCNYCustomVal);
if (this.minCNYCustomVal && this.maxCNYCustomVal) {
markCoin = Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal);
}
} else {
if (this.queryForm.minSUDCustomVal && this.queryForm.maxSUDCustomVal) {
markCoin = Number(this.queryForm.maxSUDCustomVal) < Number(this.queryForm.minSUDCustomVal);
if (this.minSUDCustomVal && this.maxSUDCustomVal) {
markCoin = Number(this.maxSUDCustomVal) < Number(this.minSUDCustomVal);
}
}
if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this.queryForm[customVal])) {
if (this.queryForm[customVal] >= 0) {
if (/^(0|[1-9]\d*)(.\d{1,2})?$/.test(this[customVal])) {
if (this[customVal] >= 0) {
if (markCoin) {
this.$refs[coin[customVal]].innerHTML = "";
this.$refs[coin[customVal]].innerHTML = "最小申报价值不得大于最大申报价值";
} else if (this.queryForm[customVal] > currency[customVal]) {
} else if (this[customVal] > currency[customVal]) {
this.$refs[coin[customVal]].innerHTML = "";
this.$refs[coin[customVal]].innerHTML = `最大申报值不得大于${currency[customVal]}`;
} else {
......
......@@ -27,13 +27,13 @@
></el-table-column>
<el-table-column
label="航班号"
prop="fltNo"
prop="flightNo"
min-width="100"
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.fltNo"
v-model="scope.row.flightNo"
clearable
:readonly="scope.row.edit | isEdit"
@focus="inputFocus(scope)"
......@@ -45,14 +45,14 @@
</el-table-column>
<el-table-column
label="加减天数"
prop="fltNoDate"
prop="calculateDay"
width="100"
align="center"
>
<template slot-scope="scope">
<el-input
type="number"
v-model="scope.row.fltNoDate"
v-model="scope.row.calculateDay"
:readonly="scope.row.edit | isEdit"
:disabled="scope.row.edit | isEdit"
min="-7"
......@@ -66,13 +66,13 @@
</el-table-column>
<el-table-column
label="航线"
prop="fltRoute"
prop="flightRoute"
min-width="100"
align="center"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.fltRoute"
v-model="scope.row.flightRoute"
placeholder="请选择"
size="small"
>
......@@ -88,13 +88,13 @@
</el-table-column>
<el-table-column
label="爆仓是否继续配舱"
prop="isOn"
prop="permitOverweight"
min-width="100"
align="center"
>
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.isOn"
v-model="scope.row.permitOverweight"
:disabled="scope.row.edit | isEdit"
@change="changeCheck(scope)"
></el-checkbox>
......@@ -115,7 +115,7 @@
</yl-table>
</el-col>
</el-row>
<!-- 航线维度设置 -->
<!-- ET86配舱航班顺位维度 -->
<el-row style="padding: 20px 0">
<el-col>
<el-divider content-position="left">航线维度设置</el-divider>
......@@ -134,7 +134,7 @@
<el-form-item label="原航班号">
<el-input
type="textarea"
v-model="queryForm.fltNo"
v-model="queryForm.originOfFlightNo"
size="medium"
maxlength="1000"
show-word-limit
......@@ -147,7 +147,7 @@
<el-form-item label="服务种类">
<el-col :span="4">
<el-radio-group
v-model="queryForm.isServiceCode"
v-model="isServiceCode"
@change="isServiceCode"
>
<el-radio label="1">包含ServiceCode</el-radio>
......@@ -157,7 +157,7 @@
<el-col :span="10" :offset="1">
<el-input
type="textarea"
v-model="queryForm.serviceCode"
v-model="serviceCode"
size="medium"
maxlength="1000"
show-word-limit
......@@ -205,10 +205,10 @@
v-model="checkboxClsssType"
@change="checkboxCargoType"
style="display: flex"
v-if="queryForm.cargoType.length"
v-if="cargoType.length"
>
<el-checkbox
v-for="item in queryForm.cargoType"
v-for="item in cargoType"
:label="item.chineseName"
:name="item.chineseName"
:key="item.code"
......@@ -224,7 +224,7 @@
<el-col :span="24">
<el-col :span="3">
<el-form-item label="单品名">
<el-checkbox v-model="queryForm.singleName"></el-checkbox>
<el-checkbox v-model="queryForm.multiHs"></el-checkbox>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -284,7 +284,7 @@
<span class="custom-label-title">人民币</span>
<el-col :span="10">
<el-input
v-model.trim="queryForm.minCNYCustomVal"
v-model.trim="minCNYCustomVal"
clearable
placeholder="最小申报价值"
@blur="inputBlurMin($event, 'minCNYCustomVal')"
......@@ -297,7 +297,7 @@
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input
v-model.trim="queryForm.maxCNYCustomVal"
v-model.trim="maxCNYCustomVal"
clearable
placeholder="最大申报价值"
@blur="inputBlurMax($event, 'maxCNYCustomVal')"
......@@ -309,7 +309,7 @@
<el-form-item label="美元" class="custom-label-pieces">
<el-col :span="10">
<el-input
v-model.trim="queryForm.minSUDCustomVal"
v-model.trim="minSUDCustomVal"
clearable
placeholder="最小申报价值"
@blur="inputBlurMin($event, 'minSUDCustomVal')"
......@@ -322,7 +322,7 @@
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="10">
<el-input
v-model.trim="queryForm.maxSUDCustomVal"
v-model.trim="maxSUDCustomVal"
clearable
placeholder="最大申报价值"
@blur="inputBlurMax($event, 'maxSUDCustomVal')"
......@@ -354,8 +354,12 @@ import { tableAttr } from "./tableConfig";
import {
allDictData, // 获取全部字典
queryRouteByFltNo, // 航线查询
findDestinationFltRuleByFlightNo, // 获取航班下航线维度
} from "@/api/destinationFlight";
import {
add, // ET86新增
findEtesRuleById, // ET86详情
update, // ET86编辑
} from "@/api/et86";
import indexMixins from "./mixins";
export default {
name: "edit",
......@@ -367,49 +371,58 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {
queryForm: { // ET86配舱航班顺位维度
// 表单参数
fltNo: "", // 原航班号
isServiceCode: "1", // 服务种类
serviceCode: "",
id: "", // 维度ID
originOfFlightNo: "", // 原航班号
includeServiceType: "", // 服务种类包含
notIncludeServiceType: "", // 服务种类不包含
includeUrsa: "", // URSA包含
notIncludeUrsa: "", // URSA不包含
cargoType: [], // 申报类别调用接口获取所有的申报类别
checkboxCargoType: [], // 已勾选申报类别的数据
singleName: false, // 单品名
declarationCategory: "", // 已勾选申报类别的数据
multiHs: false, // 单品名
minWeight: "",
maxWeight: "",
minNumOfPieces: "",
maxNumOfPieces: "",
minCNYCustomVal: "", //
maxCNYCustomVal: "", //
minSUDCustomVal: "", //
maxSUDCustomVal: "", //
currencyCd: "",
minCustomVal: "",
maxCustomVal: "",
},
tableAttr: tableAttr, // table配置项
tableData: [],
tableData: [], // ET86配舱航班顺位
currentIndex: 0, // 记录当前table 列的索引位置
id: 0,
id: 1,
isServiceCode: "1", // 服务种类
serviceCode: "", // 服务种类内容
cargoType: [], // 申报类别调用接口获取所有的申报类别
checkboxCargoType: [], // 已勾选申报类别的数据
checkboxClsssType: [], // 申报类别
serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode
minCNYCustomVal: "", //
maxCNYCustomVal: "", //
minSUDCustomVal: "", //
maxSUDCustomVal: "", //
};
},
computed: {},
created() {
this.tableData = [
{
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
routeList: [],
isOn: "0" ? false : true,
sort: "0", // 排序字段
id: this.id,
flightNo: "", // 航班号
calculateDay: "", // 航班日期//+1 -1
flightRoute: "", // 航线
routeList: [], // 航线列表
permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否
priority: this.id, // 优先等级
ruleId: "", // 维度ID
},
];
this.getAllDictData();
this.getEdit();
this.PostFindDestinationFltRuleByFlightNo();
this.getAllDictData(); // 获取全部字典
if(this.$route.params.name == "view" || this.$route.params.name == "edit"){
this.queryFindEtesRuleById(this.$route.params); // ET86详情
}
},
mounted() {},
directives: {
......@@ -464,8 +477,40 @@ export default {
},
},
methods: {
// 获取编辑详情数据
getEdit() {},
// ET86新增
postAdd(params) {
add(params).then((res) => {
const { code, msg } = res
if(code == 200){
this.msgSuccess(msg || "创建成功!")
}else{
this.msgError(msg || "创建失败!");
}
});
},
// ET86详情
queryFindEtesRuleById({ id, status }){
findEtesRuleById({ id: id.toString(), status: status }).then(res=>{
const { code, data, msg } = res
if(code == 200){
data.list.flightRankDtoList.map(item=>{
if(item.permitOverweight == "N"){
item.permitOverweight = false
}else{
item.permitOverweight = true
}
})
data.list.flightRankDtoList; // ET86配舱航班顺位
data.list.fltRuleDto; // ET86配舱航班顺位维度
this.tableData = data.list.flightRankDtoList
}else{
this.msgError(msg || "获取查看失败");
}
console.log(res)
})
},
// ET86编辑
postUpdate() {},
// 获取所有数据字典
getAllDictData() {
allDictData().then((res) => {
......@@ -482,6 +527,7 @@ export default {
// 航线查询
getQueryRouteByFltNo(item) {
this.tableAttr.loadingTable = true;
this.tableData[this.currentIndex].flightRoute;
queryRouteByFltNo(item).then((res) => {
this.tableAttr.loadingTable = false;
if (res.code == 200) {
......@@ -495,23 +541,16 @@ export default {
if (isEtesRoute.length == 0) {
this.msgError("该航班下的航线均为普通航线");
}
this.tableData[this.currentIndex].fltRoute = "";
this.tableData[this.currentIndex].flightRoute = "";
this.tableData[this.currentIndex].routeList = isEtesRoute;
} else {
this.msgError("暂无航线");
this.tableData[this.currentIndex].routeList = [];
this.tableData[this.currentIndex].fltRoute = "";
this.tableData[this.currentIndex].flightRoute = "";
}
}
});
},
// 获取航班下航线维度
PostFindDestinationFltRuleByFlightNo() {
let params = {};
findDestinationFltRuleByFlightNo(params).then((res) => {
console.log(res);
});
},
// 航班号input 聚焦事件
inputFocus({ $index }) {
this.currentIndex = $index;
......@@ -519,26 +558,35 @@ export default {
// 航班号input搜索事件
inputEvent: debounce(function () {
let params = {
fltNo: this.tableData[this.currentIndex].fltNo,
fltNo: this.tableData[this.currentIndex].flightNo,
};
let repeat = this.tableData.filter(
(item) => item.flightNo == this.tableData[this.currentIndex].flightNo
);
if (repeat.length > 1) {
this.msgError("航班顺位已重复");
return;
}
if (params.fltNo) {
this.getQueryRouteByFltNo(params);
} else {
this.tableData[this.currentIndex].fltRoute = "";
this.tableData[this.currentIndex].flightRoute = "";
this.tableData[this.currentIndex].routeList = [];
this.msgError("请输入航班号");
}
}, 1000),
// 添加ET86配舱航班顺位
addBtn(item) {
this.id++;
this.tableData.unshift({
id: this.id++,
fltNo: "",
fltNoDate: "",
fltRoute: "",
routeList: [],
isOn: "0" ? false : true,
sort: "0", // 排序字段
id: this.id,
flightNo: "", // 航班号
calculateDay: "", // 航班日期//+1 -1
flightRoute: "", // 航线
routeList: [], // 航线列表
permitOverweight: "N" ? false : true, // 爆仓是否继续配舱 Y-是,N-否
priority: this.id, // 优先等级
ruleId: "", // 维度ID
});
},
// 是否爆仓
......@@ -559,18 +607,55 @@ export default {
arr.some((val) => val == item.chineseName)
);
this.queryForm.checkboxCargoType = include; //已勾选申报类别的数据
// console.log(arr, include);
this.queryForm.declarationCategory = arr.join(";");
},
// 表单提交
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.minCNYCustomVal.length != "" || this.maxCNYCustomVal.length != "") {
this.queryForm.currencyCd = "CNY";
this.queryForm.minCustomVal = this.minCNYCustomVal;
this.queryForm.maxCustomVal = this.maxCNYCustomVal;
} else if (this.minSUDCustomVal.length != "" || this.maxSUDCustomVal.length != "") {
this.queryForm.currencyCd = "USD";
this.queryForm.minCustomVal = this.minSUDCustomVal;
this.queryForm.maxCustomVal = this.maxSUDCustomVal;
} else {
this.queryForm.currencyCd = "CNY";
}
// 爆仓是否继续配舱
this.tableData.map((item) => {
if (item.permitOverweight == false) {
item.permitOverweight = "Y";
} else {
item.permitOverweight = "N";
}
});
let fltNo = this.tableData.some((item) => item.flightNo == "");
let fltNoRoute = this.tableData.some(
(item) => item.flightRoute == ""
);
if (fltNo) {
this.msgError("航班号不可为空");
return;
}
if (fltNoRoute) {
this.msgError("航线不可为空");
return;
}
if (this.queryForm.originOfFlightNo.length == 0) {
this.msgError("原航班号不可为空");
return;
}
this.queryForm.includeServiceType = this.isServiceCode == "1" && this.serviceCode.length >0 ? this.serviceCode : ""; // 包含服务种类
this.queryForm.notIncludeServiceType = this.isServiceCode == "2" && this.serviceCode.length >0 ? this.serviceCode : ""; // 不包含服务种类
let parmas = {
fltInfoList: this.tableData,
...this.queryForm,
flightRankDtoList: this.tableData, // ET86配舱航班顺位
fltRuleDto: this.queryForm
};
parmas.singleName = this.queryForm.singleName ? "Y" : "N"; // N为单品名,Y为多品名
console.log(parmas);
parmas.fltRuleDto.multiHs = multiHs ? "Y" : "N"; // N为单品名,Y为多品名
this.postAdd(parmas);
} else {
console.log("error submit!!");
return false;
......
......@@ -10,7 +10,7 @@ export default {
},
// 处理serviceCode包不包含
serviceCodeCofig() {
let str = this.queryForm.serviceCode.replace(/;|;/g, ",");
let str = this.serviceCode.replace(/;|;/g, ",");
let arr = str.split(",");
if (arr[arr.length - 1] == "") {
arr.splice(arr.length - 1, 1);
......@@ -44,7 +44,7 @@ export default {
},
// serviceCode失焦事件
serviceCodeBlur() {
if (this.queryForm.isServiceCode == "1") {
if (this.isServiceCode == "1") {
if (this.serviceCodeCofig().noInclude.length) {
let tip = this.serviceCodeCofig().noInclude.toString();
this.msgError(`${tip} 不包含`);
......
......@@ -22,32 +22,32 @@ export const tableAttr = {
export const columnHeader = (deleteRow) => [
{
label: "航班号",
prop: "fltNo",
prop: "flightNo",
align: "center",
minWidth: 100,
},
{
label: "航班日期",
prop: "fltNoDate",
prop: "calculateDay",
align: "center",
minWidth: 100,
// sortable: true,
// "sort-method": (a, b) => b.updateTime - a.updateTime,
},
{
label: "航线优先级",
prop: "fltRoute",
label: "航线",
prop: "flightRoute",
align: "center",
minWidth: 100,
},
{
label: "爆仓是否继续配舱",
prop: "isOn",
prop: "permitOverweight",
align: "center",
minWidth: 100,
render: (h, params) => {
const { row } = params;
console.log(345678,row);
console.log(345678, row);
// return h("div", `状态-${row.id}`);
},
},
......@@ -80,15 +80,3 @@ export const columnHeader = (deleteRow) => [
},
},
];
export const tableData = [
{
id: "1",
fltNo: "A380",
fltNoDate: "3",
fltRoute: "",
routeList: [],
isOn: "1",
sort: "1", // 排序字段
},
];
......
......@@ -6,7 +6,8 @@ export const formConfig = [
prop: "startTime",
width: "140px",
placeholder: "请选择开始时间",
rules: { required: true, message: "请选择开始时间", trigger: "blur" },
// rules: { required: true, message: "请选择开始时间", trigger: "blur" },
format: "yyyy-MM-dd",
},
{
label: "创建时间(到)",
......@@ -15,7 +16,8 @@ export const formConfig = [
prop: "endTime",
width: "140px",
placeholder: "请选择结束时间",
rules: { required: true, message: "请选择结束时间", trigger: "blur" },
// rules: { required: true, message: "请选择结束时间", trigger: "blur" },
format: "yyyy-MM-dd",
},
{
label: "规则状态",
......@@ -31,7 +33,7 @@ export const formConfig = [
label: "有效",
},
{
value: "3",
value: "0",
label: "无效",
},
],
......
......@@ -6,8 +6,6 @@
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
@input="inputEvent"
@keyup="keyUpEvent"
/>
</el-col>
</el-row>
......@@ -30,12 +28,10 @@
import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { debounce } from "@/utils";
import { tableAttr, columnHeader, tableData } from "./tableConfig";
import { tableAttr, columnHeader } from "./tableConfig";
import {
allDictData, // 获取全部字典
queryRouteByFltNo, // 航线查询
} from "@/api/destinationFlight";
findAllEtesRules, // ET86查询
} from "@/api/et86";
export default {
components: {
YlForm,
......@@ -44,14 +40,12 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {
// 表单参数
queryForm: { // 表单参数
status: "有效",
},
pageConfig: {
// 分页配置项
pageConfig: { // 分页配置项
isPagination: true,
total: 13,
total: 0,
pageData: {
page: 1,
size: 10,
......@@ -59,71 +53,63 @@ export default {
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
tableData: tableData, // 表格数据
tableData: [], // 表格数据
selectionList: [], // table复选框筛选集合
};
},
created() {},
created() {
// ET86查询
this.$nextTick(() => {
this.searchBtn();
});
},
mounted() {},
methods: {
// 航线查询
queryRoute(item) {
queryRouteByFltNo(item).then((res) => {
if (res.code == 200) {
const list = res.data.list;
let routeList = "";
if (list.length) {
list.map((item) => {
routeList += item.route + ",";
});
this.queryForm.fltRoute = routeList.substring(
0,
routeList.length - 1
);
} else {
this.queryForm = {
fltNo: item.fltNo, // 航班号
};
// ET86查询
queryFindAllEtesRules(params) {
this.tableAttr.loadingTable = true;
findAllEtesRules(params)
.then((res) => {
this.tableAttr.loadingTable = false;
const { code, data } = res;
if (code == 200) {
this.tableData = data.list;
this.pageConfig.total = data.total;
}
}
});
},
// input事件
inputEvent: debounce(function () {
this.queryRoute({
fltNo: this.queryForm.fltNo, // 航班号
});
}, 800),
// 回车事件
keyUpEvent(item) {
this.queryRoute(item);
})
.catch(() => {});
},
// table复选框事件
selectionTable(e) {
console.log("selectionTable:", e);
this.selectionList = e;
},
//条数变化
handleSizeChange(e) {
this.pageConfig.pageData.size = e;
this.pageConfig.pageData.page = 1;
console.log("sizeChange:", e);
this.searchBtn();
},
//页码变化
handleCurrentChange(e) {
this.pageConfig.pageData.page = e;
console.log("currentChange:", e);
this.searchBtn();
},
// 搜索
searchBtn(row) {
let params = {
...this.queryForm,
createTimeStart: this.queryForm.startTime
? this.queryForm.startTime
: "",
createTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
limitStart: this.pageConfig.pageData.page,
limitSize: this.pageConfig.pageData.size,
status: this.queryForm.status,
};
if (this.queryForm.status == "有效") {
params.status = '1';
params.status = "1";
}
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
console.log(params);
this.queryFindAllEtesRules(params);
});
},
// 重置表单
......@@ -136,43 +122,43 @@ export default {
this.$router.push({
name: "edit",
params: {
edit: 12,
name: "add",
},
});
},
// 查看
viewRow({ row }) {
this.$router.push({
name: "edit",
params: {
name: "view",
id: row.id,
status: row.status
},
});
console.log("查看:", row);
},
// 编辑
editRow(item) {
editRow({ row }) {
this.$router.push({
name: "edit",
params: {
edit: 12,
name: "edit",
id: row.id,
},
});
console.log("修改:", item);
},
// 删除
deleteRow(item) {
deleteRow({ row }) {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
console.log("删除:", item);
}).then(() => {
console.log("删除:", row);
this.msgSuccess("删除成功!");
})
.catch(() => {});
},
// 查看
viewRow({ row }) {
this.$router.push({
name: "edit",
params: {
edit: 12,
},
});
console.log("查看:", row);
}).catch(() => {});
},
},
};
......
const state = {
1: "有效",
3: "无效",
0: "无效",
};
export const tableAttr = {
border: true,
......@@ -56,13 +56,13 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
},
{
label: "原航班号",
prop: "fltNo",
prop: "originOfFlightNo",
align: "center",
minWidth: 100,
},
{
label: "顺位航班",
prop: "flightRand",
prop: "rankFltNoStr",
align: "center",
minWidth: 100,
},
......@@ -177,114 +177,3 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
},
},
];
export const tableData = [
{
id: "1",
flightRand: "LZ003;LZ00",
status: "1",
fltNo: "FX0090",
includeUrsa: "URSACODE191",
notIncludeUrsa: "P_3",
createTime: "2023-08-14",
createUserName: "wjh",
updateTime: "2023-08-14",
updateUserName: "wjh",
},
{
id: "2",
flightRand: "LP001;LP004+1",
status: "3",
fltNo: "FX0090",
includeUrsa: "P_;URSACODE105",
notIncludeUrsa: "P_21",
createTime: "2023-08-14",
createUserName: "wjh",
updateTime: "2023-08-14",
updateUserName: "wjh",
},
{
id: "3",
flightRand: "CQ00;LZ003;CS0004",
status: "1",
fltNo: "CS0002",
includeUrsa: "URSACODE12",
notIncludeUrsa: "P_2",
createTime: "2023-08-14",
createUserName: "wjh",
updateTime: "2023-08-14",
updateUserName: "wjh",
},
{
id: "4",
flightRand: "LZ001;LZ002;LZ004",
status: "1",
fltNo: "FX0090",
includeUrsa: "URSACODE192",
notIncludeUrsa: "P_17",
createTime: "2023-08-11",
createUserName: "wjh",
updateTime: "2023-08-11",
updateUserName: "wjh",
},
{
id: "5",
flightRand: "PS001;PS003",
status: "1",
fltNo: "FX0091",
includeUrsa: "URSACODE10",
notIncludeUrsa: "P_28",
createTime: "2023-08-11",
createUserName: "wjh",
updateTime: "2023-08-11",
updateUserName: "wjh",
},
{
id: "6",
flightRand: "PS002;PS003",
status: "3",
fltNo: "XN007",
includeUrsa: "URSACODE27",
notIncludeUrsa: "P_4",
createTime: "2023-08-11",
createUserName: "wjh",
updateTime: "2023-08-11",
updateUserName: "wjh",
},
{
id: "7",
flightRand: "XN001;XN002;XN003;XN004",
status: "1",
fltNo: "XN001",
includeUrsa: "URSACODE34",
notIncludeUrsa: "P_7",
createTime: "2023-08-10",
createUserName: "wjh",
updateTime: "2023-08-10",
updateUserName: "wjh",
},
{
id: "8",
flightRand: "HA004",
status: "3",
fltNo: "LZ007",
includeUrsa: "URSACODE71",
notIncludeUrsa: "P_2",
createTime: "2023-08-10",
createUserName: "wjh",
updateTime: "2023-08-10",
updateUserName: "wjh",
},
{
id: "9",
flightRand: "AB0001;AB123",
status: "1",
fltNo: "AB0001",
includeUrsa: "URSACODE87",
notIncludeUrsa: "P_26",
createTime: "2023-08-10",
createUserName: "wjh",
updateTime: "2023-08-10",
updateUserName: "wjh",
},
];
......
......@@ -388,17 +388,7 @@ export default {
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.msgWarning('待联调!')
// delDict(val).then(res => {
// if (res.code === 200) {
// this.msgSuccess(res.msg)
// } else {
// this.msgWarning(res.msg)
// }
// this.tableSelect() // 回调查询
// }).catch(err => {
// console.log(err)
// })
this.routeDel({ data: [val], id: [val.id] })
}).catch(() => { })
}
} else {
......