|
|
|
@ -38,19 +38,28 @@ |
|
|
|
</el-select> --> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>开始日期:</span> |
|
|
|
<span>起止日期</span> |
|
|
|
<el-date-picker type="date" placeholder="选择开始日期" size="small" v-model="startDate" value-format="yyyy-MM-dd" |
|
|
|
editable style="width: 100px;"> |
|
|
|
</el-date-picker> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>结束日期:</span> |
|
|
|
<span> -</span> |
|
|
|
<el-date-picker type="date" placeholder="选择结束日期" size="small" v-model="endDate" value-format="yyyy-MM-dd" |
|
|
|
editable style="width: 100px;"> |
|
|
|
</el-date-picker> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span class="spanClass">体检类别:</span> |
|
|
|
<span class="spanClass">体检单位</span> |
|
|
|
<el-select v-model="customerOrgIds" placeholder="请选择体检单位" :filter-method="filterMethod" default-first-option |
|
|
|
clearable filterable style="margin-left: 10px" size="small" multiple collapse-tags> |
|
|
|
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
{{ item.displayName }} |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span class="spanClass">体检类别</span> |
|
|
|
<el-select v-model="medicalTypeIds" placeholder="请选择" clearable filterable style="width: 150px" size="small" |
|
|
|
multiple> |
|
|
|
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
@ -65,19 +74,19 @@ |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button size="small" @click="onSubmit" class="commonbutton">查询</el-button> |
|
|
|
<el-button size="small" @click="onSubmit" class="commonbutton" style="width: 60px;">查询</el-button> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button size="small" @click="handleExport" class="commonbutton">导出excel</el-button> |
|
|
|
<el-button size="small" @click="handleExport" class="commonbutton" style="width: 80px;">导出excel</el-button> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button size="small" @click="onPrint" class="commonbutton">打印</el-button> |
|
|
|
<el-button size="small" @click="onPrint" class="commonbutton" style="width: 60px;">打印</el-button> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button size="small" @click="columnarChart" class="commonbutton">柱状图</el-button> |
|
|
|
<el-button size="small" @click="columnarChart" class="commonbutton" style="width: 70px;">柱状图</el-button> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button size="small" @click="peiChart" class="commonbutton">饼图</el-button> |
|
|
|
<el-button size="small" @click="peiChart" class="commonbutton" style="width: 60px;">饼图</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style=" |
|
|
|
@ -95,7 +104,7 @@ |
|
|
|
: '' |
|
|
|
" :data="standardTableData" id="standardTableData" ref="standardTableData" style="width: 100%" |
|
|
|
:header-cell-class-name="headerStyle" :cell-style="tableRowClassName" :summary-method="getSummaries" |
|
|
|
show-summary> |
|
|
|
show-summary> |
|
|
|
<el-table-column label="科室工作量统计"> |
|
|
|
<el-table-column :label="'时间:' + startDate + '至' + endDate"> |
|
|
|
<el-table-column prop="itemTypeName" label="科室"></el-table-column> |
|
|
|
@ -211,6 +220,7 @@ import { exportToExcel } from "../../utlis/Export2Excel"; |
|
|
|
import html2canvas from "html2canvas"; |
|
|
|
import printJs from "print-js"; |
|
|
|
import { projectlist } from "@/request/commonapi"; |
|
|
|
import { deepCopy } from "../../utlis/proFunc" |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
ChartBlock, |
|
|
|
@ -221,7 +231,8 @@ export default { |
|
|
|
username: [], |
|
|
|
startDate: "", |
|
|
|
endDate: "", |
|
|
|
medicalTypeIds:[], |
|
|
|
customerOrgIds: [], |
|
|
|
medicalTypeIds: [], |
|
|
|
tableData: [], |
|
|
|
standardTableData: [], |
|
|
|
projectTableData: [], |
|
|
|
@ -236,6 +247,8 @@ export default { |
|
|
|
mergedColumnes: ["itemTypeName"], |
|
|
|
oldTableData: [], |
|
|
|
format: "0", |
|
|
|
customerOrg: [], |
|
|
|
customerOrgAll: [], |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -247,60 +260,68 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getSummaries(param) { |
|
|
|
const { columns, data } = param; |
|
|
|
const sums = []; |
|
|
|
console.log(param) |
|
|
|
let asbitemCount=0 |
|
|
|
let checkAsbitemCount=0 |
|
|
|
let avgStandardPrice=0 |
|
|
|
let avgChargePrice=0 |
|
|
|
let sumStandardPrice=0 |
|
|
|
let sumChargePrice=0 |
|
|
|
data.forEach((column, index) => { |
|
|
|
if(column.asbitemName==='合计'){ |
|
|
|
asbitemCount+=column.asbitemCount |
|
|
|
checkAsbitemCount+=column.checkAsbitemCount |
|
|
|
avgStandardPrice=(Number(avgStandardPrice) + Number(column.avgStandardPrice)).toFixed(2) |
|
|
|
avgChargePrice=(Number(avgChargePrice) + Number(column.avgChargePrice)).toFixed(2) |
|
|
|
sumStandardPrice=(Number(sumStandardPrice) + Number(column.sumStandardPrice)).toFixed(2) |
|
|
|
sumChargePrice=(Number(sumChargePrice) + Number(column.sumChargePrice)).toFixed(2) |
|
|
|
} |
|
|
|
}); |
|
|
|
columns.forEach((column, index) => { |
|
|
|
if (index === 0) { |
|
|
|
sums[index] = '总计'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 2) { |
|
|
|
sums[index] = asbitemCount+'人'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 3) { |
|
|
|
sums[index] = checkAsbitemCount+'人'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 4) { |
|
|
|
sums[index] = avgStandardPrice+'元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 5) { |
|
|
|
sums[index] = avgChargePrice+'元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 6) { |
|
|
|
sums[index] = sumStandardPrice+'元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 7) { |
|
|
|
sums[index] = sumChargePrice+'元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
getSummaries(param) { |
|
|
|
const { columns, data } = param; |
|
|
|
const sums = []; |
|
|
|
console.log(param) |
|
|
|
let asbitemCount = 0 |
|
|
|
let checkAsbitemCount = 0 |
|
|
|
let avgStandardPrice = 0 |
|
|
|
let avgChargePrice = 0 |
|
|
|
let sumStandardPrice = 0 |
|
|
|
let sumChargePrice = 0 |
|
|
|
data.forEach((column, index) => { |
|
|
|
if (column.asbitemName === '合计') { |
|
|
|
asbitemCount += column.asbitemCount |
|
|
|
checkAsbitemCount += column.checkAsbitemCount |
|
|
|
avgStandardPrice = (Number(avgStandardPrice) + Number(column.avgStandardPrice)).toFixed(2) |
|
|
|
avgChargePrice = (Number(avgChargePrice) + Number(column.avgChargePrice)).toFixed(2) |
|
|
|
sumStandardPrice = (Number(sumStandardPrice) + Number(column.sumStandardPrice)).toFixed(2) |
|
|
|
sumChargePrice = (Number(sumChargePrice) + Number(column.sumChargePrice)).toFixed(2) |
|
|
|
} |
|
|
|
}); |
|
|
|
columns.forEach((column, index) => { |
|
|
|
if (index === 0) { |
|
|
|
sums[index] = '总计'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 2) { |
|
|
|
sums[index] = asbitemCount + '人'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 3) { |
|
|
|
sums[index] = checkAsbitemCount + '人'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 4) { |
|
|
|
sums[index] = avgStandardPrice + '元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 5) { |
|
|
|
sums[index] = avgChargePrice + '元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 6) { |
|
|
|
sums[index] = sumStandardPrice + '元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
if (index === 7) { |
|
|
|
sums[index] = sumChargePrice + '元'; |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
return sums; |
|
|
|
}, |
|
|
|
return sums; |
|
|
|
}, |
|
|
|
dictInit() { |
|
|
|
//获取单位列表 |
|
|
|
getapi("/api/app/customer-org/parent-all").then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.customerOrgAll = res.data; |
|
|
|
this.customerOrg = deepCopy(this.customerOrgAll); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//体检类别 |
|
|
|
getapi("/api/app/medical-type/in-filter").then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
@ -309,6 +330,24 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 单位过滤 |
|
|
|
filterMethod(keyWords) { |
|
|
|
if (keyWords) { |
|
|
|
this.customerOrg = []; |
|
|
|
this.customerOrgAll.forEach((item) => { |
|
|
|
if ( |
|
|
|
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 || |
|
|
|
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 |
|
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
) { |
|
|
|
this.customerOrg.push(item); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.customerOrg = deepCopy(this.customerOrgAll); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
tableRowClassName({ row, column, rowIndex, columnIndex }) { |
|
|
|
if (row.asbitemName == "合计") { |
|
|
|
return { backgroundColor: "#F5F7FA" }; |
|
|
|
@ -509,7 +548,8 @@ page-break-before: avoid;}}`, // 去除页眉页脚 |
|
|
|
itemTypeId: that.username, |
|
|
|
startDate: that.startDate, |
|
|
|
endDate: that.endDate, |
|
|
|
medicalTypeIds:this.medicalTypeIds |
|
|
|
medicalTypeIds: this.medicalTypeIds, |
|
|
|
customerOrgIds:this.customerOrgIds |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.pieData = []; |
|
|
|
@ -932,7 +972,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚 |
|
|
|
itemTypeName: "", |
|
|
|
asbitemName: "合计", |
|
|
|
asbitemCount: 0, |
|
|
|
checkAsbitemCount:0, |
|
|
|
checkAsbitemCount: 0, |
|
|
|
avgStandardPrice: 0, |
|
|
|
avgChargePrice: 0, |
|
|
|
sumStandardPrice: 0, |
|
|
|
|