|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8"/>
|
|
|
|
<link rel="shortcut icon" href="./favicon.svg" type="image/svg+xml"/>
|
|
|
|
<link rel="stylesheet" href="./vender/jquery/zTreeStyle/zTreeStyle.css" type="text/css">
|
|
|
|
<script src = "./vender/jquery/jquery.js"></script>
|
|
|
|
<script src = "./vender/jquery/jquery.ztree.core.min.js"></script>
|
|
|
|
<script src = "./vender/jquery/jquery.ztree.exedit.min.js"></script>
|
|
|
|
<script src = "./vender/jquery/jquery.ztree.exhide.min.js"></script>
|
|
|
|
<script src = "./vender/codemirror.js"></script>
|
|
|
|
<script src = "./vender/fabric.js"></script>
|
|
|
|
<!-- 局域网环境, 请去 https://www.x-emr.cn/download.html 下载 editor.js替换以下路径 -->
|
|
|
|
<script src="./js/editor.js"></script>
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
//配置项可以不设置,会使用默认设置
|
|
|
|
let option = {
|
|
|
|
license:'rjpuZZZOIbaSKwwYczGJTw9kdNPqqomH7wxLs3RABLMynprUIj4sn7jSmI9ilOJdXD3yAqVn6Jd706ojIs2HDPX6LHyY/BsZTak0DzhNO1r1Q4f0QwKUj4+iE4mWq4AU0MWFVLuoEGN1O0yYJDMjQwsgZBtmFYL6vlCHnU+ru/M=',
|
|
|
|
mode:'form', //默认模式 form:表单模式,design:设计模式
|
|
|
|
pdfUrl:'https://www.x-emr.cn/pdf/post', //pdf生成服务
|
|
|
|
dictionary: [ //知识库
|
|
|
|
{type:'symptoms', title: '体征', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
|
|
{type:'signs', title: '症状', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
|
|
{type:'meta', title: '卫生信息数据元', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
|
|
{type:'stand', title: '电子病历数据集', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'},
|
|
|
|
{type:'insutance', title: '国家医保标准', isParent:true, treeUrl:'https://www.x-emr.cn/insutance', itemUrl:'https://www.x-emr.cn/institem'},
|
|
|
|
{type:'province', title: 'A省数据平台标准', isParent:true, treeUrl:'https://www.x-emr.cn/province', itemUrl:'https://www.x-emr.cn/provitem'},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
//用于父页面调用
|
|
|
|
if(window.frameElement){
|
|
|
|
//1.初始化前
|
|
|
|
let e1 = new Event('before-init')
|
|
|
|
e1.editor = editor
|
|
|
|
e1.option = option
|
|
|
|
window.frameElement.dispatchEvent(e1)
|
|
|
|
|
|
|
|
if(window.frameElement.getAttribute('mode')) {
|
|
|
|
option.mode = window.frameElement.getAttribute('mode')
|
|
|
|
}
|
|
|
|
//2.编辑器初始化
|
|
|
|
editor.init(option)
|
|
|
|
|
|
|
|
//如果有组件有doc属性
|
|
|
|
if(window.frameElement.getAttribute('doc')) {
|
|
|
|
editor.loadUrl(window.frameElement.getAttribute('doc'), '1').then(function(){
|
|
|
|
let e3 = new Event('doc-loaded')
|
|
|
|
e3.editor = editor
|
|
|
|
window.frameElement.dispatchEvent(e3)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//3.初始化后
|
|
|
|
let e2 = new Event('after-init')
|
|
|
|
e2.editor = editor
|
|
|
|
window.frameElement.dispatchEvent(e2)
|
|
|
|
}else{
|
|
|
|
editor.init(option)
|
|
|
|
editor.loadUrl('https://www.x-emr.cn/doc/999.html')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!-- 默认id 为editor -->
|
|
|
|
<div id="editor" style="width:100%; height:100%;"></div>
|
|
|
|
</body>
|
|
|
|
</html>
|