<template>
  <div id="info-1">
    <el-row>
      <el-col :span="24" class="main">
        <el-col :span="24" class="one">
          <el-form :model="info" ref="form" label-width="210px">
            <el-col :span="24">
              <el-col :span="12">
                <el-form-item label="保安服务区域名称" prop="service_name">
                  <el-input v-model="info.service_name" placeholder="请输入保安服务区域名称"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="保安服务区域详址" prop="address_detailed">
                  <el-input v-model="info.address_detailed" placeholder="请输入保安服务区域详址"></el-input>
                </el-form-item>
              </el-col>
            </el-col>
            <el-col :span="24">
              <el-col :span="12">
                <el-form-item label="保安服务区域省市县" prop="onhouse_city">
                  <el-input v-model="info.onhouse_city" placeholder="请输入保安服务区域省市县"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="保安服务区域负责人姓名" prop="name">
                  <el-input v-model="info.name" placeholder="请输入保安服务区域负责人姓名"></el-input>
                </el-form-item>
              </el-col>
            </el-col>
            <el-col :span="24">
              <el-col :span="12">
                <el-form-item label="保安服务区域负责人身份证号" prop="card">
                  <el-input v-model="info.card" placeholder="请输入保安服务区域负责人身份证号"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="保安服务区域负责人联系电话" prop="phone">
                  <el-input v-model="info.phone" placeholder="请输入保安服务区域负责人联系电话"></el-input>
                </el-form-item>
              </el-col>
            </el-col>
            <el-col :span="24">
              <el-col :span="12">
                <el-form-item label="保安服务区域负责人职务" prop="zw">
                  <el-input v-model="info.zw" placeholder="请输入保安服务区域负责人职务"></el-input>
                </el-form-item>
              </el-col>
            </el-col>
            <el-col :span="24">
              <el-col :span="24">
                <el-form-item label="保安服务类型" prop="baoan_sevicetype">
                  <el-input v-model="info.baoan_sevicetype" placeholder="请输入保安服务类型"></el-input>
                </el-form-item>
              </el-col>
            </el-col>
          </el-form>
        </el-col>
        <el-col :span="24" class="two">
          <data-table :fields="fields" :opera="opera" :data="fileList" :usePage="false" @view="toView"> </data-table>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info-1',
  props: { info: { type: Object }, fileList: { type: Array } },
  components: {},
  data: function () {
    return {
      fields: [
        { label: '电子材料类型', model: 'type' },
        { label: '电子材料名称', model: 'name' },
        { label: '文件地址', model: 'el_img' },
      ],
      opera: [{ label: '下载', method: 'view' }],
    };
  },
  created() {},
  methods: {
    toView({ data }) {
      window.open(`${process.env.VUE_APP_HOST}${data.el_img}`, '_blank');
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped></style>
