From 6de8ce34e6c1c2b56bc334e226a6981cab55469c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com>
Date: Mon, 28 Jul 2025 11:02:26 +0800
Subject: [PATCH] tijiao
---
config/index.js | 2 +-
index.html | 1 +
package.json | 1 +
src/assets/img/word-iocn.png | Bin 0 -> 469 bytes
src/main.js | 4 +-
src/views/common/js/commonJS.js | 88 ++
.../components/commonBookTags/shopproduct.vue | 15 +-
src/views/modules/medicalrecords/11.vue | 1281 +++++++++++++++++
.../modules/medicalrecords/addCertificate.vue | 990 ++++++++-----
.../modules/medicalrecords/medicalList.vue | 4 +-
10 files changed, 2038 insertions(+), 348 deletions(-)
create mode 100644 src/assets/img/word-iocn.png
create mode 100644 src/views/common/js/commonJS.js
create mode 100644 src/views/modules/medicalrecords/11.vue
diff --git a/config/index.js b/config/index.js
index a8f8fa9..da5cab6 100644
--- a/config/index.js
+++ b/config/index.js
@@ -23,7 +23,7 @@ module.exports = {
},
// Various Dev Server settings
- host: '192.168.110.160', // can be overwritten by process.env.HOST
+ host: '192.168.110.159', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
diff --git a/index.html b/index.html
index 781c2a9..9e266ad 100644
--- a/index.html
+++ b/index.html
@@ -17,6 +17,7 @@
+
<% } %>
diff --git a/package.json b/package.json
index c44dd69..9de7829 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"gulp-replace": "1.0.0",
"gulp-shell": "0.8.0",
"lodash": "4.17.5",
+ "mammoth": "^1.9.1",
"node-sass": "^4.0.0",
"npm": "^6.9.0",
"quill-image-resize-module": "^3.0.0",
diff --git a/src/assets/img/word-iocn.png b/src/assets/img/word-iocn.png
new file mode 100644
index 0000000000000000000000000000000000000000..208d503b6a052a8f7aed1b28f4f8e3d6f1ea3208
GIT binary patch
literal 469
zcmV;`0V@89P)Px$k4Z#9R7gu>WS}u%q_O!7C>AVUyh`QI-#@oWu{1Fu3a=wkB*@#siOfaTwM=t{dLlI7wFf!a&-07i-)dG+p4xhk%0J1<$L9j?#jGJNqsV8uA
zw3LMyOm)Q>7H+t4c}bVM9!?9O66kS)Vu6{S1lWT0d+x%`(N`B?FwhjmY5}@$K|w~8
z1=sJsW2nwBV_3KQ4#U029~q3a#2DtUzmDMpvMmU5RbiO5`U*p!vogcsvridB1vwdJ
zt-eYf3!=Q$8RoCM%5d@K8?XZ_(@YsYefh~Sb=hUgEdZq=SqWZ-$1gsk_+DO$m*L^F
zFO*pjRk}Tam6>7w-+zp+uqIVT#=0Lu%cgguH{EENxZD}AzEjz=Q^s6hG|QnX4p00000
LNkvXXu0mjflupTU
literal 0
HcmV?d00001
diff --git a/src/main.js b/src/main.js
index fe7fcaa..2838736 100644
--- a/src/main.js
+++ b/src/main.js
@@ -12,6 +12,7 @@ import '@/element-ui-theme'
import '@/assets/scss/index.scss'
import '@/assets/css/time-line.less' // 引入时间线样式
import Bus from '@/assets/js/eventBus.js'
+import commonJS from '@/views/common/js/commonJS'
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
import { isAuth } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
@@ -38,10 +39,11 @@ if (process.env.NODE_ENV !== 'production') {
}
// 挂载全局
+
Vue.prototype.$http = httpRequest // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.$bus = Bus
-
+Vue.prototype.$commonJS = commonJS //
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
diff --git a/src/views/common/js/commonJS.js b/src/views/common/js/commonJS.js
new file mode 100644
index 0000000..3bf5470
--- /dev/null
+++ b/src/views/common/js/commonJS.js
@@ -0,0 +1,88 @@
+import Vue from 'vue';
+
+import mammoth from "mammoth";
+export default {
+ handleUpload(event, callback) {
+ const file = event.target.files[0]
+ if (!file) return
+
+ const reader = new FileReader()
+ reader.onload = (e) => {
+ const arrayBuffer = e.target.result
+ mammoth.extractRawText({ arrayBuffer })
+ .then((result) => {
+ const rawText = result.value.trim();
+
+// 1. 按“[医案]”分割,生成数组
+const caseList = rawText
+ .split(/[医案]/)
+ .filter(Boolean);
+
+// 2. 每个医案内判断是否有“相关课程”,有则去掉后面部分
+const cleanedCases = caseList.map(item => {
+ let content = item.trim();
+
+ if (content.includes('相关课程')) {
+ content = content.split('相关课程')[0].trim();
+ }
+
+ return content; // 补回前缀
+});
+
+
+ // 如果你只是要显示全部文字,也可以合并
+ // this.content = fullCases.join('\n\n');
+ callback(cleanedCases)
+ })
+ .catch((err) => {
+ console.error('提取失败:', err);
+ });
+ // mammoth.extractRawText({ arrayBuffer })
+ // .then((result) => {
+ // this.content = result.value // 设置到 textarea 中
+ // console.log('提取内容:', result.value)
+ // })
+ // .catch((err) => {
+ // console.error('提取失败:', err)
+ // })
+ }
+
+ reader.readAsArrayBuffer(file)
+
+ }
+ // handleUpload(event, callback) {
+ // const file = event.target.files[0]
+ // if (!file) return
+
+ // const reader = new FileReader()
+ // reader.onload = (e) => {
+ // const arrayBuffer = e.target.result
+ // mammoth.convertToHtml({
+ // arrayBuffer: arrayBuffer
+ // }, {
+ // convertImage: mammoth.images.inline(function (element) {
+ // return element.read("base64").then(function (imageBuffer) {
+ // return {
+ // src: "data:" + element.contentType + ";base64," + imageBuffer
+ // };
+ // });
+ // })
+ // }).then(function (result) {
+ // callback(result.value);
+
+ // })
+ // // mammoth.extractRawText({ arrayBuffer })
+ // // .then((result) => {
+ // // this.content = result.value // 设置到 textarea 中
+ // // console.log('提取内容:', result.value)
+ // // })
+ // // .catch((err) => {
+ // // console.error('提取失败:', err)
+ // // })
+ // }
+
+ // reader.readAsArrayBuffer(file)
+
+ // }
+
+}
\ No newline at end of file
diff --git a/src/views/components/commonBookTags/shopproduct.vue b/src/views/components/commonBookTags/shopproduct.vue
index b8d045d..6e2ec71 100644
--- a/src/views/components/commonBookTags/shopproduct.vue
+++ b/src/views/components/commonBookTags/shopproduct.vue
@@ -55,21 +55,21 @@
编辑
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 审核备注:{{ addCertificateForm.mark }}
+
+
+
+
+
+
+
+
+
+ {{ item.tel ? item.tel : item.email }}
+ ({{ item.name }})
+
+
+
+
{{ addCertificateForm.userKey }}
+
+
+
+
+
+ {{
+ addCertificateForm.userName
+ ? addCertificateForm.userName
+ : "-"
+ }}
+
+
+
+
+
+ {{ addCertificateForm.userKey }}
+
+
+
+
+ {{
+ addCertificateForm.userName
+ ? addCertificateForm.userName
+ : "-"
+ }}
+
+
+
+
+
+
+
+
+
+
+ {{ addCertificateForm.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 是否加入 Ai 训练库
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/modules/medicalrecords/addCertificate.vue b/src/views/modules/medicalrecords/addCertificate.vue
index 9bdb500..897cd94 100644
--- a/src/views/modules/medicalrecords/addCertificate.vue
+++ b/src/views/modules/medicalrecords/addCertificate.vue
@@ -20,204 +20,294 @@
-
-
-
-
+
+
+
+
+
+
+
- 审核备注:{{ addCertificateForm.mark }}
-
-
-
-
-
-
-
+
-
-
- {{ item.tel ? item.tel : item.email }}
- ({{ item.name }})
-
-
-
-
{{ addCertificateForm.userKey }}
-
-
-
-
-
- {{
- addCertificateForm.userName
- ? addCertificateForm.userName
- : "-"
- }}
-
-
-
-
-
- {{ addCertificateForm.userKey }}
+ {{
+ addCertificateForm.userName
+ ? addCertificateForm.userName
+ : "-"
+ }}
+
-
-
-
- {{
- addCertificateForm.userName
- ? addCertificateForm.userName
- : "-"
- }}
-
-
-
-
+
+
+ {{ addCertificateForm.userKey }}
+
+
+
+
+ {{
+ addCertificateForm.userName
+ ? addCertificateForm.userName
+ : "-"
+ }}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- {{ addCertificateForm.title }}
+ >
+
+
+ {{ addCertificateForm.title }}
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
- 暂无图片
-
-
-
-
-
![]()
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-