| | |
| | | <el-form-item label="值" prop="value"> |
| | | <el-input v-model="form.value" placeholder="请输入值" /> |
| | | </el-form-item> |
| | | <el-form-item label="创建时间" prop="createTime"> |
| | | <el-date-picker clearable size="small" |
| | | v-model="form.createTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择创建时间"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | |
| | | this.buttonLoading = true; |
| | | if (this.form.id != null) { |
| | | updateDemo(this.form).then(response => { |
| | | this.buttonLoading = false; |
| | | this.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } else { |
| | | addDemo(this.form).then(response => { |
| | | this.buttonLoading = false; |
| | | this.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }).finally(() => { |
| | | this.buttonLoading = false; |
| | | }); |
| | | } |
| | | } |