src/views/eam/EquipmentListOfAll.vue
@@ -1,29 +1,58 @@
<template>
  <a-card :bordered="false" title="所有设备">
  <a-card
    :bordered="false"
    title=""
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :span="6">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row
          :gutter="24"
          style="margin-bottom: 1%;"
        >
          <a-col :xl='6'
                :lg='7'
                :md='8'
                :sm='24'>
            <a-form-item
            label="设备所属分类"
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              label="统一编码群"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-textarea
                placeholder="请输入所有统一编码,每个统一编码占用一行,否则查询信息可能会出错"
                v-model="queryParam.nums"
                :auto-size="{ minRows: 2, maxRows:2 }"
              ></a-textarea>
            </a-form-item>
          </a-col>
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="设备所属分类"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                dictCode="mom_eam_equipment_category,name,id"
                dictCode="mom_eam_equipment_category,name,id,del_flag!='1'"
                placeholder="请输入搜索条件并选择"
                v-model="queryParam.equipmentCategoryId"
              />
            </a-form-item>
          </a-col>
          <a-col
          :span="6"
          >
            <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="统一编码"
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="统一编码"
            >
              <a-input
                placeholder="请输入设备统一编码查询"
@@ -31,13 +60,14 @@
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
          :span="6"
          >
            <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="设备名称"
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="设备名称"
            >
              <a-input
                placeholder="请输入设备名称查询"
@@ -45,31 +75,36 @@
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="型号"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
            <a-input
              <a-input
                v-model="queryParam.model"
                placeholder="请输入型号"
            ></a-input>
              ></a-input>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="6">
          </a-col>
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="工区"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
            <j-dict-select-tag
              <j-dict-select-tag
                allow-clear
                placeholder="请选择工区"
                :triggerChange="true"
                dictCode="mom_base_area,name,id,del_flag!='1'"
                dictCode="mom_base_area,name,id,del_flag!='1' and type = '2'"
                v-model="queryParam.factoryModelId"
              />
            </a-form-item>
@@ -89,43 +124,62 @@
              />
            </a-form-item>
          </a-col> -->
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="维护部门"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
            <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="使用部门"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
            <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="是否生产线设备"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
@@ -136,13 +190,14 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="ABC标识"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
@@ -153,7 +208,10 @@
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="技术状态"
              :labelCol="labelCol"
@@ -168,11 +226,14 @@
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="设备状态"
              :labelCol="labelCol"
            :wrapperCol="wrapperCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
@@ -183,7 +244,10 @@
              />
            </a-form-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="关键设备标识"
              :labelCol="labelCol"
@@ -198,25 +262,58 @@
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-model-item
              label="质保开始日期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <j-date  style="width: 100%;" placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.warrantyStart"></j-date>
              <j-date
                style="width: 100%;"
                placeholder="请选择开始日期"
                class="query-group-cust"
                v-model="queryParam.warrantyStart"
              ></j-date>
            </a-form-model-item>
          </a-col>
          <a-col :span="6">
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-model-item
              label="质保结束日期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <j-date style="width: 100%;" placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.warrantyEnd"></j-date>
              <j-date
                style="width: 100%;"
                placeholder="请选择结束日期"
                class="query-group-cust"
                v-model="queryParam.warrantyEnd"
              ></j-date>
            </a-form-model-item>
          </a-col>
          <!-- 按维修班组检索 -->
          <a-col :xl='6'
                 :lg='7'
                 :md='8'
                 :sm='24'>
            <a-form-item
              label="维修班组"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                placeholder="请选择维修班组"
                :triggerChange="true"
                dictCode="mom_base_team,name,id,del_flag!='1'"
                v-model="queryParam.teamId"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
@@ -234,19 +331,76 @@
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button @click="handleAdd" type="primary" icon="plus" v-has="'equipmentAccount:add&delete&import&Edit'">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('设备台账')" v-has="'equipmentAccount:outport'">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import"  v-has="'equipmentAccount:add&delete&import&Edit'">导入</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >新增</a-button>
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('设备台账')"
        v-has="'equipmentAccount:outport'"
      >导出</a-button>
      <a-upload
        name="file"
        :showUploadList="false"
        :multiple="false"
        :headers="tokenHeader"
        :action="importExcelUrl"
        @change="handleImportExcel"
      >
        <a-button
          type="primary"
          icon="import"
          v-has="'equipmentAccount:add&delete&import&Edit'"
        >导入</a-button>
      </a-upload>
      <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateABC" type="primary" icon="font-colors" v-has="'equipmentAccount:add&delete&import&Edit'">ABC标识变更</a-button>
      <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateWarranty" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">质保期变更</a-button>
      <a-button
        :disabled="selectedRowKeys.length==0"
        @click="handleUpdateABC"
        type="primary"
        icon="font-colors"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >ABC标识变更</a-button>
      <a-button
        :disabled="selectedRowKeys.length==0"
        @click="handleUpdateWarranty"
        type="primary"
        icon="calendar"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >质保期变更</a-button>
      <a-button
        :disabled="selectedRowKeys.length==0"
        @click="batchDel"
        type="danger"
        icon="delete"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >批量删除</a-button>
      <a-button
        @click="handleUpdateKeyEquipment"
        type="primary"
        icon="calendar"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >设置关键设备标识</a-button>
      <a-button
        type="primary"
        @click="handleDownload"
        icon="download"
      >模版下载</a-button>
    </div>
    <!-- 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
