阳性统计
This commit is contained in:
parent
2fc512a8dd
commit
25de21db1c
11
src/api/ECG/ECGPositiveStatistics/index.ts
Normal file
11
src/api/ECG/ECGPositiveStatistics/index.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 李传洋
|
||||||
|
* ECGPositiveStatisticsApi
|
||||||
|
*/
|
||||||
|
export const ECGPositiveStatisticsApi = {
|
||||||
|
getPositiveStatistics: async (params: any) => {
|
||||||
|
return await request.get({ url: `/tblist/patientexamlist/positiveStatistics`, params })
|
||||||
|
}
|
||||||
|
}
|
23
src/api/ECG/positiveStatisticsDict/index.ts
Normal file
23
src/api/ECG/positiveStatisticsDict/index.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 李传洋
|
||||||
|
* PositiveStatisticsDictApi
|
||||||
|
*/
|
||||||
|
export const PositiveStatisticsDictApi = {
|
||||||
|
getPage: async (params: any) => {
|
||||||
|
return await request.get({ url: `/tblist/positivestatistics/page`, params })
|
||||||
|
},
|
||||||
|
get: async (id: any) => {
|
||||||
|
return await request.get({ url: `/tblist/positivestatistics/get?id=` + id })
|
||||||
|
},
|
||||||
|
create: async (data: any) => {
|
||||||
|
return await request.post({ url: `/tblist/positivestatistics/create`, data })
|
||||||
|
},
|
||||||
|
update: async (data: any) => {
|
||||||
|
return await request.put({ url: `/tblist/positivestatistics/update`, data })
|
||||||
|
},
|
||||||
|
delete: async (id: any) => {
|
||||||
|
return await request.delete({ url: `/tblist/positivestatistics/delete?id=` + id })
|
||||||
|
},
|
||||||
|
}
|
440
src/views/ECG/ECGPositiveStatistics/index.vue
Normal file
440
src/views/ECG/ECGPositiveStatistics/index.vue
Normal file
@ -0,0 +1,440 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<ContentWrap class="-mt-12px">
|
||||||
|
<el-form
|
||||||
|
ref="queryFormRef"
|
||||||
|
:model="queryParams"
|
||||||
|
size="default"
|
||||||
|
label-width="78px"
|
||||||
|
label-position="right"
|
||||||
|
label-suffix=""
|
||||||
|
class="-mb-15px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="诊断日期" prop="doctorDiagTime_ge" class="item-style date-picker">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.doctorDiagTime_ge"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
placeholder="开始日期"
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item
|
||||||
|
label=""
|
||||||
|
label-width="0px"
|
||||||
|
prop="doctorDiagTime_le"
|
||||||
|
class="item-style date-picker"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.doctorDiagTime_le"
|
||||||
|
type="date"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
placeholder="结束日期"
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :offset="6" :span="8" style="text-align: right">
|
||||||
|
<el-button
|
||||||
|
@click="handleQuery"
|
||||||
|
style="background-color: rgba(56, 119, 246, 1); color: rgba(255, 255, 255, 1)"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="resetQuery">
|
||||||
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<el-row class="-mb-26px">
|
||||||
|
<el-col :span="9">
|
||||||
|
<ContentWrap class="-mt-9px">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
size="default"
|
||||||
|
border
|
||||||
|
:stripe="false"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
:data="list_infos"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: 'rgb(235, 241, 250)',
|
||||||
|
height: '40px',
|
||||||
|
color: '#333333'
|
||||||
|
}"
|
||||||
|
:row-style="{ height: '40px' }"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
class="list_infos"
|
||||||
|
height="max(calc(100vh - 270px),100px)"
|
||||||
|
@row-dblclick="handleRowdbClick"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" align="center" width="54px" fixed="left">
|
||||||
|
<template #default="scope"> {{ scope.$index + 1 }} </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="名称" align="center" prop="diseaseName" width="200px" />
|
||||||
|
<el-table-column label="关键词" align="left" prop="keyWord" width="240px" />
|
||||||
|
<el-table-column
|
||||||
|
label="数量"
|
||||||
|
align="center"
|
||||||
|
prop="items_count"
|
||||||
|
fixed="right"
|
||||||
|
width="60px"
|
||||||
|
/>
|
||||||
|
<!-- 数据列 -->
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="15" class="pl-6px">
|
||||||
|
<ContentWrap class="-mt-9px">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
size="default"
|
||||||
|
border
|
||||||
|
:stripe="false"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
:data="list_items"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: 'rgb(235, 241, 250)',
|
||||||
|
height: '40px',
|
||||||
|
color: '#333333'
|
||||||
|
}"
|
||||||
|
:row-style="{ height: '40px' }"
|
||||||
|
height="max(calc(100vh - 270px),100px)"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" align="center" width="54px" fixed="left">
|
||||||
|
<template #default="scope"> {{ scope.$index + 1 }} </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="登记号" align="center" prop="regId" width="240px" />
|
||||||
|
<el-table-column label="检查号" align="center" prop="examId" width="240px" />
|
||||||
|
<el-table-column
|
||||||
|
label="检查日期"
|
||||||
|
align="center"
|
||||||
|
prop="examDate"
|
||||||
|
:formatter="dateFormatter2"
|
||||||
|
width="110px"
|
||||||
|
/>
|
||||||
|
<el-table-column label="患者姓名" align="center" prop="pname" width="130px" />
|
||||||
|
<el-table-column label="性别" align="center" prop="gender" width="54px" />
|
||||||
|
<el-table-column
|
||||||
|
label="出生日期"
|
||||||
|
align="center"
|
||||||
|
prop="birthday"
|
||||||
|
:formatter="dateFormatter2"
|
||||||
|
width="110px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="检查项目"
|
||||||
|
header-align="center"
|
||||||
|
prop="examItemName"
|
||||||
|
min-width="260px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="影像设备"
|
||||||
|
header-align="center"
|
||||||
|
prop="deviceName"
|
||||||
|
min-width="260px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="阴性阳性"
|
||||||
|
align="center"
|
||||||
|
prop="diagFlag"
|
||||||
|
fixed="right"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.diagFlag == '0'" effect="plain" style="width: 74px"
|
||||||
|
>阴性</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-else-if="scope.row.diagFlag == '1'"
|
||||||
|
effect="plain"
|
||||||
|
type="danger"
|
||||||
|
style="width: 74px"
|
||||||
|
>阳性</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-else-if="scope.row.diagFlag == '2'"
|
||||||
|
effect="plain"
|
||||||
|
type="warning"
|
||||||
|
style="width: 74px"
|
||||||
|
>重大阳性</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-else effect="plain" type="info" style="width: 74px">暂无</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" width="60px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link @click="handleRowClick(scope.row)" style="color: rgb(56, 119, 246)">
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 数据列 -->
|
||||||
|
</el-table>
|
||||||
|
</ContentWrap>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
v-model="activeDrawer"
|
||||||
|
direction="rtl"
|
||||||
|
:with-header="false"
|
||||||
|
:modal="activeDrawerModal"
|
||||||
|
:size="activeDrawerSize"
|
||||||
|
@closed="
|
||||||
|
() => {
|
||||||
|
reportInfoType = ''
|
||||||
|
activeTabName = ''
|
||||||
|
activeDrawerModal = true
|
||||||
|
activeDrawerSize = '74%'
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div style="position: relative; z-index: 100">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
@click="activeDrawer = false"
|
||||||
|
style="position: absolute; top: 3px; right: 1px"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:close" />
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-model="activeTabName" style="margin-top: -8px; height: 100%">
|
||||||
|
<el-tab-pane label="诊断信息" name="diagnosisInfo">
|
||||||
|
<el-form
|
||||||
|
ref="infoFormRef"
|
||||||
|
:model="infoParams"
|
||||||
|
size="default"
|
||||||
|
label-width="74px"
|
||||||
|
label-position="top"
|
||||||
|
label-suffix=""
|
||||||
|
class="mt-20px ml-16px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="" prop="doctorDiagResult" class="item-style">
|
||||||
|
<el-input
|
||||||
|
v-model="infoParams.doctorDiagResult"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 6, maxRows: 10 }"
|
||||||
|
:readonly="diagnosisInfo_readonly"
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-drawer>
|
||||||
|
<!-- 可参考内容 -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
||||||
|
import { ECGPositiveStatisticsApi } from '@/api/ECG/ECGPositiveStatistics'
|
||||||
|
|
||||||
|
defineOptions({ name: 'ECGPositiveStatistics' })
|
||||||
|
/*
|
||||||
|
* 李传洋
|
||||||
|
* 阳性统计
|
||||||
|
**/
|
||||||
|
/** 导入内容 **/
|
||||||
|
|
||||||
|
/** 组件引用 **/
|
||||||
|
const queryFormRef = ref()
|
||||||
|
const infoFormRef = ref()
|
||||||
|
|
||||||
|
/** 数据结构 **/
|
||||||
|
const message = useMessage()
|
||||||
|
const { t } = useI18n()
|
||||||
|
const activeDrawer = ref(false)
|
||||||
|
const activeDrawerModal = ref(true)
|
||||||
|
const activeDrawerSize = ref<any>('74%')
|
||||||
|
const activeTabName = ref('diagnosisInfo')
|
||||||
|
const reportInfoType = ref('') //us、ct
|
||||||
|
const diagnosisInfo_readonly = ref(true)
|
||||||
|
const age = ref<any>('')
|
||||||
|
const examItemNameEdit = ref('')
|
||||||
|
//表单核心
|
||||||
|
const queryParams = ref({
|
||||||
|
doctorDiagTime_ge: '',
|
||||||
|
doctorDiagTime_le: ''
|
||||||
|
})
|
||||||
|
const infoParams = ref({
|
||||||
|
id: '',
|
||||||
|
examId: '',
|
||||||
|
regId: '',
|
||||||
|
orgId: '',
|
||||||
|
pname: '',
|
||||||
|
gender: '',
|
||||||
|
birthday: '',
|
||||||
|
billDoctorDepartment: '',
|
||||||
|
applicationDate: '',
|
||||||
|
examDescription: '',
|
||||||
|
diagResults: '',
|
||||||
|
examItemName: '',
|
||||||
|
deviceName: '',
|
||||||
|
deviceType: '',
|
||||||
|
diagDoctor: '',
|
||||||
|
diagDate: '',
|
||||||
|
reviewDoctor: '',
|
||||||
|
reviewDate: '',
|
||||||
|
doctorDiagResult: ''
|
||||||
|
})
|
||||||
|
//表格核心
|
||||||
|
const list_infos = ref<any[]>([])
|
||||||
|
const list_items = ref<any[]>([])
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
|
/****** 自定义内容 ******/
|
||||||
|
const calculateAge = async (birthdate) => {
|
||||||
|
if (!birthdate) {
|
||||||
|
age.value = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const today = new Date()
|
||||||
|
const birth = new Date(birthdate)
|
||||||
|
let yearsDiff = today.getFullYear() - birth.getFullYear()
|
||||||
|
// Check if the birthday hasn't occurred yet this year
|
||||||
|
const hasBirthdayPassed =
|
||||||
|
today.getMonth() > birth.getMonth() ||
|
||||||
|
(today.getMonth() === birth.getMonth() && today.getDate() >= birth.getDate())
|
||||||
|
if (!hasBirthdayPassed) {
|
||||||
|
yearsDiff--
|
||||||
|
}
|
||||||
|
age.value = yearsDiff
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetDiagnosisInfo = async () => {
|
||||||
|
infoParams.value = {
|
||||||
|
id: '',
|
||||||
|
examId: '',
|
||||||
|
regId: '',
|
||||||
|
orgId: '',
|
||||||
|
pname: '',
|
||||||
|
gender: '',
|
||||||
|
birthday: '',
|
||||||
|
billDoctorDepartment: '',
|
||||||
|
applicationDate: '',
|
||||||
|
examDescription: '',
|
||||||
|
diagResults: '',
|
||||||
|
examItemName: '',
|
||||||
|
deviceName: '',
|
||||||
|
deviceType: '',
|
||||||
|
diagDoctor: '',
|
||||||
|
diagDate: '',
|
||||||
|
reviewDoctor: '',
|
||||||
|
reviewDate: '',
|
||||||
|
doctorDiagResult: ''
|
||||||
|
}
|
||||||
|
age.value = ''
|
||||||
|
examItemNameEdit.value = ''
|
||||||
|
infoFormRef.value?.clearValidate()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getList = async () => {
|
||||||
|
resetDiagnosisInfo()
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await ECGPositiveStatisticsApi.getPositiveStatistics(queryParams.value)
|
||||||
|
list_infos.value = data
|
||||||
|
list_items.value = []
|
||||||
|
highLightRow.value = {}
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/****** 可参考内容 ******/
|
||||||
|
/** 组件事件 **/
|
||||||
|
const handleQuery = async () => {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetQuery = async () => {
|
||||||
|
queryParams.value = {
|
||||||
|
doctorDiagTime_ge: '',
|
||||||
|
doctorDiagTime_le: ''
|
||||||
|
}
|
||||||
|
queryFormRef.value?.clearValidate()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowdbClick = async (row) => {
|
||||||
|
if (row) {
|
||||||
|
list_items.value = row.items
|
||||||
|
highLightRow.value = row
|
||||||
|
} else list_items.value = []
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowClick = async (row) => {
|
||||||
|
resetDiagnosisInfo()
|
||||||
|
if (row) {
|
||||||
|
infoParams.value = row
|
||||||
|
calculateAge(row.birthday)
|
||||||
|
examItemNameEdit.value = row.examItemName
|
||||||
|
if (row.deviceType && row.deviceType.trim().toLowerCase() == 'us') reportInfoType.value = 'us'
|
||||||
|
else if (row.deviceType && row.deviceType.trim().toLowerCase() == 'csh1')
|
||||||
|
reportInfoType.value = 'csh1'
|
||||||
|
else reportInfoType.value = 'ct'
|
||||||
|
}
|
||||||
|
activeTabName.value = 'diagnosisInfo'
|
||||||
|
activeDrawer.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const highLightRow = ref<any>({})
|
||||||
|
const tableRowClassName = ({ row }: any) => {
|
||||||
|
if (highLightRow.value && highLightRow.value == row) return 'grey-row'
|
||||||
|
else return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 钩子方法 **/
|
||||||
|
onMounted(async () => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 防空作用域 **/
|
||||||
|
console.log(dateFormatter)
|
||||||
|
console.log(message)
|
||||||
|
console.log(t)
|
||||||
|
//console.log(null)
|
||||||
|
|
||||||
|
/** 导出内容 **/
|
||||||
|
/**
|
||||||
|
* 备注:
|
||||||
|
*
|
||||||
|
* **/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-form-item__label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-style {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-picker :deep(.item-width) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-group {
|
||||||
|
border: 1px solid #ececec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list_infos :deep(.grey-row) {
|
||||||
|
--el-table-tr-bg-color: #d6e1f7f5;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,199 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="62.8%">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="formData"
|
||||||
|
size="default"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
label-suffix=""
|
||||||
|
class="-ml-30px"
|
||||||
|
v-loading="formLoading"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="名称" prop="diseaseName" class="item-style">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.diseaseName"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
clearable
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div
|
||||||
|
class="pl-104px mt-6px mb-6px"
|
||||||
|
style="
|
||||||
|
font-size: 13.2px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family:
|
||||||
|
Inter,
|
||||||
|
Helvetica Neue,
|
||||||
|
Helvetica,
|
||||||
|
PingFang SC,
|
||||||
|
Hiragino Sans GB,
|
||||||
|
Microsoft YaHei,
|
||||||
|
微软雅黑,
|
||||||
|
Arial,
|
||||||
|
sans-serif;
|
||||||
|
color-scheme: light;
|
||||||
|
color: rgb(245, 108, 108);
|
||||||
|
"
|
||||||
|
>
|
||||||
|
关键词请使用[,]连接
|
||||||
|
</div>
|
||||||
|
<el-form-item label="关键词" prop="keyWord" class="item-style">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.keyWord"
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 6, maxRows: 10 }"
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-button type="primary" :disabled="formLoading" @click="submitForm">保存</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
<!-- 可参考内容 -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import { PositiveStatisticsDictApi } from '@/api/ECG/positiveStatisticsDict'
|
||||||
|
|
||||||
|
defineOptions({ name: 'PositiveStatisticsDictForm' })
|
||||||
|
/*
|
||||||
|
* 李传洋
|
||||||
|
* PositiveStatisticsDictForm
|
||||||
|
**/
|
||||||
|
/** 导入内容 **/
|
||||||
|
const emit = defineEmits(['success'])
|
||||||
|
|
||||||
|
/** 组件引用 **/
|
||||||
|
const formRef = ref()
|
||||||
|
|
||||||
|
/** 数据结构 **/
|
||||||
|
const message = useMessage()
|
||||||
|
const { t } = useI18n()
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const dialogTitle = ref('')
|
||||||
|
const formLoading = ref(false)
|
||||||
|
const formType = ref('')
|
||||||
|
//表单核心
|
||||||
|
const formData = ref({
|
||||||
|
id: '',
|
||||||
|
diseaseName: '',
|
||||||
|
keyWord: '',
|
||||||
|
orgId: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
/****** 自定义内容 ******/
|
||||||
|
const resetForm = async () => {
|
||||||
|
formData.value = {
|
||||||
|
id: '',
|
||||||
|
diseaseName: '',
|
||||||
|
keyWord: '',
|
||||||
|
orgId: ''
|
||||||
|
}
|
||||||
|
formRef.value?.clearValidate()
|
||||||
|
}
|
||||||
|
|
||||||
|
const open = async (type: string, id?: number) => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = t('action.' + type)
|
||||||
|
formType.value = type
|
||||||
|
resetForm()
|
||||||
|
if (id) {
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
formData.value = await PositiveStatisticsDictApi.get(id)
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****** 可参考内容 ******/
|
||||||
|
/** 组件事件 **/
|
||||||
|
const submitForm = async () => {
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const data = formData.value
|
||||||
|
//校验
|
||||||
|
if (!data.diseaseName) {
|
||||||
|
await message.alertWarning('请输入名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.keyWord) {
|
||||||
|
await message.alertWarning('请输入关键词')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//更新
|
||||||
|
let data_res = null as any
|
||||||
|
if (formType.value === 'create') {
|
||||||
|
data_res = await PositiveStatisticsDictApi.create(data)
|
||||||
|
if (data_res == '-200') message.error('创建失败,相同名称字典已存在!')
|
||||||
|
else message.success(t('common.createSuccess'))
|
||||||
|
} else if (formType.value === 'update') {
|
||||||
|
data_res = await PositiveStatisticsDictApi.update(data)
|
||||||
|
if (data_res == '-200') message.error('更新失败,相同名称字典已存在!')
|
||||||
|
else message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
if (!(data_res == '-200')) {
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit('success')
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 钩子方法 **/
|
||||||
|
onMounted(async () => {})
|
||||||
|
|
||||||
|
/** 防空作用域 **/
|
||||||
|
console.log(dateFormatter)
|
||||||
|
//console.log(null)
|
||||||
|
|
||||||
|
/** 导出内容 **/
|
||||||
|
defineExpose({ open })
|
||||||
|
/**
|
||||||
|
* 备注:
|
||||||
|
*
|
||||||
|
* **/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-form-item__label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-style {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-picker :deep(.item-width) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-group {
|
||||||
|
border: 1px solid #ececec;
|
||||||
|
}
|
||||||
|
</style>
|
220
src/views/ECG/positiveStatisticsDict/index.vue
Normal file
220
src/views/ECG/positiveStatisticsDict/index.vue
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form
|
||||||
|
ref="queryFormRef"
|
||||||
|
:model="queryParams"
|
||||||
|
size="default"
|
||||||
|
label-width="68px"
|
||||||
|
label-position="right"
|
||||||
|
label-suffix=""
|
||||||
|
class="-mb-15px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="名称" prop="diseaseName" class="item-style">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.diseaseName"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
clearable
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item label="关键词" prop="keyWord" class="item-style">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.keyWord"
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
clearable
|
||||||
|
class="item-width"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :offset="2" :span="4" style="text-align: right">
|
||||||
|
<el-button
|
||||||
|
@click="handleQuery"
|
||||||
|
style="background-color: rgba(56, 119, 246, 1); color: rgba(255, 255, 255, 1)"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="resetQuery">
|
||||||
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<ContentWrap style="height: 64px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="18" :span="6" style="text-align: right">
|
||||||
|
<el-button
|
||||||
|
@click="openForm('create')"
|
||||||
|
style="background-color: rgb(28, 176, 117); color: rgb(255, 255, 255)"
|
||||||
|
>
|
||||||
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<ContentWrap class="mb-1px">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
size="default"
|
||||||
|
border
|
||||||
|
:stripe="true"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
:data="list_data"
|
||||||
|
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '40px', color: '#333333' }"
|
||||||
|
:row-style="{ height: '40px' }"
|
||||||
|
height="max(calc(100vh - 465px),80px)"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" align="center" width="54px" />
|
||||||
|
<el-table-column label="名称" align="center" prop="diseaseName" />
|
||||||
|
<el-table-column label="关键词" align="center" prop="keyWord" />
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" width="180px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
@click="openForm('update', scope.row.id)"
|
||||||
|
style="color: rgb(56, 119, 246)"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button link @click="handleDelete(scope.row.id)" style="color: rgb(223, 65, 65)">
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 数据列 -->
|
||||||
|
</el-table>
|
||||||
|
<div>
|
||||||
|
<Pagination
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</ContentWrap>
|
||||||
|
|
||||||
|
<PositiveStatisticsDictForm ref="formRef" @success="getList" />
|
||||||
|
<!-- 可参考内容 -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
import { PositiveStatisticsDictApi } from '@/api/ECG/positiveStatisticsDict'
|
||||||
|
import PositiveStatisticsDictForm from './PositiveStatisticsDictForm.vue'
|
||||||
|
|
||||||
|
defineOptions({ name: 'PositiveStatisticsDict' })
|
||||||
|
/*
|
||||||
|
* 李传洋
|
||||||
|
* 阳性字典管理
|
||||||
|
**/
|
||||||
|
/** 导入内容 **/
|
||||||
|
|
||||||
|
/** 组件引用 **/
|
||||||
|
const queryFormRef = ref()
|
||||||
|
const formRef = ref()
|
||||||
|
|
||||||
|
/** 数据结构 **/
|
||||||
|
const message = useMessage()
|
||||||
|
const { t } = useI18n()
|
||||||
|
//表单核心
|
||||||
|
const queryParams = ref({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
diseaseName: '',
|
||||||
|
keyWord: ''
|
||||||
|
})
|
||||||
|
//表格核心
|
||||||
|
const list_data = ref<any[]>([])
|
||||||
|
const total = ref(0)
|
||||||
|
const loading = ref(true)
|
||||||
|
|
||||||
|
/****** 自定义内容 ******/
|
||||||
|
/****** 可参考内容 ******/
|
||||||
|
/** 组件事件 **/
|
||||||
|
const openForm = (type: string, id?: any) => {
|
||||||
|
formRef.value.open(type, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDelete = async (id: any) => {
|
||||||
|
try {
|
||||||
|
await message.delConfirm()
|
||||||
|
await PositiveStatisticsDictApi.delete(id)
|
||||||
|
message.success(t('common.delSuccess'))
|
||||||
|
await getList()
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await PositiveStatisticsDictApi.getPage(queryParams.value)
|
||||||
|
list_data.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleQuery = async () => {
|
||||||
|
queryParams.value.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetQuery = async () => {
|
||||||
|
queryParams.value = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
diseaseName: '',
|
||||||
|
keyWord: ''
|
||||||
|
}
|
||||||
|
queryFormRef.value?.clearValidate()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 钩子方法 **/
|
||||||
|
onMounted(async () => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 防空作用域 **/
|
||||||
|
console.log(dateFormatter)
|
||||||
|
console.log(download)
|
||||||
|
//console.log(null)
|
||||||
|
|
||||||
|
/** 导出内容 **/
|
||||||
|
/**
|
||||||
|
* 备注:
|
||||||
|
*
|
||||||
|
* **/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-form-item__label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-style {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-picker :deep(.item-width) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-group {
|
||||||
|
border: 1px solid #ececec;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user