| | |
| | | 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') |
| | | } |
| | | }) |