This commit is contained in:
2025-07-28 11:02:26 +08:00
parent 859a342326
commit 6de8ce34e6
10 changed files with 2038 additions and 348 deletions

View File

@@ -23,7 +23,7 @@ module.exports = {
}, },
// Various Dev Server settings // 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 port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,

View File

@@ -17,6 +17,7 @@
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script> <script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script> <script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script> <script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
<script src="https://unpkg.com/mammoth/mammoth.browser.min.js"></script>
<% } %> <% } %>
</head> </head>
<body> <body>

View File

@@ -24,6 +24,7 @@
"gulp-replace": "1.0.0", "gulp-replace": "1.0.0",
"gulp-shell": "0.8.0", "gulp-shell": "0.8.0",
"lodash": "4.17.5", "lodash": "4.17.5",
"mammoth": "^1.9.1",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"npm": "^6.9.0", "npm": "^6.9.0",
"quill-image-resize-module": "^3.0.0", "quill-image-resize-module": "^3.0.0",

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

View File

@@ -12,6 +12,7 @@ import '@/element-ui-theme'
import '@/assets/scss/index.scss' import '@/assets/scss/index.scss'
import '@/assets/css/time-line.less' // 引入时间线样式 import '@/assets/css/time-line.less' // 引入时间线样式
import Bus from '@/assets/js/eventBus.js' 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 httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
import { isAuth } from '@/utils' import { isAuth } from '@/utils'
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from 'lodash/cloneDeep'
@@ -38,10 +39,11 @@ if (process.env.NODE_ENV !== 'production') {
} }
// 挂载全局 // 挂载全局
Vue.prototype.$http = httpRequest // ajax请求方法 Vue.prototype.$http = httpRequest // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法 Vue.prototype.isAuth = isAuth // 权限方法
Vue.prototype.$bus = Bus Vue.prototype.$bus = Bus
Vue.prototype.$commonJS = commonJS //
// 保存整站vuex本地储存初始状态 // 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state) window.SITE_CONFIG['storeState'] = cloneDeep(store.state)

View File

@@ -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)
// }
}

View File

@@ -55,21 +55,21 @@
<!-- --> <!-- -->
<el-table-column <el-table-column
v-if="!disableOperate" v-if="!isDisableOperate"
header-align="center" header-align="center"
align="center" align="center"
label="操作" label="操作"
width="120" :width="operationWidth?operationWidth:120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="operation" :row="scope.row"></slot> <slot name="operation" :row="scope.row"></slot>
<el-button <el-button
type="text" type="text"
v-if="urlList.editCourse" v-if="urlList.editCourse&&!isShowNewOperation"
@click="editCourse(scope.row)" @click="editCourse(scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button v-if="!isShowNewOperation"
type="text" type="text"
style="color: red;" style="color: red;"
@click="shopDelete(scope.row)" @click="shopDelete(scope.row)"
@@ -155,11 +155,14 @@ export default {
"isShowPagination", "isShowPagination",
"axiosType", "axiosType",
"otherInfo", "otherInfo",
"isShowNewOperation",
"operationWidth",
"CustomEdit", "CustomEdit",
"pageSizes" "pageSizes"
], ],
data() { data() {
return { return {
isDisableOperate: this.disableOperate,
multipleSelectionAll: [], // 所有选中的数据包含跨页数据 multipleSelectionAll: [], // 所有选中的数据包含跨页数据
goodsTypeList: [], // goodsTypeList goodsTypeList: [], // goodsTypeList
multipleSelection: [], // 当前页选中的数据 multipleSelection: [], // 当前页选中的数据
@@ -458,7 +461,7 @@ export default {
// 获取关联数据列表 // 获取关联数据列表
async getAssociatedGoodsList() { async getAssociatedGoodsList() {
this.$emit("changeStatisticsQuery"); this.$emit("changeStatisticsQuery");
this.disableOperate = false; this.isDisableOperate = false;
console.log("🚀 ~ getAssociatedGoodsList ~ form:11111", form); console.log("🚀 ~ getAssociatedGoodsList ~ form:11111", form);
var form = { ...this.defaultForm, ...this.dataForm }; var form = { ...this.defaultForm, ...this.dataForm };
@@ -564,7 +567,7 @@ export default {
} }
}, },
async statisticsQuery() { async statisticsQuery() {
this.disableOperate = true; this.isDisableOperate = true;
var form = { ...this.defaultForm, ...this.dataForm }; var form = { ...this.defaultForm, ...this.dataForm };
this.dataListLoading = true; this.dataListLoading = true;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -243,7 +243,7 @@
prop="title" prop="title"
header-align="center" header-align="center"
align="center" align="center"
width="120" width="110"
label="是否加入数据库" label="是否加入数据库"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@@ -431,7 +431,7 @@
prop="title" prop="title"
header-align="center" header-align="center"
align="center" align="center"
width="120" width="110"
label="是否加入数据库" label="是否加入数据库"
> >
<template slot-scope="scope"> <template slot-scope="scope">