| | |
| | | start(this.devId, this.idx + 1) |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code && res.data2) { |
| | | if (res.code && res.data) { |
| | | // 提示信息 |
| | | this.$layer.msg("启动测试成功"); |
| | | this.$emit("close"); |
| | |
| | | size="mini" |
| | | v-if="canStopHr" |
| | | @click="stopTest" |
| | | >停止核容</el-button |
| | | >停止{{ systemData.workState == 2 ? "核容" : "充电" }}</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | |
| | | } |
| | | return "设备全称"; |
| | | }, |
| | | // 判断当前设备是否可以停止 核容和充电 |
| | | canStopHr() { |
| | | return this.systemData.workState == 2 && this.currentGroup == this.currWorkGrp - 1; |
| | | return (this.systemData.workState == 2 || this.systemData.workState == 1) && this.currentGroup == this.currWorkGrp - 1; |
| | | }, |
| | | canStopRes() { |
| | | return this.systemData.workState == 4 && this.currentGroup == this.currWorkGrp - 1; |
| | |
| | | {{ currentGroup == 0 ? "电池组: 1" : "电池组: 2" }} |
| | | </div> |
| | | <!-- 按钮组 --> |
| | | <el-button type="warning" size="mini" v-if="canStopHr" @click="stopTest">停止核容</el-button> |
| | | <el-button type="warning" size="mini" v-if="canStopHr" @click="stopTest">停止{{ systemData.workState == 2 ? "核容" : "充电" }}</el-button> |
| | | <el-button type="primary" size="mini" v-if="canStopRes" @click="stopResTest">停止内阻测试</el-button> |
| | | <el-button type="primary" size="mini" v-else :disabled="!canTest" |
| | | @click="confirmStartResTest">启动内阻测试</el-button> |
| | |
| | | } |
| | | return "设备全称"; |
| | | }, |
| | | canStopHr() { |
| | | return this.systemData.workState == 2 && this.currentGroup == this.currWorkGrp - 1; |
| | | }, |
| | | // 判断当前设备是否可以停止 核容和充电 |
| | | canStopHr() { |
| | | return (this.systemData.workState == 2 || this.systemData.workState == 1) && this.currentGroup == this.currWorkGrp - 1; |
| | | }, |
| | | canStopRes() { |
| | | return this.systemData.workState == 4 && this.currentGroup == this.currWorkGrp - 1; |
| | | }, |
| | |
| | | let loading = this.$layer.loading(); |
| | | getUKeyByUName(name).then(res => { |
| | | let rs = res.data; |
| | | // 1:已经绑定ukey,0:用户不存在 -1:可以绑定 |
| | | if (rs.code == 1) { |
| | | this.$layer.msg(name + "已经绑定ukey"); |
| | | this.$layer.msg(rs.msg); |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | } else if (rs.code == -1) { |
| | | this.$layer.msg(name + "用户不存在,请检查输入的用户名"); |
| | | } else if (rs.code == 0) { |
| | | this.$layer.msg(rs.msg); |
| | | // 关闭等待框 |
| | | this.$layer.close(loading); |
| | | } else { |
| | |
| | | |
| | | /** |
| | | * 根据用户名查询绑定的ukey |
| | | * @param UName 用户名称 |
| | | * @param userName 用户名称 |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const getUKeyByUName = (UName) => { |
| | | export const getUKeyByUName = (userName) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "/user/searchUNameToUKey", |
| | | params: { |
| | | uKeyId: UName, |
| | | userName, |
| | | }, |
| | | }); |
| | | }; |