Commit 19d67c11 authored by miaojiale's avatar miaojiale

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

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