| | |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="maxThreshold" label="阈值上限"> |
| | | <a-input v-model="model.maxThreshold" placeholder="请输入阈值上限"></a-input> |
| | | <a-input-number v-model="model.maxThreshold" placeholder="请输入阈值上限" style="width: 100%"></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="minThreshold" label="阈值下限"> |
| | | <a-input v-model="model.minThreshold" placeholder="请输入阈值下限"></a-input> |
| | | <a-input-number v-model="model.minThreshold" placeholder="请输入阈值下限" style="width: 100%"></a-input-number> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | |
| | | add() { |
| | | this.visible = true |
| | | this.model = { |
| | | controlSystemType: '', |
| | | controlSystemType: this.driveTypeList[0], |
| | | chineseName: '', |
| | | minThreshold: '', |
| | | maxThreshold: '' |
| | | } |
| | | this.paramList = [] |
| | | console.log('driveType',this.driveTypeList) |
| | | this.handleDriveTypeChange(this.driveTypeList[0]) |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'controlSystemType', 'chineseName', 'minThreshold', 'maxThreshold')) |
| | | }) |
| | |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.paramList = res.result |
| | | this.model.chineseName = res.result.length ? res.result[0].value : '' |
| | | this.model.chineseName = res.result.length ? res.result[0].value : undefined |
| | | if (this.model.chineseName) this.$refs.form.clearValidate('chineseName') |
| | | } |
| | | }) |