From 6e3c23143f657966937c2c86cbe99ee79e8a6dce Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Wed, 25 Oct 2023 17:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=AF=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/editor.html | 2 +- .../views/modules/formList/laserSurgery.vue | 2 +- .../modules/template/formManage/index.vue | 27 ++++++++++++++----- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/public/editor.html b/public/editor.html index 7d29b16..76a55f4 100644 --- a/public/editor.html +++ b/public/editor.html @@ -16,7 +16,7 @@ $(function() { //配置项可以不设置,会使用默认设置 let option = { - license:'WQ7peJQ3Kov4+1UWJXy8anvGMs9q9Krx1RVy/0b1Cu2NsyX+AAHehvZTkM9MfZ4U05PB87yFuHfWTM7F7EL4FQplorJA7Qm6naoINcGznSdFEEdN+EiwMNdPCFulVg3mu65at1ldCyqYtg3rmPhtUOwAc5oIYmi05xlXlRJnzvw=', + license:'rjpuZZZOIbaSKwwYczGJTw9kdNPqqomH7wxLs3RABLMynprUIj4sn7jSmI9ilOJdXD3yAqVn6Jd706ojIs2HDPX6LHyY/BsZTak0DzhNO1r1Q4f0QwKUj4+iE4mWq4AU0MWFVLuoEGN1O0yYJDMjQwsgZBtmFYL6vlCHnU+ru/M=', mode:'form', //默认模式 form:表单模式,design:设计模式 pdfUrl:'https://www.x-emr.cn/pdf/post', //pdf生成服务 dictionary: [ //知识库 diff --git a/src/page-subspecialty/views/modules/formList/laserSurgery.vue b/src/page-subspecialty/views/modules/formList/laserSurgery.vue index 64c093c..bffc1e0 100644 --- a/src/page-subspecialty/views/modules/formList/laserSurgery.vue +++ b/src/page-subspecialty/views/modules/formList/laserSurgery.vue @@ -207,7 +207,7 @@ /> - + diff --git a/src/page-subspecialty/views/modules/template/formManage/index.vue b/src/page-subspecialty/views/modules/template/formManage/index.vue index 3072a19..ba8ac46 100644 --- a/src/page-subspecialty/views/modules/template/formManage/index.vue +++ b/src/page-subspecialty/views/modules/template/formManage/index.vue @@ -4,8 +4,9 @@
保存 - 设置 - 表格模式 + 获取html + 表格模式 + 设计模式
@@ -28,19 +29,33 @@ export default { onAfterInit(e) { this.editor = e.editor this.editor.execCommand('new') + this.setForm() + if (this.editor) { + this.imageChange() + // this.editor.$('#patientId').change(() => { + // console.log('asdfas') + // }) + } + }, + imageChange() { + const data = this.editor.getBindObject().BODY + const keys = Object.keys(data) + this.editor.$('#img_editor').click(() => { + this.editor.$('#img_editor')[0].src = require('@/assets/img/od.png') + }) + console.log(keys) }, saveForm() { const html = this.editor.getHtml() - console.log(this.editor.getBindObject()) window.sessionStorage.setItem('form', encodeURIComponent(html)) }, setForm() { const html = decodeURIComponent(window.sessionStorage.getItem('form')) this.editor.loadHtml(html) - this.editor.execCommand('design') - }, - setFormMode() { this.editor.execCommand('form') + }, + setFormMode(mode) { + this.editor.execCommand(mode) } } }