jinhui.wang

ver1.7.8,pi10测试内容增加,permde页面,报表页面,功能优化,样式更新,文本修正

Showing 55 changed files with 1886 additions and 462 deletions
......@@ -38,6 +38,7 @@
"dependencies": {
"axios": "0.21.1",
"core-js": "3.8.3",
"echarts": "^5.4.0",
"element-ui": "2.15.3",
"vue": "2.6.14",
"vue-router": "3.5.2",
......@@ -68,4 +69,4 @@
"> 1%",
"last 2 versions"
]
}
}
\ No newline at end of file
......
......@@ -119,4 +119,16 @@ export function batchMoveCargoToOtherFlight(data) {
method: 'post',
data: data
})
}
//生成历史数据文件
/**
* @param 同货物查询
*/
export function historyCargo(data) {
return request({
url: '/cargo/historyCargo',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -10,19 +10,19 @@ export function filghtKindData() {
export function downLoadTemplate(template) {
return request({
url: '/flightInfoImport/downLoadTemplate?template=' + template,
method: 'get',
responseType: 'blob',
url:'/flightInfoImport/downLoadTemplate?template=' + template,
method:'get',
responseType:'blob',
})
}
export function importFlight(file, type) {
export function importFlight(file, type){
let formData = new FormData();
formData.append("file", file);
formData.append("type", type);
return request({
url: '/flightInfoImport/importFlight',
method: 'post',
data: formData
url:'/flightInfoImport/importFlight',
method:'post',
data:formData
})
}
\ No newline at end of file
......
......@@ -59,4 +59,29 @@ export function findStationName() {
url: '/goods/findStationName',
method: 'post',
})
}
//批量导入
export function uploadGoodsExcel(file, goodsStation) {
let formData = new FormData();
formData.append("file", file);
formData.append("goodsStation", goodsStation);
return request({
url: '/goods/uploadGoodsExcel',
method: 'post',
data: formData
})
}
//查询上传日志
/**
* @param page 页长 *
* @param size 页数 *
*/
export function userImportLog(data) {
return request({
url: '/goods/userImportLog',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -84,4 +84,56 @@ export function searchUrsaDestination(data) {
method: 'post',
data: data
})
}
//preMde查询
/**
* @param flightNo 航班号
* @param fltDateStart 航班开始时间
* @param fltDateEnd 航班结束时间
* @param flightRoute 航线
* @param waybillNo 运单号
* @param ursa ursa
* @param typeName 申报类别
* @param siteName 站点
* @param regionArray 区域 list
* @param areaArray 地区 list
* @param serviceTypeArray 服务代码 list
* @param page * 页数
* @param size * 长度
*/
export function findDmPreMdeData(data) {
return request({
url: '/dmPreMde/findDmPreMdeData',
method: 'post',
data: data
})
}
//preMde页面查询条件
/**
*/
export function findDmPreMdeCondition(data) {
return request({
url: '/dmPreMde/findDmPreMdeCondition',
method: 'post',
data: data
})
}
//报表查询
/**
* @param ursas ursaslist
* @param serviceTypeArray serviceTypelist
* @param regionArray 区域
* @param areaArray 地区
* @param pickUpDate 取件日期
* @param dimensionName 维度名
*/
export function findPreMdeReport(data) {
return request({
url: '/preMdeReport/findPreMdeReport',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -38,4 +38,46 @@ export function findCargoDataChangeLog(data) {
url: '/cargo/findCargoDataChangeLog?accsId=' + data,
method: 'post',
})
}
// 功能模块查询
/**
*
*/
export function findModuleCondition() {
return request({
url: '/systemOperationLog/findModuleCondition',
method: 'post',
})
}
//操作日志查询
/**
* @param module 功能模块
* @param createTimeStart 操作时间开始
* @param createTimeEnd 操作时间结束
* @param page 页数
* @param size 页长
*/
export function getSystemOperationLogData(data) {
return request({
url: '/systemOperationLog/getSystemOperationLogData',
method: 'post',
data: data
})
}
//归档数据查询
/**
* @param createTimeStart 操作时间开始
* @param createTimeEnd 操作时间结束
* @param page 页数
* @param size 页长
*/
export function findArchiveCargoLog(data) {
return request({
url: '/archiveCargoLog/findArchiveCargoLog',
method: 'post',
data: data
})
}
\ No newline at end of file
......
......@@ -135,6 +135,26 @@ let ductLabels = {
"0": "关闭",
"1": "开启"
}
},
"preMdeSelect": {
"manualRde": {
},
},
'goodsLogStation': {
"status": {
"0": "未处理",
"1": "处理中",
"2": "处理成功",
"3": "处理失败"
}
},
"archiveDataTables": {
"status": {
"0": "未处理",
"1": "处理成功",
"2": "处理失败"
}
}
}
......
This diff is collapsed. Click to expand it.
<template>
<div :class="className" :style="{
height: height, width: width, paddingRight: padding
}" v-loading="loading" />
</template>
<script>
export default {
name: '',
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '350px'
},
chartData: {
type: Object,
required: true
},
loading: {
type: Boolean,
default: false
}
},
data() {
return {
chart: null,
padding: "10px"
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
}
}
},
methods: {
initChart() {
this.chart = this.$echarts.init(this.$el)
this.setOptions(this.chartData)
},
setOptions({ names, data1, data2, data3 } = {}) {
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
legend: {
show: true
},
dataZoom: [
{
type: 'inside',
xAxisIndex: [0],
},
{
type: 'slider',
show: true,
start: 0,
end: 85,
handleSize: 8
},
],
grid: {
top: '15%',
left: '2%',
right: '2%',
containLabel: true
},
xAxis: [{
type: 'category',
data: names,
axisTick: {
alignWithLabel: true
}
}],
yAxis: [{
type: 'value',
axisTick: {
show: false
}
}],
series: [{
name: '件数',
type: 'bar',
data: data1,
barWidth: '10%',
barGap: '0%',
label: {
show: true,
position: 'top',
fontSize: 14
},
animationDuration: 1000
},
{
name: '票数',
type: 'bar',
data: data2,
barWidth: '10%',
barGap: '0%',
label: {
show: true,
position: 'top',
fontSize: 14
},
animationDuration: 1000
},
{
name: '重量',
type: 'bar',
data: data3,
barWidth: '10%',
barGap: '0%',
label: {
show: true,
position: 'top',
fontSize: 14
},
animationDuration: 1000
}]
})
}
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -3,44 +3,43 @@
* Copyright (c) 2019 FedEx
*/
import store from '@/store'
import store from '@/store'
export default {
inserted(el, binding, vnode) {
const { value } = binding
const all_permission = "*:*:*";
const permissions = store.getters && store.getters.permissions
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value
const hasPermissions = permissions.some(permission => {
return all_permission === permission || permissionFlag.includes(permission)
})
if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
throw new Error(`请设置操作权限标签值`)
export default {
inserted(el, binding, vnode) {
const { value } = binding
const all_permission = "*:*:*";
const permissions = store.getters && store.getters.permissions
if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value
const hasPermissions = permissions.some(permission => {
return all_permission === permission || permissionFlag.includes(permission)
})
if (!hasPermissions) {
el.parentNode && el.parentNode.removeChild(el)
}
},
//路由权限处理
routerPer(router){
const permissions = store.getters && store.getters.permissions
let newRouter = [];
router.forEach(item => {
permissions.forEach(per=>{
if(item.meta.permissions == per){
newRouter.push(item)
}
})
if(item.children && item.children.length){
item.children = this.routerPer(item.children)
}
});
return newRouter
} else {
throw new Error(`请设置操作权限标签值`)
}
},
//路由权限处理
routerPer(router){
const permissions = store.getters && store.getters.permissions
let newRouter = [];
router.forEach(item => {
permissions.forEach(per=>{
if(item.meta.permissions == per){
newRouter.push(item)
}
})
if(item.children && item.children.length){
item.children = this.routerPer(item.children)
}
});
return newRouter
}
\ No newline at end of file
}
......
......@@ -16,7 +16,7 @@ export default {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
return this.$route.fullPath
}
}
}
......
......@@ -4,7 +4,7 @@
@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="verTip">开发版本</div>
<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="选择口岸">
......@@ -81,14 +81,25 @@ export default {
.dispatch("changePort", val)
.then((res) => {
if (res.code === 200) {
location.reload();
this.$store.dispatch('tagsView/delAllCachedViews')
this.$store.dispatch('tagsView/delAllVisitedViews')
// location.reload(false);
if (this.$route.path != '/index') {
this.$router.push('/index')
}
} else {
this.$confirm(res.msg, "提示", {
type: "warning",
}).then(() => {
location.reload();
// location.reload();
if (this.$route.path != '/index') {
this.$router.push('/index')
}
}).catch(() => {
location.reload();
// location.reload();
if (this.$route.path != '/index') {
this.$router.push('/index')
}
});
}
})
......@@ -104,13 +115,14 @@ export default {
},
async logout() {
this.$confirm("确定注销并退出系统吗?", "提示", {
closeOnClickModal: false,
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
window.location.href = this.settings.logoutURL
// window.location.href = "https://test.secure.fedex.com/logout";//wsso系统跳转
// this.$router.push('/')
window.location.href = this.settings.logoutURL;//wsso系统跳转
});
});
},
......@@ -218,4 +230,15 @@ export default {
}
}
}
.verTip {
width: auto;
height: 50px;
line-height: 50px;
font-size: 14px;
font-weight: 700;
position: absolute;
left: 50%;
color: #1890ff;
}
</style>
......
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 v-else class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1>
<h1 class="sidebar-title"
:style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title
}} </h1>
</router-link>
</transition>
</div>
......@@ -16,6 +21,8 @@
<script>
import logoImg from '@/assets/logo/logo.png'
import variables from '@/assets/styles/variables.scss'
import { createDecipheriv } from 'crypto';
import { mapState } from 'vuex'
export default {
name: 'SidebarLogo',
......@@ -26,19 +33,29 @@ export default {
}
},
computed: {
...mapState({
sidebar: state => state.app.sidebar,
}),
variables() {
return variables;
},
sideTheme() {
sideTheme() {
return this.$store.state.settings.sideTheme
}
},
data() {
return {
title: 'IMAC管理系统',
logo: logoImg
logo: logoImg,
logoClassName: 'sidebar-logo'
}
}
},
created() {
this.logoClassName = localStorage.getItem('logoName')
},
updated() {
this.logoClassName = localStorage.getItem('logoName')
},
}
</script>
......@@ -66,7 +83,7 @@ export default {
width: 100%;
& .sidebar-logo {
//width: 32px;
width: auto;
height: 32px;
vertical-align: middle;
margin-right: 12px;
......@@ -82,6 +99,13 @@ export default {
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
& .sidebar-logo-mini {
width: auto;
height: 24px;
vertical-align: middle;
margin-right: 12px;
}
}
&.collapse {
......
<template>
<div
:class="{ 'has-logo': showLogo }"
:style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg,
}"
>
<div :class="{ 'has-logo': showLogo }" :style="{
backgroundColor:
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg,
}">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="
settings.sideTheme === 'theme-dark'
? variables.menuBg
: variables.menuLightBg
"
:text-color="
settings.sideTheme === 'theme-dark'
? variables.menuText
: 'rgba(0,0,0,.65)'
"
:unique-opened="true"
:active-text-color="settings.theme"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
</el-menu>
<div class="version">{{ version }}</div>
" :text-color="
settings.sideTheme === 'theme-dark'
? variables.menuText
: 'rgba(0,0,0,.65)'
" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
:base-path="route.path" />
</el-menu>
<div class="version">{{ version }}</div>
</el-scrollbar>
</div>
</template>
......
......@@ -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;
}
}
}
......
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<right-panel v-if="showSettings">
<right-panel v-if="false">
<settings />
</right-panel>
</div>
......@@ -64,45 +65,45 @@ export default {
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
&.mobile.openSidebar {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.mobile .fixed-header {
width: 100%;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.mobile .fixed-header {
width: 100%;
}
</style>
......
......@@ -11,7 +11,10 @@ import App from './App'
import store from './store'
import router from './router'
import permission from './directive/permission'
import i18n from './i18n/index'
import * as echarts from 'echarts/core'
import { BarChart } from 'echarts/charts'
import { CanvasRenderer } from 'echarts/renderers'
import { LegendComponent, TooltipComponent, TitleComponent, GridComponent, DataZoomComponent } from 'echarts/components'
import './assets/icons' // icon
import './permission' // permission control
......@@ -29,6 +32,7 @@ import dictLabels from "@/assets/languages/dictLabels.js"
import settings from './settings.js'
// 全局方法挂载
Vue.prototype.$echarts = echarts
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
......@@ -69,6 +73,15 @@ Vue.component('HeaderSetting', HeaderSetting)
Vue.component('Drag', Drag)
Vue.use(permission)
Vue.directive('focus', {
inserted: function (el) {
// el表示指令所绑定的元素
el.querySelector('input').focus()
}
});
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
......@@ -89,6 +102,7 @@ Vue.use(Element, {
//size: Cookies.get('size') || 'medium' // set element-ui default size
// size: localStorage.getItem('size') || 'medium' // set element-ui default size
})
echarts.use([CanvasRenderer, LegendComponent, TitleComponent, GridComponent, BarChart, TooltipComponent, DataZoomComponent])
Vue.config.productionTip = false
......@@ -96,6 +110,6 @@ new Vue({
el: '#app',
router,
store,
i18n,
echarts,
render: h => h(App)
})
......
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import { getToken } from '@/utils/auth'
import { getToken, removeToken } from '@/utils/auth'
const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
router.beforeEach((to, from, next) => {
if (getToken()) {
/* has token*/
......@@ -33,6 +33,7 @@ router.beforeEach((to, from, next) => {
}
}
} else {
removeToken()
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
......
......@@ -89,7 +89,13 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
name: 'UpDateResult',
meta: { title: '导入信息', icon: 'user' }
}
},
{
path: '/goodsLog',
component: (resolve) => require(['@/views/basicInformation/goodsStation/goodsUploadLog'], resolve),
name: 'GoodsUploadLog',
meta: { title: '导入日志', icon: 'user' }
},
]
},
]
......
......@@ -58,5 +58,5 @@ module.exports = {
/**
* 版本号
*/
version: 'version:1.7.0'
version: 'version:1.7.8'
}
......
......@@ -15,12 +15,15 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
//Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
// Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
//Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
......@@ -30,6 +33,7 @@ const mutations = {
},
SET_SIZE: (state, size) => {
state.size = size
//Cookies.set('size', size)
localStorage.setItem('size', size)
}
}
......
......@@ -137,6 +137,7 @@ const user = {
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
logout(state.token).then(() => {
// window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout";//wsso系统跳转
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
......@@ -151,6 +152,7 @@ const user = {
// 前端 登出
FedLogOut({ commit }) {
return new Promise(resolve => {
// window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout";//wsso系统跳转
commit('SET_TOKEN', '')
removeToken()
resolve()
......
......@@ -2,202 +2,202 @@
* 通用js方法封装处理
* Copyright (c) 2019 FedEx
*/
import { queryRoute } from '@/api/system/dictionary.js'
const baseURL = process.env.VUE_APP_BASE_API
// 日期格式化
export function parseTime(time, pattern) {
//debugger
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
// 表单重置
export function resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
}
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
var search = params;
search.params = {};
if (null != dateRange && '' != dateRange) {
if (typeof (propName) === "undefined") {
search.params["beginTime"] = dateRange[0];
search.params["endTime"] = dateRange[1];
} else {
search.params["begin" + propName] = dateRange[0];
search.params["end" + propName] = dateRange[1];
}
}
return search;
}
// 回显数据字典
export function selectDictLabel(datas, value) {
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) {
actions.push(datas[key].dictLabel);
return true;
}
})
return actions.join('');
}
// 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) {
var actions = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
Object.keys(value.split(currentSeparator)).some((val) => {
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + temp[val])) {
actions.push(datas[key].dictLabel + currentSeparator);
}
})
})
return actions.join('').substring(0, actions.join('').length - 1);
}
// 通用下载方法
export function download(fileName) {
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
}
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;
str = str.replace(/%s/g, function () {
var arg = args[i++];
if (typeof arg === 'undefined') {
flag = false;
return '';
}
return arg;
});
return flag ? str : '';
}
// 转换字符串,undefined,null等转化为""
export function praseStrEmpty(str) {
if (!str || str == "undefined" || str == "null") {
return "";
}
return str;
}
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
*/
export function handleTree(data, id, parentId, children) {
let config = {
id: id || 'id',
parentId: parentId || 'parentId',
childrenList: children || 'children'
};
var childrenListMap = {};
var nodeIds = {};
var tree = [];
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let t of tree) {
adaptToChildrenList(t);
}
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
}
//字符串英文转大写,;转英文;
export function upCase(str) {
let newStr = str.replace(/;/g, ";").toUpperCase().trim();
return newStr;
}
//当前日期
export function nowDate() {
let date = new Date()
return `${date.getFullYear()}-${(date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)}-${(date.getDate()) > 9 ? date.getDate() : '0' + (date.getDate())}`
}
//获取航线
export function getRoute(val) {
return queryRoute({ fltNo: val }).then(res => {
if (res.code === 200) {
return res.data
} else {
return res.msg
}
}).catch(err => {
console.log(err)
})
}
\ No newline at end of file
import { queryRoute } from '@/api/system/dictionary.js'
const baseURL = process.env.VUE_APP_BASE_API
// 日期格式化
export function parseTime(time, pattern) {
//debugger
if (arguments.length === 0 || !time) {
return null
}
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object') {
date = time
} else {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return time_str
}
// 表单重置
export function resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
}
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
var search = params;
search.params = {};
if (null != dateRange && '' != dateRange) {
if (typeof (propName) === "undefined") {
search.params["beginTime"] = dateRange[0];
search.params["endTime"] = dateRange[1];
} else {
search.params["begin" + propName] = dateRange[0];
search.params["end" + propName] = dateRange[1];
}
}
return search;
}
// 回显数据字典
export function selectDictLabel(datas, value) {
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) {
actions.push(datas[key].dictLabel);
return true;
}
})
return actions.join('');
}
// 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) {
var actions = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
Object.keys(value.split(currentSeparator)).some((val) => {
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + temp[val])) {
actions.push(datas[key].dictLabel + currentSeparator);
}
})
})
return actions.join('').substring(0, actions.join('').length - 1);
}
// 通用下载方法
export function download(fileName) {
window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
}
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;
str = str.replace(/%s/g, function () {
var arg = args[i++];
if (typeof arg === 'undefined') {
flag = false;
return '';
}
return arg;
});
return flag ? str : '';
}
// 转换字符串,undefined,null等转化为""
export function praseStrEmpty(str) {
if (!str || str == "undefined" || str == "null") {
return "";
}
return str;
}
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
*/
export function handleTree(data, id, parentId, children) {
let config = {
id: id || 'id',
parentId: parentId || 'parentId',
childrenList: children || 'children'
};
var childrenListMap = {};
var nodeIds = {};
var tree = [];
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let t of tree) {
adaptToChildrenList(t);
}
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
}
//字符串英文转大写,;转英文;
export function upCase(str) {
let newStr = str.replace(/;/g, ";").toUpperCase().trim();
return newStr;
}
//当前日期
export function nowDate() {
let date = new Date()
return `${date.getFullYear()}-${(date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)}-${(date.getDate()) > 9 ? date.getDate() : '0' + (date.getDate())}`
}
//获取航线
export function getRoute(val) {
return queryRoute({ fltNo: val }).then(res => {
if (res.code === 200) {
return res.data
} else {
return res.msg
}
}).catch(err => {
console.log(err)
})
}
\ No newline at end of file
......
......@@ -4,19 +4,19 @@ const TokenKey = 'iMac-Token'
export function getToken() {
//return Cookies.get(TokenKey)
// return localStorage.getItem(TokenKey)
return sessionStorage.getItem(TokenKey)
return localStorage.getItem(TokenKey)
// return sessionStorage.getItem(TokenKey)
}
export function setToken(token) {
//return Cookies.set(TokenKey, token)
// return localStorage.setItem(TokenKey, token)
return sessionStorage.setItem(TokenKey, token)
return localStorage.setItem(TokenKey, token)
// return sessionStorage.setItem(TokenKey, token)
}
export function removeToken() {
//return Cookies.remove(TokenKey)
// return localStorage.removeItem(TokenKey)
sessionStorage.removeItem('portName')
return sessionStorage.removeItem(TokenKey)
return localStorage.removeItem(TokenKey)
// return sessionStorage.removeItem(TokenKey)
}
......
......@@ -5,12 +5,12 @@ import { parseTime } from './FedEx'
*/
export function formatDate(cellValue) {
if (cellValue == null || cellValue == "") return "";
var date = new Date(cellValue)
var date = new Date(cellValue)
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
}
......@@ -218,7 +218,7 @@ export function getTime(type) {
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
const later = function() {
const later = function () {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
......@@ -235,7 +235,7 @@ export function debounce(func, wait, immediate) {
}
}
return function(...args) {
return function (...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
......@@ -330,7 +330,7 @@ export function makeMap(str, expectsLowerCase) {
? val => map[val.toLowerCase()]
: val => map[val]
}
export const exportDefault = 'export default '
export const beautifierConf = {
......@@ -387,4 +387,4 @@ export function camelCase(str) {
export function isNumberStr(str) {
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
}
......
......@@ -9,9 +9,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.VUE_APP_BASE_API,
baseURL: settings.baseURL,
baseURL: settings.baseURL, //接口地址
// 超时
timeout: 30000
})
......@@ -60,7 +58,7 @@ service.interceptors.response.use(res => {
// 获取错误信息
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 301) {
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
MessageBox.confirm('登录状态已过期,重新登录', '系统提示', {
closeOnClickModal: false,
showCancelButton: false,
confirmButtonText: '重新登录',
......@@ -68,7 +66,7 @@ service.interceptors.response.use(res => {
}
).then(() => {
store.dispatch('FedLogOut').then(() => {
location.href = settings.logoutURL;
location.href = settings.routerBase + '/index';
})
})
} else if (code === 403) {
......
......@@ -81,3 +81,9 @@ export function isArray(arg) {
}
return Array.isArray(arg)
}
// 验证手机号码
export function validPhoneNumber(value) {
const reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
return reg.test(value)
}
\ No newline at end of file
......
......@@ -6,17 +6,18 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
const baseUrl = settings.downLoadURL //阿里云服务器
const baseUrl = settings.downLoadURL //接口地址
export function downLoadZip(str, filename) {
export function downLoadZip(str, data, filename) {
var url = baseUrl + str
axios({
method: 'get',
method: 'post',
url: url,
data: data,
responseType: 'blob',
headers: { 'Authorization': getToken() }
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
resolveBlob(res, mimeMap.zip)
resolveBlob(res, mimeMap.zip, filename)
})
}
......@@ -106,3 +107,4 @@ export function cargoTableXlsxPre(val) {
aLink.click()
document.body.removeChild(aLink);
}
......
......@@ -511,7 +511,6 @@ export default {
},
//获取航班号航线
fltNoChange(val) {
console.log(val)
this.routeList = []
getAccsRoute({ fltNoAccs: val }).then(res => {
if (res.code === 200) {
......
......@@ -8,7 +8,7 @@
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value"
:label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter">
:label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter">
</el-table-column>
</el-table>
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
......@@ -69,9 +69,9 @@ export default {
overweight: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName", width: "" },
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName" , width: ""},
{ name: "货物状态", value: "statusName", width: "" },
{ name: "站点", value: "siteName", width: "" },
{ name: "申报类型", value: "typeName", width: "" },
{ name: "URSA", value: "ursa", width: "" },
......@@ -79,8 +79,8 @@ export default {
{ name: "件数", value: "qty", width: "" },
{ name: "ACCS原航班号", value: "fltNoAccs", width: "120" },
{ name: "ACCS原航班日期", value: "fltDateAccs", width: "130" },
{ name: "品名描述", value: "nameDescription" , width: ""},
{ name: "是否自动", value: "cargoRulesStatus" , width: ""},
{ name: "品名描述", value: "nameDescription", width: "" },
{ name: "是否自动", value: "cargoRulesStatus", width: "" },
{ name: "创建人", value: "createUserName", width: "" },
{ name: "创建时间", value: "createTime", width: "" },
],
......
......@@ -11,7 +11,7 @@
<el-row class="mb20">
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input v-model.tirm="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
<el-input v-model.trim="infoForm.fltNo" @change="getRoutes" :disabled="fltNoDisabled">
</el-input>
</el-form-item>
</el-col>
......@@ -24,7 +24,7 @@
</el-col>
<el-col :span="6" v-if="infoForm.route != null && infoForm.route != ' ' && infoForm.route != ''">
<el-form-item label="航线">
<el-input v-model.tirm="infoForm.route" @change="getRoutes" disabled>
<el-input v-model.trim="infoForm.route" @change="getRoutes" disabled>
</el-input>
</el-form-item>
</el-col>
......@@ -619,7 +619,7 @@ export default {
this.isEmpty = true
}
} else {
this.msgWarning("查询到数据!")
this.msgWarning("查询到数据!")
this.isEmpty = true
}
}).catch(err => {
......@@ -964,7 +964,6 @@ export default {
this.infoForm.list[val].serviceCode = []
this.infoForm.list[val].handlingCode = []
this.infoForm.list[val].subCategory = []
console.log(this.infoForm)
this.$forceUpdate()
},
//启用,停用
......@@ -1060,12 +1059,12 @@ export default {
val.maxWeight == null ? val.maxWeight = undefined : val.maxWeight = val.maxWeight//最大重量
val.minNumOfPieces == null ? val.minNumOfPieces = undefined : val.minNumOfPieces = val.minNumOfPieces//最小件数
val.minWeight == null ? val.minWeight = undefined : val.minWeight = val.minWeight//最小件数
val.typeOfGoods != null && val.typeOfGoods != "" ? val.typeOfGoods = val.typeOfGoods.split(';') : val.typeOfGoods = []//申报类型
val.declarationCategory != null && val.declarationCategory != "" ? val.declarationCategory = val.declarationCategory.split(';') : val.declarationCategory = []//货物类型
val.puporpuxCode != null && val.puporpuxCode != "" ? val.puporpuxCode = val.puporpuxCode.split(';') : val.puporpuxCode = []//取件扫描码
val.serviceCode != null && val.serviceCode != "" ? val.serviceCode = val.serviceCode.split(';') : val.serviceCode = []//serviceCode
val.handlingCode != null && val.handlingCode != "" ? val.handlingCode = val.handlingCode.split(';') : val.handlingCode = []//handlingCode
val.subCategory != null && val.subCategory != "" ? val.subCategory = val.subCategory.split(';') : val.subCategory = []//subCategory
val.typeOfGoods != null && val.typeOfGoods != '' ? val.typeOfGoods = val.typeOfGoods.split(';') : val.typeOfGoods = []//申报类型
val.declarationCategory != null && val.declarationCategory != '' ? val.declarationCategory = val.declarationCategory.split(';') : val.declarationCategory = []//货物类型
val.puporpuxCode != null && val.puporpuxCode != '' ? val.puporpuxCode = val.puporpuxCode.split(';') : val.puporpuxCode = []//取件扫描码
val.serviceCode != null && val.serviceCode != '' ? val.serviceCode = val.serviceCode.split(';') : val.serviceCode = []//serviceCode
val.handlingCode != null && val.handlingCode != '' ? val.handlingCode = val.handlingCode.split(';') : val.handlingCode = []//handlingCode
val.subCategory != null && val.subCategory != '' ? val.subCategory = val.subCategory.split(';') : val.subCategory = []//subCategory
return val
},
//提交数据处理
......@@ -1195,4 +1194,27 @@ export default {
text-align: center;
}
}
</style>
\ No newline at end of file
</style>
.fontWeight {
font-size: 16px;
font-weight: 700;
text-indent: 2em;
}
.rowPadding {
padding: 10px 50px;
font-size: 12px;
}
.routeTip {
margin-left: 35px;
margin-bottom: 20px;
font-size: 16px;
color: #ff4949;
}
.numberInput {
input {
text-align: center;
}
}
......
......@@ -67,7 +67,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate, scope.row.route)">查看配置维度
@click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate,scope.row.route)">查看配置维度
</el-button>
</template>
</el-table-column>
......@@ -271,7 +271,7 @@ export default {
handleClick(fltNo, handle, fltDate, route) {
this.openFlightDate = false;
let obj = {
id: ' ',
id:' ',
handle: handle,
fltNo: fltNo,
fltDate: fltDate != null ? fltDate : ' ',
......
......@@ -49,7 +49,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="warning" :disabled="tableData.length == 0" v-hasPermi="['base:caExport:export']"
@click="xlse()" :loading="downLoadingTip.downloading" icon="el-icon-download" size="mini">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出"
downLoadingTip.downloading ? downLoadingTip.tip : "导出"
}}</el-button>
</div>
</el-form>
......
......@@ -71,7 +71,6 @@ export default {
this.$message.error("下载失败");
}
});
},
uploadExcel(option) {
//上传excel
......
<template>
<div>
<el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%"
:close-on-click-modal="false" :show-close="false" append-to-body center>
<el-dialog :title="openStatus == 'add' ? '新 增' : openStatus == 'downloadExcel' ? '导出Excel' : '导入Excel'"
:visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<div v-if="openStatus == 'add'">
......@@ -15,7 +15,7 @@
</el-input>
</el-form-item>
</div>
<div v-else>
<div v-else-if="openStatus == 'downloadExcel'">
<el-form-item label="货站名称" prop="goodsStation">
<el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
:loading="goodsStationLoading" placeholder="不限">
......@@ -25,18 +25,36 @@
</el-select>
</el-form-item>
</div>
<div v-else>
<el-form-item label="货站名称" prop="uploadGoodsStation">
<el-input type="text" v-model="formData.uploadGoodsStation" maxlength="25"
placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item prop="file" label-width="0px">
<el-upload ref="upload" action="/goods/uploadGoodsExcel" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" accept=".xlsx"
class="upload-demo">
<el-button type="primary" icon="el-icon-upload2" size="small">选择文件</el-button>
</el-upload>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button>
<el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button>
<el-button @click="close">取 消</el-button>
<el-button v-if='openStatus == "add"' type="primary" size="small" :loading="loading" @click="submit">确 定
</el-button>
<el-button v-else-if="openStatus == 'downloadExcel'" type="primary" size="small" :loading="downloading"
@click="download">导出Excel</el-button>
<el-button v-else type="primary" :loading="loading" size="small" @click="upload">导入Excel
</el-button>
<el-button style="margin-top:10px" size="small" @click="close">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { batchAddGoods, findStationName } from "@/api/goodsStation"
import { batchAddGoods, findStationName, uploadGoodsExcel } from "@/api/goodsStation"
import { downLoadXlsx } from "@/utils/zipdownload";
export default {
......@@ -55,7 +73,9 @@ export default {
return {
formData: {
goodsStation: null,
goodsList: ''
uploadGoodsStation: null,
goodsList: '',
file: null
},
goodsStationList: [],
rules: {
......@@ -73,7 +93,23 @@ export default {
trigger: "blur",
},
],
uploadGoodsStation: [
{
required: true,
message: "货站名称不能为空",
trigger: "change",
},
],
file: [
{
required: true,
message: "文件不能为空",
trigger: "change",
},
]
},
fileList: [],
errorData: [],
goodsStationLoading: false,
downloading: false,
loading: false,
......@@ -128,6 +164,44 @@ export default {
}
})
},
//选择文件
uploadExcel(option) {
this.formData.file = option.file
},
//导入Excel
upload() {
this.$refs['addForm'].validate(val => {
if (val) {
const file = this.formData.file;
let goodsStation = this.formData.uploadGoodsStation
this.loading = true;
uploadGoodsExcel(file, goodsStation).then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
if (res.data) {
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
}
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.success(res.msg);
}
setTimeout(() => {
this.close()
}, 1000);
});
}
})
},
//导出Excel
download() {
this.$refs['addForm'].validate(val => {
......@@ -146,12 +220,29 @@ export default {
})
},
handleRemove(file, fileList) {
//清掉上传的文件
this.errorData = [];
this.fileList = [];
this.formData.file = null
},
handleExceed(files) {
//重复上传文件
let file = {};
file.file = files[0];
file.name = files[0].name;
this.fileList = [];
this.fileList.push(file);
this.formData.file = file
this.uploadExcel(file);
},
//取消
close() {
this.formData = {
goodsStation: null,
goodsList: null
}
this.$refs['upload'].clearFiles()
this.$refs["addForm"].clearValidate();
this.$emit('close')
}
......@@ -162,5 +253,15 @@ export default {
</script>
<style lang="scss" scoped>
.upload-demo {
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
......
<template>
<div style="padding:10px">
<div style="margin-bottom:10px">
<el-button type="primary" icon="el-icon-refresh" size="small" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="goodsLogStation" ductName="goodsLogStation" :data="logTabelData" :headerData="logTabelHeader"
:selection="false" :order="true" :selectFixed="false" :loading="loading" :totalCount="logCount"
:limitSize="logData.size" :page="logData.page" layout="total,prev, pager, next, jumper, ->"
:pageSizes="[100]" :height="tableHeight" @currentChange="logCurrentChange">
</Tables>
</div>
</template>
<script>
import { userImportLog } from "@/api/goodsStation"
export default {
name: 'GoodsUploadLog',
data() {
return {
logData: {
page: 1,
size: 50
},
logTabelData: [],
logTabelHeader: this.tableHeaders['goodsLogStation'],
logCount: 0,
tableHeight: null,
loading: false,
}
},
created() {
this.selectLog()
},
watch: {
$route(to, from) {
if (to.name == 'GoodsUploadLog') {
this.selectLog()
}
}
},
methods: {
//日志查询
selectLog(val) {
if (val === 1) {
this.logData.page = 1
}
this.loading = true
userImportLog(this.logData).then(res => {
this.loading = false
if (res.code === 200) {
this.logCount = res.data.total
this.logTabelData = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//日志分页
logCurrentChange(val) {
this.logData.page = val.page
this.selectLog()
},
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -34,11 +34,10 @@
@click="downloadExcel">
导出Excel
</el-button>
<el-upload action="/goods/importGoods" name="file" :http-request="uploadExcel" :on-remove="handleRemove"
:limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" class="upload-demo"
v-hasPermi="['base:goodsStation:add']" style="margin-left:10px">
<el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
</el-upload>
<el-button type="primary" icon="el-icon-upload2" size="small" @click="uploadExcel"
v-hasPermi="['base:goodsStation:add']">导入Excel</el-button>
<el-button icon="el-icon-document" type="primary" size="small" @click="selectLog()">查询导入日志
</el-button>
</div>
<Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
:order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
......@@ -60,7 +59,7 @@
<script>
import { downLoadTemplate } from "@/api/flightInfoImport";
import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import { batchDeleteGoods, searchGoods } from "@/api/goodsStation"
import Dialog from './dialog.vue'
export default {
......@@ -189,29 +188,9 @@ export default {
this.selection()
},
//上传excel
uploadExcel(option) {
const file = option.file;
this.loading = true;
importGoods(file, '').then((res) => {
this.loading = false;
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
this.$message.warning(res.msg);
this.errorData = res.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
} else {
this.$message.warning(res.msg);
}
} else {
this.$message.success(res.msg);
this.selection(1)
}
});
uploadExcel() {
this.openStatus = 'uploadExcel'
this.open = true
},
//下载模板
downloadTempleate() {
......@@ -245,6 +224,9 @@ export default {
this.fileList.push(file);
this.uploadExcel(file);
},
selectLog() {
this.$router.push({ name: 'GoodsUploadLog' })
},
close() {
this.open = false
this.openStatus = ''
......@@ -260,16 +242,5 @@ export default {
</script>
<style lang="scss" scoped>
.upload-demo {
display: flex;
.el-upload-list__item:first-child {
margin-top: 5px !important;
}
.el-upload-list {
display: inline-block;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
......
......@@ -3,14 +3,13 @@
<el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false"
append-to-body center>
<el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
label-position="right" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
<el-form-item label="货站名称" prop="goodsStation">
<el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
</el-input>
</el-form-item>
<el-form-item label="航班" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125"
placeholder="请输入航班,多个用“;”隔开">
<el-form-item label="航班号" prop="flightList">
<el-input type="textarea" v-model="flightList" rows="4" maxlength="125" placeholder="请输入航班号,多个用“;”隔开">
</el-input>
</el-form-item>
</el-form>
......
......@@ -155,16 +155,22 @@
</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(0)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button>
<el-button v-hasPermi="['base:cargo:export']" :type="downLoadingTip.downloading ? 'warning' : 'primary'"
size="small" @click="xlse(1)" :disabled="tableData.length == 0" :loading="downLoadingTip.downloading">{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="release">释放舱位</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" v-hasPermi="['base:cargo:release']"
@click="transfer">航班迁转</el-button>
<el-button type="primary" size="small" :disabled="selectTable.length == 0" @click="transfer"
v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button>
<el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
@click="historyFlie">
<el-tooltip class="item" effect="dark" content="请先选择配置航班日期" placement="top">
<span class="el-icon-warning-outline">生成归档数据</span>
</el-tooltip>
</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
<el-progress v-if="progress != 0" class="progress" :stroke-width="12" :show-text="true" :percentage="progress"
:status="progress == 100 ? 'success' : 'warning'"></el-progress>
......@@ -190,7 +196,7 @@
<template v-slot:waybillNo="scope">
<el-link type="primary" @click="logView(scope.row)">
{{
scope.row.waybillNo
scope.row.waybillNo
}}<i class="el-icon-link"></i> </el-link>
</template>
</Tables>
......@@ -213,7 +219,7 @@
</template>
<script>
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes } from "@/api/cargoSelect";
import { findConditionData, findCargoData, releaseCargo, getFlightsRoutes, historyCargo } from "@/api/cargoSelect";
import { downLoadXlsx } from "@/utils/zipdownload";
import Dialog from "./dialog.vue";
import Info from './info.vue'
......@@ -344,6 +350,7 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
this.select(0)
},
activated() {
......@@ -512,6 +519,7 @@ export default {
.catch(() => {
this.tableLoading = false;
});
console.log(this.$refs.newTables)
this.$refs.newTables.clearTable();
this.cargoTotal();
},
......@@ -555,6 +563,23 @@ export default {
transfer() {
this.openTransfer = true
},
//生成历史数据文件
historyFlie() {
if (new Date(this.cargoPlaneTime[1]).getTime() - new Date(this.cargoPlaneTime[0]).getTime() > 2592000000) {
this.msgWarning('配载日期区间不能大于31天!')
} else {
this.dataInfo();
historyCargo(this.formData).then(res => {
if (res.code === 200) {
this.msgSuccess('操作成功,正在生成中,稍后可在下载页面查看!')
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}
},
//关闭弹窗
close() {
this.dialogVisible = false
......
......@@ -8,7 +8,7 @@
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column v-for="(item, index) in cargoHeader" header-align="center" align="center" :prop="item.value"
:label="item.name" :key="index" :show-overflow-tooltip="true" :formatter="formatter">
:label="item.name" :key="index" :width="item.width" :show-overflow-tooltip="true" :formatter="formatter">
</el-table-column>
</el-table>
<el-form ref="form" class="form-header" label-position="right" label-width="auto"
......@@ -69,7 +69,7 @@ export default {
overweight: false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName", width: "" },
{ name: "口岸代码", value: "portName", width: "" },
{ name: "运单号", value: "waybillNo", width: "" },
{ name: "货物状态", value: "statusName" , width: ""},
{ name: "站点", value: "siteName", width: "" },
......@@ -242,4 +242,5 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
......@@ -28,7 +28,7 @@
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate==null">
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
......@@ -153,7 +153,7 @@ export default {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
} else if (res.data.code === 201) {
this.msgWarning(res.data.msg);
this.errorData = res.data.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
......
<template>
<div>
<el-form ref="preMdeSelectForm" class="form-header" label-position="right" label-width="auto" size="small"
:model="formData">
<el-row>
<el-col :span="6">
<el-form-item label="区域">
<el-select class="formItem" v-model="formData.regionArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="地区">
<el-select class="formItem" v-model="formData.areaArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select class="formItem" v-model="formData.typeName" filterable clearable placeholder="不限">
<el-option v-for="item in selectData.declarationCategory" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select class="formItem" v-model="formData.serviceTypeArray" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectData.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="运单号">
<el-input type="textarea" v-model="formData.waybillNo" class="formItem"
placeholder="请输入运单号(回车间隔)" :rows="4" :maxlength="12000" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input type="textarea" v-model="formData.ursa" class="formItem" placeholder="S_;P_;E2"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点">
<el-input type="textarea" v-model="formData.siteName" class="formItem" placeholder="PVG;PEK"
:rows="4" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
<el-date-picker class="formItem" type="daterange" v-model="accsDate" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" :value-format="valueFormat" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input type="text" class="formItem" v-model="formData.flightNo" placeholder="请输入航班号"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航线">
<el-input type="text" class="formItem" v-model="formData.flightRoute" placeholder="请输入航线"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="tableLoading" @click="select(0)">查询
</el-button>
<el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
:loading="downloading" @click="downloadExcel" v-hasPermi="['base:preMde:export']">
导出全部查询结果
</el-button>
<span class="ml20" style="color: #ffba00">全部导出上限80000条数据</span>
</div>
<Tables ref="preMdeSelectTables" ductName="preMdeSelect" :data="tableData" :headerData="tableHeader"
:selection="false" :order="true" :totalCount="totalCount" :loading="tableLoading" :limitSize="formData.size"
:page="formData.page" :pageSizes="[100]" :height="tableHeight" @currentChange="currentChange">
</Tables>
</div>
</template>
<script>
import {
findDmPreMdeData,
findDmPreMdeCondition
} from "@/api/preMdeConfig";
import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "../../../utils/FedEx";
export default {
name: 'PreMdeSelect',
data() {
return {
formData: {
regionArray: [],
areaArray: [],
serviceTypeArray: [],
page: 1,
size: 100,
},
selectData: {
serviceType: [],
declarationCategory: [],
region: [],
area: []
},
tableData: [],
tableHeader: this.tableHeaders['preMdeSelect'],
accsDate: [],
valueFormat: "yyyy-MM-dd",
tableHeight: null,
tableLoading: false,
downloading: false,
totalCount: 0,
}
},
created() {
this.selectOptionData()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.preMdeSelectForm.$el.offsetHeight - 150
this.select(0)
},
watch: {
$route(to, from) {
if (to.name == 'PreMdeSelect') {
this.selection()
}
}
},
methods: {
//查询条件
selectOptionData() {
findDmPreMdeCondition().then(res => {
if (res.code == 200) {
this.selectData = res.data
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//查询
select(val) {
this.tableLoading = true
let obj = JSON.parse(JSON.stringify(this.datainfo(this.formData)))
if (this.accsDate.length > 0) {
obj.fltDateStart = this.accsDate[0]
obj.fltDateEnd = this.accsDate[1]
}
findDmPreMdeData(obj).then(res => {
this.tableLoading = false
if (res.code == 200) {
this.tableData = res.data.list
this.totalCount = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.tableLoading = false
console.log(err)
})
},
//导出
downloadExcel() {
this.downloading = true
let data = this.datainfo(this.formData)
downLoadXlsx("/dmPreMde/excel", data, "Pre-MDE查询表")
.then(() => {
this.downloading = false
})
.catch(() => {
this.downloading = false
});
},
//数据处理
datainfo(val) {
if (val.ursa && val.ursa != null && val.ursa != '') {
val.ursa = val.ursa.toUpperCase().replace(/;/g, ';')
}
if (val.siteName && val.siteName != null && val.siteName != '') {
val.siteName = val.siteName.toUpperCase().replace(/;/g, ';')
}
if (val.flightNo && val.flightNo != null && val.flightNo != '') {
val.flightNo = val.flightNo.toUpperCase()
}
if (val.flightRoute && val.flightRoute != null && val.flightRoute != '') {
val.flightRoute = val.flightRoute.toUpperCase()
}
if (val.regionArray != null && val.regionArray.length == 0) {
val.regionArray = null
}
if (val.areaArray != null && val.areaArray.length == 0) {
val.areaArray = null
}
if (val.serviceTypeArray != null && val.serviceTypeArray.length == 0) {
val.serviceTypeArray = null
}
return val
},
//翻页
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<el-form ref="reportForm" class="form-header" :model="formData" label-position="right" label-width="auto"
size="small">
<el-row>
<el-col :span="5">
<el-form-item label="地区">
<el-select v-model="formData.areaArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.area" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="区域">
<el-select v-model="formData.regionArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.region" :label="item" :value="item" :key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="URSA">
<el-select v-model="formData.ursas" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.ursaList" :label="item" :value="item"
:key="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="service type">
<el-select v-model="formData.serviceTypeArray" class="formItem" filterable multiple clearable
placeholder="不限">
<el-option v-for="item in selectOptionList.serviceType" :label="item.chineseName"
:value="item.chineseName" :key="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="取件日期">
<el-date-picker class="formItem" v-model="formData.pickUpDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mt20 mb20">
<el-button type="primary" icon="el-icon-search" size="small" :loading="loading" @click="select(0)">查 询
</el-button>
</div>
<div style="padding:10px">
<el-form label-position="right" label-width="auto" size="small">
<el-form-item label="坐标系切换">
<el-radio-group v-model="formData.dimensionName" @change="typeChange">
<el-radio label="area">地区</el-radio>
<el-radio label="region">区域</el-radio>
<el-radio label="ursa">URSA</el-radio>
<el-radio label="serviceType">serviceType</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<Chart v-for="(item, index) in barChartData" :chartData="item" height="350px" style="margin-bottom:10px"
:key="index" :loading="loading" />
</div>
</div>
</template>
<script>
import Chart from '@/components/echarts/echarts-series.vue'
import { findDmPreMdeCondition, findPreMdeReport } from "@/api/preMdeConfig";
export default {
components: {
Chart
},
data() {
return {
formData: {
ursas: [],
serviceTypeArray: [],
regionArray: [],
areaArray: [],
pickUpDate: null,
dimensionName: 'area',
},
tableHeader: this.tableHeaders['report'],
barChartData: [],
selectOptionList: {
ursaList: ["A_", "B_", "C_", "D_", "E_", "F_", "G_", "H_", "I_", "J_", "K_", "L_", "M_", "N_", "O_", "P_", "Q_", "R_", "S_", "T_", "U_", 'V_', "W_", "X_", "Y_", "Z_", '1_', '2_', '3_', '4_', '5_', '6_', '7_', '8_', '9_', 'other'],
serviceType: [],
region: [],
area: [],
},
tableHeight: null,
totalCount: 10,
loading: false
}
},
created() {
this.formData.pickUpDate = this.nowDate()
this.getOption()
this.select()
},
activated() {
this.select()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.reportForm.$el.offsetHeight - 240
},
methods: {
getOption() {
findDmPreMdeCondition().then(res => {
if (res.code === 200) {
this.selectOptionList.serviceType = res.data.serviceType
this.selectOptionList.region = res.data.region
this.selectOptionList.area = res.data.area
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
select(val) {
this.loading = true
let obj = {}
if (this.formData.ursas.length > 0) {
obj.ursas = this.formData.ursas
} else {
obj.ursas = null
}
if (this.formData.serviceTypeArray.length > 0) {
obj.serviceTypeArray = this.formData.serviceTypeArray
} else {
obj.serviceTypeArray = null
}
if (this.formData.regionArray.length > 0) {
obj.regionArray = this.formData.regionArray
} else {
obj.regionArray = null
}
if (this.formData.areaArray.length > 0) {
obj.areaArray = this.formData.areaArray
} else {
obj.areaArray = null
}
obj.pickUpDate = this.formData.pickUpDate
obj.dimensionName = this.formData.dimensionName
findPreMdeReport(obj).then(res => {
this.loading = false
if (res.code === 200) {
if (res.data.dimensionList && res.data.dimensionList.length > 0) {
this.dataHandle(res.data.dimensionList, 8)
} else {
this.msgWarning('未查询到数据')
}
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
typeChange(val) {
this.select()
},
dataHandle(val, num) {
this.barChartData = []
let obj = {
names: [],
data1: [],
data2: [],
data3: []
}
val.forEach(item => {
obj.names.push(item.name)
obj.data1.push(item.totalPcs)
obj.data2.push(item.total)
obj.data3.push(item.totalWeight)
})
this.arrList(obj.names, num).forEach((item, index) => {
let objItem = {
names: [],
data1: [],
data2: [],
data3: [],
}
objItem.names = item
objItem.data1 = this.arrList(obj.data1, num)[index]
objItem.data2 = this.arrList(obj.data2, num)[index]
objItem.data3 = this.arrList(obj.data3, num)[index]
this.barChartData.push(objItem)
})
},
arrList(list, last) {
let index = 0
let arr = []
if (list.length < last) {
arr.push(list)
} else {
while (index < list.length) {
arr.push(list.slice(index, index += last))
index++
}
}
return arr
},
currentChange(val) {
this.formData.page = val.page
this.select()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -42,6 +42,7 @@ export default {
},
methods: {
close() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
......
......@@ -29,7 +29,7 @@
<el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel"
:on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList"
accept=".xlsx" class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"
:disabled="formData.beginDate==null">
:disabled="formData.beginDate == null">
<el-button type="primary" icon="el-icon-upload2" size="small" @click="upload">导入Excel
</el-button>
</el-upload>
......@@ -159,7 +159,7 @@ export default {
confirmButtonText: "确定",
type: "warning",
});
} else if (res.code === 201) {
} else if (res.data.code === 201) {
this.msgWarning(res.data.msg);
this.errorData = res.data.data;
this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
......
......@@ -36,7 +36,7 @@
</div>
<div v-else-if="status == 'sort'">
<el-form-item label="航班号" prop="fltNo">
<el-input type="text" v-model="newDictionary.fltNo" disabled maxlength="20"></el-input>
<el-input type="text" v-model="newDictionary.fltNo" disabled></el-input>
</el-form-item>
<el-form-item label="航线">
<Drag :routes="routeList" @drag="drag"></Drag>
......@@ -377,5 +377,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
......
......@@ -4,8 +4,8 @@
<!-- cardHeader -->
<div slot="header" class="clearfix">
<span style="font-size:16px;font-weight:700">{{ (tableName == '航线' ? '航线' : tableName == 'Site' ? '站点' :
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
tableName ==
'虚拟航班' ? '虚拟航班' : tableName.replace(/( |^)[a-z]/g, L => L.toUpperCase())) + "表"
}}</span>
<div style="float: right; padding: 3px 0">
<span class="selectLabel mr10">切换字典表</span>
......@@ -96,7 +96,7 @@
<template v-slot:fltNo="scope">
<el-link type="primary" @click="addDic({ data: scope.row, status: 'sort' })">
{{
scope.row.fltNo
scope.row.fltNo
}}<i class="el-icon-link"></i> </el-link>
</template>
<template slot="optionColumn">
......@@ -314,7 +314,6 @@ export default {
},
//修改
// upDate(val) {
// console.log(val)
// this.status = val.status
// this.addDictionary = val.data
// this.open = true
......
<template>
<div class="menuDrawer">
<el-dialog :title="drawerTitle" width="50%" :visible.sync="dialogVisible" :close-on-click-modal="false" :show-close="false"
:append-to-body="true">
<el-form ref="userForm" :model="menuForm" :disabled="menuFormDisabled" :rules="rules" label-width="auto"
style="margin: 10px">
<el-row>
<el-col :span="12">
<el-form-item label="菜单名称" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="菜单路由" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组件名称" prop="">
<!-- <el-input
placeholder="请输入权限名"
:disabled="menuFormDisabled"
v-model="menuData.userName"
size="mini"
></el-input> -->
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="菜单状态" prop="">
<el-switch v-model="menuData.menuStatus" active-color="#13ce66" inactive-color="#ff4949"
:disabled="menuFormDisabled"></el-switch>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="图标选择" prop="">
<iconSelect @selected="selected"></iconSelect>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="权限设置" prop="">
<el-col :span="6">
<el-radio label="页面" size="medium"></el-radio>
</el-col>
<el-col :span="6">
<el-radio label="按钮" size="medium"></el-radio>
</el-col>
<el-col :span="24">
<el-card shadow="never">
<el-input placeholder=""></el-input>
</el-card>
</el-col>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button @click="handleClose">取 消</el-button>
<el-button type="primary" @click="submit">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import iconSelect from "@/components/IconSelect";
export default {
components: {
iconSelect,
},
props: {
drawerTitle: {
type: String,
default: "",
},
menuFormDisabled: {
type: Boolean,
default: false,
},
dialogVisible: {
type: Boolean,
default: false,
},
menuData: {
type: Object,
default: null,
},
},
data() {
return {
menuForm: {},
rules: {}
};
},
updated() {
this.menuForm = this.menuData;
},
watch: {
dialogVisible(val, oldVal) {
if (val) {
this.menuForm = this.menuData;
}
}
},
methods: {
handleClose() {
this.$emit("handleClose", false);
},
selected(val) {
console.log(val);
},
submit() { },
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -44,9 +44,13 @@
<script>
import { getAllAuth, updateStatus } from "@/api/system/user.js";
import dictLabels from "@/assets/languages/dictLabels.js";
import Drawer from "./drawer.vue";
export default {
name: "MenuConfig",
components: {
Drawer,
},
data() {
return {
drawer: false,
......
......@@ -13,8 +13,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="航班号" prop="flightNo">
<el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo" maxlength="20"
placeholder="请输入航班号" @change="getRoute" :disabled="disabled">
<el-input class="formItem" ref="flightNoFormItem" v-focus v-model="formData.flightNo"
maxlength="20" placeholder="请输入航班号" @change="getRoute" :disabled="disabled">
</el-input>
</el-form-item>
</el-col>
......
......@@ -6,7 +6,7 @@
<el-col :span="6">
<el-form-item label="发件人账号">
<el-input type="textarea" v-model="selectionData.shipperAccount" placeholder="请输入发件人账号,多个以“;”分割"
maxlength="20" rows="4" />
maxlength="50" rows="4" />
</el-form-item>
</el-col>
</el-row>
......@@ -14,7 +14,8 @@
<div style="margin-left:20px;margin-bottom:10px">
<el-button icon="el-icon-search" type="primary" size="small" @click="selection(1)">查 询
</el-button>
<el-button icon="el-icon-plus" type="primary" size="small" @click="add">添 加
<el-button v-hasPermi="['log:superAllocation:add']" icon="el-icon-plus" type="primary" size="small"
@click="add">添 加
</el-button>
</div>
<Tables ref="supserAllocation" ductName="supserAllocation" :data="tableData" :headerData="tableHeader"
......@@ -26,19 +27,19 @@
<el-table-column label="操作" width="250" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" v-if="scope.row.status != 0" icon="el-icon-edit"
@click="update(scope.row,'update')">修改
v-hasPermi="['log:superAllocation:update']" @click="update(scope.row, 'update')">修改
</el-button>
<el-button type="text" v-if="scope.row.status === 1" size="mini" icon="el-icon-video-pause"
@click="changeStatus(scope.row)">
v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
停 用</el-button>
<el-button type="text" v-if="scope.row.status === 0" size="mini" icon="el-icon-video-pause"
@click="changeStatus(scope.row)">
v-hasPermi="['log:superAllocation:openClose']" @click="changeStatus(scope.row)">
启 用</el-button>
<el-button type="text" icon="el-icon-document-copy" size="mini"
@click="update(scope.row,'copy')">复 制
v-hasPermi="['log:superAllocation:copy']" @click="update(scope.row, 'copy')">复 制
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color:#ff4949"
@click="del(scope.row)">删除</el-button>
v-hasPermi="['log:superAllocation:delete']" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</template>
......
<template>
<div>
<el-form ref="archiveDataForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="操作时间">
<el-date-picker class="formItem" v-model="selectForm.dateList" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="archiveDataTables" ductName="archiveDataTables" :order="true" :border='true' :data="data"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
:page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[20]" :totalCount="total"
:loading="loading" @currentChange="currentChange">
<template v-slot:queryParameter="scope">
<el-popover placement="top" width="350" trigger="hover">
<ul v-if="scope.row.queryParameter != null && scope.row.queryParameter != ''">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.queryParameter)).split(',')"
:key="index">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
<template v-slot:downloadPath="scope">
<el-button v-if="scope.row.downloadPath != null" type="text" size="mini" icon="el-icon-download"
@click="download(scope.row)">下载
</el-button>
</template>
</Tables>
</div>
</template>
<script>
import { findArchiveCargoLog } from "@/api/system/logConfig.js";
import { downLoadZip } from "@/utils/zipdownload";
export default {
data() {
return {
selectForm: {
dateList: [],
page: 1,
size: 20
},
data: [],
tableHeader: this.tableHeaders['archiveData'],
tableHeight: null,
total: 0,
loading: false
}
},
created() {
this.selectLog()
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.archiveDataForm.$el.offsetHeight - 200
},
methods: {
selectLog(val) {
this.loading = true
if (val == 1) {
this.selectForm.page = 1
}
let obj = {}
if (this.selectForm.dateList && this.selectForm.dateList.length > 0) {
obj.createTimeStart = this.selectForm.dateList[0]
obj.createTimeEnd = this.selectForm.dateList[1]
}
obj.page = this.selectForm.page
obj.size = this.selectForm.size
findArchiveCargoLog(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.data = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = true
console.log(err)
})
},
download(val) {
let url = 'entrymanager/entryExcel/download'
let filename = val.packageName
downLoadZip(url, val, filename)
},
currentChange(val) {
this.selectForm.page = val.page
this.selectLog()
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -137,7 +137,7 @@ export default {
getDmDataList(this.selectForm).then((res) => {
this.loading = false;
if (res.code === 200) {
this.total = res.data.total;
this.total = res.data.total
if (res.data.total === 0) {
this.msgWarning('未查询到数据')
} else {
......
<template>
<div>
<el-form ref="operationLogForm" class="form-header" :model="selectForm" label-width="auto" size="small"
@submit.native.prevent>
<el-row>
<el-col :span="6">
<el-form-item label="功能模块">
<el-select v-model="selectForm.module" class="formItem" placeholder="不限" clearable>
<el-option v-for="item in moduleList" :label="item" :value="item" :key="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作描述">
<el-input v-model="selectForm.describe" class="formItem" placeholder="请输入操作描述" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作人">
<el-input v-model="selectForm.userName" class="formItem" placeholder="请输入操作描述" clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作时间">
<el-date-picker class="formItem" v-model="dateList" type="daterange" range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="ml20 mb20">
<el-button type="primary" size="small" icon="el-icon-search" :loading="loading" @click="selectLog(1)">查 询
</el-button>
</div>
<Tables ref="operationLogTables" ductName="operationLogTables" :order="true" :border='false' :data="data"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="true" :height="tableHeight"
:page="selectForm.page" :limitSize="selectForm.size" :pageSizes="[100]" :totalCount="total"
:loading="loading" @currentChange="currentChange">
<template v-slot:result="scope">
<span>
{{ scope.row.result != null && typeof JSON.parse(scope.row.result) == 'object' ?
JSON.parse(scope.row.result).msg :
scope.row.result
}}
</span>
</template>
<template v-slot:requestParameters="scope">
<el-popover placement="top" width="350" trigger="hover">
<ul v-if="scope.row.requestParameters != null && scope.row.requestParameters != ''">
<li v-for="(item, index) in JSON.stringify(JSON.parse(scope.row.requestParameters)).split(',')"
:key="index">{{ item }}</li>
</ul>
<el-button type="text" slot="reference">查 看</el-button>
</el-popover>
</template>
</Tables>
</div>
</template>
<script>
import { findModuleCondition, getSystemOperationLogData } from "@/api/system/logConfig.js";
export default {
name: 'OperationLog',
data() {
return {
selectForm: {
module: null,
describe: null,
userName: null,
page: 1,
size: 100
},
data: [],
tableHeader: this.tableHeaders['operationLog'],
moduleList: [],
dateList: [],
defaultProps: {
children: 'children',
label: 'label'
},
tableHeight: null,
total: 0,
loading: false
}
},
created() {
this.getModule()
this.selectLog(1)
},
activated() {
this.selectLog();
},
mounted() {
this.tableHeight = window.innerHeight - this.$refs.operationLogForm.$el.offsetHeight - 240
},
methods: {
getModule() {
findModuleCondition().then(res => {
if (res.code === 200) {
this.moduleList = res.data.module
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
selectLog(val) {
this.loading = true
this.data = []
if (val == 1) {
this.selectForm.page = 1
}
let obj = {}
obj.module = this.selectForm.module
if (this.dateList && this.dateList.length > 0) {
obj.createTimeStart = this.dateList[0]
obj.createTimeEnd = this.dateList[1]
} else {
obj.createTimeStart = null
obj.createTimeEnd = null
}
obj.describe = this.selectForm.describe
obj.userName = this.selectForm.userName
obj.page = this.selectForm.page
obj.size = this.selectForm.size
getSystemOperationLogData(obj).then(res => {
this.loading = false
if (res.code === 200) {
this.data = res.data.list
this.total = res.data.total
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
currentChange(val) {
this.selectForm.page = val.page
this.selectLog()
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file