| | |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="250" align="center"> |
| | | <el-table-column fixed="right" label="操作" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | :disabled="!isCanEdit" |
| | |
| | | v-else |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | :disabled="!isCanEdit" |
| | | type="info" |
| | | @click="handleAddClick(scope.row)" |
| | | size="mini" |
| | | >添加电池组</el-button |
| | | <el-popover |
| | | placement="top-start" |
| | | style="margin-left: 8px" |
| | | trigger="hover" |
| | | > |
| | | <el-button |
| | | :disabled="!isCanEdit" |
| | | type="danger" |
| | | size="mini" |
| | | @click="confirmDelHome(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | <div class="table-tools-more"> |
| | | <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" |
| | | size="mini" |
| | | @click="showRecord(scope.row)" |
| | | >变更记录</el-button |
| | | > |
| | | </div> |
| | | <el-button slot="reference" type="success" size="mini" |
| | | >更多</el-button |
| | | > |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | @click="addHome()" |
| | | round |
| | | size="mini" |
| | | icon="el-icon-plus">新建电池组</el-button> |
| | | icon="el-icon-plus" |
| | | >新建电池组</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <!-- 电池信息编辑选择 --> |
| | |
| | | @success="changeIpSuccess" |
| | | ></change-ip-params> |
| | | </el-dialog> |
| | | <!-- 变更记录 --> |
| | | <el-dialog |
| | | :title="recordTitle" |
| | | width="800" |
| | | :visible.sync="recordVisible" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <div class="reason-wrap"> |
| | | <el-table stripe size="mini" height="100%" :data="recordDatas"> |
| | | <el-table-column type="index" label="序号"></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, idx) in recordHeader" |
| | | :key="'theader1_' + idx" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :resizable="false" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-dialog> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | |
| | | searchCounty, |
| | | getExistStations, |
| | | } from "@/assets/js/api.js"; |
| | | import { search, del } from "./js/battGroupMager"; |
| | | import { search, del, getBattRecords } from "./js/battGroupMager"; |
| | | // 引入导出表格 |
| | | import { ExportFile } from "@/assets/js/tools/exportFile"; |
| | | import { isHasPermit } from "@/assets/js/tools"; |
| | |
| | | import ChangeIpParams from "./components/ChangeIpParams"; |
| | | import { const_battery_type } from "@/assets/js/const"; |
| | | export default { |
| | | name: 'battGroupMager', |
| | | name: "battGroupMager", |
| | | components: { |
| | | ChangeIpParams, |
| | | EditAutograph, |
| | |
| | | let isCanEdit = isHasPermit("batttest_data_edit_permit", permits); |
| | | let config = this.$CFG; |
| | | return { |
| | | recordTitle: "变更记录", |
| | | recordVisible: false, |
| | | recordDatas: [], |
| | | recordHeader: [ |
| | | { |
| | | prop: "recordTime", |
| | | label: "记录时间", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: "updateName", |
| | | label: "变更操作人", |
| | | minWidth: 150, |
| | | }, |
| | | { |
| | | prop: "updateReason", |
| | | label: "变理原因", |
| | | minWidth: 180, |
| | | }, |
| | | ], |
| | | isCanEdit: isCanEdit, |
| | | autograph: config.autograph.value, |
| | | selectEdit: false, |
| | |
| | | }, |
| | | tableHeader: [ |
| | | { |
| | | prop: 'stationId', |
| | | label: '机房编号', |
| | | minWidth: 150 |
| | | prop: "stationId", |
| | | label: "机房编号", |
| | | minWidth: 150, |
| | | }, |
| | | { |
| | | prop: 'stationName1', |
| | | label: '省', |
| | | minWidth: 120 |
| | | prop: "stationName1", |
| | | label: "省", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'stationName2', |
| | | label: '市', |
| | | minWidth: 120 |
| | | prop: "stationName2", |
| | | label: "市", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'stationName5', |
| | | label: '区县/班组', |
| | | minWidth: 120 |
| | | prop: "stationName5", |
| | | label: "区县/班组", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'stationName3', |
| | | label: '机房名称', |
| | | minWidth: 280 |
| | | prop: "stationName3", |
| | | label: "机房名称", |
| | | minWidth: 280, |
| | | }, |
| | | { |
| | | prop: 'stationName4', |
| | | label: '设备名称', |
| | | minWidth: 120 |
| | | prop: "stationName4", |
| | | label: "设备名称", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'monCapStd', |
| | | label: '标称容量(AH)', |
| | | minWidth: 120 |
| | | prop: "monCapStd", |
| | | label: "标称容量(AH)", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'monVolStd', |
| | | label: '标称单体电压(V)', |
| | | minWidth: 130 |
| | | prop: "monVolStd", |
| | | label: "标称单体电压(V)", |
| | | minWidth: 130, |
| | | }, |
| | | { |
| | | prop: 'monResStd', |
| | | label: '标称单体内阻(mΩ)', |
| | | minWidth: 150 |
| | | prop: "monResStd", |
| | | label: "标称单体内阻(mΩ)", |
| | | minWidth: 150, |
| | | }, |
| | | { |
| | | prop: 'battProductDate', |
| | | label: '电池生产日期', |
| | | prop: "battProductDate", |
| | | label: "电池生产日期", |
| | | sortable: true, |
| | | minWidth: 160 |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | prop: 'battInUseDate', |
| | | label: '投入使用日期', |
| | | prop: "battInUseDate", |
| | | label: "投入使用日期", |
| | | sortable: true, |
| | | minWidth: 160 |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | prop: 'battProducer', |
| | | label: '电池品牌', |
| | | minWidth: 120 |
| | | prop: "battProducer", |
| | | label: "电池品牌", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'battModel', |
| | | label: '电池型号', |
| | | minWidth: 120 |
| | | prop: "battModel", |
| | | label: "电池型号", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'loadCurr', |
| | | label: '负载电流(A)', |
| | | minWidth: 120 |
| | | prop: "loadCurr", |
| | | label: "负载电流(A)", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'disCurrMax', |
| | | label: '最大核容电流(A)', |
| | | minWidth: 130 |
| | | prop: "disCurrMax", |
| | | label: "最大核容电流(A)", |
| | | minWidth: 130, |
| | | }, |
| | | { |
| | | prop: 'fbsdeviceId', |
| | | label: '设备ID', |
| | | minWidth: 120 |
| | | prop: "fbsdeviceId", |
| | | label: "设备ID", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'fbsdeviceIp', |
| | | label: '设备IP', |
| | | minWidth: 160 |
| | | prop: "fbsdeviceIp", |
| | | label: "设备IP", |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | prop: 'fbsdeviceipYm', |
| | | label: '子网掩码', |
| | | minWidth: 160 |
| | | prop: "fbsdeviceipYm", |
| | | label: "子网掩码", |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | prop: 'fbsdeviceipWg', |
| | | label: '网关', |
| | | minWidth: 160 |
| | | prop: "fbsdeviceipWg", |
| | | label: "网关", |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | prop: 'fbsdeviceName', |
| | | label: '协议名称', |
| | | minWidth: 120 |
| | | prop: "fbsdeviceName", |
| | | label: "协议名称", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'groupIndexInFBSDevice', |
| | | label: 'FBS设备索引', |
| | | minWidth: 120 |
| | | prop: "groupIndexInFBSDevice", |
| | | label: "FBS设备索引", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'battGroupId', |
| | | label: '电池组ID', |
| | | minWidth: 120 |
| | | prop: "battGroupId", |
| | | label: "电池组ID", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'batteryType', |
| | | label: '电池组类型', |
| | | minWidth: 134 |
| | | prop: "batteryType", |
| | | label: "电池组类型", |
| | | minWidth: 134, |
| | | }, |
| | | { |
| | | prop: 'battGroupName', |
| | | label: '电池组名称', |
| | | minWidth: 120 |
| | | prop: "battGroupName", |
| | | label: "电池组名称", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'floatVolLevel', |
| | | label: '浮充电压阀值(V)', |
| | | minWidth: 130 |
| | | prop: "floatVolLevel", |
| | | label: "浮充电压阀值(V)", |
| | | minWidth: 130, |
| | | }, |
| | | { |
| | | prop: 'offlineVolLevel', |
| | | label: '离线电压阀值(V)', |
| | | minWidth: 130 |
| | | prop: "offlineVolLevel", |
| | | label: "离线电压阀值(V)", |
| | | minWidth: 130, |
| | | }, |
| | | { |
| | | prop: 'battFloatCurrent', |
| | | label: '浮充电流阀值(A)', |
| | | minWidth: 130 |
| | | prop: "battFloatCurrent", |
| | | label: "浮充电流阀值(A)", |
| | | minWidth: 130, |
| | | }, |
| | | { |
| | | prop: 'monCount', |
| | | label: '单体数量', |
| | | minWidth: 120 |
| | | prop: "monCount", |
| | | label: "单体数量", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'monSerStd', |
| | | label: '标称单体电导', |
| | | minWidth: 120 |
| | | prop: "monSerStd", |
| | | label: "标称单体电导", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'monVolLowToAvg', |
| | | label: '单体电压次低偏移量(V)', |
| | | minWidth: 168 |
| | | prop: "monVolLowToAvg", |
| | | label: "单体电压次低偏移量(V)", |
| | | minWidth: 168, |
| | | }, |
| | | { |
| | | prop: 'videoUrl', |
| | | label: '视频监控序列号', |
| | | minWidth: 120 |
| | | prop: "videoUrl", |
| | | label: "视频监控序列号", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'tmpId', |
| | | label: '模板名称', |
| | | minWidth: 120 |
| | | prop: "tmpId", |
| | | label: "模板名称", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | prop: 'stationPhone', |
| | | label: '基站号码', |
| | | prop: "stationPhone", |
| | | label: "基站号码", |
| | | minWidth: 120, |
| | | }, |
| | | ], |
| | |
| | | delHome(batt) { |
| | | let loading = this.$layer.loading(1); |
| | | // 请求后台 |
| | | del({battgroupId: batt.battGroupId}) |
| | | del({ battgroupId: batt.battGroupId }) |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code) { |
| | |
| | | // 从新查询数据 |
| | | this.searchData(); |
| | | }, |
| | | showRecord(rData) { |
| | | let loading = this.$layer.loading(); |
| | | // 查询 |
| | | getBattRecords(rData.battGroupId) |
| | | .then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | let list = []; |
| | | if (code && data) { |
| | | list = data2; |
| | | } |
| | | this.recordDatas = list; |
| | | this.recordTitle = rData.stationName + ' ' + rData.battGroupName + ' 变更记录'; |
| | | this.recordVisible = true; |
| | | this.$layer.close(loading); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | this.$layer.close(loading); |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | | editTitle() { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-tools-more { |
| | | background-color: #ffffff; |
| | | padding: 8px; |
| | | } |
| | | .reason-wrap { |
| | | padding: 8px; |
| | | height: 360px; |
| | | background: #f0f0f0; |
| | | } |
| | | </style> |
| | |
| | | <three-btn @click="autoComputeIp" v-if="isDcDcBts" |
| | | >自动计算IP</three-btn |
| | | > |
| | | <three-btn @click="submitFrom">确定</three-btn> |
| | | <three-btn @click="showReason">确定</three-btn> |
| | | </div> |
| | | </el-form> |
| | | <!-- 省 --> |
| | |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 编辑原因 --> |
| | | <el-dialog |
| | | top="0" |
| | | class="dialog-center" |
| | | title="请输入修改原因" |
| | | :visible.sync="reasonVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item label="修改原因"> |
| | | <el-input |
| | | type="textarea" |
| | | placeholder="必填" |
| | | v-model="updateReason" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="submitFrom" |
| | | >确定</el-button |
| | | > |
| | | <el-button size="mini" @click="submitCancel">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | trigger: "change", |
| | | }; |
| | | return { |
| | | reasonVisible: false, |
| | | updateReason: "", |
| | | layout: { |
| | | span: 8, |
| | | gutter: 16, |
| | |
| | | this.battProducer.dialogVisible = false; |
| | | }, |
| | | // 提交表单设置参数 |
| | | submitFrom() { |
| | | showReason() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | // 校验通过 |
| | | if (valid) { |
| | | var tmp = {}; |
| | | Object.keys(this.params).forEach((key, value) => { |
| | | tmp[key] = this.params[key]; |
| | | }); |
| | | tmp.stationName = |
| | | tmp.stationName1 + |
| | | "-" + |
| | | tmp.stationName2 + |
| | | "-" + |
| | | tmp.stationName5 + |
| | | "-" + |
| | | tmp.stationName3 + |
| | | "-" + |
| | | tmp.stationName4; |
| | | // 编辑机房 |
| | | this.editHome(tmp); |
| | | this.reasonVisible = true; |
| | | } else { |
| | | this.$layer.msg("存在校验未通过的数据!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | submitCancel() { |
| | | this.updateReason = ""; |
| | | this.reasonVisible = false; |
| | | }, |
| | | submitFrom() { |
| | | let { updateReason } = this; |
| | | if ('' == updateReason.trim()) { |
| | | this.$message.error('请填写修改原因'); |
| | | return false; |
| | | } |
| | | var tmp = {}; |
| | | Object.keys(this.params).forEach((key, value) => { |
| | | tmp[key] = this.params[key]; |
| | | }); |
| | | tmp.stationName = |
| | | tmp.stationName1 + |
| | | "-" + |
| | | tmp.stationName2 + |
| | | "-" + |
| | | tmp.stationName5 + |
| | | "-" + |
| | | tmp.stationName3 + |
| | | "-" + |
| | | tmp.stationName4; |
| | | tmp.updateReason = updateReason; |
| | | // 编辑机房 |
| | | this.editHome(tmp); |
| | | }, |
| | | // 编辑机房 |
| | | editHome(batt) { |
| | |
| | | type: "success", |
| | | message: "修改" + batt.stationName + "成功!", |
| | | }); |
| | | this.updateReason = ""; |
| | | this.reasonVisible = false; |
| | | // 触发事件 |
| | | this.$emit("success"); |
| | | } else { |
| | |
| | | message: "修改" + batt.stationName + "失败!", |
| | | }); |
| | | // 触发事件 |
| | | this.$emit("success"); |
| | | // this.$emit("success"); |
| | | // 关闭加载框 |
| | | this.$layer.close(loading); |
| | | }); |
| | |
| | | this.county.dialogVisible = false; |
| | | }, |
| | | searchTplAll() { |
| | | searchTplAll().then((res) => { |
| | | searchTplAll() |
| | | .then((res) => { |
| | | let rs = res.data; |
| | | let data = []; |
| | | if (rs.code == 1) { |
| | |
| | | return axios({ |
| | | method: 'GET', |
| | | url: 'battInf/getDeviceId', |
| | | params: {devId} |
| | | params: { devId } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 查询电池组变更记录 |
| | | * @param {*} battGroupId 电池组id |
| | | * @returns |
| | | */ |
| | | export const getBattRecords = (battGroupId) => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: 'battInfUpdateRecord/searchById', |
| | | params: { battGroupId } |
| | | }); |
| | | } |