| | |
| | | return currentDev.value.state[0].batteryCount == 1; |
| | | }); |
| | | |
| | | // 正在测试中 获取测试类型 是充电还是放电 |
| | | const currentType = computed(() => { |
| | | return currentDev.state?.testType || 1; |
| | | }); |
| | | |
| | | const resList = computed(() => { |
| | | let _list = list.value[devType.value]; |
| | |
| | | width="700px" |
| | | center |
| | | > |
| | | <template v-if="1 == devType"> |
| | | <template v-if="testVisible && 1 == devType"> |
| | | <param-content |
| | | v-model="testVisible" |
| | | v-if="testVisible" |
| | | :isUpdate="isUpdateParam" |
| | | :testType="currentType" |
| | | :devs="currentDev" |
| | | ></param-content> |
| | | </template> |
| | | <template v-if="2 == devType"> |
| | | <template v-if="testVisible && 2 == devType"> |
| | | <jh-param-content |
| | | v-model="testVisible" |
| | | v-if="testVisible" |
| | | :isUpdate="isUpdateParam" |
| | | :grpIdx="testGroupIdx" |
| | | :testType="currentType" |
| | | :devs="currentDev" |
| | | ></jh-param-content> |
| | | </template> |
| | |
| | | isUpdate: { |
| | | type: Boolean, |
| | | }, |
| | | testType: { |
| | | type: Number, |
| | | } |
| | | }); |
| | | |
| | | const list = reactive({ |
| | |
| | | }); |
| | | } |
| | | function setParams() { |
| | | // let _params; |
| | | // // 判断测试类型 是充电还是放电 |
| | | // if (params.testType == 1) { |
| | | // _params = { |
| | | // nominalCapacity: 0, |
| | | // testType: 0, |
| | | // batteryName: 0, |
| | | // batteryType: 0, |
| | | // batteryNumber: 0, |
| | | // diffBatteryVoltage: 0, |
| | | // // 放电参数 |
| | | // dischargeCurrent: 0, |
| | | // dischargeTime: 0, |
| | | // dischargeVoltage: 0, |
| | | // isDischargeCapacityEnable: 0, |
| | | // dischargeCapacity: 0, |
| | | // isMinBatteryVoltageEnable: 0, |
| | | // minBatteryVoltage: 0, |
| | | // }; |
| | | // } else { |
| | | // _params = { |
| | | // nominalCapacity: 0, |
| | | // testType: 0, |
| | | // batteryName: 0, |
| | | // batteryType: 0, |
| | | // batteryNumber: 0, |
| | | // diffBatteryVoltage: 0, |
| | | // // 充电参数 |
| | | // chargePower: 0, |
| | | // chargeVoltage: 0, |
| | | // chargeProtectVoltage: 0, |
| | | // chargeCurrent: 0, |
| | | // chargeStopCurrent: 0, |
| | | // chargeTime: 0, |
| | | // isChargeCapacityEnable: 0, |
| | | // chargeCapacity: 0, |
| | | // isMaxBatteryVoltageEnable: 0, |
| | | // maxBatteryVoltage: 0, |
| | | // }; |
| | | // } |
| | | // Object.keys(_params).forEach((v) => { |
| | | // _params[v] = params[v]; |
| | | // }); |
| | | if (props.isBatch) { |
| | | // _params["devIds"] = props.devs.map((v) => v.devId); |
| | | // setBatchParams(_params); |
| | |
| | | } |
| | | |
| | | onMounted(() => { |
| | | params.testType = props.testType; |
| | | if (props.isBatch) { |
| | | // console.log('dev0', props.devs[0], '============='); |
| | | params.testType = props.devs[0].state.testType; |
| | | } else { |
| | | params.testType = props.devs.state.testType; |
| | | // console.log("type", params.testType, "============="); |
| | | } |
| | | getParams(); |
| | | }); |
| | |
| | | </el-row> |
| | | <div class="form-footer"> |
| | | <el-button @click="close">关闭</el-button> |
| | | <el-button type="primary" v-if="!isUpdate" :disabled="!testFlag" @click="startTest" |
| | | <el-button |
| | | type="primary" |
| | | v-if="!isUpdate" |
| | | :disabled="!testFlag" |
| | | @click="startTest" |
| | | >启动</el-button |
| | | > |
| | | <el-button type="primary" :disabled="!setFlag" @click="setParams" |