Commit 19d67c11 authored by miaojiale's avatar miaojiale

1.处理数据类型导致数据回显失败

2.修改审核建议功能
parent 06b17403
......@@ -53,11 +53,11 @@ export function saveSysCheckNote(data = {}) {
})
}
// //修改筛查病例审核意见
// export function putFollowCheckAdvice(data = {}) {
// return request({
// url: "/disease-data/dataCheck/follow/check/advice",
// method: "put",
// data,
// })
// }
//修改筛查病例审核意见
export function putScreeningCheckAdvice(data = {}) {
return request({
url: "/disease-data/dataCheck/screening/check/advice",
method: "put",
data,
})
}
......@@ -65,13 +65,22 @@ export default {
},
filters: {
getItemText(val, list, type) {
if (!val) return ""
if (["radio", "select", "checkbox", "cascader"].includes(type)) {
// 单选改为字符串
if (["radio", "select", "cascader"].includes(type)) {
return formatDicList(list, String(val), type === "cascader" ? "/" : ",")
}
// 多选
if (["checkbox"].includes(type)) {
return formatDicList(list, val, type === "cascader" ? "/" : ",")
}
// 返回的数字修改字符串
if (typeof val === "number") {
return String(val)
}
if (Array.isArray(val) && type.includes("range")) {
return val.join("-")
}
// if (!val) return ""
return val
},
},
......
......@@ -5,7 +5,9 @@
<div class="left">
<span v-if="!isEmpty">当前审核</span>
<span v-if="!isEmpty" class="f-b"
>{{ curUnion }}】【剩余{{ auditNum }}</span
>{{ curUnion }}<span v-if="!editStatus"
>【剩余{{ auditNum }}</span
></span
>
</div>
<div class="right">
......@@ -32,28 +34,42 @@
@click="showDialog(item.value)"
>{{ item.text }}</el-button
>
<span v-if="editStatus" class="op">驳回修改建议:胃镜图片不合规</span>
<span v-if="editStatus" class="op"
>{{
checkStatus == "2"
? "驳回修改建议 : "
: checkStatus == "4"
? "不合格原因 : "
: ""
}}
{{ checkStatus == "3" ? "" : checkNote }}</span
>
</div>
</div>
<div class="p-24 empty"></div>
<!-- 编辑提交前弹窗 -->
<public-dialog ref="editDialog" @onSubmit="onSubmit" @onCancel="onCancel">
<!-- 修改审核结果 优先触发提示 -->
<template v-if="!confirmStatus" slot="content">
<div class="title">温馨提示</div>
<div class="content">
<div class="showTips">
该病例已经审核【驳回修改】,需要改为{{
该病例已经审核【{{
checkStatus == 2
? "驳回修改"
: checkStatus == 3
? "合格"
: checkStatus == 4
? "不合格"
: ""
}}】,需要改为{{
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" @click="onCancel"></el-button>
<el-button type="primary" @click="editSubmit"></el-button>
</div>
</template>
</public-dialog>
......@@ -91,11 +107,12 @@
></el-input>
</el-form-item>
</el-form>
<!-- 标签部分 -->
<div class="labelPlace">
<div class="labelList">
<template v-for="(item, index) in reasonList">
<div
v-if="item.note ? item.note.length < 8 : false"
v-if="item.note ? item.note.length <= 8 : false"
:key="index"
:class="[
'listItem',
......@@ -106,12 +123,12 @@
<!-- selectedReason.includes(item) ? 'active' : '', -->
{{ item.note }}
</div>
<template v-if="item.note ? item.note.length >= 8 : false">
<template v-if="item.note ? item.note.length > 8 : false">
<el-tooltip
:key="index"
class="item"
effect="dark"
:content="item"
:content="item.note"
placement="top"
>
<div
......@@ -135,11 +152,16 @@
</div>
</div>
<div class="btn">
<el-button type="primary" :loading="loading" @click="onSubmit"
>确认并进入下一列审核</el-button
>
<el-button type="primary" :loading="loading" @click="onSubmit">{{
editStatus
? curBtn == 1
? "好的"
: "提交"
: "确认并进入下一例审核"
}}</el-button>
</div>
</template>
<!-- 标签的弹窗 -->
<template v-if="!confirmStatus && editLabelFlag" slot="content">
<div class="left-back" @click="editLabelFlag = false">
<i class="el-icon-back"></i>
......@@ -181,7 +203,7 @@
>
</div>
</template>
<!-- 提交后结果 -->
<!-- 提交后合格结果 -->
<template v-if="confirmStatus" slot="content">
<div class="title">{{ btnGroup[curBtn - 1].text }}</div>
<div class="content">
......@@ -198,9 +220,13 @@
该病例审核{{ curBtn == 2 ? "不合格原因" : "驳回修改建议" }}提交成功!
</div>
<div class="btn">
<el-button type="primary" @click="nextExample"
>确认并进入下一列审核</el-button
>
<el-button type="primary" :loading="loading" @click="nextExample">{{
editStatus
? curBtn == 1
? "好的"
: "提交"
: "确认并进入下一例审核"
}}</el-button>
</div>
</template>
</public-dialog>
......@@ -212,6 +238,7 @@ import screenReview from "./components/screenReview.vue"
import {
getScreeningUser,
putScreeningCheck,
putScreeningCheckAdvice,
saveSysCheckNote,
getSysCheckNote,
} from "@/api/screeningAudit"
......@@ -227,6 +254,8 @@ export default {
reason: "",
},
patientId: "", // 当前人的patientId
checkNote: "",
checkStatus: "", // 传入的checkstatus
curUnion: "", // 当前医联体
id: "",
rules: {
......@@ -260,11 +289,21 @@ export default {
},
},
watch: {},
created() {
let id = this.$route.query.id
this.getUser(id)
},
created() {},
mounted() {
let unionId = this.$route.query.unionId
let patientId = this.$route.query.patientId
if (unionId && !patientId) {
this.editStatus = false
this.getUser(unionId)
} else if (patientId) {
this.editStatus = true
this.patientId = patientId
this.id = this.$route.query.id
this.checkNote = this.$route.query.checkNote
this.checkStatus = this.$route.query.checkStatus
this.curUnion = this.$route.query.unionName
}
// this.$refs.publicDialog.dialogVisible = true
},
methods: {
......@@ -294,13 +333,43 @@ export default {
checkNote: this.form.reason,
patientId: this.patientId,
}
putScreeningCheck(params).then((res) => {
if (res.code == 1 && res.data) {
func()
// this.confirmStatus = true
this.$refs.publicDialog.dialogVisible = true
}
})
putScreeningCheck(params)
.then((res) => {
if (res.code == 1 && res.data) {
func()
// this.confirmStatus = true
this.$refs.publicDialog.dialogVisible = true
} else {
this.loading = false
}
})
.catch(() => {
this.loading = false
})
},
//! 修改审核结果
putScreeningCheckAdvice(checkStatus, func) {
let params = {
id: this.id,
checkStatus: checkStatus,
checkNote: this.form.reason,
patientId: this.patientId,
}
putScreeningCheckAdvice(params)
.then((res) => {
if (res.code == 1 && res.data) {
this.loading = false
this.checkStatus = checkStatus
this.checkNote = this.form.reason
func()
} else {
this.loading = false
this.$refs.publicDialog.dialogVisible = false
}
})
.catch(() => {
this.loading = false
})
},
// 设置理由
setReason({ note }) {
......@@ -335,34 +404,36 @@ export default {
//! checkStatus 合格-3 不合格-4 驳回修改-2 待审核-1
showDialog(val) {
this.curBtn = val
if (val == 1) {
this.$confirm("确定要提交审核吗?", "警告", {
type: "warning",
})
.then(() => {
if (!this.editStatus) {
if (this.curBtn == 1) {
// 走接口,保存合格
this.putScreeningCheck("3", () => {
this.confirmStatus = true
})
}
} else {
this.$refs.editDialog.dialogVisible = true
}
})
.catch(() => {})
if (this.editStatus) {
//! 精准编辑
this.$refs.editDialog.dialogVisible = true
} else {
this.getSysCheckNote()
if (!this.editStatus) {
//! 医联体的审核
if (val == 1) {
this.$confirm("确定要提交审核吗?", "警告", {
type: "warning",
})
.then(() => {
if (!this.editStatus) {
if (this.curBtn == 1) {
// 走接口,保存合格
this.putScreeningCheck("3", () => {
this.confirmStatus = true
})
}
} else {
this.$refs.editDialog.dialogVisible = true
}
})
.catch(() => {})
} else {
this.getSysCheckNote()
if (this.curBtn == 2) {
this.rules.reason[0].message = "请输入不合格原因"
} else {
this.rules.reason[0].message = "请输入驳回修改建议"
}
this.$refs.publicDialog.dialogVisible = true
} else {
this.$refs.editDialog.dialogVisible = true
}
}
},
......@@ -374,10 +445,17 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
let status = this.curBtn == 2 ? "4" : this.curBtn == 3 ? "2" : ""
this.putScreeningCheck(status, () => {
this.$message.success("提交审核成功")
this.nextExample()
})
if (this.editStatus) {
this.putScreeningCheckAdvice(status, () => {
this.$message.success("提交审核成功")
this.onCancel()
})
} else {
this.putScreeningCheck(status, () => {
this.$message.success("提交审核成功")
this.nextExample()
})
}
} else {
console.log("error submit!!")
this.loading = false
......@@ -391,6 +469,7 @@ export default {
onCancel() {
this.confirmStatus = false
this.editLabelFlag = false
this.selectedReason = []
if (this.curBtn != 1) {
this.form = { reason: "" }
}
......@@ -400,23 +479,39 @@ export default {
this.$refs.form.clearValidate()
}
},
// 修改提交
editSubmit() {
// this.$refs.editDialog.dialogVisible = false
if (this.curBtn == 1) {
// 走接口,保存合格
this.confirmStatus = true
} else if (this.curBtn == 2) {
this.rules.reason[0].message = "请输入不合格原因"
if (this.editStatus) {
// 走接口,保存合格
this.putScreeningCheckAdvice("3", () => {
this.confirmStatus = true
this.$refs.publicDialog.dialogVisible = true
this.selectedReason = []
})
}
} else {
this.rules.reason[0].message = "请输入驳回修改建议"
this.getSysCheckNote()
if (this.curBtn == 2) {
this.rules.reason[0].message = "请输入不合格原因"
} else {
this.rules.reason[0].message = "请输入驳回修改建议"
}
this.$refs.publicDialog.dialogVisible = true
}
this.$refs.publicDialog.dialogVisible = true
},
nextExample() {
this.getUser(this.$route.query.id, () => {
if (this.editStatus) {
this.loading = false
this.onCancel()
})
} else {
this.getUser(this.$route.query.id, () => {
this.loading = false
this.onCancel()
})
}
},
deleteLabel(i) {
this.$confirm("确定要删除该标签吗?", "警告", {
......@@ -522,7 +617,7 @@ export default {
.btn {
margin-top: 20px;
.el-button {
// width: 100px;
min-width: 100px;
border-radius: 5px;
height: 32px;
}
......
......@@ -199,6 +199,7 @@ export default {
this.type = sessionStorage.getItem("audit-type") || "0"
}
this.handleSearch()
this.handleClick()
},
methods: {
handleClick() {
......@@ -221,12 +222,31 @@ export default {
},
})
} else {
this.$router.push({
path: "/auditdetail",
query: {
id: data["unionId"],
},
})
switch (this.auditStatus) {
case "0":
this.$router.push({
path: "/auditdetail",
query: {
unionId: data["unionId"],
},
})
break
case "1":
this.$router.push({
path: "/auditdetail",
query: {
id: data["id"],
patientId: data["patientId"],
checkNote: data["checkNote"],
checkStatus: data["checkStatus"],
unionName: data["unionName"],
},
})
break
default:
break
}
}
},
async handleSearch() {
......
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