Commit 7902f2ca authored by miaojiale's avatar miaojiale

审核报表

parent 8a7f01ff
import request from "@/utils/request"
/* 质控报表 */
// 审核员列表
export function checkerQuality(params = {}) {
return request({
url: "/disease-data/data/report/checker/quality",
method: "get",
params,
})
}
// 管理员列表
export function adminQuality(params = {}) {
return request({
url: "/disease-data/data/report/admin/quality",
method: "get",
params,
})
}
......@@ -572,10 +572,13 @@ export default {
display: flex;
justify-content: space-between;
.right {
display: flex;
align-items: center;
.btn {
width: 80px;
height: 32px;
border-radius: 4px;
margin-top: 0px;
}
}
}
......
......@@ -4,7 +4,9 @@
<div class="audit-detail_header p-24">
<div class="left">
<span>当前审核</span>
<span class="f-b">{{medicalCombination}}】【剩余{{mcCount}}</span>
<span class="f-b"
>{{ medicalCombination }}】【剩余{{ mcCount }}</span
>
</div>
<div class="right">
<el-button class="btn" @click="$router.go(-1)">返回</el-button>
......@@ -24,7 +26,8 @@
class="p-btn"
size="medium"
@click="showDialog(item.value)"
>{{ item.text }}</el-button>
>{{ item.text }}</el-button
>
<span v-if="editStatus" class="op">驳回修改建议:胃镜图片不合规</span>
</div>
</div>
......@@ -35,20 +38,26 @@
<div class="content">
<div class="showTips">
该病例已经审核【驳回修改】,需要改为{{
btnGroup[curBtn - 1] ? btnGroup[curBtn - 1].text : ""
btnGroup[curBtn - 1] ? btnGroup[curBtn - 1].text : ""
}}
</div>
</div>
<div class="btn">
<el-button type="primary" :loading="loading" @click="onCancel"></el-button>
<el-button type="primary" :loading="loading" @click="editSubmit"></el-button>
<el-button type="primary" :loading="loading" @click="onCancel"
></el-button
>
<el-button type="primary" :loading="loading" @click="editSubmit"
></el-button
>
</div>
</template>
</public-dialog>
<public-dialog ref="publicDialog" @onSubmit="onSubmit" @onCancel="onCancel">
<!-- 审核结果回显 -->
<template v-if="!confirmStatus" slot="content">
<div class="title">{{ btnGroup[curBtn - 1] ? btnGroup[curBtn - 1].text : "" }}</div>
<div class="title">
{{ btnGroup[curBtn - 1] ? btnGroup[curBtn - 1].text : "" }}
</div>
<div class="content">
<div v-if="curBtn != 1" class="noPass">
<el-form
......@@ -59,7 +68,10 @@
label-width="100px"
class="demo-ruleForm"
>
<el-form-item :label="curBtn == 2 ? '不合格原因' : '驳回修改建议'" prop="reson">
<el-form-item
:label="curBtn == 2 ? '不合格原因' : '驳回修改建议'"
prop="reson"
>
<el-input
v-model="form.reson"
type="textarea"
......@@ -72,7 +84,9 @@
</div>
</div>
<div class="btn">
<el-button type="primary" :loading="loading" @click="onSubmit">确 定</el-button>
<el-button type="primary" :loading="loading" @click="onSubmit"
>确 定</el-button
>
</div>
</template>
<!-- 提交后结果 -->
......@@ -82,11 +96,15 @@
<div v-if="curBtn == 1" class="pass">该病例审核合格成功!</div>
<div v-if="curBtn != 1" class="noPass">
<!-- 不合格和驳回 -->
<div class="label">{{ curBtn == 2 ? "不合格原因" : "驳回修改建议" }}</div>
<div class="label">
{{ curBtn == 2 ? "不合格原因" : "驳回修改建议" }}
</div>
<div class="reson">{{ form.reson }}</div>
</div>
</div>
<div v-if="curBtn != 1" class="showTips">该病例审核{{ curBtn == 2 ? "不合格原因" : "驳回修改建议" }}提交成功!</div>
<div v-if="curBtn != 1" class="showTips">
该病例审核{{ curBtn == 2 ? "不合格原因" : "驳回修改建议" }}提交成功!
</div>
<div class="btn">
<el-button type="primary" @click="nextExample">下一例</el-button>
</div>
......@@ -102,16 +120,16 @@ export default {
components: { publicDialog, followReview },
data() {
return {
medicalCombination:'无锡市人民医院医联体',
mcCount:7,
medicalCombination: "无锡市人民医院医联体",
mcCount: 7,
editStatus: false, //进入的状态是第一次审核还是修改审核,false为第一次,true为修改
formEdit:{
name:"djksh",
contact_phone:"12345678",
is_accept:"0",
gas_exam:"15",
G_17:"5"
},//填报数据
formEdit: {
name: "djksh",
contact_phone: "12345678",
is_accept: "0",
gas_exam: "15",
G_17: "5",
}, //填报数据
form: {},
rules: {
reson: [{ required: true, message: "请填写", trigger: "blur" }],
......@@ -140,10 +158,10 @@ export default {
created() {
this.getDetail()
},
computed:{
unionId(){
computed: {
unionId() {
return this.$route.query.id
}
},
},
methods: {
showDialog(val) {
......@@ -209,11 +227,11 @@ export default {
nextExample() {
this.onCancel()
},
async getDetail(){
async getDetail() {
this.loading = true
let res = await getFollowUnCheckDetail(this.unionId)
if(res.code==1){
this.formEdit=res.data[0]
if (res.code == 1) {
this.formEdit = res.data[0]
}
this.loading = false
},
......@@ -246,6 +264,7 @@ export default {
justify-content: space-between;
.right {
.btn {
margin-top: 0px;
width: 80px;
height: 32px;
border-radius: 4px;
......
......@@ -6,9 +6,9 @@
<span class="bold-font">总体情况</span>
</div>
<el-row :gutter="20" class="data-box">
<el-col :span="6" v-for="(item,index) in totalList" :key="index">
<div class="grid-content mb-12">{{item.label}}</div>
<h1>{{totalData[item.prop]}}</h1>
<el-col v-for="(item, index) in totalList" :key="index" :span="6">
<div class="grid-content mb-12">{{ item.label }}</div>
<h1>{{ totalData[item.prop] }}</h1>
</el-col>
</el-row>
</div>
......@@ -19,21 +19,31 @@
</div>
<div class="type-box">
<span class="mr-10">选择统计周期:</span>
<el-radio-group v-model="periodType">
<el-radio-group v-model="periodType" @input="handleClick">
<el-radio-button label="month">月度</el-radio-button>
<el-radio-button label="season">季度</el-radio-button>
<el-radio-button label="quarter">季度</el-radio-button>
<el-radio-button label="year">年度</el-radio-button>
</el-radio-group>
</div>
<div class="type-box">
<span class="mr-10">选择统计年份:</span>
<el-select v-model="yearBtn" placeholder="请选择">
<el-option v-for="item in yearList" :value="item" :key="item" :label="item"></el-option>
<el-select v-model="yearBtn" placeholder="请选择" @change="change">
<el-option
v-for="item in yearList"
:key="item"
:value="item"
:label="item"
></el-option>
</el-select>
</div>
<el-table :data="tableData" border show-summary class="mt-20">
<el-table
:data="tableData"
border
:show-summary="showSummary"
class="mt-20"
>
<el-table-column
v-for="(item,index) in tableColumn"
v-for="(item, index) in tableColumn"
:key="index"
:prop="item.prop"
:label="item.label"
......@@ -44,114 +54,221 @@
</div>
</template>
<script>
import { checkerQuality, adminQuality } from "@/api/qualitycontrol-report"
export default {
data() {
return {
totalList:[
curRole: "",
totalList: [
{
label:"累计审核病例数",
prop:"account"
label: "累计审核病例数",
prop: "checked",
},
{
label:"累计审核合格病例数",
prop:"account"
label: "累计审核合格病例数",
prop: "pass",
},
{
label:"累计审核驳回修改病例数",
prop:"account"
label: "累计审核驳回修改病例数",
prop: "back",
},
{
label:"累计审核不合格病例数",
prop:"account"
label: "累计审核不合格病例数",
prop: "unPass",
},
],
totalData:{
account:1600
},
periodType:"month",
yearList: [2021],
yearBtn:2022,
tableData:[{
id: '12987122',
name: '王小虎',
season: '234',
amount2: '3.2',
amount3: 10
}, {
id: '12987123',
name: '王小虎',
season: '165',
amount2: '4.43',
amount3: 12
}, {
id: '12987124',
name: '王小虎',
season: '324',
amount2: '1.9',
amount3: 9
}, {
id: '12987125',
name: '王小虎',
season: '621',
amount2: '2.2',
amount3: 17
}, {
id: '12987126',
name: '王小虎',
season: '539',
amount2: '4.1',
amount3: 15
}]
totalData: {},
periodType: "month",
yearList: [],
yearBtn: 0,
tableData: [],
tableColumn: [],
allData: [],
month: [
{ label: "1月", prop: "value1" },
{ label: "2月", prop: "value2" },
{ label: "3月", prop: "value3" },
{ label: "4月", prop: "value4" },
{ label: "5月", prop: "value5" },
{ label: "6月", prop: "value6" },
{ label: "7月", prop: "value7" },
{ label: "8月", prop: "value8" },
{ label: "9月", prop: "value9" },
{ label: "10月", prop: "value10" },
{ label: "11月", prop: "value11" },
{ label: "12月", prop: "value12" },
],
quarter: [
{ label: "第1季度", prop: "value1" },
{ label: "第2季度", prop: "value2" },
{ label: "第3季度", prop: "value3" },
{ label: "第4季度", prop: "value4" },
],
year: [],
showSummary: false,
}
},
methods: {
getNow() {
const nowDate = new Date()
this.yearBtn = nowDate.getFullYear();
if(!this.yearList.find((item) => item == this.yearBtn)){
this.yearList.push(this.yearBtn)
this.yearList.sort((a, b) => {
return a - b
})
}
computed: {
roles() {
return this.$store.state.user.roles
},
},
watch: {},
mounted() {},
created() {
this.getNow();
this.getNow()
if (this.roles.length > 0) {
let roleCodeArr = this.roles.map((e) => e.roleCode)
console.log(roleCodeArr)
if (roleCodeArr.includes("admin")) {
this.curRole = "admin"
} else if (roleCodeArr.includes("auditer")) {
this.curRole = "auditer"
}
}
this.getQuality()
},
watch: {},
computed:{
tableColumn(){
const listM=[
{
label:"月份",
prop:"month"
},
{
label:"审核病例数(例)",
prop:"count"
},
]
const listS=[
{
label:"季度",
prop:"season"
},
{
label:"审核病例数(例)",
prop:"count"
},
]
if(this.periodType == 'month'){
return listM
}
if(this.periodType == 'season'){
return listS
methods: {
change(val) {
console.log(val)
this.getQuality()
},
getNow() {
const nowDate = new Date()
this.yearBtn = nowDate.getFullYear()
for (let i = 2023; i <= this.yearBtn; i++) {
this.yearList.push(i)
}
},
async getQuality() {
let res
// console.log(this.curRole)
switch (this.curRole) {
case "admin":
res = await adminQuality({ year: this.yearBtn })
let { overall } = res.data
this.allData = res.data
this.totalData = overall
this.showSummary = true
this.handleClick()
break
case "auditer":
res = await checkerQuality({ year: this.yearBtn })
this.allData = res.data
this.totalData = res.data.overall
this.showSummary = false
this.handleClick()
break
default:
break
}
},
handleClick(val) {
let tableData
let headerData
if (this.curRole == "admin") {
switch (this.periodType) {
case "month":
tableData = this.allData.month
headerData = this.month
this.tableColumn = [
{
label: "审核员/月份",
prop: "name",
},
...this.month,
{
label: "合计",
prop: "sum",
},
]
break
case "quarter":
tableData = this.allData.quarter
headerData = this.quarter
this.tableColumn = [
{
label: "审核员/季度",
prop: "name",
},
...this.quarter,
{
label: "合计",
prop: "sum",
},
]
break
case "year":
tableData = this.allData.year
this.year = this.yearList.map((e, index) => {
let obj = {
label: e + "",
prop: "value" + (index + 1),
}
return obj
})
headerData = this.year
this.tableColumn = [
{
label: "审核员/年份",
prop: "name",
},
...this.year,
]
break
default:
break
}
// //处理动态表头 //
this.tableData = []
tableData.forEach((e, index) => {
let data = {
name: e.name,
}
// 计算
for (let i = 0; i < headerData.length; i++) {
let value = headerData[i].label
let filterArr = e.list.filter((item) => item.value === value)
if (filterArr.length > 0) {
data[headerData[i].prop] = filterArr[0].checked
} else {
data[headerData[i].prop] = 0
}
}
// !计算右侧合计条数
let arr = e.list.map((listItem) => listItem.checked)
data.sum = eval(arr.join("+"))
// !计算底部合计
this.tableData.push(data)
})
} else if (this.curRole == "auditer") {
headerData = [
{
label:
this.periodType == "month"
? "月份"
: this.periodType == "quarter"
? "季度"
: this.periodType == "year"
? "年度"
: "",
prop: "value",
},
{ label: "审核病例数(例)", prop: "checked" },
]
this.tableColumn = headerData
this.tableData =
this.periodType == "month"
? this.allData.month
: this.periodType == "quarter"
? this.allData.quarter
: this.periodType == "year"
? this.allData.year
: []
}
}
},
},
}
</script>
<style lang="scss" scoped>
......
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