查看富文本编辑

fat
祝言孟 9 months ago
parent 812c0086a9
commit d578496e52
  1. 41
      src/views/content/richText/modules/ViewForm.vue

@ -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;

Loading…
Cancel
Save