WXL (wul)
19 小时以前 3cf6f5204b0ade9aa5022d5fcecbef095c575918
测试完成
已删除8个文件
已修改6个文件
362 ■■■■■ 文件已修改
SLTD-WL.zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (2).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (3).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (4).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist.zip 补丁 | 查看 | 原始文档 | blame | 历史
jinyun.zip 补丁 | 查看 | 原始文档 | blame | 历史
lishui (2).zip 补丁 | 查看 | 原始文档 | blame | 历史
lishui.zip 补丁 | 查看 | 原始文档 | blame | 历史
package.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sltd-zs.zip 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sfstatistics/percentage/index.vue 337 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
丽水.zip 补丁 | 查看 | 原始文档 | blame | 历史
SLTD-WL.zip
Binary files differ
dist (2).zip
Binary files differ
dist (3).zip
Binary files differ
dist (4).zip
Binary files differ
dist.zip
Binary files differ
jinyun.zip
Binary files differ
lishui (2).zip
Binary files differ
lishui.zip
Binary files differ
package.json
@@ -52,6 +52,7 @@
    "dayjs": "^1.11.7",
    "echarts": "^5.4.2",
    "element-ui": "^2.15.4",
    "exceljs": "^4.4.0",
    "file-saver": "^2.0.5",
    "fuse.js": "6.4.3",
    "highlight.js": "9.18.5",
@@ -81,11 +82,13 @@
    "vue-count-to": "1.0.13",
    "vue-cropper": "0.5.5",
    "vue-meta": "2.4.0",
    "vue-print-nb": "^1.7.5",
    "vue-quill-editor": "^3.0.6",
    "vue-router": "3.4.9",
    "vuedraggable": "^2.24.3",
    "vuex": "3.6.0",
    "xlsx": "^0.18.5"
    "xlsx": "^0.18.5",
    "xlsx-js-style": "^1.2.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "4.4.6",
sltd-zs.zip
Binary files differ
src/main.js
@@ -13,6 +13,7 @@
import router from "./router";
import directive from "./directive"; // directive
import plugins from "./plugins"; // plugins
import Print from 'vue-print-nb'
import { download } from "@/utils/request";
//引入quill-editor编辑器
import VueQuillEditor from "vue-quill-editor";
@@ -21,6 +22,8 @@
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
Vue.use(VueQuillEditor);
Vue.use(Print)
// å¼•å…¥
import { codemirror } from "vue-codemirror";
import "@/utils/cm-setting.js";
src/views/followvisit/record/detailpage/index.vue
@@ -1448,7 +1448,8 @@
        {
          value: "一个月后",
          label: "一个月后",
        },   {
        },
        {
          value: "两个月后",
          label: "两个月后",
        },
@@ -1605,17 +1606,17 @@
      // æ ¹æ®é€‰æ‹©çš„随访方式计算随访日期
      if (value.includes("七天后")) {
        followupDate.setDate(dischargeDate.getDate() + 7);
      } else if (value.includes("15天后")||value.includes("半个月后")) {
      } else if (value.includes("15天后") || value.includes("半个月后")) {
        followupDate.setDate(dischargeDate.getDate() + 15);
      } else if (value.includes("一个月后")) {
        followupDate.setMonth(dischargeDate.getMonth() + 1);
      }else if (value.includes("两个月后")) {
      } else if (value.includes("两个月后")) {
        followupDate.setMonth(dischargeDate.getMonth() + 2);
      } else if (value.includes("三个月后")) {
        followupDate.setMonth(dischargeDate.getMonth() + 3);
      } else if (value.includes("六个月后")) {
        followupDate.setMonth(dischargeDate.getMonth() + 6);
      } else if (value.includes("一年后")||value.includes("12个月后")) {
      } else if (value.includes("一年后") || value.includes("12个月后")) {
        followupDate.setFullYear(dischargeDate.getFullYear() + 1);
      }
