importFWBMsg.vue 1.4 KB
<template>
    <div class="app-container">
        <div class="filter-container" style="margin-top: 15px">
            <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="handleAdd">导入</el-button>
            <el-input
                    type="textarea"
                    :rows="40"
                    placeholder="请输入内容"
                    v-model="ffmtext">
            </el-input>
        </div>
        <div style="margin-left: 1190px"></div>
    </div>
</template>

<script>
    import {postFWB} from "@/api/nmms/importMsg";

    export default {
        name: 'ImportMessage',
        data() {
            return {
                ffmtext: ''
            }
        },
        methods: {
            handleAdd: function () {
                let para = {
                    ffmmsg: this.ffmtext
                }
                postFWB(para).
                then(res => {
                    let result = res.data
                    if (result==1){
                        this.$message({
                            message: '导入成功',
                            type: 'success',
                            duration: 5 * 1000
                        })
                    }
                })
            }
        }
    }
</script>

<style>
    .app-container{
        height: 550px;
        overflow:auto;
    }
    /*.filter-item{*/
    /*    margin-top: 20px;*/
    /*}*/
</style>