|
@@ -59,20 +59,6 @@
|
|
|
<el-table-column label="名称" prop="name"></el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="修改模板" name="2">
|
|
|
- <div style="width: 100%;">
|
|
|
- <el-input v-model="num" placeholder="回访次数" style="width: 60%;">
|
|
|
- <template #prepend>回访次数</template>
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" icon="Search" @click="callEditCrmEmr(2)"
|
|
|
- style="margin-left: 10px">查询
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <el-table :data="emrTemplateEditData" @row-click="rowClick">
|
|
|
- <el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
- <el-table-column label="名称" prop="name"></el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
<el-tab-pane label="历史模板" name="3">
|
|
|
<el-input v-model="filterText" placeholder="搜索" style="width: 100%;">
|
|
|
<template #prepend>关键字</template>
|
|
@@ -123,10 +109,10 @@ import {getServerDateApi, getUuid} from "@/api/public-api";
|
|
|
import router from "@/router";
|
|
|
import {useCompRef} from "@/utils/useCompRef";
|
|
|
import {onDeactivated} from "@vue/runtime-core";
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
|
|
|
const textCode = ref('')
|
|
|
const tabType = ref('0')
|
|
|
-const num = ref()
|
|
|
|
|
|
const emrEvent = {
|
|
|
'contextUpdate': (evt, contextMap, component, context) => {
|
|
@@ -194,6 +180,14 @@ const rowClick = async (row: emrTemplateType) => {
|
|
|
}
|
|
|
|
|
|
const saveData = () => {
|
|
|
+ const validator = editor.editor.getValidator();
|
|
|
+ const valid = validator.valid(true);
|
|
|
+
|
|
|
+ if (valid) {
|
|
|
+ xcMessage.error('请检查必填项或者填写值是否正确!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (!((tabType.value == '0' || tabType.value == '2') && selectionStatus.value)) {
|
|
|
return ElMessage.error('请选择数据,只有慢病模板才能保存!')
|
|
|
}
|
|
@@ -216,7 +210,7 @@ const clickSaveData = async () => {
|
|
|
pType: crmEmrPatientVo.value.pType,
|
|
|
emrDocumentId: id,
|
|
|
emrCategoryCode: categoryCode.value,
|
|
|
- visitTimes: tabType.value !== '2' ? crmEmrPatientVo.value.visitTimes : num.value,
|
|
|
+ visitTimes: crmEmrPatientVo.value.visitTimes,
|
|
|
emrName: mzEmrName.value,
|
|
|
name: mzEmrName.value,
|
|
|
parent: parent.value,
|
|
@@ -362,8 +356,6 @@ const queryCrmEmdrData = async (tab: any, event: any) => {
|
|
|
}
|
|
|
emrTemplateData.value = tem
|
|
|
})
|
|
|
- } else if (type == 2) {
|
|
|
- callEditCrmEmr(type)
|
|
|
} else {
|
|
|
crmEmrPatientVo.value['type'] = type
|
|
|
queryCrmEmrTree(crmEmrPatientVo.value).then((res: any) => {
|
|
@@ -372,39 +364,6 @@ const queryCrmEmdrData = async (tab: any, event: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const callEditCrmEmr = (type: any) => {
|
|
|
- crmEmrPatientVo.value['type'] = type
|
|
|
- let queryData = clone(crmEmrPatientVo.value)
|
|
|
- if (!queryData.pId) {
|
|
|
- ElMessage.error('请选择查询病人数据, 再查看慢病记录!')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- queryData.visitTimes = num.value
|
|
|
- queryCrmEmrTree(queryData).then((res: any) => {
|
|
|
- let tempData = [] as any
|
|
|
- if (res) {
|
|
|
- for (let i = 0; i < res.length; i++) {
|
|
|
- let te = {
|
|
|
- _id: '',
|
|
|
- categoryCode: '',
|
|
|
- documentId: '',
|
|
|
- name: '',
|
|
|
- cade: '',
|
|
|
- parent: '',
|
|
|
- }
|
|
|
- te.cade = res[i].emrCategoryCode
|
|
|
- te.parent = res[i].parent
|
|
|
- te.categoryCode = res[i].emrCategoryCode
|
|
|
- te.documentId = res[i].emrDocumentId
|
|
|
- te.name = res[i].name
|
|
|
- tempData.push(te)
|
|
|
- }
|
|
|
- emrTemplateEditData.value = tempData
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
interface Tree {
|
|
|
[key: string]: any
|
|
|
}
|