<template>
  <div class="app-container">
    <!-- 仪器详情弹窗 -->
    <el-dialog :title="$t('form.detail')" :visible.sync="open" width="800px" append-to-body
      :close-on-click-modal="false">
      <el-form ref="form" :model="form" label-width="130px">
        <el-row>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.yqmc')" prop="mc">
              <el-input v-model="form.mc" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.yqbh')" prop="bh">
              <el-input v-model="form.bh" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.yqxh')" prop="xh">
              <el-input v-model="form.xh" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.yqly')" prop="ly">
              <el-input v-model="form.ly" disabled :placeholder="$t('form.placeholderInput')" maxlength="50" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.xcjzrq')" prop="jzrq">
              <el-date-picker clearable v-model="form.jzrq" type="date" value-format="yyyy-MM-dd"
                :placeholder="$t('form.placeholderSelect')" style="width: 100%;" disabled>
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.ssbm')" prop="bmId">
              <el-input v-model="form.bmId" :placeholder="$t('form.placeholderSelect')" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item :label="$t('page.business.zykgl.yq.wc')" prop="wc">
              <el-input v-model="form.wc" :placeholder="$t('form.placeholderSelect')" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item :label="$t('form.remark')" prop="remark">
              <el-input v-model="form.remark" type="textarea" :placeholder="$t('form.placeholderInput')" maxlength="500"
                disabled />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-table v-loading="loading" :data="qmList">
        <el-table-column :label="$t('form.signer')" align="center" prop="bh" />
        <el-table-column :label="$t('form.qmyy')" align="center" prop="xh" />
        <el-table-column :label="$t('form.signTime')" align="center" prop="ly" />
        <el-table-column :label="$t('page.business.zykgl.yq.xgnr')" align="center" prop="bmMc" />
      </el-table>
      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { yq_info } from '@/api/business/yq/yq'
export default {
  name: "YqDetail",
  data() {
    return {
      loading: false,
      open: false,
      form: {},
      // 签名列表
      qmList: [],
      // 总条数
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    }
  },
  created() {
  },
  methods: {
    cancel() {
      this.open = false
    },
    show(row) {
      yq_info({ id: row.id }).then((response) => {
        this.form = response.data
        this.open = true
      })
    },
    getList() {

    }
  }
}
</script>
