parent
a73b0520f0
commit
3edc38d901
|
|
@ -297,6 +297,25 @@
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
</JFormContainer>
|
</JFormContainer>
|
||||||
|
<JFormContainer :disabled="false">
|
||||||
|
<template #detail>
|
||||||
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||||
|
name="EmployeesApplyForm">
|
||||||
|
<a-row class="card-class">
|
||||||
|
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
|
||||||
|
<SectionDivider :title="'接单配置'" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="接单上限" v-bind="validateInfos.orderCap" id="EmployeesApplyForm-orderCap"
|
||||||
|
name="orderCap">
|
||||||
|
<a-input-number v-model:value="formData.orderCap" placeholder="请输入接单上限数量" :min="0"
|
||||||
|
:precision="0" style="width: 100%" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</template>
|
||||||
|
</JFormContainer>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -359,6 +378,7 @@ const formData = reactive<Record<string, any>>({
|
||||||
regional: '',
|
regional: '',
|
||||||
serviceTag: '',
|
serviceTag: '',
|
||||||
currentAddress: '',
|
currentAddress: '',
|
||||||
|
orderCap: undefined,
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ enum Api {
|
||||||
getModifyInfo = '/admin/elderInfo/getModifyInfo',
|
getModifyInfo = '/admin/elderInfo/getModifyInfo',
|
||||||
guaAudit = '/admin/elderInfo/guaAudit',
|
guaAudit = '/admin/elderInfo/guaAudit',
|
||||||
elderAudit = '/admin/elderInfo/elderAudit',
|
elderAudit = '/admin/elderInfo/elderAudit',
|
||||||
|
changeOrderly = '/admin/elderInfo/changeOrderly',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -106,3 +107,11 @@ export const guaAudit = (params) => {
|
||||||
export const elderAudit = (params) => {
|
export const elderAudit = (params) => {
|
||||||
return defHttp.post({ url: Api.elderAudit, params });
|
return defHttp.post({ url: Api.elderAudit, params });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 长者信息变更护理人员
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const changeOrderly = (params) => {
|
||||||
|
return defHttp.post({ url: Api.changeOrderly, params });
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
<!-- <a-col :lg="6">
|
<!-- <a-col :lg="6">
|
||||||
<a-form-item name="nuId">
|
<a-form-item name="nuId">
|
||||||
<template #label><span title="NUID">NUID</span></template>
|
<template #label><span title="NUID">NUID</span></template>
|
||||||
<JInput v-model:value="queryParam.nuId" placeholder="请输入NUID" />
|
<JInput v-model:value="queryParam.nuId" placeholder="请输入NUID" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col> -->
|
</a-col> -->
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="nuId">
|
<a-form-item name="nuId">
|
||||||
<template #label><span title="护理单元">护理单元</span></template>
|
<template #label><span title="护理单元">护理单元</span></template>
|
||||||
|
|
@ -83,7 +83,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
canResize: false,
|
canResize: false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 120,
|
width: 260,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
beforeFetch: async (params) => {
|
beforeFetch: async (params) => {
|
||||||
|
|
@ -138,6 +138,11 @@ function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
(selectedRowKeys.value = []) && reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleAssignCaregiver(elderInfo) {
|
||||||
|
console.log("🌊 ~ handleAssignCaregiver ~ elderInfo:", elderInfo)
|
||||||
|
registerModal.value.chooseHlry(elderInfo)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作栏
|
* 操作栏
|
||||||
*/
|
*/
|
||||||
|
|
@ -150,6 +155,10 @@ function getTableAction(record) {
|
||||||
{
|
{
|
||||||
label: '护理流程',
|
label: '护理流程',
|
||||||
onClick: handleHllc.bind(null, record),
|
onClick: handleHllc.bind(null, record),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '指派护理人员',
|
||||||
|
onClick: handleAssignCaregiver.bind(null, record),
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,16 @@
|
||||||
<ElderHllc v-if="hllcVisible" ref="hllcForm" @ok="handlehllcCancel" :formBpm="false">
|
<ElderHllc v-if="hllcVisible" ref="hllcForm" @ok="handlehllcCancel" :formBpm="false">
|
||||||
</ElderHllc>
|
</ElderHllc>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
|
<!-- 指派护理人员 -->
|
||||||
|
<a-drawer :title="'指派护理人员'" width="70vw" :visible="hlryVisible" :closable="true"
|
||||||
|
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleHlryCancel">
|
||||||
|
<template #footer>
|
||||||
|
<a-button type="primary" style="margin-right: 8px" @click="handleHlryCancel">关闭</a-button>
|
||||||
|
<a-button type="primary" @click="handleHlryOk">确认</a-button>
|
||||||
|
</template>
|
||||||
|
<EmployeesSelectList v-if="hlryVisible" ref="employeesSelectListRef" @success="handleHlryCancel" :formBpm="false">
|
||||||
|
</EmployeesSelectList>
|
||||||
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
@ -47,16 +57,19 @@ import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
import GuaUpInfoForm from '/@/views/elder/elderinfo/components/GuaUpInfoForm.vue'
|
import GuaUpInfoForm from '/@/views/elder/elderinfo/components/GuaUpInfoForm.vue'
|
||||||
import ElderUpInfoForm from '/@/views/elder/elderinfo/components/ElderUpInfoForm.vue'
|
import ElderUpInfoForm from '/@/views/elder/elderinfo/components/ElderUpInfoForm.vue'
|
||||||
import ElderHllc from '/@/views/elder/elderinfo/components/ElderHllc.vue'
|
import ElderHllc from '/@/views/elder/elderinfo/components/ElderHllc.vue'
|
||||||
|
import EmployeesSelectList from './EmployeesSelectList.vue'
|
||||||
|
|
||||||
const title = ref<string>('');
|
const title = ref<string>('');
|
||||||
const width = ref<number>(800);
|
const width = ref<number>(800);
|
||||||
const visible = ref<boolean>(false);
|
const visible = ref<boolean>(false);
|
||||||
|
const hlryVisible = ref(false)
|
||||||
const disableSubmit = ref<boolean>(false);
|
const disableSubmit = ref<boolean>(false);
|
||||||
const registerForm = ref();
|
const registerForm = ref();
|
||||||
const upInfoForm = ref();
|
const upInfoForm = ref();
|
||||||
const upInfoVisible = ref<boolean>(false);
|
const upInfoVisible = ref<boolean>(false);
|
||||||
const hllcVisible = ref<boolean>(false);
|
const hllcVisible = ref<boolean>(false);
|
||||||
const hllcForm = ref();
|
const hllcForm = ref();
|
||||||
|
const employeesSelectListRef = ref()
|
||||||
const elderUpInfoForm = ref();
|
const elderUpInfoForm = ref();
|
||||||
const elderUpInfoVisible = ref<boolean>(false);
|
const elderUpInfoVisible = ref<boolean>(false);
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
@ -181,6 +194,28 @@ function handleElderUpInfoCancel() {
|
||||||
emit('success');
|
emit('success');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleHlryCancel() {
|
||||||
|
hlryVisible.value = false
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleHlryOk() {
|
||||||
|
nextTick(() => {
|
||||||
|
employeesSelectListRef.value.hlryConfirm();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开护理人员选择抽屉
|
||||||
|
* @param elderInfo
|
||||||
|
*/
|
||||||
|
function chooseHlry(elderInfo) {
|
||||||
|
hlryVisible.value = true
|
||||||
|
nextTick(() => {
|
||||||
|
employeesSelectListRef.value.show(elderInfo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
|
|
@ -188,6 +223,7 @@ defineExpose({
|
||||||
upInfoEdit,
|
upInfoEdit,
|
||||||
upElderInfoEdit,
|
upElderInfoEdit,
|
||||||
hllcView,
|
hllcView,
|
||||||
|
chooseHlry,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/admin/bizEmployeesInfo/bizEmployeesInfo/list',
|
||||||
|
save='/admin/bizEmployeesInfo/bizEmployeesInfo/add',
|
||||||
|
edit='/admin/bizEmployeesInfo/bizEmployeesInfo/edit',
|
||||||
|
deleteOne = '/admin/bizEmployeesInfo/bizEmployeesInfo/delete',
|
||||||
|
deleteBatch = '/admin/bizEmployeesInfo/bizEmployeesInfo/deleteBatch',
|
||||||
|
importExcel = '/admin/bizEmployeesInfo/bizEmployeesInfo/importExcel',
|
||||||
|
exportXls = '/admin/bizEmployeesInfo/bizEmployeesInfo/exportXls',
|
||||||
|
|
||||||
|
getEmployeesList = '/services/serviceTag/serviceTag/getEmployeesList',
|
||||||
|
queryTagsById = '/services/serviceTag/serviceTag/queryById',
|
||||||
|
checkTags='/bizEmployeesInfo/nuBizEmployeesServcieTags/add',
|
||||||
|
removeTags = '/bizEmployeesInfo/nuBizEmployeesServcieTags/delete',
|
||||||
|
getEmployessServiceTags = '/services/serviceTag/serviceTag/getEmployessServiceTags',
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出api
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const getExportUrl = Api.exportXls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入api
|
||||||
|
*/
|
||||||
|
export const getImportUrl = Api.importExcel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表接口
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
export const getEmployessServiceTags = (params) => defHttp.get({ url: Api.getEmployessServiceTags, params });
|
||||||
|
export const getEmployeesList = (params) => defHttp.get({ url: Api.getEmployeesList, params });
|
||||||
|
|
||||||
|
export const queryTagsById = (params) => defHttp.get({ url: Api.queryTagsById, params });
|
||||||
|
/**
|
||||||
|
* 删除单个
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const deleteOne = (params,handleSuccess) => {
|
||||||
|
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param params
|
||||||
|
* @param handleSuccess
|
||||||
|
*/
|
||||||
|
export const batchDelete = (params, handleSuccess) => {
|
||||||
|
createConfirm({
|
||||||
|
iconType: 'warning',
|
||||||
|
title: '确认删除',
|
||||||
|
content: '是否删除选中数据',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
|
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||||
|
handleSuccess();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存或者更新
|
||||||
|
* @param params
|
||||||
|
* @param isUpdate
|
||||||
|
*/
|
||||||
|
export const saveOrUpdate = (params, isUpdate) => {
|
||||||
|
let url = isUpdate ? Api.edit : Api.save;
|
||||||
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const checkTags = (params) => {
|
||||||
|
let url = Api.checkTags;
|
||||||
|
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||||
|
}
|
||||||
|
export const removeTags = (params) => {
|
||||||
|
let url = Api.removeTags;
|
||||||
|
return defHttp.delete({ url: url, params }, {joinParamsToUrl: true});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,345 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24" style="margin-bottom: 14px;">
|
||||||
|
<a-button type="primary" @click="handleCleanHlry">不指派护理人员</a-button>
|
||||||
|
</a-col>
|
||||||
|
<a-col v-for="(item, index) in dataList" :key="index"
|
||||||
|
:style="{ 'padding-right': (index + 1) % 3 === 0 ? '0px' : '14px', 'margin-bottom': '14px' }" :xs="24" :sm="24"
|
||||||
|
:md="12" :lg="12" :xl="8" :xxl="8">
|
||||||
|
<!-- 使用卡片组件替代原来的行布局 -->
|
||||||
|
<a-card :class="{
|
||||||
|
'selected-card': selectedEmployee?.id === item.id,
|
||||||
|
'employee-card': true
|
||||||
|
}" style="width: 100%; border-radius: 8px;" :bodyStyle="{ padding: '16px' }" @click="handleCardClick(item)">
|
||||||
|
<div style="position: relative;">
|
||||||
|
<!-- 顶部信息区域 -->
|
||||||
|
<a-row style="margin-bottom: 16px;">
|
||||||
|
<a-col :span="4" style="padding-left: 8px;">
|
||||||
|
<img :src="handleHeadPath(item.headPath)" style="width: 48px;height:48px;border-radius: 45px;" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="16" style="padding-left: 12px;">
|
||||||
|
<div>
|
||||||
|
<span class="titleOne ellipsis-one-lines1" :title="item.name">
|
||||||
|
{{ item.name }} / {{ item.sex ? item.sex : '无' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 4px;">
|
||||||
|
<span style="color: rgb(144, 147, 153); font-size: 12px;">
|
||||||
|
入职日期: {{ item.entryTime }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="4" style="text-align: right;">
|
||||||
|
<div v-show="item.izOnline == '0'" class="online-status">在线</div>
|
||||||
|
<div v-show="item.izOnline == '1'" class="offline-status">离线</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<!-- 详细信息区域 -->
|
||||||
|
<div style="background-color: #F8F9FB; border-radius: 8px; padding: 12px; color: #5a5a5a;">
|
||||||
|
<a-row style="margin-bottom: 8px; align-items: center;">
|
||||||
|
<a-col :span="3">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<Icon icon="ant-design:idcard-outlined" :size="16" />
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="5" style="font-size: 12px; padding-left: 8px;">身份证号:</a-col>
|
||||||
|
<a-col :span="16">
|
||||||
|
<div class="ellipsis-one-lines1" style="font-size: 12px; text-align: right;">{{ item.idCard || '无' }}
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<a-row style="margin-bottom: 8px; align-items: center;">
|
||||||
|
<a-col :span="3">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<Icon icon="ant-design:phone-outlined" :size="16" style="transform: rotate(90deg);" />
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="5" style="font-size: 12px; padding-left: 8px;">联系电话:</a-col>
|
||||||
|
<a-col :span="16">
|
||||||
|
<div class="ellipsis-one-lines1" style="font-size: 12px; text-align: right;">{{ item.tel || '无' }}
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<a-row style="align-items: center;">
|
||||||
|
<a-col :span="3">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<Icon icon="material-symbols:calendar-month-outline" :size="16" />
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="5" style="font-size: 12px; padding-left: 8px;">出生日期:</a-col>
|
||||||
|
<a-col :span="16">
|
||||||
|
<div class="ellipsis-one-lines1" style="font-size: 12px; text-align: right;">{{ item.dateOfBirth ||
|
||||||
|
'无' }}</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
<div v-if="dataList.length == 0" style="text-align: center;width: 100%;margin-top: 50px;">
|
||||||
|
<a-empty description="暂无数据" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="bizEmployeesInfo-bizEmployeesInfo" setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
|
import { list } from './EmployeesSelectInfo.api';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||||
|
import { Pagination } from 'ant-design-vue';
|
||||||
|
import { useDrawer } from '/@/components/Drawer';
|
||||||
|
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||||
|
import { changeOrderly } from '../ElderInfo.api'
|
||||||
|
|
||||||
|
const APagination = Pagination;
|
||||||
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const dataList = ref<any[]>([]);
|
||||||
|
const current = ref(1);
|
||||||
|
const pageSize = ref(12);
|
||||||
|
const total = ref(0);
|
||||||
|
const elderInfo = ref(null);
|
||||||
|
// 新增:选中的员工
|
||||||
|
const selectedEmployee = ref<any>(null);
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
|
const labelCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 4,
|
||||||
|
xl: 6,
|
||||||
|
xxl: 4
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 20,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 新增:处理卡片点击事件(单选功能)
|
||||||
|
const handleCardClick = (employee: any) => {
|
||||||
|
if (selectedEmployee.value?.id === employee.id) {
|
||||||
|
// 如果点击已选中的卡片,则取消选中
|
||||||
|
selectedEmployee.value = null;
|
||||||
|
} else {
|
||||||
|
// 选中新卡片
|
||||||
|
selectedEmployee.value = employee;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//当没有员工头像时,默认展示企业logo
|
||||||
|
function handleHeadPath(headPath) {
|
||||||
|
if (headPath) {
|
||||||
|
return getFileAccessHttpUrl(headPath);
|
||||||
|
} else {
|
||||||
|
return '../../resource/img/logo.png';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分配账号
|
||||||
|
function handleFpzh(item) {
|
||||||
|
defHttp.get({ url: '/sys/user/queryByEmployessId', params: { employessId: item.id } }).then(res => {
|
||||||
|
console.log("🚀 ~ handleFpzh ~ res:", res)
|
||||||
|
if (res == null) {
|
||||||
|
var record = { employessId: item.id, phone: item.tel, realname: item.name, sex: item.sex ? parseInt(item.sex) : '' }
|
||||||
|
console.log("🚀 ~ defHttp.get ~ record:", record)
|
||||||
|
openDrawer(true, {
|
||||||
|
record,
|
||||||
|
isUpdate: false,
|
||||||
|
showFooter: true,
|
||||||
|
tenantSaas: false,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
openDrawer(true, {
|
||||||
|
record: res,
|
||||||
|
isUpdate: true,
|
||||||
|
showFooter: true,
|
||||||
|
tenantSaas: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
// 重置时清空选中状态
|
||||||
|
selectedEmployee.value = null;
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageChange(page, newPageSize) {
|
||||||
|
console.log('onPageChange', page, newPageSize);
|
||||||
|
current.value = page;
|
||||||
|
if (newPageSize) {
|
||||||
|
pageSize.value = newPageSize;
|
||||||
|
}
|
||||||
|
// 切换页面时清空选中状态
|
||||||
|
selectedEmployee.value = null;
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
function reload() {
|
||||||
|
queryParam.pageSize = -1;
|
||||||
|
queryParam.pageNo = current.value;
|
||||||
|
console.log('queryParam', queryParam);
|
||||||
|
defHttp.get({ url: '/admin/bizEmployeesInfo/bizEmployeesInfo/list', params: queryParam }).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
dataList.value = res.records;
|
||||||
|
total.value = res.total;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动请求并暴露内部方法
|
||||||
|
onMounted(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
function show(elderInfo_) {
|
||||||
|
elderInfo.value = elderInfo_
|
||||||
|
selectedEmployee.value = { id: elderInfo_.orderly }
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暴露选中员工的方法
|
||||||
|
function getSelectedEmployee() {
|
||||||
|
return selectedEmployee.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空选中状态的方法
|
||||||
|
function clearSelection() {
|
||||||
|
selectedEmployee.value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleCleanHlry() {
|
||||||
|
selectedEmployee.value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hlryConfirm() {
|
||||||
|
let params = { id: elderInfo.value.id, orderly: null }
|
||||||
|
if (selectedEmployee.value && selectedEmployee.value.id) {
|
||||||
|
params.orderly = selectedEmployee.value.id
|
||||||
|
}
|
||||||
|
changeOrderly(params).then(res => {
|
||||||
|
emit('success')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
show,
|
||||||
|
getSelectedEmployee,
|
||||||
|
clearSelection,
|
||||||
|
hlryConfirm,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.jeecg-basic-table-form-container {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.table-page-search-submitButtons {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-group-cust {
|
||||||
|
min-width: 100px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-group-split-cust {
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-form-item:not(.ant-form-item-with-help) {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-picker),
|
||||||
|
:deep(.ant-input-number) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增卡片样式
|
||||||
|
.selected-card {
|
||||||
|
border: 2px solid #1890ff !important;
|
||||||
|
box-shadow: 0 0 8px rgba(24, 144, 255, 0.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.employee-card {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-4px);
|
||||||
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-card-body) {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleOne {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ellipsis-one-lines1 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.online-status {
|
||||||
|
height: 28px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #EFF7FF;
|
||||||
|
border: 1px solid #21A5FA;
|
||||||
|
color: #21A5FA;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 70px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offline-status {
|
||||||
|
height: 28px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #F5F7FF;
|
||||||
|
border: 1px solid #e9e9e9;
|
||||||
|
color: rgb(144, 147, 153);
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 70px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue