qushaowei
2024-01-15 1e67b1b2116c2a5ddee3e33980a7bbb564724d66
src/views/eam/FaultInfoList.vue
@@ -1,8 +1,14 @@
<template>
  <a-card :bordered="false">
  <a-card
    title="设备事故登记表"
    :bordered="false"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :xl='6'
@@ -68,9 +74,15 @@
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
      <div
        class="ant-alert ant-alert-info"
        style="margin-bottom: 16px;"
      >
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
        <a
          style="margin-left: 24px"
          @click="onClearSelected"
        >清空</a>
      </div>
      <a-table
@@ -85,30 +97,61 @@
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
        @change="handleTableChange"
      >
        <template slot="htmlSlot" slot-scope="text">
        <template
          slot="htmlSlot"
          slot-scope="text"
        >
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        <template
          slot="imgSlot"
          slot-scope="text,record"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            :preview="record.id"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          />
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
        <template
          slot="fileSlot"
          slot-scope="text"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            @click="downloadFile(text)"
          >
            下载
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)" v-if="record.isConfirm!=='yes'" v-has="'fault:update'">录入</a>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            @click="handleEdit(record)"
            v-if="record.isConfirm!=='yes'"
            v-has="'fault:update'"
          >录入</a>
          <a-divider type="vertical" />
          <a @click="handleDetail(record)">详情</a>
@@ -117,14 +160,20 @@
            title="确认结果后不可再录入,确认吗?"
            @confirm="() => handleConfirm(record)"
          >
            <a v-if="record.isConfirm!=='yes'" v-has="'fault:confirm'">确认</a>
            <a
              v-if="record.isConfirm!=='yes'"
              v-has="'fault:confirm'"
            >确认</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
    <fault-info-modal ref="modalForm" @ok="modalFormOk"></fault-info-modal>
    <fault-info-modal
      ref="modalForm"
      @ok="modalFormOk"
    ></fault-info-modal>
  </a-card>
</template>