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