PaperShow.vue 840 Bytes
Newer Older
傅凯 committed
1 2
<template>
    <span>
liuxin committed
3
        <c-button type="button" size="mini" @click="showDocOrMsg">显示</c-button>
傅凯 committed
4 5
        <el-dialog :title="title" :visible.sync="dialogOpen" width="95%">
            <c-docshow :path="path"/>
傅凯 committed
6 7 8 9 10
        </el-dialog>

    </span>
</template>
<script>
傅凯 committed
11 12
import Api from "~/service/Api"

傅凯 committed
13 14 15 16 17 18 19 20
export default {
    props:['path'],
    data(){
        return {
            dialogOpen :false,
        }
    },
    methods:{
傅凯 committed
21
        async showDocOrMsg(){
傅凯 committed
22 23 24 25 26 27 28 29 30 31
            this.dialogOpen = true
        }
    },
    computed:{
        isdoc(){
            if(this.path.endsWith(".pdf"))
                return true
            else
                return false
        },
傅凯 committed
32 33 34 35 36
        title(){
            if(this.isdoc)
                return "面函展示"
            else
                return "报文展示"
傅凯 committed
37 38 39 40
        }
    }
}
</script>