| | |
| | | min-width="120" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | {{ row.chosenQuantity || 0 }} |
| | | <el-button |
| | | v-if="row.chosenQuantity" |
| | | type="text" |
| | | @click="handleOptionClick(item, row)" |
| | | > |
| | | {{ row.chosenQuantity }} |
| | | </el-button> |
| | | <span v-else>0</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | > |
| | | <el-button @click="handleClose">关 闭</el-button> |
| | | </div> |
| | | |
| | | <!-- 选项下钻:患者服务列表 --> |
| | | <TopicPatientListDialog |
| | | :visible.sync="patientListVisible" |
| | | :title="patientListTitle" |
| | | :drill-params="patientDrillParams" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ExcelJS from "exceljs"; |
| | | import { saveAs } from "file-saver"; |
| | | import TopicPatientListDialog from "./TopicPatientListDialog.vue"; |
| | | |
| | | export default { |
| | | name: "TopicDialog", |
| | | components: { |
| | | TopicPatientListDialog, |
| | | }, |
| | | props: { |
| | | rowData: { |
| | | type: Object, |
| | |
| | | return { |
| | | processedTopicList: [], |
| | | orgname: "", // 新增:医院名称 |
| | | patientListVisible: false, |
| | | patientListTitle: "患者服务列表", |
| | | patientDrillParams: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | | configTitle() { |
| | | const key = this.queryParams?.configKey; |
| | | return key === "returnVisitCount" ? "复诊通知" : "满意度"; |
| | | return this.topType == 1 ? "复诊通知" : "满意度"; |
| | | }, |
| | | // 下钻接口需要的 configKey:1 复诊通知,2 满意度 |
| | | configKey() { |
| | | return this.topType == 1 ? "returnVisitCount" : "joyCount"; |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | this.processedTopicList = result; |
| | | }, |
| | | |
| | | // 点击选项“选择人数”下钻到患者服务列表 |
| | | handleOptionClick(topicItem, detail) { |
| | | if (!detail || !detail.optionText) return; |
| | | |
| | | const params = { |
| | | scriptid: topicItem.scriptid, |
| | | scriptContent: topicItem.scriptContent, |
| | | subtaskType: topicItem.subtaskType, |
| | | optionText: detail.optionText, |
| | | statisticaltype: this.queryParams.statisticaltype, |
| | | serviceType: this.queryParams.serviceType || [], |
| | | configKey: this.configKey, |
| | | }; |
| | | |
| | | // 时间范围 |
| | | if ( |
| | | this.queryParams.dateRange && |
| | | this.queryParams.dateRange.length === 2 |
| | | ) { |
| | | params.startTime = this.queryParams.dateRange[0]; |
| | | params.endTime = this.queryParams.dateRange[1]; |
| | | } |
| | | |
| | | // 统计维度 |
| | | if (this.queryParams.statisticaltype == 1) { |
| | | // 按病区 |
| | | params.deptcode = this.rowData.leavehospitaldistrictcode; |
| | | params.leavehospitaldistrictcode = |
| | | this.rowData.leavehospitaldistrictcode; |
| | | params.leavehospitaldistrictcodes = [ |
| | | this.rowData.leavehospitaldistrictcode, |
| | | ]; |
| | | } else { |
| | | // 按科室 |
| | | params.deptcode = this.rowData.deptcode; |
| | | params.deptcodes = [this.rowData.deptcode]; |
| | | } |
| | | |
| | | this.patientDrillParams = params; |
| | | this.patientListTitle = `「${detail.optionText}」患者服务列表`; |
| | | this.patientListVisible = true; |
| | | }, |
| | | |
| | | // 格式化日期范围字符串(与主页面一致) |
| | | formatDateRangeForExport() { |
| | | let dateRangeString = ""; |