Commit ebb93c18 authored by miaojiale's avatar miaojiale

1.随访列表接口

parent 7c2f99d1
......@@ -2,7 +2,11 @@
<!-- 随访调查 -->
<div class="screeningSearch">
<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 class="bot">
<el-table-self
......@@ -23,13 +27,11 @@
</template>
<script>
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import { getFollowSurvey } from "@/api/followup"
import { getDictDetail } from "@/api/dict.js"
import { mapGetters } from "vuex"
export default {
components: {
CustomsTable,
FormComponents,
},
mixins: [paginationMixin],
......@@ -60,7 +62,10 @@ export default {
minWidth: 80,
value: "sex",
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 {
minWidth: 180,
value: "screeningTime",
formatter: (row) => {
return row.createTime ? row.createTime : "--"
return row.screeningTime ? row.screeningTime : "--"
},
},
{
......@@ -92,7 +97,10 @@ export default {
minWidth: 120,
value: "riskRank",
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 {
value: "followBatch",
minWidth: 120,
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: "计划随访时间",
value: "nextFollowTime",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["next_follow_time"],String(row.nextFollowTime))
},
// formatter: (row) => {
// return this.$handle.formatDicList(
// this.dictMap["next_follow_time"],
// String(row.nextFollowTime)
// )
// },
minWidth: 120,
},
{
......@@ -137,66 +151,7 @@ export default {
],
},
],
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',
},
],//调试
tableData: [],
formList: [
{
xs: 24,
......@@ -207,7 +162,7 @@ export default {
type: "select",
label: "计划随访时间",
prop: "nextFollowTime",
trans:'next_follow_time',
trans: "next_follow_time",
placeholder: "请选择计划随访时间",
rules: [],
opts: [{ label: "123", value: "1" }],
......@@ -257,10 +212,13 @@ export default {
type: "select",
label: "随访进度",
prop: "followBatch",
trans:'follow_type',
trans: "follow_type",
placeholder: "请选择随访进度",
rules: [],
opts: [{ label: "123", value: "1" }],
opts: [
{ label: "筛查", value: "0" },
{ label: "随访", value: "1" },
],
},
{
xs: 1,
......@@ -281,7 +239,7 @@ export default {
marginLeft: "40px",
},
btnText: "查询",
func: this.onSearch
func: this.onSearch,
},
// {
// btnType: "tobeModified",
......@@ -290,64 +248,59 @@ export default {
],
},
],
formEdit:{}
formEdit: {},
}
},
watch: {
pageSize(val){
sessionStorage.setItem('followResearch-pageSize',val)
},
pageIndex(val){
sessionStorage.setItem('followResearch-pageIndex',val)
}
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
refreshFlag: "table/refreshFlag",
}),
},
created(){
watch: {},
created() {
// this.initColumn()
},
mounted() {
this.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ||{}
this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 1
this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 10
// this.handleSearch() //调试注释
this.handleSearch() //调试注释
},
methods: {
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
changePage(v) {
this.page[v.type] = v.value
console.log(this.page)
this.$refs.customTable.loading = false
},
onSearch(form) {
sessionStorage.setItem('followResearch-form',JSON.stringify(form))
sessionStorage.setItem("followResearch-form", JSON.stringify(form))
this.formEdit = form
this.handleSearch()
},
rowOpration(data, i) {
console.log('跳转',data, i)
this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}})
console.log("跳转", data, i)
this.$router.push({
path: "/followupentry",
query: { formEdit: JSON.stringify(data) },
})
},
async handleSearch(){
async handleSearch() {
this.listLoading = true
let params={
pageSize:this.pageSize,
pageNum:this.pageIndex
let params = {
pageSize: this.pageSize,
pageNum: this.pageIndex,
}
if(this.formEdit){
params=Object.assign(this.formEdit,params)
params.patientFrom = this.selectedIndex
if (this.formEdit) {
params = Object.assign(this.formEdit, params)
}
let res = await getFollowSurvey(params)
if(res.code==1){
if (res.code == 1) {
//分页内容
const d = res.data
this.total= d.total
this.tableData=d['records']
this.total = d.total
this.tableData = d["records"]
}
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