<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="68px"
    >
      <el-form-item label="案件编号" prop="caseNum">
        <el-input
          v-model="queryParams.caseNum"
          placeholder="请输入案件编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        > -->
      </el-form-item>
    </el-form>
    <el-table v-loading="loading" :data="formationData" style="width: 100%">
      <el-table-column label="序号" type="index" align="center">
        <template slot-scope="scope">
          <span>{{
            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="案件编号"
        align="center"
        prop="caseNum"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="申请人"
        align="center"
        prop="name"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="案件标的"
        align="center"
        prop="caseSubjectAmount"
      />
      <el-table-column
        label="立案日期"
        align="center"
        prop="registerDate"
        :show-overflow-tooltip="true"
      />
      <!-- 开庭日期 -->
      <el-table-column
        label="开庭日期"
        align="center"
        prop="hearDate"
        :show-overflow-tooltip="true"
      />
      <!-- 案件仲裁员 -->
      <el-table-column
        label="案件仲裁员"
        align="center"
        prop="caseArbitrator"
      />
      <el-table-column label="案件状态" align="center" prop="caseStatus" />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-zoom-in"
            @click="viewdetails(scope.row)"
            v-hasPermi="['monitor:online:forceLogout']"
            >案件详情</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-shopping-bag-1"
            @click="courtReview(scope.row)"
            v-hasPermi="['monitor:online:forceLogout']"
            >组庭审核</el-button
          >
          <!-- <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="deleteRow(scope.row)"
            v-hasPermi="['monitor:online:forceLogout']"
            >删除</el-button
          > -->
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getcourtConfirmationData"
    />
    <!-- 案件详情页面 -->
    <formateCourtdetailDaiog
      :showDetails="showDetails"
      @cancelDetails="cancelDetails"
      :formateListdata="formateListdata"
    ></formateCourtdetailDaiog>
    <!-- 组庭审核 -->
    <courtReviewDialog
      :showcourtReview="showcourtReview"
      @cancelcourtReview="cancelcourtReview"
    ></courtReviewDialog>
  </div>
</template>

<script>
import courtReviewDialog from "./components/courtReviewDialog.vue";
import formateCourtdetailDaiog from "./components/formateCourtdetailDaiog.vue";
export default {
  name: "courtReviewlist",
  components: {
    formateCourtdetailDaiog,
    courtReviewDialog,
  },
  data() {
    return {
      // key: value
      // 遮罩层
      loading: true,
      showDetails: false,
      // 总条数
      total: 0,
      queryParams: {
        caseNum: undefined,
        pageNum: 1,
        pageSize: 10,
      },
      formateListdata: {},
      showcourtReview: false, //组庭审核页面
    };
  },
  created() {
    this.getcourtConfirmationData();
  },
  methods: {
    // 搜索
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getformationData();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    getcourtConfirmationData() {
      this.loading = true;
      this.formationData = [
        {
          caseNum: "1",
          name: "hcb",
          caseSubjectAmount: "3000",
          registerDate: "2022-05-05 20:23:08",
          hearDate: "2022-09-05 20:23:08",
          caseArbitrator: "hhl",
          caseStatus: "待组庭",
        },
      ];
      this.total = this.formationData.length;
      this.loading = false;
    },
    // 详情
    viewdetails(val) {
      this.showDetails = true;
      this.formateListdata = val;
    },
    // 关闭详情
    cancelDetails() {
      this.showDetails = false;
    },
    // 组庭审核
    courtReview() {
      this.showcourtReview = true;
    },
    cancelcourtReview() {
      this.showcourtReview = false;
    },
  },
};
</script>

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