From c41edeb92a90a2addbbb81bc29927a7097d4eeeb Mon Sep 17 00:00:00 2001
From: miaojiale <1123971748@qq.com>
Date: Mon, 13 Mar 2023 15:20:54 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=A4=84=E7=90=86=E7=99=BB=E5=BD=95=202.?=
=?UTF-8?q?=E9=9A=8F=E8=AE=BF=E5=BD=95=E5=85=A5=203.=E9=9A=8F=E8=AE=BF?=
=?UTF-8?q?=E9=A3=8E=E9=99=A9=E8=AF=84=E4=BC=B0=204.=E9=9A=8F=E8=AE=BF?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=81=94=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/patient.js | 9 +
src/components/layout/index.vue | 3 +-
src/layouts/components/NavBar/index.vue | 8 +-
src/views/followupentry/index.vue | 54 +++++-
src/views/followupquery/index.vue | 158 +++++++++++-------
src/views/followupresearch/index.vue | 7 +-
.../screening/components/ConfigForms.vue | 131 +++++++++++----
src/views/screening/components/FormTab.vue | 62 +++++--
src/views/screening/components/mixin.js | 3 +-
9 files changed, 317 insertions(+), 118 deletions(-)
diff --git a/src/api/patient.js b/src/api/patient.js
index e69c186..fd37c67 100644
--- a/src/api/patient.js
+++ b/src/api/patient.js
@@ -69,6 +69,15 @@ export function getPatientDetail(params = {}) {
})
}
+/* 随访患者数据详情 */
+export function getFollowDetail(params = {}) {
+ return request({
+ url: "/disease-data/data/patient/follow/info",
+ method: "get",
+ params,
+ })
+}
+
/* 获取表单填报记录list*/
export function getRecordList(params = {}) {
return request({
diff --git a/src/components/layout/index.vue b/src/components/layout/index.vue
index 697ada4..91a4755 100644
--- a/src/components/layout/index.vue
+++ b/src/components/layout/index.vue
@@ -135,7 +135,7 @@ export default {
},
],
},
- allianceToken: getAccessToken(),
+ allianceToken: "",
currentRoute: this.$route.path,
userInfo: {},
}
@@ -152,6 +152,7 @@ export default {
// if (localStorage.getItem('allianceToken')) {
// this.$router.push('/datacenter/home')
// }
+ this.allianceToken = getAccessToken()
this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
},
methods: {
diff --git a/src/layouts/components/NavBar/index.vue b/src/layouts/components/NavBar/index.vue
index da66aca..cb94524 100644
--- a/src/layouts/components/NavBar/index.vue
+++ b/src/layouts/components/NavBar/index.vue
@@ -174,9 +174,11 @@ export default {
// this.getMessage()
},
mounted() {
- document
- .querySelector(".messageBox")
- .addEventListener("scroll", this.scrolling)
+ if (document.querySelector(".messageBox")) {
+ document
+ .querySelector(".messageBox")
+ .addEventListener("scroll", this.scrolling)
+ }
},
methods: {
scrolling() {
diff --git a/src/views/followupentry/index.vue b/src/views/followupentry/index.vue
index 497e97a..271ab6a 100644
--- a/src/views/followupentry/index.vue
+++ b/src/views/followupentry/index.vue
@@ -2,10 +2,14 @@
-
+
{
- return this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
+ return this.$handle.formatDicList(
+ this.dictMap["d-sex"],
+ row.sex + ""
+ )
},
},
{
@@ -93,7 +101,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)
+ )
},
},
{
@@ -109,7 +120,10 @@ 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)
+ )
},
},
{
@@ -119,7 +133,7 @@ export default {
operType: "button",
operations: [
{
- isIndex:true,
+ isIndex: true,
func: this.rowOpration,
formatter(row) {
return {
@@ -129,8 +143,8 @@ export default {
},
},
{
- isIndex:true,
- func: this.rowOpration,
+ isIndex: true,
+ func: this.handleEdit,
formatter(row) {
if (row.checkStatus != 3 && row.checkStatus != 4) {
return {
@@ -164,7 +178,7 @@ export default {
type: "select",
label: "随访审核状态",
prop: "checkStatus",
- trans:"checkStatus",
+ trans: "checkStatus",
placeholder: "请选择随访状态",
rules: [],
opts: [],
@@ -173,7 +187,7 @@ export default {
type: "select",
label: "随访进度",
prop: "followBatch",
- trans:'follow_type',
+ trans: "follow_type",
placeholder: "请选择随访进度",
rules: [],
opts: [],
@@ -182,7 +196,7 @@ export default {
type: "select",
label: "计划随访时间",
prop: "nextFollowTime",
- trans:'next_follow_time',
+ trans: "next_follow_time",
placeholder: "请选择计划随访时间",
rules: [],
opts: [],
@@ -233,25 +247,43 @@ export default {
],
},
],
- formEdit:{}
+ formEdit: {},
}
},
watch: {
- pageSize(val){
- sessionStorage.setItem('followQuery-pageSize',val)
+ pageSize(val) {
+ sessionStorage.setItem("followQuery-pageSize", val)
},
//当前页
- pageIndex(val){
- sessionStorage.setItem('followQuery-pageIndex',val)
- }
+ pageIndex(val) {
+ sessionStorage.setItem("followQuery-pageIndex", val)
+ },
+ followId(v) {
+ if (v) {
+ this.listLoading = true
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.listLoading = false
+ let query = { ...this.$route.query }
+ this.$router.replace({ query: {} })
+ this.$router.push({
+ path: "/followupentry",
+ query: query,
+ })
+ }, 500)
+ })
+ }
+ },
},
- created(){
+ created() {
this.initSearchForm()
},
mounted() {
+ this.followId = this.$route.query.followId
// 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.pageSize = Number(sessionStorage.getItem("followQuery-pageSize")) || 10
+ this.pageIndex =
+ Number(sessionStorage.getItem("followQuery-pageIndex")) || 1
this.getCurrentFormByType(2)
},
methods: {
@@ -266,69 +298,77 @@ export default {
handleSizeChange(v) {
console.log(v)
},
- 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}})
+ handleEdit(data, i, index) {
+ this.$router.push({
+ path: "/followupentry",
+ query: {
+ patientId: data.patientId,
+ followId: data.id,
+ model: "edit",
+ getData: 1,
+ },
+ })
+ },
+ rowOpration(data, i, index) {
+ this.$router.push({
+ path: "/followupentry",
+ query: {
+ patientId: data.patientId,
+ followId: data.id,
+ model: "view",
+ getData: 1,
+ },
+ })
},
onSearch(form) {
- sessionStorage.setItem('followQuery-form',JSON.stringify(form))
+ sessionStorage.setItem("followQuery-form", JSON.stringify(form))
this.formEdit = form
this.handleSearch()
},
- async handleSearch(){
+ async handleSearch() {
this.listLoading = true
- let params={
- pageSize:this.pageSize,
- pageNum:this.pageIndex,
- formId:this.formId,
- patientFrom:sessionStorage.getItem('selectedIndex') //筛查场景
+ let params = {
+ pageSize: this.pageSize,
+ pageNum: this.pageIndex,
+ formId: this.formId,
+ patientFrom: sessionStorage.getItem("selectedIndex"), //筛查场景
}
- if(this.formEdit){
- params=Object.assign(this.formEdit,params)
+ if (this.formEdit) {
+ params = Object.assign(this.formEdit, params)
}
let res = await getFollowSearch(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
},
//查询表单枚举值字典
- initSearchForm(){
- this.formList.forEach((item,index) => {
- if(item.trans){
- if(!item['opts']){
- item['opts']=[]
- }
- else{
- item['opts']=this.dictMap[item.trans]
+ initSearchForm() {
+ this.formList.forEach((item, index) => {
+ if (item.trans) {
+ if (!item["opts"]) {
+ item["opts"] = []
+ } else {
+ item["opts"] = this.dictMap[item.trans]
}
}
})
- this.$forceUpdate();
+ this.$forceUpdate()
},
//获取随访表单类型
getCurrentFormByType(type) {
getCurrentFormByType({
type,
- groupId: this.$store.state.user.group.groupId || '',
+ groupId: this.$store.state.user.group.groupId || "",
+ }).then((res) => {
+ if (res.code === 1) {
+ this.formId = res.data[0].id
+ this.handleSearch()
+ }
})
- .then((res) => {
- if (res.code === 1) {
- this.formId = res.data[0].id
- this.handleSearch()
- }
- })
},
},
}
diff --git a/src/views/followupresearch/index.vue b/src/views/followupresearch/index.vue
index 09822a1..0240872 100644
--- a/src/views/followupresearch/index.vue
+++ b/src/views/followupresearch/index.vue
@@ -284,7 +284,12 @@ export default {
console.log("跳转", data, i)
sessionStorage.setItem("formEdit", JSON.stringify(data))
this.$router.push({
- path: `/followupentry?patientId=${data.patientId}`,
+ path: `/followupentry`,
+ query: {
+ patientId: data.patientId,
+ getData: 0,
+ model: "add",
+ },
})
},
async handleSearch() {
diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue
index d6793c1..d6dec73 100644
--- a/src/views/screening/components/ConfigForms.vue
+++ b/src/views/screening/components/ConfigForms.vue
@@ -40,15 +40,16 @@
:patient-standby-id="patientStandbyId"
:newform-record-id="newformRecordId"
:form="form"
- :formType="formType"
+ :form-type="formType"
+ :get-data="getData"
:disabled="disabled"
:operation="operation"
- :isDraft="isDraft"
+ :is-draft="isDraft"
:active-name="activeName"
contrast
:form-initial="formInitial"
:survival-flag="survivalFlag"
- :followId="followId"
+ :follow-id="followId"
@setFormJson="setFormJson"
@handleConfirm="handleConfirm"
@onPrev="onPrev"
@@ -61,6 +62,7 @@
+
@@ -100,6 +102,35 @@
+
+