From feb5a669dced68415bc7e32f237f77bf9842fe8b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 17:42:18 +0800
Subject: [PATCH] 测试完成
---
src/views/sfstatistics/percentage/index.vue | 364 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 254 insertions(+), 110 deletions(-)
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index b82a720..b924ce3 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -2,10 +2,25 @@
<div class="follow-up-statistics">
<!-- 鎼滅储琛ㄥ崟鍖哄煙 -->
<div class="search-section">
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
<el-form-item label="缁熻绫诲瀷" prop="userName">
- <el-select v-model="queryParams.statisticaltype" placeholder="璇烽�夋嫨缁熻绫诲瀷">
- <el-option v-for="item in Statisticallist" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="queryParams.statisticaltype"
+ placeholder="璇烽�夋嫨缁熻绫诲瀷"
+ >
+ <el-option
+ v-for="item in Statisticallist"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
<el-select
style="margin-left: 10px"
@@ -16,7 +31,12 @@
filterable
placeholder="璇烽�夋嫨鐥呭尯"
>
- <el-option v-for="item in flatArrayhospit" :key="item.value" :label="item.label" :value="item.value" />
+ <el-option
+ v-for="item in flatArrayhospit"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
<el-select
v-else-if="queryParams.statisticaltype == 2"
@@ -26,13 +46,27 @@
filterable
placeholder="璇烽�夋嫨绉戝"
>
- <el-option v-for="item in flatArraydept" :key="item.value" :label="item.label" :value="item.value" />
+ <el-option
+ v-for="item in flatArraydept"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
<el-form-item label="鏈嶅姟绫诲瀷" prop="userName">
- <el-select v-model="queryParams.serviceType" multiple placeholder="璇烽�夋嫨">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+ <el-select
+ v-model="queryParams.serviceType"
+ multiple
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
</el-select>
</el-form-item>
@@ -41,20 +75,44 @@
v-model="queryParams.dateRange"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
+ unlink-panels
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
:default-time="['00:00:00', '23:59:59']"
+ :picker-options="pickerOptions"
/>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="medium" @click="handleQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="medium" @click="resetQuery">閲嶇疆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
</el-form-item>
- <el-button type="warning" plain icon="el-icon-download" size="medium" @click="handleExport">瀵煎嚭</el-button>
- <el-button type="primary" plain icon="el-icon-data-line" size="medium" @click="showChartDialog">缁熻瓒嬪娍鍥�</el-button>
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-data-line"
+ size="medium"
+ @click="showChartDialog"
+ >缁熻瓒嬪娍鍥�</el-button
+ >
</el-form>
</div>
@@ -86,7 +144,11 @@
/>
</el-tab-pane>
- <el-tab-pane label="寤剁画鎶ょ悊缁熻" name="continued" v-if="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'">
+ <el-tab-pane
+ label="寤剁画鎶ょ悊缁熻"
+ name="continued"
+ v-if="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+ >
<ContinuedCare
ref="continuedCare"
:query-params="queryParams"
@@ -132,39 +194,71 @@
</template>
<script>
-import FirstFollowUp from './components/FirstFollowUp.vue'
-import SecondFollowUp from './components/SecondFollowUp.vue'
-import ContinuedCare from './components/ContinuedCare.vue'
-import ChartDialog from './components/ChartDialog.vue'
-import DetailDialog from './components/DetailDialog.vue'
-import TimelyRateDialog from './components/TimelyRateDialog.vue'
+import FirstFollowUp from "./components/FirstFollowUp.vue";
+import SecondFollowUp from "./components/SecondFollowUp.vue";
+import ContinuedCare from "./components/ContinuedCare.vue";
+import ChartDialog from "./components/ChartDialog.vue";
+import DetailDialog from "./components/DetailDialog.vue";
+import TimelyRateDialog from "./components/TimelyRateDialog.vue";
+import { getSfStatisticsHyperlink } from "@/api/AiCentre/index";
export default {
- name: 'FollowUpStatistics',
+ name: "FollowUpStatistics",
components: {
FirstFollowUp,
SecondFollowUp,
ContinuedCare,
ChartDialog,
DetailDialog,
- TimelyRateDialog
+ TimelyRateDialog,
},
data() {
return {
- activeTab: 'first',
- orgname: localStorage.getItem('orgname') || '',
+ activeTab: "first",
+ orgname: localStorage.getItem("orgname") || "",
Statisticallist: [
- { label: '鐥呭尯缁熻', value: 1 },
- { label: '绉戝缁熻', value: 2 }
+ { label: "鐥呭尯缁熻", value: 1 },
+ { label: "绉戝缁熻", value: 2 },
],
options: this.$store.getters.tasktypes,
queryParams: {
serviceType: [2],
- dateRange: [],
+ dateRange: this.getLastMonthRange(),
statisticaltype: 1,
- leavehospitaldistrictcodes: ['all'],
- deptcodes: []
+ leavehospitaldistrictcodes: ["all"],
+ deptcodes: [],
+ },
+ pickerOptions: {
+ shortcuts: [
+ {
+ text: "鏈�杩戜竴鍛�",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜竴涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ {
+ text: "鏈�杩戜笁涓湀",
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit("pick", [start, end]);
+ },
+ },
+ ],
},
flatArrayhospit: [],
flatArraydept: [],
@@ -177,21 +271,21 @@
chartData: [],
infotitleVisible: false,
SeedetailsVisible: false,
- searchName: '',
- infotitle: '',
+ searchName: "",
+ infotitle: "",
infotitlelist: [],
patienttotal: 0,
logsheetlist: [],
Seedloading: false,
patientqueryParams: {
pageNum: 1,
- pageSize: 10
- }
- }
+ pageSize: 10,
+ },
+ };
},
created() {
- this.getDeptTree()
- this.loadCurrentTabData()
+ this.getDeptTree();
+ this.loadCurrentTabData();
},
methods: {
getDeptTree() {
@@ -199,146 +293,196 @@
this.flatArraydept = this.$store.getters.belongDepts.map((dept) => {
return {
label: dept.deptName,
- value: dept.deptCode
- }
- })
- this.allDeptCodes = this.$store.getters.belongDepts.map((dept) => dept.deptCode)
+ value: dept.deptCode,
+ };
+ });
+ this.allDeptCodes = this.$store.getters.belongDepts.map(
+ (dept) => dept.deptCode
+ );
// 鐥呭尯鍒楄〃
this.flatArrayhospit = this.$store.getters.belongWards.map((ward) => {
return {
label: ward.districtName,
- value: ward.districtCode
- }
- })
- this.allWardCodes = this.$store.getters.belongWards.map((ward) => ward.districtCode)
+ value: ward.districtCode,
+ };
+ });
+ this.allWardCodes = this.$store.getters.belongWards.map(
+ (ward) => ward.districtCode
+ );
- this.flatArraydept.push({ label: '鍏ㄩ儴', value: 'all' })
- this.flatArrayhospit.push({ label: '鍏ㄩ儴', value: 'all' })
+ this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
+ this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
},
+ // 娣诲姞鑾峰彇鏈�杩戜竴涓湀鏃堕棿鑼冨洿鐨勬柟娉�
+ getLastMonthRange() {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ // 鏍煎紡鍖栦负 yyyy-MM-dd HH:mm:ss
+ const formatDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 00:00:00`;
+ };
+
+ const formatEndDate = (date) => {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day} 23:59:59`;
+ };
+
+ return [formatDate(start), formatEndDate(end)];
+ },
handleTabClick(tab) {
- this.activeTab = tab.name
- this.loadCurrentTabData()
+ this.activeTab = tab.name;
+ this.loadCurrentTabData();
},
loadCurrentTabData() {
switch (this.activeTab) {
- case 'first':
- this.$refs.firstFollowUp.loadData()
- break
- case 'second':
- this.$refs.secondFollowUp.loadData()
- break
- case 'continued':
- this.$refs.continuedCare.loadData()
- break
+ case "first":
+ this.$refs.firstFollowUp.loadData();
+ break;
+ case "second":
+ this.$refs.secondFollowUp.loadData();
+ break;
+ case "continued":
+ this.$refs.continuedCare.loadData();
+ break;
}
},
handleQuery() {
- this.queryParams.startTime = this.parseTime(this.queryParams.dateRange[0])
- this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1])
+ this.queryParams.startTime = this.parseTime(
+ this.queryParams.dateRange[0]
+ );
+ this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]);
if (this.queryParams.statisticaltype == 1) {
- this.queryParams.deptcodes = []
+ this.queryParams.deptcodes = [];
} else if (this.queryParams.statisticaltype == 2) {
- this.queryParams.leavehospitaldistrictcodes = []
+ this.queryParams.leavehospitaldistrictcodes = [];
}
- this.loadCurrentTabData()
+ this.loadCurrentTabData();
},
resetQuery() {
- this.queryParams.dateRange = []
- this.queryParams.leavehospitaldistrictcodes = []
- this.handleQuery()
+ this.queryParams.dateRange = [];
+ this.queryParams.leavehospitaldistrictcodes = [];
+ this.handleQuery();
},
async handleExport() {
switch (this.activeTab) {
- case 'first':
- await this.$refs.firstFollowUp.exportTable()
- break
- case 'second':
- await this.$refs.secondFollowUp.exportTable()
- break
- case 'continued':
- await this.$refs.continuedCare.exportTable()
- break
+ case "first":
+ await this.$refs.firstFollowUp.exportTable();
+ break;
+ case "second":
+ await this.$refs.secondFollowUp.exportTable();
+ break;
+ case "continued":
+ await this.$refs.continuedCare.exportTable();
+ break;
}
},
showChartDialog() {
- this.chartData = this.getCurrentTabData()
- this.chartDialogVisible = true
+ this.chartData = this.getCurrentTabData();
+ this.chartDialogVisible = true;
},
getCurrentTabData() {
switch (this.activeTab) {
- case 'first':
- return this.$refs.firstFollowUp.tableData
- case 'second':
- return this.$refs.secondFollowUp.tableData
- case 'continued':
- return this.$refs.continuedCare.tableData
+ case "first":
+ return this.$refs.firstFollowUp.tableData;
+ case "second":
+ return this.$refs.secondFollowUp.tableData;
+ case "continued":
+ return this.$refs.continuedCare.tableData;
default:
- return []
+ return [];
}
},
- viewDetails(row, title) {
- this.infotitle = title
- this.infotitlelist = row
- this.infotitleVisible = true
+ viewDetails(row, infoKey, title, type) {
+ this.infotitle = title;
+
+ let obj = {
+ hyperLinkInfoType: infoKey,
+ leavehospitaldistrictcodes: this.queryParams.leavehospitaldistrictcodes,
+ serviceType: this.queryParams.serviceType,
+ };
+ if (type == 1) {
+ obj.drcode = row.drcode;
+ }
+ if (this.queryParams.statisticaltype == 1) {
+ obj.leavehospitaldistrictcodes = [row.leavehospitaldistrictcode];
+ obj.deptcodes = [];
+ } else {
+ obj.deptcodes = [row.deptcode];
+ obj.leavehospitaldistrictcodes = [];
+ }
+
+ getSfStatisticsHyperlink(obj).then((response) => {
+ this.infotitlelist = response.data;
+ });
+
+ this.infotitleVisible = true;
},
Seedetails(row) {
- this.SeedetailsVisible = true
- this.Seedloading = true
+ this.SeedetailsVisible = true;
+ this.Seedloading = true;
- this.$refs.firstFollowUp.selectTimelyRate(row, this.queryParams)
- .then(response => {
- this.logsheetlist = response.data.detail
- this.patienttotal = response.data.total
- this.Seedloading = false
- })
+ this.$refs.firstFollowUp
+ .selectTimelyRate(row, this.queryParams)
+ .then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ this.Seedloading = false;
+ });
},
Seedetailstion() {
console.log(this.patientqueryParams);
- this.$refs.firstFollowUp.selectTimelyRates(this.patientqueryParams)
- .then(response => {
- this.logsheetlist = response.data.detail
- this.patienttotal = response.data.total
- })
+ this.$refs.firstFollowUp
+ .selectTimelyRates(this.patientqueryParams)
+ .then((response) => {
+ this.logsheetlist = response.data.detail;
+ this.patienttotal = response.data.total;
+ });
},
SeedetailsgGo(row) {
- this.SeedetailsVisible = false
- let type = ''
- if (row.preachformson && row.preachformson.includes('3')) {
- type = 1
+ this.SeedetailsVisible = false;
+ let type = "";
+ if (row.preachformson && row.preachformson.includes("3")) {
+ type = 1;
}
setTimeout(() => {
this.$router.push({
- path: '/followvisit/record/detailpage/',
+ path: "/followvisit/record/detailpage/",
query: {
taskid: row.taskid,
patid: row.patid,
id: row.id,
- Voicetype: type
- }
- })
- }, 300)
+ Voicetype: type,
+ },
+ });
+ }, 300);
},
handleSearch() {
// 鎼滅储閫昏緫
- }
- }
-}
+ },
+ },
+};
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3