Commit 87fc17bb authored by miaojiale's avatar miaojiale

增加随访查询右侧列表接口

parent b261926e
......@@ -200,3 +200,12 @@ export function getApScoreDetailList(params = {}) {
params,
})
}
// 获取随访计划右侧列表
export function getFollowList(params = {}) {
return request({
url: "/disease-data/data/patient/log/list",
method: "get",
params,
})
}
<template>
<!-- 随访调查录入 -->
<div>
<div style="positon: relative">
<div class="goback" v-if="formType == 1">
<el-button icon="el-icon-back" @click="backInfoce">返 回</el-button>
</div>
<ConfigForms
v-if="refreshFlag"
form-type="2"
:form-type="formType"
form-class="follow-form"
:disabled="disabled"
:tab-disabled="tabDisabled"
:get-data="getData"
:contrast="true"
:contrast="formType == 1 ? false : true"
:patient-id="patientId"
:screenList="screenList"
@refreshData="refreshData"
......@@ -18,6 +21,7 @@
<script>
import ConfigForms from "@/views/screening/components/ConfigForms.vue"
import { getFollowList } from "@/api/patient"
export default {
name: "FollowupEntry",
components: {
......@@ -29,11 +33,11 @@ export default {
tabDisabled: true,
refreshFlag: true,
screenList: [
{
time: "2020-12-12 11:11:11",
code: "UK102",
name: "修改第一次随访计划",
},
// {
// create_time: "2020-12-12 11:11:11",
// create_user_name: "",
// title: "修改第一次随访计划",
// },
],
}
},
......@@ -52,6 +56,9 @@ export default {
followId() {
return this.$route.query.followId
},
formType() {
return this.$route.query.formType
},
getData() {
return Boolean(this.$route.query.getData - 0)
},
......@@ -64,6 +71,11 @@ export default {
this.disabled = false
this.tabDisabled = true
}
this.$nextTick(() => {
if (this.formType == 2) {
this.getFollowList()
}
})
},
methods: {
refreshData(data) {
......@@ -72,8 +84,28 @@ export default {
// this.refreshFlag = true
// })
},
backInfoce() {
this.$router.push({ path: "/followupquery", query: {} })
},
getFollowList() {
getFollowList({
patientId: this.patientId,
}).then((res) => {
// console.log(res)
if (res.code == 1) {
this.screenList = res.data || []
}
})
},
},
}
</script>
<style lang="scss"></style>
<style lang="scss" scoped>
.goback {
position: absolute;
right: 24px;
top: 24px;
z-index: 99;
}
</style>
......@@ -143,35 +143,35 @@ export default {
}
},
},
{
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) {
// if (row.checkStatus != 3 && row.checkStatus != 4) {
// return {
// label: "修改",
// type: "text",
// }
// } else {
// return {
// label: "",
// type: "text",
// style: {
// display: "none",
// },
// }
// }
// },
// },
],
},
],
tableData: [],
formList: [
{
type: "date",
type: "daterange",
label: "筛查时间",
prop: "screeningTime",
prop: "ScreeningTime",
placeholder: "请选择时间",
valueFormat: "yyyy-MM-dd",
},
......@@ -311,15 +311,31 @@ export default {
})
},
rowOpration(data, i, index) {
this.$router.push({
path: "/followupentry",
query: {
patientId: data.patientId,
followId: data.id,
model: "view",
getData: 1,
},
})
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,
},
})
}
},
onSearch(form) {
console.log(form)
......@@ -333,6 +349,7 @@ export default {
async handleSearch() {
this.listLoading = true
console.log(this.$refs.form.form)
let params = {
pageSize: this.pageSize,
pageNum: this.pageIndex,
......@@ -341,7 +358,18 @@ export default {
patientFrom: sessionStorage.getItem("selectedIndex"), //筛查场景
}
if (this.formEdit) {
params = Object.assign(this.formEdit, params)
params = { ...Object.assign(this.formEdit, params) }
}
for (let key in params) {
if (params[key] !== "" && params[key] !== null) {
if (key.includes("Time") && params[key]) {
params["start" + key] = params[key][0]
params["end" + key] = params[key][1]
delete params.ScreeningTime
} else {
params[key] = params[key]
}
}
}
let res = await getFollowSearch(params)
if (res.code == 1) {
......
......@@ -184,10 +184,10 @@ export default {
},
],
tableData: [
{
name: "1",
1: 2,
},
// {
// name: "1",
// 1: 2,
// },
],
}
},
......@@ -246,6 +246,9 @@ export default {
type: "success",
message: "删除成功!",
})
if (this.tableData.length == 1 && this.pageIndex != 1) {
this.pageIndex--
}
this.handleSearch()
}
})
......
......@@ -71,13 +71,13 @@
class="bottom_line"
:style="{ width: contrast ? 'calc(100% - 200px)' : '100%' }"
></div> -->
<el-aside v-if="contrast" :width="'200px'">
<el-aside v-if="contrast" :width="'220px'">
<div class="side-content">
<ul class="list">
<li v-for="(item, index) in screenList" :key="index">
<div class="time">{{ item.time }}</div>
<div class="time">{{ item.code }}</div>
<div class="time">{{ item.name }}</div>
<div class="time">{{ item.create_time }}</div>
<div class="time">{{ item.create_user_name }}</div>
<div class="time">{{ item.title }}</div>
</li>
</ul>
</div>
......@@ -410,10 +410,15 @@ export default {
border-left: 0px;
.side-content {
width: 100%;
height: 100%;
border: 1px solid #ccc;
height: calc(100vh - 300px);
overflow: overlay;
border-left: 1px solid #ccc;
border-right: 0;
border-radius: 4px;
.list {
width: 93%;
border-right: 1px solid #ccc;
border-top: 1px solid #ccc;
li {
padding: 20px 30px;
border-bottom: 1px solid #ccc;
......@@ -545,6 +550,7 @@ export default {
height: 100%;
padding: 0px;
.el-form-item__label {
min-width: 120px;
height: 100%;
text-align: left;
background: #fafafa;
......@@ -552,13 +558,13 @@ export default {
color: #333333;
border-right: 1px solid #cccccc;
// width: 100px !important;
white-space: nowrap;
white-space: wrap;
padding: 18px 10px;
margin-right: 20px;
text-align: center;
// text-align: center;
display: flex;
align-items: center;
justify-content: center;
// justify-content: center;
}
}
}
......
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