clarms-plugins-material.js 1.98 KB
import api from '@/api/api'
import {
    httpGet,
    httpPost,
    formdata
} from '@/api/fetch-api.js'

import DatePicker from '@/components/date-picker/date-picker.vue';
import ClarmsUpload from './clarms-plugins-upload.vue';
import Vue from 'vue';
import { Loading, List } from 'vant';
import { Select, Option } from 'element-ui';

Vue.use(Loading);
Vue.use(Select);
Vue.use(Option);

export default {
    props: {
        // 是否显示组件
        insuredList: {
            type: Array,
            default() {
                return []
            }
        }
    },
    data() {
        return {
            uploadFiles: 0,
            typeCandidates: ['1', '2', '3', '4', '5'], // 候选人所购买的保单可选择的类型
            typeSelected: [], // 已经选择的类型,
            images: [],
            agress: false,
            data: {
                contactDate: "",
                insured: {}
            },
            contactDateError: false
        }
    },
    components: {
        DatePicker,
        ClarmsUpload
    },
    computed: {
        i18n() {
            return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
        },
    },
    methods: {
        initData() {
            console.log("this.insuredList = " , this.insuredList);
        },
        typeClickHandle(t) {
            let index = this.typeSelected.indexOf(t);
            if (index > -1) {
                this.typeSelected.splice(index, 1);
            } else {
                this.typeSelected.push(t);
            }
        },
        uploadSuccess(data) {
            console.log(data);
        },
        checkDate(data) {
            this.contactDateError = data.disable;
            if (this.contactDateError) {

            }
        },
        toContact() {
            this.$router.push({
                path: "/custom/service?q=m1"
            });
        },
    },
    watch: {

    },
    mounted() {
        this.initData();
    },
    created() { }
}