| | |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">省:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | <el-select |
| | | v-model="filters.values.province" |
| | | @change="searchCity" |
| | | @change="searchCity" |
| | | allow-create |
| | | size="small" placeholder="请选择省"> |
| | | <el-option |
| | | v-for="item in filters.data.province" |
| | |
| | | </div> |
| | | <div class="table-cell text-right">市:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | <el-select |
| | | v-model="filters.values.city" |
| | | @change="searchCounty" |
| | | @change="searchCounty" |
| | | allow-create |
| | | size="small" placeholder="请选择市"> |
| | | <el-option |
| | | v-for="item in filters.data.city" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="table-cell text-right">区/县:</div> |
| | | <div class="table-cell text-right">区/县/班组:</div> |
| | | <div class="table-cell"> |
| | | <el-select |
| | | <el-select |
| | | v-model="filters.values.county" |
| | | @change="searchHome" |
| | | size="small" placeholder="请选择区/县"> |
| | | @change="searchHome" |
| | | size="small" placeholder="请选择区/县/班组"> |
| | | <el-option |
| | | v-for="item in filters.data.county" |
| | | :key="item.value" |
| | |
| | | </div> |
| | | <div class="table-cell text-right">机房名称:</div> |
| | | <div class="table-cell w360"> |
| | | <el-select |
| | | <el-select |
| | | v-model="filters.values.home" |
| | | @click="changeHome" |
| | | @change="changeHome" |
| | | filterable |
| | | allow-create |
| | | size="small" placeholder="请选择机房名称"> |
| | | <el-option |
| | | v-for="item in filters.data.home" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="StationName5" |
| | | label="区县" |
| | | label="区县/班组" |
| | | min-width="120" |
| | | :resizable="false" |
| | | align="center"> |
| | |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="BattGroupNum" |
| | | label="机房内电池组编号" |
| | | prop="batteryType" |
| | | label="电池组类型" |
| | | min-width="134" |
| | | :resizable="false" |
| | | align="center"> |
| | |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="videoUrl" |
| | | label="视频监控序列号" |
| | | min-width="120" |
| | | :resizable="false" |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="tmp_id" |
| | | label="模板名称" |
| | | min-width="120" |
| | | :resizable="false" |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="250" |
| | | align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button :disabled="!isCanEdit" @click="showSelectEditDialog(scope.row)" type="primary" size="mini" v-if="autograph">编辑</el-button> |
| | | <el-button :disabled="!isCanEdit" @click="showSelectEditDialog(scope.row)" type="primary" size="mini" v-if="editMore">编辑</el-button> |
| | | <el-button :disabled="!isCanEdit" @click="handleClick(scope.row)" type="primary" size="mini" v-else>编辑</el-button> |
| | | <el-button :disabled="!isCanEdit" type="info" @click="handleAddClick(scope.row)" size="mini">添加电池组</el-button> |
| | | <el-button :disabled="!isCanEdit" type="danger" size="mini" @click="confirmDelHome(scope.row)">删除</el-button> |
| | |
| | | <el-button type="primary" @click="searchData" round size="mini" icon="el-icon-search">查询</el-button> |
| | | <el-button type="primary" round size="mini" icon="el-icon-wallet" @click="exportFile">导出</el-button> |
| | | </div> |
| | | <el-pagination size="mini" |
| | | :current-page="page.pageCurr" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | <el-pagination size="mini" |
| | | :current-page="page.pageCurr" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | :page-size="page.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="page.pageAll" |
| | |
| | | <!-- 电池信息编辑选择 --> |
| | | <el-dialog |
| | | title="电池信息编辑选择" |
| | | width="230px" |
| | | width="auto" |
| | | :visible.sync="selectEdit" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center"> |
| | | <div class="padding16161616"> |
| | | <div class="padding16161616 white-bg"> |
| | | <el-button :disabled="!isCanEdit" @click="dHandleClick()" type="primary" size="mini">电池信息编辑</el-button> |
| | | <el-button :disabled="!isCanEdit" @click="dAutographClick()" type="primary" size="mini">签名编辑</el-button> |
| | | <el-button :disabled="!isCanEdit" @click="dChangeIpClick()" type="primary" size="mini" v-if="changeIp">远程IP修改</el-button> |
| | | <el-button :disabled="!isCanEdit" @click="dAutographClick()" type="primary" size="mini" v-if="autograph">签名编辑</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false"> |
| | | <add-group-mager |
| | | <add-group-mager |
| | | v-if="addDialog" |
| | | :batt="batt" |
| | | @success="addSuccess"></add-group-mager> |
| | |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false"> |
| | | <edit-group-mager |
| | | <edit-group-mager |
| | | v-if="editDialog" |
| | | :batt="batt" |
| | | @success="editSuccess"></edit-group-mager> |
| | |
| | | class="dialog-center" |
| | | :modal-append-to-body="false"> |
| | | <edit-autograph :batt="batt" :visible.sync="autographDialog" v-if="autographDialog"></edit-autograph> |
| | | </el-dialog> |
| | | <!-- 远程修改ip --> |
| | | <el-dialog |
| | | title="远程修改IP" |
| | | width="auto" |
| | | :visible.sync="changeIpDialog" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false"> |
| | | <change-ip-params |
| | | :batt="batt" |
| | | :visible.sync="changeIpDialog" |
| | | v-if="changeIpDialog" |
| | | @success="changeIpSuccess"></change-ip-params> |
| | | </el-dialog> |
| | | </flex-layout> |
| | | </template> |
| | |
| | | import {isHasPermit} from "@/assets/js/tools"; |
| | | import faceManager from "@/assets/js/apis/faceManager/faceManager"; |
| | | import EditAutograph from "@/components/battGroupMager/EditAutograph"; |
| | | import ChangeIpParams from "@/pages/dataMager/dialog/ChangeIpParams"; |
| | | import { |
| | | const_battery_type |
| | | } from "@/assets/js/const"; |
| | | export default { |
| | | components: { |
| | | ChangeIpParams, |
| | | EditAutograph, |
| | | AddGroupMager, |
| | | EditGroupMager, |
| | |
| | | autograph: config.autograph.value, |
| | | selectEdit: false, |
| | | autographDialog: false, |
| | | changeIp: config.changeIp.value, |
| | | changeIpDialog: false, |
| | | batt: {}, |
| | | loading: '', |
| | | filters: { |
| | |
| | | // 导出表格 |
| | | exportFile() { |
| | | let tHeader = ['机房编号','省','市','区县','机房名称','设备名称','设备ID','设备IP','子网掩码','网关','协议名称','FBS设备索引','电池组ID','机房内电池组编号','电池组名称','浮充电压阀值(V)','离线电压阀值(V)','浮充电流阀值(A)','单体数量','标称容量(AH)','标称单体电压(V)','标称单体内阻(mΩ)','标称单体电导','单体电压次低偏移量(V)','负载电流(A)','最大核容电流(A)','电池品牌','电池型号','电池生产日期','投入使用日期']; |
| | | let filterVal = ['StationId','StationName1','StationName2','StationName5','StationName3','StationName4','FBSDeviceId','FbsDeviceIp','FbsDeviceIp_YM','FbsDeviceIp_WG','FBSDeviceName','GroupIndexInFBSDevice','BattGroupId','BattGroupNum','BattGroupName','FloatVolLevel','OfflineVolLevel','BattFloatCurrent','MonCount','MonCapStd','MonVolStd','MonResStd','MonSerStd','MonVolLowToAvg','Load_curr','DisCurrMax','BattProducer','BattModel','BattProductDate','BattInUseDate']; |
| | | let filterVal = ['StationId','StationName1','StationName2','StationName5','StationName3','StationName4','FBSDeviceId','FbsDeviceIp','FbsDeviceIp_YM','FbsDeviceIp_WG','FBSDeviceName','GroupIndexInFBSDevice','BattGroupId','BattGroupNum','BattGroupName','FloatVolLevel','OfflineVolLevel','BattFloatCurrent','MonCount','MonCapStd','MonVolStd','MonResStd','MonSerStd','MonVolLowToAvg','Load_curr','DisCurrMax','BattProducer','BattModel','BattProductDate1','BattInUseDate1']; |
| | | let list = this.tableData; |
| | | this.tableData.forEach(item=>{ |
| | | item.BattProductDate1 = new Date(item.BattProductDate).format('yyyy-MM-dd'); |
| | | item.BattInUseDate1 = new Date(item.BattInUseDate).format('yyyy-MM-dd'); |
| | | }); |
| | | let excelData = this.formatJson(filterVal, list); |
| | | export_json_to_excel(tHeader, excelData, "电池信息管理数据"); |
| | | }, |
| | |
| | | if(searchParams.StationName5 == "") { |
| | | // 设置机房 |
| | | this.filters.data.home = [{ |
| | | label: "请选择区/县", |
| | | label: "请选择区/县/班组", |
| | | value: '' |
| | | }]; |
| | | // 查询数据 |
| | |
| | | }; |
| | | data.push(tmp); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | // 设置第一笔数据 |
| | |
| | | }); |
| | | // 设置机房 |
| | | this.filters.data.home = data; |
| | | |
| | | |
| | | // 查询数据 |
| | | this.searchData(true); |
| | | }); |
| | |
| | | searchData(noLoading) { |
| | | if(!noLoading) { |
| | | this.loading = this.$layer.loading(1); |
| | | } |
| | | } |
| | | let filters= this.filters.values; |
| | | // 构造查询条件 |
| | | let searchParams = { |
| | |
| | | this.page.pageCurr = 1; |
| | | this.page.pageAll = 0; |
| | | } |
| | | data.forEach(item=>{ |
| | | item.batteryType = const_battery_type.getLabel(item.BattGroupNum, const_battery_type.types) |
| | | }); |
| | | console.log(data); |
| | | // 设置表格数据 |
| | | this.tableData = data; |
| | | |
| | |
| | | this.$layer.close(loading); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除'+batt.StationName3+'成功!' |
| | | }); |
| | | this.searchData(); |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | }); |
| | |
| | | this.selectEdit = false; |
| | | this.autographDialog = true; |
| | | }, |
| | | dChangeIpClick() { |
| | | this.selectEdit = false; |
| | | this.changeIpDialog = true; |
| | | }, |
| | | editSuccess() { |
| | | // 关闭弹出面板 |
| | | this.editDialog = false |
| | | // 从新查询数据 |
| | | this.searchData(); |
| | | }, |
| | | changeIpSuccess() { |
| | | // 关闭弹出面板 |
| | | this.changeIpDialog = false |
| | | // 从新查询数据 |
| | | this.searchData(); |
| | | } |
| | |
| | | return "编辑"+batt.StationName1+'-'+batt.StationName2 |
| | | +'-'+batt.StationName5+'-'+batt.StationName3 |
| | | +'-'+batt.StationName4 |
| | | }, |
| | | editMore() { |
| | | return this.autograph||this.changeIp?true:false; |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .white-bg { |
| | | background-color: #fff; |
| | | } |
| | | </style> |
| | | |
| | | |