作者 朱兆平

报文导入

@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 "http-proxy-middleware": "^0.19.1", 61 "http-proxy-middleware": "^0.19.1",
62 "json-loader": "^0.5.4", 62 "json-loader": "^0.5.4",
63 "mockjs": "^1.0.1-beta3", 63 "mockjs": "^1.0.1-beta3",
64 - "node-sass": "^4.5.0", 64 + "node-sass": "^4.14.1",
65 "opn": "^4.0.2", 65 "opn": "^4.0.2",
66 "optimize-css-assets-webpack-plugin": "^1.3.0", 66 "optimize-css-assets-webpack-plugin": "^1.3.0",
67 "ora": "^1.0.0", 67 "ora": "^1.0.0",
  1 +import request from 'axios'
  2 +import qs from 'qs'
  3 +
  4 +let baseUrl = '/wltp-nmms-custom-reciption-resolver'
  5 +export function postFFM(query) {
  6 + return request({
  7 + method: 'get',
  8 + url: `${baseUrl}/Rmsg/ffm`,
  9 + params: query,
  10 + headers: {
  11 + 'Content-Type': 'application/x-www-form-urlencoded'
  12 + }
  13 + })
  14 +}
  15 +
  16 +export function postFWB(query) {
  17 + return request({
  18 + method: 'get',
  19 + url: `${baseUrl}/Rmsg/fwb`,
  20 + params: query,
  21 + headers: {
  22 + 'Content-Type': 'application/x-www-form-urlencoded'
  23 + }
  24 + })
  25 +}
  26 +
  27 +export function postFHL(query) {
  28 + return request({
  29 + method: 'get',
  30 + url: `${baseUrl}/Rmsg/fhl`,
  31 + params: query,
  32 + headers: {
  33 + 'Content-Type': 'application/x-www-form-urlencoded'
  34 + }
  35 + })
  36 +}
@@ -47,6 +47,9 @@ import ComeCar from './views/staff/come_car.vue' @@ -47,6 +47,9 @@ import ComeCar from './views/staff/come_car.vue'
47 import OnDuty from './views/staff/on_duty.vue' 47 import OnDuty from './views/staff/on_duty.vue'
48 import WaterStationsPatrol from './views/water/water_stations_patrol.vue' 48 import WaterStationsPatrol from './views/water/water_stations_patrol.vue'
49 import Location from './views/empt/Location.vue' 49 import Location from './views/empt/Location.vue'
  50 +import importFFMMsg from './views/airRadioMsg/importFFMMsg.vue'
  51 +import importFHLMsg from './views/airRadioMsg/importFHLMsg.vue'
  52 +import importFWBMsg from './views/airRadioMsg/importFWBMsg.vue'
50 53
51 //运输工具 通用业务申报 54 //运输工具 通用业务申报
52 import Route from './views/airtransport/route.vue' 55 import Route from './views/airtransport/route.vue'
@@ -172,6 +175,17 @@ let routes = [ @@ -172,6 +175,17 @@ let routes = [
172 ] 175 ]
173 }, 176 },
174 { 177 {
  178 + path: '/radioMsgImport',
  179 + component: Home,
  180 + name: '航空报文导入',
  181 + iconCls:'el-icon-goods',
  182 + children:[
  183 + {path:'/ffmRadioMsgImport',component:importFFMMsg,name:'FFM报文导入'},
  184 + {path:'/fhlRadioMsgImport',component:importFHLMsg,name:'FHL报文导入'},
  185 + {path:'/fwbRadioMsgImport',component:importFWBMsg,name:'FWB报文导入'}
  186 + ]
  187 + },
  188 + {
175 path: '/airtransport', 189 path: '/airtransport',
176 component: Home, 190 component: Home,
177 name: '通用业务申报', 191 name: '通用业务申报',
  1 +<template>
  2 + <div class="app-container">
  3 + <div class="filter-container">
  4 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleAdd">导入</el-button>
  5 + <el-input
  6 + type="textarea"
  7 + :rows="40"
  8 + placeholder="请输入内容"
  9 + v-model="ffmtext">
  10 + </el-input>
  11 + </div>
  12 + </div>
  13 +</template>
  14 +
  15 +<script>
  16 + import {postFFM} from "@/api/nmms/importMsg";
  17 +
  18 + export default {
  19 + name: 'ImportMessage',
  20 + data() {
  21 + return {
  22 + ffmtext: ''
  23 + }
  24 + },
  25 + methods: {
  26 + handleAdd: function () {
  27 + let para = {
  28 + ffmmsg: this.ffmtext
  29 + }
  30 + postFFM(para).
  31 + then(res => {
  32 + let result = res.data
  33 + if (result==1){
  34 + this.$message({
  35 + message: '导入成功',
  36 + type: 'success',
  37 + duration: 5 * 1000
  38 + })
  39 + }
  40 + })
  41 + }
  42 + }
  43 + }
  44 +</script>
  45 +
  46 +<style>
  47 +</style>
  1 +<template>
  2 + <div class="app-container">
  3 + <div class="filter-container">
  4 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleAdd">导入</el-button>
  5 + <el-input
  6 + type="textarea"
  7 + :rows="40"
  8 + placeholder="请输入内容"
  9 + v-model="ffmtext">
  10 + </el-input>
  11 + </div>
  12 + </div>
  13 +</template>
  14 +
  15 +<script>
  16 + import {postFHL} from "@/api/nmms/importMsg";
  17 +
  18 + export default {
  19 + name: 'ImportMessage',
  20 + data() {
  21 + return {
  22 + ffmtext: ''
  23 + }
  24 + },
  25 + methods: {
  26 + handleAdd: function () {
  27 + let para = {
  28 + ffmmsg: this.ffmtext
  29 + }
  30 + postFHL(para).
  31 + then(res => {
  32 + let result = res.data
  33 + if (result==1){
  34 + this.$message({
  35 + message: '导入成功',
  36 + type: 'success',
  37 + duration: 5 * 1000
  38 + })
  39 + }
  40 + })
  41 + }
  42 + }
  43 + }
  44 +</script>
  45 +
  46 +<style>
  47 +</style>
  1 +<template>
  2 + <div class="app-container">
  3 + <div class="filter-container">
  4 + <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleAdd">导入</el-button>
  5 + <el-input
  6 + type="textarea"
  7 + :rows="40"
  8 + placeholder="请输入内容"
  9 + v-model="ffmtext">
  10 + </el-input>
  11 + </div>
  12 + </div>
  13 +</template>
  14 +
  15 +<script>
  16 + import {postFWB} from "@/api/nmms/importMsg";
  17 +
  18 + export default {
  19 + name: 'ImportMessage',
  20 + data() {
  21 + return {
  22 + ffmtext: ''
  23 + }
  24 + },
  25 + methods: {
  26 + handleAdd: function () {
  27 + let para = {
  28 + ffmmsg: this.ffmtext
  29 + }
  30 + postFWB(para).
  31 + then(res => {
  32 + let result = res.data
  33 + if (result==1){
  34 + this.$message({
  35 + message: '导入成功',
  36 + type: 'success',
  37 + duration: 5 * 1000
  38 + })
  39 + }
  40 + })
  41 + }
  42 + }
  43 + }
  44 +</script>
  45 +
  46 +<style>
  47 +</style>