Commit c8652e84 authored by 何鹏程's avatar 何鹏程

完成新需求开发

parent 78d76529
import request from '../util/ajax'
export function queryScreeningPageList(params) {
return request({
url: '/api/team/screening/queryScreeningPageList',
method: 'POST',
data: params
})
}
export function addOrUpdateScreeningInfo(params) {
return request({
url: '/api/team/screening/addOrUpdateScreeningInfo',
method: 'POST',
data: params
})
}
export function deleteScreeningById(params) {
return request({
url: '/api/team/screening/deleteScreeningById',
method: 'POST',
data: params
})
}
......@@ -15,6 +15,7 @@
<el-button type="primary" size="small" @click="BTNClickSearch">查询</el-button>
<el-button size="small" @click="resetForm('searchForm')">重置</el-button>
<el-button v-if="roleId==2" size="small" @click="$refs.FileInputEl.click()">导入EXCEL</el-button>
<el-button v-if="roleId==2" size="small" @click="downloadFile">模板下载</el-button>
</div>
</el-form>
<div style="display:none;">
......@@ -223,6 +224,23 @@ export default {
})
window.open(routerData.href, '_blank')
},
downloadFile() {
var a = document.createElement('a')
let href = "", fileName = ''
if (this.activeTab == '1') {
href = "/static/xls/chest.xls"
fileName = "胸痛上报模板.xls"
} else if (this.activeTab == '2') {
href = "/static/xls/stroke.xls"
fileName = "卒中上报模板.xls"
}
a.href = href
a.download = fileName
a.style.display = 'none'
document.body.appendChild(a)
a.click()
a.remove()
}
}
};
......
......@@ -14,7 +14,7 @@
>
<el-select
v-model="searchForm.area"
placeholder="请选择车辆类型"
placeholder="请选择辖区"
style="width: 100%"
:clearable="true"
>
......
......@@ -10,7 +10,7 @@
</div>
<el-row>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v1.png" alt="" />
</div>
......@@ -18,10 +18,14 @@
<div class="type-desc">胸痛中心</div>
<div class="num-desc"><span>{{dayPatients.chestCount}}</span></div>
</div>
<div class="tip type1">
<div>{{ dayPatients.nomalChestTotal }}</div>
<div>{{ dayPatients.basicChestTotal }}</div>
</div>
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v2.png" alt="" />
</div>
......@@ -29,10 +33,14 @@
<div class="type-desc">卒中中心</div>
<div class="num-desc"><span>{{dayPatients.strokeCount}}</span></div>
</div>
<div class="tip type2">
<div>{{ dayPatients.seniorStrokeTotal }}</div>
<div>{{ dayPatients.treatmentStrokeTotal }}</div>
</div>
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v3.png" alt="" />
</div>
......@@ -43,7 +51,7 @@
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v4.png" alt="" />
</div>
......@@ -65,7 +73,7 @@
</div>
<el-row>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v1.png" alt="" />
</div>
......@@ -73,10 +81,14 @@
<div class="type-desc">胸痛中心</div>
<div class="num-desc"><span>{{cumulativePatients.chestCount}}</span></div>
</div>
<div class="tip type1">
<div>{{ cumulativePatients.nomalChestTotal }}</div>
<div>{{ cumulativePatients.basicChestTotal }}</div>
</div>
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v2.png" alt="" />
</div>
......@@ -84,10 +96,14 @@
<div class="type-desc">卒中中心</div>
<div class="num-desc"><span>{{cumulativePatients.strokeCount}}</span></div>
</div>
<div class="tip type2">
<div>{{ cumulativePatients.seniorStrokeTotal }}</div>
<div>{{ cumulativePatients.treatmentStrokeTotal }}</div>
</div>
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v3.png" alt="" />
</div>
......@@ -98,7 +114,7 @@
</div>
</el-col>
<el-col :span="12" class="cont-center">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v1.png" alt="" />
</div>
......@@ -250,12 +266,20 @@ export default{
strokeCount:that.gv(p1.strokeCount,'0'),
traumaCount:that.gv(p1.traumaCount,'0'),
burnCount:that.gv(p1.burnCount,'0'),
nomalChestTotal:that.gv(p1.nomalChestTotal,'0'),
basicChestTotal:that.gv(p1.basicChestTotal,'0'),
seniorStrokeTotal:that.gv(p1.seniorStrokeTotal,'0'),
treatmentStrokeTotal:that.gv(p1.treatmentStrokeTotal,'0'),
}
that.dayPatients={
chestCount:that.gv(p2.chestCount,'0'),
strokeCount:that.gv(p2.strokeCount,'0'),
traumaCount:that.gv(p2.traumaCount,'0'),
burnCount:that.gv(p2.burnCount,'0'),
nomalChestTotal:that.gv(p2.nomalChestTotal,'0'),
basicChestTotal:that.gv(p2.basicChestTotal,'0'),
seniorStrokeTotal:that.gv(p2.seniorStrokeTotal,'0'),
treatmentStrokeTotal:that.gv(p2.treatmentStrokeTotal,'0'),
};
var kys=['chestCount','strokeCount','traumaCount','burnCount'];
var areaPreTotal=that.gv(respData.areaPreTotal,[]);
......@@ -580,36 +604,61 @@ export default{
}
}
}
.cont-center{
text-align:center;
}
.lis{
display:inline-flex;
min-width:calc( 25% - 20px );
margin-right:15px;
padding: 20px 1px 20px;
&:last-child{
margin-right:0;
}
.icon{
width:55px;
display:block;
padding-top: 6px;
width: 250px;
margin: 40px auto 0;
.icon{
width:46px;
float: left;
margin-right: 10px;
img{
display:block;
width:100%;
}
}
.txt{
float: left;
width: 60px;
font-size: 14px;
line-height: 20px;
.type-desc{
line-height: 20px;
}
.num-desc{
span{
font-size:24px;
font-weight:bold;
}
}
.txt{
padding:1px 10px;
.type-desc{
padding:4px;
}
.tip{
float: left;
width: 100px;
margin-left: 14px;
background: url('../../assets/images/tip_bg.png') no-repeat;
div{
height: 24px;
font-size: 12px;
color: #3683B8;
padding-left: 30px;
line-height: 24px;
background-repeat: no-repeat;
background-position: 2px;
background-size: 20px;
}
.num-desc{
padding: 1px 5px;
span{
font-size:24px;
font-weight:bold;
&.type1{
div:first-child{
background-image: url('../../assets/images/tip1.png');
}
div:last-child{
background-image: url('../../assets/images/tip2.png');
}
}
&.type2{
div:first-child{
background-image: url('../../assets/images/tip3.png');
}
div:last-child{
background-image: url('../../assets/images/tip4.png');
}
}
}
......
......@@ -105,7 +105,19 @@
>
<el-checkbox-group v-model="dataForm.greenCenter">
<el-checkbox label="1">胸痛中心</el-checkbox>
</el-checkbox-group>
<el-radio-group v-model="dataForm.chest" v-if="dataForm.greenCenter.indexOf('1') > -1">
<el-radio label="1">标准胸痛中心</el-radio>
<el-radio label="2">基层胸痛中心</el-radio>
</el-radio-group>
<el-checkbox-group v-model="dataForm.greenCenter">
<el-checkbox label="2">卒中中心</el-checkbox>
</el-checkbox-group>
<el-radio-group v-model="dataForm.stroke" v-if="dataForm.greenCenter.indexOf('2') > -1">
<el-radio label="3">防治卒中中心</el-radio>
<el-radio label="4">高级卒中中心</el-radio>
</el-radio-group>
<el-checkbox-group v-model="dataForm.greenCenter">
<el-checkbox label="3">创伤中心</el-checkbox>
<el-checkbox label="4">烧伤中心</el-checkbox>
<el-checkbox label="6">新生儿中心</el-checkbox>
......@@ -176,11 +188,16 @@ export default {
},
data() {
const checkGreenCenter = (rule, value, callback) => {
if (value.indexOf('1') > -1 && !(this.dataForm.chest)) {
callback(new Error('请选择胸痛二级分类'))
}
if (value.indexOf('2') > -1 && !(this.dataForm.stroke)) {
callback(new Error('请选择卒中二级分类'))
}
if (value.indexOf('5') > -1 && !(this.dataForm.other)) {
callback(new Error('若选择其他,请手动输入'))
} else {
callback()
}
callback()
}
return {
dialogVisible: false,
......@@ -194,7 +211,9 @@ export default {
hospitalStep: '',
hospitalGrade: '',
greenCenter: [],
greenInforConstruction: ''
greenInforConstruction: '',
chest: '',
stroke: ''
},
hospitalList: [],
formItemList: [],
......@@ -259,8 +278,30 @@ export default {
}
queryInfoById({ id: id }).then(res => {
if (res.msg === 201) {
this.dataForm = res.respData || {}
this.dataForm.greenCenter = res.respData.greenCenter ? res.respData.greenCenter.split(',') : []
const greenCenter = res.respData.greenCenter ? res.respData.greenCenter.split(',') : []
const greenCenterSecond = res.respData.greenCenterSecond
let chest = '' , stroke = ''
if (greenCenterSecond && greenCenterSecond.length > 0) {
if (greenCenterSecond.indexOf('1') > -1) {
chest = '1'
}
if (greenCenterSecond.indexOf('2') > -1) {
chest = '2'
}
if (greenCenterSecond.indexOf('3') > -1) {
stroke = '3'
}
if (greenCenterSecond.indexOf('4') > -1) {
stroke = '4'
}
}
this.dataForm = {
...res.respData,
chest: chest,
stroke: stroke,
greenCenter: greenCenter
}
if (res.respData && res.respData.extendValueDtoList && res.respData.extendValueDtoList.length > 0) {
this.$refs.formItem.init(res.respData.extendValueDtoList)
} else {
......@@ -277,7 +318,7 @@ export default {
})
} else {
this.dataForm = {
greenCenter: []
greenCenter: [],
}
this.$nextTick(() => {
this.loading = false
......@@ -289,10 +330,13 @@ export default {
submitForm() {
this.$refs.dataForm.validate((valid) => {
if (valid) {
const { stroke, chest, greenCenter } = this.dataForm
const greenCenterSecond = stroke + (chest ? (',' + chest) : '')
const params = {
...this.dataForm,
auditStatus: 1,
greenCenter: this.dataForm.greenCenter.join(),
greenCenter: greenCenter.join(),
greenCenterSecond:greenCenterSecond,
// hospitalName: this.$refs.hospitalCode.query
hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName,
......
......@@ -31,20 +31,6 @@
/>
</el-select>
</el-form-item>
<el-form-item
prop="greenType"
label="绿色通道"
>
<el-radio-group v-model="searchForm.greenType">
<el-radio label="">全部</el-radio>
<el-radio label="1">胸痛中心</el-radio>
<el-radio label="2">卒中中心</el-radio>
<el-radio label="3">创伤中心</el-radio>
<el-radio label="4">烧伤中心</el-radio>
<el-radio label="6">新生儿中心</el-radio>
<el-radio label="7">高危孕产妇中心</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
prop="auditStatus"
label="审核状态"
......@@ -63,6 +49,29 @@
/>
</el-select>
</el-form-item>
<el-form-item
prop="greenType"
label="绿色通道"
>
<el-cascader
placeholder="请选择绿色通道"
v-model="searchForm.greenType"
:options="options"
:show-all-levels="false"
:props="{
multiple: true
}"
style="width: 500px"
clearable></el-cascader>
<!-- <el-checkbox-group v-model="searchForm.greenType">
<el-checkbox label="1">胸痛中心</el-checkbox>
<el-checkbox label="2">卒中中心</el-checkbox>
<el-checkbox label="3">创伤中心</el-checkbox>
<el-checkbox label="4">烧伤中心</el-checkbox>
<el-checkbox label="6">新生儿中心</el-checkbox>
<el-checkbox label="7">高危孕产妇中心</el-checkbox>
</el-checkbox-group> -->
</el-form-item>
<div class="btns">
<el-button
type="primary"
......@@ -176,11 +185,33 @@ export default {
return {
searchForm: {
hospitalCode: '',
greenType: ''
greenType: []
},
hospitalList: [],
auditStatusList: [],
selectLoading: false,
options: [
{
value: '1',
label: '胸痛中心',
children: [
{ value: '1', label: '标准胸痛中心'},
{ value: '2', label: '基层胸痛中心'},
],
},
{
value: '2',
label: '卒中中心',
children: [
{ value: '3', label: '防治卒中中心'},
{ value: '4', label: '高级卒中中心'},
],
},
{ value: '3', label: '创伤中心'},
{ value: '4', label: '烧伤中心'},
{ value: '6', label: '新生儿中心'},
{ value: '7', label: '高危孕产妇中心'}
],
tableData: {
loading: false,
head: [
......@@ -254,8 +285,24 @@ export default {
methods: {
getTableData() {
this.tableData.loading = true
console.log(this.searchForm.greenType)
const { hospitalCode, auditStatus, greenType } = this.searchForm
let greenCenterSecond = [], greenTypeList = []
if (greenType && greenType.length > 0) {
greenType.forEach(i => {
greenTypeList.push(i[0])
if (i.length > 1) {
greenCenterSecond.push(i[1])
}
})
}
greenTypeList = Array.from(new Set(greenTypeList))
greenCenterSecond = Array.from(new Set(greenCenterSecond))
const params = {
...this.searchForm,
hospitalCode: hospitalCode,
auditStatus: auditStatus,
greenCenterSecond: greenCenterSecond.join(','),
greenType: greenTypeList.join(','),
pageNo: this.pageNum,
pageSize: this.pageSize
}
......
......@@ -4,40 +4,48 @@
<div class="divHeight">
<div class="w50">
<div class="type-lis-cont">
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v1.png" alt="" />
</div>
<div class="txt">
<div class="type-desc">胸痛中心</div>
<div class="num-desc"><span>{{chestTotal}}</span></div>
<div class="num-desc"><span>{{ centerSummary.chestTotal }}</span></div>
</div>
<div class="tip type1">
<div>{{ centerSummary.nomalChestTotal }}</div>
<div>{{ centerSummary.basicChestTotal }}</div>
</div>
</div>
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v2.png" alt="" />
</div>
<div class="txt">
<div class="type-desc">卒中中心</div>
<div class="num-desc"><span>{{strokeTotal}}</span></div>
<div class="num-desc"><span>{{centerSummary.strokeTotal}}</span></div>
</div>
<div class="tip type2">
<div>{{ centerSummary.seniorStrokeTotal }}</div>
<div>{{ centerSummary.treatmentStrokeTotal }}</div>
</div>
</div>
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v3.png" alt="">
</div>
<div class="txt">
<div class="type-desc">创伤中心</div>
<div class="num-desc"><span>{{traumaTotal}}</span></div>
<div class="num-desc"><span>{{centerSummary.traumaTotal}}</span></div>
</div>
</div>
<div class="lis">
<div class="lis clear">
<div class="icon">
<img src="@/assets/icon_img/v4.png" alt="">
</div>
<div class="txt">
<div class="type-desc">烧伤中心</div>
<div class="num-desc"><span>{{burnTotal}}</span></div>
<div class="num-desc"><span>{{centerSummary.burnTotal}}</span></div>
</div>
</div>
</div>
......@@ -82,10 +90,7 @@ export default{
return {
oldyear:oldYear,
newyear:year,
chestTotal:'',
strokeTotal:'',
traumaTotal:'',
burnTotal:'',
centerSummary: {},
p1itemTotal:null,
p2itemTotal:null,
addOrReduce:'1',
......@@ -148,11 +153,9 @@ export default{
gv(value,dValue){ return (value)?value:dValue },
fillServeData(respData){
var that=this;
var centerSummary=that.gv(respData.centerSummary,{});
that.chestTotal=that.gv(centerSummary.chestTotal,'');
that.strokeTotal=that.gv(centerSummary.strokeTotal,'');
that.traumaTotal=that.gv(centerSummary.traumaTotal,'');
that.burnTotal=that.gv(centerSummary.burnTotal,'');
var centerSummary=respData.centerSummary
this.centerSummary = centerSummary
that.addOrReduce=respData.addOrReduce;
that.addPercent=respData.addPercent;
that.descTxt=`同比${that.addOrReduce==1?'增长':'减少'}${that.addPercent}%`;
......@@ -570,37 +573,67 @@ export default{
font-size:14px;
}
.type-lis-cont{
display:block;
text-align: center;
position: absolute;
top: 0;
left: 0;
.lis{
display:inline-flex;
min-width:calc( 25% - 20px );
margin-right:15px;
&:last-child{
margin-right:0;
}
margin-bottom: 46px;
.icon{
width:55px;
display:block;
padding-top: 6px;
width:46px;
float: left;
margin-right: 10px;
img{
display:block;
width:100%;
}
}
.txt{
padding:1px 10px;
float: left;
width: 60px;
font-size: 14px;
line-height: 20px;
.type-desc{
padding:4px;
line-height: 20px;
}
.num-desc{
padding: 1px 5px;
span{
font-size:24px;
font-weight:bold;
}
}
}
.tip{
float: left;
width: 100px;
margin-left: 10px;
background: url('../../assets/images/tip_bg.png') no-repeat;
div{
height: 24px;
font-size: 12px;
color: #3683B8;
padding-left: 30px;
line-height: 24px;
background-repeat: no-repeat;
background-position: 2px;
background-size: 20px;
}
&.type1{
div:first-child{
background-image: url('../../assets/images/tip1.png');
}
div:last-child{
background-image: url('../../assets/images/tip2.png');
}
}
&.type2{
div:first-child{
background-image: url('../../assets/images/tip3.png');
}
div:last-child{
background-image: url('../../assets/images/tip4.png');
}
}
}
}
}
.map-cont{
......
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="544px"
@closed="closedHandler"
:close-on-click-modal="false"
>
<el-form
ref="dataForm"
:model="dataForm"
size="small"
label-width="150px"
:rules="rules"
:disabled="formDisabled"
v-loading="loading"
>
<el-form-item
label="医院名称"
prop="hospitalCode"
>
<el-select
v-model="dataForm.hospitalCode"
placeholder="请选择医院"
style="width: 100%"
filterable
remote
ref="hospitalCode"
:loading="selectLoading"
:remote-method="remoteMethod"
>
<el-option
v-for="item in hospitalList"
:label="item.hospitalName"
:key="item.id"
:value="item.hospitalCode"
/>
</el-select>
</el-form-item>
<el-form-item
label="筛查任务量"
prop="taskCount"
>
<el-input
placeholder="请输入筛查任务量"
v-model.number="dataForm.taskCount"
/>
</el-form-item>
<el-form-item
label="筛查任务完成量"
prop="taskCompleteCount"
>
<el-input
placeholder="请输入筛查任务完成量"
v-model.number="dataForm.taskCompleteCount"
/>
</el-form-item>
<el-form-item
label="完成率"
prop="completeRate"
>
<el-input
disabled
v-model.number="completeRate"
/>
</el-form-item>
<el-form-item
label="类型"
prop="secondType"
>
<el-radio-group v-model="dataForm.secondType">
<el-radio :label="1" v-if="dataForm.centerType == 1">标准版胸痛单元</el-radio>
<el-radio :label="2" v-if="dataForm.centerType == 1">基层版胸痛单元</el-radio>
<el-radio :label="3" v-if="dataForm.centerType == 2">高级卒中中心</el-radio>
<el-radio :label="4" v-if="dataForm.centerType == 2">防治卒中中心</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="医院所在区域"
prop="area"
>
<el-select
v-model="dataForm.area"
placeholder="请选择医院所在区域"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-form>
<span
slot="footer"
class="dialog-footer"
>
<el-button
size="small"
@click="dialogVisible = false"
>取 消</el-button>
<el-button
type="primary"
size="small"
:disabled="formDisabled"
@click="submitForm()"
>确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import { queryHospitalList } from '@/api/common'
import { addOrUpdateScreeningInfo } from '@/api/screenTaskStatistics'
import { getDic } from '../../../util/dict'
// 是否正整数
function isNumber(obj) {
return typeof obj === 'number' && !isNaN(obj) && obj > 0
}
export default {
computed: {
title: function() {
let str = '筛查任务'
if (this.type === 'add') {
str += '填报'
} else if (this.type === 'update') {
str += '修改'
} else if (this.type === 'detail') {
str += '详情'
}
return str
},
completeRate: function() {
const { taskCount, taskCompleteCount } = this.dataForm
if (taskCount && taskCompleteCount){
if (isNumber(taskCount) && isNumber(taskCompleteCount)){
return (Math.round(taskCompleteCount / taskCount * 10000) / 100.00)+"%";
}
}
return ''
}
},
data() {
return {
dialogVisible: false,
loading: false,
selectLoading: false,
formDisabled: false,
areaList: [],
centerType: '',
dataForm: {
hospitalCode: '',
taskCount: '',
taskCompleteCount: '',
completeRate: '',
centerType: '',
secondType: '',
area: ''
},
type: 'add',
hospitalList: [],
rules: {
hospitalCode: [
{ required: true, message: '请选择医院' },
],
taskCount: [
{ required: true, message: '请输入筛查任务量' },
{ pattern: /^[0-9]*$/, message: '请输入正确数字' }
],
taskCompleteCount: [
{ required: true, message: '请输入筛查任务完成量' },
{ pattern: /^[0-9]*$/, message: '请输入正确数字' }
]
}
}
},
mounted() {
// 获取字典
getDic(['area']).then(res => {
this.areaList = res.area
})
},
methods: {
init(type, centerType, row) {
this.dialogVisible = true
this.loading = true
this.type = type
this.formDisabled = type === 'detail'
if (type === 'update' || type === 'detail') {
if (!row) {
this.$message.error('数据错误')
return
}
this.loading = false
this.remoteMethod(row.hospitalName)
this.dataForm = {
...row,
hospitalCode: row.hospitalCode
}
this.$nextTick(() => {
this.$refs.dataForm.clearValidate()
})
} else {
this.dataForm = {
centerType: centerType
}
this.hospitalList = []
this.$nextTick(() => {
this.loading = false
this.$refs.dataForm.clearValidate()
})
}
},
submitForm() {
this.$refs.dataForm.validate((valid) => {
if (valid) {
const hospital = this.hospitalList.find(i => i.hospitalCode === this.dataForm.hospitalCode)
if (!hospital) {
this.$message.error('无效数据');
return
}
const params = {
...this.dataForm,
hospitalName: hospital.hospitalName,
completeRate: this.completeRate,
}
addOrUpdateScreeningInfo(params).then(res => {
if (res.msg === 201) {
this.dialogVisible = false
this.$message.success('保存成功')
this.$emit('subsucc')
} else {
this.$message.error(res.content)
}
})
}
})
},
remoteMethod(query) {
this.selectLoading = true;
queryHospitalList(query).then(res => {
this.hospitalList = res.respData
console.log(this.hospitalList)
this.selectLoading = false;
})
},
closedHandler() {
this.$refs.dataForm.resetFields()
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="main-page">
<div class="tab-btn">
<el-button
:class="{active:activeTab=='1'}"
@click="changeTab(1)"
>胸痛中心</el-button>
<el-button
:class="{active:activeTab=='2'}"
@click="changeTab(2)"
>卒中中心</el-button>
</div>
<div class="main-page-body">
<div class="mainContent">
<el-form
:inline="true"
:model="searchForm"
ref="searchForm"
size="small"
>
<el-form-item
prop="queryTime"
label="查询时间"
>
<el-date-picker
v-model="searchForm.queryTime"
type="year"
placeholder="请选择查询时间"
value-format="yyyy"
format="yyyy"
></el-date-picker>
</el-form-item>
<el-form-item
prop="area"
label="区域选择"
>
<el-select
v-model="searchForm.area"
placeholder="请选择区域"
style="width: 100%"
:clearable="true"
>
<el-option
label="全部"
value=""
/>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
<div class="btns">
<el-button
type="primary"
size="small"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
@click="resetForm('searchForm')"
>重置</el-button>
</div>
</el-form>
<div class="bt">
<el-button
type="primary"
size="small"
@click="showSaveDialog()"
>新增</el-button>
</div>
<table-mixin
:pageSize="pageSize"
:pageNum="pageNum"
:total="total"
:pagination="pagination"
:handleSizeChange="handleSizeChange"
:handleCurrentChange="handleCurrentChange"
>
<el-table
v-loading="tableData.loading"
:data="tableData.body"
@sort-change="handleSortChange"
>
<div
slot="empty"
class="noData"
></div>
<el-table-column
v-for="(item,index) in tableData.head"
:prop="item.key"
:label="item.name"
align="left"
:formatter="item.formatter"
:sortable="item.sortable"
:fixed="item.fixed"
:key="index"
:min-width="item.width"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="操作"
align="left"
width="auto"
min-width="150px"
>
<template slot-scope="scope">
<el-link
type="primary"
@click="showSaveDialog('detail', scope.row)"
>查看详情</el-link>
<el-link
type="primary"
@click="showSaveDialog('update', scope.row)"
>修改</el-link>
<el-link
type="primary"
@click="delHandler(scope.row.id)"
>删除</el-link>
</template>
</el-table-column>
</el-table>
</table-mixin>
<SaveDialog
ref="saveDialog"
@subsucc="search"
/>
</div>
</div>
</div>
</template>
<script>
import { tableDataMixin } from '../../common/js/mixin'
import { queryHospitalList } from '@/api/common'
import { queryScreeningPageList, deleteScreeningById } from '@/api/screenTaskStatistics'
import SaveDialog from './components/saveDialog.vue'
import { getDic } from '../../util/dict'
export default {
name: 'expertPage',
mixins: [tableDataMixin],
components: {
SaveDialog
},
data() {
return {
searchForm: {
area: '',
queryTime: new Date().getFullYear() + ''
},
areaList: [],
activeTab: '1',
hospitalList: [],
auditStatusList: [],
selectLoading: false,
tableData: {
loading: false,
head: [
{
name: '医院名称',
key: 'hospitalName',
sortable: false,
width: '200',
fixed: false
},
{
name: '所属区域',
key: 'areaStr',
sortable: false,
width: '100',
fixed: false
},
{
name: '筛查任务要求',
key: 'taskCount',
sortable: false,
width: '100',
fixed: false
},
{
name: '筛查任务完成量',
key: 'taskCompleteCount',
sortable: false,
width: '100',
fixed: false
},
{
name: '完成率',
key: 'completeRate',
sortable: false,
width: '80',
fixed: false
},
{
name: '类型',
key: 'typeStr',
sortable: false,
width: '120',
fixed: false
},
{
name: '完成量排序',
key: 'sort',
sortable: false,
width: '80',
fixed: false
}
],
body: [],
option: [],
condition: []
}
}
},
mounted() {
// 获取字典
getDic(['area']).then(res => {
this.areaList = res.area
})
this.search()
},
methods: {
changeTab(num) {
this.activeTab = num;
this.searchFormSub();
},
getTableData() {
this.tableData.loading = true
const params = {
...this.searchForm,
centerType: this.activeTab,
pageNo: this.pageNum,
pageSize: this.pageSize
}
queryScreeningPageList(params).then((res) => {
if (res.msg == 201) {
this.dealTableResponse(res)
} else {
this.$message.error(res.content)
}
})
},
showSaveDialog(type = 'add', row) {
console.log(row)
this.$refs.saveDialog.init(type, this.activeTab, row)
},
delHandler(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteScreeningById({ id: id }).then(res => {
if (res.msg === 201) {
this.$message.success(res.content)
} else {
this.$message.error(res.content)
}
this.search()
})
})
}
}
}
</script>
<style lang="scss" scoped>
.mainContent {
padding: 20px;
.bt {
margin-bottom: 16px;
}
.btns {
float: right;
}
}
.main-page {
.tab-btn {
font-size: 0;
button.el-button {
position: relative;
font-size: 14px;
border-radius: 0;
margin-left: 0;
margin-right: 0;
&.active {
border-color: #fff;
color: #3b88d9;
&:before {
content: "";
display: inline-block;
width: 10px;
height: 10px;
background-color: #3b88d9;
margin-right: 8px;
border-radius: 50%;
}
}
}
}
}
</style>
......@@ -1946,6 +1946,11 @@ compression@^1.7.3:
safe-buffer "5.1.2"
vary "~1.1.2"
comutils@^1.1.9:
version "1.1.19"
resolved "https://registry.npmmirror.com/comutils/-/comutils-1.1.19.tgz#3e07f306abf48e83726511713a72b20565034443"
integrity sha512-JxXB67juILiwhdLwOsYyjUqwWEhHdObI0EClOPk+JDtEuTbac59s0pxGpfCBnNNQ5JommifmcMGneW/4Cg7YWw==
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
......@@ -8241,6 +8246,13 @@ vue-router@^3.0.1:
resolved "https://registry.nlark.com/vue-router/download/vue-router-3.5.1.tgz?cache=0&sync_timestamp=1620899536020&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-router%2Fdownload%2Fvue-router-3.5.1.tgz#edf3cf4907952d1e0583e079237220c5ff6eb6c9"
integrity sha1-7fPPSQeVLR4Fg+B5I3Igxf9utsk=
vue-seamless-scroll@^1.1.23:
version "1.1.23"
resolved "https://registry.npmmirror.com/vue-seamless-scroll/-/vue-seamless-scroll-1.1.23.tgz#dde81b3c79aa499791b3c3bffd0fdb22ff3e59a7"
integrity sha512-HBjUub8WwsKJzbFCrwKPDrZn4e+SSbkKgwWtjKtfLwesiFGwSsVxP44/Z6d3kpXy94qIFOiflJH6l0/9pj7SGA==
dependencies:
comutils "^1.1.9"
vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
version "3.1.2"
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment