Commit 8b10791c authored by miaojiale's avatar miaojiale

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

2.提交跳转筛查查询,查询当前数据
3.筛查查询修改后操作
parent 926815d9
...@@ -77,7 +77,8 @@ export default { ...@@ -77,7 +77,8 @@ export default {
}, },
watch: { watch: {
unionList(v) { unionList(v) {
if (v.length > 0) { if (v.length > 0 && this.form[this.item.prop]) {
console.log()
this.unionName = v.filter( this.unionName = v.filter(
(e) => e.unionNo == this.form[this.item.prop] (e) => e.unionNo == this.form[this.item.prop]
)[0].unionName )[0].unionName
......
const state = { const state = {
fontSize: localStorage.getItem("fontSize") || 1, fontSize: localStorage.getItem("fontSize") || 1,
selectedIndex: sessionStorage.getItem("selectedIndex") || "", selectedIndex: sessionStorage.getItem("selectedIndex") || "",
refreshFlag: 0,
} }
const getters = { const getters = {
fontSize: (state) => state.fontSize, fontSize: (state) => state.fontSize,
selectedIndex: (state) => state.selectedIndex, selectedIndex: (state) => state.selectedIndex,
refreshFlag: (state) => state.refreshFlag,
} }
const mutations = { const mutations = {
setFontSize(state, fontSize) { setFontSize(state, fontSize) {
...@@ -18,6 +20,9 @@ const mutations = { ...@@ -18,6 +20,9 @@ const mutations = {
state.selectedIndex = "" state.selectedIndex = ""
sessionStorage.removeItem("selectedIndex") sessionStorage.removeItem("selectedIndex")
}, },
setRefreshFlag(state, refreshFlag) {
state.refreshFlag = refreshFlag
},
} }
const actions = {} const actions = {}
export default { export default {
......
...@@ -153,7 +153,7 @@ export function getInfoByIdCard(idCard, type = "birthDate") { ...@@ -153,7 +153,7 @@ export function getInfoByIdCard(idCard, type = "birthDate") {
d.getFullYear() - d.getFullYear() -
birthdays.getFullYear() - birthdays.getFullYear() -
(d.getMonth() < birthdays.getMonth() || (d.getMonth() < birthdays.getMonth() ||
(d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate())
? 1 ? 1
: 0) : 0)
...@@ -182,12 +182,12 @@ export function paramObj(url) { ...@@ -182,12 +182,12 @@ export function paramObj(url) {
} }
return JSON.parse( return JSON.parse(
'{"' + '{"' +
decodeURIComponent(search) decodeURIComponent(search)
.replace(/"/g, '\\"') .replace(/"/g, '\\"')
.replace(/&/g, '","') .replace(/&/g, '","')
.replace(/=/g, '":"') .replace(/=/g, '":"')
.replace(/\+/g, " ") + .replace(/\+/g, " ") +
'"}' '"}'
) )
} }
...@@ -489,7 +489,7 @@ export function formatDicList(list, value, connector = ",") { ...@@ -489,7 +489,7 @@ export function formatDicList(list, value, connector = ",") {
} }
}) })
} }
console.log('字典', list, value, result) // console.log("字典", list, value, result)
return result return result
} }
/** /**
...@@ -523,7 +523,7 @@ export function changeTime(time) { ...@@ -523,7 +523,7 @@ export function changeTime(time) {
let seconds = Math.floor(time % 60) //秒 let seconds = Math.floor(time % 60) //秒
return `${day ? day + "" : ""} ${hours ? hours + "小时" : ""}${ return `${day ? day + "" : ""} ${hours ? hours + "小时" : ""}${
minutes ? minutes + "" : "" minutes ? minutes + "" : ""
}${seconds}秒` }${seconds}秒`
} }
export default { formatDicList, excelExport } export default { formatDicList, excelExport }
...@@ -109,7 +109,9 @@ export default { ...@@ -109,7 +109,9 @@ export default {
}, },
getPatientPage() { getPatientPage() {
this.listLoading = true this.listLoading = true
let data = { patientFrom: this.selectedIndex } let data = {
patientFrom: this.selectedIndex == "0" ? null : this.selectedIndex,
}
getPatientPage(data).then((res) => { getPatientPage(data).then((res) => {
this.listLoading = false this.listLoading = false
if (res.code === 1) { if (res.code === 1) {
......
...@@ -145,6 +145,7 @@ export default { ...@@ -145,6 +145,7 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
handleAdd({ patientId, name }, index, disabled = false) { handleAdd({ patientId, name }, index, disabled = false) {
sessionStorage.removeItem("index1Data")
this.disabled = disabled this.disabled = disabled
this.patientId = patientId || null this.patientId = patientId || null
this.name = name this.name = name
......
...@@ -58,10 +58,7 @@ ...@@ -58,10 +58,7 @@
</el-tabs> </el-tabs>
</div> </div>
<el-empty v-else description="暂无数据"></el-empty> <el-empty v-else description="暂无数据"></el-empty>
<public-dialog <public-dialog ref="showDialog" :show-close="true">
ref="showDialog"
:show-close="dialogType == 'draft' ? true : false"
>
<!-- 保存草稿 --> <!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content"> <template v-if="dialogType == 'draft'" slot="content">
<div class="title center">已保存至草稿箱!</div> <div class="title center">已保存至草稿箱!</div>
...@@ -225,7 +222,7 @@ export default { ...@@ -225,7 +222,7 @@ export default {
}, },
temporaryConfirm(data, done, cb) { temporaryConfirm(data, done, cb) {
this.addPatient(data, done, cb, () => { this.addPatient(data, done, cb, () => {
console.log("倒了") console.log("临时保存")
this.$refs.showDialog.dialogVisible = true this.$refs.showDialog.dialogVisible = true
this.loading = false this.loading = false
}) })
...@@ -270,8 +267,20 @@ export default { ...@@ -270,8 +267,20 @@ export default {
this.$router.push("/screening/add") this.$router.push("/screening/add")
} }
}, },
// 去查看跳转
viewJump() { 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("跳转") // alert("跳转")
}, },
}, },
......
...@@ -257,6 +257,7 @@ export default { ...@@ -257,6 +257,7 @@ export default {
disabled = false, disabled = false,
tabDisabled = true tabDisabled = true
) { ) {
sessionStorage.removeItem("index1Data")
this.disabled = disabled this.disabled = disabled
this.tabDisabled = tabDisabled this.tabDisabled = tabDisabled
this.patientId = patientId || null this.patientId = patientId || null
...@@ -306,6 +307,7 @@ export default { ...@@ -306,6 +307,7 @@ export default {
computed: { computed: {
...mapGetters({ ...mapGetters({
selectedIndex: "table/selectedIndex", selectedIndex: "table/selectedIndex",
refreshFlag: "table/refreshFlag",
}), }),
}, },
created() { created() {
...@@ -313,11 +315,32 @@ export default { ...@@ -313,11 +315,32 @@ export default {
// if (this.$route.path == "/screening/index") { // if (this.$route.path == "/screening/index") {
// this.tabDisabled = false // 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: { watch: {
selectedIndex(v) { selectedIndex(v) {
this.handleFormSearch(this.searchForm) 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> </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