Commit 81720786 authored by liang's avatar liang

筛查场景、修改意见添加

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