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: {},
}
......
This diff is collapsed.
......@@ -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