|
|
@@ -18,14 +18,33 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="评估人">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.assessor"
|
|
|
- placeholder="记录人"
|
|
|
- class="!w-240px"
|
|
|
- clearable
|
|
|
- />
|
|
|
+ <el-input v-model="queryParams.assessor" placeholder="记录人" class="!w-240px" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="楼栋">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.buildId"
|
|
|
+ placeholder="选择楼栋"
|
|
|
+ style="width: 180px"
|
|
|
+ @change="handleBuildChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in buildList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.buildName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="楼层">
|
|
|
+ <el-select v-model="queryParams.floorId" placeholder="选择楼层" style="width: 180px">
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in floorList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.floorName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
<el-form-item label="记录日期">
|
|
|
<el-date-picker
|
|
|
size="default"
|
|
|
@@ -43,7 +62,9 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <el-button @click="handleQuery" style="margin-left: 2vw"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
+ <el-button @click="handleQuery" style="margin-left: 2vw"
|
|
|
+ ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
+ >
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -52,12 +73,9 @@
|
|
|
<!-- 列表 -->
|
|
|
<ContentWrap>
|
|
|
<div class="mb-10px">
|
|
|
-
|
|
|
- <ButtonAdd @click="openForm(undefined)" />
|
|
|
+ <ButtonAdd @click="openForm(undefined)" />
|
|
|
<!-- <el-button @click="inputH" type="success"><Icon icon="fa:cloud-upload" :size="16" class="mr-1"/>导入</el-button>-->
|
|
|
-<!-- <ButtonImport @click="handleImportCard" />-->
|
|
|
-
|
|
|
-
|
|
|
+ <!-- <ButtonImport @click="handleImportCard" />-->
|
|
|
</div>
|
|
|
<el-table v-loading="loading" :data="list" :header-cell-style="tableHeaderColor">
|
|
|
<el-table-column header-align="center" align="center" label="序号" width="60">
|
|
|
@@ -68,37 +86,49 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
-
|
|
|
- <el-table-column prop="elderName" header-align="center" align="center" label="长者姓名" min-width="150" show-overflow-tooltip/>
|
|
|
- <el-table-column prop="assessor" header-align="center" align="center" label="评估人" min-width="200" show-overflow-tooltip/>
|
|
|
- <el-table-column prop="assessDate" header-align="center" align="center" label="记录日期" min-width="200" show-overflow-tooltip/>
|
|
|
-
|
|
|
- <el-table-column prop="creator" header-align="center" align="center" label="记录人" min-width="200" show-overflow-tooltip/>
|
|
|
-
|
|
|
-
|
|
|
- <el-table-column label="操作" align="center" width="200" >
|
|
|
+ <el-table-column
|
|
|
+ prop="elderName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="长者姓名"
|
|
|
+ min-width="150"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="assessor"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="评估人"
|
|
|
+ min-width="200"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="assessDate"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="记录日期"
|
|
|
+ min-width="200"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="creator"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="记录人"
|
|
|
+ min-width="200"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column label="操作" align="center" width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="openFormEdit(scope.row, scope.row.id)"
|
|
|
- >
|
|
|
+ <el-button link type="primary" @click="openFormEdit(scope.row, scope.row.id)">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="warning"
|
|
|
- @click="openFormDetail(scope.row,scope.row.id)"
|
|
|
- >
|
|
|
+ <el-button link type="warning" @click="openFormDetail(scope.row, scope.row.id)">
|
|
|
详情
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="danger"
|
|
|
- @click="openClose(scope.row)"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <el-button link type="danger" @click="openClose(scope.row)"> 删除 </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -130,7 +160,6 @@
|
|
|
@cancel="showBatchExport = false"
|
|
|
/>
|
|
|
|
|
|
-
|
|
|
<Import
|
|
|
ref="importRef"
|
|
|
@success="getList"
|
|
|
@@ -139,24 +168,23 @@
|
|
|
downloadUrl: 'elderly-service-order/get-import-template',
|
|
|
excelTempName: '居家工单-【导入】模板',
|
|
|
importUrl: '/elderly-service-order/import',
|
|
|
- failExportUrl: '',
|
|
|
+ failExportUrl: ''
|
|
|
}"
|
|
|
/>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import AddForm from "./AddForm.vue";
|
|
|
-import ButtonAdd from "@/components/ButtonAdd/src/ButtonAdd.vue";
|
|
|
-import ButtonImport from "@/components/ButtonImport/src/ButtonImport.vue";
|
|
|
+import AddForm from './AddForm.vue'
|
|
|
+import ButtonAdd from '@/components/ButtonAdd/src/ButtonAdd.vue'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
-import {formatTimestamp, getCurrentMonthRange} from "@/utils/dateUtil";
|
|
|
-import Import from "@/components/ImportFile/index.vue";
|
|
|
-import {restraintCreatePage, restraintDelete} from "@/api/elderly/nursing/keep-fit";
|
|
|
+import { getCurrentMonthRange } from '@/utils/dateUtil'
|
|
|
+import Import from '@/components/ImportFile/index.vue'
|
|
|
import {
|
|
|
psychologicalSocialDelete,
|
|
|
psychologicalSocialPage
|
|
|
-} from "@/api/elderly/assessment/psychological-social";
|
|
|
+} from '@/api/elderly/assessment/psychological-social'
|
|
|
+import { ref } from 'vue'
|
|
|
+import { getBuildList } from '@/api/system/badManage'
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
const { t } = useI18n() // 国际化
|
|
|
const userStore = useUserStore()
|
|
|
@@ -185,6 +213,7 @@ let queryParams = reactive({
|
|
|
pageSize: 10,
|
|
|
elderName: '',
|
|
|
assessor: '',
|
|
|
+ floorId: '',
|
|
|
assessorDate: getCurrentMonthRange(),
|
|
|
tenantIds: userStore.orgTenantId
|
|
|
})
|
|
|
@@ -195,14 +224,13 @@ const inputH = () => {
|
|
|
}
|
|
|
// 打开导出弹窗
|
|
|
const handleImportCard = async () => {
|
|
|
-
|
|
|
// showBatchExport.value = true
|
|
|
}
|
|
|
|
|
|
// 处理批量导出
|
|
|
const handleBatchExport = async (batch: number, count: number) => {
|
|
|
exportLoading.value = true
|
|
|
- console.log(batch,count)
|
|
|
+ console.log(batch, count)
|
|
|
// try {
|
|
|
// let queryParams = {
|
|
|
// pageNo: batch,
|
|
|
@@ -224,7 +252,6 @@ const handleBatchExport = async (batch: number, count: number) => {
|
|
|
// ]
|
|
|
// exportWithExpandedObjectArrays(list, headers, `医疗护理记录${formatToDateTime()}.xlsx`, '医疗护理记录')
|
|
|
// } catch (_) {}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/** 查询列表 */
|
|
|
@@ -253,8 +280,9 @@ const handleQuery = async () => {
|
|
|
const resetQuery = () => {
|
|
|
queryParams.elderName = ''
|
|
|
queryParams.assessor = ''
|
|
|
+ queryParams.floorId = ''
|
|
|
queryParams.tenantIds = userStore.orgTenantId
|
|
|
- queryParams.assessorDate= getCurrentMonthRange()
|
|
|
+ queryParams.assessorDate = getCurrentMonthRange()
|
|
|
queryFormRef.value.resetFields()
|
|
|
handleQuery()
|
|
|
}
|
|
|
@@ -262,39 +290,34 @@ const resetQuery = () => {
|
|
|
/** 添加/修改操作 */
|
|
|
const formRef = ref()
|
|
|
const openForm = (id?: number) => {
|
|
|
- if(queryParams.tenantIds.length == 0 || queryParams.tenantIds.length > 1){
|
|
|
+ if (queryParams.tenantIds.length == 0 || queryParams.tenantIds.length > 1) {
|
|
|
message.error('新增只能选择一个机构')
|
|
|
return
|
|
|
}
|
|
|
- formRef.value.open(queryParams.tenantIds[0], id,false)
|
|
|
+ formRef.value.open(queryParams.tenantIds[0], id, false)
|
|
|
}
|
|
|
|
|
|
const editRef = ref()
|
|
|
const openFormEdit = (row: any = {}, id?: number) => {
|
|
|
- formRef.value.open(row.tenantId, id,false)
|
|
|
+ formRef.value.open(row.tenantId, id, false)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-const openFormDetail = (row: any = {},id?: number) => {
|
|
|
- formRef.value.open(row.tenantId,id,true)
|
|
|
+const openFormDetail = (row: any = {}, id?: number) => {
|
|
|
+ formRef.value.open(row.tenantId, id, true)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
const openClose = async (item) => {
|
|
|
try {
|
|
|
- console.log("任务ID",item)
|
|
|
+ console.log('任务ID', item)
|
|
|
const res = await message.confirm('确定要删除吗?', '提示')
|
|
|
if (res == 'confirm') {
|
|
|
// 发起
|
|
|
try {
|
|
|
const res = await psychologicalSocialDelete(item.id)
|
|
|
- if (res){
|
|
|
+ if (res) {
|
|
|
message.success(t('common.updateSuccess'))
|
|
|
}
|
|
|
- }catch(err) {}
|
|
|
+ } catch (err) {}
|
|
|
}
|
|
|
// 刷新列表
|
|
|
await getList()
|
|
|
@@ -315,12 +338,24 @@ const cancelDelete = async (id: number) => {
|
|
|
}
|
|
|
|
|
|
const route = useRoute()
|
|
|
+const floorList = ref([])
|
|
|
+const buildList = ref([])
|
|
|
+const handleBuildChange = (buildId: any) => {
|
|
|
+ const selectedBuild = buildList.value.find((item: any) => item.id === buildId)
|
|
|
+ if (selectedBuild) {
|
|
|
+ floorList.value = selectedBuild.floorList || []
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/** 初始化 **/
|
|
|
-onMounted(() => {
|
|
|
- if(route.query && route.query.elderName){
|
|
|
+onMounted(async () => {
|
|
|
+ if (route.query && route.query.elderName) {
|
|
|
queryParams.elderName = route.query.elderName as string
|
|
|
}
|
|
|
- getList()
|
|
|
+ await getList()
|
|
|
+ try {
|
|
|
+ buildList.value = await getBuildList({ tenantIds: queryParams.tenantIds[0] })
|
|
|
+ } catch (e) {}
|
|
|
})
|
|
|
|
|
|
// 表头格式
|