Commit 87fc17bb authored by miaojiale's avatar miaojiale

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

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