| | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | dialogVisibleConfirm() { |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const data = { |
| | | id: this.dialogForm.id, |
| | | maiitemcode: this.dialogForm.maiitemcode, |
| | |
| | | isqrcode: this.dialogForm.isqrcode, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | console.log(data) |
| | | AddUpdateDeviceMaiItem(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.getDeviceMaiItemSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |