|
@@ -1,37 +1,38 @@
|
|
|
<template>
|
|
|
<page-layer>
|
|
|
<template #header>
|
|
|
- <el-input v-model="keyCode" class="w-50 m-2" style="width: 360px" placeholder="请输入姓名/证件号/门诊号/住院号"
|
|
|
- clearable>
|
|
|
+ <el-input v-model="keyCode" class="w-50 m-2" style="width: 360px" placeholder="请输入姓名/证件号/门诊号/住院号" clearable>
|
|
|
<template #prepend>关键字</template>
|
|
|
</el-input>
|
|
|
<el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期" :shortcuts="shortcuts"
|
|
|
- style="width: 360px;margin-left: 3px"></el-date-picker>
|
|
|
+ end-placeholder="结束日期" :shortcuts="shortcuts" style="width: 360px;margin-left: 3px"></el-date-picker>
|
|
|
<el-select v-model="diseaseType" placeholder="请选择慢病类型" clearable style="width: 240px;margin-left: 3px">
|
|
|
- <el-option v-for="item in dics.getCrmClass" :key="item.code" :label="item.name" :value="item.code"/>
|
|
|
+ <el-option v-for="item in dics.getCrmClass" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="delFlag" placeholder="请选择是否有效" clearable style="width: 160px;margin-left: 3px">
|
|
|
+ <el-option v-for="item in delFlagOptions" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
</el-select>
|
|
|
<el-button type="primary" icon="Search" @click="queryChronicDisease" style="margin-left: 5px">查询</el-button>
|
|
|
<el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
|
|
|
</template>
|
|
|
<template #main>
|
|
|
<el-table :data="chronicDiseaseData.slice(pageSize * (currentPage - 1), pageSize * currentPage)" border
|
|
|
- style="width: 100%" :height="tableHeight" highlight-current-row :row-style="rowStyle">
|
|
|
- <el-table-column type="index" label="序号" width="50" fixed/>
|
|
|
- <el-table-column prop="pName" label="姓名" width="100" fixed/>
|
|
|
- <el-table-column prop="socialNo" label="证件号" width="140" fixed/>
|
|
|
- <el-table-column prop="sexValue" label="性别"/>
|
|
|
- <el-table-column prop="age" label="年龄"/>
|
|
|
- <el-table-column prop="hisMzNo" label="门诊号" width="100"/>
|
|
|
- <el-table-column prop="hisZyNo" label="住院号" width="100"/>
|
|
|
- <el-table-column prop="days" label="剩余回访天数" width="100"/>
|
|
|
- <el-table-column prop="ptName" label="病人来源" width="120"/>
|
|
|
- <el-table-column prop="relTel" label="联系电话" width="100"/>
|
|
|
- <el-table-column prop="relNameTel" label="联系人电话" width="100"/>
|
|
|
- <el-table-column prop="relName" label="联系人姓名" width="100"/>
|
|
|
- <el-table-column prop="chronicDiseaseName" label="慢病类型" width="200" show-overflow-tooltip/>
|
|
|
- <el-table-column prop="lastDate" label="确诊时间" width="100"/>
|
|
|
- <el-table-column prop="pComment" label="患者重点随访监测事项" width="300" show-overflow-tooltip/>
|
|
|
+ style="width: 100%" :height="tableHeight" highlight-current-row :row-style="rowStyle">
|
|
|
+ <el-table-column type="index" label="序号" width="50" fixed />
|
|
|
+ <el-table-column prop="pName" label="姓名" width="100" fixed />
|
|
|
+ <el-table-column prop="socialNo" label="证件号" width="140" fixed />
|
|
|
+ <el-table-column prop="sexValue" label="性别" />
|
|
|
+ <el-table-column prop="age" label="年龄" />
|
|
|
+ <el-table-column prop="hisMzNo" label="门诊号" width="100" />
|
|
|
+ <el-table-column prop="hisZyNo" label="住院号" width="100" />
|
|
|
+ <el-table-column prop="days" label="剩余回访天数" width="100" />
|
|
|
+ <el-table-column prop="ptName" label="病人来源" width="120" />
|
|
|
+ <el-table-column prop="relTel" label="联系电话" width="100" />
|
|
|
+ <el-table-column prop="relNameTel" label="联系人电话" width="100" />
|
|
|
+ <el-table-column prop="relName" label="联系人姓名" width="100" />
|
|
|
+ <el-table-column prop="chronicDiseaseName" label="慢病类型" width="200" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="lastDate" label="确诊时间" width="100" />
|
|
|
+ <el-table-column prop="pComment" label="患者重点随访监测事项" width="300" show-overflow-tooltip />
|
|
|
<el-table-column prop="importLevel" label="病人等级" width="100">
|
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.importLevel === '1'">未住院患者</span>
|
|
@@ -40,45 +41,54 @@
|
|
|
<span v-else>{{ scope.row.importLevel }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="provinceName" label="省" width="100"/>
|
|
|
- <el-table-column prop="cityName" label="市" width="100"/>
|
|
|
- <el-table-column prop="areaName" label="区" width="100"/>
|
|
|
- <el-table-column prop="detailAdress" label="详细地址" width="300" show-overflow-tooltip/>
|
|
|
- <el-table-column prop="height" label="身高" width="80"/>
|
|
|
- <el-table-column prop="weight" label="体重" width="80"/>
|
|
|
- <el-table-column prop="temperature" label="体温" width="80"/>
|
|
|
- <el-table-column prop="heartRate" label="心率" width="80"/>
|
|
|
- <el-table-column prop="bloodPressure" label="收缩压/舒张压" width="100"/>
|
|
|
- <el-table-column prop="bloodSugar" label="血糖" width="80"/>
|
|
|
- <el-table-column prop="bloodOxygen" label="血氧" width="80"/>
|
|
|
- <el-table-column prop="referPhysicianName" label="主管医生" width="100"/>
|
|
|
- <el-table-column prop="userName" label="建档医生" width="100"/>
|
|
|
- <el-table-column prop="createDate" label="建卡时间" width="140"/>
|
|
|
- <el-table-column prop="visitDate" label="下次随访时间" width="100"/>
|
|
|
- <el-table-column prop="visitDate" label="回访" width="100" fixed="right" align="center">
|
|
|
- <template #default="{row}">
|
|
|
- <el-button @click="followUpClick(row)" type="primary">回访</el-button>
|
|
|
+ <el-table-column prop="provinceName" label="省" width="100" />
|
|
|
+ <el-table-column prop="cityName" label="市" width="100" />
|
|
|
+ <el-table-column prop="areaName" label="区" width="100" />
|
|
|
+ <el-table-column prop="detailAdress" label="详细地址" width="300" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="height" label="身高" width="80" />
|
|
|
+ <el-table-column prop="weight" label="体重" width="80" />
|
|
|
+ <el-table-column prop="temperature" label="体温" width="80" />
|
|
|
+ <el-table-column prop="heartRate" label="心率" width="80" />
|
|
|
+ <el-table-column prop="bloodPressure" label="收缩压/舒张压" width="100" />
|
|
|
+ <el-table-column prop="bloodSugar" label="血糖" width="80" />
|
|
|
+ <el-table-column prop="bloodOxygen" label="血氧" width="80" />
|
|
|
+ <el-table-column prop="referPhysicianName" label="主管医生" width="100" />
|
|
|
+ <el-table-column prop="userName" label="建档医生" width="100" />
|
|
|
+ <el-table-column prop="createDate" label="建卡时间" width="140" />
|
|
|
+ <el-table-column prop="visitDate" label="下次随访时间" width="100" />
|
|
|
+ <el-table-column prop="delFlag" label="是否有效" width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.delFlag === '1'">作废</span>
|
|
|
+ <span v-else></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="cz" label="操作" width="120" fixed="right" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button v-if="row.delFlag !== '1'" @click="followUpClick(row)" type="primary">回访</el-button>
|
|
|
+ <span v-if="delUser === '0'" style="padding-left: 5px;">
|
|
|
+ <el-button v-if="row.delFlag === '1'" @click="hfChronicDisease(row)" type="primary">恢复</el-button>
|
|
|
+ <el-button v-else @click="delChronicDisease(row)" type="warning">作废</el-button>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[15, 30, 45, 60]"
|
|
|
- :total="chronicDiseaseData.length" layout="total, sizes, prev, pager, next, jumper"
|
|
|
- style="margin-top: 5px"
|
|
|
- @size-change="handleSizeChange" @current-change="handleCurrentChange">
|
|
|
+ :total="chronicDiseaseData.length" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
|
|
|
+ @size-change="handleSizeChange" @current-change="handleCurrentChange">
|
|
|
</el-pagination>
|
|
|
</template>
|
|
|
</page-layer>
|
|
|
</template>
|
|
|
<script setup name="ChronicDiseaseSearch">
|
|
|
-import {ref, onMounted, nextTick} from 'vue'
|
|
|
+import { ref, onMounted, nextTick } from 'vue'
|
|
|
import PageLayer from '@/layout/PageLayer.vue'
|
|
|
import store from '@/store'
|
|
|
-import {shortcuts, seltYearAndNowLast} from '@/data/shortcuts'
|
|
|
-import {formatDate, getDateRangeFormatDate} from '@/utils/date'
|
|
|
-import {ElMessage} from 'element-plus'
|
|
|
-import {selectChronicDisease, getCrmDictionary} from "@/api/chronic-disease/chronic-disease"
|
|
|
-import {Export} from '@/utils/ExportExcel'
|
|
|
-import {clone} from '@/utils/clone'
|
|
|
+import { shortcuts, seltYearAndNowLast } from '@/data/shortcuts'
|
|
|
+import { formatDate, getDateRangeFormatDate } from '@/utils/date'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import { selectChronicDisease, getCrmDictionary, selectMbDelPermissions, delChronicDiseaseById, hfChronicDiseaseById } from "@/api/chronic-disease/chronic-disease"
|
|
|
+import { Export } from '@/utils/ExportExcel'
|
|
|
+import { clone } from '@/utils/clone'
|
|
|
import router from "@/router";
|
|
|
|
|
|
const windowSize = store.state.app.windowSize;
|
|
@@ -95,18 +105,24 @@ const keyCode = ref('')
|
|
|
const chronicDiseaseData = ref([])
|
|
|
const diseaseType = ref('')
|
|
|
let dics = ref({})
|
|
|
-const start = formatDate(seltYearAndNowLast[0].value[0])
|
|
|
-const end = formatDate(seltYearAndNowLast[0].value[1])
|
|
|
+const delUser = ref('')
|
|
|
+const delFlag = ref('')
|
|
|
+const start = formatDate(seltYearAndNowLast[1].value[0])
|
|
|
+const end = formatDate(seltYearAndNowLast[1].value[1])
|
|
|
const dateRange = ref([])
|
|
|
const queryTerm = reactive({
|
|
|
startTime: '',
|
|
|
endTime: '',
|
|
|
keyCode: '',
|
|
|
diseaseType: '',
|
|
|
+ delFlag: '',
|
|
|
})
|
|
|
|
|
|
+const delFlagOptions = [{ code: '', name: '全部' }, { code: '0', name: '有效' }, { code: '1', name: '无效' }]
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
nextTick(async () => {
|
|
|
+ queryMbDelPermissions()
|
|
|
dics.value = await getCrmDictionary()
|
|
|
queryTerm.startTime = start
|
|
|
queryTerm.endTime = end + ' 23:59:59'
|
|
@@ -115,6 +131,13 @@ onMounted(() => {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+const queryMbDelPermissions = () => {
|
|
|
+ selectMbDelPermissions()
|
|
|
+ .then((res) => {
|
|
|
+ delUser.value = res.qx
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
// 查询慢病首次登记信息
|
|
|
const queryChronicDisease = () => {
|
|
|
if (dateRange.value) {
|
|
@@ -134,10 +157,11 @@ const queryChronicDisease = () => {
|
|
|
|
|
|
queryTerm.keyCode = keyCode.value
|
|
|
queryTerm.diseaseType = diseaseType.value
|
|
|
+ queryTerm.delFlag = delFlag.value
|
|
|
selectChronicDisease(queryTerm)
|
|
|
- .then((res) => {
|
|
|
- chronicDiseaseData.value = res
|
|
|
- });
|
|
|
+ .then((res) => {
|
|
|
+ chronicDiseaseData.value = res
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
const rowStyle = (row, rowIndex) => {
|
|
@@ -154,10 +178,10 @@ const rowStyle = (row, rowIndex) => {
|
|
|
cursor: "pointer",
|
|
|
};
|
|
|
}
|
|
|
- return {cursor: "pointer"};
|
|
|
+ return { cursor: "pointer" };
|
|
|
}
|
|
|
|
|
|
-function followUpClick({socialNo}) {
|
|
|
+function followUpClick({ socialNo }) {
|
|
|
router.push({
|
|
|
name: 'chronicDiseaseQuestionnaire',
|
|
|
query: {
|
|
@@ -166,6 +190,48 @@ function followUpClick({socialNo}) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function delChronicDisease({ pId }) {
|
|
|
+ ElMessageBox.confirm("确定作废?", {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }).then(() => {
|
|
|
+ delChronicDiseaseById(pId).then((res) => {
|
|
|
+ queryChronicDisease()
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: res.cg,
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function hfChronicDisease({ pId }) {
|
|
|
+ ElMessageBox.confirm("确定恢复?", {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ dangerouslyUseHTMLString: true
|
|
|
+ }).then(() => {
|
|
|
+ hfChronicDiseaseById(pId).then((res) => {
|
|
|
+ queryChronicDisease()
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: res.cg,
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 导出慢病基础信息
|
|
|
const exportData = () => {
|
|
|
if (chronicDiseaseData.value.length === 0) {
|
|
@@ -207,6 +273,7 @@ const exportData = () => {
|
|
|
userName: "建档医生",
|
|
|
createDate: "建卡时间",
|
|
|
visitDate: "下次随访时间",
|
|
|
+ delFlag: "是否有效"
|
|
|
};
|
|
|
|
|
|
const d = clone(chronicDiseaseData.value)
|
|
@@ -220,6 +287,12 @@ const exportData = () => {
|
|
|
} else {
|
|
|
val.importLevel = ''
|
|
|
}
|
|
|
+
|
|
|
+ if (val.delFlag === '1') {
|
|
|
+ val.delFlag = '作废'
|
|
|
+ } else {
|
|
|
+ val.delFlag = ''
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
Export(d, title, "慢病登记信息")
|