| | |
| | | > |
| | | <span style="color: #67c23a">● 正常</span> |
| | | </el-option> |
| | | ><el-form-item label="异常提醒"> |
| | | <el-select v-model="item.isabnormal" placeholder="请选择状态"> |
| | | <el-option |
| | | :value="0" |
| | | label="正常" |
| | | :style="{ color: '#67C23A' }" |
| | | > |
| | | <span style="color: #67c23a">● 正常</span> |
| | | </el-option> |
| | | |
| | | <el-option |
| | | :value="2" |
| | | label="警告" |
| | | :style="{ color: '#FFBA00' }" |
| | | > |
| | | <span style="color: #ffba00">● 警告</span> |
| | | </el-option> |
| | | <el-option |
| | | :value="1" |
| | | label="异常" |
| | | :style="{ color: '#f75c5c' }" |
| | | > |
| | | <span style="color: #f75c5c">● 异常</span> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item></el-col |
| | | > |
| | | <el-option |
| | | :value="2" |
| | | label="警告" |
| | |
| | | </el-input> </el-form-item |
| | | ></el-col> |
| | | </el-row> |
| | | <el-form-item label="结束对话"> |
| | | <el-radio-group v-model="item.isEnd"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="结束对话"> |
| | | <el-radio-group v-model="item.isEnd"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="0">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="默认选项"> |
| | | <el-radio-group v-model="item.defaultValue"> |
| | | <el-radio :label="2">是</el-radio> |
| | | <el-radio :label="1">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="10" v-if="intent"> |
| | | <el-col :span="12" |
| | |
| | | } |
| | | } |
| | | } else { |
| | | // 没有token |
| | | if (whiteList.indexOf(to.path) !== -1) { |
| | | let processedPath = to.path; |
| | | if (to.path.startsWith("/aifollowup")) { |
| | | processedPath = to.path.replace(/^\/aifollowup/, "") || "/"; |
| | | } |
| | | |
| | | console.log(processedPath, "处理后的路径"); |
| | | |
| | | if (whiteList.indexOf(processedPath) !== -1) { |
| | | // 在免登录白名单,直接进入 |
| | | next(); |
| | | // 如果路径被修改了,需要重定向 |
| | | if (processedPath !== to.path) { |
| | | next({ |
| | | path: processedPath, |
| | | query: to.query, |
| | | hash: to.hash, |
| | | }); |
| | | NProgress.done(); |
| | | } else { |
| | | next(); |
| | | } |
| | | } else { |
| | | next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页 |
| | | // 保存重定向URL时需要处理路径 |
| | | const redirectPath = to.path.startsWith("/aifollowup") |
| | | ? to.path.replace(/^\/aifollowup/, "") |
| | | : to.fullPath; |
| | | |
| | | next(`/login?redirect=${redirectPath}`); // 否则全部重定向到登录页 |
| | | NProgress.done(); |
| | | } |
| | | } |
| | |
| | | </div> |
| | | |
| | | <!-- 搜索区域(题目筛选) --> |
| | | <div v-if="questionList.length > 0" class="search-section"> |
| | | <div v-show="questionList.length > 0" class="search-section"> |
| | | <el-card shadow="never" class="search-container"> |
| | | <el-form :model="queryParams" :inline="true" size="medium"> |
| | | <el-form :model="queryParams" size="medium"> |
| | | <el-form-item label="问题主题"> |
| | | <el-input |
| | | v-model="queryParams.scriptTopic" |
| | | placeholder="请输入问题主题" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | v-model="queryParams.scriptContent" |
| | | placeholder="请输入问题内容" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | |
| | | // 查询参数 |
| | | queryParams: { |
| | | scriptTopic: "", |
| | | scriptContent: "", |
| | | scriptTopic: null, |
| | | scriptContent: null, |
| | | }, |
| | | |
| | | // 数据列表 |
| | |
| | | // 筛选后的题目列表 |
| | | filteredQuestionList() { |
| | | let filtered = this.questionList; |
| | | |
| | | console.log("queryParams:", this.queryParams); |
| | | console.log("questionList:", this.questionList); |
| | | // 筛选满意度题目 |
| | | if (this.templateForm.templateType === 1) { |
| | | filtered = filtered.filter((q) => |
| | |
| | | if (this.queryParams.scriptTopic) { |
| | | const keyword = this.queryParams.scriptTopic.toLowerCase(); |
| | | filtered = filtered.filter( |
| | | (q) => q.scriptTopic && q.criptTopic.toLowerCase().includes(keyword) |
| | | (q) => q.scriptTopic && q.scriptTopic.toLowerCase().includes(keyword) |
| | | ); |
| | | } |
| | | |
| | |
| | | isavailable: item.isavailable, |
| | | })); |
| | | console.log(this.followupTemplates, 3); |
| | | |
| | | } else { |
| | | this.$message.error(res.msg || "加载问卷模板失败"); |
| | | } |
| | |
| | | |
| | | <!-- 分页 --> |
| | | <div class="pagination" v-if="patienttotal > 0"> |
| | | <el-pagination |
| | | background |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :current-page="patientqueryParams.pn" |
| | | :page-size="patientqueryParams.ps" |
| | | :page-sizes="[10, 20, 30]" |
| | | <pagination |
| | | v-show="patienttotal > 0" |
| | | :total="patienttotal" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :page.sync="patientqueryParams.pn" |
| | | :limit.sync="patientqueryParams.ps" |
| | | @pagination="loadData" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | import { selectTimelyRate } from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: 'SeedetailsDialog', |
| | | dicts: ['sys_yujing', 'sys_suggest'], |
| | | name: "SeedetailsDialog", |
| | | dicts: ["sys_yujing", "sys_suggest"], |
| | | props: { |
| | | rowData: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | default: () => ({}), |
| | | }, |
| | | queryParams: { |
| | | type: Object, |
| | | default: () => ({}) |
| | | } |
| | | default: () => ({}), |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | patientqueryParams: { |
| | | pn: 1, |
| | | ps: 10, |
| | | name: '', |
| | | leavediagname: '' |
| | | name: "", |
| | | leavediagname: "", |
| | | }, |
| | | |
| | | // 加载状态 |
| | |
| | | logsheetlist: [], |
| | | |
| | | // 总条数 |
| | | patienttotal: 0 |
| | | patienttotal: 0, |
| | | }; |
| | | }, |
| | | |
| | |
| | | try { |
| | | const params = { |
| | | ...this.patientqueryParams, |
| | | deptcode: this.rowData.deptcode || '', |
| | | starttime: this.queryParams.dateRange?.[0] ? this.parseTime(this.queryParams.dateRange[0]) : '', |
| | | endtime: this.queryParams.dateRange?.[1] ? this.parseTime(this.queryParams.dateRange[1]) : '' |
| | | deptcode: this.rowData.deptcode || "", |
| | | starttime: this.queryParams.dateRange?.[0] |
| | | ? this.parseTime(this.queryParams.dateRange[0]) |
| | | : "", |
| | | endtime: this.queryParams.dateRange?.[1] |
| | | ? this.parseTime(this.queryParams.dateRange[1]) |
| | | : "", |
| | | }; |
| | | console.log(params, "params"); |
| | | |
| | | const response = await selectTimelyRate(params); |
| | | this.logsheetlist = response.data?.detail || []; |
| | | this.patienttotal = response.data?.total || 0; |
| | | } catch (error) { |
| | | console.error('获取未及时随访详情失败:', error); |
| | | this.$message.error('获取数据失败'); |
| | | console.error("获取未及时随访详情失败:", error); |
| | | this.$message.error("获取数据失败"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | |
| | | this.patientqueryParams = { |
| | | pn: 1, |
| | | ps: 10, |
| | | name: '', |
| | | leavediagname: '' |
| | | name: "", |
| | | leavediagname: "", |
| | | }; |
| | | this.loadData(); |
| | | }, |
| | | |
| | | // 处理分页大小变化 |
| | | handleSizeChange(size) { |
| | | this.patientqueryParams.ps = size; |
| | | this.patientqueryParams.pn = 1; |
| | | console.log(this.patientqueryParams); |
| | | |
| | | this.loadData(); |
| | | }, |
| | | |
| | |
| | | |
| | | // 格式化时间 |
| | | formatTime(time) { |
| | | if (!time) return '-'; |
| | | if (!time) return "-"; |
| | | return time; |
| | | }, |
| | | |
| | | // 解析时间 |
| | | parseTime(time) { |
| | | if (!time) return ''; |
| | | if (!time) return ""; |
| | | return time; |
| | | }, |
| | | |
| | | // 查看详情 |
| | | handleViewDetail(row) { |
| | | this.$emit('close'); |
| | | this.$emit("close"); |
| | | |
| | | let type = ""; |
| | | if (row.preachformson && row.preachformson.includes("3")) { |
| | |
| | | taskid: row.taskid, |
| | | patid: row.patid, |
| | | id: row.id, |
| | | Voicetype: type |
| | | } |
| | | Voicetype: type, |
| | | }, |
| | | }); |
| | | }, 300); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="Editsingletasksonyic('')" |
| | | @click="alterpatient('')" |
| | | > |
| | | 保存基础信息 |
| | | </el-button> |
| | |
| | | // 处理 scriptResult,直接修改原始数据 |
| | | if (item.scriptType == 2 && item.scriptResult) { |
| | | // 处理数组类型的 scriptResult |
| | | if ( |
| | | Array.isArray(item.scriptResult) && |
| | | item.scriptResult.length > 0 |
| | | ) { |
| | | if (Array.isArray(item.scriptResult)) { |
| | | item.originalScriptResult = item.scriptResult; // 保存原始数组(可选) |
| | | item.scriptResult = item.scriptResult.join("&"); // 转换为字符串 |
| | | } |
| | |
| | | } |
| | | }); |
| | | }, |
| | | alterpatient(sendstate) { |
| | | alterpatient(this.userform).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$modal.msgSuccess("基础信息保存成功"); |
| | | } else { |
| | | this.$modal.msgError("基础信息修改失败"); |
| | | } |
| | | }); |
| | | }, |
| | | // 异常列渲染 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.id == this.id) { |
| | |
| | | toolbarConfig: {}, |
| | | editorConfig: { |
| | | placeholder: "请输入内容...", |
| | | MENU_CONF: { |
| | | // 图片上传配置 |
| | | uploadImage: { |
| | | server: process.env.VUE_APP_BASE_API + "/common/uploadSort", |
| | | fieldName: "file", |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | // 自定义插入 |
| | | customInsert: (res, insertFn) => { |
| | | const url = res.url || res.data || res.filePath; |
| | | if (url) { |
| | | // 处理内网地址转换 |
| | | const processedUrl = url.replace( |
| | | "http://192.168.191.181:8095/profile/upload", |
| | | "http://m.zjtongde.com:13871/prod-api/profile/upload" |
| | | ); |
| | | insertFn(processedUrl); |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | // 视频上传配置 |
| | | uploadVideo: { |
| | | server: process.env.VUE_APP_BASE_API + "/common/uploadSort", |
| | | fieldName: "file", |
| | | maxFileSize: 50 * 1024 * 1024, // 50MB |
| | | allowedFileTypes: ["video/*"], |
| | | headers: { |
| | | "Content-Type": "multipart/form-data", |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | // 自定义插入 |
| | | customInsert: (res, insertFn) => { |
| | | const url = res.url || res.data || res.filePath; |
| | | if (url) { |
| | | // 处理内网地址转换 |
| | | const processedUrl = url.replace( |
| | | "http://192.168.191.181:8095/profile/upload", |
| | | "http://m.zjtongde.com:13871/prod-api/profile/upload" |
| | | ); |
| | | insertFn(processedUrl, "视频"); |
| | | } |
| | | }, |
| | | onSuccess: (file, res) => { |
| | | console.log("视频上传成功", res); |
| | | return res.url || res.data || res.filePath; |
| | | }, |
| | | onFailed: (file, res) => { |
| | | this.$message.error("视频上传失败"); |
| | | console.error("视频上传失败", res); |
| | | }, |
| | | onError: (file, err, res) => { |
| | | this.$message.error("视频上传出错"); |
| | | console.error("视频上传出错", err); |
| | | }, |
| | | }, |
| | | }, |
| | | menus: [ |
| | | "head", |
| | | "bold", |
| | | "italic", |
| | | "underline", |
| | | "image", |
| | | "video", // 确保有 video |
| | | "link", |
| | | "list", |
| | | "undo", |
| | | "redo", |
| | | "file", // 添加自定义文件上传菜单 |
| | | "file", |
| | | ], |
| | | uploadImgServer: process.env.VUE_APP_BASE_API + "/common/uploadSort", // 图片上传接口 |
| | | uploadImgHeaders: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, // 自定义上传的 headers |
| | | uploadImgParams: { key: "value" }, // 自定义上传的参数 |
| | | uploadImgMaxSize: 2 * 1024 * 1024, // 图片最大大小,单位 Byte |
| | | uploadImgMaxLength: 1, // 一次最多上传图片数量 |
| | | uploadImgTimeout: 3 * 60 * 1000, // 超时时间,单位 ms |
| | | uploadImgHooks: { |
| | | customInsert: (insertImgFn, result) => { |
| | | const url = result.url; // 获取图片地址 |
| | | insertImgFn(url); // 插入图片 |
| | | }, |
| | | }, |
| | | customMenus: { |
| | | file: { |
| | | tip: "上传文件", |
| | | click: (editor) => { |
| | | const input = document.createElement("input"); |
| | | input.type = "file"; |
| | | input.accept = |
| | | "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"; // 支持的文件类型 |
| | | input.onchange = (e) => { |
| | | const file = e.target.files[0]; |
| | | if (!file) return; |
| | | const formData = new FormData(); |
| | | formData.append("file", file); |
| | | |
| | | // 确保 process.env.VUE_APP_BASE_API 是正确的 |
| | | const uploadUrl = |
| | | process.env.VUE_APP_BASE_API + "/common/uploadSort"; |
| | | axios |
| | | .post(uploadUrl, formData, { |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | const url = res.data.url; // 获取文件地址 |
| | | // 插入文件链接作为普通文本 |
| | | editor.txt.append(url + " "); |
| | | // 或者插入文件链接作为超链接 |
| | | // editor.cmd.do('insertLink', { name: '文件链接', url: url }); |
| | | }) |
| | | .catch((err) => { |
| | | console.error("文件上传失败", err); |
| | | }); |
| | | }; |
| | | input.click(); |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | modes: "default", // or 'simple' |
| | | headers: { |
| | |
| | | |
| | | // 定义要替换的新旧URL |
| | | var oldUrlBase = this.oldPattern; |
| | | var newUrlBase =this.newPattern; |
| | | var newUrlBase = this.newPattern; |
| | | |
| | | // 获取所有的video元素 |
| | | var videos = doc.querySelectorAll("video"); |
| | |
| | | fileList: [], |
| | | // 工具栏配置 |
| | | toolbarConfig: { |
| | | excludeKeys: [ |
| | | "group-video", |
| | | "insertVideo", |
| | | "uploadVideo", |
| | | "emotion", |
| | | "codeBlock", |
| | | ], |
| | | excludeKeys: ["emotion", "codeBlock"], |
| | | }, |
| | | |
| | | // 编辑器配置 |
| | | editorConfig: { |
| | | placeholder: "请输入宣教内容...", |
| | | placeholder: "请输入内容...", |
| | | MENU_CONF: { |
| | | // 图片上传配置 |
| | | uploadImage: { |
| | | server: process.env.VUE_APP_BASE_API + "/common/uploadSort", |
| | | fieldName: "file", |
| | | maxFileSize: 2 * 1024 * 1024, |
| | | maxNumberOfFiles: 1, |
| | | allowedFileTypes: ["image/*"], |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | customUpload: async (file, insertFn) => { |
| | | try { |
| | | const formData = new FormData(); |
| | | formData.append("file", file); |
| | | |
| | | const response = await axios.post( |
| | | process.env.VUE_APP_BASE_API + "/common/uploadSort", |
| | | formData, |
| | | { |
| | | headers: { |
| | | // "Content-Type": "multipart/form-data", |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | } |
| | | // 自定义插入图片 |
| | | customInsert: (res, insertFn) => { |
| | | const url = res.url || res.data || res.filePath; |
| | | if (url) { |
| | | // 处理内网地址转换 |
| | | const processedUrl = url.replace( |
| | | "http://192.168.191.181:8095/profile/upload", |
| | | "http://m.zjtongde.com:13871/prod-api/profile/upload" |
| | | ); |
| | | |
| | | if (response.data && response.data.url) { |
| | | let imgUrl = response.data.url; |
| | | // imgUrl = imgUrl.replace( |
| | | // "http://218.108.11.22:8093/profile-api/upload", |
| | | // "http://192.88.117.236:8090/prod-api/profile/upload" |
| | | // ); |
| | | imgUrl = imgUrl.replace( |
| | | "http://m.zjtongde.com:13871/prod-api/profile/upload", |
| | | "http://192.88.117.236:8090/prod-api/profile/upload" |
| | | ); |
| | | insertFn(imgUrl); |
| | | } |
| | | } catch (error) { |
| | | console.error("图片上传失败", error); |
| | | this.$message.error("图片上传失败"); |
| | | insertFn(processedUrl); |
| | | } |
| | | }, |
| | | // 上传成功回调 |
| | | onSuccess: (file, res) => { |
| | | console.log("图片上传成功", res); |
| | | return res.url || res.data || res.filePath; |
| | | }, |
| | | onFailed: (file, res) => { |
| | | this.$message.error("图片上传失败"); |
| | | console.error("图片上传失败", res); |
| | | }, |
| | | }, |
| | | |
| | | // 视频上传配置 |
| | | uploadVideo: { |
| | | server: process.env.VUE_APP_BASE_API + "/common/uploadSort", |
| | | fieldName: "file", |
| | | maxFileSize: 50 * 1024 * 1024, // 50MB |
| | | allowedFileTypes: ["video/*"], |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | // 自定义插入视频 |
| | | customInsert: (res, insertFn) => { |
| | | const url = res.url || res.data || res.filePath; |
| | | if (url) { |
| | | // 处理内网地址转换 |
| | | const processedUrl = url.replace( |
| | | "http://192.168.191.181:8095/profile/upload", |
| | | "http://m.zjtongde.com:13871/prod-api/profile/upload" |
| | | ); |
| | | insertFn(processedUrl, "视频"); |
| | | } |
| | | }, |
| | | onSuccess: (file, res) => { |
| | | console.log("视频上传成功", res); |
| | | return res.url || res.data || res.filePath; |
| | | }, |
| | | onFailed: (file, res) => { |
| | | this.$message.error("视频上传失败"); |
| | | console.error("视频上传失败", res); |
| | | }, |
| | | onError: (file, err, res) => { |
| | | this.$message.error("视频上传出错"); |
| | | console.error("视频上传出错", err); |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | // 获取所有的video元素 |
| | | var videos = doc.querySelectorAll("video"); |
| | | var images = doc.querySelectorAll("img"); |
| | | console.log(videos, "videos"); |
| | | console.log(images, "images"); |
| | | |
| | | // 遍历所有的video元素并替换src属性 |
| | | videos.forEach(function (video) { |
| | | // 先检查video元素自身的src属性 |
| | | var src = video.getAttribute("src"); |
| | | if (src.startsWith(oldUrlBase)) { |
| | | if (src && src.startsWith(oldUrlBase)) { |
| | | video.setAttribute("src", src.replace(oldUrlBase, newUrlBase)); |
| | | } |
| | | }); |
| | | console.log(images,'images'); |
| | | |
| | | images.forEach(function (img) { |
| | | // 然后检查video元素内部的source子元素 |
| | | var sources = video.querySelectorAll("source"); |
| | | sources.forEach(function (source) { |
| | | var sourceSrc = source.getAttribute("src"); |
| | | if (sourceSrc && sourceSrc.startsWith(oldUrlBase)) { |
| | | source.setAttribute( |
| | | "src", |
| | | sourceSrc.replace(oldUrlBase, newUrlBase) |
| | | ); |
| | | } |
| | | }); |
| | | }); |
| | | console.log(images, "images"); |
| | | |
| | | images.forEach(function (img) { |
| | | var src = img.getAttribute("src"); |
| | | if (src.startsWith(oldUrlBase)) { |
| | | img.setAttribute("src", src.replace(oldUrlBase, newUrlBase)); |
| | |
| | | content: this.parserdom(this.content), |
| | | fileName: this.generateRandomHtmlFilename(), |
| | | }).then((res) => { |
| | | console.log(55); |
| | | |
| | | this.ruleForm.richText = res.msg; |
| | | this.ruleForm.richText = res.msg.replace( |
| | | this.oldPattern, |
| | | this.newPattern |
| | | ); |
| | | this.oldPattern, |
| | | this.newPattern |
| | | ); |
| | | console.log(this.ruleForm.richText, "this.ruleForm.richText"); |
| | | // 处理内网html |
| | | addrichText({ |
| | |
| | | }, |
| | | // 查询树 |
| | | getDeptTree() { |
| | | getheLibraryAssort({ hetype: 2 }).then((res) => { |
| | | getheLibraryAssort({ hetype: 1 }).then((res) => { |
| | | this.deptOptions = res.rows; |
| | | this.dialogFormVisible = false; |
| | | }); |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label="关联服务"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联服务"> |
| | | <div |
| | | v-if="item.sendTaskname" |
| | | class="service-tag-container" |
| | |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="默认选项"> |
| | | <el-radio-group v-model="item.defaultValue"> |
| | | <el-radio :label="2">是</el-radio> |
| | | <el-radio :label="1">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="11"> |
| | |
| | | if (res.code == 200) { |
| | | this.options = res.rows.map((item) => ({ |
| | | value: item.medicalCode, |
| | | // value: item.medicalCode, |
| | | label: item.organizationName, |
| | | })); |
| | | } |
| | |
| | | this.options = res.rows.map((item) => ({ |
| | | value: item.orgid, |
| | | label: item.organizationName, |
| | | campusid: item.organizationID, |
| | | })); |
| | | } |
| | | }); |
| | |
| | | {{ |
| | | kcb |
| | | ? kcb |
| | | : "亲爱的患者-家属,我们是"+localStorage.getItem("orgname")+"的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。" |
| | | : "亲爱的患者-家属,我们是" + |
| | | localStorage.getItem("orgname") + |
| | | "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。" |
| | | }} |
| | | <!-- 亲爱的患者/家属您好,为了更好的了解您出院后的康复情况,给您适当及时的健康指导,请您抽一点宝贵时间,完成这份出院随访问卷调查。 --> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 填空 --> |
| | | <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 4||item.scriptType == 3"> |
| | | <div |
| | | class="scriptTopic-dev" |
| | | :key="index" |
| | | v-if="item.scriptType == 4 || item.scriptType == 3" |
| | | > |
| | | <div class="dev-text"> |
| | | {{ index + 1 }}、<span style="line-height: 1.5" |
| | | >{{ item.scriptContent |
| | |
| | | kcb: "", |
| | | excep: "", |
| | | taskname: "", |
| | | param6: null, |
| | | questionList: [ |
| | | // { |
| | | // scriptType: 1, |
| | |
| | | |
| | | geturlinfo(url).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | this.getQuestionnaire( |
| | | res.data.param1, |
| | | res.data.param2, |
| | | res.data.param3, |
| | | res.data.param5 |
| | | ); |
| | | this.param6 = res.data.param6; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | param6: this.param6, |
| | | excep: this.excep, |
| | | type: this.type, |
| | | serviceSubtaskDetailList: [], |
| | | }; |
| | | |
| | | const arr = structuredClone(this.questionList); |
| | | // arr.forEach((item) => { |
| | | // item.asrtext = JSON.stringify(item.questionResult); |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | param6: this.param6, |
| | | type: this.type, |
| | | ivrTaskTemplateScriptVOList: [], |
| | | }; |
| | | const arr = structuredClone(this.questionList); |
| | | console.log(arr, "srr"); |
| | | arr.forEach((item, index) => { |
| | | if (item.scriptType == 3||item.scriptType == 4) return; |
| | | if (item.scriptType == 3 || item.scriptType == 4) return; |
| | | var obj = item.ivrTaskScriptTargetoptionList.find( |
| | | (items) => items.targetvalue == item.questionResult |
| | | ); |
| | |
| | | isabnormal: 0, |
| | | taskname: "", |
| | | questionList: [], |
| | | param6:null, |
| | | jsy: null, |
| | | dialogVisible: false, |
| | | Endornot: true, |
| | |
| | | res.data.param3, |
| | | res.data.param5 |
| | | ); |
| | | this.param6 = res.data.param6; |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | param6: this.param6, |
| | | excep: this.excep, |
| | | isabnormal: this.isabnormal, |
| | | serviceSubtaskDetailList: [], |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | param6: this.param6, |
| | | svyTaskTemplateScriptVOS: [], |
| | | }; |
| | | const arr = structuredClone(this.questionList); |
| | |
| | | placeholder="请输入患者姓名" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="患者范围" prop="status"> |
| | | <!-- <el-form-item label="患者范围" prop="status"> |
| | | <el-select |
| | | v-model="topqueryParams.searchscope" |
| | | placeholder="请选择患者范围" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="患者范围" prop="status"> |
| | | <el-cascader |
| | | v-model="topqueryParams.scopetype" |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | serviceType: 4, |
| | | searchscope: 2, |
| | | searchscope: 3, |
| | | sendstate: 2, |
| | | leaveldeptcodes: [], |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | | }, |
| | | propss: { multiple: true }, |
| | |
| | | value: 4, |
| | | label: "不执行", |
| | | }, |
| | | { |
| | | { |
| | | value: 5, |
| | | label: "发送失败", |
| | | }, |
| | |
| | | value: 6, |
| | | label: "已完成", |
| | | }, |
| | | { |
| | | { |
| | | value: 7, |
| | | label: "超时", |
| | | }, |
| | |
| | | }; |
| | | this.currenttype = this.$route.query.type; |
| | | this.title = "随访内容列表"; |
| | | this.tableLabel = this.tableLabelwj||[]; |
| | | this.tableLabel = this.tableLabelwj || []; |
| | | if (this.form.serviceType == 1) { |
| | | this.checkboxlist = [ |
| | | { |
| | |
| | | label: "微信公众号", |
| | | }, |
| | | ]; |
| | | } else if (this.form.serviceType == 6) { |
| | | } else if ( |
| | | this.form.serviceType == 6 || |
| | | this.form.serviceType == 14 || |
| | | this.form.serviceType == 15 |
| | | ) { |
| | | this.checkboxlist = [ |
| | | { |
| | | { |
| | | value: "1", |
| | | label: "人工", |
| | | }, |
| | |
| | | this.leavehospitaldistrictcodes = []; |
| | | } |
| | | if (this.checkList) { |
| | | this.form.preachform = this.checkList.join(",")||[]; |
| | | this.form.preachformList = this.selectedOrder||[]; |
| | | this.form.preachform = this.checkList.join(",") || []; |
| | | this.form.preachformList = this.selectedOrder || []; |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | this.submitLoading = false; |
| | |
| | | // 疾病 |
| | | this.getillness(this.form.libtemplateid); |
| | | |
| | | selectInfoByCondition({id:this.form.templateid} ).then((res) => { |
| | | selectInfoByCondition({ id: this.form.templateid }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.previewtf = true; |
| | | this.previewtftype = 1; |
| | |
| | | : []; |
| | | this.overallCase = this.form.patTaskRelevances.concat(); |
| | | this.checkList = this.form.preachform.split(",") || []; |
| | | this.selectedOrder = this.form.preachformList||[]; |
| | | this.selectedOrder = this.form.preachformList || []; |
| | | |
| | | this.overallCase.forEach((item) => { |
| | | if (item.endtime) { |
| | |
| | | }); |
| | | }, |
| | | checkSelectionChange(selectedValues, selectedOrder) { |
| | | this.selectedOrder = selectedValues||[]; |
| | | this.selectedOrder = selectedValues || []; |
| | | console.log("当前选中:", selectedValues); |
| | | console.log("选中顺序:", selectedOrder); |
| | | }, |
| | |
| | | this.form.libtemplateid = this.objyl.id; |
| | | |
| | | this.objyl.isoperation = 1; |
| | | console.log(this.objyl, "this.objyl"); |
| | | |
| | | this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => { |
| | | item.ivrTaskScriptTargetoptionList = |
| | | item.ivrLibaScriptTargetoptionList; |
| | |
| | | handleAdd() { |
| | | this.$router.push({ |
| | | path: "/knowledge/verbaltrick/particulars/", |
| | | query: { id: "", categoryid: this.queryParams.categoryid }, |
| | | query: { id: "", assortid: this.queryParams.assortid }, |
| | | }); |
| | | }, |
| | | // 分类树----------------------------------------- |
| | |
| | | // 树 |
| | | getbaltrickclassify({}).then((res) => { |
| | | this.questionclass = res.rows; |
| | | console.log(res); |
| | | if (this.$route.query.assortid) { |
| | | this.indexform.assortid = Number(this.$route.query.assortid); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | |
| | | :summary-method="getInnerSummaries" |
| | | > |
| | | <el-table-column label="医生姓名" prop="drname" align="center" /> |
| | | <el-table-column label="科室" width="120" prop="deptname" align="center" /> |
| | | <el-table-column label="出院人次" prop="dischargeCount" align="center" /> |
| | | <el-table-column label="出院人次" align="center" key="dischargeCount" prop="dischargeCount" /> |
| | | <el-table-column label="无需随访人次" align="center" width="100" key="nonFollowUp" prop="nonFollowUp" /> |
| | | <el-table-column label="应随访人次" align="center" width="100" key="followUpNeeded" prop="followUpNeeded" /> |
| | | <el-table-column |
| | | label="科室" |
| | | width="120" |
| | | prop="deptname" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | label="出院人次" |
| | | prop="dischargeCount" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | label="出院人次" |
| | | align="center" |
| | | key="dischargeCount" |
| | | prop="dischargeCount" |
| | | /> |
| | | <el-table-column |
| | | label="无需随访人次" |
| | | align="center" |
| | | width="100" |
| | | key="nonFollowUp" |
| | | prop="nonFollowUp" |
| | | /> |
| | | <el-table-column |
| | | label="应随访人次" |
| | | align="center" |
| | | width="100" |
| | | key="followUpNeeded" |
| | | prop="followUpNeeded" |
| | | /> |
| | | |
| | | <el-table-column align="center" label="首次出院随访"> |
| | | <el-table-column label="需随访" align="center" key="needFollowUp" prop="needFollowUp" /> |
| | | <el-table-column label="待随访" align="center" key="pendingFollowUp" prop="pendingFollowUp" /> |
| | | <el-table-column label="随访成功" align="center" key="followUpSuccess" prop="followUpSuccess" /> |
| | | <el-table-column label="随访失败" align="center" key="followUpFail" prop="followUpFail" /> |
| | | <el-table-column label="随访率" align="center" width="120" key="followUpRate" prop="followUpRate" /> |
| | | <el-table-column v-if="orgname != '丽水市中医院'" label="及时率" align="center" width="120" key="rate" prop="rate"> |
| | | <el-table-column |
| | | label="需随访" |
| | | align="center" |
| | | key="needFollowUp" |
| | | prop="needFollowUp" |
| | | /> |
| | | <el-table-column |
| | | label="待随访" |
| | | align="center" |
| | | key="pendingFollowUp" |
| | | prop="pendingFollowUp" |
| | | /> |
| | | <el-table-column |
| | | label="随访成功" |
| | | align="center" |
| | | key="followUpSuccess" |
| | | prop="followUpSuccess" |
| | | /> |
| | | <el-table-column |
| | | label="随访失败" |
| | | align="center" |
| | | key="followUpFail" |
| | | prop="followUpFail" |
| | | /> |
| | | <el-table-column |
| | | label="随访率" |
| | | align="center" |
| | | width="120" |
| | | key="followUpRate" |
| | | prop="followUpRate" |
| | | /> |
| | | <el-table-column |
| | | v-if="orgname != '丽水市中医院'" |
| | | label="及时率" |
| | | align="center" |
| | | width="120" |
| | | key="rate" |
| | | prop="rate" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleSeeDetails(scope.row)"> |
| | | <span class="button-zx">{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="handleSeeDetails(scope.row)" |
| | | > |
| | | <span class="button-zx" |
| | | >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span |
| | | > |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="人工" align="center" key="manual" prop="manual" /> |
| | | <el-table-column label="短信" align="center" key="sms" prop="sms" /> |
| | | <el-table-column label="微信" align="center" key="weChat" prop="weChat" /> |
| | | <el-table-column |
| | | label="人工" |
| | | align="center" |
| | | key="manual" |
| | | prop="manual" |
| | | /> |
| | | <el-table-column |
| | | label="短信" |
| | | align="center" |
| | | key="sms" |
| | | prop="sms" |
| | | /> |
| | | <el-table-column |
| | | label="微信" |
| | | align="center" |
| | | key="weChat" |
| | | prop="weChat" |
| | | /> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | |
| | | :show-overflow-tooltip="true" |
| | | :sort-method="sortChineseNumber" |
| | | /> |
| | | <el-table-column label="科室" align="center" key="deptname" prop="deptname" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="出院人次" align="center" key="dischargeCount" prop="dischargeCount" /> |
| | | <el-table-column label="无需随访人次" align="center" width="100" key="nonFollowUp" prop="nonFollowUp" /> |
| | | <el-table-column label="应随访人次" align="center" width="100" key="followUpNeeded" prop="followUpNeeded" /> |
| | | <el-table-column |
| | | label="科室" |
| | | align="center" |
| | | key="deptname" |
| | | prop="deptname" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="出院人次" |
| | | align="center" |
| | | key="dischargeCount" |
| | | prop="dischargeCount" |
| | | /> |
| | | <el-table-column |
| | | label="无需随访人次" |
| | | align="center" |
| | | width="100" |
| | | key="nonFollowUp" |
| | | prop="nonFollowUp" |
| | | /> |
| | | <el-table-column |
| | | label="应随访人次" |
| | | align="center" |
| | | width="100" |
| | | key="followUpNeeded" |
| | | prop="followUpNeeded" |
| | | /> |
| | | |
| | | <el-table-column align="center" label="首次出院随访"> |
| | | <el-table-column label="需随访" align="center" key="needFollowUp" prop="needFollowUp"> |
| | | <el-table-column |
| | | label="需随访" |
| | | align="center" |
| | | key="needFollowUp" |
| | | prop="needFollowUp" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'needFollowUpInfo', '需随访列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails(scope.row, 'needFollowUpInfo', '需随访列表') |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.needFollowUp }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="待随访" align="center" key="pendingFollowUp" prop="pendingFollowUp"> |
| | | <el-table-column |
| | | label="待随访" |
| | | align="center" |
| | | key="pendingFollowUp" |
| | | prop="pendingFollowUp" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'pendingFollowUpInfo', '待随访列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails( |
| | | scope.row, |
| | | 'pendingFollowUpInfo', |
| | | '待随访列表' |
| | | ) |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.pendingFollowUp }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="随访成功" align="center" key="followUpSuccess" prop="followUpSuccess"> |
| | | <el-table-column |
| | | label="随访成功" |
| | | align="center" |
| | | key="followUpSuccess" |
| | | prop="followUpSuccess" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'followUpSuccessInfo', '随访成功列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails( |
| | | scope.row, |
| | | 'followUpSuccessInfo', |
| | | '随访成功列表' |
| | | ) |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.followUpSuccess }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="随访失败" align="center" key="followUpFail" prop="followUpFail"> |
| | | <el-table-column |
| | | label="随访失败" |
| | | align="center" |
| | | key="followUpFail" |
| | | prop="followUpFail" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'followUpFailInfo', '随访失败列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails( |
| | | scope.row, |
| | | 'followUpFailInfo', |
| | | '随访失败列表' |
| | | ) |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.followUpFail }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="随访率" align="center" width="120" key="followUpRate" prop="followUpRate" /> |
| | | <el-table-column v-if="orgname != '丽水市中医院'" label="及时率" align="center" width="120" key="rate" prop="rate"> |
| | | <el-table-column |
| | | label="随访率" |
| | | align="center" |
| | | width="120" |
| | | key="followUpRate" |
| | | prop="followUpRate" |
| | | /> |
| | | <el-table-column |
| | | v-if="orgname != '丽水市中医院'" |
| | | label="及时率" |
| | | align="center" |
| | | width="120" |
| | | key="rate" |
| | | prop="rate" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleSeeDetails(scope.row)"> |
| | | <span class="button-zx">{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="handleSeeDetails(scope.row)" |
| | | > |
| | | <span class="button-zx" |
| | | >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span |
| | | > |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="人工" align="center" key="manual" prop="manual"> |
| | | <el-table-column |
| | | label="人工" |
| | | align="center" |
| | | key="manual" |
| | | prop="manual" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'manualInfo', '人工随访列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails(scope.row, 'manualInfo', '人工随访列表') |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.manual }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="短信" align="center" key="sms" prop="sms"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'smsInfo', '短信随访列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="handleViewDetails(scope.row, 'smsInfo', '短信随访列表')" |
| | | > |
| | | <span class="button-zx">{{ scope.row.sms }}</span> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="微信" align="center" key="weChat" prop="weChat"> |
| | | <el-table-column |
| | | label="微信" |
| | | align="center" |
| | | key="weChat" |
| | | prop="weChat" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button size="medium" type="text" @click="handleViewDetails(scope.row, 'weChatInfo', '微信随访列表')"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click=" |
| | | handleViewDetails(scope.row, 'weChatInfo', '微信随访列表') |
| | | " |
| | | > |
| | | <span class="button-zx">{{ scope.row.weChat }}</span> |
| | | </el-button> |
| | | </template> |
| | |
| | | </el-table-column> |
| | | |
| | | <!-- 随访情况列(仅丽水市中医院显示) --> |
| | | <el-table-column v-if="orgname == '丽水市中医院'" align="center" label="随访情况"> |
| | | <el-table-column label="正常语音" align="center" width="100" key="taskSituation1" prop="taskSituation1" /> |
| | | <el-table-column label="患者拒接或拒访" align="center" width="100" key="taskSituation2" prop="taskSituation2" /> |
| | | <el-table-column label="面访或者接诊" align="center" width="100" key="taskSituation3" prop="taskSituation3" /> |
| | | <el-table-column label="微信随访" align="center" width="100" key="taskSituation4" prop="taskSituation4" /> |
| | | <el-table-column label="随访电话不正确" align="center" width="100" key="taskSituation5" prop="taskSituation5" /> |
| | | <el-table-column label="其他情况不宜随访" align="center" width="100" key="taskSituation6" prop="taskSituation6" /> |
| | | <el-table-column |
| | | v-if="orgname == '丽水市中医院'" |
| | | align="center" |
| | | label="随访情况" |
| | | > |
| | | <el-table-column |
| | | label="正常语音" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation1" |
| | | prop="taskSituation1" |
| | | /> |
| | | <el-table-column |
| | | label="患者拒接或拒访" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation2" |
| | | prop="taskSituation2" |
| | | /> |
| | | <el-table-column |
| | | label="面访或者接诊" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation3" |
| | | prop="taskSituation3" |
| | | /> |
| | | <el-table-column |
| | | label="微信随访" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation4" |
| | | prop="taskSituation4" |
| | | /> |
| | | <el-table-column |
| | | label="随访电话不正确" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation5" |
| | | prop="taskSituation5" |
| | | /> |
| | | <el-table-column |
| | | label="其他情况不宜随访" |
| | | align="center" |
| | | width="100" |
| | | key="taskSituation6" |
| | | prop="taskSituation6" |
| | | /> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | import { saveAs } from "file-saver"; |
| | | |
| | | export default { |
| | | name: 'FirstFollowUp', |
| | | name: "FirstFollowUp", |
| | | props: { |
| | | queryParams: { |
| | | type: Object, |
| | | required: true |
| | | required: true, |
| | | }, |
| | | flatArrayhospit: { |
| | | type: Array, |
| | | default: () => [] |
| | | default: () => [], |
| | | }, |
| | | flatArraydept: { |
| | | type: Array, |
| | | default: () => [] |
| | | default: () => [], |
| | | }, |
| | | options: { |
| | | type: Array, |
| | | default: () => [] |
| | | default: () => [], |
| | | }, |
| | | orgname: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | default: "", |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | loading: false, |
| | | expands: [], |
| | | ids: [] |
| | | } |
| | | ids: [], |
| | | patientqueryParams: { pn: 1, ps: 10 }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | | this.loading = true |
| | | this.loading = true; |
| | | const params = { |
| | | ...this.queryParams, |
| | | visitCount: 1, |
| | | leavehospitaldistrictcodes: this.queryParams.leavehospitaldistrictcodes.includes("all") |
| | | ? this.getAllWardCodes() |
| | | : this.queryParams.leavehospitaldistrictcodes, |
| | | leavehospitaldistrictcodes: |
| | | this.queryParams.leavehospitaldistrictcodes.includes("all") |
| | | ? this.getAllWardCodes() |
| | | : this.queryParams.leavehospitaldistrictcodes, |
| | | deptcodes: this.queryParams.deptcodes.includes("all") |
| | | ? this.getAllDeptCodes() |
| | | : this.queryParams.deptcodes |
| | | } |
| | | : this.queryParams.deptcodes, |
| | | }; |
| | | |
| | | delete params.leavehospitaldistrictcodes.all |
| | | delete params.deptcodes.all |
| | | delete params.leavehospitaldistrictcodes.all; |
| | | delete params.deptcodes.all; |
| | | |
| | | getSfStatistics(params) |
| | | .then(response => { |
| | | this.tableData = this.customSort(response.data) |
| | | .then((response) => { |
| | | this.tableData = this.customSort(response.data); |
| | | }) |
| | | .catch(error => { |
| | | console.error("获取首次随访数据失败:", error) |
| | | this.$message.error("获取首次随访数据失败") |
| | | .catch((error) => { |
| | | console.error("获取首次随访数据失败:", error); |
| | | this.$message.error("获取首次随访数据失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | getAllWardCodes() { |
| | | return this.flatArrayhospit |
| | | .filter(item => item.value !== 'all') |
| | | .map(item => item.value) |
| | | .filter((item) => item.value !== "all") |
| | | .map((item) => item.value); |
| | | }, |
| | | |
| | | getAllDeptCodes() { |
| | | return this.flatArraydept |
| | | .filter(item => item.value !== 'all') |
| | | .map(item => item.value) |
| | | .filter((item) => item.value !== "all") |
| | | .map((item) => item.value); |
| | | }, |
| | | |
| | | customSort(data) { |
| | | const order = [ |
| | | "一","二","三","四","五","六","七","八","九","十", |
| | | "十一","十二","十三","十四","十五","十六","十七","十八","十九","二十", |
| | | "二十一","二十二","二十三","二十四","二十五","二十六","二十七","二十八","二十九","三十", |
| | | "三十一","三十二","三十三","三十四","三十五","三十六","三十七","三十八","三十九","四十", |
| | | "四十一","四十二","四十三","四十四","四十五" |
| | | ] |
| | | "一", |
| | | "二", |
| | | "三", |
| | | "四", |
| | | "五", |
| | | "六", |
| | | "七", |
| | | "八", |
| | | "九", |
| | | "十", |
| | | "十一", |
| | | "十二", |
| | | "十三", |
| | | "十四", |
| | | "十五", |
| | | "十六", |
| | | "十七", |
| | | "十八", |
| | | "十九", |
| | | "二十", |
| | | "二十一", |
| | | "二十二", |
| | | "二十三", |
| | | "二十四", |
| | | "二十五", |
| | | "二十六", |
| | | "二十七", |
| | | "二十八", |
| | | "二十九", |
| | | "三十", |
| | | "三十一", |
| | | "三十二", |
| | | "三十三", |
| | | "三十四", |
| | | "三十五", |
| | | "三十六", |
| | | "三十七", |
| | | "三十八", |
| | | "三十九", |
| | | "四十", |
| | | "四十一", |
| | | "四十二", |
| | | "四十三", |
| | | "四十四", |
| | | "四十五", |
| | | ]; |
| | | |
| | | return data.sort((a, b) => { |
| | | const getIndex = (name) => { |
| | | if (!name || typeof name !== "string") return -1 |
| | | const chineseMatch = name.match(/^([一二三四五六七八九十]+)/) |
| | | if (!name || typeof name !== "string") return -1; |
| | | const chineseMatch = name.match(/^([一二三四五六七八九十]+)/); |
| | | if (chineseMatch && chineseMatch[1]) { |
| | | return order.indexOf(chineseMatch[1]) |
| | | return order.indexOf(chineseMatch[1]); |
| | | } |
| | | const arabicMatch = name.match(/^(\d+)/) |
| | | const arabicMatch = name.match(/^(\d+)/); |
| | | if (arabicMatch && arabicMatch[1]) { |
| | | const num = parseInt(arabicMatch[1], 10) |
| | | const num = parseInt(arabicMatch[1], 10); |
| | | if (num >= 1 && num <= 45) { |
| | | return num - 1 |
| | | return num - 1; |
| | | } |
| | | } |
| | | return -1 |
| | | } |
| | | return -1; |
| | | }; |
| | | |
| | | const indexA = getIndex(a.leavehospitaldistrictname) |
| | | const indexB = getIndex(b.leavehospitaldistrictname) |
| | | const indexA = getIndex(a.leavehospitaldistrictname); |
| | | const indexB = getIndex(b.leavehospitaldistrictname); |
| | | |
| | | if (indexA === -1 && indexB === -1) { |
| | | return (a.leavehospitaldistrictname || "").localeCompare(b.leavehospitaldistrictname || "") |
| | | return (a.leavehospitaldistrictname || "").localeCompare( |
| | | b.leavehospitaldistrictname || "" |
| | | ); |
| | | } |
| | | if (indexA === -1) return 1 |
| | | if (indexB === -1) return -1 |
| | | return indexA - indexB |
| | | }) |
| | | if (indexA === -1) return 1; |
| | | if (indexB === -1) return -1; |
| | | return indexA - indexB; |
| | | }); |
| | | }, |
| | | |
| | | sortChineseNumber(aRow, bRow) { |
| | | const a = aRow.leavehospitaldistrictname |
| | | const b = bRow.leavehospitaldistrictname |
| | | const a = aRow.leavehospitaldistrictname; |
| | | const b = bRow.leavehospitaldistrictname; |
| | | |
| | | const chineseNumMap = { |
| | | 一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9,十:10, |
| | | 十一:11,十二:12,十三:13,十四:14,十五:15,十六:16,十七:17,十八:18,十九:19,二十:20, |
| | | 二十一:21,二十二:22,二十三:23,二十四:24,二十五:25,二十六:26,二十七:27,二十八:28,二十九:29,三十:30, |
| | | 三十一:31,三十二:32,三十三:33,三十四:34,三十五:35,三十六:36,三十七:37,三十八:38,三十九:39,四十:40, |
| | | 四十一:41,四十二:42,四十三:43,四十四:44,四十五:45 |
| | | } |
| | | 一: 1, |
| | | 二: 2, |
| | | 三: 3, |
| | | 四: 4, |
| | | 五: 5, |
| | | 六: 6, |
| | | 七: 7, |
| | | 八: 8, |
| | | 九: 9, |
| | | 十: 10, |
| | | 十一: 11, |
| | | 十二: 12, |
| | | 十三: 13, |
| | | 十四: 14, |
| | | 十五: 15, |
| | | 十六: 16, |
| | | 十七: 17, |
| | | 十八: 18, |
| | | 十九: 19, |
| | | 二十: 20, |
| | | 二十一: 21, |
| | | 二十二: 22, |
| | | 二十三: 23, |
| | | 二十四: 24, |
| | | 二十五: 25, |
| | | 二十六: 26, |
| | | 二十七: 27, |
| | | 二十八: 28, |
| | | 二十九: 29, |
| | | 三十: 30, |
| | | 三十一: 31, |
| | | 三十二: 32, |
| | | 三十三: 33, |
| | | 三十四: 34, |
| | | 三十五: 35, |
| | | 三十六: 36, |
| | | 三十七: 37, |
| | | 三十八: 38, |
| | | 三十九: 39, |
| | | 四十: 40, |
| | | 四十一: 41, |
| | | 四十二: 42, |
| | | 四十三: 43, |
| | | 四十四: 44, |
| | | 四十五: 45, |
| | | }; |
| | | |
| | | const getNumberFromText = (text) => { |
| | | if (!text || typeof text !== "string") return -1 |
| | | const match = text.match(/^([一二三四五六七八九十]+)/) |
| | | if (!text || typeof text !== "string") return -1; |
| | | const match = text.match(/^([一二三四五六七八九十]+)/); |
| | | if (match && match[1]) { |
| | | const chineseNum = match[1] |
| | | return chineseNumMap[chineseNum] !== undefined ? chineseNumMap[chineseNum] : -1 |
| | | const chineseNum = match[1]; |
| | | return chineseNumMap[chineseNum] !== undefined |
| | | ? chineseNumMap[chineseNum] |
| | | : -1; |
| | | } |
| | | const arabicMatch = text.match(/^(\d+)/) |
| | | const arabicMatch = text.match(/^(\d+)/); |
| | | if (arabicMatch && arabicMatch[1]) { |
| | | const num = parseInt(arabicMatch[1], 10) |
| | | return num >= 1 && num <= 45 ? num : -1 |
| | | const num = parseInt(arabicMatch[1], 10); |
| | | return num >= 1 && num <= 45 ? num : -1; |
| | | } |
| | | return -1 |
| | | } |
| | | return -1; |
| | | }; |
| | | |
| | | const numA = getNumberFromText(a) |
| | | const numB = getNumberFromText(b) |
| | | const numA = getNumberFromText(a); |
| | | const numB = getNumberFromText(b); |
| | | |
| | | if (numA === -1 && numB === -1) { |
| | | return (a || "").localeCompare(b || "") |
| | | return (a || "").localeCompare(b || ""); |
| | | } |
| | | if (numA === -1) return 1 |
| | | if (numB === -1) return -1 |
| | | return numA - numB |
| | | if (numA === -1) return 1; |
| | | if (numB === -1) return -1; |
| | | return numA - numB; |
| | | }, |
| | | |
| | | getRowKey(row) { |
| | | return row.statisticaltype === 1 ? row.leavehospitaldistrictcode : row.deptcode |
| | | return row.statisticaltype === 1 |
| | | ? row.leavehospitaldistrictcode |
| | | : row.deptcode; |
| | | }, |
| | | |
| | | handleRowClick(row) { |
| | | if (this.expands.includes(this.getRowKey(row))) { |
| | | this.expands = [] |
| | | return |
| | | this.expands = []; |
| | | return; |
| | | } |
| | | |
| | | const params = { |
| | |
| | | : this.queryParams.deptcodes, |
| | | leavehospitaldistrictcodes: [row.leavehospitaldistrictcode], |
| | | drcode: "1", |
| | | visitCount: 1 |
| | | } |
| | | visitCount: 1, |
| | | }; |
| | | |
| | | delete params.leavehospitaldistrictcodes.all |
| | | delete params.deptcodes.all |
| | | delete params.leavehospitaldistrictcodes.all; |
| | | delete params.deptcodes.all; |
| | | |
| | | if (!row.doctorStats) { |
| | | this.loading = true |
| | | this.loading = true; |
| | | getSfStatistics(params).then((res) => { |
| | | this.$set(row, "doctorStats", res.data) |
| | | this.expands = [this.getRowKey(row)] |
| | | this.loading = false |
| | | }) |
| | | this.$set(row, "doctorStats", res.data); |
| | | this.expands = [this.getRowKey(row)]; |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.expands = [this.getRowKey(row)] |
| | | this.expands = [this.getRowKey(row)]; |
| | | } |
| | | }, |
| | | |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "合计" |
| | | return |
| | | sums[index] = "合计"; |
| | | return; |
| | | } |
| | | if (index === 1 || index === 2) { |
| | | sums[index] = "/" |
| | | return |
| | | sums[index] = "/"; |
| | | return; |
| | | } |
| | | |
| | | if (column.property === "followUpRate" || column.property === "rate") { |
| | | const percentageValues = data |
| | | .map((item) => { |
| | | const value = item[column.property] |
| | | if (!value || value === "-" || value === "0%") return null |
| | | const value = item[column.property]; |
| | | if (!value || value === "-" || value === "0%") return null; |
| | | if (typeof value === "string" && value.includes("%")) { |
| | | const numValue = parseFloat(value.replace("%", "")) / 100 |
| | | return isNaN(numValue) ? null : numValue |
| | | const numValue = parseFloat(value.replace("%", "")) / 100; |
| | | return isNaN(numValue) ? null : numValue; |
| | | } else { |
| | | const numValue = parseFloat(value) |
| | | return isNaN(numValue) ? null : numValue |
| | | const numValue = parseFloat(value); |
| | | return isNaN(numValue) ? null : numValue; |
| | | } |
| | | }) |
| | | .filter((value) => value !== null && value !== 0) |
| | | .filter((value) => value !== null && value !== 0); |
| | | |
| | | if (percentageValues.length > 0) { |
| | | const average = percentageValues.reduce((sum, value) => sum + value, 0) / percentageValues.length |
| | | sums[index] = (average * 100).toFixed(2) + "%" |
| | | const average = |
| | | percentageValues.reduce((sum, value) => sum + value, 0) / |
| | | percentageValues.length; |
| | | sums[index] = (average * 100).toFixed(2) + "%"; |
| | | } else { |
| | | sums[index] = "0.00%" |
| | | sums[index] = "0.00%"; |
| | | } |
| | | } else { |
| | | const values = data.map((item) => { |
| | | const value = item[column.property] |
| | | if (value === "-" || value === "" || value === null) return 0 |
| | | return Number(value) || 0 |
| | | }) |
| | | const value = item[column.property]; |
| | | if (value === "-" || value === "" || value === null) return 0; |
| | | return Number(value) || 0; |
| | | }); |
| | | |
| | | if (!values.every((value) => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0) |
| | | sums[index] = this.formatNumber(sums[index]) |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0); |
| | | sums[index] = this.formatNumber(sums[index]); |
| | | } else { |
| | | sums[index] = "-" |
| | | sums[index] = "-"; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | return sums |
| | | return sums; |
| | | }, |
| | | |
| | | getInnerSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "小计" |
| | | return |
| | | sums[index] = "小计"; |
| | | return; |
| | | } |
| | | |
| | | if (column.property === "drname" || column.property === "deptname") { |
| | | sums[index] = "-" |
| | | return |
| | | sums[index] = "-"; |
| | | return; |
| | | } |
| | | |
| | | if (column.property === "followUpRate" || column.property === "rate") { |
| | | const percentageValues = data |
| | | .map((item) => { |
| | | const value = item[column.property] |
| | | if (!value || value === "-" || value === "0%") return null |
| | | const value = item[column.property]; |
| | | if (!value || value === "-" || value === "0%") return null; |
| | | if (typeof value === "string" && value.includes("%")) { |
| | | const numValue = parseFloat(value.replace("%", "")) / 100 |
| | | return isNaN(numValue) ? null : numValue |
| | | const numValue = parseFloat(value.replace("%", "")) / 100; |
| | | return isNaN(numValue) ? null : numValue; |
| | | } else { |
| | | const numValue = parseFloat(value) |
| | | return isNaN(numValue) ? null : numValue |
| | | const numValue = parseFloat(value); |
| | | return isNaN(numValue) ? null : numValue; |
| | | } |
| | | }) |
| | | .filter((value) => value !== null && value !== 0) |
| | | .filter((value) => value !== null && value !== 0); |
| | | |
| | | if (percentageValues.length > 0) { |
| | | const average = percentageValues.reduce((sum, value) => sum + value, 0) / percentageValues.length |
| | | sums[index] = (average * 100).toFixed(2) + "%" |
| | | const average = |
| | | percentageValues.reduce((sum, value) => sum + value, 0) / |
| | | percentageValues.length; |
| | | sums[index] = (average * 100).toFixed(2) + "%"; |
| | | } else { |
| | | sums[index] = "0.00%" |
| | | sums[index] = "0.00%"; |
| | | } |
| | | } else { |
| | | const values = data.map((item) => { |
| | | const value = item[column.property] |
| | | if (value === "-" || value === "" || value === null) return 0 |
| | | return Number(value) || 0 |
| | | }) |
| | | const value = item[column.property]; |
| | | if (value === "-" || value === "" || value === null) return 0; |
| | | return Number(value) || 0; |
| | | }); |
| | | |
| | | if (!values.every((value) => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0) |
| | | sums[index] = this.formatNumber(sums[index]) |
| | | sums[index] = values.reduce((prev, curr) => prev + curr, 0); |
| | | sums[index] = this.formatNumber(sums[index]); |
| | | } else { |
| | | sums[index] = "-" |
| | | sums[index] = "-"; |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | return sums |
| | | return sums; |
| | | }, |
| | | |
| | | formatNumber(num) { |
| | | if (isNaN(num)) return "-" |
| | | return Number.isInteger(num) ? num.toString() : num.toFixed(0) |
| | | if (isNaN(num)) return "-"; |
| | | return Number.isInteger(num) ? num.toString() : num.toFixed(0); |
| | | }, |
| | | |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map((item) => item.tagid) |
| | | this.ids = selection.map((item) => item.tagid); |
| | | }, |
| | | |
| | | handleViewDetails(row, infoKey, titleSuffix) { |
| | | const title = `${row.leavehospitaldistrictname || row.deptname}${titleSuffix}` |
| | | this.$emit('view-details', row[infoKey], title) |
| | | const title = `${ |
| | | row.leavehospitaldistrictname || row.deptname |
| | | }${titleSuffix}`; |
| | | this.$emit("view-details", row[infoKey], title); |
| | | }, |
| | | |
| | | handleSeeDetails(row) { |
| | | this.$emit('see-details', row) |
| | | this.$emit("see-details", row); |
| | | }, |
| | | |
| | | async exportTable() { |
| | | try { |
| | | let dateRangeString = "" |
| | | let sheetNameSuffix = "" |
| | | let dateRangeString = ""; |
| | | let sheetNameSuffix = ""; |
| | | |
| | | if (this.queryParams.dateRange && this.queryParams.dateRange.length === 2) { |
| | | const startDateStr = this.queryParams.dateRange[0] |
| | | const endDateStr = this.queryParams.dateRange[1] |
| | | if ( |
| | | this.queryParams.dateRange && |
| | | this.queryParams.dateRange.length === 2 |
| | | ) { |
| | | const startDateStr = this.queryParams.dateRange[0]; |
| | | const endDateStr = this.queryParams.dateRange[1]; |
| | | const formatDateForDisplay = (dateTimeStr) => { |
| | | return dateTimeStr.split(" ")[0] |
| | | } |
| | | const startDateFormatted = formatDateForDisplay(startDateStr) |
| | | const endDateFormatted = formatDateForDisplay(endDateStr) |
| | | dateRangeString = `${startDateFormatted}至${endDateFormatted}` |
| | | sheetNameSuffix = `${startDateFormatted}至${endDateFormatted}` |
| | | return dateTimeStr.split(" ")[0]; |
| | | }; |
| | | const startDateFormatted = formatDateForDisplay(startDateStr); |
| | | const endDateFormatted = formatDateForDisplay(endDateStr); |
| | | dateRangeString = `${startDateFormatted}至${endDateFormatted}`; |
| | | sheetNameSuffix = `${startDateFormatted}至${endDateFormatted}`; |
| | | } else { |
| | | const now = new Date() |
| | | const currentMonth = now.getMonth() + 1 |
| | | dateRangeString = `${currentMonth}月` |
| | | sheetNameSuffix = `${currentMonth}月` |
| | | const now = new Date(); |
| | | const currentMonth = now.getMonth() + 1; |
| | | dateRangeString = `${currentMonth}月`; |
| | | sheetNameSuffix = `${currentMonth}月`; |
| | | } |
| | | |
| | | const excelName = `首次出院随访统计表_${dateRangeString}.xlsx` |
| | | const worksheetName = `首次随访统计_${sheetNameSuffix}` |
| | | const excelName = `首次出院随访统计表_${dateRangeString}.xlsx`; |
| | | const worksheetName = `首次随访统计_${sheetNameSuffix}`; |
| | | |
| | | if (!this.tableData || this.tableData.length === 0) { |
| | | this.$message.warning("暂无首次随访数据可导出") |
| | | return false |
| | | this.$message.warning("暂无首次随访数据可导出"); |
| | | return false; |
| | | } |
| | | |
| | | const workbook = new ExcelJS.Workbook() |
| | | const worksheet = workbook.addWorksheet(worksheetName) |
| | | const workbook = new ExcelJS.Workbook(); |
| | | const worksheet = workbook.addWorksheet(worksheetName); |
| | | |
| | | // 构建表格 |
| | | this.buildExportSheet(worksheet, sheetNameSuffix) |
| | | this.buildExportSheet(worksheet, sheetNameSuffix); |
| | | |
| | | const buffer = await workbook.xlsx.writeBuffer() |
| | | const buffer = await workbook.xlsx.writeBuffer(); |
| | | const blob = new Blob([buffer], { |
| | | type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
| | | }) |
| | | saveAs(blob, excelName) |
| | | type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
| | | }); |
| | | saveAs(blob, excelName); |
| | | |
| | | this.$message.success("导出成功") |
| | | return true |
| | | this.$message.success("导出成功"); |
| | | return true; |
| | | } catch (error) { |
| | | console.error("导出失败:", error) |
| | | this.$message.error(`导出失败: ${error.message}`) |
| | | return false |
| | | console.error("导出失败:", error); |
| | | this.$message.error(`导出失败: ${error.message}`); |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | | buildExportSheet(worksheet, sheetNameSuffix) { |
| | | const titleStyle = { |
| | | font: { name: "微软雅黑", size: 16, bold: true, color: { argb: "FF000000" } }, |
| | | fill: { type: "pattern", pattern: "solid", fgColor: { argb: "FFE6F3FF" } }, |
| | | font: { |
| | | name: "微软雅黑", |
| | | size: 16, |
| | | bold: true, |
| | | color: { argb: "FF000000" }, |
| | | }, |
| | | fill: { |
| | | type: "pattern", |
| | | pattern: "solid", |
| | | fgColor: { argb: "FFE6F3FF" }, |
| | | }, |
| | | alignment: { vertical: "middle", horizontal: "center", wrapText: true }, |
| | | border: { |
| | | top: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | left: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | bottom: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } } |
| | | } |
| | | } |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | }, |
| | | }; |
| | | |
| | | const headerStyle = { |
| | | font: { name: "微软雅黑", size: 11, bold: true, color: { argb: "FF000000" } }, |
| | | fill: { type: "pattern", pattern: "solid", fgColor: { argb: "FFF5F7FA" } }, |
| | | font: { |
| | | name: "微软雅黑", |
| | | size: 11, |
| | | bold: true, |
| | | color: { argb: "FF000000" }, |
| | | }, |
| | | fill: { |
| | | type: "pattern", |
| | | pattern: "solid", |
| | | fgColor: { argb: "FFF5F7FA" }, |
| | | }, |
| | | alignment: { vertical: "middle", horizontal: "center", wrapText: true }, |
| | | border: { |
| | | top: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | left: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | bottom: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } } |
| | | } |
| | | } |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | }, |
| | | }; |
| | | |
| | | const cellStyle = { |
| | | font: { name: "宋体", size: 10, color: { argb: "FF000000" } }, |
| | |
| | | top: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | left: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | bottom: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } } |
| | | } |
| | | } |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | }, |
| | | }; |
| | | |
| | | const summaryStyle = { |
| | | font: { name: "宋体", size: 10, bold: true, color: { argb: "FF409EFF" } }, |
| | | fill: { type: "pattern", pattern: "solid", fgColor: { argb: "FFF5F7FA" } }, |
| | | font: { |
| | | name: "宋体", |
| | | size: 10, |
| | | bold: true, |
| | | color: { argb: "FF409EFF" }, |
| | | }, |
| | | fill: { |
| | | type: "pattern", |
| | | pattern: "solid", |
| | | fgColor: { argb: "FFF5F7FA" }, |
| | | }, |
| | | alignment: { vertical: "middle", horizontal: "center" }, |
| | | border: { |
| | | top: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | left: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | bottom: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } } |
| | | } |
| | | } |
| | | right: { style: "thin", color: { argb: "FFD0D0D0" } }, |
| | | }, |
| | | }; |
| | | |
| | | // 添加标题行 |
| | | worksheet.mergeCells(1, 1, 1, 16) |
| | | const titleCell = worksheet.getCell(1, 1) |
| | | titleCell.value = `首次出院随访统计表_${sheetNameSuffix}` |
| | | titleCell.style = titleStyle |
| | | worksheet.getRow(1).height = 35 |
| | | worksheet.mergeCells(1, 1, 1, 16); |
| | | const titleCell = worksheet.getCell(1, 1); |
| | | titleCell.value = `首次出院随访统计表_${sheetNameSuffix}`; |
| | | titleCell.style = titleStyle; |
| | | worksheet.getRow(1).height = 35; |
| | | |
| | | // 表头 |
| | | const secondRowHeaders = [ |
| | | "", "出院病区", "科室", "出院人次", "无需随访人次", "应随访人次", |
| | | "需随访", "待随访", "随访成功", "随访失败", "随访率", "及时率", "人工", "短信", "微信" |
| | | ] |
| | | "", |
| | | "出院病区", |
| | | "科室", |
| | | "出院人次", |
| | | "无需随访人次", |
| | | "应随访人次", |
| | | "需随访", |
| | | "待随访", |
| | | "随访成功", |
| | | "随访失败", |
| | | "随访率", |
| | | "及时率", |
| | | "人工", |
| | | "短信", |
| | | "微信", |
| | | ]; |
| | | |
| | | secondRowHeaders.forEach((header, index) => { |
| | | const cell = worksheet.getCell(3, index + 1) |
| | | cell.value = header |
| | | cell.style = headerStyle |
| | | }) |
| | | const cell = worksheet.getCell(3, index + 1); |
| | | cell.value = header; |
| | | cell.style = headerStyle; |
| | | }); |
| | | |
| | | // 合并单元格 |
| | | for (let i = 1; i <= 6; i++) { |
| | | worksheet.mergeCells(2, i, 3, i) |
| | | const cell = worksheet.getCell(2, i) |
| | | cell.style = headerStyle |
| | | worksheet.mergeCells(2, i, 3, i); |
| | | const cell = worksheet.getCell(2, i); |
| | | cell.style = headerStyle; |
| | | } |
| | | |
| | | worksheet.getCell(2, 1).value = "" |
| | | worksheet.getCell(2, 2).value = "出院病区" |
| | | worksheet.getCell(2, 3).value = "科室" |
| | | worksheet.getCell(2, 4).value = "出院人次" |
| | | worksheet.getCell(2, 5).value = "无需随访人次" |
| | | worksheet.getCell(2, 6).value = "应随访人次" |
| | | worksheet.getCell(2, 1).value = ""; |
| | | worksheet.getCell(2, 2).value = "出院病区"; |
| | | worksheet.getCell(2, 3).value = "科室"; |
| | | worksheet.getCell(2, 4).value = "出院人次"; |
| | | worksheet.getCell(2, 5).value = "无需随访人次"; |
| | | worksheet.getCell(2, 6).value = "应随访人次"; |
| | | |
| | | worksheet.mergeCells(2, 7, 2, 15) |
| | | worksheet.getCell(2, 7).value = "首次出院随访" |
| | | worksheet.getCell(2, 7).style = headerStyle |
| | | worksheet.mergeCells(2, 7, 2, 15); |
| | | worksheet.getCell(2, 7).value = "首次出院随访"; |
| | | worksheet.getCell(2, 7).style = headerStyle; |
| | | |
| | | worksheet.getRow(2).height = 28 |
| | | worksheet.getRow(3).height = 25 |
| | | worksheet.getRow(2).height = 28; |
| | | worksheet.getRow(3).height = 25; |
| | | |
| | | // 数据行 |
| | | this.tableData.forEach((item, rowIndex) => { |
| | | const dataRow = worksheet.addRow([ |
| | | "", |
| | | item.leavehospitaldistrictname || "", |
| | | item.deptname || "", |
| | | item.dischargeCount || 0, |
| | | item.nonFollowUp || 0, |
| | | item.followUpNeeded || 0, |
| | | item.needFollowUp || 0, |
| | | item.pendingFollowUp || 0, |
| | | item.followUpSuccess || 0, |
| | | item.followUpFail || 0, |
| | | item.followUpRate || "0%", |
| | | item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%", |
| | | item.manual || 0, |
| | | item.sms || 0, |
| | | item.weChat || 0 |
| | | ], rowIndex + 4) |
| | | const dataRow = worksheet.addRow( |
| | | [ |
| | | "", |
| | | item.leavehospitaldistrictname || "", |
| | | item.deptname || "", |
| | | item.dischargeCount || 0, |
| | | item.nonFollowUp || 0, |
| | | item.followUpNeeded || 0, |
| | | item.needFollowUp || 0, |
| | | item.pendingFollowUp || 0, |
| | | item.followUpSuccess || 0, |
| | | item.followUpFail || 0, |
| | | item.followUpRate || "0%", |
| | | item.rate ? (Number(item.rate) * 100).toFixed(2) + "%" : "0%", |
| | | item.manual || 0, |
| | | item.sms || 0, |
| | | item.weChat || 0, |
| | | ], |
| | | rowIndex + 4 |
| | | ); |
| | | |
| | | dataRow.eachCell((cell) => { |
| | | cell.style = cellStyle |
| | | }) |
| | | dataRow.height = 24 |
| | | }) |
| | | cell.style = cellStyle; |
| | | }); |
| | | dataRow.height = 24; |
| | | }); |
| | | |
| | | // 合计行 |
| | | const summaries = this.getExportSummaries() |
| | | const summaryRow = worksheet.addRow(summaries) |
| | | const summaries = this.getExportSummaries(); |
| | | const summaryRow = worksheet.addRow(summaries); |
| | | summaryRow.eachCell((cell, colNumber) => { |
| | | cell.style = summaryStyle |
| | | cell.style = summaryStyle; |
| | | if (colNumber === 1) { |
| | | cell.value = "合计" |
| | | cell.value = "合计"; |
| | | } |
| | | }) |
| | | summaryRow.height = 28 |
| | | }); |
| | | summaryRow.height = 28; |
| | | |
| | | // 列宽 |
| | | worksheet.columns = [ |
| | | { width: 8 }, { width: 20 }, { width: 15 }, { width: 12 }, { width: 12 }, { width: 12 }, |
| | | { width: 10 }, { width: 10 }, { width: 10 }, { width: 10 }, { width: 12 }, { width: 12 }, |
| | | { width: 8 }, { width: 8 }, { width: 8 } |
| | | ] |
| | | { width: 8 }, |
| | | { width: 20 }, |
| | | { width: 15 }, |
| | | { width: 12 }, |
| | | { width: 12 }, |
| | | { width: 12 }, |
| | | { width: 10 }, |
| | | { width: 10 }, |
| | | { width: 10 }, |
| | | { width: 10 }, |
| | | { width: 12 }, |
| | | { width: 12 }, |
| | | { width: 8 }, |
| | | { width: 8 }, |
| | | { width: 8 }, |
| | | ]; |
| | | }, |
| | | |
| | | getExportSummaries() { |
| | | const summaries = ["合计", "/", "/", 0, 0, 0, 0, 0, 0, 0, "0%", "0%", 0, 0, 0] |
| | | const summaries = [ |
| | | "合计", |
| | | "/", |
| | | "/", |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | "0%", |
| | | "0%", |
| | | 0, |
| | | 0, |
| | | 0, |
| | | ]; |
| | | |
| | | this.tableData.forEach((item) => { |
| | | summaries[3] += Number(item.dischargeCount) || 0 |
| | | summaries[4] += Number(item.nonFollowUp) || 0 |
| | | summaries[5] += Number(item.followUpNeeded) || 0 |
| | | summaries[6] += Number(item.needFollowUp) || 0 |
| | | summaries[7] += Number(item.pendingFollowUp) || 0 |
| | | summaries[8] += Number(item.followUpSuccess) || 0 |
| | | summaries[9] += Number(item.followUpFail) || 0 |
| | | summaries[12] += Number(item.manual) || 0 |
| | | summaries[13] += Number(item.sms) || 0 |
| | | summaries[14] += Number(item.weChat) || 0 |
| | | }) |
| | | summaries[3] += Number(item.dischargeCount) || 0; |
| | | summaries[4] += Number(item.nonFollowUp) || 0; |
| | | summaries[5] += Number(item.followUpNeeded) || 0; |
| | | summaries[6] += Number(item.needFollowUp) || 0; |
| | | summaries[7] += Number(item.pendingFollowUp) || 0; |
| | | summaries[8] += Number(item.followUpSuccess) || 0; |
| | | summaries[9] += Number(item.followUpFail) || 0; |
| | | summaries[12] += Number(item.manual) || 0; |
| | | summaries[13] += Number(item.sms) || 0; |
| | | summaries[14] += Number(item.weChat) || 0; |
| | | }); |
| | | |
| | | const followUpRateValues = this.tableData |
| | | .map((item) => this.extractPercentageValue(item.followUpRate)) |
| | | .filter((value) => value !== null) |
| | | .filter((value) => value !== null); |
| | | |
| | | const rateValues = this.tableData |
| | | .map((item) => this.extractPercentageValue(item.rate)) |
| | | .filter((value) => value !== null) |
| | | .filter((value) => value !== null); |
| | | |
| | | if (followUpRateValues.length > 0) { |
| | | const avgFollowUpRate = followUpRateValues.reduce((sum, val) => sum + val, 0) / followUpRateValues.length |
| | | summaries[10] = (avgFollowUpRate * 100).toFixed(2) + "%" |
| | | const avgFollowUpRate = |
| | | followUpRateValues.reduce((sum, val) => sum + val, 0) / |
| | | followUpRateValues.length; |
| | | summaries[10] = (avgFollowUpRate * 100).toFixed(2) + "%"; |
| | | } |
| | | |
| | | if (rateValues.length > 0) { |
| | | const avgRate = rateValues.reduce((sum, val) => sum + val, 0) / rateValues.length |
| | | summaries[11] = (avgRate * 100).toFixed(2) + "%" |
| | | const avgRate = |
| | | rateValues.reduce((sum, val) => sum + val, 0) / rateValues.length; |
| | | summaries[11] = (avgRate * 100).toFixed(2) + "%"; |
| | | } |
| | | |
| | | summaries[3] = this.formatNumber(summaries[3]) |
| | | summaries[4] = this.formatNumber(summaries[4]) |
| | | summaries[5] = this.formatNumber(summaries[5]) |
| | | summaries[6] = this.formatNumber(summaries[6]) |
| | | summaries[7] = this.formatNumber(summaries[7]) |
| | | summaries[8] = this.formatNumber(summaries[8]) |
| | | summaries[9] = this.formatNumber(summaries[9]) |
| | | summaries[12] = this.formatNumber(summaries[12]) |
| | | summaries[13] = this.formatNumber(summaries[13]) |
| | | summaries[14] = this.formatNumber(summaries[14]) |
| | | summaries[3] = this.formatNumber(summaries[3]); |
| | | summaries[4] = this.formatNumber(summaries[4]); |
| | | summaries[5] = this.formatNumber(summaries[5]); |
| | | summaries[6] = this.formatNumber(summaries[6]); |
| | | summaries[7] = this.formatNumber(summaries[7]); |
| | | summaries[8] = this.formatNumber(summaries[8]); |
| | | summaries[9] = this.formatNumber(summaries[9]); |
| | | summaries[12] = this.formatNumber(summaries[12]); |
| | | summaries[13] = this.formatNumber(summaries[13]); |
| | | summaries[14] = this.formatNumber(summaries[14]); |
| | | |
| | | return summaries |
| | | return summaries; |
| | | }, |
| | | |
| | | extractPercentageValue(value) { |
| | | if (!value) return null |
| | | if (!value) return null; |
| | | if (typeof value === "string" && value.includes("%")) { |
| | | const num = parseFloat(value.replace("%", "")) |
| | | return isNaN(num) ? null : num / 100 |
| | | const num = parseFloat(value.replace("%", "")); |
| | | return isNaN(num) ? null : num / 100; |
| | | } |
| | | const num = parseFloat(value) |
| | | return isNaN(num) ? null : num |
| | | const num = parseFloat(value); |
| | | return isNaN(num) ? null : num; |
| | | }, |
| | | |
| | | selectTimelyRate(row, dateRange) { |
| | | const params = { |
| | | ...this.patientqueryParams, |
| | | starttime: this.parseTime(dateRange[0]), |
| | | endtime: this.parseTime(dateRange[1]), |
| | | deptcode: row.deptcode |
| | | } |
| | | return selectTimelyRate(params) |
| | | } |
| | | } |
| | | } |
| | | console.log(row, dateRange, 88); |
| | | |
| | | // const params = { |
| | | // ...this.patientqueryParams, |
| | | // starttime: this.parseTime(dateRange[0]), |
| | | // endtime: this.parseTime(dateRange[1]), |
| | | // deptcode: row.deptcode, |
| | | // }; |
| | | this.patientqueryParams.starttime = this.parseTime(dateRange[0]); |
| | | this.patientqueryParams.endtime = this.parseTime(dateRange[1]); |
| | | this.patientqueryParams.deptcode = row.deptcode; |
| | | return selectTimelyRate(this.patientqueryParams); |
| | | }, |
| | | selectTimelyRates(dateRange) { |
| | | this.patientqueryParams.pn = dateRange.pageNum; |
| | | this.patientqueryParams.ps = dateRange.pageSize; |
| | | |
| | | return selectTimelyRate(this.patientqueryParams); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParams.pn" |
| | | :limit.sync="queryParams.ps" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="handlePagination" |
| | | /> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | |
| | | export default { |
| | | name: 'TimelyRateDialog', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | |
| | | dicts: ['sys_yujing', 'sys_suggest'], |
| | | props: { |
| | | visible: { |
| | |
| | | queryParams: { |
| | | type: Object, |
| | | default: () => ({ |
| | | pn: 1, |
| | | ps: 10 |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | }) |
| | | } |
| | | }, |
| | |
| | | |
| | | resetQuery() { |
| | | this.localQueryParams = { |
| | | pn: 1, |
| | | ps: 10, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '', |
| | | leavediagname: '' |
| | | } |
| | |
| | | }, |
| | | |
| | | handlePagination(pagination) { |
| | | this.localQueryParams.pn = pagination.page |
| | | this.localQueryParams.ps = pagination.limit |
| | | this.localQueryParams.pageNum = pagination.page |
| | | this.localQueryParams.pageSize = pagination.limit |
| | | console.log(pagination,'pagination'); |
| | | console.log(this.localQueryParams,'this.localQueryParams'); |
| | | |
| | | this.$emit('search', this.localQueryParams) |
| | | }, |
| | | |
| | |
| | | logsheetlist: [], |
| | | Seedloading: false, |
| | | patientqueryParams: { |
| | | pn: 1, |
| | | ps: 10 |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getDeptTree() |
| | | this.loadCurrentTabData() |
| | | }, |
| | | methods: { |
| | | getDeptTree() { |
| | |
| | | }, |
| | | |
| | | Seedetailstion() { |
| | | this.$refs.firstFollowUp.selectTimelyRate(this.patientqueryParams) |
| | | console.log(this.patientqueryParams); |
| | | |
| | | this.$refs.firstFollowUp.selectTimelyRates(this.patientqueryParams) |
| | | .then(response => { |
| | | this.logsheetlist = response.data.detail |
| | | this.patienttotal = response.data.total |