快速外呼页面
This commit is contained in:
parent
1132cbebe6
commit
660505e05c
10
src/api/manage/patientInfoImport.js
Normal file
10
src/api/manage/patientInfoImport.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询导入批次列表
|
||||
export function patientInfoImportBatchlist(query) {
|
||||
return request({
|
||||
url: '/manage/patientInfoimporttemp/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
314
src/views/manage/patientInfoImport/index.vue
Normal file
314
src/views/manage/patientInfoImport/index.vue
Normal file
@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<div class="app-container" ref="layout">
|
||||
<div ref="topform" class="form">
|
||||
<SearchFilter labelWidth="90px" :labelWidths="310" size="small" @search="handleQuery" patientUploadButtonVisible ="true"
|
||||
@reset="resetQuery" @minShowCtrol="getMaxTableHeight">
|
||||
<el-form-item label="导入日期" prop="" label-width="120px">
|
||||
<el-date-picker v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
style="width: 220px" value-format="yyyy-MM-dd" end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院" prop="">
|
||||
<el-select v-model="queryParams.hospitalAgencyId" filterable placeholder="请选择医院" style="width:220px" clearable
|
||||
@clear="clearhospitalAgency" @change="changehospitalAgency">
|
||||
<el-option v-for="item in hospitalAgencylist" :key="item.id" :label="item.agencyName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="院区" prop="">
|
||||
<el-select v-model="queryParams.campusAgencyId" filterable placeholder="请选择院区" style="width:220px" clearable
|
||||
@clear="clearcampusAgency" >
|
||||
<el-option v-for="item in campusAgencylist" :key="item.id" :label="item.agencyName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</SearchFilter>
|
||||
</div>
|
||||
<!-- <div ref="mb8" class="mb8">
|
||||
<el-row :gutter="10" class="">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['manage:blacklist:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:blacklist:edit']">修改</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="['manage:blacklist:remove']">删除</el-button>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['manage:blacklist:export']">导出</el-button>
|
||||
</el-col> -->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</div> -->
|
||||
<div ref="table">
|
||||
<el-table :max-height="maxTableHeight" v-loading="loading" :data="PatientInfoImportBatchlist"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="48" align="center" />
|
||||
<el-table-column label="流水号" prop="sn" width="180" align="center" />
|
||||
<el-table-column label="患者数" align="center" prop="patientCount" width="100"/>
|
||||
<el-table-column label="操作人" align="center" prop="createBy" width='120' />
|
||||
<el-table-column label="导入日期" align="center" prop="createTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:blacklist:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['manage:blacklist:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||
<myPagination v-show="total > 0" :total="total" :pageSize="queryParams.pageSize"
|
||||
:indexFromWrap="queryParams.pageNum" @updateCPage="updateCPage"></myPagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { patientInfoImportBatchlist} from "@/api/manage/patientInfoImport";
|
||||
import { selectAgencyList, getDepartmentList, getAgencyList } from "@/api/manage/selectAgencyList";
|
||||
import SearchFilter from '../../components/SearchForm.vue'
|
||||
|
||||
|
||||
export default {
|
||||
name: "Importlist",
|
||||
components: { SearchFilter },
|
||||
|
||||
data() {
|
||||
return {
|
||||
maxTableHeight: undefined,
|
||||
//医院list
|
||||
hospitalAgencylist: [],
|
||||
// 院区list
|
||||
campusAgencylist: [],
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 导入列表
|
||||
PatientInfoImportBatchlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
createTime:"",
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalAgencyId: null,
|
||||
importTimeStart: "",
|
||||
importTimeEnd: "",
|
||||
campusAgencyId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.selectAgencyinfo();
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
this.getMaxTableHeight()
|
||||
this.screenChange()
|
||||
},
|
||||
methods: {
|
||||
// 导入成功
|
||||
handleRules(){
|
||||
console.log('this.patientInfoImportList')
|
||||
this.getList()
|
||||
},
|
||||
updateCPage(index, size) {
|
||||
this.queryParams.pageNum = index
|
||||
this.queryParams.pageSize = size
|
||||
this.getList();
|
||||
},
|
||||
/** 查询 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
patientInfoImportBatchlist(this.queryParams).then(response => {
|
||||
this.PatientInfoImportBatchlist = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
campusAgencyId: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (this.createTime?.length > 0) {
|
||||
this.queryParams.importTimeStart = this.createTime[0];
|
||||
this.queryParams.importTimeEnd = this.createTime[1];
|
||||
} else {
|
||||
this.queryParams.importTimeStart = null;
|
||||
this.queryParams.importTimeEnd = null;
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
this.createTime ='';
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('manage/blacklist/export', {
|
||||
...this.queryParams
|
||||
}, `blacklist_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
//获取医院list
|
||||
selectAgencyinfo() {
|
||||
let query = {
|
||||
agencyStatus: 'ON',
|
||||
nodeType: 'HOSPITAL',
|
||||
}
|
||||
selectAgencyList(query).then(res => {
|
||||
this.hospitalAgencylist = res.data
|
||||
})
|
||||
},
|
||||
//获取下级单位
|
||||
getAgencyListinfo(nodeType, id, type) {
|
||||
let query = {
|
||||
nodeType: nodeType,
|
||||
}
|
||||
if (nodeType == 'HOSPITAL') {
|
||||
query.hospitalId = id
|
||||
} else if (nodeType == 'CAMPUS') {
|
||||
query.campusId = id
|
||||
}
|
||||
getAgencyList(query).then(res => {
|
||||
// if (type)
|
||||
console.log(nodeType );
|
||||
console.log(res.data.campusList);
|
||||
{
|
||||
if (nodeType == 'HOSPITAL') {
|
||||
this.campusAgencylist = res.data.campusList;
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//选中医院获取院区
|
||||
changehospitalAgency(id, type, typetwo) {
|
||||
this.getAgencyListinfo('HOSPITAL', id, type)
|
||||
// let query = {
|
||||
// agencyStatus: 'ON',
|
||||
// nodeType: 'CAMPUS',
|
||||
// parentId: id,
|
||||
// }
|
||||
// selectAgencyList(query).then(res => {
|
||||
if (type) {
|
||||
if (!typetwo) {
|
||||
this.form.campusAgencyId = null
|
||||
}
|
||||
} else {
|
||||
this.queryParams.campusAgencyId = null
|
||||
}
|
||||
// })
|
||||
},
|
||||
//选中院区获取科室
|
||||
changecampusAgency(id, type, typetwo) {
|
||||
this.getAgencyListinfo('CAMPUS', id, type)
|
||||
},
|
||||
//清空医院
|
||||
clearhospitalAgency(type) {
|
||||
if (type) {
|
||||
this.form.campusAgencyId = null
|
||||
this.form.departmentId = null
|
||||
this.form.wardId = null
|
||||
} else {
|
||||
this.queryParams.campusAgencyId = null
|
||||
this.queryParams.departmentId = null
|
||||
this.queryParams.wardId = null
|
||||
}
|
||||
},
|
||||
//清空院区
|
||||
clearcampusAgency(type) {
|
||||
if (type) {
|
||||
this.form.departmentId = null
|
||||
this.form.wardId = null
|
||||
this.getAgencyListinfo('HOSPITAL', this.form.hospitalAgencyId, type)
|
||||
} else {
|
||||
this.queryParams.departmentId = null
|
||||
this.queryParams.wardId = null
|
||||
this.getAgencyListinfo('HOSPITAL', this.queryParams.hospitalAgencyId)
|
||||
}
|
||||
},
|
||||
|
||||
// 获取表格最高高度
|
||||
getMaxTableHeight() {
|
||||
const windowInnerHeight = window.innerHeight // 屏幕可视高度
|
||||
const layoutDiv = this.$refs.layout
|
||||
const formDiv = this.$refs.topform
|
||||
const mb8Div = this.$refs.mb8
|
||||
this.maxTableHeight =
|
||||
windowInnerHeight - 134 -
|
||||
this.getBoxPadding(layoutDiv) -
|
||||
this.getBoxHeight(mb8Div) -
|
||||
this.getBoxHeight(formDiv)
|
||||
},
|
||||
// 屏幕resize监听
|
||||
screenChange() {
|
||||
// 屏幕resize监听事件:一旦屏幕宽高发生变化,就会执行resize
|
||||
window.addEventListener('resize', this.getMaxTableHeight, true)
|
||||
// 将屏幕监听事件移除
|
||||
// 这步是必须的。离开页面时不移除,再返回,或者进入到别的有相同元素的页面会报错
|
||||
// 或者将这里的方法直接写在beforeDestroy函数中也可以
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
window.removeEventListener('resize', this.getMaxTableHeight, true)
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user