区域人数统计
This commit is contained in:
parent
4975b0f093
commit
54e72cd823
10
src/api/system/dataStatisticsCount.js
Normal file
10
src/api/system/dataStatisticsCount.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询优惠券信息列表
|
||||
export function areaPatientCount(query) {
|
||||
return request({
|
||||
url: '/system/dataStatistics/areaPatientCount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
485
src/views/system/dataStatisticsCount/index.vue
Normal file
485
src/views/system/dataStatisticsCount/index.vue
Normal file
@ -0,0 +1,485 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="开始日期" prop="startDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startDate"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="排班开始日期"
|
||||
style="width: 220px"
|
||||
:picker-options="pickerStartTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<span style="color: #dcdfe6;padding:10px 10px 10px 0;">---</span>
|
||||
<el-form-item label="结束日期" prop="endDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.endDate"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="排班结束日期"
|
||||
style="width: 220px"
|
||||
:picker-options="pickerEndTime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="开始日期" prop="startDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startDate"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
style="width: 220px"
|
||||
:picker-options="pickerStartTime"
|
||||
></el-date-picker>
|
||||
<span style="color: #dcdfe6; padding: 5px">---</span>
|
||||
<el-date-picker
|
||||
v-model="queryParams.endDate"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
style="width: 220px"
|
||||
:picker-options="pickerEndTime"
|
||||
></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="所属区域" prop="parentCode">
|
||||
<el-select
|
||||
v-model="queryParams.province"
|
||||
clearable
|
||||
placeholder="请选择省"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in arealist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="province(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="queryParams.city"
|
||||
clearable
|
||||
placeholder="请选择市"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in citylist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickcity(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="queryParams.area"
|
||||
clearable
|
||||
placeholder="请选择区"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in arealists"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickarea(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="queryParams.areastreet"
|
||||
clearable
|
||||
placeholder="请选择街道"
|
||||
style="margin-left: 10px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in streetlist"
|
||||
:key="item.areaCode"
|
||||
:label="item.areaName"
|
||||
:value="item.areaCode"
|
||||
@click.native="clickstreet(item)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handleUpdate"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:hospitalDepartment:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="hospitalList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" />
|
||||
<el-table-column label="注册人数" align="center" prop="patientCount" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { areaPatientCount } from "@/api/system/dataStatisticsCount";
|
||||
import { FirstLevel, SecondaryLevelInfo } from "@/api/system/patientArchives";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
name: "Scheduling",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
arealist: [],
|
||||
citylist: [],
|
||||
arealists: [],
|
||||
streetlist: [],
|
||||
selectTableData: [],
|
||||
hospitalList: [],
|
||||
props: {
|
||||
checkStrictly: true, //是否可以选择树干节点作为选项
|
||||
lazy: true, // 是否动态加载子节点
|
||||
// lazyLoad加载动态数据的方法(仅在 lazy 为 true 时有效)
|
||||
lazyLoad: this.loadTreeNode,
|
||||
},
|
||||
|
||||
/* start 开始时间小于今天,结束时间不能大于开始时间 */
|
||||
endDisabled: {
|
||||
disabledDate: (time) => {
|
||||
if (this.queryParams.endDate) {
|
||||
return (
|
||||
time.getTime() < new Date(this.queryParams.endDate).getTime()
|
||||
);
|
||||
} else {
|
||||
return time.getTime() >= Date.now();
|
||||
}
|
||||
},
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
addopen: false,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: "",
|
||||
city:"",
|
||||
province:"",
|
||||
area:"",
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
areastreet: "",
|
||||
// areaLevel: '',
|
||||
},
|
||||
getProvincequeryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.Provincelist();
|
||||
},
|
||||
|
||||
computed: {
|
||||
pickerStartTime() {
|
||||
return {
|
||||
disabledDate: (time) => {
|
||||
if (this.queryParams.endDate) {
|
||||
let edtTime = this.queryParams.endDate.replace(/-/g, "/");
|
||||
return time.getTime() > new Date(edtTime);
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
pickerEndTime() {
|
||||
return {
|
||||
disabledDate: (time) => {
|
||||
if (this.queryParams.startDate) {
|
||||
let startTime = this.queryParams.startDate.replace(/-/g, "/");
|
||||
return time.getTime() < new Date(startTime);
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 查询省事件
|
||||
province(item) {
|
||||
this.queryParams.city = "";
|
||||
this.queryParams.area = "";
|
||||
this.queryParams.areastreet = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
// 点击市
|
||||
clickcity(item) {
|
||||
// console.log(item,'12');
|
||||
console.log(this.queryParams.area, "12");
|
||||
this.queryParams.areastreet = "";
|
||||
this.queryParams.area = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.arealists = res.data;
|
||||
});
|
||||
},
|
||||
//点击区县城
|
||||
clickarea(item) {
|
||||
console.log(item, "123");
|
||||
this.queryParams.areastreet = "";
|
||||
SecondaryLevelInfo(item.id).then((res) => {
|
||||
console.log(res);
|
||||
this.streetlist = res.data;
|
||||
});
|
||||
},
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
console.log(item, "8");
|
||||
this.queryParams.areastreet = item.areaCode;
|
||||
},
|
||||
|
||||
Provincelist() {
|
||||
FirstLevel(this.getProvincequeryParams).then((res) => {
|
||||
console.log(res);
|
||||
this.arealist = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.addopen = false;
|
||||
},
|
||||
/** 查询医生排班管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
if (this.queryParams.province) {
|
||||
this.queryParams.areaCode = this.queryParams.province;
|
||||
}
|
||||
|
||||
if (this.queryParams.city) {
|
||||
this.queryParams.areaCode = this.queryParams.city;
|
||||
}
|
||||
if (this.queryParams.area) {
|
||||
this.queryParams.areaCode = this.queryParams.area;
|
||||
}
|
||||
if (this.queryParams.areastreet) {
|
||||
this.queryParams.areaCode = this.queryParams.areastreet;
|
||||
}
|
||||
|
||||
areaPatientCount(this.queryParams).then((response) => {
|
||||
this.hospitalList = response.rows;
|
||||
// if (response.total) {
|
||||
this.total = response.total;
|
||||
// }
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
// reset() {
|
||||
// this.form = {
|
||||
// departmentId: "",
|
||||
// departmentName: "",
|
||||
// doctorId: "",
|
||||
// doctorName: "",
|
||||
// hospitalId: "",
|
||||
// hospitalName: "",
|
||||
// minutesPerPatient: "",
|
||||
// scheduleAddress: "",
|
||||
// scheduleEndDate: "",
|
||||
// scheduleId: "",
|
||||
// scheduleName: "",
|
||||
// scheduleStartDate: "",
|
||||
// status: "0",
|
||||
// };
|
||||
// this.resetForm("form");
|
||||
// },
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departmentId: "",
|
||||
departmentName: "",
|
||||
doctorId: "",
|
||||
doctorName: "",
|
||||
hospitalId: "",
|
||||
hospitalName: "",
|
||||
};
|
||||
(this.personNamelist = []),
|
||||
(this.hospitalDepartmentist = []),
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.addopen = true;
|
||||
this.title = "添加医生排班";
|
||||
},
|
||||
/** mi按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "查看明细";
|
||||
const schedulePlanId = row.id || this.ids;
|
||||
plandetail(schedulePlanId).then((response) => {
|
||||
this.hospitalDepartmentList = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
add(this.form).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.addopen = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此科室的信息?")
|
||||
.then(function () {
|
||||
return delHospitalDepartment(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/hospitalDepartment/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`hospitalDepartment_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
::v-deep .vue-treeselect__control {
|
||||
height: 32px;
|
||||
width: 250px;
|
||||
line-height: 32px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user