|
|
@@ -58,8 +58,10 @@ const emrTemplateData = ref<emrTemplateType[]>()
|
|
|
const emrDivRef = ref<HTMLDivElement>()
|
|
|
let editor: UseEmrInitReturn;
|
|
|
|
|
|
+const selectionStatus = ref(false)
|
|
|
|
|
|
const rowClick = (row: emrTemplateType) => {
|
|
|
+ selectionStatus.value = true
|
|
|
editor.editor.setEditorMode('free')
|
|
|
categoryCode.value =row.code
|
|
|
mzEmrName.value =row.name
|
|
|
@@ -82,9 +84,8 @@ const mzEmrName = ref<string>('')
|
|
|
const parent = ref<string>('')
|
|
|
|
|
|
const saveData = ()=>{
|
|
|
- console.log('typeFlag.value',typeFlag.value)
|
|
|
- if(typeFlag.value == 1 || typeFlag.value==3 ){
|
|
|
- return ElMessage.error('住院或历史记录不能保存')
|
|
|
+ if(!((typeFlag.value == 0 || typeFlag.value==2)&& selectionStatus.value)){
|
|
|
+ return ElMessage.error('请选择数据,只有门诊模板和当前才能保存!')
|
|
|
}
|
|
|
ElMessageBox.confirm('请确认是否保存', {
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -223,6 +224,7 @@ const treeData=ref<Tree[]>()
|
|
|
const typeFlag = ref<number>()
|
|
|
|
|
|
const queryMzEmdrData=(type)=>{
|
|
|
+ selectionStatus.value = false
|
|
|
typeFlag.value = type
|
|
|
if(type==0 || type==2){
|
|
|
modelFlag.value = true;
|
|
|
@@ -296,6 +298,7 @@ const filterNode = (value: string, data: Tree) => {
|
|
|
}
|
|
|
|
|
|
const handleNodeClick=(node, object, event)=>{
|
|
|
+ selectionStatus.value =true
|
|
|
editor.editor.setEditorMode('readonly')
|
|
|
console.log("node",node)
|
|
|
editor.loadAndSetDocument({
|