commonDeclare.js 782 Bytes
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
export default {
    data() {
        return {
            version: "1.0",
            trnName: "",
        }
    },
    computed: {
        declareParams() {
            return {
                version: this.version,
                // 交易名
                trnName: this.root ? this.root.trnName : this.trnName,
                // 交易类型(进口、出口、买方、卖方等,为模块划分做准备)
                trnType: this.getTrnType()
            }
        },
        requestPrefix() {
            return `/${this.declareParams.trnType}/${this.declareParams.trnName}`
        }
    },
    methods: {
        getTrnType() {
            const type = this.root ? this.root.trnType : this.trnType
            return type ? type : 'business'
        }
    }
}