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 @@ ...@@ -15,6 +15,7 @@
<el-button type="primary" size="small" @click="BTNClickSearch">查询</el-button> <el-button type="primary" size="small" @click="BTNClickSearch">查询</el-button>
<el-button size="small" @click="resetForm('searchForm')">重置</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="$refs.FileInputEl.click()">导入EXCEL</el-button>
<el-button v-if="roleId==2" size="small" @click="downloadFile">模板下载</el-button>
</div> </div>
</el-form> </el-form>
<div style="display:none;"> <div style="display:none;">
...@@ -223,6 +224,23 @@ export default { ...@@ -223,6 +224,23 @@ export default {
}) })
window.open(routerData.href, '_blank') 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 @@ ...@@ -14,7 +14,7 @@
> >
<el-select <el-select
v-model="searchForm.area" v-model="searchForm.area"
placeholder="请选择车辆类型" placeholder="请选择辖区"
style="width: 100%" style="width: 100%"
:clearable="true" :clearable="true"
> >
......
This diff is collapsed.
...@@ -105,7 +105,19 @@ ...@@ -105,7 +105,19 @@
> >
<el-checkbox-group v-model="dataForm.greenCenter"> <el-checkbox-group v-model="dataForm.greenCenter">
<el-checkbox label="1">胸痛中心</el-checkbox> <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 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="3">创伤中心</el-checkbox>
<el-checkbox label="4">烧伤中心</el-checkbox> <el-checkbox label="4">烧伤中心</el-checkbox>
<el-checkbox label="6">新生儿中心</el-checkbox> <el-checkbox label="6">新生儿中心</el-checkbox>
...@@ -176,11 +188,16 @@ export default { ...@@ -176,11 +188,16 @@ export default {
}, },
data() { data() {
const checkGreenCenter = (rule, value, callback) => { 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)) { if (value.indexOf('5') > -1 && !(this.dataForm.other)) {
callback(new Error('若选择其他,请手动输入')) callback(new Error('若选择其他,请手动输入'))
} else {
callback()
} }
callback()
} }
return { return {
dialogVisible: false, dialogVisible: false,
...@@ -194,7 +211,9 @@ export default { ...@@ -194,7 +211,9 @@ export default {
hospitalStep: '', hospitalStep: '',
hospitalGrade: '', hospitalGrade: '',
greenCenter: [], greenCenter: [],
greenInforConstruction: '' greenInforConstruction: '',
chest: '',
stroke: ''
}, },
hospitalList: [], hospitalList: [],
formItemList: [], formItemList: [],
...@@ -259,8 +278,30 @@ export default { ...@@ -259,8 +278,30 @@ export default {
} }
queryInfoById({ id: id }).then(res => { queryInfoById({ id: id }).then(res => {
if (res.msg === 201) { 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) { if (res.respData && res.respData.extendValueDtoList && res.respData.extendValueDtoList.length > 0) {
this.$refs.formItem.init(res.respData.extendValueDtoList) this.$refs.formItem.init(res.respData.extendValueDtoList)
} else { } else {
...@@ -277,7 +318,7 @@ export default { ...@@ -277,7 +318,7 @@ export default {
}) })
} else { } else {
this.dataForm = { this.dataForm = {
greenCenter: [] greenCenter: [],
} }
this.$nextTick(() => { this.$nextTick(() => {
this.loading = false this.loading = false
...@@ -289,10 +330,13 @@ export default { ...@@ -289,10 +330,13 @@ export default {
submitForm() { submitForm() {
this.$refs.dataForm.validate((valid) => { this.$refs.dataForm.validate((valid) => {
if (valid) { if (valid) {
const { stroke, chest, greenCenter } = this.dataForm
const greenCenterSecond = stroke + (chest ? (',' + chest) : '')
const params = { const params = {
...this.dataForm, ...this.dataForm,
auditStatus: 1, auditStatus: 1,
greenCenter: this.dataForm.greenCenter.join(), greenCenter: greenCenter.join(),
greenCenterSecond:greenCenterSecond,
// hospitalName: this.$refs.hospitalCode.query // hospitalName: this.$refs.hospitalCode.query
hospitalCode: this.userInfo.hospitalCode, hospitalCode: this.userInfo.hospitalCode,
hospitalName: this.userInfo.hospitalName, hospitalName: this.userInfo.hospitalName,
......
...@@ -31,20 +31,6 @@ ...@@ -31,20 +31,6 @@
/> />
</el-select> </el-select>
</el-form-item> </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 <el-form-item
prop="auditStatus" prop="auditStatus"
label="审核状态" label="审核状态"
...@@ -63,6 +49,29 @@ ...@@ -63,6 +49,29 @@
/> />
</el-select> </el-select>
</el-form-item> </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"> <div class="btns">
<el-button <el-button
type="primary" type="primary"
...@@ -176,11 +185,33 @@ export default { ...@@ -176,11 +185,33 @@ export default {
return { return {
searchForm: { searchForm: {
hospitalCode: '', hospitalCode: '',
greenType: '' greenType: []
}, },
hospitalList: [], hospitalList: [],
auditStatusList: [], auditStatusList: [],
selectLoading: false, 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: { tableData: {
loading: false, loading: false,
head: [ head: [
...@@ -254,8 +285,24 @@ export default { ...@@ -254,8 +285,24 @@ export default {
methods: { methods: {
getTableData() { getTableData() {
this.tableData.loading = true 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 = { const params = {
...this.searchForm, hospitalCode: hospitalCode,
auditStatus: auditStatus,
greenCenterSecond: greenCenterSecond.join(','),
greenType: greenTypeList.join(','),
pageNo: this.pageNum, pageNo: this.pageNum,
pageSize: this.pageSize pageSize: this.pageSize
} }
......
...@@ -4,40 +4,48 @@ ...@@ -4,40 +4,48 @@
<div class="divHeight"> <div class="divHeight">
<div class="w50"> <div class="w50">
<div class="type-lis-cont"> <div class="type-lis-cont">
<div class="lis"> <div class="lis clear">
<div class="icon"> <div class="icon">
<img src="@/assets/icon_img/v1.png" alt="" /> <img src="@/assets/icon_img/v1.png" alt="" />
</div> </div>
<div class="txt"> <div class="txt">
<div class="type-desc">胸痛中心</div> <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> </div>
<div class="lis"> <div class="lis clear">
<div class="icon"> <div class="icon">
<img src="@/assets/icon_img/v2.png" alt="" /> <img src="@/assets/icon_img/v2.png" alt="" />
</div> </div>
<div class="txt"> <div class="txt">
<div class="type-desc">卒中中心</div> <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> </div>
<div class="lis"> <div class="lis clear">
<div class="icon"> <div class="icon">
<img src="@/assets/icon_img/v3.png" alt=""> <img src="@/assets/icon_img/v3.png" alt="">
</div> </div>
<div class="txt"> <div class="txt">
<div class="type-desc">创伤中心</div> <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> </div>
<div class="lis"> <div class="lis clear">
<div class="icon"> <div class="icon">
<img src="@/assets/icon_img/v4.png" alt=""> <img src="@/assets/icon_img/v4.png" alt="">
</div> </div>
<div class="txt"> <div class="txt">
<div class="type-desc">烧伤中心</div> <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> </div>
</div> </div>
...@@ -82,10 +90,7 @@ export default{ ...@@ -82,10 +90,7 @@ export default{
return { return {
oldyear:oldYear, oldyear:oldYear,
newyear:year, newyear:year,
chestTotal:'', centerSummary: {},
strokeTotal:'',
traumaTotal:'',
burnTotal:'',
p1itemTotal:null, p1itemTotal:null,
p2itemTotal:null, p2itemTotal:null,
addOrReduce:'1', addOrReduce:'1',
...@@ -148,11 +153,9 @@ export default{ ...@@ -148,11 +153,9 @@ export default{
gv(value,dValue){ return (value)?value:dValue }, gv(value,dValue){ return (value)?value:dValue },
fillServeData(respData){ fillServeData(respData){
var that=this; var that=this;
var centerSummary=that.gv(respData.centerSummary,{}); var centerSummary=respData.centerSummary
that.chestTotal=that.gv(centerSummary.chestTotal,''); this.centerSummary = centerSummary
that.strokeTotal=that.gv(centerSummary.strokeTotal,'');
that.traumaTotal=that.gv(centerSummary.traumaTotal,'');
that.burnTotal=that.gv(centerSummary.burnTotal,'');
that.addOrReduce=respData.addOrReduce; that.addOrReduce=respData.addOrReduce;
that.addPercent=respData.addPercent; that.addPercent=respData.addPercent;
that.descTxt=`同比${that.addOrReduce==1?'增长':'减少'}${that.addPercent}%`; that.descTxt=`同比${that.addOrReduce==1?'增长':'减少'}${that.addPercent}%`;
...@@ -570,37 +573,67 @@ export default{ ...@@ -570,37 +573,67 @@ export default{
font-size:14px; font-size:14px;
} }
.type-lis-cont{ .type-lis-cont{
display:block; position: absolute;
text-align: center; top: 0;
left: 0;
.lis{ .lis{
display:inline-flex; margin-bottom: 46px;
min-width:calc( 25% - 20px );
margin-right:15px;
&:last-child{
margin-right:0;
}
.icon{ .icon{
width:55px; width:46px;
display:block; float: left;
padding-top: 6px; margin-right: 10px;
img{ img{
display:block; display:block;
width:100%; width:100%;
} }
} }
.txt{ .txt{
padding:1px 10px; float: left;
width: 60px;
font-size: 14px;
line-height: 20px;
.type-desc{ .type-desc{
padding:4px; line-height: 20px;
} }
.num-desc{ .num-desc{
padding: 1px 5px;
span{ span{
font-size:24px; font-size:24px;
font-weight:bold; 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{ .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: ...@@ -1946,6 +1946,11 @@ compression@^1.7.3:
safe-buffer "5.1.2" safe-buffer "5.1.2"
vary "~1.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: concat-map@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 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: ...@@ -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" 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= 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: vue-style-loader@^3.0.0, vue-style-loader@^3.0.1:
version "3.1.2" version "3.1.2"
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a" 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