|
|
@ -5,27 +5,18 @@ |
|
|
|
:visible="visible" |
|
|
|
:visible="visible" |
|
|
|
:confirmLoading="confirmLoading" |
|
|
|
:confirmLoading="confirmLoading" |
|
|
|
:maskClosable="false" |
|
|
|
:maskClosable="false" |
|
|
|
@ok="handleSubmit" |
|
|
|
|
|
|
|
@cancel="handleCancel" |
|
|
|
@cancel="handleCancel" |
|
|
|
:footer="null" |
|
|
|
:footer="null" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="content"> |
|
|
|
<div class="content"> |
|
|
|
<p v-html="record.content" class="recordContent"></p> |
|
|
|
<p v-html="record.content" class="recordContent" v-decorator="['content']"></p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="kong"></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> |
|
|
|
</a-modal> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import pick from 'lodash.pick' |
|
|
|
import pick from 'lodash.pick' |
|
|
|
import * as Api from '@/api/content/richText' |
|
|
|
|
|
|
|
import { SelectRegion } from '@/components' |
|
|
|
import { SelectRegion } from '@/components' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -54,7 +45,6 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
// 显示对话框 |
|
|
|
// 显示对话框 |
|
|
|
edit (record) { |
|
|
|
edit (record) { |
|
|
|
console.log(record) |
|
|
|
|
|
|
|
// 显示窗口 |
|
|
|
// 显示窗口 |
|
|
|
this.visible = true |
|
|
|
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 () { |
|
|
|
handleCancel () { |
|
|
|
this.visible = false |
|
|
|
this.visible = false |
|
|
|
this.form.resetFields() |
|
|
|
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> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|
.ant-modal-body{ |
|
|
|
|
|
|
|
// margin-bottom: 20px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.content { |
|
|
|
.content { |
|
|
|
min-height: 400px; |
|
|
|
min-height: 400px; |
|
|
|
overflow: auto; |
|
|
|
overflow: auto; |
|
|
|