Elements-SY

Merge branch test into uat

Showing 64 changed files with 1510 additions and 280 deletions
......@@ -39,8 +39,10 @@
"axios": "0.21.1",
"core-js": "3.8.3",
"element-ui": "2.15.3",
"sortablejs": "^1.15.0",
"vue": "2.6.14",
"vue-router": "3.5.2",
"vuedraggable": "^2.24.3",
"vuex": "3.6.2"
},
"devDependencies": {
......
......@@ -22,6 +22,7 @@ export function importFlightDestination(file, date) {
return request({
method: 'post',
url: settings.baseURL + '/flightDestination/importFlightDestination',
// headers: { 'Authorization': 'Bearer ' + getToken() },
data: formData
})
}
......@@ -38,6 +39,7 @@ export function importUrsaDestination(file, date) {
return request({
method: 'post',
url: settings.baseURL + '/ursaDestination/importUrsaDestination',
// headers: { 'Authorization': 'Bearer ' + getToken() },
data: formData
})
}
......@@ -81,7 +83,7 @@ export function searchUrsaDestination(data) {
* @param waybillNo 运单号
* @param ursa ursa
* @param typeName 申报类别
* @param siteName 站点
* @param siteName 始发站
* @param regionArray 区域 list
* @param areaArray 地区 list
* @param serviceTypeArray 服务代码 list
......@@ -122,4 +124,4 @@ export function findPreMdeReport(data) {
method: 'post',
data: data
})
}
\ No newline at end of file
}
......
......@@ -143,9 +143,15 @@ export function delFlight(data) {
//查询航线
/**
* @param fltNo 航班号
* @param page 页数
* @param size 页长
<<<<<<< HEAD
* @param fltNo 航班号
* @param page 页数
* @param size 页长
=======
* @param fltNo 航班号
* @param page 页数
* @param size 页长
>>>>>>> test
*/
export function queryRoute(data) {
return request({
......@@ -194,8 +200,8 @@ export function orderRoute(data) {
//航线删除确认
/**
* @param fltNo 航班号
* @param route 航线
* @param fltNo 航班号
* @param route 航线
*/
export function checkFlightRoute(data) {
return request({
......@@ -203,4 +209,16 @@ export function checkFlightRoute(data) {
method: 'post',
data: data
})
}
\ No newline at end of file
}
//更新航线
/**
* @param id *
*/
export function updateRoute(id) {
return request({
url: `/dictionary/updateRoute/${id}`,
method: "post",
data: {},
});
}
......
......@@ -69,7 +69,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "80",
ext1: "sorTable",
......@@ -671,7 +671,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "80",
ext1: "sorTable",
......@@ -1764,7 +1764,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "",
ext1: "",
......@@ -1806,7 +1806,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "申报类",
columnChineseName: "申报类",
columnName: "typeName",
columnWidth: "",
ext1: "",
......@@ -1955,7 +1955,7 @@ let tableHeaders = {
status: 1
},
{
columnChineseName: "站点",
columnChineseName: "始发站",
columnName: "siteName",
columnWidth: "",
ext1: "",
......@@ -2282,4 +2282,4 @@ let tableHeaders = {
]
}
export default tableHeaders;
\ No newline at end of file
export default tableHeaders;
......
......@@ -259,4 +259,4 @@ export default {
}
}
</style>
\ No newline at end of file
</style>
......
<template>
<div class="top-right-btn">
<el-row>
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
<el-button :size="size" circle icon="el-icon-search" @click="toggleSearch()" />
<el-tooltip
class="item"
effect="dark"
:content="showSearch ? '隐藏搜索' : '显示搜索'"
placement="top"
>
<el-button
:size="size"
circle
icon="el-icon-search"
@click="toggleSearch()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button :size="size" circle icon="el-icon-refresh" @click="refresh()" />
<el-button
:size="size"
circle
icon="el-icon-refresh"
@click="refresh()"
/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns">
<el-button :size="size" circle icon="el-icon-menu" @click="showColumn()" />
<el-tooltip
class="item"
effect="dark"
content="显隐列"
placement="top"
v-if="columns"
>
<el-button
:size="size"
circle
icon="el-icon-menu"
@click="showColumn()"
/>
</el-tooltip>
</el-row>
<el-dialog :title="title" :visible.sync="open" append-to-body :close-on-press-escape="false">
......
This diff is collapsed. Click to expand it.
<template>
<el-input
v-bind="$attrs"
clearable
@input="handleInput"
@focus="handleFocus"
@blur="handleBlur"
@change="handleChange"
class="yl-input"
></el-input>
</template>
<script>
export default {
props: {
rules: {
type: Array,
default: () => [],
},
},
data() {
return {};
},
computed: {},
created() {},
mounted() {},
methods: {
handleInput(event) {
// v-bind="$attrs" v-on="$listeners"
this.$emit("input", event);
},
handleFocus(event) {
this.$emit("focus", event);
},
handleBlur(event) {
this.$emit("blur", event);
},
handleChange(event) {
this.$emit("change", event);
},
},
};
</script>
<style lang='scss'>
</style>
<script>
/**
* 动态渲染 el-table-column
*/
export default {
name: 'column',
props: {
attrs: {
type: Object,
default: () => ({}),
required: true
}
},
render: function(h) {
let attrs = this.attrs;
let scopedSlots = {};
if (attrs.render) {
scopedSlots.default = scope => attrs.render(h, scope);
}
return h('el-table-column', {
attrs,
scopedSlots
});
}
};
</script>
<template>
<div class="table-container">
<el-row v-if="attrs.btnCofig.isBtn" style="margin-bottom: 15px">
<el-col>
<el-button
v-for="item in attrs.btnCofig.btnGroup"
:key="item.icon"
:type="item.type"
:icon="item.icon"
:round="item.round"
:size="item.size"
:loading="item.loading"
@click="handleClick(item)"
>{{ item.btnName }}</el-button
>
</el-col>
</el-row>
<el-table
:max-height="attrs.maxHeight"
:empty-text="emptyText"
v-bind="attrs"
v-loading="loadingTable"
:data="tableData"
@selection-change="selectionChange"
ref="tableRef"
row-key="id"
: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>
</template>
<slot name="column" v-else></slot>
</el-table>
<!-- 分页 -->
<div
v-if="pageConfig.isPagination"
class="pagination-container"
:style="{ textAlign: pageConfig.position || 'right' }"
>
<el-pagination
background
:hide-on-single-page="false"
:current-page="pageConfig.pageData.page"
:page-sizes="[10, 15, 20, 25, 30, 35, 40]"
:page-size="pageConfig.pageData.size"
layout="total,prev, pager, next, jumper, ->, sizes"
:total="pageConfig.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
</div>
</template>
<script>
import Sortable from "sortablejs";
import { objectMerge, debounce } from "@/utils";
import column from "./column";
export default {
props: {
attrs: {
type: Object,
default: {
border: true,
isDragSort: false,
btnCofig: {
isBtn: true,
btnGroup: [
{
type: "primary", // text、primary、danger
icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
btnName: "搜索",
size: "mini", // medium / small / mini
round: false,
loading: false,
event: "searchBtn",
},
],
},
},
},
emptyText: {
type: String,
default: "暂无数据",
},
loadingTable: {
type: Boolean,
default: false,
},
columns: {
type: Array,
default: () => [],
},
tableData: {
type: Array,
default: () => [],
},
pageConfig: {
type: Object,
default: {
isPagination: true,
},
required: true,
},
},
components: {
column,
},
data() {
return {
dropCol: objectMerge({}, this.columns),
trHeight: 4,
};
},
computed: {
_attrs() {
//默认table 参数
const defaultParams = {};
return Object.assign(defaultParams, this.attrs);
},
isHasAttr() {},
},
created() {
if (this.attrs.isDragSort) {
// 有没有复选框、有没有render
// this.columns
}
},
mounted() {
//阻止火狐拖拽新建新页面
document.body.addEventListener(
"drop",
(event) => {
event.preventDefault();
event.stopPropagation();
},
false
);
if (this.tableData.length) {
this.getTrCurrentHeight();
window.addEventListener("resize", this.getTrCurrentHeight);
// 拖拽行更新排序
// this.rowDrop();
// 拖拽列更新排序
this.columnDrop();
}
},
destroyed() {
if (this.tableData.length) {
window.removeEventListener("resize", this.getTrCurrentHeight);
}
},
methods: {
getTrCurrentHeight: debounce(function () {
this.$nextTick(() => {
const trEl =
this.$refs.tableRef.$refs.bodyWrapper.children[0].children[1]
.children[0].clientHeight;
this.trHeight = trEl;
});
}, 800),
// 给表头列添加className
headerCellClassName({ row, column, rowIndex, columnIndex }) {
if (columnIndex !== 0) {
return "el-table_1_column";
}
},
useTableFunc(FuncName, ...params) {
if (!this.$refs["el-table"]) {
return console.warn("访问不到el-table");
}
if (!FuncName) {
return console.error("请传入tabel方法名字");
}
this.$refs["el-table"][FuncName](params[0]);
},
// table复选框事件
selectionChange(e) {
console.log(e);
this.$emit("selectionEvent", e);
},
// 条数变化
handleSizeChange(e) {
this.$emit("sizeChange", e);
},
// 页码变化
handleCurrentChange(e) {
this.$emit("currentChange", e);
},
// btn点击事件注册
handleClick(item) {
this.$emit(item.event, item);
},
// 拖拽行更新排序
rowDrop() {
const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
// console.log("wrapperTr:", wrapperTr);
this.sortable = Sortable.create(wrapperTr, {
sort: this.attrs.isDragSort,
animation: 100,
delay: 0,
handle: ".move", // 只有带move类名的元素才能拖动,多选框禁止拖动
onEnd: (evt) => {
// 因为手动加了一个多选框, 不在表头循环数组内, 所以这里减1
let oldIndx = evt.oldIndex - 1;
let newIndx = evt.newIndex - 1;
const oldItem = this.dropCol[oldIndx];
// 真正改变列数据--变化列头,就能实现列拖动 列数据按列头索引取值 {{ scope.row[dropCol[index].prop] }}
this.dropCol.splice(oldIndx, 1); // 删除旧一行 删除为1
this.dropCol.splice(newIndx, 0, oldItem); // 插入新一行 插入为0
},
});
},
// 拖拽列更新排序
columnDrop() {
const tbody = document.querySelector(".el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
sort: this.attrs.isDragSort,
animation: 100,
delay: 0,
onEnd({ newIndex, oldIndex }) {
// console.log("onEnd:", newIndex, oldIndex);
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
},
});
},
},
watch: {
data() {
this.$nextTick(() => {
this.useTableFunc("doLayout");
});
},
},
};
</script>
<style lang="scss">
</style>
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import ElementLocale from 'element-ui/lib/locale'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import langZh from "@/assets/languages/zh.js"
import langEN from "@/assets/languages/en.js"
Vue.use(VueI18n)
const i18n = new VueI18n({
locale: 'zh',//默认语言
messages: {
'zh': {...langZh,...zhLocale},
'en': {...langEN,...enLocale}
}
})
ElementLocale.i18n((key, value) => i18n.t(key, value))
export default i18n
......@@ -16,7 +16,7 @@ export default {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
return this.$route.fullPath
}
}
}
......
......@@ -4,7 +4,6 @@
@toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu">
<template v-if="device !== 'mobile'"> </template>
<el-select v-model="portName" size="mini" style="width: 120px; top: -17px; right: 7px" placeholder="选择口岸">
......@@ -22,25 +21,19 @@
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-select
v-model="locale"
size="mini"
@change="local"
style="width: 75px; top: -17px; right: 7px"
>
<el-select v-model="locale" size="mini" @change="local" style="width: 75px; top: -17px; right: 7px">
<el-option label="中文" value="zh"> </el-option>
<el-option label="英文" value="en"> </el-option>
</el-select> -->
</el-select>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex"
import Breadcrumb from "@/components/Breadcrumb"
import TopNav from "@/components/TopNav"
import Hamburger from "@/components/Hamburger"
import settings from "@/settings"
import { mapGetters } from "vuex";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
import Hamburger from "@/components/Hamburger";
export default {
components: {
......@@ -88,7 +81,8 @@ export default {
.then((res) => {
if (res.code === 200) {
this.$store.dispatch('tagsView/delAllCachedViews')
// location.reload();
this.$store.dispatch('tagsView/delAllVisitedViews')
// location.reload(false);
if (this.$route.path != '/index') {
this.$router.push('/index')
}
......@@ -120,17 +114,19 @@ export default {
},
async logout() {
this.$confirm("确定注销并退出系统吗?", "提示", {
closeOnClickModal: false,
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
window.location.href = settings.logoutURL;//wsso系统跳转
// this.$router.push('/')
window.location.href = this.settings.logoutURL;//wsso系统跳转
});
});
},
local(val) {
// this.$i18n.locale = val; //此处val为 zh 或者 en
this.$i18n.locale = val; //此处val为 zh 或者 en
},
},
};
......@@ -233,4 +229,15 @@ export default {
}
}
}
.verTip {
width: auto;
height: 50px;
line-height: 50px;
font-size: 14px;
font-weight: 700;
position: absolute;
left: 50%;
color: #1890ff;
}
</style>
......
......@@ -82,13 +82,15 @@ export default {
position: relative;
overflow: hidden;
width: 100%;
::v-deep {
.el-scrollbar__bar {
bottom: 0px;
}
.el-scrollbar__wrap {
// height: 49px;
margin-top:4px;
margin-top: 4px;
}
}
}
......
......@@ -26,7 +26,7 @@ import Drag from "@/components/Drag"
import tableHeaders from '@/assets/languages/tableHeaders'
import dictLabels from "@/assets/languages/dictLabels.js"
import settings from './settings.js'
import * as filters from "./utils/filters.js";
// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
......@@ -76,6 +76,10 @@ Vue.directive('focus', {
}
});
// 全局注册过滤器
Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]);
});
/**
* If you don't want to use mock-server
......
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import { getToken, setToken, removeToken } from '@/utils/auth'
import settings from "@/settings"
import { getToken, removeToken } from '@/utils/auth'
const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
router.beforeEach((to, from, next) => {
if (getToken()) {
/* has token*/
......@@ -16,19 +14,16 @@ router.beforeEach((to, from, next) => {
if (store.getters.roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(() => {
//获取用户表头
store.dispatch('GetTableHeaders').then(() => {
// 根据roles权限生成可访问的路由表
store.dispatch('GenerateRoutes').then(accessRoutes => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
})
}).catch(err => {
Message.error(err)
// store.dispatch('LogOut').then(() => {
// // next({ path: '/' })
// window.location.href = settings.loginURL;//wsso系统跳转
// })
})
} else {
next()
......@@ -43,12 +38,7 @@ router.beforeEach((to, from, next) => {
setToken(token)
next({ path: '/' })
} else {
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next()
} else {
window.location.href = settings.loginURL;//wsso系统跳转
}
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
}
}
})
......
......@@ -29,76 +29,97 @@ import ParentView from '@/components/ParentView';
// 公共路由
export const constantRoutes = [
{
path: '/redirect',
path: "/redirect",
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve)
}
]
path: "/redirect/:path(.*)",
component: (resolve) => require(["@/views/redirect"], resolve),
},
],
},
// {
// path: '/login',
// component: (resolve) => require(['@/views/login'], resolve),
// hidden: true
// },
{
path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve),
hidden: true
path: "/login",
component: (resolve) => require(["@/views/login"], resolve),
hidden: true,
},
{
path: "/404",
component: (resolve) => require(["@/views/error/404"], resolve),
hidden: true,
},
{
path: '/401',
component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true
path: "/401",
component: (resolve) => require(["@/views/error/401"], resolve),
hidden: true,
},
{
path: '',
path: "",
component: Layout,
redirect: 'index',
redirect: "index",
children: [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: 'Index',
meta: { title: '首页', icon: 'home', noCache: true, affix: true }
path: "index",
component: (resolve) => require(["@/views/index"], resolve),
name: "Index",
meta: { title: "首页", icon: "home", noCache: true, affix: true },
},
]
],
},
{
path: '',
path: "",
component: Layout,
hidden: true,
children: [
{
path: '/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'FlightAllocConfigInfo',
meta: { title: '航班配舱', icon: 'user' }
path: "/et86",
component: (resolve) =>
require(["@/views/allocationConfig/et86"], resolve),
name: "et86",
meta: { title: "ET86", icon: "user" },
children: [],
},
{
path: "/et86/:edit",
component: (resolve) =>
require(["@/views/allocationConfig/et86/edit"], resolve),
name: "edit",
meta: { title: "编辑", icon: "user" },
},
{
path: "/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status",
component: (resolve) =>
require(["@/views/allocationConfig/flightAllocConfig/info"], resolve),
name: "FlightAllocConfigInfo",
meta: { title: "航班配舱", icon: "user" },
},
{
path: '/weatherTable/:awbNbr',
component: (resolve) => require(['@/views/systemLog/dmLog/weatherTable'], resolve),
name: 'weatherTable',
meta: { title: '流水表', icon: 'user' }
path: "/weatherTable/:awbNbr",
component: (resolve) =>
require(["@/views/systemLog/dmLog/weatherTable"], resolve),
name: "weatherTable",
meta: { title: "流水表", icon: "user" },
},
{
path: '/upDateResult',
component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
name: 'UpDateResult',
meta: { title: '错误信息提示', icon: 'user' }
path: "/upDateResult",
component: (resolve) =>
require(["@/views/preMdeConfig/upDateResult"], resolve),
name: "UpDateResult",
meta: { title: "错误信息提示", icon: "user" },
},
{
path: '/goodsLog/type=:type',
component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
name: 'GoodsUploadLog',
meta: { title: '导入日志', icon: 'user' }
path: "/goodsLog/type=:type",
component: (resolve) =>
require([
"@/views/basicInformation/goodsStation/goodsUploadLog",
], resolve),
name: "GoodsUploadLog",
meta: { title: "导入日志", icon: "user" },
},
]
],
},
]
];
export default new Router({
mode: 'history', // 去掉url中的#
......
......@@ -49,7 +49,7 @@ module.exports = {
* 后端接口
*/
baseURL: `https://imacuat.zmd.apac.fedex.com/iMAC`,
downLoadURL: `https://imacuat.zmd.apac.fedex.com/iMAC`,//下载、导出地址
downLoadURL: `https://imacuat.zmd.apac.fedex.com/iMAC`,//下载、导出地址
/**
* 项目存放地址
......
import { constantRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView';
import hasPermi from '../../directive/permission/hasPermi';
import { constantRoutes } from "@/router";
import { getRouters } from "@/api/menu";
import Layout from "@/layout/index";
import ParentView from "@/components/ParentView";
import hasPermi from "../../directive/permission/hasPermi";
const permission = {
state: {
routes: [],
......@@ -10,26 +10,35 @@ const permission = {
defaultRoutes: [],
topbarRouters: [],
sidebarRouters: [],
filghtAllData: {}
filghtAllData: {},
},
mutations: {
SET_ROUTES: (state, routes) => {
state.addRoutes = routes
state.routes = constantRoutes.concat(routes)
state.addRoutes = routes;
state.routes = constantRoutes.concat(routes);
},
SET_DEFAULT_ROUTES: (state, routes) => {
state.defaultRoutes = constantRoutes.concat(routes)
state.defaultRoutes = constantRoutes.concat(routes);
},
SET_TOPBAR_ROUTES: (state, routes) => {
// 顶部导航菜单默认添加统计报表栏指向首页
const index = [{
path: 'index',
meta: { title: '首页', icon: 'home' }
}]
const index = [
{
path: "index",
meta: { title: "首页", icon: "home" },
},
];
state.topbarRouters = routes.concat(index);
},
SET_SIDEBAR_ROUTERS: (state, routes) => {
state.sidebarRouters = routes
state.sidebarRouters = routes;
},
SET_FILGHTALL: (state, data) => {
let name = data.name;
state.filghtAllData[name] = data.data;
},
REMOVE_FILGHTALL: (state, name) => {
delete state.filghtAllData[name];
},
SET_FILGHTALL: (state, data) => {
let name = data.name;
......@@ -42,78 +51,99 @@ const permission = {
actions: {
// 生成路由
GenerateRoutes({ commit }) {
return new Promise(resolve => {
return new Promise((resolve) => {
// 向后端请求路由数据
getRouters().then(res => {
getRouters().then((res) => {
// const newUrl = {
// id: 24,
// name: "et86",
// path: "/et86",
// hidden: false,
// component: "allocationConfig/et86",
// meta: {
// title: "ET86",
// icon: "edit",
// permissions: "allocation:rand:list",
// noCache: false,
// },
// alwaysShow: false,
// children: null,
// };
// res.data.map((item) => {
// if (item.name == "AllocationConfig") {
// item.children.push(newUrl);
// }
// });
res.data = hasPermi.routerPer(res.data);
const sdata = JSON.parse(JSON.stringify(res.data))
const rdata = JSON.parse(JSON.stringify(res.data))
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
commit('SET_ROUTES', rewriteRoutes)
commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
commit('SET_DEFAULT_ROUTES', sidebarRoutes)
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
resolve(rewriteRoutes)
})
})
}
}
}
const sdata = JSON.parse(JSON.stringify(res.data));
const rdata = JSON.parse(JSON.stringify(res.data));
const sidebarRoutes = filterAsyncRouter(sdata);
const rewriteRoutes = filterAsyncRouter(rdata, false, true);
rewriteRoutes.push({ path: "*", redirect: "/404", hidden: true });
commit("SET_ROUTES", rewriteRoutes);
commit("SET_SIDEBAR_ROUTERS", constantRoutes.concat(sidebarRoutes));
commit("SET_DEFAULT_ROUTES", sidebarRoutes);
commit("SET_TOPBAR_ROUTES", sidebarRoutes);
resolve(rewriteRoutes);
});
});
},
},
};
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
return asyncRouterMap.filter(route => {
return asyncRouterMap.filter((route) => {
if (type && route.children) {
route.children = filterChildren(route.children)
route.children = filterChildren(route.children);
}
if (route.component) {
// Layout ParentView 组件特殊处理
if (route.component === 'Layout') {
route.component = Layout
} else if (route.component === 'ParentView') {
route.component = ParentView
if (route.component === "Layout") {
route.component = Layout;
} else if (route.component === "ParentView") {
route.component = ParentView;
} else {
route.component = loadView(route.component)
route.component = loadView(route.component);
}
}
if (route.children != null && route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, route, type)
route.children = filterAsyncRouter(route.children, route, type);
} else {
delete route['children']
delete route['redirect']
delete route["children"];
delete route["redirect"];
}
return true
})
return true;
});
}
function filterChildren(childrenMap, lastRouter = false) {
var children = []
var children = [];
childrenMap.forEach((el, index) => {
if (el.children && el.children.length) {
if (el.component === 'ParentView') {
el.children.forEach(c => {
c.path = el.path + '/' + c.path
if (el.component === "ParentView") {
el.children.forEach((c) => {
c.path = el.path + "/" + c.path;
if (c.children && c.children.length) {
children = children.concat(filterChildren(c.children, c))
return
children = children.concat(filterChildren(c.children, c));
return;
}
children.push(c)
})
return
children.push(c);
});
return;
}
}
if (lastRouter) {
el.path = lastRouter.path + '/' + el.path
el.path = lastRouter.path + "/" + el.path;
}
children = children.concat(el)
})
return children
children = children.concat(el);
});
return children;
}
export const loadView = (view) => { // 路由懒加载
return (resolve) => require([`@/views/${view}`], resolve)
}
export const loadView = (view) => {
// 路由懒加载
return (resolve) => require([`@/views/${view}`], resolve);
};
export default permission
export default permission;
......
......@@ -9,6 +9,7 @@ const user = {
state: {
token: getToken(),
name: '',
id: '',
avatar: '',
activePortName: '',
portNames: [],
......@@ -24,6 +25,9 @@ const user = {
SET_NAME: (state, name) => {
state.name = name
},
SET_ID: (state, id) => {
state.id = id
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar
},
......@@ -89,31 +93,32 @@ const user = {
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.data.user
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
let ports = [];
if (user.portName) {
ports = user.portName.split(',');
commit('SET_PORTNAMES', ports)
commit('SET_ACTIVEPORTNAME', sessionStorage.getItem('portName') ? sessionStorage.getItem('portName') : state.portNames[0])
} else {
Message({
message: "未找到口岸信息!请确认后再登录",
type: 'error'
})
this.LogOut().then(() => {
window.location.href = settings.loginURL;//wsso系统跳转
})
}
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.data.roles)
commit('SET_PERMISSIONS', res.data.permissions)
} else {
commit('SET_ROLES', ['ROLE_DEFAULT'])
if (res.code === 200) {
const user = res.data.user
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
let ports = [];
commit('SET_ID', user.userId)
if (user.portName) {
ports = user.portName.split(',');
commit('SET_PORTNAMES', ports)
commit('SET_ACTIVEPORTNAME', sessionStorage.getItem('portName') ? sessionStorage.getItem('portName') : state.portNames[0])
} else {
Message({
message: "未找到口岸信息!请确认后再登录",
type: 'error'
})
this.login()
}
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.data.roles)
commit('SET_PERMISSIONS', res.data.permissions)
} else {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar)
resolve(res)
}
commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar)
resolve(res)
}).catch(error => {
reject(error)
})
......
// 是否
export function isSure(type) {
if (type === 0 || type === "0" || type === false) {
return "否";
} else if (type === 1 || type === "1" || type === true) {
return "是";
}
}
// 布尔值转换
export function returnBoolean(type) {
if (type === 0 || type === "0") {
return false;
} else if (type === 1 || type === "1") {
return true;
}
}
export default {
isSure,
returnBoolean,
};
......@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: settings.baseURL,
baseURL: settings.baseURL, //接口地址
// 超时
timeout: 90000,
timeout: 30000
})
// request拦截器
......@@ -52,14 +52,14 @@ service.interceptors.request.use(config => {
// 响应拦截器
service.interceptors.response.use(res => {
if (res.headers['token']) {
setToken(res.headers['token'])
setToken(decodeURI(res.headers['token']))
}
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
// 获取错误信息
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 301) {
MessageBox.confirm('登录状态已过期,需重新登录!msg:' + msg, '系统提示', {
MessageBox.confirm('登录状态已过期,需重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
confirmButtonText: '重新登录',
......@@ -67,10 +67,9 @@ service.interceptors.response.use(res => {
}
).then(() => {
store.dispatch('LogOut').then(() => {
// location.href = '/';
window.location.href = settings.loginURL;//wsso系统跳转
location.href = settings.routerBase + '/index';
})
});
})
} else if (code === 403) {
//无权限页面
location.href = '/401';
......@@ -81,7 +80,7 @@ service.interceptors.response.use(res => {
type: 'error'
})
return Promise.reject(new Error(msg))
} else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) {
} else if (code !== 200 && code !== 201 && code !== 202 && code != 203 && code != 603) {
Message({
message: msg,
type: 'error'
......
......@@ -15,7 +15,7 @@ export function downLoadZip(str, data, filename) {
url: url,
data: data,
responseType: 'blob',
headers: { 'Authorization': decodeURIComponent(getToken()) }
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
resolveBlob(res, mimeMap.zip, filename)
})
......@@ -49,9 +49,9 @@ export function downLoadXlsx(str, data, fileName) {
method: 'post',
url: url,
data: data,
timeout: 500000,
responseType: 'blob',
headers: { 'Authorization': decodeURIComponent(getToken()) }
headers: { 'Authorization': getToken() }
// headers: { 'Authorization': decodeURIComponent(getToken()) }
//uat环境token需要做url解码处理
}).then(res => {
if (res.status === 200) {
......@@ -84,7 +84,7 @@ export function cargoXlsxPre(str, data) {
url: url,
data: data,
responseType: 'blob',
headers: { 'Authorization': decodeURIComponent(getToken()) }
headers: { 'Authorization': getToken() }
}).then(res => {
if (res.status === 200) {
cargoTableXlsxPre(res)
......
......@@ -112,7 +112,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input class="formItem" type="textarea" placeholder="PVG;PEK" v-model="siteName" :rows="1" clearable>
</el-input>
</el-form-item>
......@@ -261,7 +261,7 @@ export default {
size: 100,
allWeight: 0,
allQty: 0,
tableHeight: null,
tableHeight: 300,
dialogVisible: false,
shiftKey: false,
createDate: null,
......@@ -303,7 +303,7 @@ export default {
this.shiftKey = false;
}
});
this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60
// this.tableHeight = window.innerHeight - this.$refs.form.$el.offsetHeight - 60;
},
methods: {
//查询条件
......@@ -589,4 +589,4 @@ export default {
margin-top: 0px;
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -73,7 +73,7 @@ export default {
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "始发站", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
......@@ -266,4 +266,4 @@ export default {
<style>
</style>
\ No newline at end of file
</style>
......
<template>
<div class=''></div>
</template>
<script>
export default {
name: '',
components: {},
data() {
return {
}
},
computed: {},
created () {},
mounted () {},
methods: {}
}
</script>
<style lang='scss' scoped>
</style>
<template>
<div class=''></div>
</template>
<script>
export default {
name: '',
components: {},
data() {
return {
}
},
computed: {},
created () {},
mounted () {},
methods: {}
}
</script>
<style lang='scss' scoped>
</style>
export const formConfig = [
{
label: "重量(KG)",
type: "Input",
name: "minWeight",
prop: "minWeight",
placeholder: "0",
rules: {
required: true,
message: "最大重量不得小于0KG",
trigger: ["change", "blur"],
},
trigger: "blur", // 事件名
},
{
label: "",
type: "Input",
name: "maxWeight",
prop: "maxWeight",
placeholder: "34",
rules: {
required: true,
message: "最大重量不得大于34KG",
trigger: ["change", "blur"],
},
trigger: "blur", // 事件名
},
{
label: "件数",
type: "Input",
name: "minNumOfPieces",
prop: "minNumOfPieces",
placeholder: "0",
rules: {
required: true,
message: "最大重量不得小于0KG",
trigger: ["change", "blur"],
},
trigger: "blur", // 事件名
},
{
label: "",
type: "Input",
name: "maxNumOfPieces",
prop: "maxNumOfPieces",
placeholder: "34",
rules: {
required: true,
message: "最大重量不得大于34KG",
trigger: ["change", "blur"],
},
trigger: "blur", // 事件名
},
];
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
export const tableAttr = {
border: true,
loadingTable: false,
isDragSort: true, // 拖拽tableData数据一定要加id字段
maxHeight: 300,
btnCofig: {
isBtn: true,
btnGroup: [
{
type: "primary",
icon: "el-icon-plus",
btnName: "添加",
size: "mini",
round: false,
loading: false,
event: "add",
},
],
},
};
export const columnHeader = (deleteRow) => [
{
label: "航班号",
prop: "fltNo",
align: "center",
minWidth: 100,
},
{
label: "航班日期",
prop: "fltNoDate",
align: "center",
minWidth: 100,
// sortable: true,
// "sort-method": (a, b) => b.updateTime - a.updateTime,
},
{
label: "航线优先级",
prop: "fltRoute",
align: "center",
minWidth: 100,
},
{
label: "爆仓是否继续配舱",
prop: "isOn",
align: "center",
minWidth: 100,
render: (h, params) => {
const { row } = params;
console.log(345678,row);
// return h("div", `状态-${row.id}`);
},
},
{
label: "操作",
align: "center",
minWidth: 120,
render: (h, params) => {
return h("div", [
h(
"el-button",
{
style: {
color: "#ff4949",
},
props: {
type: "text",
size: "mini",
icon: "el-icon-delete",
},
on: {
click() {
deleteRow(params);
},
},
},
"删除"
),
]);
},
},
];
export const tableData = [
{
id: "1",
fltNo: "A380",
fltNoDate: "3",
fltRoute: "",
routeList: [],
isOn: "1",
sort: "1", // 排序字段
},
];
export const formConfig = [
{
label: "创建时间(从)",
type: "Date",
name: "startTime",
prop: "startTime",
placeholder: "请选择开始时间",
rules: { required: true, message: "请选择开始时间", trigger: "blur" },
},
{
label: "创建时间(到)",
type: "Date",
name: "endTime",
prop: "endTime",
placeholder: "请选择结束时间",
rules: { required: true, message: "请选择结束时间", trigger: "blur" },
},
{
label: "规则状态",
type: "Select",
name: "status",
prop: "status",
width: "140px",
placeholder: "请选择状态",
options: {
data: [
{
value: "1",
label: "有效",
},
{
value: "3",
label: "无效",
},
],
label: "有效",
value: "1",
},
},
];
export const editFormConfig = [
{
label: "航班号",
type: "Search",
name: "route",
prop: "fltNo",
placeholder: "请输入航班号",
rules: {
required: true,
message: "请输入航班号",
trigger: ["change", "blur"],
},
http: {
url: "/dictionary/queryRouteByFltNo",
method: "post",
data: {
fltNo: "",
},
},
},
{
label: "",
type: "inputNumber",
name: "count",
prop: "count",
placeholder: "+",
min: 0,
max: 7,
with: "50px",
},
{
label: "航线优先级",
type: "Input",
name: "route",
prop: "fltNum",
placeholder: "请选择航线优先级",
trigger: "focus",
},
{
label: "爆仓是否继续配舱",
type: "Checkbox",
name: "checked",
prop: "checked",
disabled: false,
},
];
<template>
<div class="form-header container">
<el-row>
<el-col>
<yl-form
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
@input="inputEvent"
@keyup="keyUpEvent"
/>
</el-col>
</el-row>
<yl-table
:attrs="tableAttr"
:loadingTable="tableAttr.loadingTable"
:columns="columns"
:tableData="tableData"
:pageConfig="pageConfig"
@sizeChange="handleSizeChange"
@currentChange="handleCurrentChange"
@search="searchBtn"
@restForm="restForm"
@add="addBtn"
>
</yl-table>
</div>
</template>
<script>
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 {
allDictData, // 获取全部字典
queryRouteByFltNo, // 航线查询
} from "@/api/destinationFlight";
export default {
components: {
YlForm,
YlTable,
},
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: { // 表单参数
status: "有效"
},
pageConfig: {
// 分页配置项
isPagination: true,
total: 13,
pageData: {
page: 1,
size: 10,
},
},
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
tableData: tableData, // 表格数据
selectionList: [], // table复选框筛选集合
};
},
created() {},
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, // 航班号
};
}
}
});
},
// input事件
inputEvent: debounce(function () {
this.queryRoute({
fltNo: this.queryForm.fltNo, // 航班号
});
}, 800),
// 回车事件
keyUpEvent(item) {
this.queryRoute(item);
},
// 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);
},
//页码变化
handleCurrentChange(e) {
this.pageConfig.pageData.page = e;
console.log("currentChange:", e);
},
// 搜索
searchBtn(row) {
this.$refs.ruleForm.handleSearch("ruleForm", (val) => {
console.log(val);
});
console.log(this.queryForm);
},
// 重置表单
restForm() {
this.$refs.ruleForm.resetFields("ruleForm");
},
// 添加
addBtn(item) {
console.log("add:", item);
this.$router.push({
name: "edit",
params: {
edit: 12,
},
});
},
// 编辑
editRow(item) {
this.$router.push({
name: "edit",
params: {
edit: 12,
},
});
console.log("修改:", item);
},
// 删除
deleteRow(item) {
this.$confirm("是否确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
console.log("删除:", item);
this.msgSuccess("删除成功!")
})
.catch(() => {});
},
// 查看
viewRow({ row }) {
this.$router.push({
name: "edit",
params: {
edit: 12,
},
});
console.log("查看:", row);
},
},
};
</script>
<style lang="scss" scoped></style>
const state = {
1: "有效",
3: "无效",
};
export const tableAttr = {
border: true,
loadingTable: false,
isDragSort: false, // 拖拽tableData数据一定要加id字段
maxHeight: 300,
btnCofig: {
isBtn: true,
btnGroup: [
{
type: "primary", // text、primary、danger
icon: "el-icon-search", // el-icon-edit 、el-icon-delete、el-icon-plus、el-icon-download、el-icon-upload el-icon--right
btnName: "搜索",
size: "mini", // medium / small / mini
round: false,
loading: false,
event: "search",
},
{
type: "info",
icon: "",
btnName: "重置",
size: "mini",
round: false,
loading: false,
event: "restForm",
},
{
type: "primary",
icon: "el-icon-plus",
btnName: "添加",
size: "mini",
round: false,
loading: false,
event: "add",
},
],
},
};
export const columnHeader = (viewRow, editRow, deleteRow) => [
{
type: "selection",
align: "center",
prop: "selection",
width: "50",
},
{
type: "index",
label: "序号",
prop: "id",
align: "center",
width: "50",
},
{
label: "原航班号",
prop: "fltNo",
align: "center",
minWidth: 100,
},
{
label: "顺位航班",
prop: "flightRand",
align: "center",
minWidth: 100,
},
{
label: "URSA包含",
prop: "includeUrsa",
align: "center",
minWidth: 100,
},
{
label: "URSA不包含",
prop: "notIncludeUrsa",
align: "center",
minWidth: 100,
},
{
label: "状态",
prop: "status",
align: "center",
minWidth: 100,
render: (h, params) => {
const { row } = params;
return h("div", `${state[row.status]}`);
},
},
{
label: "创建时间",
prop: "createTime",
align: "center",
minWidth: 100,
sortable: true,
"sort-method": (a, b) => b.createTime - a.createTime,
},
{
label: "创建人",
prop: "createUserName",
align: "center",
minWidth: 100,
},
{
label: "修改时间",
prop: "updateTime",
align: "center",
minWidth: 100,
},
{
label: "修改人",
prop: "updateUserName",
align: "center",
minWidth: 100,
},
{
label: "操作",
prop: "operate",
align: "center",
minWidth: 120,
fixed: "right",
render: (h, params) => {
return h("div", [
h(
"el-button",
{
props: {
type: "text",
size: "mini",
icon: "el-icon-view",
},
on: {
click() {
viewRow(params);
},
},
},
"查看"
),
h(
"el-button",
{
props: {
type: "text",
size: "mini",
icon: "el-icon-edit",
},
on: {
click() {
editRow(params);
},
},
},
"修改"
),
h(
"el-button",
{
style: {
color: "#ff4949",
},
props: {
type: "text",
size: "mini",
icon: "el-icon-delete",
},
on: {
click() {
deleteRow(params);
},
},
},
"删除"
),
]);
},
},
];
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",
},
];
......@@ -38,7 +38,7 @@
name: 'FlightAllocConfigInfo',
params: { handle: 'add', fltNo: 'new', fltDate: ' ', status: null, routeStatus: '' },
})
">添加</el-button>
">添加</el-button>
</div>
</el-form>
<Tables ref="newTables" ductName="FlightAlloc" :data="flyList" :headerData="tableHeaders['flightAlloc']" :order="true"
......@@ -47,7 +47,7 @@
<template v-slot:ruleDate="scope">
<el-link v-if="scope.row.ruleDate" type="primary" @click="toRouteOrder(scope.row)">
{{
scope.row.ruleDate
scope.row.ruleDate
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
......@@ -98,7 +98,7 @@ export default {
colData: {},
curPage: 1,
total: 0,
tableHeight: null,
tableHeight: 300,
open: false,
loading: false,
};
......@@ -109,7 +109,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.flightAllocForm.$el.offsetHeight - 200;
},
activated() {
this.getList()
......
This diff could not be displayed because it is too large.
......@@ -187,7 +187,7 @@ export default {
// 总条数
total: 0,
//table高度
tableHeight: null,
tableHeight: 300,
// 原航班规则数据
sourceFlightRulesList: [],
//目的航班数据
......@@ -249,7 +249,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 200;
},
activated() {
this.findSourceFlightRules();
......
......@@ -99,7 +99,7 @@ export default {
},//表单规则
dialogVisible: false,
total: 0,
tableHeight: null,
tableHeight: 300,
loading: false,
tableLoading: false,
};
......@@ -113,7 +113,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300
// this.tableHeight = window.innerHeight - this.$refs.preReviewOptions.offsetHeight - 300;
},
methods: {
//搜索
......
......@@ -23,7 +23,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1">
</el-input>
</el-form-item>
......@@ -53,7 +53,7 @@
}}</el-button>
</div>
</el-form>
<el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData">
<el-table max-height="300" highlight-current-row border stripe v-loading="loading" :data="tableData">
<el-table-column label="运单号" align="center" prop="waybillNo" />
<el-table-column label="申报类别" align="center" prop="typeName" />
<el-table-column label="件数" align="center" prop="qty" width="70" />
......@@ -106,7 +106,7 @@ export default {
fltNo: null,
//运单号
waybillNo: "",
//站点
//始发站
siteName: "",
//ursa
ursa: "",
......
......@@ -466,7 +466,7 @@ export default {
//总条数
total: 0,
//表格高度
tableHeight: null,
tableHeight: 250,
//新增修改查看规则弹出层
open: false,
//是否显示查看目的航班弹出层
......@@ -502,8 +502,7 @@ export default {
this.shiftKey = false;
}
});
this.tableHeight =
window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
// this.tableHeight = window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120;
},
methods: {
//输入航班号后
......
......@@ -20,7 +20,7 @@
<el-form-item label="货站名称" prop="goodsStation">
<el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
:loading="goodsStationLoading" placeholder="不限">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item">
<el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
......@@ -279,4 +279,4 @@ export default {
margin-left: 10px;
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -81,7 +81,7 @@ export default {
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
tableHeight: 300,
totalCount: 0,
openStatus: '',
loading: false,
......@@ -92,7 +92,7 @@ export default {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
this.selection(1)
},
watch: {
......@@ -244,4 +244,8 @@ export default {
<style lang="scss" scoped>
</style>
\ No newline at end of file
<<<<<<< HEAD
</style>
=======
</style>
>>>>>>> test
......
......@@ -20,7 +20,7 @@
<el-form-item label="货站名称" prop="goodsStation">
<el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
:loading="goodsStationLoading" placeholder="不限">
<el-option v-for="(item, index) in goodsStationList" :label="item" :value="item" :key="item">
<el-option v-for="item in goodsStationList" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
......@@ -279,4 +279,4 @@ export default {
margin-left: 10px;
}
}
</style>
\ No newline at end of file
</style>
......
......@@ -81,7 +81,7 @@ export default {
checkData: [],
fileList: [],
errorData: [],
tableHeight: null,
tableHeight: 300,
totalCount: 0,
openStatus: '',
loading: false,
......@@ -92,7 +92,7 @@ export default {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.goodsStation.$el.offsetHeight - 200;
this.selection(1)
},
watch: {
......@@ -244,4 +244,4 @@ export default {
<style lang="scss" scoped>
</style>
\ No newline at end of file
</style>
......
......@@ -64,7 +64,7 @@ export default {
tableData: [],
tableHeader: this.tableHeaders['goodsStationFlight'],
checkData: [],
tableHeight: null,
tableHeight: 300,
totalCount: 0,
loading: false,
open: false,
......@@ -73,7 +73,7 @@ export default {
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.goodsStationFlight.$el.offsetHeight - 200;
this.selection(1)
},
watch: {
......
......@@ -53,7 +53,7 @@ export default {
size: 100
},
tableHeader: this.tableHeaders['cargoLog'],
tableHeight: 600,
tableHeight: 300,
loading: false
}
},
......@@ -94,4 +94,4 @@ export default {
<style scoped>
</style>
\ No newline at end of file
</style>
......
......@@ -58,7 +58,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" :rows="4" clearable>
</el-input>
</el-form-item>
......@@ -139,7 +139,7 @@
</template>
<el-select class="formItem" v-model="formData.cargoPlaneRoute" placeholder="不限"
:disabled="routeList.length == 0" clearable @change="routeSelectChange" :key="formData.cargoPlaneRoute">
<el-option v-for="(item, index) in routeList" :label="item" :value="item" :key="item">
<el-option v-for="item in routeList" :label="item" :value="item" :key="item">
<Tooltips :content="item" :refName="item"></Tooltips>
</el-option>
</el-select>
......@@ -149,7 +149,7 @@
<el-form-item label="预审状态">
<el-select v-model="formData.preStatus" placeholder="不限" class="formItem" clearable multiple>
<el-option v-for="item in findConditionData.preQualificationStatus" :label="item == '' ? '非预审' : item"
:value="item"> </el-option>
:value="item" :key="item"> </el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -353,7 +353,7 @@ export default {
limitSize: 100, //无限制-1
page: 1,
progress: 0,
tableHeight: null,
tableHeight: 250,
dialogVisible: false,
openView: false,
openTransfer: false,
......@@ -367,7 +367,7 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
// this.select(0,'create')
this.select(0,'create')
},
activated() {
......@@ -441,7 +441,7 @@ export default {
this.shiftKey = false;
}
});
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
// this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50
},
watch: {
$route: {
......@@ -489,7 +489,7 @@ export default {
}
},
formShow(val, oldVal) {
this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
// this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 120
},
},
methods: {
......@@ -868,4 +868,4 @@ export default {
float: right;
margin-right: 5px;
}
</style>
\ No newline at end of file
</style>
......
......@@ -72,7 +72,7 @@ export default {
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "始发站", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
{ name: "实际重量", value: "actualWeight", width: "" },
......@@ -286,4 +286,4 @@ export default {
};
</script>
<style></style>
\ No newline at end of file
<style></style>
......
......@@ -34,7 +34,7 @@
</el-form-item>
<el-form-item label="航班种类">
<el-select v-model="selectData.kindId" placeholder="不限" @change="getFlight" clearable>
<el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id"></el-option>
<el-option v-for="item in fltKindIdList" :label="item.englishName" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -42,7 +42,7 @@
</el-form-item>
</el-form>
<el-row class="card2">
<el-col :span="1" v-for="item in fltBox">
<el-col :span="1" v-for="item in fltBox" :key="item.fltNo">
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
......@@ -60,7 +60,7 @@
<template v-slot:percentage="scope">
<el-progress stroke-width="100"
:color="(scope.row.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (scope.row.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949'"
:stroke-width="18"
:strokeWidth="18"
:percentage="scope.row.percentage == 0 ? 0 : Number((scope.row.percentage * 100).toFixed(2))">
</el-progress>
</template>
......@@ -96,7 +96,7 @@ export default {
totalWeight: 0,//航班总重量
allocationWeight: 0,//航班已配重量
type: "",
tableHeight: null,
tableHeight: 300,
total: 0,
loading: false,
};
......@@ -109,7 +109,7 @@ export default {
// this.getFlight()
// },
mounted() {
this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350
// this.tableHeight = window.innerHeight - this.$refs.card1.$el.offsetHeight - this.$refs.indexForm.$el.offsetHeight - 350
this.getFlight()
},
methods: {
......
......@@ -71,6 +71,7 @@ export default {
const username = localStorage.getItem("username");
const password = localStorage.getItem("password");
const rememberMe = localStorage.getItem("rememberMe");
// console.log("rememberMe:", rememberMe)
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : password,
......
......@@ -56,7 +56,6 @@
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
......@@ -78,7 +77,7 @@ export default {
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['flightToArea'],
tableHeight: null,
tableHeight: 300,
total: 0,
flightType: [],
form: {
......@@ -100,7 +99,7 @@ export default {
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
// this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
this.selection(1)
},
activated() {
......@@ -210,4 +209,4 @@ export default {
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
</style>
......
......@@ -56,7 +56,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-form-item label="始发站">
<el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
:rows="4" clearable>
</el-input>
......@@ -131,7 +131,7 @@ export default {
tableHeader: this.tableHeaders['preMdeSelect'],
accsDate: [],
valueFormat: "yyyy-MM-dd",
tableHeight: null,
tableHeight: 250,
tableLoading: false,
downloading: false,
totalCount: 0,
......@@ -141,7 +141,7 @@ export default {
this.selectOptionData()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
// this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150;
this.select(0)
},
watch: {
......@@ -243,4 +243,4 @@ export default {
<style>
</style>
\ No newline at end of file
</style>
......
......@@ -221,4 +221,4 @@ export default {
}
</script>
<style></style>
\ No newline at end of file
<style></style>
......
......@@ -54,4 +54,4 @@ export default {
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<style lang="scss" scoped></style>
......
......@@ -58,7 +58,6 @@
</Tables>
</div>
</template>
<script>
import {
downLoadTemplate,
......@@ -79,7 +78,7 @@ export default {
tableData: [],
errorData: [],
tableHeaders: this.tableHeaders['ursaToArea'],
tableHeight: null,
tableHeight: 300,
total: 0,
flightType: [],
form: {
......@@ -101,7 +100,7 @@ export default {
created() {
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170
// this.tableHeight = window.innerHeight - this.$refs.selectForm.$el.offsetHeight - 170;
this.selection(1)
},
activated() {
......@@ -217,4 +216,4 @@ export default {
margin-left: 10px;
vertical-align: top;
}
</style>
\ No newline at end of file
</style>
......
......@@ -3,7 +3,7 @@
<el-card style="margin-bottom:10px">
<!-- cardHeader -->
<div slot="header" class="clearfix">
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '始发站' :
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
}}</span>
......@@ -199,7 +199,7 @@ export default {
addDictionary: {},//选择数据
nowSelect: [],
tableName: '',
tableHeight: null,
tableHeight: 300,
total: 0,
status: null,
loading: false,
......@@ -215,8 +215,18 @@ export default {
// }
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
// this.tableHeight = window.innerHeight - this.$refs.dictForm.$el.offsetHeight - 270
},
filters: {
// 是否为ET86航线
isEtesRoute(val) {
if(val == "N"){
return "否"
}else{
return "是"
}
},
},
watch: {
tableName(val, oldVal) {
this.tableName = val
......@@ -497,4 +507,4 @@ export default {
font-size: 14px;
font-weight: 600;
}
</style>
\ No newline at end of file
</style>
......
......@@ -34,7 +34,7 @@
:limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading"
:height="tableHeight" @sizeChange="sizeChange" @currentChange="currentChange">
<template slot="optionColumn">
<el-table-column header-align="center" align="center" label="操作">
<el-table-column header-align="center" align="left" label="操作" min-width="210px">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button>
<el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:role:update']">修改
......@@ -42,7 +42,7 @@
<el-button :type="scope.row.valid == 1 ? 'warning' : 'primary'" size="mini"
v-hasPermi="['system:role:openClose']" @click="roleStatus(scope)">{{ scope.row.valid == 1 ? "停用" : "启用" }}
</el-button>
<el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']">删除角色
<el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']" style="margin-top: 5px;margin-left: 0;">删除角色
</el-button>
</template>
</el-table-column>
......@@ -85,7 +85,7 @@ export default {
roleFormDisabled: false,
tableLoading: false,
total: 0,
tableHeight: null
tableHeight: 300
};
},
created() {
......@@ -94,7 +94,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
// this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250
},
activated() {
this.selectRoleList();
......@@ -247,4 +247,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
</style>
......
......@@ -32,7 +32,7 @@
:loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :height="tableHeight"
@sizeChange="sizeChange" @currentChange="currentChange">
<template slot="optionColumn">
<el-table-column header-align="center" align="center" width="auto" label="操作">
<el-table-column header-align="center" align="left" min-width="210px" label="操作">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button>
<el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:user:update']">修改
......@@ -112,7 +112,7 @@ export default {
drawerTitle: "",
total: 0,
loading: false,
tableHeight: null
tableHeight: 300
};
},
created() {
......@@ -121,7 +121,7 @@ export default {
}
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250
// this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250;
},
activated() {
this.selectUser();
......@@ -255,4 +255,4 @@ export default {
<style>
</style>
\ No newline at end of file
</style>
......
......@@ -55,7 +55,7 @@ export default {
},
data: [],
tableHeader: this.tableHeaders['archiveData'],
tableHeight: null,
tableHeight: 300,
total: 0,
loading: false,
}
......@@ -64,7 +64,7 @@ export default {
this.selectLog()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
// this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
},
methods: {
selectLog(val) {
......@@ -117,4 +117,4 @@ export default {
<style lang="scss" scoped>
</style>
\ No newline at end of file
</style>
......
......@@ -115,7 +115,7 @@ export default {
selectDate: null,
createTimes: [],
total: 0,
tableHeight: null,
tableHeight: 300,
loading: false,
valueFormat: "yyyy-MM-dd",
};
......@@ -130,8 +130,7 @@ export default {
this.data = [];
},
mounted() {
this.tableHeight =
window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
// this.tableHeight = window.innerHeight - this.$refs.dmLogForm.$el.offsetHeight - 130;
},
methods: {
//数据查询
......@@ -222,4 +221,4 @@ export default {
.tagTip {
margin: 0 5px;
}
</style>
\ No newline at end of file
</style>
......
......@@ -96,7 +96,7 @@ export default {
children: 'children',
label: 'label'
},
tableHeight: null,
tableHeight: 300,
total: 0,
loading: false
}
......@@ -109,7 +109,7 @@ export default {
this.selectLog();
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
// this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
},
methods: {
getModule() {
......@@ -166,4 +166,4 @@ export default {
<style lang="scss" scoped>
</style>
\ No newline at end of file
</style>
......
//version:0.5.3
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
......@@ -34,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: defaultSettings.baseURL,
target: defaultSettings.baseURL, //阿里云服务器
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......