Commit 8b10791c authored by miaojiale's avatar miaojiale

1.数据概览筛查概览不传

2.提交跳转筛查查询,查询当前数据
3.筛查查询修改后操作
parent 926815d9
......@@ -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
......
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 {
......
......@@ -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 }
......@@ -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) {
......
......@@ -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
......
......@@ -58,10 +58,7 @@
</el-tabs>
</div>
<el-empty v-else description="暂无数据"></el-empty>
<public-dialog
ref="showDialog"
:show-close="dialogType == 'draft' ? true : false"
>
<public-dialog ref="showDialog" :show-close="true">
<!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content">
<div class="title center">已保存至草稿箱!</div>
......@@ -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("跳转")
},
},
......
......@@ -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: "",
})
})
}
},
},
}
</script>
......
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