Commit 81720786 authored by liang's avatar liang

筛查场景、修改意见添加

parent 5743429f
...@@ -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, " ") +
'"}' '"}'
) )
} }
...@@ -522,7 +522,51 @@ export function changeTime(time) { ...@@ -522,7 +522,51 @@ 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
* @param num
* @returns {string}
*/
export function toChineseNumber(num) {
const str = num
.toString()
.replace(/(?=(\d{4})+$)/g, ",")
.split(",")
.filter(Boolean)
const chars = ["", "", "", "", "", "", "", "", "", ""]
const units = ["", "", "", ""]
const bigUnits = ["", "", "亿"]
function _transform(numStr) {
let result = ""
for (let i = 0; i < numStr.length; i++) {
const digit = +numStr[i]
const c = chars[digit]
const u = units[numStr.length - 1 - i]
if (digit === 0) {
if (result[result.length - 1] !== chars[0]) {
result += c
}
} else {
result += c + u
}
}
if (result[result.length - 1] === chars[0]) {
result = result.slice(0, -1)
}
return result
}
let result = ""
for (let i = 0; i < str.length; i++) {
const part = str[i]
const c = _transform(part)
const u = c ? bigUnits[str.length - 1 - i] : ""
result += c + u
}
return result
}
export default { formatDicList, excelExport, toChineseNumber }
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
titlePosition="top" titlePosition="top"
@update="update" @update="update"
> >
<template #note>{{ note }}</template>
<template #button> <template #button>
<el-button style="padding: 8px 20px" v-if="isShowEdit" @click="handleEdit" <el-button style="padding: 8px 20px" v-if="isShowEdit" @click="handleEdit"
>修 改</el-button >修 改</el-button
...@@ -51,6 +53,12 @@ export default { ...@@ -51,6 +53,12 @@ export default {
this.isLast && followBatch > 0 && checkStatus !== 3 && checkStatus !== 4 this.isLast && followBatch > 0 && checkStatus !== 3 && checkStatus !== 4
) )
}, },
note() {
const { checkStatus, checkNote } = this.currentRow
const status =
checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : ""
return status ? status + "" + checkNote : ""
},
}, },
} }
</script> </script>
<template> <template>
<!-- 随访审核详情 --> <!-- 随访审核详情 -->
<div class="follow-form"> <div class="follow-form">
<div class="note">
<slot name="note"></slot>
</div>
<el-header v-if="titlePosition === 'top'"> <el-header v-if="titlePosition === 'top'">
<div class="follow-tab-top"> <div class="follow-tab-top">
<el-tabs v-model="activeTab" type="card"> <el-tabs v-model="activeTab" type="card">
...@@ -13,6 +16,7 @@ ...@@ -13,6 +16,7 @@
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="extra_btn"> <div class="extra_btn">
<slot name="button"></slot> <slot name="button"></slot>
</div> </div>
...@@ -226,10 +230,11 @@ export default { ...@@ -226,10 +230,11 @@ export default {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
padding-right: 0; padding-right: 0;
position: relative;
justify-content: space-between; justify-content: space-between;
} }
.follow-tab-top { .follow-tab-top {
width: calc(100vh - 200px); max-width: calc(100% - 200px);
padding-left: 10px; padding-left: 10px;
::v-deep { ::v-deep {
.el-tabs--card > .el-tabs__header { .el-tabs--card > .el-tabs__header {
...@@ -260,10 +265,13 @@ export default { ...@@ -260,10 +265,13 @@ export default {
padding: 0px 20px; padding: 0px 20px;
} }
.note {
margin-left: 20px;
color: red;
padding-top: 10px;
}
.extra_btn { .extra_btn {
width: 170px; width: 180px;
text-align: right;
margin-top: 5px;
} }
.follow-tab { .follow-tab {
border-radius: 4px; border-radius: 4px;
......
...@@ -158,11 +158,10 @@ export default { ...@@ -158,11 +158,10 @@ export default {
label: "随访进度", label: "随访进度",
value: "followBatch", value: "followBatch",
minWidth: 120, minWidth: 120,
formatter: (row) => { formatter: ({ followBatch }) => {
return this.$handle.formatDicList( return followBatch
this.dictMap["follow_type"], ? `第${this.$handle.toChineseNumber(followBatch)}次随访`
String(row.followBatch) : "筛查"
)
}, },
sortable: "custom", sortable: "custom",
}, },
...@@ -257,6 +256,16 @@ export default { ...@@ -257,6 +256,16 @@ export default {
placeholder: "请输入医联体", placeholder: "请输入医联体",
rules: [], rules: [],
}, },
{
label: "筛查场景",
type: "select",
prop: "patientFrom",
opts: [
{ label: "社区筛查", value: "1" },
{ label: "医院筛查", value: "2" },
{ label: "体检筛查", value: "3" },
],
},
{ {
type: "btn", type: "btn",
list: [ list: [
...@@ -395,7 +404,6 @@ export default { ...@@ -395,7 +404,6 @@ export default {
formId: this.formId, formId: this.formId,
...this.$refs.form.form, ...this.$refs.form.form,
...form, ...form,
patientFrom: sessionStorage.getItem("selectedIndex"), //筛查场景
} }
params = Object.assign(this.cacheForm, params) params = Object.assign(this.cacheForm, params)
for (let key in params) { for (let key in params) {
......
...@@ -136,11 +136,10 @@ export default { ...@@ -136,11 +136,10 @@ export default {
label: "随访进度", label: "随访进度",
value: "followBatch", value: "followBatch",
minWidth: 120, minWidth: 120,
formatter: (row) => { formatter: ({ followBatch }) => {
return this.$handle.formatDicList( return followBatch
this.dictMap["follow_type"], ? `第${this.$handle.toChineseNumber(followBatch)}次随访`
String(row.followBatch) : "筛查"
)
}, },
sortable: "custom", sortable: "custom",
}, },
...@@ -158,7 +157,7 @@ export default { ...@@ -158,7 +157,7 @@ export default {
}, },
{ {
label: "操作", label: "操作",
width: 220, width: 100,
fixed: "right", fixed: "right",
operType: "button", operType: "button",
operations: [ operations: [
...@@ -170,6 +169,12 @@ export default { ...@@ -170,6 +169,12 @@ export default {
type: "text", type: "text",
} }
}, },
isHidden({ isContinueFollow, checkStatus, followBatch }) {
return (
isContinueFollow !== 1 ||
(followBatch > 0 && checkStatus !== 3)
)
},
}, },
], ],
}, },
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<div v-if="isDetail"> <div v-if="isDetail">
<div style="margin-left: 24px"> <div style="margin-left: 24px">
<el-button icon="el-icon-back" @click="backInfoce">返 回</el-button> <el-button icon="el-icon-back" @click="backInfoce">返 回</el-button>
<span class="ml-20" style="color: red">{{ note }}</span>
</div> </div>
<ConfigForms <ConfigForms
form-type="1" form-type="1"
...@@ -100,6 +101,16 @@ export default { ...@@ -100,6 +101,16 @@ export default {
placeholder: "请输入医联体/姓名/身份证", placeholder: "请输入医联体/姓名/身份证",
prop: "keyParam", prop: "keyParam",
}, },
{
label: "筛查场景",
type: "select",
prop: "patientFrom",
opts: [
{ label: "社区筛查", value: "1" },
{ label: "医院筛查", value: "2" },
{ label: "体检筛查", value: "3" },
],
},
{ {
type: "button", type: "button",
value: "查询", value: "查询",
...@@ -275,7 +286,7 @@ export default { ...@@ -275,7 +286,7 @@ export default {
this.handleAdd(row, null, true, false) this.handleAdd(row, null, true, false)
}, },
handleAdd( handleAdd(
{ patientId, name }, { patientId, name, checkStatus, checkNote },
index, index,
disabled = false, disabled = false,
tabDisabled = true tabDisabled = true
...@@ -286,6 +297,10 @@ export default { ...@@ -286,6 +297,10 @@ export default {
this.patientId = patientId || null this.patientId = patientId || null
this.name = name this.name = name
this.isDetail = true this.isDetail = true
const status =
checkStatus === 2 ? "驳回修改" : checkStatus === 4 ? "不合格" : ""
this.note = status ? status + "" + checkNote : ""
}, },
sortChange({ prop, order }) { sortChange({ prop, order }) {
...@@ -319,7 +334,6 @@ export default { ...@@ -319,7 +334,6 @@ export default {
data.current = this.pageIndex data.current = this.pageIndex
data.size = this.pageSize data.size = this.pageSize
data.isDraft = 0 data.isDraft = 0
data.patientFrom = this.selectedIndex
getPatientPage(data).then((res) => { getPatientPage(data).then((res) => {
this.listLoading = false this.listLoading = false
if (res.code === 1) { if (res.code === 1) {
......
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