@@ -261,162 +415,266 @@
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}"
        :customRow="clickThenSelect"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
        @change="handleTableChange"
      >
        <!-- 点击技术状态列,跳转到技术状态鉴定页面 -->
        <template
          slot="technologyStatus"
          slot-scope="text,record"
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <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="processParameters"
        slot-scope="text,record"
      >
        <a-badge
          v-if="record.processParameters==1"
          status="success"
        />
        <!--工艺参数个性展示-->
        <span
          v-if="record.processParameters==1"
          class="success"
        >是</span>
        <a-badge
          v-if="record.processParameters==0"
          status="error"
        />
          slot="processParameters"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.processParameters==1"
            status="success"
          />
          <span
            v-if="record.processParameters==1"
            class="success"
          >是</span>
          <a-badge
            v-if="record.processParameters==0"
            status="error"
          />
          <span
            v-if="record.processParameters==0"
            class="error"
          >否</span>
        </span>
        <span
          v-if="record.processParameters==0"
          class="error"
        >否</span>
      </span>
      <span
        slot="processParameters"
        slot-scope="text,record"
      >
        <a-badge
          v-if="record.processParameters==1"
          status="success"
        />
          slot="processParameters"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.processParameters==1"
            status="success"
          />
          <span
            v-if="record.processParameters==1"
            class="success"
          >是</span>
          <a-badge
            v-if="record.processParameters==0"
            status="error"
          />
          <span
            v-if="record.processParameters==0"
            class="error"
          >否</span>
        </span>
        <span
          v-if="record.processParameters==1"
          class="success"
        >是</span>
        <a-badge
          v-if="record.processParameters==0"
          status="error"
        />
          slot="precisionParameters"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.precisionParameters==1"
            status="success"
          />
          <span
            v-if="record.precisionParameters==1"
            class="success"
          >是</span>
          <a-badge
            v-if="record.precisionParameters==0"
            status="error"
          />
          <span
            v-if="record.precisionParameters==0"
            class="error"
          >否</span>
        </span>
        <span
          v-if="record.processParameters==0"
          class="error"
        >否</span>
      </span>
      <span
        slot="precisionParameters"
        slot-scope="text,record"
      >
        <a-badge
          v-if="record.precisionParameters==1"
          status="success"
        />
        <span
          v-if="record.precisionParameters==1"
          class="success"
        >是</span>
        <a-badge
          v-if="record.precisionParameters==0"
          status="error"
        />
        <span
          v-if="record.precisionParameters==0"
          class="error"
        >否</span>
      </span>
      <span
        slot="verification"
        slot-scope="text,record"
      >
        <a-badge
          v-if="record.verification==1"
          status="success"
        />
        <span
          v-if="record.verification==1"
          class="success"
        >是</span>
        <a-badge
          v-if="record.verification==0"
          status="error"
        />
        <span
          v-if="record.verification==0"
          class="error"
        >否</span>
      </span>
          slot="verification"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.verification==1"
            status="success"
          />
          <span
            v-if="record.verification==1"
            class="success"
          >是</span>
          <a-badge
            v-if="record.verification==0"
            status="error"
          />
          <span
            v-if="record.verification==0"
            class="error"
          >否</span>
        </span>
      <span
        slot="action"
        slot-scope="text, record"
      >
        <!-- class="table-operation" -->
        <!-- <a
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <span
          slot="yseNoInspectionStandard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="yseNoMaintenance2Standard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <span
          slot="yseNoMaintenance3Standard"
          slot-scope="text"
        >
          <a-icon
            type="check"
            style="color: chartreuse;"
            v-if="text==='0'"
          />
          <a-icon
            type="close"
            v-else
            style="color:red;"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <!-- class="table-operation" -->
          <!-- <a
          href="javascript:;"
          @click="equipmentStructuresShow(record)"
        >设备结构</a>
        <a-divider type="vertical" /> -->
        <a
          href="javascript:;"
          @click='handleDetail(record)'
        >详情</a>
        <a-divider type="vertical" />
        <a-dropdown>
          <a class="ant-dropdown-link">
            更多
            <a-icon type="down" />
          </a>
          <a-menu slot="overlay">
            <a-menu-item>
              <a @click="equipmentResumeShow(record)">设备履历</a>
            </a-menu-item>
            <a-menu-item v-has="'accountSons:add&edit&delete&submit'" v-if="record.processParameters==1">
              <a @click="editProcess(record)">工艺参数维护</a>
            </a-menu-item>
            <a-menu-item v-has="'accountSons:add&edit&delete&submit'" v-if="record.precisionParameters==1">
              <a @click="editPrecision(record)">精度参数维护</a>
            </a-menu-item>
            <a-menu-item  v-has="'equipmentAccount:add&delete&import&Edit'">
              <a @click="handleEdit(record)" >编辑</a>
            </a-menu-item>
            <a-menu-item  v-has="'equipmentAccount:add&delete&import&Edit'">
              <a @click="handleEditSpareParts(record)" >编辑备件</a>
            </a-menu-item>
            <a-menu-item>
              <a-popconfirm
                title="确定删除吗?"
                @confirm="() => handleDelete(record.id)"
                v-has="'equipmentAccount:add&delete&import&Edit'"
          <a
            href="javascript:;"
            @click='handleDetail(record)'
          >详情</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">
              更多
              <a-icon type="down" />
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="equipmentResumeShow(record)">设备履历</a>
              </a-menu-item>
              <a-menu-item
                v-has="'accountSons:add&edit&delete&submit'"
                v-if="record.processParameters==1"
              >
                <a>删除</a>
              </a-popconfirm>
            </a-menu-item>
          </a-menu>
        </a-dropdown>
      </span>
                <a @click="editProcess(record)">工艺参数维护</a>
              </a-menu-item>
              <a-menu-item
                v-has="'accountSons:add&edit&delete&submit'"
                v-if="record.precisionParameters==1"
              >
                <a @click="editPrecision(record)">精度参数维护</a>
              </a-menu-item>
              <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'">
                <a @click="handleEdit(record)">编辑</a>
              </a-menu-item>
              <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'">
                <a @click="handleEditSpareParts(record)">编辑备件</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                  v-has="'equipmentAccount:add&delete&import&Edit'"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <equipment-resume-drawer
