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

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

parent cae50c59
......@@ -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 = {}) {
return request({
......
......@@ -347,6 +347,7 @@
:inactive-value="op.inactiveValue"
></el-switch>
</div>
<!-- 操作文字按钮 -->
<el-button
v-else
:key="opIndex"
......@@ -363,7 +364,7 @@
: op.type || ''
"
: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
......
......@@ -199,7 +199,8 @@ export default {
this.$router.push({
path: "/followaudit",
query: {
id: data['unionId'],
unionId: data['unionId'],
unionName:data['unionName']
},
})
} else {
......
......@@ -4,7 +4,7 @@
<div class="audit-detail_header p-24">
<div class="left">
<span>当前审核</span>
<span class="f-b">{{medicalCombination}}】【剩余{{mcCount}}</span>
<span class="f-b">{{unionName}}】【剩余{{mcCount}}</span>
</div>
<div class="right">
<el-button class="btn" @click="$router.go(-1)">返回</el-button>
......@@ -79,7 +79,7 @@
>
<span>{{item.text}}</span>
</el-tag>
<p class="handle-row">编辑标签</p>
<p class="handle-row" @click="handleEdit">编辑标签</p>
</div>
</div>
</div>
......@@ -107,6 +107,21 @@
</div>
</template>
</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>
</template>
<script>
......@@ -118,7 +133,6 @@ export default {
components: { publicDialog, followReview },
data() {
return {
medicalCombination:'无锡市人民医院医联体',
mcCount:7,
editStatus: false, //进入的状态是第一次审核还是修改审核,false为第一次,true为修改
tabActive:'0', //当前随访病例
......@@ -196,10 +210,16 @@ export default {
},
computed:{
unionId(){
return this.$route.query.id
return this.$route.query.unionId
},
unionName(){
return this.$route.query.unionName || '--'
}
},
methods: {
handleEdit(){
this.$refs.noteDialog.dialogVisible = true
},
showDialog(val,index) {
console.log("显示框",val)
this.curBtn = index+1
......
<template>
<!-- 随访调查录入 -->
<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>
</template>
......@@ -14,9 +21,38 @@ export default {
},
data() {
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() {
this.model = this.$route.query.model
},
methods: {},
}
......
<template>
<!-- 随访查询 -->
<div class="screeningSearch">
<div class="top">
<form-components :forms="formList"></form-components>
<form-components :forms="formList" :formEdit="formEdit" @handleSearch="onSearch"></form-components>
</div>
<div class="bot">
<customs-table
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
......@@ -24,6 +25,9 @@
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
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 {
components: {
FormComponents,
......@@ -39,51 +43,74 @@ export default {
{
label: "医联体",
minWidth: 120,
value: "groupName",
value: "unionName",
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
},
{
label: "姓名",
minWidth: 120,
formatter: (row) => {
return row.name ? row.name : "--"
},
value: "name",
},
{
label: "性别",
minWidth: 120,
minWidth: 80,
value: "sex",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
},
},
{
label: "身份证",
minWidth: 120,
value: "idCard",
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
},
{
label: "年龄",
minWidth: 120,
value: "age",
formatter: (row) => {
return row.age ? row.age : "--"
},
},
{
label: "筛查时间",
minWidth: 120,
value: "screenTime",
minWidth: 180,
value: "screeningTime",
formatter: (row) => {
return row.createTime ? row.createTime : "--"
},
},
{
label: "风险评估结果",
minWidth: 120,
value: "result",
value: "riskRank",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["risk_level"],String(row.riskRank))
},
},
{
label: "上次随访时间",
value: "followTime",
minWidth: 120,
value: "targetFieldCode",
formatter: (row) => {
return row.followTime ? row.followTime : "--"
},
},
{
label: "筛查审核状态",
minWidth: 180,
value: "createTime",
label: "随访进度",
value: "followBatch",
minWidth: 120,
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["follow_type"],String(row.followBatch))
},
},
{
label: "操作",
......@@ -92,6 +119,7 @@ export default {
operType: "button",
operations: [
{
isIndex:true,
func: this.rowOpration,
formatter(row) {
return {
......@@ -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: [
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第er一个",
},
],
tableData: [],
formList: [
{
type: "select",
type: "date",
label: "筛查时间",
prop: "screeningTime",
placeholder: "请选择时间",
rules: [],
opts: [],
valueFormat: "yyyy-MM-dd",
},
{
type: "select",
label: "随访审核状态",
prop: "screeningStatus",
prop: "checkStatus",
trans:"checkStatus",
placeholder: "请选择随访状态",
rules: [],
opts: [],
......@@ -187,7 +172,8 @@ export default {
{
type: "select",
label: "随访进度",
prop: "screeningProgress",
prop: "followBatch",
trans:'follow_type',
placeholder: "请选择随访进度",
rules: [],
opts: [],
......@@ -195,16 +181,31 @@ export default {
{
type: "select",
label: "计划随访时间",
prop: "planScreeningTime",
prop: "nextFollowTime",
trans:'next_follow_time',
placeholder: "请选择计划随访时间",
rules: [],
opts: [],
},
{
type: "input",
label: "关键词",
prop: "keyWord",
placeholder: "请输入医联体/姓名/身份证",
label: "姓名",
prop: "name",
placeholder: "请输入姓名",
rules: [],
},
{
type: "input",
label: "身份证",
prop: "idCard",
placeholder: "请输入身份证",
rules: [],
},
{
type: "input",
label: "医联体",
prop: "unionName",
placeholder: "请输入医联体",
rules: [],
},
{
......@@ -225,18 +226,33 @@ export default {
this.onSearch()
},
},
{
btnType: "tobeModified",
tobeModified: 20,
},
// {
// btnType: "tobeModified",
// tobeModified: 20,
// },
],
},
],
formEdit:{}
}
},
watch: {
pageSize(val){
sessionStorage.setItem('followQuery-pageSize',val)
},
//当前页
pageIndex(val){
sessionStorage.setItem('followQuery-pageIndex',val)
}
},
watch: {},
created(){
this.initSearchForm()
},
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: {
changeModified() {
......@@ -250,11 +266,69 @@ export default {
handleSizeChange(v) {
console.log(v)
},
onSearch() {
console.log(123456)
rowOpration(data, i,index) {
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 {
},
],
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',
},
// {
// "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: [
{
......@@ -299,17 +299,18 @@ export default {
pageSize(val){
sessionStorage.setItem('followResearch-pageSize',val)
},
//当前页
pageIndex(val){
sessionStorage.setItem('followResearch-pageIndex',val)
}
},
created(){
// this.initColumn()
this.initSearchForm()
},
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.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ? JSON.parse(sessionStorage.getItem('followResearch-form')) : {}
this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 10
this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 1
this.getCurrentFormByType(2)
},
methods: {
......@@ -321,20 +322,16 @@ export default {
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
rowOpration(data, i,label) {
console.log('跳转',data, i,label)
this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}})
},
onSearch(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)}})
},
async handleSearch(){
this.listLoading = true
let params={
......@@ -355,13 +352,20 @@ export default {
}
this.listLoading = false
},
// initColumn(){
// this.columns.forEach((item,index) => {
// if(item.trans){
// this.initDict(item.trans,index)
// }
// })
// },
//查询表单枚举值字典
initSearchForm(){
this.formList.forEach((item,index) => {
if(item.trans){
if(!item['opts']){
item['opts']=[]
}
else{
item['opts']=this.dictMap[item.trans]
}
}
})
this.$forceUpdate();
},
// async initDict(type,index){
// let params={
// type:type
......@@ -399,7 +403,7 @@ export default {
.then((res) => {
if (res.code === 1) {
this.formId = res.data[0].id
this.handleSearch() //调试注释
this.handleSearch()
}
})
},
......
......@@ -8,13 +8,12 @@
>
<div v-if="formTabs && formTabs.length > 0" style="position: relative">
<el-button
v-if="!disabled"
v-if="formType == 1 ? !disabled ? true : false : true"
class="draftButton"
:loading="loading"
:disabled="!infoCompelete"
@click="onSubmit(formType)"
>{{ formType == 1 ? "临时保存" : "返回" }}</el-button
>
>{{ formType == 1 ? "临时保存" : "返回" }}</el-button>
<el-tabs
v-model="activeName"
v-loading="fromLoading"
......@@ -70,9 +69,7 @@
<div class="showTips">您可以在【草稿箱】页面找到该数据</div>
</div>
<div class="btn">
<el-button type="primary" :loading="loading" @click="continueSubmit"
>继续添加</el-button
>
<el-button type="primary" :loading="loading" @click="continueSubmit">继续添加</el-button>
</div>
</template>
<!-- 保存提交 -->
......@@ -85,16 +82,8 @@
<div class="showTips">您可以在【筛查查询】页面查询到该数据</div>
</div>
<div class="btn">
<el-button
type="primary"
:loading="loading"
class="textBtn"
@click="viewJump"
>查看</el-button
>
<el-button type="primary" :loading="loading" @click="continueSubmit"
>继续添加</el-button
>
<el-button type="primary" :loading="loading" class="textBtn" @click="viewJump">查看</el-button>
<el-button type="primary" :loading="loading" @click="continueSubmit">继续添加</el-button>
</div>
</template>
</public-dialog>
......@@ -211,8 +200,8 @@ export default {
},
created() {
// 字典formType 1 筛查表单
// console.log('回显2',this.formEdit)
this.getCurrentFormByType(this.formType)
console.log('大表单',this.disabled,this.tabDisabled)
},
methods: {
handleConfirm(data, done, cb) {
......
......@@ -347,6 +347,15 @@ export default {
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) {
if (!this.patientId) return
getRecordList({
......@@ -373,6 +382,7 @@ export default {
watch: {
formEdit(val) {
console.log("回显3", val)
this.formatString(val)
},
formInitial: {
handler(v) {
......@@ -386,7 +396,7 @@ export default {
},
created() {
if (this.$route.query.formEdit) {
this.formData.formEdit = JSON.parse(this.$route.query.formEdit)
this.formatString(JSON.parse(this.$route.query.formEdit))
}
this.initForm()
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