| | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <!--<a-input v-decorator="['equipmentId', validatorRules.equipmentId]">--> |
| | | <a-input :disabled='disabled' placeholder="请输入设备编号" v-decorator="['equipmentId', validatorRules.equipmentId]"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!--<a-col :span="24">--> |
| | | <!--<a-form-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol">--> |
| | | <!--<!–<a-input v-decorator="['equipmentId', validatorRules.equipmentId]">–>--> |
| | | <!--<a-input :disabled='disabled' placeholder="请输入设备编号" v-decorator="['equipmentId', validatorRules.equipmentId]"></a-input>--> |
| | | <!--</a-form-item>--> |
| | | <!--</a-col>--> |
| | | <a-col :span="24"> |
| | | <a-form-item label="报警号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入报警号" v-decorator="['alarmCode', validatorRules.alarmCode]"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="报警描述" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入报警描述" v-decorator="['alarmDescription', validatorRules.alarmDescription]"></a-input> |
| | | <a-form-item label="报警内容" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入报警内容" v-decorator="['alarmContent', validatorRules.alarmContent]"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span='24'> |
| | |
| | | }, |
| | | url: { |
| | | // add: '/mdc/alarmInfo/add', |
| | | edit: '/mdc/alarmInfo/edit', |
| | | edit: '/mdc/mdcAlarmInfo/edit', |
| | | //驱动类型 |
| | | initShiftList: '/mdc/mdcequipment/driveTypeSelected', |
| | | }, |
| | |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model,'equipmentId', 'alarmCode', 'alarmDescription','driveType')) |
| | | this.form.setFieldsValue(pick(this.model, 'alarmCode', 'alarmContent','driveType')) |
| | | }) |
| | | }, |
| | | initShiftList() { |
| | |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.isUse = this.isUse ? "1" : "2" |
| | | formData.isUse = this.isUse ? "0" : "-1" |
| | | let obj |
| | | if (!this.model.id) { |
| | | // obj = postAction(this.url.add, formData) |
| | |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("添加成功") |
| | | // that.$message.success("添加成功") |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |