Commit 1495b22e authored by liang's avatar liang

随访查询-查看/修改/操作日志

parent 6fe83cdb
import request from "@/utils/request";
import request from "@/utils/request"
/**
* 随访
......@@ -10,7 +10,7 @@ export function getFollowSearch(params = {}) {
url: "/disease-data/follow/search",
method: "get",
params,
});
})
}
//随访调查 列表
export function getFollowSurvey(params = {}) {
......@@ -18,7 +18,7 @@ export function getFollowSurvey(params = {}) {
url: "/disease-data/follow/survey",
method: "get",
params,
});
})
}
///////////////审核质控/////////////////////
//随访已审核列表
......@@ -27,7 +27,7 @@ export function getFollowCheck(params = {}) {
url: "/disease-data/dataCheck/follow/check",
method: "get",
params,
});
})
}
//随访待审核列表
export function getFollowUncheck(params = {}) {
......@@ -35,14 +35,14 @@ export function getFollowUncheck(params = {}) {
url: "/disease-data/dataCheck/follow/unCheck",
method: "get",
params,
});
})
}
//随访病例待审核(详情数据)
export function getFollowUnCheckDetail(id) {
return request({
url: `/disease-data/dataCheck/follow/unCheck/detail/${id}`,
method: "get",
});
})
}
//随访病例审核
export function putFollowCheck(data = {}) {
......@@ -59,4 +59,13 @@ export function putFollowCheckAdvice(data = {}) {
method: "put",
data,
})
}
\ No newline at end of file
}
// 随访查询详情list
export function getFollowRecord(params = {}) {
return request({
url: "/disease-data/follow/search/detail",
method: "get",
params,
})
}
......@@ -88,10 +88,11 @@ export default {
this.$router.push({ path: "/followupquery", query: {} })
},
getFollowList() {
const followId = this.followId
const key = followId ? "followId" : "patientId"
getFollowList({
patientId: this.patientId,
[key]: this[key],
}).then((res) => {
// console.log(res)
if (res.code == 1) {
this.screenList = res.data || []
}
......
<template>
<div>
<FollowReview :currentRow="currentRow" titlePosition="top">
<template #button>
<el-button
style="padding: 8px 20px"
v-if="isShowEdit"
@click="handleEdit"
>修 改</el-button
>
<el-button
style="padding: 8px 20px; margin-left: 20px"
@click="$emit('back')"
>返 回</el-button
>
</template>
</FollowReview>
</div>
</template>
<script>
import FollowReview from "./components/FollowReview"
export default {
name: "FollowUpDetail",
props: {
currentRow: {},
},
components: {
FollowReview,
},
data() {
return {}
},
methods: {
handleEdit() {
const { patientId, followId } = this.currentRow
this.$router.push({
path: "/followupentry",
query: {
patientId,
followId,
model: "edit",
getData: 1,
formType: 2,
},
})
},
},
computed: {
isShowEdit() {
const { checkStatus, followBatch } = this.currentRow
return followBatch > 0 && checkStatus !== 3 && checkStatus !== 4
},
},
}
</script>
<template>
<!-- 随访审核详情 -->
<div class="follow-form">
<el-header v-if="titlePosition === 'top'">
<div class="follow-tab-top">
<el-tabs v-model="activeTab" type="card">
<el-tab-pane label="筛查" name="999"></el-tab-pane>
<el-tab-pane
v-for="(item, index) in followList"
:key="index"
:label="'第' + Number(index + 1) + '次随访数据'"
:name="String(index)"
></el-tab-pane>
</el-tabs>
</div>
<div class="extra_btn">
<slot name="button"></slot>
</div>
</el-header>
<el-container v-loading="fromLoading">
<el-aside width="auto" v-if="titlePosition === 'left'">
<div class="follow-tab">
<el-tabs
v-model="activeTab"
tab-position="right"
style="height: 200px"
>
<el-tab-pane label="筛查病例数据" name="999"></el-tab-pane>
<el-tab-pane
v-for="(item, index) in followList"
:key="index"
:label="'第' + Number(index + 1) + '次随访数据'"
:name="String(index)"
></el-tab-pane>
</el-tabs>
</div>
</el-aside>
<el-main class="transition-box">
<div class="my_form">
<MyCustomForm
v-show="activeTab === '999'"
v-for="form in formTabs"
:key="form.id"
:form="form"
:patientId="currentRow.patientId"
></MyCustomForm>
<MyCustomForm
v-show="activeTab !== '999'"
v-for="form in followForms"
:key="form.id"
:form="form"
:patientId="currentRow.patientId"
:followId="followId"
></MyCustomForm>
</div>
</el-main>
<el-aside width="auto" class="transition-box">
<div class="follow-list">
<ul class="list">
<li v-for="(item, index) in screenList" :key="index">
<div class="time">{{ item.update_time || item.create_time }}</div>
<div class="time">
{{ item.update_user_name || item.create_time }}
</div>
<div class="time">{{ item.sub_title }}</div>
</li>
</ul>
</div>
</el-aside>
</el-container>
</div>
</template>
<script>
import { mapGetters } from "vuex"
import CustomForm from "@/components/FormComponents/CustomForm/index"
import MyCustomForm from "./MyCustomForm.vue"
import { getCurrentFormByType } from "@/api/coop-group.js"
import { getFollowList } from "@/api/patient"
import { getFollowRecord } from "@/api/followup"
export default {
name: "FollowReview",
components: {
CustomForm,
MyCustomForm,
},
provide() {
return {
showIndex: true,
}
},
props: {
currentRow: {},
titlePosition: {
type: String,
default: "left",
validator: function (value) {
return ["left", "top"].includes(value)
},
},
},
data() {
return {
fromLoading: false,
formTabs: [],
followForms: [],
activeTab: "999",
screenList: [],
followList: [],
}
},
computed: {
...mapGetters({
group: ["user/group"],
}),
isEmpty() {
return this.formTabs.length
},
followId() {
return (
(this.followList[this.activeTab] &&
this.followList[this.activeTab].followId) ||
null
)
},
},
watch: {
followId() {
this.getLogList()
},
},
created() {
this.getCurrentFormByType()
this.getFollowInfo()
this.getLogList()
},
methods: {
getLogList() {
const obj = {
patientId: this.currentRow.patientId,
followId: this.followId,
}
const key = obj.followId ? "followId" : "patientId"
getFollowList({
[key]: obj[key],
}).then((res) => {
if (res.code == 1) {
this.screenList = res.data || []
}
})
},
getCurrentFormByType(type = 1) {
this.fromLoading = true
getCurrentFormByType({
type,
groupId: this.group.groupId,
}).then((res) => {
this.fromLoading = false
if (res.code === 1) {
const list = res.data.map((item, index) => {
return {
id: item.id,
formId: item.formId,
label: item.tabName,
}
})
if (type === 2) {
this.followForms = list
} else {
this.formTabs = list
}
}
})
},
getFollowRecord() {
getFollowRecord({
patientId: this.currentRow.patientId,
patientFrom: this.$store.getters["table/selectedIndex"],
}).then((res) => {
this.followList = res.data.filter((_) => _.followBatch > 0)
})
},
getFollowInfo() {
const { followBatch } = this.currentRow
if (!followBatch) return
this.getCurrentFormByType(2)
this.getFollowRecord()
},
},
}
</script>
<style lang="scss" scoped>
.el-header {
display: flex;
margin-top: 20px;
padding-right: 0;
justify-content: space-between;
}
.follow-tab-top {
width: calc(100% - 200px);
padding-left: 10px;
::v-deep {
.el-tabs--card > .el-tabs__header {
border-bottom: none;
}
.el-tabs--card > .el-tabs__header .el-tabs__nav {
border: none;
}
.el-tabs--card > .el-tabs__header .el-tabs__item {
min-width: 116px;
text-align: center;
background: #f0f1fa;
font-size: 14px;
border: none;
}
.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
background: #4e68ff;
color: #fff;
}
}
}
.my_form {
height: calc(100vh - 200px);
overflow-y: auto;
}
.el-main {
padding: 0px 20px;
}
.el-aside {
padding-bottom: 20px;
}
.extra_btn {
width: 170px;
text-align: right;
margin-top: 5px;
}
.follow-tab {
::v-deep {
border-radius: 4px;
border: 1px solid #cccccc;
height: calc(100vh - 200px);
.el-tabs__header {
margin-left: 0px;
}
.el-tabs__nav-wrap.is-right::after {
width: 0px;
}
.el-tabs__active-bar.is-right {
width: 3px;
height: 52px !important;
}
.el-tabs--right {
height: auto !important;
}
.tab-title {
padding: 16px;
background: #fafafa;
color: #333333;
border-bottom: 1px solid #cccccc;
}
.el-tabs__item {
padding: 16px;
width: 180px;
background: #fafafa;
height: auto;
line-height: inherit;
border-bottom: 1px solid #cccccc;
transition: all 1s;
}
.el-tabs__item.is-active {
background: transparent;
}
}
}
.follow-list {
border-radius: 4px;
border: 1px solid #cccccc;
height: 100%;
background: #fafafa;
padding-right: 15px;
height: calc(100vh - 200px);
overflow-y: overlay;
li {
padding: 16px;
border-bottom: 1px solid #ccc;
// cursor: pointer;
.time {
font-size: 14px;
margin-bottom: 8px;
font-family: AlibabaPuHuiTiR;
text-align: left;
&:first-child {
color: #4e68ff;
}
}
}
}
</style>
<template>
<custom-form
v-if="!isEmpty"
class="mb-20"
v-loading="pageLoading"
ref="form"
:options="widgetFormPreview"
:form-edit="formEdit"
></custom-form>
</template>
<script>
import { getPatientDetail, getFollowDetail } from "@/api/patient.js"
import { getFormDetail } from "@/api/field"
import CustomForm from "@/components/FormComponents/CustomForm/index"
export default {
name: "MyCustomForm",
components: { CustomForm },
props: {
form: {},
patientId: {},
followId: {},
},
data() {
return {
widgetFormPreview: {},
loading: false,
formLoading: false,
formEdit: {},
formRecordId: null,
}
},
computed: {
isEmpty() {
return !(Object.keys(this.widgetFormPreview) || this.widgetFormPreview)
.length
},
getTabFollowId() {
return this.tabFollowId()
},
pageLoading() {
return this.loading || this.formLoading
},
},
watch: {
followId: {
handler() {
this.getFollowDetail()
},
immediate: true,
},
},
created() {
this.initData()
this.initForm()
},
methods: {
initData() {
this.getPatientDetail()
},
initForm() {
this.formLoading = true
getFormDetail(this.form.formId)
.then((res) => {
if (res.code === 1 && res.data) {
const formJson = res.data.formJson
this.$emit("setFormJson", formJson)
const obj = eval("(" + formJson + ")")
obj.disabled = true
obj.closeBtn = true
obj.detail = true
this.widgetFormPreview = obj
}
})
.finally(() => {
this.formLoading = false
})
},
getFollowDetail() {
// 随访数据查询
if (!this.followId) return
this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetForm()
})
getFollowDetail({
followId: this.followId,
formId: this.form.formId,
})
.then((res) => {
this.formatData(res)
})
.finally(() => {
this.loading = false
})
},
getPatientDetail() {
// 筛查数据查询
this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetForm()
})
if (!this.patientId || this.followId) return
this.loading = true
getPatientDetail({
patientId: this.patientId,
formId: this.form.formId,
})
.then((res) => {
this.formatData(res)
})
.finally(() => {
this.loading = false
})
},
formatData(res, cache) {
const d = res.data || {}
const form = d.data || {}
for (const key in form) {
Object.prototype.toString.call(form[key]) == "[object Number]"
? (form[key] = String(form[key]))
: ""
}
this.formEdit = form
},
},
}
</script>
<style scoped lang="scss">
.el-main {
position: relative;
padding: 0;
// box-shadow: 0px 5px 4px red;
.arrow {
position: absolute;
right: 0;
top: 0;
cursor: pointer;
font-size: 22px;
z-index: 9;
}
.header {
height: 5px;
box-shadow: 0px 3px 4px rgb(0 21 41 / 8%);
padding-right: 20px;
position: relative;
font-size: 15px;
z-index: 999;
}
}
.el-aside {
padding-left: 10px;
border-left: 1px solid #ccc;
.side-content {
height: calc(100vh - #{"272px"});
// overflow: auto;
}
}
.my-form {
// height: calc(100vh - #{"310px"});
overflow-y: auto;
padding-top: 20px;
// position: relative;
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
&:hover::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.4);
}
&.no-scroll {
height: auto;
}
}
.label {
font-size: 14px;
color: #8492a6;
line-height: 38px;
float: left;
margin-right: 20px;
}
.value {
font-size: 14px;
line-height: 38px;
float: left;
font-weight: 600;
margin-right: 50px;
}
.el-slider {
float: left;
width: 150px;
}
</style>
<template>
<!-- 随访查询 -->
<div class="screeningSearch">
<div class="top">
<form-components
ref="form"
:forms="formList"
:form-edit="formEdit"
@handleSearch="onSearch"
></form-components>
</div>
<div class="bot">
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
<div v-show="!isDetail">
<div class="top">
<form-components
ref="form"
:forms="formList"
:form-edit="formEdit"
@handleSearch="onSearch"
></form-components>
</div>
<div class="bot">
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</div>
<FollowUpDetail
:currentRow="currentRow"
v-if="isDetail"
@back="back"
></FollowUpDetail>
</div>
</template>
<script>
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import searchMixin from "../searchMixin"
import { getCurrentFormByType } from "@/api/coop-group.js"
import { getFollowSearch } from "@/api/followup"
import { getDictDetail } from "@/api/dict.js"
import FollowUpDetail from "./FollowUpDetail.vue"
export default {
components: {
FormComponents,
// CustomsTable,
FollowUpDetail,
},
mixins: [paginationMixin, searchMixin],
data() {
return {
isDetail: false,
followId: "",
listLoading: false,
keyword: "",
......@@ -98,6 +105,17 @@ export default {
return row.screeningTime ? row.screeningTime : "--"
},
},
{
label: "审核状态",
value: "checkStatus",
minWidth: 120,
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["checkStatus"],
String(row.checkStatus)
)
},
},
{
label: "风险评估结果",
minWidth: 120,
......@@ -138,34 +156,29 @@ export default {
operations: [
{
isIndex: true,
func: this.rowOpration,
func: this.handleDetail,
formatter(row) {
return {
label: "",
label: "",
type: "text",
}
},
},
// {
// isIndex: true,
// func: this.handleEdit,
// formatter(row) {
// if (row.checkStatus != 3 && row.checkStatus != 4) {
// return {
// label: "修改",
// type: "text",
// }
// } else {
// return {
// label: "",
// type: "text",
// style: {
// display: "none",
// },
// }
// }
// },
// },
{
isIndex: true,
func: this.handleEdit,
formatter(row) {
return {
label: "修改",
type: "text",
}
},
isHidden({ checkStatus, followBatch }) {
return (
checkStatus === 3 || checkStatus === 4 || followBatch === 0
)
},
},
],
},
],
......@@ -252,6 +265,7 @@ export default {
},
],
formEdit: {},
currentRow: {},
}
},
watch: {
......@@ -262,28 +276,15 @@ export default {
pageIndex(val) {
sessionStorage.setItem("followQuery-pageIndex", val)
},
followId(v) {
if (v) {
this.listLoading = true
this.$nextTick(() => {
setTimeout(() => {
this.listLoading = false
let query = { ...this.$route.query }
this.$router.replace({ query: {} })
this.$router.push({
path: "/followupentry",
query: query,
})
}, 500)
})
}
},
},
created() {
this.initSearchForm()
},
mounted() {
this.followId = this.$route.query.followId
const followId = this.$route.query.followId
if (followId) {
this.handleDetail({ ...this.$route.query })
}
// this.formEdit = sessionStorage.getItem('followQuery-form') ? JSON.parse(sessionStorage.getItem('followQuery-form')) : {}
this.pageSize = Number(sessionStorage.getItem("followQuery-pageSize")) || 10
this.pageIndex =
......@@ -291,6 +292,13 @@ export default {
this.getCurrentFormByType(2)
},
methods: {
back() {
this.isDetail = false
const followId = this.$route.query.followId
if (followId) {
this.$router.replace({ path: "/followupquery", query: {} })
}
},
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
......@@ -310,35 +318,13 @@ export default {
followId: data.id,
model: "edit",
getData: 1,
formType: 2,
},
})
},
rowOpration(data, i, index) {
console.log(data)
if (data.followBatch == 0) {
// 筛查
this.$router.push({
path: "/followupentry",
query: {
patientId: data.patientId,
followId: data.id,
model: "view",
getData: 1,
formType: 1, // 去筛查的表单还是随访的表单
},
})
} else {
this.$router.push({
path: "/followupentry",
query: {
patientId: data.patientId,
followId: data.id,
model: "view",
getData: 1,
formType: 2,
},
})
}
handleDetail(row) {
this.isDetail = true
this.currentRow = row
},
onSearch(form) {
console.log(form)
......@@ -352,7 +338,6 @@ export default {
},
async handleSearch() {
this.listLoading = true
console.log(this.$refs.form.form)
let params = {
pageSize: this.pageSize,
......
......@@ -95,6 +95,7 @@ export default {
return row.screeningTime ? row.screeningTime : "--"
},
},
{
label: "风险评估结果",
minWidth: 120,
......@@ -275,7 +276,6 @@ export default {
},
changePage(v) {
this.page[v.type] = v.value
console.log(this.page)
this.$refs.customTable.loading = false
},
onSearch(form) {
......@@ -285,7 +285,6 @@ export default {
this.handleSearch()
},
rowOpration(data, i) {
console.log("跳转", data, i)
sessionStorage.setItem("formEdit", JSON.stringify(data))
this.$router.push({
path: `/followupentry`,
......
......@@ -393,8 +393,7 @@ export default {
query: {
patientId: this.patientId,
followId: this.followId || this.tabFollowId,
model: "view",
getData: 1,
followBatch: 1,
},
})
this.$refs.followDialog.dialogVisible = false
......
......@@ -306,7 +306,7 @@ export default {
params.statusMap.is_draft = this.isDraft
}
// 处理followId 针对随访查询的列表数据的查询和修改操作
if (this.$route.path == "/followupentry" && this.activeName != "index0") {
if (this.$route.path == "/followupentry") {
params.followId = this.followId || this.getTabFollowId
}
this.$emit("handleConfirm", params, done, (res) => {
......
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