This commit is contained in:
qiuyuan 2025-10-22 09:42:01 +08:00
commit c38c7bddf1
18 changed files with 2115 additions and 678 deletions

View File

@ -9,7 +9,7 @@ export const getItem = (id) => request.basic.get(`/api/v1/service-people/${id}`)
// 添加条目 // 添加条目
export const createItem = (params) => request.basic.post('/api/v1/service-people', params) export const createItem = (params) => request.basic.post('/api/v1/service-people', params)
// 更新role // 更新role
export const updateItem = (id, params) => request.basic.put(`/api/v1/service-people/${id}`, params) export const updateItem = (params) => request.basic.put(`/api/v1/service-people/${params.id}`, params)
// 删除数据 // 删除数据
export const delItem = (id) => request.basic.delete(`/api/v1/service-people/${id}`) export const delItem = (id) => request.basic.delete(`/api/v1/service-people/${id}`)

View File

@ -121,7 +121,7 @@ import BasicSide from './components/BasicSide.vue'
import Brand from './components/Brand.vue' import Brand from './components/Brand.vue'
import MultiTab from './components/MultiTab.vue' import MultiTab from './components/MultiTab.vue'
import ConfigDialog from './components/ConfigDialog.vue' import ConfigDialog from './components/ConfigDialog.vue'
import storage from '@/utils/storage'
defineOptions({ defineOptions({
name: 'BasicLayout', name: 'BasicLayout',
}) })
@ -132,6 +132,7 @@ const appStore = useAppStore()
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
initData() initData()
async function initData() { async function initData() {
storage.local.setItem('companyId','C001')
await dicsStore.loadProvinces() // await dicsStore.loadProvinces() //
await dicsStore.loadAllDictData() // await dicsStore.loadAllDictData() //
await dicsStore.loadOrgTree() await dicsStore.loadOrgTree()

View File

@ -75,7 +75,7 @@ import { theme as antTheme } from 'ant-design-vue'
import { config as conf } from '@/config' import { config as conf } from '@/config'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import storage from '@/utils/storage' import storage from '@/utils/storage'
import useMultiTab from '@/store/modules/multiTab'
const { locale, t } = useI18n() const { locale, t } = useI18n()
defineOptions({ defineOptions({
name: 'BasicHeader', name: 'BasicHeader',
@ -157,6 +157,8 @@ function handleLogout() {
*/ */
function handleOpen() { function handleOpen() {
const multiTab = useMultiTab()
multiTab.$reset()
router.replace({path:'/platForm'}) router.replace({path:'/platForm'})
} }

View File

@ -35,7 +35,7 @@ export default {
dict: '字典管理', dict: '字典管理',
'dict-detail': '字典数据', 'dict-detail': '字典数据',
serverObj: '服务对象管理', serverObj: '服务对象管理',
serverObjYunying: '服务对象管理', yunYingServerObj: '服务对象管理',
serverList: '服务对象列表', serverList: '服务对象列表',
workorderMenu: '工单管理', workorderMenu: '工单管理',
mineWorderOrder: '我下的工单', mineWorderOrder: '我下的工单',
@ -61,4 +61,5 @@ export default {
assessor:'评估员列表', assessor:'评估员列表',
baseSet:'基础配置', baseSet:'基础配置',
serverProjectManage:'服务项目管理', serverProjectManage:'服务项目管理',
serviceStaffyuying:'服务人员'
} }

View File

@ -16,7 +16,8 @@ import workorder from './workorder'
import service from './service' import service from './service'
import serviceStaff from './serviceStaff' import serviceStaff from './serviceStaff'
import serverSet from './serverSet' import serverSet from './serverSet'
import severObjYunying from './severObjYunying' import yunYingServerObj from './yunyingServerObj'
import serviceStaffYunYing from './serviceStaffYunYing'
export default [ export default [
...home, ...home,
// ...form, // ...form,
@ -36,5 +37,6 @@ export default [
...service, ...service,
...serviceStaff, ...serviceStaff,
...serverSet, ...serverSet,
...severObjYunying ...yunYingServerObj,
...serviceStaffYunYing
] ]

View File

@ -0,0 +1,29 @@
import { DollarOutlined } from '@ant-design/icons-vue'
export default [
{
path: 'serviceStaffyuying',
name: 'serviceStaffyuying',
component: 'RouteViewLayout',
meta: {
icon: DollarOutlined,
title: '服务人员',
isMenu: true,
keepAlive: true,
permission: '*',
},
children: [
{
path: 'serviceStaffList',
name: 'serviceStaffList',
component: 'serviceStaff/serviceStaffList/index.vue',
meta: {
title: '服务人员',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
],
},
]

View File

@ -1,107 +0,0 @@
import { DollarOutlined } from '@ant-design/icons-vue'
export default [
{
path: 'serverObjYunying',
name: 'serverObjYunying',
component: 'RouteViewLayout',
meta: {
icon: DollarOutlined,
title: '服务对象管理',
isMenu: true,
keepAlive: true,
permission: '*',
},
children: [
{
path: 'serverList',
name: 'serverList',
component: 'serverObjYunying/serverList/index.vue',
meta: {
title: '服务对象列表',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'allocation',
name: 'allocation',
component: 'serverObjYunying/allocation/index.vue',
meta: {
title: '服务对象分配',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'domicile',
name: 'domicile',
component: 'serverObjYunying/domicile/index.vue',
meta: {
title: '户籍对象列表',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'institution',
name: 'institution',
component: 'serverObjYunying/institution/index.vue',
meta: {
title: '机构服务对象列表',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'toBeInstitution',
name: 'toBeInstitution',
component: 'serverObjYunying/toBeInstitution/index.vue',
meta: {
title: '待完善对象列表',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'carePhone',
name: 'carePhone',
component: 'serverObjYunying/carePhone/index.vue',
meta: {
title: '电话关爱对象',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'serverSearch',
name: 'serverSearch',
component: 'serverObjYunying/serverSearch/index.vue',
meta: {
title: '服务对象查询',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
{
path: 'existence',
name: 'existence',
component: 'serverObjYunying/existence/index.vue',
meta: {
title: '生存状态管理',
isMenu: true,
keepAlive: true,
permission: '*',
},
}
],
},
]

View File

@ -0,0 +1,30 @@
import { DollarOutlined } from '@ant-design/icons-vue'
export default [
{
path: 'yunYingServerObj',
name: 'yunYingServerObj',
component: 'RouteViewLayout',
meta: {
icon: DollarOutlined,
title: '服务对象管理',
isMenu: true,
keepAlive: true,
permission: '*',
},
children: [
{
path: 'yunYingServerList',
name: 'yunYingServerList',
component: 'yunYingServerObj/yunYingServerList/index.vue',
meta: {
title: '服务对象列表',
isMenu: true,
keepAlive: true,
permission: '*',
},
},
],
},
]

View File

@ -2,484 +2,492 @@
<a-modal :open="modal.open" :title="modal.title" :width="800" :confirm-loading="modal.confirmLoading" <a-modal :open="modal.open" :title="modal.title" :width="800" :confirm-loading="modal.confirmLoading"
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel"> :after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
<a-spin tip="Loading..." :spinning="spining"> <a-spin tip="Loading..." :spinning="spining">
<a-card> <a-card>
<a-form ref="formRef" :model="formData" :rules="formRules"> <a-form ref="formRef" :model="formData" :rules="formRules">
<a-tabs v-model:activeKey="activeKey"> <a-tabs v-model:activeKey="activeKey">
<!-- 基本信息 --> <!-- 基本信息 -->
<a-tab-pane key="1" tab="基本信息"> <a-tab-pane key="1" tab="基本信息">
<a-row :gutter="24"> <a-row :gutter="24">
<!-- 姓名 --> <!-- 姓名 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="姓名" name="name"> <a-form-item label="姓名" name="name">
<a-input v-model:value="formData.name" placeholder="请输入姓名" /> <a-input v-model:value="formData.name" placeholder="请输入姓名" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 性别 --> <!-- 性别 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="性别" name="gender"> <a-form-item label="性别" name="gender">
<a-radio-group v-model:value="formData.gender"> <a-radio-group v-model:value="formData.gender">
<a-radio value="1"></a-radio> <a-radio value="1"></a-radio>
<a-radio value="2"></a-radio> <a-radio value="2"></a-radio>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 证件号码 --> <!-- 证件号码 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="证件号码" name="identityNo"> <a-form-item label="证件号码" name="identityNo">
<span style="display: inline-flex; width: 100%;"> <span style="display: inline-flex; width: 100%;">
<a-select v-model:value="formData.identityType" <a-select v-model:value="formData.identityType"
style="width: 100px; margin-right: 8px;"> style="width: 100px; margin-right: 8px;">
<a-select-option v-for="item in dicsStore.dictOptions.CARD_TYPE" <a-select-option v-for="item in dicsStore.dictOptions.CARD_TYPE"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
<a-input v-model:value="formData.identityNo" placeholder="请输入证件号码"
style="flex: 1;" @change="extractBirthDateFromIdCard" />
</span>
</a-form-item>
</a-col>
<!-- 出生日期 -->
<a-col :span="12">
<a-form-item label="出生日期" name="birthDate">
<a-date-picker v-model:value="formData.birthDate" placeholder="请选择出生日期"
style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 关爱巡访电话 -->
<a-col :span="12">
<a-form-item label="关爱巡访电话" name="careVisitPhone">
<a-input v-model:value="formData.careVisitPhone" placeholder="请输入关爱巡访电话" />
</a-form-item>
</a-col>
<!-- 联系方式 -->
<a-col :span="12">
<a-form-item label="联系方式" name="contact1">
<a-input v-model:value="formData.contact1" placeholder="请输入联系方式" />
</a-form-item>
</a-col>
<!-- 社保卡号 -->
<a-col :span="12">
<a-form-item label="社保卡号" name="socialSecurityCardNumber">
<a-input v-model:value="formData.socialSecurityCardNumber"
placeholder="请输入社保卡号" />
</a-form-item>
</a-col>
<!-- 其他电话1 -->
<a-col :span="12">
<a-form-item label="其他电话1" name="otherPhone1">
<a-input v-model:value="formData.otherPhone1" placeholder="请输入其他电话1" />
</a-form-item>
</a-col>
<!-- 其他电话2 -->
<a-col :span="12">
<a-form-item label="其他电话2" name="otherPhone2">
<a-input v-model:value="formData.otherPhone2" placeholder="请输入其他电话2" />
</a-form-item>
</a-col>
<!-- 政府购买服务开始时间 -->
<a-col :span="12">
<a-form-item label="政府购买服务时间" name="governmentPurchasedServiceStartDate">
<a-range-picker v-model:value="formData.governmentPurchasedServiceStartDate"
placeholder="请选择政府购买服务时间" style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 健康状况 -->
<a-col :span="12">
<a-form-item label="健康状况" :name="['archive', 'healthStatus']">
<a-select v-model:value="formData.archive.healthStatus" placeholder="请选择健康状况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Health_Condition"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-input v-model:value="formData.identityNo" placeholder="请输入证件号码" </a-form-item>
style="flex: 1;" @change="extractBirthDateFromIdCard" /> </a-col>
</span>
</a-form-item>
</a-col>
<!-- 出生日期 --> <!-- 服务状态 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="出生日期" name="birthDate"> <a-form-item label="服务状态" :name="['archive', 'serviceStatus']">
<a-date-picker v-model:value="formData.birthDate" placeholder="请选择出生日期" <a-select v-model:value="formData.archive.serviceStatus" placeholder="请选择服务状态">
style="width: 100%;" /> <a-select-option v-for="item in dicsStore.dictOptions.SERVICE_STATUS"
</a-form-item> :key="item.dval" :value="item.dval">
</a-col> {{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 关爱巡访电话 --> <!-- 生存状态 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="关爱巡访电话" name="careVisitPhone"> <a-form-item label="生存状态" :name="['archive', 'survivalStatus']">
<a-input v-model:value="formData.careVisitPhone" placeholder="请输入关爱巡访电话" /> <a-select v-model:value="formData.archive.survivalStatus" placeholder="请选择生存状态">
</a-form-item> <a-select-option v-for="item in dicsStore.dictOptions.LIVING_STATUS"
</a-col> :key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 联系方式 --> <!-- 服务形式 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="联系方式" name="contact1"> <a-form-item label="服务形式" name="archive.serviceForm">
<a-input v-model:value="formData.contact1" placeholder="请输入联系方式" /> <a-select v-model:value="formData.archive.serviceForm" placeholder="请选择服务形式"
</a-form-item> allow-clear>
</a-col> <a-select-option v-for="item in dicsStore.dictOptions.Service_Format"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 社保卡号 --> <!-- 护理等级 -->
<a-col :span="12"> <a-col :span="24">
<a-form-item label="社保卡号" name="socialSecurityCardNumber"> <a-form-item label="护理等级" name="archive.nursingLevel">
<a-input v-model:value="formData.socialSecurityCardNumber" placeholder="请输入社保卡号" /> <a-select v-model:value="formData.archive.nursingLevel" placeholder="请选择护理等级"
</a-form-item> allow-clear>
</a-col> <a-select-option v-for="item in dicsStore.dictOptions.Care_Level"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 家庭地址 -->
<a-col :span="12">
<a-form-item label="家庭地址" :name="['archive', 'homeAreaCodes']">
<AreaCascader v-model:value="formData.archive.homeAreaCodes"
@change="onAreaChange" ref="areaCascaderRef" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="详细地址" :name="['archive', 'homeDetailAddress']">
<a-input v-model:value="formData.archive.homeDetailAddress"
placeholder="请输入详细地址" />
</a-form-item>
</a-col>
<!-- 户口所在地 -->
<a-col :span="12" >
<a-form-item label="户口所在地" name="houseAreaCodes">
<AreaCascader v-model:value="formData.archive.houseAreaCodes"
@change="onAreaHoldChange" ref="houseAreaRef" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="详细地址" name="householdDetailAddress">
<a-input v-model:value="formData.archive.householdDetailAddress"
placeholder="请输入详细地址" />
</a-form-item>
</a-col>
<!-- 其他电话1 --> </a-row>
<a-col :span="12">
<a-form-item label="其他电话1" name="otherPhone1">
<a-input v-model:value="formData.otherPhone1" placeholder="请输入其他电话1" />
</a-form-item>
</a-col>
<!-- 其他电话2 -->
<a-col :span="12">
<a-form-item label="其他电话2" name="otherPhone2">
<a-input v-model:value="formData.otherPhone2" placeholder="请输入其他电话2" />
</a-form-item>
</a-col>
<!-- 政府购买服务开始时间 --> </a-tab-pane>
<a-col :span="12">
<a-form-item label="政府购买服务时间" name="governmentPurchasedServiceStartDate">
<a-range-picker v-model:value="formData.governmentPurchasedServiceStartDate"
placeholder="请选择政府购买服务时间" style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 健康状况 --> <!-- 家庭信息 -->
<a-col :span="12"> <a-tab-pane key="2" tab="地图定位">
<a-form-item label="健康状况" :name="['archive', 'healthStatus']"> <a-row :gutter="24">
<a-select v-model:value="formData.archive.healthStatus" placeholder="请选择健康状况" <!-- 经度 -->
allow-clear> <a-col :span="12">
<a-select-option v-for="item in dicsStore.dictOptions.Health_Condition" <a-form-item label="经度" name="lat">
:key="item.dval" :value="item.dval"> <a-input-number v-model:value="formData.archive.lat" placeholder="请输入经度"
{{ item.introduction }} style="width: 100%;" />
</a-select-option> </a-form-item>
</a-select> </a-col>
</a-form-item>
</a-col>
<!-- 服务状态 --> <!-- 纬度 -->
<a-col :span="12"> <a-col :span="12">
<a-form-item label="服务状态" :name="['archive', 'serviceStatus']"> <a-form-item label="纬度" name="lag">
<a-select v-model:value="formData.archive.serviceStatus" placeholder="请选择服务状态"> <a-input-number v-model:value="formData.archive.lag" placeholder="请输入纬度"
<a-select-option v-for="item in dicsStore.dictOptions.SERVICE_STATUS" style="width: 100%;" />
:key="item.dval" :value="item.dval"> </a-form-item>
{{ item.introduction }} </a-col>
</a-select-option> <gx-map @handleGetLng="handleGetLng" />
</a-select> </a-row>
</a-form-item>
</a-col>
<!-- 生存状态 --> </a-tab-pane>
<a-col :span="12">
<a-form-item label="生存状态" :name="['archive', 'survivalStatus']">
<a-select v-model:value="formData.archive.survivalStatus" placeholder="请选择生存状态">
<a-select-option v-for="item in dicsStore.dictOptions.LIVING_STATUS"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 服务形式 --> <!-- 更多 -->
<a-col :span="12"> <a-tab-pane key="3" tab="更多">
<a-form-item label="服务形式" name="archive.serviceForm"> <a-row :gutter="24">
<a-select v-model:value="formData.archive.serviceForm" placeholder="请选择服务形式" <!-- 居住情况 -->
allow-clear> <a-col :span="8">
<a-select-option v-for="item in dicsStore.dictOptions.Service_Format" <a-form-item label="居住情况" name="livingSituation">
:key="item.dval" :value="item.dval"> <a-select v-model:value="formData.archive.livingSituation" placeholder="请选择居住情况"
{{ item.introduction }} allow-clear>
</a-select-option> <a-select-option v-for="item in dicsStore.dictOptions.Living_Situation"
</a-select> :key="item.dval" :value="item.dval">
</a-form-item> {{ item.introduction }}
</a-col> </a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 护理等级 --> <!-- 子女情况 -->
<a-col :span="12"> <a-col :span="8">
<a-form-item label="护理等级" name="archive.nursingLevel"> <a-form-item label="子女情况" name="childrenSituation">
<a-select v-model:value="formData.archive.nursingLevel" placeholder="请选择护理等级" <a-select v-model:value="formData.archive.childrenSituation"
allow-clear> placeholder="请选择子女情况" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Care_Level" <a-select-option v-for="item in dicsStore.dictOptions.CHILDREN_STATE"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 家庭地址 -->
<a-col :span="12">
<a-form-item label="家庭地址" :name="['archive', 'homeAreaCodes']">
<AreaCascader v-model:value="formData.archive.homeAreaCodes" @change="onAreaChange"
ref="areaCascaderRef" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="详细地址" :name="['archive', 'homeDetailAddress']">
<a-input v-model:value="formData.archive.homeDetailAddress" placeholder="请输入详细地址" />
</a-form-item>
</a-col>
</a-row>
</a-tab-pane> <!-- 统计分类 -->
<a-col :span="8">
<a-form-item label="统计分类" name="statisticsCategory">
<a-select v-model:value="formData.archive.statisticsCategory"
placeholder="请选择统计分类" allow-clear>
<a-select-option
v-for="item in dicsStore.dictOptions.Statistical_Classification"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 家庭信息 --> <!-- 智力情况 -->
<a-tab-pane key="2" tab="地图定位"> <a-col :span="8">
<a-row :gutter="24"> <a-form-item label="智力情况" name="intellectualSituation">
<!-- 经度 --> <a-select v-model:value="formData.archive.intellectualSituation"
<a-col :span="12"> placeholder="请选择智力情况" allow-clear>
<a-form-item label="经度" name="lat"> <a-select-option
<a-input-number v-model:value="formData.archive.lat" placeholder="请输入经度" v-for="item in dicsStore.dictOptions.Intellectual_Condition"
style="width: 100%;" /> :key="item.dval" :value="item.dval">
</a-form-item> {{ item.introduction }}
</a-col> </a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 纬度 --> <!-- 是否长期照料失能子女 -->
<a-col :span="12"> <a-col :span="8">
<a-form-item label="纬度" name="lag"> <a-form-item label="是否长期照料失能子女" name="longTermCareForDisabledChildren">
<a-input-number v-model:value="formData.archive.lag" placeholder="请输入纬度" <a-select v-model:value="formData.archive.longTermCareForDisabledChildren"
style="width: 100%;" /> placeholder="请选择是否长期照料失能子女" allow-clear>
</a-form-item> <a-select-option v-for="item in dicsStore.dictOptions.Disabled_Child"
</a-col> :key="item.dval" :value="item.dval">
<gx-map @handleGetLng="handleGetLng" /> {{ item.introduction }}
</a-row> </a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-tab-pane> <!-- 老人子女探望情况 -->
<a-col :span="8">
<a-form-item label="老人子女探望情况" name="childrenVisitStatus">
<a-select v-model:value="formData.archive.childrenVisitStatus"
placeholder="请选择老人子女探望情况" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Frequency_Visits"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 更多 --> <!-- 是否人户分离 -->
<a-tab-pane key="3" tab="更多"> <a-col :span="8">
<a-row :gutter="24"> <a-form-item label="是否人户分离" name="householdResidenceSeparation">
<!-- 居住情况 --> <a-select v-model:value="formData.archive.householdResidenceSeparation"
<a-col :span="8"> placeholder="请选择是否人户分离" allow-clear>
<a-form-item label="居住情况" name="livingSituation"> <a-select-option v-for="item in dicsStore.dictOptions.Separation"
<a-select v-model:value="formData.archive.livingSituation" placeholder="请选择居住情况" :key="item.dval" :value="item.dval">
allow-clear> {{ item.introduction }}
<a-select-option v-for="item in dicsStore.dictOptions.Living_Situation" </a-select-option>
:key="item.dval" :value="item.dval"> </a-select>
{{ item.introduction }} </a-form-item>
</a-select-option> </a-col>
</a-select>
</a-form-item>
</a-col>
<!-- 子女情况 --> <!-- 民族 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="子女情况" name="childrenSituation"> <a-form-item label="民族" name="ethnicity">
<a-select v-model:value="formData.archive.childrenSituation" placeholder="请选择子女情况" <a-select v-model:value="formData.archive.ethnicity" placeholder="请选择民族"
allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.CHILDREN_STATE" <a-select-option v-for="item in dicsStore.dictOptions.Ethnicity"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 统计分类 --> <!-- 是否完成能力评估 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="统计分类" name="statisticsCategory"> <a-form-item label="是否完成能力评估" name="completedCapacityAssessment">
<a-select v-model:value="formData.archive.statisticsCategory" placeholder="请选择统计分类" <a-select v-model:value="formData.archive.completedCapacityAssessment"
allow-clear> placeholder="请选择是否完成能力评估" allow-clear>
<a-select-option <a-select-option v-for="item in dicsStore.dictOptions.Capability_Assessment"
v-for="item in dicsStore.dictOptions.Statistical_Classification" :key="item.dval" :value="item.dval">
:key="item.dval" :value="item.dval"> {{ item.introduction }}
{{ item.introduction }} </a-select-option>
</a-select-option> </a-select>
</a-select> </a-form-item>
</a-form-item> </a-col>
</a-col>
<!-- 智力情况 --> <!-- 是否住出租屋/地下室 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="智力情况" name="intellectualSituation"> <a-form-item label="是否住出租屋/地下室" name="livesInRentedRoomOrBasement">
<a-select v-model:value="formData.archive.intellectualSituation" <a-select v-model:value="formData.archive.livesInRentedRoomOrBasement"
placeholder="请选择智力情况" allow-clear> placeholder="请选择是否住出租屋/地下室" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Intellectual_Condition" <a-select-option v-for="item in dicsStore.dictOptions.Property_Basement"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 是否长期照料失能子女 --> <!-- 经济来源 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="是否长期照料失能子女" name="longTermCareForDisabledChildren"> <a-form-item label="经济来源" name="economicSource">
<a-select v-model:value="formData.archive.longTermCareForDisabledChildren" <a-select v-model:value="formData.archive.economicSource" placeholder="请选择经济来源"
placeholder="请选择是否长期照料失能子女" allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Disabled_Child" <a-select-option v-for="item in dicsStore.dictOptions.Source_Income"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 老人子女探望情况 --> <!-- 文化程度 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="老人子女探望情况" name="childrenVisitStatus"> <a-form-item label="文化程度" name="educationLevel">
<a-select v-model:value="formData.archive.childrenVisitStatus" <a-select v-model:value="formData.archive.educationLevel" placeholder="请选择文化程度"
placeholder="请选择老人子女探望情况" allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Frequency_Visits" <a-select-option v-for="item in dicsStore.dictOptions.Level_Education"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 是否人户分离 --> <!-- 宗教信仰 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="是否人户分离" name="householdResidenceSeparation"> <a-form-item label="宗教信仰" name="religion">
<a-select v-model:value="formData.archive.householdResidenceSeparation" <a-select v-model:value="formData.archive.religion" placeholder="请选择宗教信仰"
placeholder="请选择是否人户分离" allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Separation" <a-select-option v-for="item in dicsStore.dictOptions.Religious_belief"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 民族 --> <!-- 职业情况 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="民族" name="ethnicity"> <a-form-item label="职业情况" name="occupation">
<a-select v-model:value="formData.archive.ethnicity" placeholder="请选择民族" <a-select v-model:value="formData.archive.occupation" placeholder="请选择职业情况"
allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Ethnicity" <a-select-option v-for="item in dicsStore.dictOptions.Employment_Status"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 是否完成能力评估 --> <!-- 政治面貌 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="是否完成能力评估" name="completedCapacityAssessment"> <a-form-item label="政治面貌" name="politicalAffiliation">
<a-select v-model:value="formData.archive.completedCapacityAssessment" <a-select v-model:value="formData.archive.politicalAffiliation"
placeholder="请选择是否完成能力评估" allow-clear> placeholder="请选择政治面貌" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Capability_Assessment" <a-select-option v-for="item in dicsStore.dictOptions.Political_affiliation"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 是否住出租屋/地下室 --> <!-- 婚姻情况 -->
<a-col :span="8"> <a-col :span="8">
<a-form-item label="是否住出租屋/地下室" name="livesInRentedRoomOrBasement"> <a-form-item label="婚姻情况" name="maritalStatus">
<a-select v-model:value="formData.archive.livesInRentedRoomOrBasement" <a-select v-model:value="formData.archive.maritalStatus" placeholder="请选择婚姻情况"
placeholder="请选择是否住出租屋/地下室" allow-clear> allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Property_Basement" <a-select-option v-for="item in dicsStore.dictOptions.Marital_Status"
:key="item.dval" :value="item.dval"> :key="item.dval" :value="item.dval">
{{ item.introduction }} {{ item.introduction }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span='16'>
<a-form-item label="分类标签" name="labels">
<a-select v-model:value="formData.labels" allowClear mode="multiple"
style="width: 100%;">
<a-select-option
v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 经济来源 --> <!-- 其他 -->
<a-col :span="8"> <a-col :span="24">
<a-form-item label="经济来源" name="economicSource"> <a-form-item label="其他" name="otherNotes">
<a-select v-model:value="formData.archive.economicSource" placeholder="请选择经济来源" <a-textarea v-model:value="formData.archive.otherNotes" placeholder="请输入"
allow-clear> :rows="1" :auto-size="{ minRows: 1, maxRows: 2 }" />
<a-select-option v-for="item in dicsStore.dictOptions.Source_Income" </a-form-item>
:key="item.dval" :value="item.dval"> </a-col>
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 文化程度 --> <!-- 身份证照片 -->
<a-col :span="8"> <a-col :span="12">
<a-form-item label="文化程度" name="educationLevel"> <a-form-item label="身份证照片" name="idCardPhotos">
<a-select v-model:value="formData.archive.educationLevel" placeholder="请选择文化程度" <gx-upload v-model="formData.archive.idCardPhotos"
allow-clear> accept-types=".jpg,.png,.webp" :fileNumber="1" />
<a-select-option v-for="item in dicsStore.dictOptions.Level_Education" </a-form-item>
:key="item.dval" :value="item.dval"> </a-col>
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 宗教信仰 --> <!-- 上传资料 -->
<a-col :span="8"> <a-col :span="12">
<a-form-item label="宗教信仰" name="religion"> <a-form-item label="上传资料" name="uploadedDocuments">
<a-select v-model:value="formData.archive.religion" placeholder="请选择宗教信仰" <gx-upload v-model="formData.archive.idCardPhotos"
allow-clear> accept-types=".jpg,.png,.webp,.xlsx,.docx,.doc" :fileNumber="10" />
<a-select-option v-for="item in dicsStore.dictOptions.Religious_belief" </a-form-item>
:key="item.dval" :value="item.dval"> </a-col>
{{ item.introduction }} </a-row>
</a-select-option> </a-tab-pane>
</a-select> </a-tabs>
</a-form-item> </a-form>
</a-col> </a-card>
<!-- 职业情况 -->
<a-col :span="8">
<a-form-item label="职业情况" name="occupation">
<a-select v-model:value="formData.archive.occupation" placeholder="请选择职业情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Employment_Status"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 政治面貌 -->
<a-col :span="8">
<a-form-item label="政治面貌" name="politicalAffiliation">
<a-select v-model:value="formData.archive.politicalAffiliation"
placeholder="请选择政治面貌" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Political_affiliation"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 婚姻情况 -->
<a-col :span="8">
<a-form-item label="婚姻情况" name="maritalStatus">
<a-select v-model:value="formData.archive.maritalStatus" placeholder="请选择婚姻情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Marital_Status"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span='8'>
<a-form-item label="分类标签" name="labelsCode">
<a-select v-model:value="formData.labelsCode" allowClear mode="multiple">
<a-select-option
v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 户口所在地 -->
<a-col :span="8">
<a-form-item label="户口所在地" name="householdArea">
<AreaCascader v-model:value="formData.archive.householdArea"
@change="onAreaHoldChange" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="详细地址" name="householdDetailAddress">
<a-input v-model:value="formData.archive.householdDetailAddress"
placeholder="请输入详细地址" />
</a-form-item>
</a-col>
<!-- 其他 -->
<a-col :span="24">
<a-form-item label="其他" name="otherNotes">
<a-textarea v-model:value="formData.archive.otherNotes" placeholder="请输入" :rows="1"
:auto-size="{ minRows: 1, maxRows: 2 }" />
</a-form-item>
</a-col>
<!-- 身份证照片 -->
<a-col :span="12">
<a-form-item label="身份证照片" name="idCardPhotos">
<gx-upload v-model="formData.archive.idCardPhotos" accept-types=".jpg,.png,.webp"
:fileNumber="1" />
</a-form-item>
</a-col>
<!-- 上传资料 -->
<a-col :span="12">
<a-form-item label="上传资料" name="uploadedDocuments">
<gx-upload v-model="formData.archive.idCardPhotos"
accept-types=".jpg,.png,.webp,.xlsx,.docx,.doc" :fileNumber="10" />
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-form>
</a-card>
</a-spin> </a-spin>
</a-modal> </a-modal>
</template> </template>
<script setup> <script setup>
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { ref, defineProps, nextTick } from 'vue' import { ref, defineProps, nextTick,watch } from 'vue'
import { config } from '@/config' import { config } from '@/config'
import apis from '@/apis' import apis from '@/apis'
import { useForm, useModal,useSpining } from '@/hooks' import { useForm, useModal, useSpining } from '@/hooks'
import { useDicsStore } from '@/store' import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue' import AreaCascader from '@/components/AreaCascader/index.vue'
import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate' import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate'
import { getBirthDate, spliceUrl } from '@/utils/util' import { getBirthDate, spliceUrl } from '@/utils/util'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import storage from '@/utils/storage'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { FastBackwardFilled } from '@ant-design/icons-vue' import { FastBackwardFilled } from '@ant-design/icons-vue'
const emit = defineEmits(['ok']) const emit = defineEmits(['ok'])
const activeKey = ref('1') const activeKey = ref('1')
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal() const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRecord, formData, formRef, formRules, resetForm } = useForm() const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const areaCascaderRef = ref() const areaCascaderRef = ref()
const houseAreaRef = ref()
const cancelText = ref('取消') const cancelText = ref('取消')
const spining=ref(false) const spining = ref(false)
const isShow=ref(false)
formRules.value = { formRules.value = {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }], name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }], identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
@ -496,6 +504,8 @@ formRules.value = {
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
formData.value = { formData.value = {
stationId: storage.local.getItem('stationId'),
companyId: storage.local.getItem('companyId'),
archive: { archive: {
} }
@ -520,10 +530,10 @@ async function handleEdit(record = {}) {
title: '编辑对象' title: '编辑对象'
}) })
try { try {
spining.value=true spining.value = true
const { data, success } = await apis.serverObj.getItem(record.id).catch() const { data, success } = await apis.serverObj.getItem(record.id).catch()
if (!success) { if (!success) {
spining.value=false spining.value = false
hideModal() hideModal()
return return
} }
@ -534,11 +544,12 @@ async function handleEdit(record = {}) {
formData.value.governmentPurchasedServiceStartDate = [dayjs(formData.value.starGovernmentService), dayjs(formData.value.endGovernmentService)] formData.value.governmentPurchasedServiceStartDate = [dayjs(formData.value.starGovernmentService), dayjs(formData.value.endGovernmentService)]
nextTick(() => { nextTick(() => {
areaCascaderRef.value.initData(data.archive.homeAreaCodes) areaCascaderRef.value.initData(data.archive.homeAreaCodes)
houseAreaRef.value.initData(data.archive.houseAreaCodes)
}) })
spining.value=false spining.value = false
} catch (error) { } catch (error) {
console.log(error.message) console.log(error.message)
spining.value=false spining.value = false
} }
} }
@ -607,8 +618,8 @@ function handleOk() {
labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [], labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
} }
params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : [''] params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : []
params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments && formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : [''] params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments && formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : []
if (formData.value.governmentPurchasedServiceStartDate && formData.value.governmentPurchasedServiceStartDate.length > 0) { if (formData.value.governmentPurchasedServiceStartDate && formData.value.governmentPurchasedServiceStartDate.length > 0) {
params.archive.starGovernmentService = formData.value.governmentPurchasedServiceStartDate[0] params.archive.starGovernmentService = formData.value.governmentPurchasedServiceStartDate[0]
params.archive.endGovernmentService = formData.value.governmentPurchasedServiceStartDate[1] params.archive.endGovernmentService = formData.value.governmentPurchasedServiceStartDate[1]
@ -681,6 +692,7 @@ function handleCancel() {
* 关闭后 * 关闭后
*/ */
function onAfterClose() { function onAfterClose() {
activeKey.value='1'
resetForm() resetForm()
formData.value.archive = {} formData.value.archive = {}
hideLoading() hideLoading()

View File

@ -217,8 +217,8 @@ function handleOk() {
labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [], labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
birthDate: dayjs(formData.value.birthDate).format('YYYY-MM-DD') birthDate: dayjs(formData.value.birthDate).format('YYYY-MM-DD')
} }
params.archive.idCardPhotos = formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : [''] params.archive.idCardPhotos = formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : [ ]
params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : [''] params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : [ ]
if (formData.value.governmentPurchasedServiceStartDate.length > 0) { if (formData.value.governmentPurchasedServiceStartDate.length > 0) {
params.archive.starGovernmentService = dayjs(formData.value.governmentPurchasedServiceStartDate[0]).format('YYYY-MM-DD') params.archive.starGovernmentService = dayjs(formData.value.governmentPurchasedServiceStartDate[0]).format('YYYY-MM-DD')
params.archive.endGovernmentService = dayjs(formData.value.governmentPurchasedServiceStartDate[1]).format('YYYY-MM-DD') params.archive.endGovernmentService = dayjs(formData.value.governmentPurchasedServiceStartDate[1]).format('YYYY-MM-DD')

View File

@ -12,14 +12,14 @@
<p>手机号{{ formData.contact1 }}</p> <p>手机号{{ formData.contact1 }}</p>
<!-- <p>联系人{{ formData.contactman }}</p> <!-- <p>联系人{{ formData.contactman }}</p>
<p>联系方式{{ formData.contact1 }}</p> --> <p>联系方式{{ formData.contact1 }}</p> -->
<p><a-tag color="#2db7f5">#2db7f5</a-tag></p> <p><a-tag color="#2db7f5" v-for="value in formData.serviceRecipientCategory">{{ value }}</a-tag></p>
</div> </div>
</div> </div>
<div style="width: calc(100% - 280px);padding: 20px;"> <div style="width: calc(100% - 280px);padding: 20px;">
<!-- Tab 页签 --> <!-- Tab 页签 -->
<a-tabs v-model:activeKey="activeKey" @change="handleTabChange"> <a-tabs v-model:activeKey="activeKey" @change="handleTabChange">
<a-tab-pane v-for="(tab, index) in tabsList" :key="index" :tab="tab" /> <a-tab-pane v-for="(tab, index) in tabsList" :key="index+1" :tab="tab" />
</a-tabs> </a-tabs>
<!-- 动态组件区域 --> <!-- 动态组件区域 -->
<div style="flex: 1; padding: 16px; overflow-y: auto;"> <div style="flex: 1; padding: 16px; overflow-y: auto;">
@ -43,7 +43,7 @@ import apis from '@/apis'
import { useForm, useModal } from '@/hooks' import { useForm, useModal } from '@/hooks'
import { useDicsStore } from '@/store' import { useDicsStore } from '@/store'
const emit = defineEmits(['ok']) const emit = defineEmits(['ok'])
const activeKey = ref('1') const activeKey = ref(0)
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal() const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRecord, formData, formRef, formRules, resetForm } = useForm() const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const cancelText = ref('取消') const cancelText = ref('取消')
@ -106,12 +106,11 @@ function handleCreate(record) {
* 编辑 * 编辑
*/ */
function handleEdit(record = {}) { function handleEdit(record = {}) {
console.log('record', record) activeKey.value=1
showModal({ showModal({
type: 'edit', type: 'edit',
title: '编辑项', title: '编辑项',
}) })
formRecord.value = record
formData.value = cloneDeep(record) formData.value = cloneDeep(record)
} }
const callback = (val) => { const callback = (val) => {
@ -167,6 +166,7 @@ function handleCancel() {
* 关闭后 * 关闭后
*/ */
function onAfterClose() { function onAfterClose() {
activeKey.value=0
resetForm() resetForm()
hideLoading() hideLoading()
} }

View File

@ -3,13 +3,13 @@
<template #default="{ gutter, colSpan }"> <template #default="{ gutter, colSpan }">
<a-form :model="searchFormData" labelAlign="left"> <a-form :model="searchFormData" labelAlign="left">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="8"> <a-col :span="8" v-if="platForm === 'jianguan'">
<a-form-item label="所在节点" name="serviceNodeIds"> <a-form-item label="所在节点" name="serviceNodeIds">
<node-tree v-model:value="searchFormData.serviceNodeIds" /> <node-tree v-model:value="searchFormData.serviceNodeIds" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 所在区域 --> <!-- 所在区域 -->
<a-col :span="8"> <a-col :span="8" v-if="platForm === 'jianguan'">
<a-form-item label="所在区域" name="areaCodes"> <a-form-item label="所在区域" name="areaCodes">
<AreaCascader v-model:value="searchFormData.areaCodes" @change="onAreaChange" /> <AreaCascader v-model:value="searchFormData.areaCodes" @change="onAreaChange" />
</a-form-item> </a-form-item>
@ -244,7 +244,6 @@
</template> </template>
<template #extra> <template #extra>
<a-space> <a-space>
<a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新建</a-button> <a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新建</a-button>
<a-dropdown> <a-dropdown>
<template #overlay> <template #overlay>
@ -261,6 +260,14 @@
<UserOutlined /> <UserOutlined />
联系人导入 联系人导入
</a-menu-item> </a-menu-item>
<a-menu-item key="4" v-if="platForm==='yunying'">
<UserOutlined />
绑定服务人员
</a-menu-item>
<a-menu-item key="5" v-if="platForm==='yunying'">
<UserOutlined />
绑定管家
</a-menu-item>
</a-menu> </a-menu>
</template> </template>
<a-button> <a-button>
@ -272,6 +279,9 @@
<a-button>导入记录</a-button> <a-button>导入记录</a-button>
<a-button>导出</a-button> <a-button>导出</a-button>
<a-button>导出记录</a-button> <a-button>导出记录</a-button>
<a-button v-if="platForm==='yunying'">批量下载二维码</a-button>
<a-button v-if="platForm==='yunying'">二维码记录</a-button>
<a-button v-if="platForm==='yunying'">历史服务对象</a-button>
</a-space> </a-space>
</template> </template>
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading" <a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
@ -292,26 +302,45 @@
<template v-if="column.key === 'governmentPurchasedService'"> <template v-if="column.key === 'governmentPurchasedService'">
<span>{{ record.governmentPurchasedService ? '是' : '' }}</span> <span>{{ record.governmentPurchasedService ? '是' : '' }}</span>
</template> </template>
<template v-if="column.key === 'region'"> <template v-if="column.key === 'region'">
<span>{{ record.region&&record.region.join('/')}}</span> <span>{{ record.region && record.region.join('/') }}</span>
</template> </template>
<template v-if="column.key === 'serviceRecipientCategory'"> <template v-if="column.key === 'serviceRecipientCategory'">
<span>{{ <span>{{
dicsStore.getDictLabel('Service_Recipient_Category2', record.serviceRecipientCategory) dicsStore.getDictLabel('Service_Recipient_Category2', record.serviceRecipientCategory)
}}</span> }}</span>
</template> </template>
<template v-if="'action' === column.key"> <template v-if="'action' === column.key">
<x-action-button @click="$refs.detailRef.handleCreate(record)">
<span>详情</span>
</x-action-button>
<x-action-button @click="$refs.lineOrderRef.handleEdit(record,'2')">
<span>线下工单</span>
</x-action-button>
<x-action-button @click="$refs.editDialogRef.handleEdit(record)"> <x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<span>编辑</span> <span>编辑</span>
</x-action-button> </x-action-button>
<x-action-button @click="$refs.lineOrderRef.handleEdit(record,'1')"> <x-action-button @click="$refs.detailRef.handleEdit(record)">
<span>详情</span>
</x-action-button>
<x-action-button v-if="platForm==='yunying'">
<a-dropdown>
<a class="ant-dropdown-link" @click.prevent>
绑定
<DownOutlined />
</a>
<template #overlay>
<a-menu>
<a-menu-item>
<span>绑定服务人员</span>
</a-menu-item>
<a-menu-item>
<span>绑定管家</span>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</x-action-button>
<x-action-button @click="$refs.lineOrderRef.handleEdit(record, '2')">
<span>线下工单</span>
</x-action-button>
<x-action-button @click="$refs.lineOrderRef.handleEdit(record, '1')"
v-if="platForm === 'jianguan'">
<span>线上工单</span> <span>线上工单</span>
</x-action-button> </x-action-button>
<x-action-button @click="checkHandler(record)"> <x-action-button @click="checkHandler(record)">
@ -348,13 +377,17 @@ import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue' import AreaCascader from '@/components/AreaCascader/index.vue'
import NodeTree from '@/components/NodeTree/index.vue' import NodeTree from '@/components/NodeTree/index.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import {DownOutlined} from '@ant-design/icons-vue'
import storage from '@/utils/storage'
defineOptions({ defineOptions({
name: 'serverList', name: 'serverList',
}) })
const platForm = storage.local.getItem('platform')
const totalCount = ref(0) // const totalCount = ref(0) //
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
const lineOpen = ref(false) const lineOpen = ref(false)
const lineTitle = ref('线下工单') const lineTitle = ref('线下工单')
const serviceName = ref('') const serviceName = ref('')
const columns = [ const columns = [
{ {
@ -605,6 +638,8 @@ async function getPageList() {
const { pageSize, current } = paginationState const { pageSize, current } = paginationState
const { success, data, total } = await apis.serverObj const { success, data, total } = await apis.serverObj
.getProjectList({ .getProjectList({
stationId:storage.local.getItem('stationId'),
companyId:storage.local.getItem('companyId'),
pageSize, pageSize,
current: current, current: current,
...searchFormData.value, ...searchFormData.value,

View File

@ -7,9 +7,8 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="所属服务站点" name="stationId"> <a-form-item label="所属服务站点" name="stationId">
<a-select v-model:value="formData.stationId" allowClear> <a-select v-model:value="formData.stationId" allowClear>
<a-select-option v-for="item in stationList" :key="item.id" <a-select-option v-for="item in stationList" :key="item.id" :value="item.id">{{
:value="item.id">{{ item.name }}</a-select-option>
item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -81,7 +80,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-item label="学历" name="education"> <a-form-item label="学历" name="education">
<a-select v-model:value="formData.education" allowClear> <a-select v-model:value="formData.education" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.EDUCATION_LEVEL" :key="item.dval" <a-select-option v-for="item in dicsStore.dictOptions.Level_Education" :key="item.dval"
:value="item.dval">{{ :value="item.dval">{{
item.introduction }}</a-select-option> item.introduction }}</a-select-option>
</a-select> </a-select>
@ -98,7 +97,8 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="负责区域" name="sAreaCodes"> <a-form-item label="负责区域" name="sAreaCodes">
<AreaCascader v-model:value="formData.sAreaCodes" @change="onAreaChange" /> <AreaCascader v-model:value="formData.sAreaCodes" @change="onAreaChange"
ref="areaCascaderRef" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -188,7 +188,7 @@
<script setup> <script setup>
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { ref, defineProps } from 'vue' import { ref, nextTick } from 'vue'
import { config } from '@/config' import { config } from '@/config'
import apis from '@/apis' import apis from '@/apis'
import { useForm, useModal } from '@/hooks' import { useForm, useModal } from '@/hooks'
@ -198,38 +198,41 @@ import NodeTree from '@/components/NodeTree/index.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getBirthDate, spliceUrl } from '@/utils/util' import { getBirthDate, spliceUrl } from '@/utils/util'
import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate' import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate'
import storage from '@/utils/storage'
const emit = defineEmits(['ok']) const emit = defineEmits(['ok'])
const activeKey = ref('1')
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal() const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRecord, formData, formRef, formRules, resetForm } = useForm() const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const cancelText = ref('取消') const cancelText = ref('取消')
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
const stationList=ref([]) const stationList = ref([])
formRules.value={ const areaCascaderRef = ref()
stationId: [{ required: true, message: '请选择服务组织',trigger: ['blur','change']}], formRules.value = {
name: [{ required: true, message: '请输入姓名',trigger: 'blur' }], stationId: [{ required: true, message: '请选择服务组织', trigger: ['blur', 'change'] }],
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
idCard: [{ validator: validateIdCard, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }], idCard: [{ validator: validateIdCard, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
phone: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }], phone: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
serviceType: [{ required: true, message: '请选择护理人员类型',trigger: ['blur','change']}], serviceType: [{ required: true, message: '请选择护理人员类型', trigger: ['blur', 'change'] }],
insuranceStatus: [{ required: true, message: '请选择参保情况',trigger: ['blur','change']}], insuranceStatus: [{ required: true, message: '请选择参保情况', trigger: ['blur', 'change'] }],
} }
/** /**
* 新建 * 新建
*/ */
function handleCreate() { function handleCreate() {
formData.value.gender='1' formData.value.gender = '1'
formData.value.companyId = storage.local.getItem('companyId')
formData.value.stationId = storage.local.getItem('stationId')
showModal({ showModal({
type: 'create', type: 'create',
title: '新增服务人员', title: '新增服务人员',
}) })
} }
getStationList() getStationList()
async function getStationList(){ async function getStationList() {
try { try {
showLoading() showLoading()
const { success, data, total } = await apis.serviceMenu const { success, data, total } = await apis.serviceMenu
.getServiceSiteList({ .getServiceSiteList({
pageSize:100, pageSize: 100,
current: 1, current: 1,
}) })
.catch(() => { .catch(() => {
@ -238,7 +241,8 @@ async function getStationList(){
hideLoading() hideLoading()
if (config('http.code.success') === success) { if (config('http.code.success') === success) {
//type80about //type80about
stationList.value = data.map(item=>({id:item.id,name:item.name})) stationList.value = data.map(item => ({ id: item.id, name: item.name }))
console.log(stationList.value)
} }
} catch (error) { } catch (error) {
hideLoading() hideLoading()
@ -258,7 +262,7 @@ async function handleEdit(record = {}) {
hideModal() hideModal()
return return
} }
formRecord.value = data formData.value = data
if (formData.value.joinAt) { if (formData.value.joinAt) {
formData.value.joinAt = dayjs(formData.value.joinAt) formData.value.joinAt = dayjs(formData.value.joinAt)
} }
@ -267,8 +271,11 @@ async function handleEdit(record = {}) {
} }
formData.value.imgs = (data.imgs && data.imgs.length > 0) ? data.imgs.map(item => config('http.apiBasic') + item) : [] formData.value.imgs = (data.imgs && data.imgs.length > 0) ? data.imgs.map(item => config('http.apiBasic') + item) : []
formData.value.attachments = (data.attachments && data.attachments.length > 0) ? data.attachments.map(item => config('http.apiBasic') + item) : [] formData.value.attachments = (data.attachments && data.attachments.length > 0) ? data.attachments.map(item => config('http.apiBasic') + item) : []
formData.value.commissionRate=formData.value.commissionRate??formData.value.commissionRate*100 formData.value.commissionRate = formData.value.commissionRate ?? formData.value.commissionRate * 100
formData.value.birthDate2=dayjs(data.birthDate).format('YYYY-DD-MM') formData.value.birthDate2 = dayjs(data.birthDate).format('YYYY-DD-MM')
nextTick(() => {
areaCascaderRef.value.initData(data.archive.homeAreaCodes)
})
} catch (error) { } catch (error) {
} }
@ -287,16 +294,16 @@ function handleOk() {
showLoading() showLoading()
let params = { let params = {
...formData.value, ...formData.value,
birthDate:new Date(formData.value.birthDate) birthDate: new Date(formData.value.birthDate)
} }
if (formData.value.laborContract && formData.value.laborContract.length > 0) { if (formData.value.laborContract && formData.value.laborContract.length > 0) {
params.laborContractStartAt = formData.value.laborContract[0] params.laborContractStartAt = formData.value.laborContract[0]
params.laborContractEndAt = formData.value.laborContract[1] params.laborContractEndAt = formData.value.laborContract[1]
} }
params.imgs = (formData.value.imgs&&formData.value.imgs.length) > 0 ? formData.value.imgs.map(item => spliceUrl(item)) : [''] params.imgs = (formData.value.imgs && formData.value.imgs.length) > 0 ? formData.value.imgs.map(item => spliceUrl(item)) : []
params.attachments = (formData.value.attachments&&formData.value.attachments.length) > 0 ? formData.value.attachments.map(item => spliceUrl(item)) : [''] params.attachments = (formData.value.attachments && formData.value.attachments.length) > 0 ? formData.value.attachments.map(item => spliceUrl(item)) : []
params.commissionRate=formData.value.commissionRate??formData.value.commissionRate/100 params.commissionRate = formData.value.commissionRate ?? formData.value.commissionRate / 100
console.log(params) console.log(params)
let result = null let result = null
switch (modal.value.type) { switch (modal.value.type) {
@ -327,15 +334,15 @@ function handleOk() {
} }
// //
const extractBirthDateFromIdCard = () => { const extractBirthDateFromIdCard = () => {
console.log(111) console.log(111)
const { idCard } = formData.value; const { idCard } = formData.value;
if (!idCard) { if (!idCard) {
formData.value.birthDate = ''; formData.value.birthDate = '';
return; return;
} }
console.log(getBirthDate(idCard)) console.log(getBirthDate(idCard))
formData.value.birthDate2=getBirthDate(idCard) formData.value.birthDate2 = getBirthDate(idCard)
formData.value.birthDate =new Date(getBirthDate(idCard)); formData.value.birthDate = new Date(getBirthDate(idCard));
} }
function onAreaChange(value, labels) { function onAreaChange(value, labels) {
formData.value.sAreaLabels = [...labels] formData.value.sAreaLabels = [...labels]

View File

@ -2,89 +2,79 @@
<a-modal :open="modal.open" :title="modal.title" :width="1000" :confirm-loading="modal.confirmLoading" <a-modal :open="modal.open" :title="modal.title" :width="1000" :confirm-loading="modal.confirmLoading"
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel"> :after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
<a-card class=""> <a-card class="">
<div style="display: flex;justify-content: space-around;"> <div style="display: flex;justify-content: space-around;">
<div style="width:200px;margin-top: 20px;border-right: 1px solid #f0f0f0;display: flex;flex-direction: column;align-items: center;"> <div
<gx-upload v-model="formData.imgList" accept-types=".jpg,.png,.webp" :fileNumber="1" /> style="width:200px;margin-top: 20px;border-right: 1px solid #f0f0f0;display: flex;flex-direction: column;align-items: center;">
<div> <gx-upload v-model="formData.imgList" accept-types=".jpg,.png,.webp" :fileNumber="1" />
<p>{{ formData.name }}{{ formData.gender }}{{ formData.age }}</p> <div>
<p>身份证号{{ formData.idNumber }}</p> <p>姓名{{ formData.name }}</p>
<p>手机号{{ formData.contact1 }}</p> <p>性别{{ formData.gender==1?'男':'女' }}</p>
<p>联系人{{ formData.contactman }}</p> <p>身份证号{{ formData.idNumber }}</p>
<p>联系方式{{ formData.contact1 }}</p> <p>手机号{{ formData.contact1 }}</p>
</div>
</div> </div>
<div style="width: calc(100% - 200px);padding: 20px;">
<a-row :gutter="20">
<a-col :span="8">
<div><span class="label">出生日期:</span> {{ formData.birthDate || '-' }}</div>
</a-col>
<!-- 基本信息 -->
<a-col :span="8">
<div><span class="label">参保情况:</span> {{ formData.socialSecurityCardNumber || '-' }}</div>
</a-col>
<a-col :span="8">
<div><span class="label">护理人员类型:</span> {{ dicsStore.getDictLabel('STAFF_TYPE',formData.serviceType)}}</div>
</a-col>
<a-col :span="8">
<div><span class="label">用工形式:</span> {{ formData.idNumber || '-' }}</div>
</a-col>
</div> <a-col :span="8">
<div style="width: calc(100% - 200px);padding: 20px;"> <div><span class="label">负责区域:</span> {{ formData.nursingLevel || '-' }}</div>
<a-row :gutter="20"> </a-col>
<!-- 基本信息 --> <a-col :span="8">
<a-col :span="8"> <div><span class="label">提成比例:</span> {{ formData.healthStatus || '-' }}</div>
<div><span class="label">参保情况:</span> {{ formData.socialSecurityCardNumber || '-' }}</div> </a-col>
</a-col>
<a-col :span="8">
<div><span class="label">护理人员类型:</span> {{ formData.identityType || '-' }}</div>
</a-col>
<a-col :span="8">
<div><span class="label">身份证号码:</span> {{ formData.idNumber || '-' }}</div>
</a-col>
<a-col :span="8">
<div><span class="label">学历:</span> {{ formData.idNumber || '-' }}</div>
</a-col>
<a-col :span="8">
<div><span class="label">用工形式:</span> {{ formData.idNumber || '-' }}</div>
</a-col>
<a-col :span="8">
<a-col :span="8"> <div><span class="label">入职日期:</span> {{ formData.survivalStatus || '-' }}</div>
<div><span class="label">负责区域:</span> {{ formData.nursingLevel || '-' }}</div> </a-col>
</a-col> <a-col :span="8">
<a-col :span="8"> <div><span class="label">资格证照名称:</span> {{ formData.serviceStatus || '-' }}</div>
<div><span class="label">提成比例:</span> {{ formData.healthStatus || '-' }}</div> </a-col>
</a-col> <a-col :span="8">
<div><span class="label">资格证照等级:</span> {{ formData.serviceForm || '-' }}</div>
<a-col :span="8"> </a-col>
<div><span class="label">入职日期:</span> {{ formData.survivalStatus || '-' }}</div> <a-col :span="8">
</a-col> <div><span class="label">银行卡号:</span> {{ formData.serviceForm || '-' }}</div>
<a-col :span="8"> </a-col>
<div><span class="label">资格证照名称:</span> {{ formData.serviceStatus || '-' }}</div> <a-col :span="8">
</a-col> <div><span class="label">开户行名称:</span> {{ formData.serviceForm || '-' }}</div>
</a-col>
<a-col :span="8"> <a-col :span="8">
<div><span class="label">资格证照等级:</span> {{ formData.serviceForm || '-' }}</div> <div><span class="label">家庭住址:</span> {{ formData.serviceForm || '-' }}</div>
</a-col> </a-col>
<a-col :span="8"> <!-- 数组类字段 -->
<div><span class="label">银行卡号:</span> {{ formData.serviceForm || '-' }}</div> <a-col :span="24" v-if="formData.idCardPhotos && formData.idCardPhotos.length > 0">
</a-col> <div>
<a-col :span="8"> <span class="label">证件照:</span>
<div><span class="label">开户行名称:</span> {{ formData.serviceForm || '-' }}</div> <div style="margin-top: 8px;">
</a-col> <a-image v-for="(url, index) in formData.idCardPhotos" :key="index" :src="url"
<a-col :span="8"> fit="cover" style="width: 100px; height: 60px; margin-right: 8px;"
<div><span class="label">补贴类型:</span> {{ formData.serviceForm || '-' }}</div> :preview-src-list="formData.idCardPhotos" />
</a-col> </div>
<a-col :span="8">
<div><span class="label">家庭住址:</span> {{ formData.serviceForm || '-' }}</div>
</a-col>
<!-- 数组类字段 -->
<a-col :span="24" v-if="formData.idCardPhotos && formData.idCardPhotos.length > 0">
<div>
<span class="label">证件照:</span>
<div style="margin-top: 8px;">
<a-image v-for="(url, index) in formData.idCardPhotos" :key="index" :src="url"
fit="cover" style="width: 100px; height: 60px; margin-right: 8px;"
:preview-src-list="formData.idCardPhotos" />
</div> </div>
</div> </a-col>
</a-col> <a-col :span="8">
<a-col :span="8"> <div><span class="label">附件:</span> {{ formData.serviceForm || '-' }}</div>
<div><span class="label">附件:</span> {{ formData.serviceForm || '-' }}</div> </a-col>
</a-col> <a-col :span="8">
<a-col :span="8"> <div><span class="label">备注:</span> {{ formData.serviceForm || '-' }}</div>
<div><span class="label">备注:</span> {{ formData.serviceForm || '-' }}</div> </a-col>
</a-col> </a-row>
</a-row> </div>
</div> </div>
</div>
</a-card> </a-card>
</a-modal> </a-modal>
</template> </template>
@ -96,9 +86,11 @@ import { ref, computed, defineAsyncComponent, defineExpose, getCurrentInstance,
import { config } from '@/config' import { config } from '@/config'
import apis from '@/apis' import apis from '@/apis'
import { useForm, useModal } from '@/hooks' import { useForm, useModal } from '@/hooks'
import { useDicsStore } from '@/store' import { useDicsStore } from '@/store'
const emit = defineEmits(['ok']) const emit = defineEmits(['ok'])
const activeKey = ref('1') const activeKey = ref('1')
const dicsStore = useDicsStore()
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal() const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRecord, formData, formRef, formRules, resetForm } = useForm() const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const cancelText = ref('取消') const cancelText = ref('取消')

View File

@ -4,9 +4,9 @@
<a-form :model="searchFormData" layout="inline" labelAlign="left"> <a-form :model="searchFormData" layout="inline" labelAlign="left">
<a-row :gutter="[24, 24]"> <a-row :gutter="[24, 24]">
<!-- 所在区域 --> <!-- 所在区域 -->
<a-col :span="8"> <a-col :span="8" v-if="platForm !== 'yunying'">
<a-form-item label="所属服务组织" name="station"> <a-form-item label="所属服务组织" name="station">
<node-tree v-model:value="searchFormData.station" /> <node-tree v-model:value="searchFormData.station" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- 姓名 --> <!-- 姓名 -->
@ -79,7 +79,7 @@
<span>{{ index + 1 }}</span> <span>{{ index + 1 }}</span>
</template> </template>
<template v-if="column.key === 'gender'"> <template v-if="column.key === 'gender'">
<span v-if="record.gender=='1'"></span> <span v-if="record.gender == '1'"></span>
<span v-else></span> <span v-else></span>
</template> </template>
<template v-if="column.key === 'serviceType'"> <template v-if="column.key === 'serviceType'">
@ -90,6 +90,15 @@
<x-action-button @click="$refs.editDialogRef.handleEdit(record)"> <x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<span>编辑</span> <span>编辑</span>
</x-action-button> </x-action-button>
<x-action-button @click="$refs.detailRef.handleEdit(record)">
<span>详情</span>
</x-action-button>
<x-action-button @click="$refs.editDialogRef.handleEdit(record)" v-if="platForm==='yunying'">
<span>服务项目</span>
</x-action-button>
<x-action-button @click="$refs.editDialogRef.handleEdit(record)" v-if="platForm==='yunying'">
<span>停用</span>
</x-action-button>
<x-action-button @click="handleDelete(record)"> <x-action-button @click="handleDelete(record)">
<span style="color: #ff4d4f;">删除</span> <span style="color: #ff4d4f;">删除</span>
</x-action-button> </x-action-button>
@ -116,11 +125,12 @@ import AreaCascader from '@/components/AreaCascader/index.vue'
import detail from './components/detail.vue' import detail from './components/detail.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import NodeTree from '@/components/NodeTree/index.vue' import NodeTree from '@/components/NodeTree/index.vue'
import storage from '@/utils/storage'
defineOptions({ defineOptions({
name: 'allocation', name: 'allocation',
}) })
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
const platForm = storage.local.getItem('platform')
const columns = [ const columns = [
{ {
title: '序号', title: '序号',
@ -198,7 +208,7 @@ const columns = [
dataIndex: 'action', dataIndex: 'action',
key: 'action', key: 'action',
align: 'center', align: 'center',
width: 180, width: 320,
fixed: 'right', fixed: 'right',
} }
]; ];
@ -274,6 +284,8 @@ async function getPageList() {
const { pageSize, current } = paginationState const { pageSize, current } = paginationState
const { success, data, total } = await apis.serviceStaffList const { success, data, total } = await apis.serviceStaffList
.getProjectList({ .getProjectList({
companyId: storage.local.getItem('companyId'),
stationId: storage.local.getItem('stationId'),
pageSize, pageSize,
current: current, current: current,
...searchFormData.value, ...searchFormData.value,

View File

@ -105,7 +105,7 @@ function handleOk() {
let result = null let result = null
switch (modal.value.type) { switch (modal.value.type) {
case 'create': case 'create':
params.companyId = 'C001' params.companyId = storage.local.getItem('companyId')
result = await apis.dict.createItem(params).catch((error) => { result = await apis.dict.createItem(params).catch((error) => {
console.log(error.message) console.log(error.message)
throw new Error(error) throw new Error(error)

View File

@ -0,0 +1,695 @@
<template>
<a-modal :open="modal.open" :title="modal.title" :width="800" :confirm-loading="modal.confirmLoading"
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
<a-spin tip="Loading..." :spinning="spining">
<a-card>
<a-form ref="formRef" :model="formData" :rules="formRules">
<a-tabs v-model:activeKey="activeKey">
<!-- 基本信息 -->
<a-tab-pane key="1" tab="基本信息">
<a-row :gutter="24">
<!-- 姓名 -->
<a-col :span="12">
<a-form-item label="姓名" name="name">
<a-input v-model:value="formData.name" placeholder="请输入姓名" />
</a-form-item>
</a-col>
<!-- 性别 -->
<a-col :span="12">
<a-form-item label="性别" name="gender">
<a-radio-group v-model:value="formData.gender">
<a-radio value="1"></a-radio>
<a-radio value="2"></a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<!-- 证件号码 -->
<a-col :span="12">
<a-form-item label="证件号码" name="identityNo">
<span style="display: inline-flex; width: 100%;">
<a-select v-model:value="formData.identityType"
style="width: 100px; margin-right: 8px;">
<a-select-option v-for="item in dicsStore.dictOptions.CARD_TYPE"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
<a-input v-model:value="formData.identityNo" placeholder="请输入证件号码"
style="flex: 1;" @change="extractBirthDateFromIdCard" />
</span>
</a-form-item>
</a-col>
<!-- 出生日期 -->
<a-col :span="12">
<a-form-item label="出生日期" name="birthDate">
<a-date-picker v-model:value="formData.birthDate" placeholder="请选择出生日期"
style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 关爱巡访电话 -->
<a-col :span="12">
<a-form-item label="关爱巡访电话" name="careVisitPhone">
<a-input v-model:value="formData.careVisitPhone" placeholder="请输入关爱巡访电话" />
</a-form-item>
</a-col>
<!-- 联系方式 -->
<a-col :span="12">
<a-form-item label="联系方式" name="contact1">
<a-input v-model:value="formData.contact1" placeholder="请输入联系方式" />
</a-form-item>
</a-col>
<!-- 社保卡号 -->
<a-col :span="12">
<a-form-item label="社保卡号" name="socialSecurityCardNumber">
<a-input v-model:value="formData.socialSecurityCardNumber" placeholder="请输入社保卡号" />
</a-form-item>
</a-col>
<!-- 其他电话1 -->
<a-col :span="12">
<a-form-item label="其他电话1" name="otherPhone1">
<a-input v-model:value="formData.otherPhone1" placeholder="请输入其他电话1" />
</a-form-item>
</a-col>
<!-- 其他电话2 -->
<a-col :span="12">
<a-form-item label="其他电话2" name="otherPhone2">
<a-input v-model:value="formData.otherPhone2" placeholder="请输入其他电话2" />
</a-form-item>
</a-col>
<!-- 政府购买服务开始时间 -->
<a-col :span="12">
<a-form-item label="政府购买服务时间" name="governmentPurchasedServiceStartDate">
<a-range-picker v-model:value="formData.governmentPurchasedServiceStartDate"
placeholder="请选择政府购买服务时间" style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 健康状况 -->
<a-col :span="12">
<a-form-item label="健康状况" :name="['archive', 'healthStatus']">
<a-select v-model:value="formData.archive.healthStatus" placeholder="请选择健康状况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Health_Condition"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 服务状态 -->
<a-col :span="12">
<a-form-item label="服务状态" :name="['archive', 'serviceStatus']">
<a-select v-model:value="formData.archive.serviceStatus" placeholder="请选择服务状态">
<a-select-option v-for="item in dicsStore.dictOptions.SERVICE_STATUS"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 生存状态 -->
<a-col :span="12">
<a-form-item label="生存状态" :name="['archive', 'survivalStatus']">
<a-select v-model:value="formData.archive.survivalStatus" placeholder="请选择生存状态">
<a-select-option v-for="item in dicsStore.dictOptions.LIVING_STATUS"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 服务形式 -->
<a-col :span="12">
<a-form-item label="服务形式" name="archive.serviceForm">
<a-select v-model:value="formData.archive.serviceForm" placeholder="请选择服务形式"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Service_Format"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 护理等级 -->
<a-col :span="12">
<a-form-item label="护理等级" name="archive.nursingLevel">
<a-select v-model:value="formData.archive.nursingLevel" placeholder="请选择护理等级"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Care_Level"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 家庭地址 -->
<a-col :span="12">
<a-form-item label="家庭地址" :name="['archive', 'homeAreaCodes']">
<AreaCascader v-model:value="formData.archive.homeAreaCodes" @change="onAreaChange"
ref="areaCascaderRef" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="详细地址" :name="['archive', 'homeDetailAddress']">
<a-input v-model:value="formData.archive.homeDetailAddress" placeholder="请输入详细地址" />
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
<!-- 家庭信息 -->
<a-tab-pane key="2" tab="地图定位">
<a-row :gutter="24">
<!-- 经度 -->
<a-col :span="12">
<a-form-item label="经度" name="lat">
<a-input-number v-model:value="formData.archive.lat" placeholder="请输入经度"
style="width: 100%;" />
</a-form-item>
</a-col>
<!-- 纬度 -->
<a-col :span="12">
<a-form-item label="纬度" name="lag">
<a-input-number v-model:value="formData.archive.lag" placeholder="请输入纬度"
style="width: 100%;" />
</a-form-item>
</a-col>
<gx-map @handleGetLng="handleGetLng" />
</a-row>
</a-tab-pane>
<!-- 更多 -->
<a-tab-pane key="3" tab="更多">
<a-row :gutter="24">
<!-- 居住情况 -->
<a-col :span="8">
<a-form-item label="居住情况" name="livingSituation">
<a-select v-model:value="formData.archive.livingSituation" placeholder="请选择居住情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Living_Situation"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 子女情况 -->
<a-col :span="8">
<a-form-item label="子女情况" name="childrenSituation">
<a-select v-model:value="formData.archive.childrenSituation" placeholder="请选择子女情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.CHILDREN_STATE"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 统计分类 -->
<a-col :span="8">
<a-form-item label="统计分类" name="statisticsCategory">
<a-select v-model:value="formData.archive.statisticsCategory" placeholder="请选择统计分类"
allow-clear>
<a-select-option
v-for="item in dicsStore.dictOptions.Statistical_Classification"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 智力情况 -->
<a-col :span="8">
<a-form-item label="智力情况" name="intellectualSituation">
<a-select v-model:value="formData.archive.intellectualSituation"
placeholder="请选择智力情况" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Intellectual_Condition"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否长期照料失能子女 -->
<a-col :span="8">
<a-form-item label="是否长期照料失能子女" name="longTermCareForDisabledChildren">
<a-select v-model:value="formData.archive.longTermCareForDisabledChildren"
placeholder="请选择是否长期照料失能子女" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Disabled_Child"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 老人子女探望情况 -->
<a-col :span="8">
<a-form-item label="老人子女探望情况" name="childrenVisitStatus">
<a-select v-model:value="formData.archive.childrenVisitStatus"
placeholder="请选择老人子女探望情况" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Frequency_Visits"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否人户分离 -->
<a-col :span="8">
<a-form-item label="是否人户分离" name="householdResidenceSeparation">
<a-select v-model:value="formData.archive.householdResidenceSeparation"
placeholder="请选择是否人户分离" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Separation"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 民族 -->
<a-col :span="8">
<a-form-item label="民族" name="ethnicity">
<a-select v-model:value="formData.archive.ethnicity" placeholder="请选择民族"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Ethnicity"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否完成能力评估 -->
<a-col :span="8">
<a-form-item label="是否完成能力评估" name="completedCapacityAssessment">
<a-select v-model:value="formData.archive.completedCapacityAssessment"
placeholder="请选择是否完成能力评估" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Capability_Assessment"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否住出租屋/地下室 -->
<a-col :span="8">
<a-form-item label="是否住出租屋/地下室" name="livesInRentedRoomOrBasement">
<a-select v-model:value="formData.archive.livesInRentedRoomOrBasement"
placeholder="请选择是否住出租屋/地下室" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Property_Basement"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 经济来源 -->
<a-col :span="8">
<a-form-item label="经济来源" name="economicSource">
<a-select v-model:value="formData.archive.economicSource" placeholder="请选择经济来源"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Source_Income"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 文化程度 -->
<a-col :span="8">
<a-form-item label="文化程度" name="educationLevel">
<a-select v-model:value="formData.archive.educationLevel" placeholder="请选择文化程度"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Level_Education"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 宗教信仰 -->
<a-col :span="8">
<a-form-item label="宗教信仰" name="religion">
<a-select v-model:value="formData.archive.religion" placeholder="请选择宗教信仰"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Religious_belief"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 职业情况 -->
<a-col :span="8">
<a-form-item label="职业情况" name="occupation">
<a-select v-model:value="formData.archive.occupation" placeholder="请选择职业情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Employment_Status"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 政治面貌 -->
<a-col :span="8">
<a-form-item label="政治面貌" name="politicalAffiliation">
<a-select v-model:value="formData.archive.politicalAffiliation"
placeholder="请选择政治面貌" allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Political_affiliation"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 婚姻情况 -->
<a-col :span="8">
<a-form-item label="婚姻情况" name="maritalStatus">
<a-select v-model:value="formData.archive.maritalStatus" placeholder="请选择婚姻情况"
allow-clear>
<a-select-option v-for="item in dicsStore.dictOptions.Marital_Status"
:key="item.dval" :value="item.dval">
{{ item.introduction }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span='8'>
<a-form-item label="分类标签" name="labelsCode">
<a-select v-model:value="formData.labelsCode" allowClear mode="multiple">
<a-select-option
v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 户口所在地 -->
<a-col :span="8">
<a-form-item label="户口所在地" name="householdArea">
<AreaCascader v-model:value="formData.archive.householdArea"
@change="onAreaHoldChange" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="详细地址" name="householdDetailAddress">
<a-input v-model:value="formData.archive.householdDetailAddress"
placeholder="请输入详细地址" />
</a-form-item>
</a-col>
<!-- 其他 -->
<a-col :span="24">
<a-form-item label="其他" name="otherNotes">
<a-textarea v-model:value="formData.archive.otherNotes" placeholder="请输入" :rows="1"
:auto-size="{ minRows: 1, maxRows: 2 }" />
</a-form-item>
</a-col>
<!-- 身份证照片 -->
<a-col :span="12">
<a-form-item label="身份证照片" name="idCardPhotos">
<gx-upload v-model="formData.archive.idCardPhotos" accept-types=".jpg,.png,.webp"
:fileNumber="1" />
</a-form-item>
</a-col>
<!-- 上传资料 -->
<a-col :span="12">
<a-form-item label="上传资料" name="uploadedDocuments">
<gx-upload v-model="formData.archive.idCardPhotos"
accept-types=".jpg,.png,.webp,.xlsx,.docx,.doc" :fileNumber="10" />
</a-form-item>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-form>
</a-card>
</a-spin>
</a-modal>
</template>
<script setup>
import { cloneDeep } from 'lodash-es'
import { ref, defineProps, nextTick } from 'vue'
import { config } from '@/config'
import apis from '@/apis'
import { useForm, useModal,useSpining } from '@/hooks'
import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue'
import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate'
import { getBirthDate, spliceUrl } from '@/utils/util'
import dayjs from 'dayjs'
import { message } from 'ant-design-vue'
import { FastBackwardFilled } from '@ant-design/icons-vue'
const emit = defineEmits(['ok'])
const activeKey = ref('1')
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
const { formRecord, formData, formRef, formRules, resetForm } = useForm()
const areaCascaderRef = ref()
const cancelText = ref('取消')
const spining=ref(false)
formRules.value = {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
identityType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
identityNo: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
contact1: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
archive: {
healthStatus: [{ required: true, message: '请选择健康状况', trigger: 'change' }],
serviceStatus: [{ required: true, message: '请选择服务状态', trigger: 'change' }],
homeAreaCodes: [{ required: true, message: '请选择并输入家庭地址', trigger: 'change' }],
homeDetailAddress: [{ required: true, message: '请输入详细地址', trigger: 'change' }],
},
}
const dicsStore = useDicsStore()
formData.value = {
archive: {
}
}
/**
* 新建
*/
function handleCreate() {
formData.value.gender = '1'
showModal({
type: 'create',
title: '新建项',
})
}
/**
* 编辑
*/
async function handleEdit(record = {}) {
showModal({
type: 'edit',
title: '编辑对象'
})
try {
spining.value=true
const { data, success } = await apis.serverObj.getItem(record.id).catch()
if (!success) {
spining.value=false
hideModal()
return
}
formData.value = { ...data }
formData.value.birthDate = dayjs(data.birthDate)
formData.value.archive.idCardPhotos = data.archive.idCardPhotos ? data.archive.idCardPhotos.map(item => config('http.apiBasic') + item) : []
formData.value.archive.uploadedDocuments = data.archive.uploadedDocuments ? data.archive.uploadedDocuments.map(item => config('http.apiBasic') + item) : []
formData.value.governmentPurchasedServiceStartDate = [dayjs(formData.value.starGovernmentService), dayjs(formData.value.endGovernmentService)]
nextTick(() => {
areaCascaderRef.value.initData(data.archive.homeAreaCodes)
})
spining.value=false
} catch (error) {
console.log(error.message)
spining.value=false
}
}
// utils/idCard.js
function isValidIdCard(value) {
if (!value || typeof value !== 'string') return false;
const idCardRegex = /(^\d{15}$)|(^\d{18}$)|(^\d{18}X$)/i;
if (!idCardRegex.test(value)) return false;
// 18
if (value.length === 18) {
const Wi = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1];
const Vi = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
let sum = 0;
for (let i = 0; i < 17; i++) {
sum += parseInt(value[i], 10) * Wi[i];
}
const checkCode = Vi[sum % 11];
if (checkCode !== value[17].toUpperCase()) {
return false;
}
}
//
let year, month, day;
if (value.length === 15) {
year = '19' + value.substring(6, 8);
month = value.substring(8, 10);
day = value.substring(10, 12);
} else {
year = value.substring(6, 10);
month = value.substring(10, 12);
day = value.substring(12, 14);
}
const date = new Date(year, month - 1, day);
if (
date.getFullYear() !== parseInt(year, 10) ||
date.getMonth() + 1 !== parseInt(month, 10) ||
date.getDate() !== parseInt(day, 10)
) {
return false;
}
const currentYear = new Date().getFullYear();
const birthYear = parseInt(year, 10);
if (birthYear < 1900 || birthYear > currentYear) {
return false;
}
return true;
}
/**
* 确定
*/
function handleOk() {
formRef.value
.validateFields()
.then(async (values) => {
try {
showLoading()
let params = {
...formData.value,
labels: formData.value.labelsCode ? formData.value.labelsCode.map(item => dicsStore.getDictLabel('Service_Recipient_Category2', item)) : [],
}
params.archive.idCardPhotos = formData.value.archive.idCardPhotos && formData.value.archive.idCardPhotos.length > 0 ? formData.value.archive.idCardPhotos.map(item => spliceUrl(item)) : [ ]
params.archive.uploadedDocuments = formData.value.archive.uploadedDocuments && formData.value.archive.uploadedDocuments.length > 0 ? formData.value.archive.uploadedDocuments.map(item => spliceUrl(item)) : [ ]
if (formData.value.governmentPurchasedServiceStartDate && formData.value.governmentPurchasedServiceStartDate.length > 0) {
params.archive.starGovernmentService = formData.value.governmentPurchasedServiceStartDate[0]
params.archive.endGovernmentService = formData.value.governmentPurchasedServiceStartDate[1]
}
//
if (params.identityType === '1' && !isValidIdCard(params.identityNo)) {
return message.error('请输入正确的身份证号码')
}
let result = null
switch (modal.value.type) {
case 'create':
result = await apis.serverObj.createItem(params).catch(() => {
throw new Error()
})
console.log('result', result.code)
break
case 'edit':
console.log(params)
result = await apis.serverObj.updateItem(params.id, params).catch(() => {
throw new Error()
})
break
}
hideLoading()
if (config('http.code.success') === true) {
hideModal()
emit('ok')
}
} catch (error) {
console.log(error.message)
hideLoading()
// message.error(error.message)
}
})
.catch(() => {
hideLoading()
})
}
//
const extractBirthDateFromIdCard = () => {
console.log(111)
const { identityNo } = formData.value;
if (!identityNo) {
formData.value.birthDate = '';
return;
}
console.log(getBirthDate(identityNo))
formData.value.birthDate = dayjs(getBirthDate(identityNo));
};
function onAreaChange(value, labels) {
formData.value.archive.homeAreaLabels = [...labels]
}
function onAreaHoldChange(value, labels) {
formData.value.archive.houseAreaLabels = [...labels]
}
function handleGetLng(obj) {
formData.value.archive.lat = obj.lat
formData.value.archive.lag = obj.lng
}
/**
* 取消
*/
function handleCancel() {
hideModal()
}
/**
* 关闭后
*/
function onAfterClose() {
resetForm()
formData.value.archive = {}
hideLoading()
}
defineExpose({
handleCreate,
handleEdit,
})
</script>
<style lang="less" scoped></style>

View File

@ -0,0 +1,726 @@
<template>
<x-search-bar class="mb-8-2">
<template #default="{ gutter, colSpan }">
<a-form :model="searchFormData" labelAlign="left">
<a-row :gutter="24">
<!-- 姓名 -->
<a-col :span="8">
<a-form-item label="姓名112" name="name">
<a-input v-model:value="searchFormData.name" placeholder="请输入姓名" />
</a-form-item>
</a-col>
<!-- 身份证号 -->
<a-col :span="8">
<a-form-item label="身份证号" name="idNumber">
<a-input v-model:value="searchFormData.idNumber" placeholder="请输入身份证号" />
</a-form-item>
</a-col>
<!-- 联系方式 -->
<a-col :span="8">
<a-form-item label="联系方式" name="contact1">
<a-input v-model:value="searchFormData.contact1" placeholder="请输入联系方式" />
</a-form-item>
</a-col>
<!-- 分类标签 -->
<a-col :span="8">
<a-form-item label="分类标签" name="serviceRecipientCategory">
<a-select v-model:value="searchFormData.serviceRecipientCategory" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Service_Recipient_Category2"
:key="item.dval" :value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 服务状态未在映射表中 -->
<a-col :span="8">
<a-form-item label="服务状态" name="serviceStatus">
<a-select v-model:value="searchFormData.serviceStatus" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.SERVICE_STATUS" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 生存状态 -->
<a-col :span="8">
<a-form-item label="生存状态" name="survivalStatus">
<a-select v-model:value="searchFormData.survivalStatus" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.LIVING_STATUS" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 档案号 -->
<!-- <a-col :span="8">
<a-form-item label="档案号" name="fileNumber">
<a-input v-model:value="searchFormData.fileNumber" placeholder="请输入档案号" />
</a-form-item>
</a-col> -->
<!-- 残疾类型 -->
<a-col :span="8">
<a-form-item label="残疾类型" name="disabilityType">
<a-select v-model:value="searchFormData.disabilityType" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.DISABILITY_TYPES" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 残疾等级 -->
<a-col :span="8">
<a-form-item label="残疾等级" name="disabilityLevel">
<a-select v-model:value="searchFormData.disabilityLevel" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Disability_Level" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否出租屋/地下室 -->
<a-col :span="8">
<a-form-item label="是否出租屋/地下室" name="livesInRentedRoomOrBasement">
<a-select v-model:value="searchFormData.livesInRentedRoomOrBasement" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Property_Basement"
:key="item.dval" :value="item.dval">{{ item.introduction
}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否完成能力评估 -->
<a-col :span="8">
<a-form-item label="是否完成能力评估" name="completedCapacityAssessment">
<a-select v-model:value="searchFormData.completedCapacityAssessment" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Capability_Assessment"
:key="item.dval" :value="item.dval">{{ item.introduction
}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否人户分离 -->
<a-col :span="8">
<a-form-item label="是否人户分离" name="householdResidenceSeparation">
<a-select v-model:value="searchFormData.householdResidenceSeparation" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Separation" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 婚姻状况 -->
<a-col :span="8">
<a-form-item label="婚姻状况" name="maritalStatus">
<a-select v-model:value="searchFormData.maritalStatus" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Marital_Status" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 健康状况 -->
<a-col :span="8">
<a-form-item label="健康状况" name="healthStatus">
<a-select v-model:value="searchFormData.healthStatus" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Health_Condition" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 居住情况 -->
<a-col :span="8">
<a-form-item label="居住情况" name="livingSituation">
<a-select v-model:value="searchFormData.livingSituation" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Living_Situation" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 统计分类未在映射表中 -->
<a-col :span="8">
<a-form-item label="统计分类" name="statisticalClassification">
<a-select v-model:value="searchFormData.statisticalClassification" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Statistical_Classification"
:key="item.dval" :value="item.dval">{{ item.introduction
}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 智力情况未在映射表中 -->
<a-col :span="8">
<a-form-item label="智力情况" name="intellectualCondition">
<a-select v-model:value="searchFormData.intellectualCondition" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Intellectual_Condition"
:key="item.dval" :value="item.dval">{{ item.introduction
}}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 是否长期照料失能子女未在映射表中 -->
<a-col :span="8">
<a-form-item label="是否长期照料失能子女" name="longTermCareForDisabledChild">
<a-select v-model:value="searchFormData.longTermCareForDisabledChild" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Disabled_Child" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 老人子女探望情况未在映射表中 -->
<a-col :span="8">
<a-form-item label="老人子女探望情况" name="frequencyOfVisits">
<a-select v-model:value="searchFormData.frequencyOfVisits" allowClear>
<a-select-option v-for="item in dicsStore.dictOptions.Frequency_Visits" :key="item.dval"
:value="item.dval">{{
item.introduction }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- 户籍地址建议若为区域则用 region若为详细地址则用 detailedAddress -->
<a-col :span="8">
<a-form-item label="户籍地址" name="hAreaCodes">
<AreaCascader v-model:value="searchFormData.hAreaCodes" @change="detailedAddressChange" />
</a-form-item>
</a-col>
<!-- 操作按钮 -->
<a-col class="align-left" :span="8">
<a-space>
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
<a-button ghost type="primary" @click="handleSearch">
{{ $t('button.search') }}
</a-button>
</a-space>
</a-col>
</a-row>
</a-form>
</template>
</x-search-bar>
<a-row :gutter="8" :wrap="false">
<a-col flex="auto">
<a-card>
<template #title>
<a-space>
<span style="font-size: 18px;">服务对象列表</span>
<span style="margin-left: 10px;color: #666;">({{ totalCount }})</span>
</a-space>
</template>
<template #extra>
<a-space>
<a-button type="primary" @click="$refs.editDialogRef.handleCreate()">新建</a-button>
<a-dropdown>
<template #overlay>
<a-menu @click="handleMenuClick">
<a-menu-item key="1">
<UserOutlined />
服务对象导入
</a-menu-item>
<a-menu-item key="2">
<UserOutlined />
更新导入
</a-menu-item>
<a-menu-item key="3">
<UserOutlined />
联系人导入
</a-menu-item>
</a-menu>
</template>
<a-button>
导入
<DownOutlined />
</a-button>
</a-dropdown>
<a-button danger>批量打标</a-button>
<a-button>导入记录</a-button>
<a-button>导出</a-button>
<a-button>导出记录</a-button>
</a-space>
</template>
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
<template #bodyCell="{ index, column, record }">
<template v-if="column.key === 'serialNumber'">
<span>{{ index + 1 }}</span>
</template>
<template v-if="column.key === 'gender'">
<span>{{ record.gender === '1' ? '男' : '女' }}</span>
</template>
<template v-if="column.key === 'survivalStatus'">
<span>{{ dicsStore.getDictLabel('LIVING_STATUS', record.survivalStatus) }}</span>
</template>
<template v-if="column.key === 'healthStatus'">
<span>{{ dicsStore.getDictLabel('Health_Condition', record.healthStatus) }}</span>
</template>
<template v-if="column.key === 'governmentPurchasedService'">
<span>{{ record.governmentPurchasedService ? '是' : '' }}</span>
</template>
<template v-if="column.key === 'region'">
<span>{{ record.region && record.region.join('/') }}</span>
</template>
<template v-if="column.key === 'serviceRecipientCategory'">
<span>{{
dicsStore.getDictLabel('Service_Recipient_Category2', record.serviceRecipientCategory)
}}</span>
</template>
<template v-if="'action' === column.key">
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
<span>编辑</span>
</x-action-button>
<x-action-button @click="$refs.detailRef.handleCreate(record)">
<span>详情</span>
</x-action-button>
<x-action-button v-if="platForm==='yunying'">
<a-dropdown>
<a class="ant-dropdown-link" @click.prevent>
绑定
<DownOutlined />
</a>
<template #overlay>
<a-menu>
<a-menu-item>
<span>绑定服务人员</span>
</a-menu-item>
<a-menu-item>
<span>绑定管家</span>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</x-action-button>
<x-action-button @click="$refs.lineOrderRef.handleEdit(record, '2')">
<span>线下工单</span>
</x-action-button>
<x-action-button @click="checkHandler(record)">
<span>转出</span>
</x-action-button>
</template>
</template>
</a-table>
</a-card>
</a-col>
</a-row>
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
<detail ref="detailRef"></detail>
<LineOrder2 ref="lineOrderRef" />
<!-- <a-drawer v-model:open="lineOpen" class="custom-class" width="600" root-class-name="root-class-name" :root-style="{ color: 'blue' }" :title="lineTitle" placement="right">
<LineOrder ref="lineOrderRef" />
</a-drawer> -->
</template>
<script setup>
import { message, Modal } from 'ant-design-vue'
import { nextTick, onMounted, ref } from 'vue'
import apis from '@/apis'
import { config } from '@/config'
import { usePagination } from '@/hooks'
import { useI18n } from 'vue-i18n'
import totalImg from '@/assets/imgs/total.png'
import EditDialog from './components/EditDialog.vue'
import detail from '../../serverObj/serverList/components/detail.vue'
import LineOrder2 from '../../serverObj/serverList/components/LineOrder2.vue'
import { useDicsStore } from '@/store'
import AreaCascader from '@/components/AreaCascader/index.vue'
import NodeTree from '@/components/NodeTree/index.vue'
import dayjs from 'dayjs'
import {DownOutlined} from '@ant-design/icons-vue'
import storage from '@/utils/storage'
defineOptions({
name: 'yunYingServerObj',
})
const platForm = storage.local.getItem('platform')
const totalCount = ref(0) //
const dicsStore = useDicsStore()
const lineOpen = ref(false)
const lineTitle = ref('线下工单')
const serviceName = ref('')
const columns = [
{
title: '序号',
dataIndex: 'serialNumber',
key: 'serialNumber',
align: 'center',
width: 80,
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: 'center',
width: 100,
},
{
title: '性别',
dataIndex: 'gender',
key: 'gender',
align: 'center',
width: 80,
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
align: 'center',
width: 80,
},
{
title: '身份证号',
dataIndex: 'identityNo',
key: 'identityNo',
align: 'center',
width: 180,
},
{
title: '二维码',
dataIndex: 'qrCode',
key: 'qrCode',
align: 'center',
width: 100,
},
{
title: '是否政府购买服务',
dataIndex: 'governmentPurchasedService',
key: 'governmentPurchasedService',
align: 'center',
width: 150,
},
{
title: '服务对象分类',
dataIndex: 'serviceRecipientCategory',
key: 'serviceRecipientCategory',
align: 'center',
width: 120,
},
{
title: '健康状况',
dataIndex: 'healthStatus',
key: 'healthStatus',
align: 'center',
width: 120,
},
{
title: '生存状态',
dataIndex: 'survivalStatus',
key: 'survivalStatus',
align: 'center',
width: 120,
},
// --- ---
{
title: '去世时间',
dataIndex: 'passWayAt',
key: 'passWayAt',
align: 'center',
width: 140,
customRender: ({ text, record }) => {
return text ? dayjs(text).format('YYYY-MM-DD') : '-';
},
},
// --- ---
{
title: '去世原因',
dataIndex: 'passWayReason',
key: 'passWayReason',
align: 'center',
width: 140,
},
// --- ---
{
title: '更新时间',
dataIndex: 'updateTime',
key: 'updateTime',
align: 'center',
width: 140,
customRender: ({ text, record }) => {
return text ? dayjs(text).format('YYYY-MM-DD') : '-';
},
},
// --- ---
{
title: '失能险签约日期',
dataIndex: 'ltcInsuranceSignUpDate',
key: 'ltcInsuranceSignUpDate',
align: 'center',
width: 150,
customRender: ({ text, record }) => {
return text ? dayjs(text).format('YYYY-MM-DD') : '-';
},
},
// --- ---
{
title: '失能险解约日期',
dataIndex: 'ltcInsuranceTerminationDate',
key: 'ltcInsuranceTerminationDate',
align: 'center',
width: 150,
customRender: ({ text, record }) => {
return text ? dayjs(text).format('YYYY-MM-DD') : '-';
},
},
// --- ---
{
title: '联系方式1',
dataIndex: 'contact1',
key: 'contact1',
align: 'center',
width: 130,
},
{
title: '联系方式2',
dataIndex: 'contact2',
key: 'contact2',
align: 'center',
width: 130,
},
{
title: '联系方式3',
dataIndex: 'contact3',
key: 'contact3',
align: 'center',
width: 130,
},
{
title: '所在区域',
dataIndex: 'region',
key: 'region',
align: 'center',
width: 180,
ellipsis: true,
},
{
title: '详细地址',
dataIndex: 'detailedAddress',
key: 'detailedAddress',
align: 'center',
width: 200,
ellipsis: true,
},
{
title: '残疾类型',
dataIndex: 'disabilityType',
key: 'disabilityType',
align: 'center',
width: 120,
},
{
title: '残疾等级',
dataIndex: 'disabilityLevel',
key: 'disabilityLevel',
align: 'center',
width: 120,
},
{
title: '残疾证号',
dataIndex: 'disabilityCertificateNumber',
key: 'disabilityCertificateNumber',
align: 'center',
width: 160,
},
{
title: '所在节点',
dataIndex: 'currentNode',
key: 'currentNode',
align: 'center',
width: 120,
},
{
title: '档案号',
dataIndex: 'fileNumber',
key: 'fileNumber',
align: 'center',
width: 140,
},
// --- ---
{
title: '建档日期',
dataIndex: 'dateOfFileCreation',
key: 'dateOfFileCreation',
align: 'center',
width: 140,
customRender: ({ text, record }) => {
return text ? dayjs(text).format('YYYY-MM-DD') : '-';
},
},
{
title: '操作',
dataIndex: 'action',
key: 'action',
align: 'center',
width: 350,
fixed: 'right',
}
];
const { t } = useI18n() // t
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
const editDialogRef = ref()
const detailRef = ref()
const lineOrderRef = ref()
onMounted(() => {
searchFormData.value.serviceNodeIds = dicsStore.orgTree[0].value
getCount(searchFormData.value.serviceNodeIds)
})
getPageList()
async function getCount(params) {
try {
const { success, data } = await apis.serverObj.getCount({ serviceNodeCodes: params })
if (config('http.code.success') === success) {
totalCount.value = data.count
}
} catch (error) {
}
}
/**
* 获取表格数据
* @returns {Promise<void>}
*/
async function getPageList() {
try {
const { pageSize, current } = paginationState
const { success, data, total } = await apis.serverObj
.getProjectList({
stationId:storage.local.getItem('stationId'),
companyId:storage.local.getItem('companyId'),
pageSize,
current: current,
...searchFormData.value,
})
.catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
listData.value = data
paginationState.total = total
}
} catch (error) {
}
}
/**核销 */
const checkHandler = (record) => {
Modal.confirm({
title: '即将核销是否继续',
content: t('button.confirm'),
okText: t('button.confirm'),
onOk: async () => {
const params = {
...record,
status: 'success'
}
const { success } = await apis.productOrder.updateItem(params.id, params).catch(() => {
// throw new Error()
})
if (config('http.code.success') === success) {
// resolve()
message.success('核销成功')
await getPageList()
}
},
})
}
/**
* 删除
*/
function handleDelete({ id }) {
Modal.confirm({
title: t('pages.system.user.delTip'),
content: t('button.confirm'),
okText: t('button.confirm'),
onOk: () => {
return new Promise((resolve, reject) => {
; (async () => {
try {
const { success } = await apis.productOrder.delItem(id).catch(() => {
throw new Error()
})
if (config('http.code.success') === success) {
resolve()
message.success(t('component.message.success.delete'))
await getPageList()
}
} catch (error) {
reject()
}
})()
})
},
})
}
function onAreaChange(value) {
searchFormData.value.areaCodes = value
}
function detailedAddressChange(value) {
searchFormData.value.hAreaCodes = value
}
/**
* 分页
*/
function onTableChange({ current, pageSize }) {
paginationState.current = current
paginationState.pageSize = pageSize
getPageList()
}
/**
* 搜索
*/
function handleSearch() {
resetPagination()
getPageList()
}
/**
* 重置
*/
function handleResetSearch() {
searchFormData.value = {}
resetPagination()
getPageList()
}
/**
* 编辑完成
*/
async function onOk() {
await getPageList()
}
function lineOrder(record) {
lineOpen.value = true;
lineTitle.value = '线下工单';
}
</script>
<style lang="less" scoped></style>