Vue.component('finish-followup-btn', {
    template: `
    <button class="button" id="isfinish" :class="{'finish':finishedbtn}" @click="finished()" :disabled="finishedbtn">完成随访</button>
    `,
    props: ['followupid', 'finishedbtn'],
    data: function () {
        return {
            sfStatus: '',  //当前的随访状态}
        }
    },
    watch: {
    },
    mounted: function () {
    },
    methods: {
        //点击完成随访时  Request['id']||'1'
        finished: function () {
            var vm = this
            fangshiAPI.updateFollowStatus({ followupId: this.followupid || '1888107' }).then(function (res) {
                if (res.status == 200) {
                    vm.$emit('getfinish', true)
                    top.toastr.info("完成随访")
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },

    },

})