<template>
  <basic-container>
    <avue-form :option="option"
               v-model="form">
    </avue-form>
  </basic-container>
</template>

<script>
  import {detailByParentId} from "@/api/person/disabler";
  export default {
    name:'disablerTags-detail',
    props:{
      basicData:{type:Object}
    },
    data() {
      return {
        form: {},
        option: {
          height:'auto',
          calcHeight: 30,
          labelWidth: 120,
          tip: false,
          emptyBtn:false,
          submitBtn:false,
          disabled:true,
          column: [
            {
              label: "基本表Id",
              prop: "parentId",
              display: false,
              editDisabled:false,
              rules: [{
                required: false,
                message: "请输入基本表Id",
                trigger: "blur"
              }]
            },
            {
              label:'姓名',
              prop:'name',
            },
            {
              label: "居住情况",
              prop: "livingConditions",
              type: 'select',
              multiple: true,
              dataType:'string',
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=living-conditions",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              rules: [{
                required: false,
                message: "请选择居住情况",
                trigger: "blur"
              }]
            },
            {
              label: "监护人",
              prop: "guardian",
              rules: [{
                required: false,
                message: "请输入监护人",
                trigger: "blur"
              }]
            },
            {
              label: "监护人电话",
              prop: "guardianPhone",
              rules: [{
                required: false,
                message: "请输入监护人电话",
                trigger: "blur"
              }]
            },
            {
              label: "收入来源",
              prop: "incomeSource",
              type: 'select',
              multiple: true,
              dataType:'string',
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=income-source",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              rules: [{
                required: false,
                message: "请选择收入来源",
                trigger: "blur"
              }]
            },
            {
              label: "医疗保障",
              prop: "healthCare",
              type: 'select',
              multiple: true,
              dataType:'string',
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=health-care",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              rules: [{
                required: false,
                message: "",
                trigger: "blur"
              }]
            },
            {
              label: "康复需求",
              prop: "convalescence",
              rules: [{
                required: false,
                message: "请输入康复需求",
                trigger: "blur"
              }]
            },
            {
              label: "辅助器具",
              prop: "assistiveDevices",
              rules: [{
                required: false,
                message: "请输入辅助器具",
                trigger: "blur"
              }]
            },
            {
              label: "生活爱好",
              prop: "hobby",
              rules: [{
                required: false,
                message: "请输入生活爱好",
                trigger: "blur"
              }]
            },
            {
              label: "生活嗜好",
              prop: "addiction",
              rules: [{
                required: false,
                message: "请输入生活嗜好",
                trigger: "blur"
              }]
            },
            {
              label: "行为能力",
              prop: "ability",
              type: 'select',
              dataType:'number',
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=ability",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              rules: [{
                required: false,
                message: "请选择行为能力",
                trigger: "blur"
              }]
            },
            {
              label: "社交能力",
              prop: "socialSkills",
              type: 'select',
              dataType:'number',
              dicUrl: "/api/blade-system/dict-biz/dictionary?code=social-skills",
              props: {
                label: "dictValue",
                value: "dictKey"
              },
              rules: [{
                required: false,
                message: "请选择社交能力",
                trigger: "blur"
              }]
            },
            {
              label: "就业意向",
              prop: "employmentNeeds",
              rules: [{
                required: false,
                message: "请输入就业意向",
                trigger: "blur"
              }]
            },
            {
              label: "探访计划",
              prop: "visitPlan",
              rules: [{
                required: false,
                message: "请输入探访计划",
                trigger: "blur"
              }]
            },
            {
              label: "备注",
              prop: "remark",
              rules: [{
                required: false,
                message: "请输入备注",
                trigger: "blur"
              }]
            },
          ]
        },
      };
    },
    mounted() {
      this.loadData();
    },
    methods: {
      loadData(){
        detailByParentId(this.basicData.id).then(res => {
          this.form = res.data.data;
        });
      },
    }
  };
</script>

<style>
</style>
