| | |
| | | </div> |
| | | <div class="table-cell"> |
| | | <el-form-item label="测试类型"> |
| | | <el-select v-model="params.testCmd" placeholder="请选择"> |
| | | <el-select |
| | | v-model="params.testCmd" |
| | | :disabled="pReadOnly" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in testType" |
| | | :key="item.value" |
| | |
| | | </div> |
| | | <div class="table-row"> |
| | | <div class="table-cell pr16"> |
| | | <el-form-item label="核容电流(1~300A)" prop="disCurr"> |
| | | <el-input v-model="params.disCurr" :readonly="readOnly"></el-input> |
| | | <el-form-item :label="disCurrText" :prop="isCqdz ? 'disCurr1' : 'disCurr'"> |
| | | <el-input |
| | | v-model="params.disCurr" |
| | | :readonly="readOnly || pReadOnly || isCqdz" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="table-cell"> |
| | | <el-form-item label="核容时长(1~10000分钟)" prop="disTime"> |
| | | <el-input v-model="params.disTime" :readonly="readOnly"></el-input> |
| | | <el-input |
| | | v-model="params.disTime" |
| | | :readonly="readOnly || pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="table-row"> |
| | | <div class="table-cell pr16"> |
| | | <el-form-item label="核容容量(1~2000AH)" prop="disCap"> |
| | | <el-input v-model="params.disCap" :readonly="readOnly"></el-input> |
| | | <el-input |
| | | v-model="params.disCap" |
| | | :readonly="readOnly || pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="table-cell"> |
| | | <el-form-item label="单体温度上限(10~60℃)" prop="monomertmpHigh"> |
| | | <el-form-item label="单体温度上限(20~60℃)" prop="monomertmpHigh"> |
| | | <el-input |
| | | v-model="params.monomertmpHigh" |
| | | :readonly="readOnly" |
| | | :readonly="readOnly || pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | <el-form-item :label="rangeLabel.groupvolLow" prop="groupvolLow"> |
| | | <el-input |
| | | v-model="params.groupvolLow" |
| | | :readonly="readOnly" |
| | | :readonly="readOnly || pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="table-cell"> |
| | | <el-form-item |
| | | :label="rangeLabel.monomervolLow" |
| | | prop="monomervolLow" |
| | | > |
| | | <el-form-item :label="rangeLabel.monomervolLow" prop="monomervolLow"> |
| | | <el-input |
| | | v-model="params.monomervolLow" |
| | | :readonly="readOnly" |
| | | :readonly="readOnly || pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | <div class="table-row"> |
| | | <div class="table-cell pr16"> |
| | | <el-form-item label="升压上限(V)"> |
| | | <el-input v-model="params.dcvolHighLimit"></el-input> |
| | | <el-input |
| | | v-model="params.dcvolHighLimit" |
| | | :readonly="pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="table-cell"> |
| | | <el-form-item label="充电电流(A)"> |
| | | <el-input v-model="params.chargeCurrSet"></el-input> |
| | | <el-input |
| | | v-model="params.chargeCurrSet" |
| | | :readonly="pReadOnly" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-form-item v-if="1 == isRequest" label="申请原因" required> |
| | | <el-input type="textarea" :rows="2" v-model="reason"></el-input> |
| | | </el-form-item> |
| | | <div class="form-footer"> |
| | | <!-- <three-btn>清除告警</three-btn> --> |
| | | <three-btn :disabled="!startTestFlag" @click="startTestCheck" |
| | | >启动测试</three-btn |
| | | > |
| | | <three-btn @click="getParams(true)">读取</three-btn> |
| | | <three-btn :disabled="!setTestFlag" @click="submitFrom">设定</three-btn> |
| | | <template v-if="!pReadOnly"> |
| | | <!-- 申请放电 --> |
| | | <three-btn v-if="1 == isRequest" @click="sendRequest" |
| | | >放电申请</three-btn |
| | | > |
| | | <!-- --> |
| | | <template v-else> |
| | | <three-btn :disabled="!startTestFlag" @click="startTestCheck" |
| | | >启动测试</three-btn |
| | | > |
| | | <three-btn @click="getParams()">读取</three-btn> |
| | | <three-btn :disabled="!setTestFlag" @click="submitFrom" |
| | | >设定</three-btn |
| | | > |
| | | </template> |
| | | </template> |
| | | <three-btn v-else @click="$emit('close')">关闭</three-btn> |
| | | <!-- <three-btn @click="submitFrom">设定</three-btn>--> |
| | | </div> |
| | | <el-dialog |
| | | title="人脸校验" |
| | |
| | | import { |
| | | btsControl as getParams, |
| | | btsControl as start, |
| | | set61850Params |
| | | } from '../js/realTime'; |
| | | import { |
| | | checkUserPwd |
| | | } from '@/views/login/js/api' |
| | | set61850Params, |
| | | addWorkMain, |
| | | searchTemp, |
| | | } from "../js/realTime"; |
| | | import { checkUserPwd } from "@/views/login/js/api"; |
| | | |
| | | export default { |
| | | components: { CheckFace }, |
| | | props: { |
| | | batt: { |
| | | type: Object, |
| | | default() { |
| | | return {}; |
| | | }, |
| | | }, |
| | | // 只读模式 显示参数用 |
| | | pReadOnly: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | isRequest: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | paramData: { |
| | | type: Object, |
| | | default() { |
| | | return {}; |
| | |
| | | rules.MonomerVol_Low.min + |
| | | "~" + |
| | | rules.MonomerVol_Low.max + |
| | | "(保留一位小数)"; |
| | | "(保留三位小数)"; |
| | | |
| | | return { |
| | | reason: "", |
| | | setFaceShow: false, |
| | | startFaceShow: false, |
| | | cmd: cmd, // 操作命令 |
| | |
| | | }, |
| | | params: { |
| | | num: 0, |
| | | battGroupId: 0, |
| | | devId: 0, // 设备id |
| | | testCmd: 37, // 测试类型 |
| | | disCap: 0, // 核容容量 |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 放电申请 |
| | | sendRequest() { |
| | | if ("" == this.reason.trim()) { |
| | | this.$message.error("请填写申请原因"); |
| | | return false; |
| | | } |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | // 校验通过 |
| | | if (valid) { |
| | | this.addWorkMain(); |
| | | } else { |
| | | this.$layer.msg("存在校验未通过的数据!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | addWorkMain() { |
| | | let param = { ...this.params, reason: this.reason }; |
| | | // 等待框 |
| | | let loading = this.$layer.loading(1); |
| | | addWorkMain(param) |
| | | .then((res) => { |
| | | let { code, data, msg } = res.data; |
| | | if (code && data) { |
| | | // 提示信息 |
| | | this.$layer.msg("申请已提交"); |
| | | this.$emit("close"); |
| | | } else { |
| | | this.$layer.msg(msg); |
| | | } |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | }) |
| | | .catch((err) => { |
| | | this.$layer.close(loading); |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | initParams() { |
| | | // 初始化参数 |
| | | this.params = { |
| | | num: 0, |
| | | battGroupId: 0, |
| | | devId: 0, // 设备id |
| | | testCmd: 37, // 测试类型 |
| | | disCap: 0, // 核容容量 |
| | |
| | | }; |
| | | }, |
| | | // 获取参数 |
| | | getParams(showLoad) { |
| | | getParams(useParam) { |
| | | // 定义等待框 |
| | | let loading; |
| | | if (showLoad) { |
| | | loading = this.$layer.loading(1); |
| | | } |
| | | let loading = this.$layer.loading(1); |
| | | // 启动按钮不可点击 |
| | | this.startTestFlag = false; |
| | | |
| | | // 查询后台 |
| | | getParams({ |
| | | num: this.cmd.get, |
| | | devId: this.batt.fbsdeviceId, |
| | | }) |
| | | num: this.cmd.get, |
| | | devId: this.batt.fbsdeviceId, |
| | | battGroupNum: this.batt.groupIndexInFBSDevice + 1, |
| | | }) |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code && res.data2) { |
| | | if (useParam || (res.code && res.data2)) { |
| | | let fsparam = res.data; |
| | | // 遍历参数属性并赋值 |
| | | for (let key in this.params) { |
| | |
| | | // 设置的命令和devId |
| | | this.params.num = this.cmd.set; |
| | | this.params.devId = this.batt.fbsdeviceId; |
| | | this.$layer.msg("读取成功!"); |
| | | // 设置按钮可点击 |
| | | this.setTestFlag = true; |
| | | if (res.data2) { |
| | | this.$layer.msg("读取成功!"); |
| | | // 设置按钮可点击 |
| | | this.setTestFlag = true; |
| | | } |
| | | } else { |
| | | // 初始化参数 |
| | | this.initParams(); |
| | |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | // 校验通过 |
| | | if (valid) { |
| | | let batt = this.batt; |
| | | let params = this.params; |
| | | let disCurr = params.disCurr; // 核容电流 |
| | | let disCap = params.disCap; // 核容容量 |
| | | let disTime = params.disTime; // 核容时长 |
| | | let realTestTime = 0; |
| | | if (disCurr > batt.loadCurr) { |
| | | realTestTime = batt.loadCurr |
| | | ? Math.ceil(disCap / batt.loadCurr) * 60 |
| | | : 0; |
| | | } |
| | | let msg = "确认修改参数"; |
| | | if (realTestTime > disTime) { |
| | | msg = |
| | | "核容时长可能无法满足核容" + |
| | | disCap + |
| | | "AH,建议核容时长:" + |
| | | realTestTime + |
| | | "分钟"; |
| | | } |
| | | // 设置参数 |
| | | this.$layer.confirm( |
| | | "确认修改参数", |
| | | { icon: 3, title: "系统提示" }, |
| | | (index) => { |
| | | // 关闭确认框 |
| | | this.$layer.close(index); |
| | | this.setParamsCheck(); |
| | | } |
| | | ); |
| | | this.$layer.confirm(msg, { icon: 3, title: "系统提示" }, (index) => { |
| | | // 关闭确认框 |
| | | this.$layer.close(index); |
| | | this.setParamsCheck(); |
| | | }); |
| | | } else { |
| | | this.$layer.msg("存在校验未通过的数据!"); |
| | | return false; |
| | |
| | | }); |
| | | }, |
| | | setParamsCheck() { |
| | | if (config.dischargeByFace.value) { |
| | | if (config.setParamsByFace.value) { |
| | | this.setFaceShow = true; |
| | | } else { |
| | | this.setParams(true); |
| | |
| | | set61850Params(this.params) |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code) { |
| | | if (res.code && res.data) { |
| | | // 启动按钮可点击 |
| | | this.startTestFlag = true; |
| | | // 提示信息 |
| | |
| | | let loading = this.$layer.loading(1); |
| | | // 请求后台 |
| | | start({ |
| | | num: this.cmd.start, |
| | | devId: this.batt.fbsdeviceId, |
| | | battGroupNum: this.batt.groupIndexInFBSDevice + 1, |
| | | }) |
| | | num: this.cmd.start, |
| | | devId: this.batt.fbsdeviceId, |
| | | battGroupNum: this.batt.groupIndexInFBSDevice + 1, |
| | | }) |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code && res.data2) { |
| | |
| | | }, |
| | | setFaceSuccess() { |
| | | this.setFaceShow = false; |
| | | this.setParams(); |
| | | this.$nextTick(() => { |
| | | this.setParams(); |
| | | }); |
| | | }, |
| | | startFaceSuccess() { |
| | | this.startFaceShow = false; |
| | | this.startTest(); |
| | | this.$nextTick(() => { |
| | | this.startTest(); |
| | | }); |
| | | }, |
| | | searchTemp() { |
| | | let loading = this.$layer.loading(1); |
| | | searchTemp(this.batt.battGroupId) |
| | | .then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | if (code && data) { |
| | | let fsparam = data2; |
| | | // 遍历参数属性并赋值 |
| | | for (let key in this.params) { |
| | | if (key === "testCmd") { |
| | | this.params.testCmd = 37; |
| | | } else { |
| | | this.params[key] = fsparam[key]; |
| | | } |
| | | } |
| | | // 设置的命令和devId |
| | | this.params.num = this.cmd.set; |
| | | this.params.devId = this.batt.fbsdeviceId; |
| | | // 设置按钮可点击 |
| | | this.setTestFlag = true; |
| | | this.$layer.close(loading); |
| | | } else { |
| | | // 初始化参数 |
| | | this.initParams(); |
| | | // 设置按钮不可点击 |
| | | this.setTestFlag = false; |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | this.$layer.msg("读取失败,读取请求异常!"); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | // 初始化参数 |
| | | this.initParams(); |
| | | // 设置按钮不可点击 |
| | | this.setTestFlag = false; |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | this.$layer.msg("读取失败,读取请求异常!"); |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | |
| | | groupIndexInFBSDevice: this.batt.groupIndexInFBSDevice + 1, |
| | | }; |
| | | }, |
| | | isCqdz() { |
| | | return this.$CFG.clientName.name === "cqdz"; |
| | | }, |
| | | rangeLabel() { |
| | | let ranges = this.ranges; |
| | | let result = {}; |
| | |
| | | } |
| | | return result; |
| | | }, |
| | | disCurrText() { |
| | | let batt = this.batt; |
| | | if (this.isCqdz) { |
| | | return "核容电流(A)"; |
| | | } |
| | | |
| | | return "核容电流(1~300A)" + " 实际负载电流:" + batt.loadCurr + "A"; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // 获取数据 |
| | | this.getParams(true); |
| | | if (this.pReadOnly) { |
| | | this.initParams(); |
| | | this.params = { |
| | | ...this.params, |
| | | ...this.paramData, |
| | | }; |
| | | } else { |
| | | console.log(this.isRequest, "??"); |
| | | switch (this.isRequest) { |
| | | case 1: |
| | | this.getParams(true); |
| | | break; |
| | | case 2: |
| | | this.searchTemp(); |
| | | break; |
| | | default: |
| | | this.getParams(); |
| | | break; |
| | | } |
| | | } |
| | | // console.log(this.batt); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | margin-left: 12px; |
| | | } |
| | | </style> |
| | | |
| | | |