diff --git a/src/components/FormComponents/CustomForm/FormItemText.vue b/src/components/FormComponents/CustomForm/FormItemText.vue
index 81b2b0f915981e71f6250c93f84292f7434935ff..5a69d21a291f466223f00be56972c69cf7d311d8 100644
--- a/src/components/FormComponents/CustomForm/FormItemText.vue
+++ b/src/components/FormComponents/CustomForm/FormItemText.vue
@@ -77,7 +77,8 @@ export default {
},
watch: {
unionList(v) {
- if (v.length > 0) {
+ if (v.length > 0 && this.form[this.item.prop]) {
+ console.log()
this.unionName = v.filter(
(e) => e.unionNo == this.form[this.item.prop]
)[0].unionName
diff --git a/src/store/modules/table.js b/src/store/modules/table.js
index e49519f52fef3e3e513b044b8db71f9b41cb6eda..ed50400f55e4dfb662eac2ea3631f55dc6495ab7 100644
--- a/src/store/modules/table.js
+++ b/src/store/modules/table.js
@@ -1,10 +1,12 @@
const state = {
fontSize: localStorage.getItem("fontSize") || 1,
selectedIndex: sessionStorage.getItem("selectedIndex") || "",
+ refreshFlag: 0,
}
const getters = {
fontSize: (state) => state.fontSize,
selectedIndex: (state) => state.selectedIndex,
+ refreshFlag: (state) => state.refreshFlag,
}
const mutations = {
setFontSize(state, fontSize) {
@@ -18,6 +20,9 @@ const mutations = {
state.selectedIndex = ""
sessionStorage.removeItem("selectedIndex")
},
+ setRefreshFlag(state, refreshFlag) {
+ state.refreshFlag = refreshFlag
+ },
}
const actions = {}
export default {
diff --git a/src/utils/index.js b/src/utils/index.js
index c7f7c1c32e0d9a868d400486911040173181521f..1674bc9f3fd77c05d23e79c780cd78d5335916d5 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -153,7 +153,7 @@ export function getInfoByIdCard(idCard, type = "birthDate") {
d.getFullYear() -
birthdays.getFullYear() -
(d.getMonth() < birthdays.getMonth() ||
- (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate())
+ (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate())
? 1
: 0)
@@ -182,12 +182,12 @@ export function paramObj(url) {
}
return JSON.parse(
'{"' +
- decodeURIComponent(search)
- .replace(/"/g, '\\"')
- .replace(/&/g, '","')
- .replace(/=/g, '":"')
- .replace(/\+/g, " ") +
- '"}'
+ decodeURIComponent(search)
+ .replace(/"/g, '\\"')
+ .replace(/&/g, '","')
+ .replace(/=/g, '":"')
+ .replace(/\+/g, " ") +
+ '"}'
)
}
@@ -489,7 +489,7 @@ export function formatDicList(list, value, connector = ",") {
}
})
}
- console.log('字典', list, value, result)
+ // console.log("字典", list, value, result)
return result
}
/**
@@ -523,7 +523,7 @@ export function changeTime(time) {
let seconds = Math.floor(time % 60) //秒
return `${day ? day + "天" : ""} ${hours ? hours + "小时" : ""}${
minutes ? minutes + "分" : ""
- }${seconds}秒`
+ }${seconds}秒`
}
export default { formatDicList, excelExport }
diff --git a/src/views/dataoverview/index.vue b/src/views/dataoverview/index.vue
index ef416272d234f8fd2c298b8e458a6e6cb632f19a..28b973a967a9b88d6df3962724f0b78698475bf4 100644
--- a/src/views/dataoverview/index.vue
+++ b/src/views/dataoverview/index.vue
@@ -109,7 +109,9 @@ export default {
},
getPatientPage() {
this.listLoading = true
- let data = { patientFrom: this.selectedIndex }
+ let data = {
+ patientFrom: this.selectedIndex == "0" ? null : this.selectedIndex,
+ }
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
diff --git a/src/views/screening/DraftBox.vue b/src/views/screening/DraftBox.vue
index 8cbed63f5a908d78d58957d2f975cdc2e120bc66..bdd6a998c5673da399ad880e8a0c17e9005fca39 100644
--- a/src/views/screening/DraftBox.vue
+++ b/src/views/screening/DraftBox.vue
@@ -145,6 +145,7 @@ export default {
mounted() {},
methods: {
handleAdd({ patientId, name }, index, disabled = false) {
+ sessionStorage.removeItem("index1Data")
this.disabled = disabled
this.patientId = patientId || null
this.name = name
diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue
index 10b34048ed7fd4b83d1dc51dd88f2fa4609e0346..07320daf19519512d02ce02ddab08f0276071ea7 100644
--- a/src/views/screening/components/ConfigForms.vue
+++ b/src/views/screening/components/ConfigForms.vue
@@ -58,10 +58,7 @@
-
+
已保存至草稿箱!
@@ -225,7 +222,7 @@ export default {
},
temporaryConfirm(data, done, cb) {
this.addPatient(data, done, cb, () => {
- console.log("倒了")
+ console.log("临时保存")
this.$refs.showDialog.dialogVisible = true
this.loading = false
})
@@ -270,8 +267,20 @@ export default {
this.$router.push("/screening/add")
}
},
+ // 去查看跳转
viewJump() {
- this.$router.push("/screening/index")
+ console.log(this.patientId)
+ if (this.$route.path == "/screening/index") {
+ this.$store.commit("table/setRefreshFlag", 1)
+ } else {
+ this.$router.push({
+ path: "/screening/index",
+ query: {
+ patientId: this.patientId || this.patientStandbyId,
+ },
+ })
+ }
+ this.$refs.showDialog.dialogVisible = false
// alert("跳转")
},
},
diff --git a/src/views/screening/index.vue b/src/views/screening/index.vue
index 9e3bf66770d57efd667d69142ddabff07e7b478a..2b7a8e59e1d5abd3ae1b3b4c839d252a6380728d 100644
--- a/src/views/screening/index.vue
+++ b/src/views/screening/index.vue
@@ -257,6 +257,7 @@ export default {
disabled = false,
tabDisabled = true
) {
+ sessionStorage.removeItem("index1Data")
this.disabled = disabled
this.tabDisabled = tabDisabled
this.patientId = patientId || null
@@ -306,6 +307,7 @@ export default {
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
+ refreshFlag: "table/refreshFlag",
}),
},
created() {
@@ -313,11 +315,32 @@ export default {
// if (this.$route.path == "/screening/index") {
// this.tabDisabled = false
// }
+ if (this.$route.query.patientId) {
+ let patientId = this.$route.query.patientId
+ // this.$nextTick(() => {
+ this.disabled = true
+ this.tabDisabled = false
+ this.patientId = patientId || null
+ this.isDetail = true
+ // })
+ }
},
watch: {
selectedIndex(v) {
this.handleFormSearch(this.searchForm)
},
+ refreshFlag(v) {
+ if (v) {
+ this.$store.commit("table/setRefreshFlag", 0)
+ this.isDetail = false
+ this.$nextTick(() => {
+ this.handleAdd({
+ patientId: this.patientId,
+ name: "",
+ })
+ })
+ }
+ },
},
}