|
|
|
@ -5,27 +5,18 @@ |
|
|
|
|
:visible="visible" |
|
|
|
|
:confirmLoading="confirmLoading" |
|
|
|
|
:maskClosable="false" |
|
|
|
|
@ok="handleSubmit" |
|
|
|
|
@cancel="handleCancel" |
|
|
|
|
:footer="null" |
|
|
|
|
> |
|
|
|
|
<div class="content"> |
|
|
|
|
<p v-html="record.content" class="recordContent"></p> |
|
|
|
|
<p v-html="record.content" class="recordContent" v-decorator="['content']"></p> |
|
|
|
|
</div> |
|
|
|
|
<div class="kong"></div> |
|
|
|
|
<!-- <a-spin :spinning="confirmLoading"> |
|
|
|
|
<a-form :form="form"> |
|
|
|
|
<a-form-item label="协议内容" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
|
<p v-html="record.content"></p> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-form> |
|
|
|
|
</a-spin> --> |
|
|
|
|
</a-modal> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import pick from 'lodash.pick' |
|
|
|
|
import * as Api from '@/api/content/richText' |
|
|
|
|
import { SelectRegion } from '@/components' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -54,7 +45,6 @@ export default { |
|
|
|
|
|
|
|
|
|
// 显示对话框 |
|
|
|
|
edit (record) { |
|
|
|
|
console.log(record) |
|
|
|
|
// 显示窗口 |
|
|
|
|
this.visible = true |
|
|
|
|
// 当前记录 |
|
|
|
@ -71,36 +61,10 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 确认按钮 |
|
|
|
|
handleSubmit (e) { |
|
|
|
|
e.preventDefault() |
|
|
|
|
// 表单验证 |
|
|
|
|
const { form: { validateFields } } = this |
|
|
|
|
validateFields((errors, values) => { |
|
|
|
|
// 提交到后端api |
|
|
|
|
!errors && this.onFormSubmit(values) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 关闭对话框事件 |
|
|
|
|
handleCancel () { |
|
|
|
|
this.visible = false |
|
|
|
|
this.form.resetFields() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 提交到后端api |
|
|
|
|
onFormSubmit (values) { |
|
|
|
|
this.confirmLoading = true |
|
|
|
|
Api.edit({ agreementId: this.record.id, form: values }) |
|
|
|
|
.then(result => { |
|
|
|
|
// 显示成功 |
|
|
|
|
this.$message.success(result.message, 1.5) |
|
|
|
|
// 关闭对话框事件 |
|
|
|
|
this.handleCancel() |
|
|
|
|
// 通知父端组件提交完成了 |
|
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
|
}) |
|
|
|
|
.finally(() => this.confirmLoading = false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -108,9 +72,6 @@ export default { |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
.ant-modal-body{ |
|
|
|
|
// margin-bottom: 20px; |
|
|
|
|
} |
|
|
|
|
.content { |
|
|
|
|
min-height: 400px; |
|
|
|
|
overflow: auto; |
|
|
|
|