Commit 4c1641f4 authored by 刘予佳's avatar 刘予佳

随访查询&回显 标签编辑页面

parent cae50c59
...@@ -4,6 +4,14 @@ import request from "@/utils/request"; ...@@ -4,6 +4,14 @@ import request from "@/utils/request";
* 随访 * 随访
* *
* */ * */
//随访查询 列表
export function getFollowSearch(params = {}) {
return request({
url: "/disease-data/follow/search",
method: "get",
params,
});
}
//随访调查 列表 //随访调查 列表
export function getFollowSurvey(params = {}) { export function getFollowSurvey(params = {}) {
return request({ return request({
......
...@@ -347,6 +347,7 @@ ...@@ -347,6 +347,7 @@
:inactive-value="op.inactiveValue" :inactive-value="op.inactiveValue"
></el-switch> ></el-switch>
</div> </div>
<!-- 操作文字按钮 -->
<el-button <el-button
v-else v-else
:key="opIndex" :key="opIndex"
...@@ -363,7 +364,7 @@ ...@@ -363,7 +364,7 @@
: op.type || '' : op.type || ''
" "
:icon="op.icon" :icon="op.icon"
@click="op.func(scope.row, scope.$index)" @click="op.isIndex ? op.func(scope.row, scope.$index,opIndex) :op.func(scope.row, scope.$index)"
> >
{{ {{
op.formatter op.formatter
......
...@@ -199,7 +199,8 @@ export default { ...@@ -199,7 +199,8 @@ export default {
this.$router.push({ this.$router.push({
path: "/followaudit", path: "/followaudit",
query: { query: {
id: data['unionId'], unionId: data['unionId'],
unionName:data['unionName']
}, },
}) })
} else { } else {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="audit-detail_header p-24"> <div class="audit-detail_header p-24">
<div class="left"> <div class="left">
<span>当前审核</span> <span>当前审核</span>
<span class="f-b">{{medicalCombination}}】【剩余{{mcCount}}</span> <span class="f-b">{{unionName}}】【剩余{{mcCount}}</span>
</div> </div>
<div class="right"> <div class="right">
<el-button class="btn" @click="$router.go(-1)">返回</el-button> <el-button class="btn" @click="$router.go(-1)">返回</el-button>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
> >
<span>{{item.text}}</span> <span>{{item.text}}</span>
</el-tag> </el-tag>
<p class="handle-row">编辑标签</p> <p class="handle-row" @click="handleEdit">编辑标签</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -107,6 +107,21 @@ ...@@ -107,6 +107,21 @@
</div> </div>
</template> </template>
</public-dialog> </public-dialog>
<!-- 标签操作 -->
<public-dialog ref="noteDialog" @onSubmit="onSubmit" @onCancel="onCancel">
<template v-if="!confirmStatus" slot="content">
<div class="title">编辑标签</div>
<el-tag
:key="index"
v-for="(item,index) in tagList"
size="medium"
:class="item.isSelect ? '':'unselect-tag'"
@click="seleckTag(item,index)"
>
<span>{{item.text}}</span>
</el-tag>
</template>
</public-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -118,7 +133,6 @@ export default { ...@@ -118,7 +133,6 @@ export default {
components: { publicDialog, followReview }, components: { publicDialog, followReview },
data() { data() {
return { return {
medicalCombination:'无锡市人民医院医联体',
mcCount:7, mcCount:7,
editStatus: false, //进入的状态是第一次审核还是修改审核,false为第一次,true为修改 editStatus: false, //进入的状态是第一次审核还是修改审核,false为第一次,true为修改
tabActive:'0', //当前随访病例 tabActive:'0', //当前随访病例
...@@ -196,10 +210,16 @@ export default { ...@@ -196,10 +210,16 @@ export default {
}, },
computed:{ computed:{
unionId(){ unionId(){
return this.$route.query.id return this.$route.query.unionId
},
unionName(){
return this.$route.query.unionName || '--'
} }
}, },
methods: { methods: {
handleEdit(){
this.$refs.noteDialog.dialogVisible = true
},
showDialog(val,index) { showDialog(val,index) {
console.log("显示框",val) console.log("显示框",val)
this.curBtn = index+1 this.curBtn = index+1
......
<template> <template>
<!-- 随访调查录入 --> <!-- 随访调查录入 -->
<div> <div>
<ConfigForms form-type="2" formClass="follow-form"></ConfigForms> <ConfigForms
form-type="2"
formClass="follow-form"
:patient-id="patientId"
:disabled="disabled"
:tabDisabled="tabDisabled"
:operation="operation"
></ConfigForms>
</div> </div>
</template> </template>
...@@ -14,9 +21,38 @@ export default { ...@@ -14,9 +21,38 @@ export default {
}, },
data() { data() {
return { return {
disabled:false,
tabDisabled:true,
operation:'',
patientId:this.$route.query.patientId,
model:''
}
},
watch:{
model(val){
console.log('val',val)
switch(val){
case 'view':
this.disabled = true
this.tabDisabled = false
this.operation = 'edit'
break;
case 'edit':
this.disabled = false
this.tabDisabled = true
this.operation = 'edit'
break;
default:
this.disabled = false
this.tabDisabled = true
this.operation = ''
break;
}
} }
}, },
created() { created() {
this.model = this.$route.query.model
}, },
methods: {}, methods: {},
} }
......
<template> <template>
<!-- 随访查询 -->
<div class="screeningSearch"> <div class="screeningSearch">
<div class="top"> <div class="top">
<form-components :forms="formList"></form-components> <form-components :forms="formList" :formEdit="formEdit" @handleSearch="onSearch"></form-components>
</div> </div>
<div class="bot"> <div class="bot">
<customs-table <el-table-self
ref="table" ref="table"
:table-data="tableData" :table-data="tableData"
:columns="columns" :columns="columns"
...@@ -24,6 +25,9 @@ ...@@ -24,6 +25,9 @@
import FormComponents from "@/components/FormComponents" import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable" import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin" import paginationMixin from "@/components/TabComponents/mixin"
import { getCurrentFormByType } from "@/api/coop-group.js"
import { getFollowSearch } from "@/api/followup"
import { getDictDetail } from "@/api/dict.js"
export default { export default {
components: { components: {
FormComponents, FormComponents,
...@@ -39,51 +43,74 @@ export default { ...@@ -39,51 +43,74 @@ export default {
{ {
label: "医联体", label: "医联体",
minWidth: 120, minWidth: 120,
value: "groupName", value: "unionName",
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
}, },
{ {
label: "姓名", label: "姓名",
minWidth: 120, minWidth: 120,
formatter: (row) => {
return row.name ? row.name : "--"
},
value: "name", value: "name",
}, },
{ {
label: "性别", label: "性别",
minWidth: 120, minWidth: 80,
value: "sex", value: "sex",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
},
}, },
{ {
label: "身份证", label: "身份证",
minWidth: 120, minWidth: 120,
value: "idCard", value: "idCard",
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
}, },
{ {
label: "年龄", label: "年龄",
minWidth: 120, minWidth: 120,
value: "age", value: "age",
formatter: (row) => {
return row.age ? row.age : "--"
},
}, },
{ {
label: "筛查时间", label: "筛查时间",
minWidth: 120, minWidth: 180,
value: "screenTime", value: "screeningTime",
formatter: (row) => {
return row.createTime ? row.createTime : "--"
},
}, },
{ {
label: "风险评估结果", label: "风险评估结果",
minWidth: 120, minWidth: 120,
value: "result", value: "riskRank",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["risk_level"],String(row.riskRank))
},
}, },
{ {
label: "上次随访时间", label: "上次随访时间",
value: "followTime",
minWidth: 120, minWidth: 120,
value: "targetFieldCode", formatter: (row) => {
return row.followTime ? row.followTime : "--"
},
}, },
{ {
label: "筛查审核状态", label: "随访进度",
minWidth: 180, value: "followBatch",
value: "createTime", minWidth: 120,
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["follow_type"],String(row.followBatch))
},
}, },
{ {
label: "操作", label: "操作",
...@@ -92,6 +119,7 @@ export default { ...@@ -92,6 +119,7 @@ export default {
operType: "button", operType: "button",
operations: [ operations: [
{ {
isIndex:true,
func: this.rowOpration, func: this.rowOpration,
formatter(row) { formatter(row) {
return { return {
...@@ -100,86 +128,43 @@ export default { ...@@ -100,86 +128,43 @@ export default {
} }
}, },
}, },
{
isIndex:true,
func: this.rowOpration,
formatter(row) {
if (row.checkStatus != 3 && row.checkStatus != 4) {
return {
label: "修改",
type: "text",
}
} else {
return {
label: "",
type: "text",
style: {
display: "none",
},
}
}
},
},
], ],
}, },
], ],
tableData: [ tableData: [],
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第er一个",
},
],
formList: [ formList: [
{ {
type: "select", type: "date",
label: "筛查时间", label: "筛查时间",
prop: "screeningTime", prop: "screeningTime",
placeholder: "请选择时间", placeholder: "请选择时间",
rules: [], valueFormat: "yyyy-MM-dd",
opts: [],
}, },
{ {
type: "select", type: "select",
label: "随访审核状态", label: "随访审核状态",
prop: "screeningStatus", prop: "checkStatus",
trans:"checkStatus",
placeholder: "请选择随访状态", placeholder: "请选择随访状态",
rules: [], rules: [],
opts: [], opts: [],
...@@ -187,7 +172,8 @@ export default { ...@@ -187,7 +172,8 @@ export default {
{ {
type: "select", type: "select",
label: "随访进度", label: "随访进度",
prop: "screeningProgress", prop: "followBatch",
trans:'follow_type',
placeholder: "请选择随访进度", placeholder: "请选择随访进度",
rules: [], rules: [],
opts: [], opts: [],
...@@ -195,16 +181,31 @@ export default { ...@@ -195,16 +181,31 @@ export default {
{ {
type: "select", type: "select",
label: "计划随访时间", label: "计划随访时间",
prop: "planScreeningTime", prop: "nextFollowTime",
trans:'next_follow_time',
placeholder: "请选择计划随访时间", placeholder: "请选择计划随访时间",
rules: [], rules: [],
opts: [], opts: [],
}, },
{ {
type: "input", type: "input",
label: "关键词", label: "姓名",
prop: "keyWord", prop: "name",
placeholder: "请输入医联体/姓名/身份证", placeholder: "请输入姓名",
rules: [],
},
{
type: "input",
label: "身份证",
prop: "idCard",
placeholder: "请输入身份证",
rules: [],
},
{
type: "input",
label: "医联体",
prop: "unionName",
placeholder: "请输入医联体",
rules: [], rules: [],
}, },
{ {
...@@ -225,18 +226,33 @@ export default { ...@@ -225,18 +226,33 @@ export default {
this.onSearch() this.onSearch()
}, },
}, },
{ // {
btnType: "tobeModified", // btnType: "tobeModified",
tobeModified: 20, // tobeModified: 20,
}, // },
], ],
}, },
], ],
formEdit:{}
}
},
watch: {
pageSize(val){
sessionStorage.setItem('followQuery-pageSize',val)
},
//当前页
pageIndex(val){
sessionStorage.setItem('followQuery-pageIndex',val)
} }
}, },
watch: {}, created(){
this.initSearchForm()
},
mounted() { mounted() {
this.total = 20 // this.formEdit = sessionStorage.getItem('followQuery-form') ? JSON.parse(sessionStorage.getItem('followQuery-form')) : {}
this.pageSize = Number(sessionStorage.getItem('followQuery-pageSize')) || 10
this.pageIndex = Number(sessionStorage.getItem('followQuery-pageIndex')) || 1
this.getCurrentFormByType(2)
}, },
methods: { methods: {
changeModified() { changeModified() {
...@@ -250,11 +266,69 @@ export default { ...@@ -250,11 +266,69 @@ export default {
handleSizeChange(v) { handleSizeChange(v) {
console.log(v) console.log(v)
}, },
onSearch() { rowOpration(data, i,index) {
console.log(123456) let model = 0
switch(index){
case 0:
model = 'view'
break;
case 1:
model = 'edit'
break;
}
this.$router.push({path:"/followupentry",query:{patientId:data.patientId,model:model}})
},
onSearch(form) {
sessionStorage.setItem('followQuery-form',JSON.stringify(form))
this.formEdit = form
this.handleSearch()
},
async handleSearch(){
this.listLoading = true
let params={
pageSize:this.pageSize,
pageNum:this.pageIndex,
formId:this.formId,
patientFrom:sessionStorage.getItem('selectedIndex') //筛查场景
}
if(this.formEdit){
params=Object.assign(this.formEdit,params)
}
let res = await getFollowSearch(params)
if(res.code==1){
//分页内容
const d = res.data
this.total= d.total
this.tableData=d['records']
}
this.listLoading = false
},
//查询表单枚举值字典
initSearchForm(){
this.formList.forEach((item,index) => {
if(item.trans){
if(!item['opts']){
item['opts']=[]
}
else{
item['opts']=this.dictMap[item.trans]
}
}
})
this.$forceUpdate();
}, },
rowOpration(row, index) { //获取随访表单类型
console.log(row, index) getCurrentFormByType(type) {
getCurrentFormByType({
type,
groupId: this.$store.state.user.group.groupId || '',
})
.then((res) => {
if (res.code === 1) {
this.formId = res.data[0].id
this.handleSearch()
}
})
}, },
}, },
} }
......
...@@ -140,64 +140,64 @@ export default { ...@@ -140,64 +140,64 @@ export default {
}, },
], ],
tableData: [ tableData: [
{ // {
"patientId": "1598222607734341634", // "patientId": "1598222607734341634",
"name": "小飞", //姓名 // "name": "小飞", //姓名
"idCard": "340822199510260215", //身份证 // "idCard": "340822199510260215", //身份证
"phone": "18311112222", //手机号 // "phone": "18311112222", //手机号
"sex": 1, //性别 // "sex": 1, //性别
"birthday": "2022-12-31 00:00:00", //生日 // "birthday": "2022-12-31 00:00:00", //生日
"age": 18, //年龄 // "age": 18, //年龄
"id": "", //id // "id": "", //id
"unionName": "合肥高新附院", //医联体名称 // "unionName": "合肥高新附院", //医联体名称
"screeningTime": "2022-12-01 00:00:00", //筛查时间 // "screeningTime": "2022-12-01 00:00:00", //筛查时间
"riskRank": "", //风险等级 // "riskRank": "", //风险等级
"followTime": "", //随访时间 // "followTime": "", //随访时间
"followContents": "", //随访内容 // "followContents": "", //随访内容
"nextFollowTime": "", //计划随访时间 // "nextFollowTime": "", //计划随访时间
"followBatch": 0, //随访进度 // "followBatch": 0, //随访进度
"unionId": "2", //联盟id // "unionId": "2", //联盟id
"riskScore": "", //风险分数 // "riskScore": "", //风险分数
"screeningAdvise": "", //筛查建议 // "screeningAdvise": "", //筛查建议
"formRecordId": "", //表单记录id // "formRecordId": "", //表单记录id
"linkPhone": "0556-5556666", //联系方式 // "linkPhone": "0556-5556666", //联系方式
"isContinueFollow": 1, //是否继续随访 // "isContinueFollow": 1, //是否继续随访
"checkStatus": "", //审核状态 // "checkStatus": "", //审核状态
"riskRank":"medium" // "riskRank":"medium"
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
{ // {
name:'11', // name:'11',
}, // },
],//调试 ],//调试
formList: [ formList: [
{ {
...@@ -299,17 +299,18 @@ export default { ...@@ -299,17 +299,18 @@ export default {
pageSize(val){ pageSize(val){
sessionStorage.setItem('followResearch-pageSize',val) sessionStorage.setItem('followResearch-pageSize',val)
}, },
//当前页
pageIndex(val){ pageIndex(val){
sessionStorage.setItem('followResearch-pageIndex',val) sessionStorage.setItem('followResearch-pageIndex',val)
} }
}, },
created(){ created(){
// this.initColumn() this.initSearchForm()
}, },
mounted() { mounted() {
this.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ||{} this.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ? JSON.parse(sessionStorage.getItem('followResearch-form')) : {}
this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 1 this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 10
this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 10 this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 1
this.getCurrentFormByType(2) this.getCurrentFormByType(2)
}, },
methods: { methods: {
...@@ -321,20 +322,16 @@ export default { ...@@ -321,20 +322,16 @@ export default {
this.selectedIndex = i this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex) sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
}, },
changePage(v) { rowOpration(data, i,label) {
this.page[v.type] = v.value console.log('跳转',data, i,label)
console.log(this.page) this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}})
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) {
console.log('跳转',data, i)
this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}})
},
async handleSearch(){ async handleSearch(){
this.listLoading = true this.listLoading = true
let params={ let params={
...@@ -355,13 +352,20 @@ export default { ...@@ -355,13 +352,20 @@ export default {
} }
this.listLoading = false this.listLoading = false
}, },
// initColumn(){ //查询表单枚举值字典
// this.columns.forEach((item,index) => { initSearchForm(){
// if(item.trans){ this.formList.forEach((item,index) => {
// this.initDict(item.trans,index) if(item.trans){
// } if(!item['opts']){
// }) item['opts']=[]
// }, }
else{
item['opts']=this.dictMap[item.trans]
}
}
})
this.$forceUpdate();
},
// async initDict(type,index){ // async initDict(type,index){
// let params={ // let params={
// type:type // type:type
...@@ -399,7 +403,7 @@ export default { ...@@ -399,7 +403,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code === 1) { if (res.code === 1) {
this.formId = res.data[0].id this.formId = res.data[0].id
this.handleSearch() //调试注释 this.handleSearch()
} }
}) })
}, },
......
...@@ -8,13 +8,12 @@ ...@@ -8,13 +8,12 @@
> >
<div v-if="formTabs && formTabs.length > 0" style="position: relative"> <div v-if="formTabs && formTabs.length > 0" style="position: relative">
<el-button <el-button
v-if="!disabled" v-if="formType == 1 ? !disabled ? true : false : true"
class="draftButton" class="draftButton"
:loading="loading" :loading="loading"
:disabled="!infoCompelete" :disabled="!infoCompelete"
@click="onSubmit(formType)" @click="onSubmit(formType)"
>{{ formType == 1 ? "临时保存" : "返回" }}</el-button >{{ formType == 1 ? "临时保存" : "返回" }}</el-button>
>
<el-tabs <el-tabs
v-model="activeName" v-model="activeName"
v-loading="fromLoading" v-loading="fromLoading"
...@@ -70,9 +69,7 @@ ...@@ -70,9 +69,7 @@
<div class="showTips">您可以在【草稿箱】页面找到该数据</div> <div class="showTips">您可以在【草稿箱】页面找到该数据</div>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="primary" :loading="loading" @click="continueSubmit" <el-button type="primary" :loading="loading" @click="continueSubmit">继续添加</el-button>
>继续添加</el-button
>
</div> </div>
</template> </template>
<!-- 保存提交 --> <!-- 保存提交 -->
...@@ -85,16 +82,8 @@ ...@@ -85,16 +82,8 @@
<div class="showTips">您可以在【筛查查询】页面查询到该数据</div> <div class="showTips">您可以在【筛查查询】页面查询到该数据</div>
</div> </div>
<div class="btn"> <div class="btn">
<el-button <el-button type="primary" :loading="loading" class="textBtn" @click="viewJump">查看</el-button>
type="primary" <el-button type="primary" :loading="loading" @click="continueSubmit">继续添加</el-button>
:loading="loading"
class="textBtn"
@click="viewJump"
>查看</el-button
>
<el-button type="primary" :loading="loading" @click="continueSubmit"
>继续添加</el-button
>
</div> </div>
</template> </template>
</public-dialog> </public-dialog>
...@@ -211,8 +200,8 @@ export default { ...@@ -211,8 +200,8 @@ export default {
}, },
created() { created() {
// 字典formType 1 筛查表单 // 字典formType 1 筛查表单
// console.log('回显2',this.formEdit)
this.getCurrentFormByType(this.formType) this.getCurrentFormByType(this.formType)
console.log('大表单',this.disabled,this.tabDisabled)
}, },
methods: { methods: {
handleConfirm(data, done, cb) { handleConfirm(data, done, cb) {
......
...@@ -347,6 +347,15 @@ export default { ...@@ -347,6 +347,15 @@ export default {
this.formCacheList.push(this.deepClone(this.formData)) this.formCacheList.push(this.deepClone(this.formData))
} }
}, },
// 表单数据转化
formatString(form){
for (const key in form) {
Object.prototype.toString.call(form[key]) == "[object Number]"
? (form[key] = String(form[key]))
: ""
}
this.formData.formEdit = form
},
getRecordList(formRecordId) { getRecordList(formRecordId) {
if (!this.patientId) return if (!this.patientId) return
getRecordList({ getRecordList({
...@@ -373,6 +382,7 @@ export default { ...@@ -373,6 +382,7 @@ export default {
watch: { watch: {
formEdit(val) { formEdit(val) {
console.log("回显3", val) console.log("回显3", val)
this.formatString(val)
}, },
formInitial: { formInitial: {
handler(v) { handler(v) {
...@@ -386,7 +396,7 @@ export default { ...@@ -386,7 +396,7 @@ export default {
}, },
created() { created() {
if (this.$route.query.formEdit) { if (this.$route.query.formEdit) {
this.formData.formEdit = JSON.parse(this.$route.query.formEdit) this.formatString(JSON.parse(this.$route.query.formEdit))
} }
this.initForm() this.initForm()
if (this.getAll) { if (this.getAll) {
......
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