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