|
|
|
|
@ -22,11 +22,26 @@ |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
:picker-options="datePickerOptions" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label-width="0"> |
|
|
|
|
<el-button |
|
|
|
|
v-for="shortcut in datePickerOptionsShortcuts" |
|
|
|
|
:key="shortcut.key" |
|
|
|
|
:type=" |
|
|
|
|
currentDateShortcut === shortcut.key ? 'primary' : 'default' |
|
|
|
|
" |
|
|
|
|
size="mini" |
|
|
|
|
@click="handleDateShortcut(shortcut.key)" |
|
|
|
|
class="date-shortcut-btn" |
|
|
|
|
> |
|
|
|
|
{{ shortcut.text }} |
|
|
|
|
</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="检查类型" prop="patient_type"> |
|
|
|
|
<el-select |
|
|
|
|
@ -45,6 +60,9 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<!-- 第二行 --> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="检查诊室" prop="exam_room"> |
|
|
|
|
<el-select |
|
|
|
|
@ -63,9 +81,6 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<!-- 第二行 --> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="检查部位" prop="body_text"> |
|
|
|
|
<el-input |
|
|
|
|
@ -104,6 +119,9 @@ |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<!-- 第三行 --> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="审核医生" prop="reviewer_name"> |
|
|
|
|
<el-input |
|
|
|
|
@ -114,9 +132,6 @@ |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<!-- 第三行 --> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="病例类型" prop="report_type"> |
|
|
|
|
<el-select |
|
|
|
|
@ -155,6 +170,8 @@ |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="检查结果" prop="negative"> |
|
|
|
|
<el-select |
|
|
|
|
@ -173,8 +190,6 @@ |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="15"> |
|
|
|
|
<!-- 按钮行 --> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label-width="0"> |
|
|
|
|
@ -277,7 +292,8 @@ |
|
|
|
|
type="text" |
|
|
|
|
@click="handleTimeSectionUpdate(scope.row)" |
|
|
|
|
:disabled=" |
|
|
|
|
scope.row.reporter_id != userInfo.id || ![1, 5].includes(scope.row.status) |
|
|
|
|
scope.row.reporter_id != userInfo.id || |
|
|
|
|
![1, 5].includes(scope.row.status) |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
{{ scope.row.date_time }} {{ scope.row.time_section }} |
|
|
|
|
@ -473,92 +489,16 @@ export default { |
|
|
|
|
// 查询参数 |
|
|
|
|
timeType: "date_time", |
|
|
|
|
date: [], |
|
|
|
|
datePickerOptions: { |
|
|
|
|
shortcuts: [ |
|
|
|
|
{ |
|
|
|
|
text: "今天", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date(); |
|
|
|
|
const start = new Date(); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: "昨天", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date(); |
|
|
|
|
end.setTime(end.getTime() - 3600 * 1000 * 24); |
|
|
|
|
const start = new Date(end); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: "本周", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date(); |
|
|
|
|
const start = new Date(); |
|
|
|
|
const day = start.getDay(); |
|
|
|
|
start.setDate(start.getDate() - day + (day === 0 ? -6 : 1)); |
|
|
|
|
// 设置结束日期为本周最后一天(周日) |
|
|
|
|
end.setDate(start.getDate() + 6); |
|
|
|
|
end.setHours(23, 59, 59, 999); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: "本月", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth() + 1, |
|
|
|
|
0, |
|
|
|
|
23, |
|
|
|
|
59, |
|
|
|
|
59, |
|
|
|
|
999 |
|
|
|
|
); |
|
|
|
|
const start = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth(), |
|
|
|
|
1 |
|
|
|
|
); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: "上月", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth(), |
|
|
|
|
0 |
|
|
|
|
); |
|
|
|
|
const start = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth() - 1, |
|
|
|
|
1 |
|
|
|
|
); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
text: "今年", |
|
|
|
|
onClick: (picker) => { |
|
|
|
|
const end = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
11, |
|
|
|
|
31, |
|
|
|
|
23, |
|
|
|
|
59, |
|
|
|
|
59, |
|
|
|
|
999 |
|
|
|
|
); |
|
|
|
|
const start = new Date(new Date().getFullYear(), 0, 1); |
|
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
// 快捷日期选项 |
|
|
|
|
datePickerOptionsShortcuts: [ |
|
|
|
|
{ text: "今天", key: "today" }, |
|
|
|
|
{ text: "昨天", key: "yesterday" }, |
|
|
|
|
{ text: "本周", key: "week" }, |
|
|
|
|
{ text: "本月", key: "month" }, |
|
|
|
|
{ text: "上月", key: "lastMonth" }, |
|
|
|
|
{ text: "今年", key: "year" }, |
|
|
|
|
], |
|
|
|
|
currentDateShortcut: "", |
|
|
|
|
queryParams: { |
|
|
|
|
page: 1, |
|
|
|
|
size: 10, |
|
|
|
|
@ -590,6 +530,56 @@ export default { |
|
|
|
|
this.initDataDictionaries(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 快捷日期选择处理 |
|
|
|
|
handleDateShortcut(key) { |
|
|
|
|
let start = new Date(); |
|
|
|
|
let end = new Date(); |
|
|
|
|
switch (key) { |
|
|
|
|
case "today": |
|
|
|
|
break; |
|
|
|
|
case "yesterday": |
|
|
|
|
end.setTime(end.getTime() - 3600 * 1000 * 24); |
|
|
|
|
start = new Date(end); |
|
|
|
|
break; |
|
|
|
|
case "week": |
|
|
|
|
const day = start.getDay(); |
|
|
|
|
start.setDate(start.getDate() - day + (day === 0 ? -6 : 1)); |
|
|
|
|
// 设置结束日期为本周最后一天(周日) |
|
|
|
|
end.setDate(start.getDate() + 6); |
|
|
|
|
end.setHours(23, 59, 59, 999); |
|
|
|
|
break; |
|
|
|
|
case "month": |
|
|
|
|
end = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth() + 1, |
|
|
|
|
0, |
|
|
|
|
23, |
|
|
|
|
59, |
|
|
|
|
59, |
|
|
|
|
999 |
|
|
|
|
); |
|
|
|
|
start = new Date(new Date().getFullYear(), new Date().getMonth(), 1); |
|
|
|
|
break; |
|
|
|
|
case "lastMonth": |
|
|
|
|
end = new Date(new Date().getFullYear(), new Date().getMonth(), 0); |
|
|
|
|
start = new Date( |
|
|
|
|
new Date().getFullYear(), |
|
|
|
|
new Date().getMonth() - 1, |
|
|
|
|
1 |
|
|
|
|
); |
|
|
|
|
break; |
|
|
|
|
case "year": |
|
|
|
|
end = new Date(new Date().getFullYear(), 11, 31, 23, 59, 59, 999); |
|
|
|
|
start = new Date(new Date().getFullYear(), 0, 1); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.date = [start, end]; |
|
|
|
|
this.currentDateShortcut = key; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 初始化数据字典 |
|
|
|
|
initDataDictionaries() { |
|
|
|
|
this.loadExamRooms(); |
|
|
|
|
@ -642,9 +632,9 @@ export default { |
|
|
|
|
// 重置按钮操作 |
|
|
|
|
resetQuery() { |
|
|
|
|
this.resetForm("queryForm"); |
|
|
|
|
const today = new Date().toISOString().split("T")[0]; |
|
|
|
|
this.timeType = "date_time"; |
|
|
|
|
this.date = [today, today]; |
|
|
|
|
this.currentDateShortcut = "today"; |
|
|
|
|
this.handleDateShortcut(this.currentDateShortcut); |
|
|
|
|
this.queryParams.patient_type = this.patientTypeList[0].value; |
|
|
|
|
// this.queryParams.report_type = this.reportTypeList[0].value; |
|
|
|
|
this.handleQuery(); |
|
|
|
|
|