WXL (wul)
6 天以前 25b6d3d875c1c24f70de8a06f8098b301a2790d5
src/views/sfstatistics/percentage/index.vue
@@ -185,7 +185,7 @@
                      prop="followUpNeeded"
                    >
                    </el-table-column>
                    <el-table-column align="center" label="首次出院随访">
                    <el-table-column align="center" label="首次课题随访">
                      <el-table-column
                        label="需随访"
                        align="center"
@@ -341,7 +341,7 @@
                </template>
              </el-table-column>
              <el-table-column
                label="出院病区"
                label="病区"
                align="center"
                sortable
                key="leavehospitaldistrictname"
@@ -1307,9 +1307,9 @@
      text: "随访状态分布",
      left: "center",
      textStyle: {
        color: '#333',
        fontSize: 16
      }
            color: "#333",
            fontSize: 16,
          },
    },
    tooltip: {
      trigger: "item",
@@ -1320,10 +1320,10 @@
      left: "left",
      data: ["待随访", "随访成功", "随访失败"],
      textStyle: {
        color: '#666'
      }
            color: "#666",
    },
    color: ['#FF9D4D', '#36B37E', '#FF5C5C'], // 新的配色方案
        },
        color: ["#FF9D4D", "#36B37E", "#FF5C5C"], // 新的配色方案
    series: [
      {
        name: "随访状态",
@@ -1333,41 +1333,41 @@
        itemStyle: {
          borderRadius: 10,
          borderColor: "#fff",
          borderWidth: 2
              borderWidth: 2,
        },
        label: {
          show: true,
          formatter: "{b}: {c} ({d}%)",
          color: '#333'
              color: "#333",
        },
        emphasis: {
          label: {
            show: true,
            fontSize: "18",
            fontWeight: "bold"
                fontWeight: "bold",
          },
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
                shadowColor: "rgba(0, 0, 0, 0.5)",
              },
        },
        data: [
          {
            value: followUpData.pending,
            name: "待随访"
                name: "待随访",
          },
          {
            value: followUpData.success,
            name: "随访成功"
                name: "随访成功",
          },
          {
            value: followUpData.fail,
            name: "随访失败"
          }
        ]
      }
    ]
                name: "随访失败",
              },
            ],
          },
        ],
  };
  this.pieChart.setOption(pieOption);
@@ -1399,14 +1399,14 @@
  );
  // 新增两条折线数据
 const followUpRateData = this.userList.map(item => {
      const followUpRateData = this.userList.map((item) => {
    if (!item.followUpRate) return 0;
    // 去掉百分号并转为数字
    const rateStr = String(item.followUpRate).replace('%', '');
        const rateStr = String(item.followUpRate).replace("%", "");
    return parseFloat(rateStr) || 0;
  });
  const timelyRateData = this.userList.map(item =>
      const timelyRateData = this.userList.map((item) =>
    item.rate ? (Number(item.rate) * 100).toFixed(2) : 0
  );
@@ -1415,9 +1415,9 @@
      text: "课题组/病区随访趋势",
      left: "center",
      textStyle: {
        color: '#333',
        fontSize: 16
      }
            color: "#333",
            fontSize: 16,
          },
    },
    tooltip: {
      trigger: "axis",
@@ -1432,23 +1432,23 @@
      data: ["出院人次", "应随访人次", "随访率(%)", "及时率(%)"],
      top: "bottom",
      textStyle: {
        color: '#666'
      }
            color: "#666",
    },
    color: ['#5470C6', '#91CC75', '#EE6666', '#9A60B4'], // 新增紫色用于及时率
        },
        color: ["#5470C6", "#91CC75", "#EE6666", "#9A60B4"], // 新增紫色用于及时率
    xAxis: {
      type: "category",
      data: categories,
      axisLabel: {
        interval: 0,
        rotate: 30,
        color: '#666'
            color: "#666",
      },
      axisLine: {
        lineStyle: {
          color: '#ddd'
        }
      }
              color: "#ddd",
            },
          },
    },
    yAxis: [
      {
@@ -1456,18 +1456,18 @@
        name: "人次",
        min: 0,
        axisLabel: {
          color: '#666'
              color: "#666",
        },
        axisLine: {
          lineStyle: {
            color: '#ddd'
          }
                color: "#ddd",
              },
        },
        splitLine: {
          lineStyle: {
            color: '#f0f0f0'
          }
        }
                color: "#f0f0f0",
              },
            },
      },
      {
        type: "value",
@@ -1475,18 +1475,18 @@
        min: 0,
        max: 100,
        axisLabel: {
          color: '#666',
          formatter: '{value}%'
              color: "#666",
              formatter: "{value}%",
        },
        axisLine: {
          lineStyle: {
            color: '#ddd'
          }
                color: "#ddd",
              },
        },
        splitLine: {
          show: false
        }
      }
              show: false,
            },
          },
    ],
    series: [
      {
@@ -1495,8 +1495,8 @@
        barWidth: "25%",
        data: dischargeData,
        itemStyle: {
          borderRadius: [4, 4, 0, 0]
        }
              borderRadius: [4, 4, 0, 0],
            },
      },
      {
        name: "应随访人次",
@@ -1504,8 +1504,8 @@
        barWidth: "25%",
        data: followUpData,
        itemStyle: {
          borderRadius: [4, 4, 0, 0]
        }
              borderRadius: [4, 4, 0, 0],
            },
      },
      {
        name: "随访率(%)",
@@ -1514,22 +1514,24 @@
        data: followUpRateData,
        symbolSize: 8,
        lineStyle: {
          width: 3
              width: 3,
        },
        markLine: {
          silent: true,
          data: [{
              data: [
                {
            yAxis: 80,
            lineStyle: {
              color: '#EE6666',
              type: 'dashed'
                    color: "#EE6666",
                    type: "dashed",
            },
            // label: {
            //   position: 'end',
            //   formatter: '目标80%'
            // }
          }]
        }
                },
              ],
            },
      },
      {
        name: "及时率(%)",
@@ -1539,31 +1541,33 @@
        symbolSize: 8,
        lineStyle: {
          width: 3,
          type: 'dotted' // 使用虚线区分
              type: "dotted", // 使用虚线区分
        },
        markLine: {
          silent: true,
          data: [{
              data: [
                {
            yAxis: 90,
            lineStyle: {
              color: '#9A60B4',
              type: 'dashed'
                    color: "#9A60B4",
                    type: "dashed",
            },
            // label: {
            //   position: 'end',
            //   formatter: '目标90%'
            // }
          }]
        }
      }
                },
              ],
            },
          },
    ],
    grid: {
      top: '15%',
      left: '3%',
      right: '4%',
      bottom: '15%',
      containLabel: true
    }
          top: "15%",
          left: "3%",
          right: "4%",
          bottom: "15%",
          containLabel: true,
        },
  };
  this.barLineChart.setOption(option);