<template>
  <div class='flex flex-justify-start flex-align-center flex-col'>
    <div class='flex flex-center full-width flex-justify-between mt-10 mb-10'>
      <span class='full-width text-left bold'>{{ info.dictValue }}</span>
    </div>
    <div class='mt-10' style='width: 80%;'>
      <avue-crud
          :option="option"
          :data="data"
          ref="crud"
          v-model="form"
          :before-open="beforeOpen"
          @row-del="rowDel"
          @row-save="rowSave"
          @row-update="rowUpdate">
        <template #menu='{row}'>
          <el-button text type='primary' icon='el-icon-upload'>上传</el-button>
        </template>
      </avue-crud>
    </div>
  </div>
</template>

<script>
export default {
  name: 'params4',
  props: {
    info: {
      type: Object,
      default: null
    }
  },
  data () {
    return {
      disabled: true,
      form: {},
      data: [
        {
          name: '建设项目用地预审',
          deptName: '',
          docNo: '凤环函〔2018147]号'
        },
        {
          name: '选址意见书',
          deptName: '',
          docNo: '选字第201900011号'
        },
        {
          name: '环境影响评价批复',
          deptName: '生态环境局',
          docNo: ''
        },
        {
          name: '项目建议书批复',
          deptName: '',
          docNo: ''
        },
        {
          name: '可行性研究报告批复',
          deptName: '发改局',
          docNo: ''
        },
        {
          name: '初步设计及概算批复',
          deptName: '',
          docNo: ''
        },
        {
          name: '建设用地规划许可证',
          deptName: '住建局',
          docNo: ''
        },
        {
          name: '开工许可证',
          deptName: '住建局',
          docNo: ''
        },
        {
          name: '施工许可证',
          deptName: '住建局',
          docNo: ''
        },
        {
          name: '建设工程规划许可证',
          deptName: '住建局',
          docNo: ''
        }
      ],
      option: {
        align: 'center',
        menuAlign: 'center',
        menuWidth: 380,
        size: 'mini',
        addBtn: false,
        delBtn: false,
        refreshBtn: false,
        columnBtn: false,
        labelWidth: 140,
        border: true,
        column: [
          {
            label: '审批事项（要件）',
            prop: 'name',
            display: false
          },
          {
            label: '批复单位',
            prop: 'deptName',
            display: false
          },
          {
            label: '文件',
            prop: 'file',
            hide: true,
            type: 'upload'
          },
          {
            label: '文号',
            prop: 'docNo'
          }
        ]
      }
    }
  }
}
</script>

<style lang='scss' scoped>
.form-content {
  border: 1px solid #eeeeee;
  padding: 20px;
}
</style>
