Commit ebb93c18 authored by miaojiale's avatar miaojiale

1.随访列表接口

parent 7c2f99d1
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<!-- 随访调查 --> <!-- 随访调查 -->
<div class="screeningSearch"> <div class="screeningSearch">
<div class="top"> <div class="top">
<form-components :forms="formList" :formEdit="formEdit" @handleSearch="onSearch"></form-components> <form-components
:forms="formList"
:formEdit="formEdit"
@handleSearch="onSearch"
></form-components>
</div> </div>
<div class="bot"> <div class="bot">
<el-table-self <el-table-self
...@@ -23,13 +27,11 @@ ...@@ -23,13 +27,11 @@
</template> </template>
<script> <script>
import FormComponents from "@/components/FormComponents" import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin" import paginationMixin from "@/components/TabComponents/mixin"
import { getFollowSurvey } from "@/api/followup" import { getFollowSurvey } from "@/api/followup"
import { getDictDetail } from "@/api/dict.js" import { mapGetters } from "vuex"
export default { export default {
components: { components: {
CustomsTable,
FormComponents, FormComponents,
}, },
mixins: [paginationMixin], mixins: [paginationMixin],
...@@ -60,7 +62,10 @@ export default { ...@@ -60,7 +62,10 @@ export default {
minWidth: 80, minWidth: 80,
value: "sex", value: "sex",
formatter: (row) => { formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "") return this.$handle.formatDicList(
this.dictMap["d-sex"],
row.sex + ""
)
}, },
}, },
{ {
...@@ -84,7 +89,7 @@ export default { ...@@ -84,7 +89,7 @@ export default {
minWidth: 180, minWidth: 180,
value: "screeningTime", value: "screeningTime",
formatter: (row) => { formatter: (row) => {
return row.createTime ? row.createTime : "--" return row.screeningTime ? row.screeningTime : "--"
}, },
}, },
{ {
...@@ -92,7 +97,10 @@ export default { ...@@ -92,7 +97,10 @@ export default {
minWidth: 120, minWidth: 120,
value: "riskRank", value: "riskRank",
formatter: (row) => { formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["risk_level"],String(row.riskRank)) return this.$handle.formatDicList(
this.dictMap["risk_level"],
String(row.riskRank)
)
}, },
}, },
{ {
...@@ -108,15 +116,21 @@ export default { ...@@ -108,15 +116,21 @@ export default {
value: "followBatch", value: "followBatch",
minWidth: 120, minWidth: 120,
formatter: (row) => { formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["follow_type"],String(row.followBatch)) return this.$handle.formatDicList(
this.dictMap["follow_type"],
String(row.followBatch)
)
}, },
}, },
{ {
label: "计划随访时间", label: "计划随访时间",
value: "nextFollowTime", value: "nextFollowTime",
formatter: (row) => { // formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["next_follow_time"],String(row.nextFollowTime)) // return this.$handle.formatDicList(
}, // this.dictMap["next_follow_time"],
// String(row.nextFollowTime)
// )
// },
minWidth: 120, minWidth: 120,
}, },
{ {
...@@ -137,66 +151,7 @@ export default { ...@@ -137,66 +151,7 @@ export default {
], ],
}, },
], ],
tableData: [ tableData: [],
{
"patientId": "1598222607734341634",
"name": "小飞", //姓名
"idCard": "340822199510260215", //身份证
"phone": "18311112222", //手机号
"sex": 1, //性别
"birthday": "2022-12-31 00:00:00", //生日
"age": 18, //年龄
"id": "", //id
"unionName": "合肥高新附院", //医联体名称
"screeningTime": "2022-12-01 00:00:00", //筛查时间
"riskRank": "", //风险等级
"followTime": "", //随访时间
"followContents": "", //随访内容
"nextFollowTime": "", //计划随访时间
"followBatch": 0, //随访进度
"unionId": "2", //联盟id
"riskScore": "", //风险分数
"screeningAdvise": "", //筛查建议
"formRecordId": "", //表单记录id
"linkPhone": "0556-5556666", //联系方式
"isContinueFollow": 1, //是否继续随访
"checkStatus": "", //审核状态
"riskRank":"medium"
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
{
name:'11',
},
],//调试
formList: [ formList: [
{ {
xs: 24, xs: 24,
...@@ -207,7 +162,7 @@ export default { ...@@ -207,7 +162,7 @@ export default {
type: "select", type: "select",
label: "计划随访时间", label: "计划随访时间",
prop: "nextFollowTime", prop: "nextFollowTime",
trans:'next_follow_time', trans: "next_follow_time",
placeholder: "请选择计划随访时间", placeholder: "请选择计划随访时间",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [{ label: "123", value: "1" }],
...@@ -257,10 +212,13 @@ export default { ...@@ -257,10 +212,13 @@ export default {
type: "select", type: "select",
label: "随访进度", label: "随访进度",
prop: "followBatch", prop: "followBatch",
trans:'follow_type', trans: "follow_type",
placeholder: "请选择随访进度", placeholder: "请选择随访进度",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [
{ label: "筛查", value: "0" },
{ label: "随访", value: "1" },
],
}, },
{ {
xs: 1, xs: 1,
...@@ -281,7 +239,7 @@ export default { ...@@ -281,7 +239,7 @@ export default {
marginLeft: "40px", marginLeft: "40px",
}, },
btnText: "查询", btnText: "查询",
func: this.onSearch func: this.onSearch,
}, },
// { // {
// btnType: "tobeModified", // btnType: "tobeModified",
...@@ -290,64 +248,59 @@ export default { ...@@ -290,64 +248,59 @@ export default {
], ],
}, },
], ],
formEdit:{} formEdit: {},
} }
}, },
watch: { computed: {
pageSize(val){ ...mapGetters({
sessionStorage.setItem('followResearch-pageSize',val) selectedIndex: "table/selectedIndex",
}, refreshFlag: "table/refreshFlag",
pageIndex(val){ }),
sessionStorage.setItem('followResearch-pageIndex',val)
}
}, },
created(){ watch: {},
created() {
// this.initColumn() // this.initColumn()
}, },
mounted() { mounted() {
this.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ||{} this.handleSearch() //调试注释
this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 1
this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 10
// this.handleSearch() //调试注释
}, },
methods: { methods: {
changeModified() { changeModified() {
this.modifiedFlag = !this.modifiedFlag this.modifiedFlag = !this.modifiedFlag
}, },
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
changePage(v) { changePage(v) {
this.page[v.type] = v.value this.page[v.type] = v.value
console.log(this.page) console.log(this.page)
this.$refs.customTable.loading = false this.$refs.customTable.loading = false
}, },
onSearch(form) { onSearch(form) {
sessionStorage.setItem('followResearch-form',JSON.stringify(form)) sessionStorage.setItem("followResearch-form", JSON.stringify(form))
this.formEdit = form this.formEdit = form
this.handleSearch() this.handleSearch()
}, },
rowOpration(data, i) { rowOpration(data, i) {
console.log('跳转',data, i) console.log("跳转", data, i)
this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}}) this.$router.push({
path: "/followupentry",
query: { formEdit: JSON.stringify(data) },
})
}, },
async handleSearch(){ async handleSearch() {
this.listLoading = true this.listLoading = true
let params={ let params = {
pageSize:this.pageSize, pageSize: this.pageSize,
pageNum:this.pageIndex pageNum: this.pageIndex,
} }
if(this.formEdit){ params.patientFrom = this.selectedIndex
params=Object.assign(this.formEdit,params) if (this.formEdit) {
params = Object.assign(this.formEdit, params)
} }
let res = await getFollowSurvey(params) let res = await getFollowSurvey(params)
if(res.code==1){ if (res.code == 1) {
//分页内容 //分页内容
const d = res.data const d = res.data
this.total= d.total this.total = d.total
this.tableData=d['records'] this.tableData = d["records"]
} }
this.listLoading = false this.listLoading = false
}, },
......
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