|
@@ -3,385 +3,174 @@
|
|
|
<alarm @eq_type="eqSelect"></alarm>
|
|
|
|
|
|
<div class="app-container">
|
|
|
- <div class="filter-container" style="padding-bottom: 0px">
|
|
|
- <div class="search-box-area" id="searchBox">
|
|
|
- <div class="search-item">
|
|
|
- <el-select
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- v-model="queryParam.equipment_type"
|
|
|
- placeholder="请选择设备类别"
|
|
|
- clearable
|
|
|
- @change="handleChange"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in equ_types"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
-
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="search-item">
|
|
|
- <el-input
|
|
|
- v-model="queryParam.material_number"
|
|
|
- placeholder="请输入物料号"
|
|
|
- clearable
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- />
|
|
|
+ <div class="filter-container" style="padding-bottom: 0px">
|
|
|
+ <div class="search-box-area" id="searchBox">
|
|
|
+ <div class="search-item">
|
|
|
+ <el-select class="filter-item form-search-input fl" v-model="queryParam.equipment_type"
|
|
|
+ placeholder="请选择设备类别" clearable @change="handleChange">
|
|
|
+ <el-option v-for="item in equ_types" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <el-input v-model="queryParam.material_number" placeholder="请输入物料号" clearable
|
|
|
+ class="filter-item form-search-input fl" @keyup.enter.native="handleSearch" />
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <el-input v-model="queryParam.name" placeholder="请输入设备名称" clearable class="filter-item form-search-input fl"
|
|
|
+ @keyup.enter.native="handleSearch" />
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <el-input v-model="queryParam.number" placeholder="请输入固定资产/类固资产/序列" clearable
|
|
|
+ class="filter-item form-search-input fl" @keyup.enter.native="handleSearch" />
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <el-input v-model="queryParam.imei" placeholder="泵的Imei号" clearable class="filter-item form-search-input fl"
|
|
|
+ @keyup.enter.native="handleSearch" />
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="search-item">
|
|
|
- <el-input
|
|
|
- v-model="queryParam.name"
|
|
|
- placeholder="请输入设备名称"
|
|
|
- clearable
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- />
|
|
|
+ <div class="search-operate-area">
|
|
|
+ <!-- <el-input v-model="queryParam.code" placeholder="唯一编码" clearable class="filter-item form-search-input fl" /> -->
|
|
|
+ <el-button class="filter-item search fl" icon="el-icon-search" @click="handleSearch">搜索</el-button>
|
|
|
+ <el-button class="filter-item fl" icon="el-icon-refresh" @click="handleRefresh">重置</el-button>
|
|
|
+ -->
|
|
|
</div>
|
|
|
- <div class="search-item">
|
|
|
- <el-input
|
|
|
- v-model="queryParam.number"
|
|
|
- placeholder="请输入固定资产/类固资产/序列"
|
|
|
- clearable
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- @keyup.enter.native="handleSearch"
|
|
|
- />
|
|
|
+ <div class="search-operate-area1">
|
|
|
+ <!-- <el-button size="mini" class="filter-item search fl" icon="el-icon-plus" @click="handleCreate">添加</el-button> -->
|
|
|
+ <el-button class="filter-item search f2" icon="el-icon-setting" @click="showColumnOption">列设置</el-button>
|
|
|
+ <el-button class="filter-item search f2" icon="el-icon-refresh-right" @click="refresh">刷新</el-button>
|
|
|
</div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="search-operate-area">
|
|
|
- <!-- <el-input v-model="queryParam.code" placeholder="唯一编码" clearable class="filter-item form-search-input fl" /> -->
|
|
|
- <el-button
|
|
|
- class="filter-item search fl"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="handleSearch"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- class="filter-item fl"
|
|
|
- icon="el-icon-refresh"
|
|
|
- @click="handleRefresh"
|
|
|
- >重置</el-button
|
|
|
- >
|
|
|
- -->
|
|
|
- </div>
|
|
|
- <div class="search-operate-area1">
|
|
|
- <!-- <el-button size="mini" class="filter-item search fl" icon="el-icon-plus" @click="handleCreate">添加</el-button> -->
|
|
|
- <el-button
|
|
|
- class="filter-item search f2"
|
|
|
- icon="el-icon-setting"
|
|
|
- @click="showColumnOption"
|
|
|
- >列设置</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- class="filter-item search f2"
|
|
|
- icon="el-icon-refresh-right"
|
|
|
- @click="refresh"
|
|
|
- >刷新</el-button
|
|
|
- >
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- :data="data"
|
|
|
- v-loading="loading"
|
|
|
- ref="multipleTable"
|
|
|
- @selection-change="hydraulicSelectMulti"
|
|
|
- @sort-change="sortChange"
|
|
|
- :dynamicColumnSetting="true"
|
|
|
- tooltip-effect="dark"
|
|
|
- style="width: 100%"
|
|
|
- border
|
|
|
- fit
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- fixed="left"
|
|
|
- width="55"
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="material_number"
|
|
|
- label="物料号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.material_number"
|
|
|
+ <el-table :data="data" v-loading="loading" ref="multipleTable" @selection-change="hydraulicSelectMulti"
|
|
|
+ @sort-change="sortChange" :dynamicColumnSetting="true" tooltip-effect="dark" style="width: 100%" border fit>
|
|
|
+ <el-table-column type="selection" fixed="left" width="55"></el-table-column>
|
|
|
+ <el-table-column prop="material_number" label="物料号" align="center" v-if="showColumn.material_number"
|
|
|
+ width="120" />
|
|
|
+ <el-table-column prop="classification" label="设备分类" align="center" v-if="showColumn.classification" />
|
|
|
+ <el-table-column prop="equ_type_name" label="设备类别" align="center" v-if="showColumn.equ_type_name" width="120" />
|
|
|
+ <el-table-column prop="name" label="设备名称" align="center" v-if="showColumn.name" width="120" />
|
|
|
+ <el-table-column prop="equipment_model" label="设备型号" align="center" v-if="showColumn.equipment_model" />
|
|
|
+ <el-table-column prop="issue_unit" label="发放单位" align="center" v-if="showColumn.issue_unit" />
|
|
|
+ <el-table-column prop="fixed_asset_number" label="固定资产编号" align="center" v-if="showColumn.fixed_asset_number" />
|
|
|
+ <el-table-column prop="fixed_asset_number2" label="类固资产编号" align="center"
|
|
|
+ v-if="showColumn.fixed_asset_number" />
|
|
|
|
|
|
- width="120"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="classification"
|
|
|
- label="设备分类"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.classification"
|
|
|
-
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="equ_type_name"
|
|
|
- label="设备类别"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.equ_type_name"
|
|
|
-
|
|
|
- width="120"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="name"
|
|
|
- label="设备名称"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.name"
|
|
|
-
|
|
|
- width="120"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="equipment_model"
|
|
|
- label="设备型号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.equipment_model"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="issue_unit"
|
|
|
- label="发放单位"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.issue_unit"
|
|
|
-
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="fixed_asset_number"
|
|
|
- label="固定资产编号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.fixed_asset_number"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="fixed_asset_number2"
|
|
|
- label="类固资产编号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.fixed_asset_number"
|
|
|
- />
|
|
|
+ <el-table-column prop="serial_number" label="序列号" align="center" v-if="showColumn.serial_number" />
|
|
|
+ <el-table-column prop="factory_number" label="出厂编号" align="center" v-if="showColumn.factory_number" />
|
|
|
+ <el-table-column prop="check_last_time" label="上次校验时间" align="center" v-if="showColumn.check_last_time"
|
|
|
+ width="100" />
|
|
|
+ <el-table-column prop="check_next_time" label="下次校验时间" align="center" width="100"
|
|
|
+ v-if="showColumn.check_next_time" />
|
|
|
+ <el-table-column prop="check_status1" label="校验状态" align="center" v-if="showColumn.check_status1" />
|
|
|
+ <el-table-column prop="status1" label="状态" align="center" v-if="showColumn.status1" />
|
|
|
+ <el-table-column label="操作" width="250" align="center" fixed="right">
|
|
|
+ <template slot-scope="record">
|
|
|
+ <el-tooltip content="修改" placement="top" :enterable="false">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-edit" @click="handleUpdate(record.row)"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip content="查看" placement="top" :enterable="false">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-view" @click="handleDetail(record.row)"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
- <el-table-column
|
|
|
- prop="serial_number"
|
|
|
- label="序列号"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.serial_number"
|
|
|
-
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="factory_number"
|
|
|
- label="出厂编号"
|
|
|
- align="center"
|
|
|
-
|
|
|
- v-if="showColumn.factory_number"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="check_last_time"
|
|
|
- label="上次校验时间"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.check_last_time"
|
|
|
-
|
|
|
- width="100"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="check_next_time"
|
|
|
- label="下次校验时间"
|
|
|
- align="center"
|
|
|
-
|
|
|
- width="100"
|
|
|
- v-if="showColumn.check_next_time"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="check_status1"
|
|
|
- label="校验状态"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.check_status1"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="status1"
|
|
|
- label="状态"
|
|
|
- align="center"
|
|
|
- v-if="showColumn.status1"
|
|
|
-
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- width="180"
|
|
|
- align="center"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
- <template slot-scope="record">
|
|
|
- <el-tooltip
|
|
|
- content="修改"
|
|
|
- placement="top"
|
|
|
- :enterable="false"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(record.row)"
|
|
|
- ></el-button>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip
|
|
|
- content="查看"
|
|
|
- placement="top"
|
|
|
- :enterable="false"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- icon="el-icon-view"
|
|
|
- @click="handleDetail(record.row)"
|
|
|
- ></el-button>
|
|
|
- </el-tooltip>
|
|
|
- <el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(record.row.id)" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <transition name="fade">
|
|
|
- <div class="columnOption" v-show="isShowColumn">
|
|
|
- <div class="content">
|
|
|
- <div class="head">选择显示字段</div>
|
|
|
- <div class="body">
|
|
|
- <el-checkbox v-model="checkList.depart_name" disabled>所属部门</el-checkbox>
|
|
|
- <!-- <el-checkbox v-model="checkList.alarm_state_text" disabled>告警状态</el-checkbox> -->
|
|
|
- <el-checkbox v-model="checkList.material_number">物料号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.classification">设备分类</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.equ_type_name">设备类别</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.name">名称</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.equipment_model">设备型号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.fixed_asset_number">固定资产编号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.fixed_asset_number2">类固定资产编号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.serial_number">序列号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.factory_number">出厂编号</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.check_last_time">上次校验时间</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.check_next_time">下次校验时间</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.check_status1">校验状态</el-checkbox>
|
|
|
- <el-checkbox v-model="checkList.status1">状态</el-checkbox>
|
|
|
- </div>
|
|
|
- <div class="footer">
|
|
|
- <el-button size="small" type="primary" plain @click="saveColumn"
|
|
|
- >保存列配置</el-button
|
|
|
- >
|
|
|
+ <el-tooltip v-if="record.row.equipment_type==2" content="日志" placement="top" :enterable="false"
|
|
|
+ v-action="'HydEquipment@SelectLogByImei'">
|
|
|
+ <el-button type="warning" size="mini" icon="el-icon-s-tools" @click="handleLogDetail(record.row)">
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(record.row.id)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <transition name="fade">
|
|
|
+ <div class="columnOption" v-show="isShowColumn">
|
|
|
+ <div class="content">
|
|
|
+ <div class="head">选择显示字段</div>
|
|
|
+ <div class="body">
|
|
|
+ <el-checkbox v-model="checkList.depart_name" disabled>所属部门</el-checkbox>
|
|
|
+ <!-- <el-checkbox v-model="checkList.alarm_state_text" disabled>告警状态</el-checkbox> -->
|
|
|
+ <el-checkbox v-model="checkList.material_number">物料号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.classification">设备分类</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.equ_type_name">设备类别</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.name">名称</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.equipment_model">设备型号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.fixed_asset_number">固定资产编号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.fixed_asset_number2">类固定资产编号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.serial_number">序列号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.factory_number">出厂编号</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.check_last_time">上次校验时间</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.check_next_time">下次校验时间</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.check_status1">校验状态</el-checkbox>
|
|
|
+ <el-checkbox v-model="checkList.status1">状态</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button size="small" type="primary" plain @click="saveColumn">保存列配置</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- :loading="downloadLoading"
|
|
|
- style="margin-top: 15px"
|
|
|
- @click="handleCreate"
|
|
|
- >添加</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- icon="el-icon-delete"
|
|
|
- v-if="selectedIds.length > 0"
|
|
|
- style="margin-top: 15px"
|
|
|
- @click="handleMultiDelete()"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- icon="el-icon-download"
|
|
|
- :loading="downloadLoading"
|
|
|
- style="margin-top: 15px"
|
|
|
- @click="exportExcel"
|
|
|
- >导出</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-upload"
|
|
|
- :loading="downloadLoading"
|
|
|
- style="margin-top: 15px"
|
|
|
- @click="importExcel"
|
|
|
- >导入</el-button
|
|
|
- >
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- class="pagination-container"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="paginate.current"
|
|
|
- :page-sizes="paginate.sizes"
|
|
|
- :page-size="paginate.limit"
|
|
|
- :layout="paginate.layout"
|
|
|
- :total="paginate.total"
|
|
|
- />
|
|
|
- <form-model
|
|
|
- @sendVal="closeDialog"
|
|
|
- :formModelVisible="formVisible"
|
|
|
- :title="title"
|
|
|
- :ref="formName"
|
|
|
- />
|
|
|
- <detail
|
|
|
- :detailVisible="detailVisible"
|
|
|
- @sendVal="closeDrawer"
|
|
|
- :record="detail"
|
|
|
- />
|
|
|
-
|
|
|
- <hydraulicDetail
|
|
|
- :detailVisible="hydraulicDetailVisible"
|
|
|
- @sendVal="closeDrawer"
|
|
|
- :record="hydraulicDetail"
|
|
|
- />
|
|
|
- <wrenchDetail
|
|
|
- :detailVisible="wrenchDetailVisible"
|
|
|
- @sendVal="closeDrawer"
|
|
|
- :record="wrenchDetail"
|
|
|
- />
|
|
|
+ </transition>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" :loading="downloadLoading" style="margin-top: 15px"
|
|
|
+ @click="handleCreate">添加</el-button>
|
|
|
+ <el-button type="danger" icon="el-icon-delete" v-if="selectedIds.length > 0" style="margin-top: 15px"
|
|
|
+ @click="handleMultiDelete()">删除</el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-download" :loading="downloadLoading" style="margin-top: 15px"
|
|
|
+ @click="importHydExcels">导出</el-button>
|
|
|
|
|
|
- <!-- 导入弹框 -->
|
|
|
- <el-dialog
|
|
|
- title="导入液压设备"
|
|
|
- append-to-body
|
|
|
- width="400px"
|
|
|
- :visible.sync="uploadDialogVisible"
|
|
|
- custom-class="upload-dialog"
|
|
|
- >
|
|
|
- <!-- <el-cascader
|
|
|
- v-model="selectedDepartId"
|
|
|
- class="filter-item form-search-input fl"
|
|
|
- :options="departments"
|
|
|
- :props="{ checkStrictly: true, label: 'department_name', value: 'id' }"
|
|
|
- style="margin-bottom: 10px"
|
|
|
- @change="changeCards"
|
|
|
- ></el-cascader> -->
|
|
|
- <el-upload
|
|
|
- class="upload-demo"
|
|
|
- drag
|
|
|
- :action="actionUrl"
|
|
|
- :headers="headers"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- :show-file-list="true"
|
|
|
- :on-change="onchange"
|
|
|
- :on-remove="onremove"
|
|
|
- :on-exceed="onexeced"
|
|
|
- :limit="1"
|
|
|
- ref="upload"
|
|
|
- >
|
|
|
- <i class="el-icon-upload"></i>
|
|
|
- <div class="el-upload__text">
|
|
|
- 将文件拖到此处,或
|
|
|
- <em>点击上传</em>
|
|
|
- </div>
|
|
|
- <div class="el-upload__tip upload-tips" slot="tip">
|
|
|
- 只能上传xls/xlsx文件
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- href="https://rlfd.oss-cn-hangzhou.aliyuncs.com/smart_tool/import_pump.xls"
|
|
|
- style="margin-top: 10px"
|
|
|
- >下载模板</el-link
|
|
|
- >
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="uploadDialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="importCards" :loading="loadings">{{
|
|
|
+
|
|
|
+ <el-button type="success" icon="el-icon-upload" :loading="downloadLoading" style="margin-top: 15px"
|
|
|
+ @click="importExcel">导入</el-button>
|
|
|
+ <el-pagination background class="pagination-container" @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange" :current-page="paginate.current" :page-sizes="paginate.sizes"
|
|
|
+ :page-size="paginate.limit" :layout="paginate.layout" :total="paginate.total" />
|
|
|
+ <form-model @sendVal="closeDialog" :formModelVisible="formVisible" :title="title" :ref="formName" />
|
|
|
+
|
|
|
+ <detail :detailVisible="detailVisible" @sendVal="closeDrawer" :record="detail" />
|
|
|
+
|
|
|
+ <hydraulicDetail :detailVisible="hydraulicDetailVisible" @sendVal="closeDrawer" :record="hydraulicDetail" />
|
|
|
+
|
|
|
+ <wrenchDetail :detailVisible="wrenchDetailVisible" @sendVal="closeDrawer" :record="wrenchDetail" />
|
|
|
+
|
|
|
+ <logDetail :detailVisible="logDetailVisible" @sendVal="closeDrawer" :record="logDetail">
|
|
|
+ </logDetail>
|
|
|
+ <!-- 导入弹框 -->
|
|
|
+ <el-dialog title="导入液压设备" append-to-body width="400px" :visible.sync="uploadDialogVisible"
|
|
|
+ custom-class="upload-dialog">
|
|
|
+ <!-- <el-cascader
|
|
|
+ v-model="selectedDepartId"
|
|
|
+ class="filter-item form-search-input fl"
|
|
|
+ :options="departments"
|
|
|
+ :props="{ checkStrictly: true, label: ' department_name', value: 'id' }" style="margin-bottom: 10px"
|
|
|
+ @change="changeCards">
|
|
|
+ </el-cascader> -->
|
|
|
+ <el-upload class="upload-demo" drag :action="actionUrl" :headers="headers" :before-upload="beforeUpload"
|
|
|
+ :show-file-list="true" :on-change="onchange" :on-remove="onremove" :on-exceed="onexeced" :limit="1"
|
|
|
+ ref="upload">
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ 将文件拖到此处,或
|
|
|
+ <em>点击上传</em>
|
|
|
+ </div>
|
|
|
+ <div class="el-upload__tip upload-tips" slot="tip">
|
|
|
+ 只能上传xls/xlsx文件
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <el-link type="primary" href="https://rlfd.oss-cn-hangzhou.aliyuncs.com/smart_tool/import_pump.xls"
|
|
|
+ style="margin-top: 10px">下载模板</el-link>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="uploadDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importCards" :loading="loadings">{{
|
|
|
submitText
|
|
|
- }}</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
+ }}</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 导出弹框 -->
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -389,9 +178,10 @@
|
|
|
import rlListOperate from "@/layout/rl-list-operate/rlListOperate";
|
|
|
import { action } from "@/directive/permission/index.js";
|
|
|
import { getToken } from "../../../utils/auth";
|
|
|
-import detail from "./detail.vue"
|
|
|
+import detail from "./detail.vue";
|
|
|
import wrenchDetail from "./wrench_detail.vue"
|
|
|
import hydraulicDetail from "./hydraulic_detail.vue"
|
|
|
+import logDetail from "./log/index.vue"
|
|
|
import formModel from './formModel.vue'
|
|
|
import alarm from './alarm.vue'
|
|
|
export default {
|
|
@@ -403,11 +193,13 @@ export default {
|
|
|
detail,
|
|
|
wrenchDetail,
|
|
|
hydraulicDetail,
|
|
|
- alarm
|
|
|
+ alarm,
|
|
|
+ logDetail,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
url: "hydEquipment",
|
|
|
+ exportUrl:'',
|
|
|
defaultQueryParam:['pid']
|
|
|
,
|
|
|
queryParam: {
|
|
@@ -415,9 +207,12 @@ export default {
|
|
|
material_number: "",
|
|
|
name: "",
|
|
|
number: "",
|
|
|
- equipment_type:'',
|
|
|
-
|
|
|
+ equipment_type: '',
|
|
|
+ imei:''
|
|
|
},
|
|
|
+ //带入参数
|
|
|
+ excelParam: [],
|
|
|
+
|
|
|
deviceTypes:[],
|
|
|
current_type: {
|
|
|
0: "success",
|
|
@@ -437,7 +232,10 @@ export default {
|
|
|
hydraulicDetail:{},
|
|
|
//扳手详情
|
|
|
wrenchDetailVisible:false,
|
|
|
- wrenchDetail:{},
|
|
|
+ wrenchDetail: {},
|
|
|
+ //设备日志详情
|
|
|
+ logDetailVisible: false,
|
|
|
+ logDetail: {},
|
|
|
|
|
|
isShowColumn: false,
|
|
|
// 列的配置化对象,存储配置信息
|
|
@@ -541,10 +339,18 @@ export default {
|
|
|
this.detail = row
|
|
|
}
|
|
|
},
|
|
|
+ //日志详情
|
|
|
+ handleLogDetail(row) {
|
|
|
+ this.logDetailVisible = true;
|
|
|
+ this.logDetail = row;
|
|
|
+ },
|
|
|
+
|
|
|
closeDrawer(){
|
|
|
this.detailVisible = false;
|
|
|
this.hydraulicDetailVisible=false;
|
|
|
- this.wrenchDetailVisible=false;
|
|
|
+ this.wrenchDetailVisible = false;
|
|
|
+ this.logDetailVisible = false;
|
|
|
+
|
|
|
},
|
|
|
changeUsedEvent(row,value){
|
|
|
|
|
@@ -589,14 +395,21 @@ export default {
|
|
|
// console.log(file);
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * @Descripttion: 导出excel
|
|
|
+ * @name: likang
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ importHydExcels()
|
|
|
+ {
|
|
|
+ this.queryParam.excelParam = this.excelParam;
|
|
|
+ this.exportExcel();
|
|
|
+ delete this.queryParam.excelParam;
|
|
|
+ },
|
|
|
importCards() {
|
|
|
// console.log(this.excel_url);
|
|
|
var url = this.excel_url,
|
|
|
depart_id = this.selectedDepartId;
|
|
|
- if (depart_id == "") {
|
|
|
- this.$message.error("请选择部门");
|
|
|
- return;
|
|
|
- }
|
|
|
if (url == "") {
|
|
|
this.$message.error("请上传文件");
|
|
|
return;
|
|
@@ -604,7 +417,7 @@ export default {
|
|
|
this.loadings = true;
|
|
|
this.submitText = "导入中";
|
|
|
this.$http
|
|
|
- .post("cardDevice/import", { url: url, depart_id: depart_id })
|
|
|
+ .post("importHydExcel", { url: url})
|
|
|
.then((response) => {
|
|
|
if (response.data.error) {
|
|
|
this.$message.error(response.data.msg);
|