2025-04-01 09:50:16 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="p-2">
|
|
|
|
|
|
<!--查询区域-->
|
|
|
|
|
|
<div class="jeecg-basic-table-form-container">
|
|
|
|
|
|
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
|
<a-row :gutter="24">
|
|
|
|
|
|
<a-col :lg="6">
|
|
|
|
|
|
<a-form-item name="name">
|
|
|
|
|
|
<template #label><span title="姓名">姓名</span></template>
|
2025-05-14 10:41:21 +08:00
|
|
|
|
<j-input placeholder="请输入姓名" v-model:value="queryParam.name" allow-clear ></j-input>
|
2025-04-01 09:50:16 +08:00
|
|
|
|
</a-form-item>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
|
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
|
|
|
|
|
<a-col :lg="6">
|
|
|
|
|
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
|
|
|
|
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
2025-04-09 17:35:42 +08:00
|
|
|
|
<!-- <a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button> -->
|
2025-04-01 09:50:16 +08:00
|
|
|
|
</a-col>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
</div>
|
2025-08-22 17:12:20 +08:00
|
|
|
|
<a-row style="margin-top: -5px;">
|
|
|
|
|
|
<a-col v-for="(item,index) in dataList" :key="index" style="padding: 5px 14px 0 0;height: 230px;" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" >
|
|
|
|
|
|
<a-row style="padding: 0 5px;background-color: white;border-radius: 8px;height: 220px;">
|
2025-05-07 14:04:02 +08:00
|
|
|
|
<a-col :span="4">
|
|
|
|
|
|
<div class="bjclass">
|
|
|
|
|
|
<img :src="handleHeadPath(item.headPath)" style="width: 40px;height:40px;margin-top: 10px;" @error="setDefaultImage"/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="20" style="padding-left: 15px;">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span class="titleOne">
|
|
|
|
|
|
{{item.name}} /
|
|
|
|
|
|
{{item.sex_dictText?item.sex_dictText:'无'}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="height: 130px">
|
|
|
|
|
|
<div class="center-lines">入职日期: {{item.entryTime }}</div>
|
|
|
|
|
|
<div class="center-lines">身份证号: {{item.idCard }}</div>
|
|
|
|
|
|
<div class="center-lines">联系电话: {{item.tel }}</div>
|
|
|
|
|
|
<div class="center-lines">出生日期: {{item.dateOfBirth }}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div style="color: #857f7f;">
|
|
|
|
|
|
<span style="float:left;"><Icon icon="ant-design:user-add-outlined" :size="18" /><span style="margin-left:5px;">{{ item.createBy_dictText }}</span></span>
|
|
|
|
|
|
<span style="margin-left: 15px;float:left;"><Icon icon="ant-design:field-time-outlined" :size="20" /><span style="margin-left:5px;font-size:16px;">{{ item.createTime.substring(0,10) }}</span></span>
|
|
|
|
|
|
<span style="margin-right: 15px;float:right;">
|
|
|
|
|
|
<a-dropdown :trigger="['hover']" placement="topRight">
|
|
|
|
|
|
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
|
|
|
|
|
|
<template #overlay>
|
|
|
|
|
|
<a-menu>
|
|
|
|
|
|
<a-menu-item @click="handleEdit(item)">编辑</a-menu-item>
|
|
|
|
|
|
<a-menu-item @click="handleFwbq(item)">服务标签</a-menu-item>
|
|
|
|
|
|
<a-menu-item @click="handleFpzh(item)">分配账号</a-menu-item>
|
|
|
|
|
|
</a-menu>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-dropdown>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
</a-col>
|
2025-04-01 09:50:16 +08:00
|
|
|
|
</a-row>
|
|
|
|
|
|
|
2025-05-14 10:41:21 +08:00
|
|
|
|
<div style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
|
2025-05-07 14:04:02 +08:00
|
|
|
|
<span style="margin-right: 10px;">共 {{ total }} 条数据</span>
|
|
|
|
|
|
<Pagination showLessItems v-model:current="current" :pageSize="pageSize" size="small"
|
|
|
|
|
|
show-quick-jumper :total="total" @change="onPageChange" />
|
|
|
|
|
|
</div>
|
2025-04-01 09:50:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 表单区域 -->
|
|
|
|
|
|
<BizEmployeesInfoModal ref="registerModal" @success="handleSuccess"></BizEmployeesInfoModal>
|
2025-04-09 17:35:42 +08:00
|
|
|
|
<!-- 服务标签 -->
|
2025-04-02 13:30:35 +08:00
|
|
|
|
<EmployeesServiceTagModal ref="registerServiceTagModal" @success="handleSuccess"></EmployeesServiceTagModal>
|
2025-04-09 17:35:42 +08:00
|
|
|
|
<!--用户抽屉-->
|
|
|
|
|
|
<UserDrawer @register="registerDrawer" @success="handleSuccess" />
|
2025-04-01 09:50:16 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" name="bizEmployeesInfo-bizEmployeesInfo" setup>
|
|
|
|
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
|
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
|
|
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BizEmployeesInfo.api';
|
|
|
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
|
|
|
|
import BizEmployeesInfoModal from './components/BizEmployeesInfoModal.vue'
|
2025-04-02 13:30:35 +08:00
|
|
|
|
import EmployeesServiceTagModal from '/@/views/biz/bizEmployeesInfo/employeesServiceTag/employeesServiceTagModal.vue'
|
|
|
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
|
|
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
2025-04-01 09:50:16 +08:00
|
|
|
|
import { Pagination } from 'ant-design-vue';
|
2025-04-09 17:35:42 +08:00
|
|
|
|
import { useDrawer } from '/@/components/Drawer';
|
|
|
|
|
|
import UserDrawer from '/@/views/system/user/UserDrawer.vue';
|
2025-05-14 10:41:21 +08:00
|
|
|
|
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
2025-04-09 17:35:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-04-01 09:50:16 +08:00
|
|
|
|
const APagination = Pagination;
|
2025-04-09 17:35:42 +08:00
|
|
|
|
//注册drawer
|
|
|
|
|
|
const [registerDrawer, { openDrawer }] = useDrawer();
|
2025-04-01 09:50:16 +08:00
|
|
|
|
|
|
|
|
|
|
const formRef = ref();
|
|
|
|
|
|
const queryParam = reactive<any>({});
|
|
|
|
|
|
const registerModal = ref();
|
2025-04-02 13:30:35 +08:00
|
|
|
|
const registerServiceTagModal = ref();
|
2025-04-01 09:50:16 +08:00
|
|
|
|
const dataList = ref<any[]>([]);
|
|
|
|
|
|
const current = ref(1);
|
2025-05-07 14:04:02 +08:00
|
|
|
|
const pageSize = ref(12);
|
2025-04-01 09:50:16 +08:00
|
|
|
|
const total = ref(0);
|
|
|
|
|
|
|
|
|
|
|
|
const labelCol = reactive({
|
|
|
|
|
|
xs:24,
|
|
|
|
|
|
sm:4,
|
|
|
|
|
|
xl:6,
|
|
|
|
|
|
xxl:4
|
|
|
|
|
|
});
|
|
|
|
|
|
const wrapperCol = reactive({
|
|
|
|
|
|
xs: 24,
|
|
|
|
|
|
sm: 20,
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2025-04-02 13:30:35 +08:00
|
|
|
|
//当没有员工头像时,默认展示企业logo
|
2025-04-01 09:50:16 +08:00
|
|
|
|
function handleHeadPath(headPath){
|
|
|
|
|
|
console.log('headPath--->',headPath);
|
|
|
|
|
|
if(headPath){
|
|
|
|
|
|
return getFileAccessHttpUrl(headPath);
|
|
|
|
|
|
}else{
|
2025-05-08 13:31:28 +08:00
|
|
|
|
return '../resource/img/logo.png';
|
2025-04-01 09:50:16 +08:00
|
|
|
|
}
|
2025-04-02 13:30:35 +08:00
|
|
|
|
}
|
2025-04-01 09:50:16 +08:00
|
|
|
|
|
2025-04-09 17:35:42 +08:00
|
|
|
|
// 分配账号
|
|
|
|
|
|
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,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-02 13:30:35 +08:00
|
|
|
|
//分配服务标签
|
|
|
|
|
|
function handleFwbq(info){
|
|
|
|
|
|
registerServiceTagModal.value.disableSubmit = false;
|
|
|
|
|
|
registerServiceTagModal.value.init(info);
|
2025-04-01 09:50:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 新增事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleAdd() {
|
|
|
|
|
|
registerModal.value.disableSubmit = false;
|
|
|
|
|
|
registerModal.value.add();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编辑事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleEdit(record) {
|
|
|
|
|
|
registerModal.value.disableSubmit = false;
|
|
|
|
|
|
registerModal.value.edit(record);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 详情
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleDetail(record: Recordable) {
|
|
|
|
|
|
registerModal.value.disableSubmit = true;
|
|
|
|
|
|
registerModal.value.edit(record);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function handleDelete(record) {
|
|
|
|
|
|
await deleteOne({ id: record.id }, handleSuccess);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 成功回调
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleSuccess() {
|
|
|
|
|
|
reload()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询
|
|
|
|
|
|
*/
|
|
|
|
|
|
function searchQuery() {
|
|
|
|
|
|
reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 重置
|
|
|
|
|
|
*/
|
|
|
|
|
|
function searchReset() {
|
|
|
|
|
|
formRef.value.resetFields();
|
|
|
|
|
|
//刷新数据
|
|
|
|
|
|
reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function onPageChange(page,pageSize){
|
|
|
|
|
|
console.log('onPageChange', page,pageSize);
|
|
|
|
|
|
current.value = page;
|
|
|
|
|
|
reload();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function reload(){
|
|
|
|
|
|
queryParam.pageSize = pageSize;
|
|
|
|
|
|
queryParam.pageNo = current;
|
|
|
|
|
|
console.log('queryParam',queryParam);
|
2025-07-03 14:12:11 +08:00
|
|
|
|
defHttp.get({url:'/admin/bizEmployeesInfo/bizEmployeesInfo/list',params:queryParam}).then(res=>{
|
2025-04-01 09:50:16 +08:00
|
|
|
|
console.log(res);
|
|
|
|
|
|
dataList.value = res.records;
|
|
|
|
|
|
total.value = res.total;
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 自动请求并暴露内部方法
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
reload();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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%;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cardClass{
|
|
|
|
|
|
margin: 5px;
|
|
|
|
|
|
// 添加向右下的阴影效果
|
2025-05-13 15:34:20 +08:00
|
|
|
|
border-radius: 8px;
|
2025-04-01 09:50:16 +08:00
|
|
|
|
transition: box-shadow 0.3s ease-in-out;
|
|
|
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
.buttonMargin{
|
|
|
|
|
|
margin: 3px;
|
|
|
|
|
|
}
|
2025-05-07 14:04:02 +08:00
|
|
|
|
.bjclass{
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
width: 60px;
|
|
|
|
|
|
height: 60px;
|
|
|
|
|
|
background: linear-gradient(to bottom, #fff, #efe9e9);
|
|
|
|
|
|
}
|
|
|
|
|
|
.titleOne {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ellipsis-two-lines {
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
-webkit-line-clamp: 2; /* 限制文本为2行 */
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
line-height:24px;color: #5a5a5a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.center-lines {
|
|
|
|
|
|
line-height:24px;color: #5a5a5a;
|
|
|
|
|
|
}
|
2025-04-01 09:50:16 +08:00
|
|
|
|
</style>
|