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

    </avue-form>
  </basic-container>
</template>

<script>
  import {getList, getDetail, add, update, remove} from "@/api/system/orgposition";
  import {mapGetters} from "vuex";

  export default {
    data() {
      return {
        form: {},
        option: {
          height:'auto',
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          viewBtn: true,
          selection: true,
          dialogClickModal: false,
          column: [
            {
              label: "省行政编码",
              prop: "provinceCode",
              rules: [{
                required: true,
                message: "请输入省行政编码",
                trigger: "blur"
              }]
            },
            {
              label: "市行政编码",
              prop: "cityCode",
              rules: [{
                required: true,
                message: "请输入市行政编码",
                trigger: "blur"
              }]
            },
            {
              label: "区行政编码",
              prop: "areaCode",
              rules: [{
                required: true,
                message: "请输入区行政编码",
                trigger: "blur"
              }]
            },
            {
              label: "街道行政编码",
              prop: "streetCode",
              rules: [{
                required: true,
                message: "请输入街道行政编码",
                trigger: "blur"
              }]
            },
            {
              label: "社区id",
              prop: "agencyId",
              rules: [{
                required: true,
                message: "请输入社区id",
                trigger: "blur"
              }]
            },
            {
              label: "小区id",
              prop: "residentialId",
              rules: [{
                required: true,
                message: "请输入小区id",
                trigger: "blur"
              }]
            },
            {
              label: "机构路径",
              prop: "orgPosition",
              rules: [{
                required: true,
                message: "请输入机构路径",
                trigger: "blur"
              }]
            },
            {
              label: "所属机构id",
              prop: "orgId",
              rules: [{
                required: true,
                message: "请输入所属机构id",
                trigger: "blur"
              }]
            }
          ]
        },
        data: []
      };
    },
    methods: {
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          loading();
          console.log(error);
        });
      }
    }
  };
</script>

<style>
</style>