@@ -425,103 +683,183 @@
    ></equipment-resume-drawer>
    <a-tabs defaultActiveKey="1">
      <a-tab-pane tab="工艺参数" key="1" >
        <EquipmentProcessParametersList
        :mainId="selectedMainId"
        :isOpen="isOpenProcess"
        />
      </a-tab-pane>
      <a-tab-pane tab="设备精度" key="2" forceRender>
        <EquipmentPrecisionParametersList
        :isOpen="isOpenPrecision"
        :mainId="precisionParametersTemplateId" />
      </a-tab-pane>
      <a-tab-pane tab="设备文档" key="3" forceRender>
      <a-tab-pane
        tab="设备文档"
        key="1"
        forceRender
      >
        <EquipmentDocumentList :mainId="selectedMainId" />
      </a-tab-pane>
      <a-tab-pane tab="备件" key="4" forceRender>
      <a-tab-pane
        tab="工艺参数"
        key="2"
        v-if="isOpenProcess"
      >
        <EquipmentProcessParametersList
          :mainId="selectedMainId"
          :isOpen="isOpenProcess"
        />
      </a-tab-pane>
      <a-tab-pane
        tab="设备精度"
        key="3"
        v-if="isOpenPrecision"
      >
        <EquipmentPrecisionParametersList
          :isOpen="isOpenPrecision"
          :mainId="precisionParametersTemplateId"
        />
      </a-tab-pane>
      <a-tab-pane
        tab="备件"
        key="4"
        forceRender
      >
        <EquipmentSpareParts :mainId="selectedMainId" />
      </a-tab-pane>
      <a-tab-pane tab="ABC标识变更记录" key="5" forceRender>
      <a-tab-pane
        tab="ABC标识变更记录"
        key="5"
        forceRender
      >
        <equipment-update-ABC-list :mainId="selectedMainId" />
      </a-tab-pane>
      <a-tab-pane tab="质保期变更" key="6" forceRender>
      <a-tab-pane
        tab="质保期变更"
        key="6"
        forceRender
      >
        <equipment-update-warranty-list :mainId="selectedMainId" />
      </a-tab-pane>
      <a-tab-pane tab="日保标准" key="7" forceRender>
      <a-tab-pane
        tab="点检标准"
        key="7"
        forceRender
      >
        <daily-maintenance-list :mainId="selectedMainId"></daily-maintenance-list>
      </a-tab-pane>
      <a-tab-pane tab="二保标准" key="8" forceRender>
      <a-tab-pane
        tab="二保标准"
        key="8"
        forceRender
      >
        <second-maintenance-list :mainId="selectedMainId"></second-maintenance-list>
      </a-tab-pane>
      <a-tab-pane tab="三保标准" key="9" forceRender>
      <a-tab-pane
        tab="三保标准"
        key="9"
        forceRender
      >
        <third-maintenance-list :mainId="selectedMainId"></third-maintenance-list>
      </a-tab-pane>
      <a-tab-pane
        tab="点检工单"
        key="10"
        forceRender
      >
        <daily-inspection-order-list-component :mainId="selectedMainId"></daily-inspection-order-list-component>
      </a-tab-pane>
      <a-tab-pane
        tab="二保工单"
        key="11"
        forceRender
      >
        <daily-maintenance-order-list-component :mainId="selectedMainId"></daily-maintenance-order-list-component>
      </a-tab-pane>
    </a-tabs>
    <equipment-modal ref="modalForm" @ok="modalFormOk" :caytegoryParam="caytegoryParam"></equipment-modal>
    <process-edit-model ref ="processEditModel"></process-edit-model>
    <precision-edit-model ref ="precisionEditModel"></precision-edit-model>
    <aBC-update-edit-model @ok="modalFormOk" :updateList="selectionRows" ref="updateABC"></aBC-update-edit-model>
    <warranty-update-model  :updateList="selectionRows"  ref="updateWarranty"></warranty-update-model>
    <EquipmentSparePartsModal ref="modalFormSpareParts" @ok="modalFormOk" />
    <equipment-modal
      ref="modalForm"
      @ok="modalFormOk"
      :caytegoryParam="caytegoryParam"
    ></equipment-modal>
    <process-edit-model ref="processEditModel"></process-edit-model>
    <precision-edit-model ref="precisionEditModel"></precision-edit-model>
    <aBC-update-edit-model
      @ok="modalFormOk"
      :updateList="selectionRows"
      ref="updateABC"
    ></aBC-update-edit-model>
    <warranty-update-model
      :updateList="selectionRows"
      ref="updateWarranty"
    ></warranty-update-model>
    <EquipmentSparePartsModal
      ref="modalFormSpareParts"
      @ok="modalFormOk"
    />
    <key-equipment-update-model
      @ok="modalFormOk"
      :updateList="selectionRows"
      ref="keyEquipmentUpdate"
    ></key-equipment-update-model>
  </a-card>
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { mixinDevice } from '@/utils/mixin'
  import EquipmentModal from './modules/equipmentNew/EquipmentModal'
  import { getAction } from '@/api/manage'
  import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList'
  import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList'
  import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList'
  import '@/assets/less/TableExpand.less'
  import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer'
  import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue'
  import ProcessEditModel from './modules/equipmentNew/edit/ProcessEditModel.vue'
  import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel'
  import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList'
  import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue'
  import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel'
  import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue'
  import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts'
  import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal'
  import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue'
  import StandardOfMaintenance from './modules/equipmentNew/StandardOfMaintenance.vue'
  import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
  import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
  import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
  export default {
    name: "EquipmentList",
    mixins:[JeecgListMixin,mixinDevice],
    components: {
      EquipmentProcessParametersList,
      EquipmentDocumentList,
      EquipmentPrecisionParametersList,
      EquipmentModal,
      EquipmentResumeDrawer,
      JSearchSelectTag,
        ProcessEditModel,
        PrecisionEditModel,
        EquipmentUpdateABCList ,
        EquipmentUpdateWarrantyList,
        ABCUpdateEditModel,
        WarrantyUpdateModel,
        EquipmentSpareParts,
        EquipmentSparePartsModal,
        StandardOfInspection,
        StandardOfMaintenance,
        DailyMaintenanceList,
        SecondMaintenanceList,
        ThirdMaintenanceList,
    },
    data () {
      return {
        description: '设备台账管理页面',
        caytegoryParam:'all',
        // 表头
        columns: [
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { mixinDevice } from '@/utils/mixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
import EquipmentModal from './modules/equipmentNew/EquipmentModal'
import { getAction, downFile, deleteAction } from '@/api/manage'
import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList'
import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList'
import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList'
import '@/assets/less/TableExpand.less'
import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer'
import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue'
import ProcessEditModel from './modules/equipmentNew/edit/ProcessEditModel.vue'
import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel'
import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList'
import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue'
import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel'
import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel'
import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts'
import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal'
import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue'
import StandardOfMaintenance from './modules/equipmentNew/StandardOfMaintenance.vue'
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import KeyEquipmentUpdateModel from './modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue'
import DailyInspectionOrderListComponent from './modules/equipmentNew/DailyInspectionOrderListComponent.vue'
import DailyMaintenanceOrderListComponent from './modules/equipmentNew/DailyMaintenanceOrderListComponent.vue'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    EquipmentProcessParametersList,
    EquipmentDocumentList,
    EquipmentPrecisionParametersList,
    EquipmentModal,
    EquipmentResumeDrawer,
    JSearchSelectTag,
    ProcessEditModel,
    PrecisionEditModel,
    EquipmentUpdateABCList,
    EquipmentUpdateWarrantyList,
    ABCUpdateEditModel,
    WarrantyUpdateModel,
    EquipmentSpareParts,
    EquipmentSparePartsModal,
    StandardOfInspection,
    StandardOfMaintenance,
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    KeyEquipmentUpdateModel,
    JEllipsis,
    DailyInspectionOrderListComponent,
    DailyMaintenanceOrderListComponent,
  },
  data() {
    return {
      description: '设备台账管理页面',
      caytegoryParam: 'all',
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
@@ -531,46 +869,41 @@
            return parseInt(index) + 1
          },
          width: 50,
        },
        {
          title: '设备类型',
          align: "center",
          dataIndex: 'equipmentCategoryId_dictText',
        },
        {
          title: '是否生产线设备',
          align: "center",
          dataIndex: 'isLineEquip_dictText',
          fixed: 'left',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
          fixed: 'left',
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'model',
        },
        {
          title: '规格',
          align: "center",
          dataIndex: 'specification',
        },
        {
          title: '总功率',
          align: "center",
          dataIndex: 'gpo',
          scopedSlots: { customRender: 'name' },
          fixed: 'left',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '中心',
          align: "center",
          dataIndex: 'workCenterId_dictText',
        },
        {
          title: '工区',
          align: "center",
          dataIndex: 'factoryModelId_dictText',
        },
        {
          title: '工段',
          align: "center",
          dataIndex: 'areaId_dictText',
        },
        {
          title: '维护部门',
@@ -583,6 +916,11 @@
          dataIndex: 'teamId_dictText',
        },
        {
          title: '设备所属分类',
          align: "center",
          dataIndex: 'equipmentCategoryId_dictText',
        },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
@@ -593,16 +931,186 @@
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '安全配置',
          align: "center",
          dataIndex: 'securityConfiguration',
        },
        {
          title: '冷却系统',
          align: "center",
          dataIndex: 'coolingSystem',
        },
        {
          title: '灭火器',
          align: "center",
          dataIndex: 'fireExtinguisher',
        },
        {
          title: '灭火器有效期',
          align: "center",
          dataIndex: 'fireExtinguisherValidityPeriod',
        },
        {
          title: '操作系统',
          align: "center",
          dataIndex: 'operatingSystem',
        },
        {
          title: '系统',
          align: "center",
          dataIndex: 'system',
        },
        {
          title: '设备端口',
          align: "center",
          dataIndex: 'port',
        },
        {
          title: '坐标数量',
          align: "center",
          dataIndex: 'coordinateNum',
        },
        {
          title: '设备状态',
          align: "center",
          dataIndex: 'equipmentStatus_dictText',
        },
        {
          title: '技术状态',
          align: "center",
          dataIndex: 'technologyStatus_dictText',
          scopedSlots: { customRender: 'technologyStatus' },
        },
        {
          title: '重量',
          align: "center",
          dataIndex: 'equipmentUda3',
        },
        {
          title: '重量计量单位',
          align: "center",
          dataIndex: 'equipmentUda4_dictText',
        },
        {
          title: '功能位置',
          align: "center",
          dataIndex: 'equipmentUda5',
        },
        {
          title: '安装位置',
          align: "center",
          dataIndex: 'equipmentUda2',
        },
        {
          title: '出厂日期',
          align: "center",
          dataIndex: 'leaveFactoryDate',
        },
        {
          title: '立项卡号',
          align: "center",
          dataIndex: 'projectApprovalNo',
        },
        {
          title: '资金来源',
          align: "center",
          dataIndex: 'fundSource',
        },
        {
          title: '验收日期',
          align: "center",
          dataIndex: 'acceptanceCheckDate',
        },
        {
          title: '出厂编号',
          align: "center",
          dataIndex: 'factoryNo',
        },
        {
          title: '资产制造商',
          align: "center",
          dataIndex: 'constructorId_dictText',
        },
        {
          title: '资产的来源国家',
          align: "center",
          dataIndex: 'sourceCountry',
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'model',
        },
        {
          title: '设备规格',
          align: "center",
          dataIndex: 'specification',
        },
        {
          title: '总功率',
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy'
        },
        {
          title: '创建时间',
          align: "center",
          dataIndex: 'createTime',
        },
        {
          title: '更新人',
          align: "center",
          dataIndex: 'updateBy'
        },
        {
          title: '更新时间',
          align: "center",
          dataIndex: 'updateTime',
        },
        {
          title: '质保开始日期',
          align: "center",
          dataIndex: 'warrantyStart'
        },
        {
          title: '质保结束日期',
          align: "center",
          dataIndex: 'warrantyEnd',
        },
        {
          title: '资产状态',
          align: "center",
          dataIndex: 'propertyStatus_dictText',
        },
        {
          title: '三保日期',
          align: "center",
          dataIndex: 'thirdMaintenanceTime',
        },
        {
          title: '技术鉴定日期',
          align: "center",
          dataIndex: 'technologyStatusQualificationTime',
        },
        {
          title: '技术状态鉴定类型',
          align: "center",
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '是否生产线设备',
          align: "center",
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '生产线编号',
          align: "center",
@@ -613,107 +1121,6 @@
          align: "center",
          dataIndex: 'isMeta_dictText',
        },
        // {
        //   title: '安全配置',
        //   align: "center",
        //   dataIndex: 'securityConfiguration',
        // },
        // {
        //   title: '冷却系统',
        //   align: "center",
        //   dataIndex: 'coolingSystem',
        // },
        // {
        //   title: '灭火器',
        //   align: "center",
        //   dataIndex: 'fireExtinguisher',
        // },
        // {
        //   title: '灭火器有效期',
        //   align: "center",
        //   dataIndex: 'fireExtinguisherValidityPeriod',
        // },
        // {
        //   title: '操作系统',
        //   align: "center",
        //   dataIndex: 'operatingSystem',
        // },
        // {
        //   title: '系统',
        //   align: "center",
        //   dataIndex: 'system',
        // },
        // {
        //   title: '设备端口',
        //   align: "center",
        //   dataIndex: 'port',
        // },
        // {
        //   title: '坐标数量',
        //   align: "center",
        //   dataIndex: 'coordinateNum',
        // },
        // {
        //   title: '设备状态',
        //   align: "center",
        //   dataIndex: 'equipmentStatus_dictText',
        // },
        // {
        //   title: '重量',
        //   align: "center",
        //   dataIndex: 'equipmentUda3',
        // },
        // {
        //   title: '重量计量单位',
        //   align: "center",
        //   dataIndex: 'equipmentUda4_dictText',
        // },
        // {
        //   title: '功能位置',
        //   align: "center",
        //   dataIndex: 'equipmentUda5',
        // },
        // {
        //   title: '安装位置',
        //   align: "center",
        //   dataIndex: 'equipmentUda2',
        // },
        // {
        //   title: '出厂日期',
        //   align: "center",
        //   dataIndex: 'leaveFactoryDate',
        // },
        // {
        //   title: '立项卡号',
        //   align: "center",
        //   dataIndex: 'projectApprovalNo',
        // },
        // {
        //   title: '资金来源',
        //   align: "center",
        //   dataIndex: 'fundSource',
        // },
        // {
        //   title: '验收日期',
        //   align: "center",
        //   dataIndex: 'acceptanceCheckDate',
        // },
        // {
        //   title: '出厂编号',
        //   align: "center",
        //   dataIndex: 'factoryNo',
        // },
        // {
        //   title: '资产制造商',
        //   align: "center",
        //   dataIndex: 'constructorId_dictText',
        // },
        // {
        //   title: '资产的来源国家',
        //   align: "center",
        //   dataIndex: 'sourceCountry',
        // },
        {
          title: '工艺参数管理',
          align: "center",
@@ -736,6 +1143,24 @@
          align: "center",
          dataIndex: 'precisionParametersTemplateId_dictText',
        },
        {
          title: '有无点检标准',
          align: "center",
          dataIndex: 'yseNoInspectionStandard',
          scopedSlots: { customRender: 'yseNoInspectionStandard' }
        },
        {
          title: '有无二保标准',
          align: "center",
          dataIndex: 'yseNoMaintenance2Standard',
          scopedSlots: { customRender: 'yseNoMaintenance2Standard' }
        },
        {
          title: '有无三保标准',
          align: "center",
          dataIndex: 'yseNoMaintenance3Standard',
          scopedSlots: { customRender: 'yseNoMaintenance3Standard' }
        },
        // {
        //   title: '备注',
        //   align: "center",
@@ -751,184 +1176,186 @@
          width: 147,
          fixed: 'right',
        },
        ],
        url: {
          list: "/eam/equipment/getEquipmentList",
          delete: "/eam/equipment/delete",
          deleteBatch: "/eam/equipment/deleteBatch",
          active: "/eam/equipment/active",
          exportXlsUrl: '/eam/equipment/exportXls',
          importExcelUrl: "/eam/equipment/importExcel",
          loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
      ],
      url: {
        list: "/eam/equipment/getEquipmentTZList",
        delete: "/eam/equipment/delete",
        deleteBatch: "/eam/equipment/deleteBatch",
        active: "/eam/equipment/active",
        exportXlsUrl: '/eam/equipment/exportXls',
        importExcelUrl: "/eam/equipment/importExcel",
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
        uploadList: '/sys/upload/list',
        download: '/sys/upload/downloadFile',
      },
      dictOptions: {
      },
      /* 分页参数 */
      ipagination: {
        current: 1,
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " 共" + total + "条"
        },
        dictOptions:{
        },
        /* 分页参数 */
        ipagination:{
          current: 1,
          pageSize: 5,
          pageSizeOptions: ['5', '10', '50'],
          showTotal: (total, range) => {
            return range[0] + "-" + range[1] + " 共" + total + "条"
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        selectedMainId:'',
        superFieldList:[],
        equipmentProcessParametersMainId: '',
        equipmentDocumentMainId: '',
        equipmentPrecisionParametersMainId: '',
        precisionParametersTemplateId:'',
        isOpenPrecision:true,
        isOpenProcess:true,
        treeData: [],
        labelCol: {
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      selectedMainId: '',
      superFieldList: [],
      equipmentProcessParametersMainId: '',
      equipmentDocumentMainId: '',
      equipmentPrecisionParametersMainId: '',
      precisionParametersTemplateId: '',
      isOpenPrecision: true,
      isOpenProcess: true,
      treeData: [],
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        mainId:'',
      }
    },
    created() {
      this.getSuperFieldList();
      this.initOptions();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      initDictConfig(){
      },
      equipmentResumeShow(record) {
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      mainId: '',
    }
  },
  created() {
    this.getSuperFieldList();
    this.initOptions();
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  methods: {
    initDictConfig() {
    },
    equipmentResumeShow(record) {
      this.$refs.EquipmentResumeDrawer.visible = true
      this.$refs.EquipmentResumeDrawer.title = '设备履历'
      this.$refs.EquipmentResumeDrawer.handleShow(record)
       },
      clickThenSelect(record) {
        return {
          on: {
            click: () => {
              this.onSelectChange(record.id.split(","), [record]);
            }
    },
    clickThenSelect(record) {
      return {
        on: {
          click: () => {
            this.onSelectChange(record.id.split(","), [record]);
          }
        }
      },
      onClearSelected() {
        this.selectedRowKeys = [];
        this.selectionRows = [];
        this.selectedMainId=''
      },
      onSelectChange(selectedRowKeys, selectionRows) {
        if(selectedRowKeys.length==1){
          this.selectedMainId=selectedRowKeys[0]
          this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId;
          this.isOpenProcess = selectionRows[0].processParameters==1;
          this.isOpenPrecision = selectionRows[0].precisionParameters==1;
        }else{
          this.selectedMainId=''
          this.precisionParametersTemplateId = ''
      }
    },
    onClearSelected() {
      this.selectedRowKeys = [];
      this.selectionRows = [];
      this.selectedMainId = ''
    },
    onSelectChange(selectedRowKeys, selectionRows) {
      if (selectedRowKeys.length >= 1) {
        this.selectedMainId = selectedRowKeys[0]
        this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId;
        this.isOpenProcess = selectionRows[0].processParameters == 1;
        this.isOpenPrecision = selectionRows[0].precisionParameters == 1;
      } else {
        this.selectedMainId = ''
        this.precisionParametersTemplateId = ''
      }
      this.selectedRowKeys = selectedRowKeys;
      this.selectionRows = selectionRows;
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      this.onClearSelected()
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records;
          this.ipagination.total = res.result.total;
        }
        this.selectedRowKeys = selectedRowKeys;
        this.selectionRows = selectionRows;
      },
      loadData(arg) {
        if(!this.url.list){
          this.$message.error("请设置url.list属性!")
          return
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        //加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1;
        }
        this.onClearSelected()
        var params = this.getQueryParams();//查询条件
        this.loading = true;
        getAction(this.url.list, params).then((res) => {
          if (res.success) {
            this.dataSource = res.result.records;
            this.ipagination.total = res.result.total;
          }
          if(res.code===510){
            this.$message.warning(res.message)
          }
          this.loading = false;
        })
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'num',text:'统一编码',dictCode:''})
        fieldList.push({type:'string',value:'name',text:'设备名称',dictCode:''})
        fieldList.push({type:'string',value:'model',text:'型号',dictCode:''})
        fieldList.push({type:'string',value:'specification',text:'规格',dictCode:''})
        fieldList.push({type:'string',value:'equipmentStatus',text:'设备状态',dictCode:''})
        fieldList.push({type:'string',value:'technologyStatus',text:'technologyStatus',dictCode:''})
        fieldList.push({type:'string',value:'assetNumber',text:'assetNumber',dictCode:''})
        fieldList.push({type:'string',value:'equipmentCategoryId',text:'equipmentCategoryId',dictCode:''})
        fieldList.push({type:'string',value:'specificEquipment',text:'specificEquipment',dictCode:''})
        fieldList.push({type:'string',value:'equipmentPhoto',text:'equipmentPhoto',dictCode:''})
        fieldList.push({type:'string',value:'constructorId',text:'资产制造商',dictCode:''})
        fieldList.push({type:'string',value:'supplierId',text:'supplierId',dictCode:''})
        fieldList.push({type:'string',value:'factoryNumber',text:'factoryNumber',dictCode:''})
        fieldList.push({type:'string',value:'leaveFactoryDate',text:'出厂日期',dictCode:''})
        fieldList.push({type:'string',value:'acceptanceCheckDate',text:'验收日期',dictCode:''})
        fieldList.push({type:'string',value:'affiliationId',text:'affiliationId',dictCode:''})
        fieldList.push({type:'string',value:'manageId',text:'维护部门ID',dictCode:''})
        fieldList.push({type:'string',value:'manager',text:'manager',dictCode:''})
        fieldList.push({type:'string',value:'useId',text:'使用部门ID',dictCode:''})
        fieldList.push({type:'string',value:'functionary',text:'functionary',dictCode:''})
        fieldList.push({type:'string',value:'location',text:'location',dictCode:''})
        fieldList.push({type:'string',value:'equipmentImportanceId',text:'ABC标识ID',dictCode:''})
        fieldList.push({type:'string',value:'processParameters',text:'processParameters',dictCode:''})
        fieldList.push({type:'string',value:'processParametersTemplateId',text:'processParametersTemplateId',dictCode:''})
        fieldList.push({type:'string',value:'precisionParameters',text:'precisionParameters',dictCode:''})
        fieldList.push({type:'string',value:'precisionParametersTemplateId',text:'precisionParametersTemplateId',dictCode:''})
        fieldList.push({type:'string',value:'verification',text:'verification',dictCode:''})
        fieldList.push({type:'string',value:'verificationPeriod',text:'verificationPeriod',dictCode:''})
        fieldList.push({type:'string',value:'lastVerificationDate',text:'lastVerificationDate',dictCode:''})
        fieldList.push({type:'string',value:'nextVerificationDate',text:'nextVerificationDate',dictCode:''})
        fieldList.push({type:'string',value:'status',text:'status',dictCode:''})
        fieldList.push({type:'string',value:'remark',text:'remark',dictCode:''})
        fieldList.push({type:'string',value:'equipmentUda1',text:'工区',dictCode:''})
        fieldList.push({type:'string',value:'equipmentUda2',text:'安装位置',dictCode:''})
        fieldList.push({type:'string',value:'equipmentUda3',text:'重量',dictCode:''})
        fieldList.push({type:'string',value:'equipmentUda4',text:'重量计量单位ID',dictCode:''})
        fieldList.push({type:'string',value:'equipmentUda5',text:'功能位置',dictCode:''})
        fieldList.push({type:'string',value:'tenantId',text:'tenantId',dictCode:''})
        fieldList.push({type:'int',value:'delFlag',text:'delFlag',dictCode:''})
        fieldList.push({type:'string',value:'teamId',text:'维修班组ID',dictCode:''})
        fieldList.push({type:'string',value:'sourceId',text:'sourceId',dictCode:''})
        fieldList.push({type:'string',value:'fundSource',text:'资金来源',dictCode:''})
        fieldList.push({type:'string',value:'factoryNo',text:'出厂编号',dictCode:''})
        fieldList.push({type:'string',value:'mfr',text:'制造商',dictCode:''})
        fieldList.push({type:'string',value:'sourceCountry',text:'资产来源国家',dictCode:''})
        fieldList.push({type:'string',value:'gpo',text:'总功率',dictCode:''})
        fieldList.push({type:'string',value:'keyEquipmentIdentification',text:'关键设备标识',dictCode:''})
        fieldList.push({type:'string',value:'securityConfiguration',text:'安全配置',dictCode:''})
        fieldList.push({type:'string',value:'coolingSystem',text:'冷却系统',dictCode:''})
        fieldList.push({type:'string',value:'fireExtinguisher',text:'灭火器',dictCode:''})
        fieldList.push({type:'string',value:'fireExtinguisherValidityPeriod',text:'灭火器有效期',dictCode:''})
        fieldList.push({type:'string',value:'operatingSystem',text:'操作系统',dictCode:''})
        fieldList.push({type:'string',value:'system',text:'系统',dictCode:''})
        fieldList.push({type:'string',value:'port',text:'端口',dictCode:''})
        fieldList.push({type:'BigDecimal',value:'coordinateNum',text:'坐标数量',dictCode:''})
        fieldList.push({type:'string',value:'projectApprovalNo',text:'立项卡号',dictCode:''})
        this.superFieldList = fieldList
      },
      editProcess(record){
        this.$refs.processEditModel.edit(record);
      },
      editPrecision(record){
        this.$refs.precisionEditModel.edit(record);
      },
      initOptions() {
        this.loading = false;
      })
    },
    getSuperFieldList() {
      let fieldList = [];
      fieldList.push({ type: 'string', value: 'num', text: '统一编码', dictCode: '' })
      fieldList.push({ type: 'string', value: 'name', text: '设备名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'model', text: '型号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'specification', text: '规格', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentStatus', text: '设备状态', dictCode: '' })
      fieldList.push({ type: 'string', value: 'technologyStatus', text: 'technologyStatus', dictCode: '' })
      fieldList.push({ type: 'string', value: 'assetNumber', text: 'assetNumber', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentCategoryId', text: 'equipmentCategoryId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'specificEquipment', text: 'specificEquipment', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentPhoto', text: 'equipmentPhoto', dictCode: '' })
      fieldList.push({ type: 'string', value: 'constructorId', text: '资产制造商', dictCode: '' })
      fieldList.push({ type: 'string', value: 'supplierId', text: 'supplierId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'factoryNumber', text: 'factoryNumber', dictCode: '' })
      fieldList.push({ type: 'string', value: 'leaveFactoryDate', text: '出厂日期', dictCode: '' })
      fieldList.push({ type: 'string', value: 'acceptanceCheckDate', text: '验收日期', dictCode: '' })
      fieldList.push({ type: 'string', value: 'affiliationId', text: 'affiliationId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'manageId', text: '维护部门ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'manager', text: 'manager', dictCode: '' })
      fieldList.push({ type: 'string', value: 'useId', text: '使用部门ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'functionary', text: 'functionary', dictCode: '' })
      fieldList.push({ type: 'string', value: 'location', text: 'location', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentImportanceId', text: 'ABC标识ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'processParameters', text: 'processParameters', dictCode: '' })
      fieldList.push({ type: 'string', value: 'processParametersTemplateId', text: 'processParametersTemplateId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'precisionParameters', text: 'precisionParameters', dictCode: '' })
      fieldList.push({ type: 'string', value: 'precisionParametersTemplateId', text: 'precisionParametersTemplateId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'verification', text: 'verification', dictCode: '' })
      fieldList.push({ type: 'string', value: 'verificationPeriod', text: 'verificationPeriod', dictCode: '' })
      fieldList.push({ type: 'string', value: 'lastVerificationDate', text: 'lastVerificationDate', dictCode: '' })
      fieldList.push({ type: 'string', value: 'nextVerificationDate', text: 'nextVerificationDate', dictCode: '' })
      fieldList.push({ type: 'string', value: 'status', text: 'status', dictCode: '' })
      fieldList.push({ type: 'string', value: 'remark', text: 'remark', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentUda1', text: '工区', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentUda2', text: '安装位置', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentUda3', text: '重量', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentUda4', text: '重量计量单位ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'equipmentUda5', text: '功能位置', dictCode: '' })
      fieldList.push({ type: 'string', value: 'tenantId', text: 'tenantId', dictCode: '' })
      fieldList.push({ type: 'int', value: 'delFlag', text: 'delFlag', dictCode: '' })
      fieldList.push({ type: 'string', value: 'teamId', text: '维修班组ID', dictCode: '' })
      fieldList.push({ type: 'string', value: 'sourceId', text: 'sourceId', dictCode: '' })
      fieldList.push({ type: 'string', value: 'fundSource', text: '资金来源', dictCode: '' })
      fieldList.push({ type: 'string', value: 'factoryNo', text: '出厂编号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'mfr', text: '制造商', dictCode: '' })
      fieldList.push({ type: 'string', value: 'sourceCountry', text: '资产来源国家', dictCode: '' })
      fieldList.push({ type: 'string', value: 'gpo', text: '总功率', dictCode: '' })
      fieldList.push({ type: 'string', value: 'keyEquipmentIdentification', text: '关键设备标识', dictCode: '' })
      fieldList.push({ type: 'string', value: 'securityConfiguration', text: '安全配置', dictCode: '' })
      fieldList.push({ type: 'string', value: 'coolingSystem', text: '冷却系统', dictCode: '' })
      fieldList.push({ type: 'string', value: 'fireExtinguisher', text: '灭火器', dictCode: '' })
      fieldList.push({ type: 'string', value: 'fireExtinguisherValidityPeriod', text: '灭火器有效期', dictCode: '' })
      fieldList.push({ type: 'string', value: 'operatingSystem', text: '操作系统', dictCode: '' })
      fieldList.push({ type: 'string', value: 'system', text: '系统', dictCode: '' })
      fieldList.push({ type: 'string', value: 'port', text: '端口', dictCode: '' })
      fieldList.push({ type: 'BigDecimal', value: 'coordinateNum', text: '坐标数量', dictCode: '' })
      fieldList.push({ type: 'string', value: 'projectApprovalNo', text: '立项卡号', dictCode: '' })
      this.superFieldList = fieldList
    },
    editProcess(record) {
      this.$refs.processEditModel.edit(record);
    },
    editPrecision(record) {
      this.$refs.precisionEditModel.edit(record);
    },
    initOptions() {
      getAction(this.url.loadOptions).then(res => {
        if (res.success) {
          this.treeData = res.result
@@ -937,19 +1364,67 @@
        }
      })
    },
    handleUpdateABC(){
    handleUpdateABC() {
      this.$refs.updateABC.add();
    },
    handleUpdateWarranty(){
    handleUpdateWarranty() {
      this.$refs.updateWarranty.add();
    },
    handleEditSpareParts(record){
    handleEditSpareParts(record) {
      this.$refs.modalFormSpareParts.edit(record);
    }
    },
    handleUpdateKeyEquipment() {
      this.$refs.keyEquipmentUpdate.add();
    },
    //技术状态跳转
    handleTechnologyStatus(record) {
      //路由是eam/EquipmentCalibrationOrder
      this.$router.push({
        path: '/eam/EquipmentCalibrationOrder',
        query: {
          equipmentId: record.id,
          technologyStatus: record.technologyStatus,
          technologyStatusVerificationType: record.technologyStatusVerificationType,
        }
      })
    },
    }
    handleDownload() {
      var params = {}//查询条件
      params.type = "equipment"
      params.pageNo = 1
      params.pageSize = 10
      getAction(this.url.uploadList, params).then((res2) => {
        if (res2.success) {
          if (res2.result.records.length > 0) {
            downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
              if (!res) {
                this.$message.warning('文件下载失败')
                return
              } else {
                let fileName = res2.result.records[0].name
                if (typeof window.navigator.msSaveBlob !== 'undefined') {
                  window.navigator.msSaveBlob(new Blob([res]), fileName)
                } else {
                  let url = window.URL.createObjectURL(new Blob([res]))
                  let link = document.createElement('a')
                  link.style.display = 'none'
                  link.href = url
                  link.setAttribute('download', fileName)
                  document.body.appendChild(link)
                  link.click()
                  document.body.removeChild(link) //下载完成移除元素
                  window.URL.revokeObjectURL(url) //释放掉blob对象
                }
              }
            })
          }
        }
      })
    },
  }
}
</script>
<style scoped>
  @import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>