@@ -1760,7 +1761,7 @@
            }
          });
          this.Editsingletasksonyic(6);
          if (this.visitCount != 1) {
          if (this.form.isVisitAgain != 1) {
            this.Torouter();
            return;
          }
@@ -1945,7 +1946,7 @@
        param2: this.patid,
        subId: this.id,
      };
      if (this.visitCount != 1) {
      if (this.form.isVisitAgain != 1) {
        this.Torouter();
        return;
      }
@@ -2165,6 +2166,10 @@
                this.formtidy();
                this.dialogFormVisible = true;
              });
          } else {
            document.querySelector("#app").scrollTo(0, 0);
            this.formtidy();
            this.dialogFormVisible = true;
          }
        } else {
          document.querySelector("#app").scrollTo(0, 0);
src/views/sfstatistics/percentage/index.vue
@@ -113,7 +113,7 @@
                  plain
                  icon="el-icon-download"
                  size="medium"
                  @click="handleExport"
                  @click="exportTable"
                  >导出</el-button
                >
                <el-button
@@ -128,6 +128,8 @@
            </el-form>
            <div class="your-table-container">
              <el-table
                ref="exportTable"
                id="exportTableid"
                v-loading="loading"
                :data="userList"
                :border="true"
@@ -864,7 +866,10 @@
} from "@/api/system/label";
import store from "@/store";
import { getSfStatistics, selectTimelyRate } from "@/api/system/user";
import * as XLSX from "xlsx";
import FileSaver from "file-saver";
import ExcelJS from "exceljs";
import { saveAs } from "file-saver";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const shortcuts = [
@@ -1089,7 +1094,7 @@
          sums[index] = "合计";
          return;
        }
         if (index === 1||index === 2) {
        if (index === 1 || index === 2) {
          sums[index] = "/";
          return;
        }
@@ -1460,31 +1465,293 @@
        })
        .catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      const params = {
        ...this.queryParams,
        // å¦‚果选择了"全部",则传所有病区/科室代码
        leavehospitaldistrictcodes:
          this.queryParams.leavehospitaldistrictcodes.includes("all")
            ? this.allWardCodes
            : this.queryParams.leavehospitaldistrictcodes,
        deptcodes: this.queryParams.deptcodes.includes("all")
          ? this.allDeptCodes
          : this.queryParams.deptcodes,
      };
       delete params.leavehospitaldistrictcodes.all;
      delete params.deptcodes.all;
      console.log(params);
    // å¯¼å‡ºæ–¹æ³•
    // æ›¿æ¢æ‚¨åŽŸæ¥çš„ exportTable æ–¹æ³•
    async exportTable() {
      try {
        // èŽ·å–å½“å‰æ—¥æœŸ
        const now = new Date();
        // èŽ·å–å½“å‰æœˆä»½ï¼ˆæ³¨æ„æœˆä»½ä»Ž0开始,需要加1)
        const currentMonth = now.getMonth() + 1;
        // æž„建文件名
        const excelName = `${currentMonth}月出院随访统计表.xlsx`;
        // åˆ›å»ºæ–°çš„工作簿和工作表
        const workbook = new ExcelJS.Workbook();
        const worksheet = workbook.addWorksheet("随访统计");
      this.download(
        "smartor/serviceSubtask/getSfStatisticsExport",
        {
          ...params,
        },
        `user_${new Date().getTime()}.xlsx`
      );
        // å®šä¹‰æ ·å¼
        const headerStyle = {
          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" } },
          },
        };
        const cellStyle = {
          font: {
            name: "宋体",
            size: 10,
            color: { argb: "FF000000" },
          },
          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" } },
          },
        };
        const summaryStyle = {
          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" } },
          },
        };
        // 1. é¦–先,创建并设置第二行(子表头)的所有单元格
        const secondRowHeaders = [
          "", // A2 å±•开列占位(其值将由第一行合并后的主单元格决定)
          "出院病区",
          "科室",
          "出院人次",
          "无需随访人次",
          "应随访人次", // B2 to F2
          // é¦–次出院随访子表头
          "需随访",
          "待随访",
          "随访成功",
          "随访失败",
          "随访率",
          "及时率",
          "人工",
          "短信",
          "微信",
          // å†æ¬¡å‡ºé™¢éšè®¿å­è¡¨å¤´
          "需随访",
          "待随访",
          "随访成功",
          "随访失败",
          "随访率",
          "人工",
          "短信",
          "微信",
        ];
        // æ·»åŠ ç¬¬äºŒè¡Œå¹¶è®¾ç½®æ ·å¼
        secondRowHeaders.forEach((header, index) => {
          // æ³¨æ„ï¼šåˆ—索引从1开始,对应A列是1,B列是2,以此类推。
          const cell = worksheet.getCell(2, index + 1);
          cell.value = header;
          cell.style = headerStyle;
        });
        // 2. ç„¶åŽï¼Œåˆ›å»ºç¬¬ä¸€è¡Œçš„主标题单元格并设置样式,紧接着进行纵向合并
        // åˆå¹¶ A1:A2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 1, 2, 1); // åˆå¹¶ A1 åˆ° A2
        worksheet.getCell(1, 1).value = ""; // è®¾ç½®ä¸»å•元格(A1)的值
        worksheet.getCell(1, 1).style = headerStyle; // è®¾ç½®ä¸»å•元格样式
        // åˆå¹¶ B1:B2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 2, 2, 2); // åˆå¹¶ B1 åˆ° B2
        worksheet.getCell(1, 2).value = "出院病区";
        worksheet.getCell(1, 2).style = headerStyle;
        // åˆå¹¶ C1:C2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 3, 2, 3); // åˆå¹¶ C1 åˆ° C2
        worksheet.getCell(1, 3).value = "科室";
        worksheet.getCell(1, 3).style = headerStyle;
        // åˆå¹¶ D1:D2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 4, 2, 4); // åˆå¹¶ D1 åˆ° D2
        worksheet.getCell(1, 4).value = "出院人次";
        worksheet.getCell(1, 4).style = headerStyle;
        // åˆå¹¶ E1:E2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 5, 2, 5); // åˆå¹¶ E1 åˆ° E2
        worksheet.getCell(1, 5).value = "无需随访人次";
        worksheet.getCell(1, 5).style = headerStyle;
        // åˆå¹¶ F1:F2 å¹¶è®¾ç½®å€¼
        worksheet.mergeCells(1, 6, 2, 6); // åˆå¹¶ F1 åˆ° F2
        worksheet.getCell(1, 6).value = "应随访人次";
        worksheet.getCell(1, 6).style = headerStyle;
        // 3. è®¾ç½®ç¬¬ä¸€è¡Œçš„æ¨ªå‘合并标题(这些保持不变,因为只涉及第一行)
        // é¦–次出院随访(合并G1到O1)
        worksheet.mergeCells("G1:O1");
        worksheet.getCell("G1").value = "首次出院随访";
        worksheet.getCell("G1").style = headerStyle;
        // å†æ¬¡å‡ºé™¢éšè®¿ï¼ˆåˆå¹¶P1到W1)
        worksheet.mergeCells("P1:W1");
        worksheet.getCell("P1").value = "再次出院随访";
        worksheet.getCell("P1").style = headerStyle;
        // 4. è®¾ç½®è¡Œé«˜ï¼ˆå¯é€‰ï¼Œä½†å»ºè®®è®¾ç½®ï¼‰
        worksheet.getRow(1).height = 28; // ç¬¬ä¸€è¡Œè¡Œé«˜
        worksheet.getRow(2).height = 25; // ç¬¬äºŒè¡Œè¡Œé«˜
        // æ·»åŠ æ•°æ®è¡Œ
        this.userList.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,
            // å†æ¬¡å‡ºé™¢éšè®¿æ•°æ®
            item.needFollowUpAgain || 0,
            item.pendingFollowUpAgain || 0,
            item.followUpSuccessAgain || 0,
            item.followUpFailAgain || 0,
            item.followUpRateAgain || "0%",
            item.manualAgain || 0,
            item.smsAgain || 0,
            item.weChatAgain || 0,
          ]);
          // åº”用数据行样式
          dataRow.eachCell((cell) => {
            cell.style = cellStyle;
          });
          dataRow.height = 24;
        });
        // æ·»åŠ åˆè®¡è¡Œ
        const summaries = this.getSummaries({
          columns: [
            { property: "" },
            { property: "leavehospitaldistrictname" },
            { property: "deptname" },
            { property: "dischargeCount" },
            { property: "nonFollowUp" },
            { property: "followUpNeeded" },
            { property: "needFollowUp" },
            { property: "pendingFollowUp" },
            { property: "followUpSuccess" },
            { property: "followUpFail" },
            { property: "followUpRate" },
            { property: "rate" },
            { property: "manual" },
            { property: "sms" },
            { property: "weChat" },
            { property: "needFollowUpAgain" },
            { property: "pendingFollowUpAgain" },
            { property: "followUpSuccessAgain" },
            { property: "followUpFailAgain" },
            { property: "followUpRateAgain" },
            { property: "manualAgain" },
            { property: "smsAgain" },
            { property: "weChatAgain" },
          ],
          data: this.userList,
        });
        const summaryRow = worksheet.addRow(summaries);
        summaryRow.eachCell((cell, colNumber) => {
          cell.style = summaryStyle;
          // ç¬¬ä¸€åˆ—显示"合计"
          if (colNumber === 1) {
            cell.value = "合计";
          }
        });
        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: 10 },
          { width: 10 },
          { width: 10 },
          { width: 10 },
          { width: 12 },
          { width: 8 },
          { width: 8 },
          { width: 8 },
        ];
        // ç”Ÿæˆå¹¶ä¸‹è½½æ–‡ä»¶
        const buffer = await workbook.xlsx.writeBuffer();
        const blob = new Blob([buffer], {
          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        });
        saveAs(blob, excelName);
        this.$message.success("导出成功");
        return true;
      } catch (error) {
        console.error("导出失败:", error);
        this.$message.error(`导出失败: ${error.message}`);
        return false;
      }
    },
    // æ˜¾ç¤ºå›¾è¡¨å¼¹çª—
    showChartDialog() {
@@ -1946,9 +2213,21 @@
}
// ç™¾åˆ†æ¯”字段特殊样式
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRate"] .cell,
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="rate"] .cell,
.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRateAgain"] .cell {
.your-table-container
  ::v-deep
  .el-table__footer
  .el-table__cell[data-field="followUpRate"]
  .cell,
.your-table-container
  ::v-deep
  .el-table__footer
  .el-table__cell[data-field="rate"]
  .cell,
.your-table-container
  ::v-deep
  .el-table__footer
  .el-table__cell[data-field="followUpRateAgain"]
  .cell {
  color: #e6a23c !important;
  font-weight: 700 !important;
}
ÀöË®.zip
Binary files differ