Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_vue
This commit is contained in:
commit
35d8b6355a
|
@ -0,0 +1,93 @@
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from "/@/hooks/web/useMessage";
|
||||||
|
|
||||||
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
|
enum Api {
|
||||||
|
list = '/bizEmployeesInfo/bizEmployeesInfo/list',
|
||||||
|
save='/bizEmployeesInfo/bizEmployeesInfo/add',
|
||||||
|
edit='/bizEmployeesInfo/bizEmployeesInfo/edit',
|
||||||
|
deleteOne = '/bizEmployeesInfo/bizEmployeesInfo/delete',
|
||||||
|
deleteBatch = '/bizEmployeesInfo/bizEmployeesInfo/deleteBatch',
|
||||||
|
importExcel = '/bizEmployeesInfo/bizEmployeesInfo/importExcel',
|
||||||
|
exportXls = '/bizEmployeesInfo/bizEmployeesInfo/exportXls',
|
||||||
|
|
||||||
|
getEmployeesList = '/serviceTag/serviceTag/getEmployeesList',
|
||||||
|
queryTagsById = '/serviceTag/serviceTag/queryById',
|
||||||
|
checkTags='/bizEmployeesInfo/nuBizEmployeesServcieTags/add',
|
||||||
|
removeTags = '/bizEmployeesInfo/nuBizEmployeesServcieTags/delete',
|
||||||
|
getEmployessServiceTags = '/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,287 @@
|
||||||
|
import {BasicColumn} from '/@/components/Table';
|
||||||
|
import {FormSchema} from '/@/components/Table';
|
||||||
|
import { rules} from '/@/utils/helper/validator';
|
||||||
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
|
//列表数据
|
||||||
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '性别',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'sex_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '民族',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'national'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身份证号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'idCard'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '联系电话',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tel'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '入职时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'entryTime',
|
||||||
|
customRender:({text}) =>{
|
||||||
|
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '岗位级别',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'postLevel_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '出生日期',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'dateOfBirth',
|
||||||
|
customRender:({text}) =>{
|
||||||
|
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '婚否',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'marriedOrNot_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '工资',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'wages_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身高',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'height'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '体重',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'weight'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '家庭住址',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'address'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否吸烟',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'isSmoking_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '健康状况',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'healthStatus_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '户籍所在地',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'houseAddress'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '政治面貌',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'politicalAppearance_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '紧急联系人',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'emergencyContact'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '紧急联系人电话',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'emergencyTel'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '紧急联系人与本人关系',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'emergencyRelationship'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '户口性质',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'hukouNature_dictText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'content'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身份证正面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'idCardPositive',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '身份证反面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'idCardNegative',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '合同正面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'contractPositive',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '合同反面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'contractNegative',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '健康证正面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'healthCertificatePositive',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '健康证反面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'healthCertificateNegative',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡正面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'bankPositive',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '银行卡反面',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'bankNegative',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资质证',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'qualification',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '无犯罪证明',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'noCrimeCertificate',
|
||||||
|
customRender: render.renderImage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '区域',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'regional'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务标签',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'serviceTag'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 高级查询数据
|
||||||
|
export const superQuerySchema = {
|
||||||
|
name: {title: '姓名',order: 0,view: 'text', type: 'string',},
|
||||||
|
sex: {title: '性别',order: 1,view: 'radio', type: 'string',dictCode: 'sex',},
|
||||||
|
national: {title: '民族',order: 2,view: 'text', type: 'string',},
|
||||||
|
idCard: {title: '身份证号',order: 3,view: 'text', type: 'string',},
|
||||||
|
tel: {title: '联系电话',order: 4,view: 'text', type: 'string',},
|
||||||
|
entryTime: {title: '入职时间',order: 5,view: 'date', type: 'string',},
|
||||||
|
postLevel: {title: '岗位级别',order: 6,view: 'radio', type: 'string',dictCode: 'post_level',},
|
||||||
|
dateOfBirth: {title: '出生日期',order: 7,view: 'date', type: 'string',},
|
||||||
|
marriedOrNot: {title: '婚否',order: 8,view: 'radio', type: 'string',dictCode: 'married_or_not',},
|
||||||
|
wages: {title: '工资',order: 9,view: 'radio', type: 'string',dictCode: 'wages',},
|
||||||
|
height: {title: '身高',order: 10,view: 'number', type: 'number',},
|
||||||
|
weight: {title: '体重',order: 11,view: 'number', type: 'number',},
|
||||||
|
address: {title: '家庭住址',order: 12,view: 'text', type: 'string',},
|
||||||
|
isSmoking: {title: '是否吸烟',order: 13,view: 'radio', type: 'string',dictCode: 'is_smoking',},
|
||||||
|
healthStatus: {title: '健康状况',order: 14,view: 'radio', type: 'string',dictCode: 'health_status',},
|
||||||
|
houseAddress: {title: '户籍所在地',order: 15,view: 'text', type: 'string',},
|
||||||
|
politicalAppearance: {title: '政治面貌',order: 16,view: 'list', type: 'string',dictCode: 'political_appearance',},
|
||||||
|
emergencyContact: {title: '紧急联系人',order: 17,view: 'text', type: 'string',},
|
||||||
|
emergencyTel: {title: '紧急联系人电话',order: 18,view: 'text', type: 'string',},
|
||||||
|
emergencyRelationship: {title: '紧急联系人与本人关系',order: 19,view: 'text', type: 'string',},
|
||||||
|
hukouNature: {title: '户口性质',order: 20,view: 'radio', type: 'string',dictCode: 'hukou_nature',},
|
||||||
|
content: {title: '备注',order: 21,view: 'text', type: 'string',},
|
||||||
|
idCardPositive: {title: '身份证正面',order: 22,view: 'image', type: 'string',},
|
||||||
|
idCardNegative: {title: '身份证反面',order: 23,view: 'image', type: 'string',},
|
||||||
|
contractPositive: {title: '合同正面',order: 24,view: 'image', type: 'string',},
|
||||||
|
contractNegative: {title: '合同反面',order: 25,view: 'image', type: 'string',},
|
||||||
|
healthCertificatePositive: {title: '健康证正面',order: 26,view: 'image', type: 'string',},
|
||||||
|
healthCertificateNegative: {title: '健康证反面',order: 27,view: 'image', type: 'string',},
|
||||||
|
bankPositive: {title: '银行卡正面',order: 28,view: 'image', type: 'string',},
|
||||||
|
bankNegative: {title: '银行卡反面',order: 29,view: 'image', type: 'string',},
|
||||||
|
qualification: {title: '资质证',order: 30,view: 'image', type: 'string',},
|
||||||
|
noCrimeCertificate: {title: '无犯罪证明',order: 31,view: 'image', type: 'string',},
|
||||||
|
regional: {title: '区域',order: 32,view: 'text', type: 'string',},
|
||||||
|
serviceTag: {title: '服务标签',order: 33,view: 'text', type: 'string',},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//列表数据
|
||||||
|
export const serviceTagcolumns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '服务标签名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tagName',
|
||||||
|
width:'50%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'description'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
//列表数据
|
||||||
|
export const employeesTagcolumns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'rowIndex',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function ({ text }) {
|
||||||
|
if (text == undefined) {
|
||||||
|
return '';
|
||||||
|
} else {
|
||||||
|
return parseInt(text) + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务标签名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tagName',
|
||||||
|
width:'50%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'description'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key:'action',
|
||||||
|
align: "center",
|
||||||
|
width:'140px',
|
||||||
|
},
|
||||||
|
];
|
|
@ -0,0 +1,227 @@
|
||||||
|
<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>
|
||||||
|
<a-input placeholder="请输入姓名" v-model:value="queryParam.name" allow-clear ></a-input>
|
||||||
|
</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>
|
||||||
|
</a-col>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<BizEmployeesInfoModal ref="registerModal" @success="handleSuccess"></BizEmployeesInfoModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="bizEmployeesInfo-bizEmployeesInfo" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { columns, superQuerySchema } from './BizEmployeesInfo.data';
|
||||||
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BizEmployeesInfo.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import BizEmployeesInfoModal from './components/BizEmployeesInfoModal.vue'
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const toggleSearchStatus = ref<boolean>(false);
|
||||||
|
const registerModal = ref();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '员工信息',
|
||||||
|
api: list,
|
||||||
|
columns,
|
||||||
|
canResize:false,
|
||||||
|
useSearchForm: false,
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed: 'right',
|
||||||
|
},
|
||||||
|
beforeFetch: async (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exportConfig: {
|
||||||
|
name: "员工信息",
|
||||||
|
url: getExportUrl,
|
||||||
|
params: queryParam,
|
||||||
|
},
|
||||||
|
importConfig: {
|
||||||
|
url: getImportUrl,
|
||||||
|
success: handleSuccess
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
|
const labelCol = reactive({
|
||||||
|
xs:24,
|
||||||
|
sm:4,
|
||||||
|
xl:6,
|
||||||
|
xxl:4
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 20,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 高级查询配置
|
||||||
|
const superQueryConfig = reactive(superQuerySchema);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高级查询事件
|
||||||
|
*/
|
||||||
|
function handleSuperQuery(params) {
|
||||||
|
Object.keys(params).map((k) => {
|
||||||
|
queryParam[k] = params[k];
|
||||||
|
});
|
||||||
|
searchQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.add();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑事件
|
||||||
|
*/
|
||||||
|
function handleEdit(record: Recordable) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '编辑',
|
||||||
|
onClick: handleEdit.bind(null, record),
|
||||||
|
auth: 'bizEmployeesInfo:biz_employees_info:edit'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}, {
|
||||||
|
label: '删除',
|
||||||
|
popConfirm: {
|
||||||
|
title: '是否确认删除',
|
||||||
|
confirm: handleDelete.bind(null, record),
|
||||||
|
placement: 'topLeft',
|
||||||
|
},
|
||||||
|
auth: 'bizEmployeesInfo:biz_employees_info:delete'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function searchReset() {
|
||||||
|
formRef.value.resetFields();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
//刷新数据
|
||||||
|
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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,244 @@
|
||||||
|
<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>
|
||||||
|
<a-input placeholder="请输入姓名" v-model:value="queryParam.name" allow-clear ></a-input>
|
||||||
|
</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>
|
||||||
|
<a-button type="primary" v-auth="'bizEmployeesInfo:biz_employees_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button>
|
||||||
|
</a-col>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="6" v-for="(item,index) in dataList" :key="index">
|
||||||
|
<a-card :title="item.name +'/'+item.sex_dictText" class="cardClass">
|
||||||
|
<template #extra><a title="操作">
|
||||||
|
|
||||||
|
<a-popover title="功能" style="width: 300px;">
|
||||||
|
<template #content>
|
||||||
|
<div>
|
||||||
|
<span class="buttonMargin">
|
||||||
|
<a-button type="primary" @click="handleEdit(item)">编辑</a-button>
|
||||||
|
</span>
|
||||||
|
<span class="buttonMargin">
|
||||||
|
<a-button type="primary" @click="handleFwbq(item)">服务标签</a-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<icon icon="ant-design:setting-outlined" />
|
||||||
|
</a-popover>
|
||||||
|
|
||||||
|
</a></template>
|
||||||
|
<!-- 人员信息 -->
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<img
|
||||||
|
width="150px"
|
||||||
|
height="150px"
|
||||||
|
:src="handleHeadPath(item.headPath)"
|
||||||
|
@error="setDefaultImage"
|
||||||
|
/>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<p>入职日期: {{item.entryTime}}</p>
|
||||||
|
<p>身份证号: {{item.idCard}}</p>
|
||||||
|
<p>联系电话: {{item.tel}}</p>
|
||||||
|
<p>出生日期: {{item.dateOfBirth}}</p>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24" style="text-align: right;">
|
||||||
|
<a-pagination v-model:current="current" v-model:page-size="pageSize" :total="total" show-less-items @change="onPageChange" />
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<BizEmployeesInfoModal ref="registerModal" @success="handleSuccess"></BizEmployeesInfoModal>
|
||||||
|
<EmployeesServiceTagModal ref="registerServiceTagModal" @success="handleSuccess"></EmployeesServiceTagModal>
|
||||||
|
</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'
|
||||||
|
import EmployeesServiceTagModal from '/@/views/biz/bizEmployeesInfo/employeesServiceTag/employeesServiceTagModal.vue'
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||||
|
import { Pagination } from 'ant-design-vue';
|
||||||
|
const APagination = Pagination;
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const registerModal = ref();
|
||||||
|
const registerServiceTagModal = ref();
|
||||||
|
const dataList = ref<any[]>([]);
|
||||||
|
const current = ref(1);
|
||||||
|
const pageSize = ref(8);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const labelCol = reactive({
|
||||||
|
xs:24,
|
||||||
|
sm:4,
|
||||||
|
xl:6,
|
||||||
|
xxl:4
|
||||||
|
});
|
||||||
|
const wrapperCol = reactive({
|
||||||
|
xs: 24,
|
||||||
|
sm: 20,
|
||||||
|
});
|
||||||
|
|
||||||
|
//当没有员工头像时,默认展示企业logo
|
||||||
|
function handleHeadPath(headPath){
|
||||||
|
console.log('headPath--->',headPath);
|
||||||
|
if(headPath){
|
||||||
|
return getFileAccessHttpUrl(headPath);
|
||||||
|
}else{
|
||||||
|
return '../../../../../public/resource/img/logo.png';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//分配服务标签
|
||||||
|
function handleFwbq(info){
|
||||||
|
registerServiceTagModal.value.disableSubmit = false;
|
||||||
|
registerServiceTagModal.value.init(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
defHttp.get({url:'/bizEmployeesInfo/bizEmployeesInfo/list',params:queryParam}).then(res=>{
|
||||||
|
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;
|
||||||
|
// 添加向右下的阴影效果
|
||||||
|
border-radius: 5px;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,380 @@
|
||||||
|
<template>
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<JFormContainer :disabled="disabled">
|
||||||
|
<template #detail>
|
||||||
|
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="BizEmployeesInfoForm">
|
||||||
|
<a-card title="基础信息">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="18">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="姓名" v-bind="validateInfos.name" id="BizEmployeesInfoForm-name" name="name">
|
||||||
|
<a-input v-model:value="formData.name" placeholder="请输入姓名" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="性别" v-bind="validateInfos.sex" id="BizEmployeesInfoForm-sex" name="sex">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="民族" v-bind="validateInfos.national" id="BizEmployeesInfoForm-national" name="national">
|
||||||
|
<a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="BizEmployeesInfoForm-idCard" name="idCard">
|
||||||
|
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="BizEmployeesInfoForm-tel" name="tel">
|
||||||
|
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="入职时间" v-bind="validateInfos.entryTime" id="BizEmployeesInfoForm-entryTime" name="entryTime">
|
||||||
|
<a-date-picker placeholder="请选择入职时间" v-model:value="formData.entryTime" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="岗位级别" v-bind="validateInfos.postLevel" id="BizEmployeesInfoForm-postLevel" name="postLevel">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.postLevel" dictCode="post_level" placeholder="请选择岗位级别" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="BizEmployeesInfoForm-dateOfBirth" name="dateOfBirth">
|
||||||
|
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="婚否" v-bind="validateInfos.marriedOrNot" id="BizEmployeesInfoForm-marriedOrNot" name="marriedOrNot">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not" placeholder="请选择婚否" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="" v-bind="validateInfos.headPath" id="BizEmployeesInfoForm-headPath" name="headPath">
|
||||||
|
<j-image-upload :fileMax="1" :bizPath="`employeesHead`" text="头像" v-model:value="formData.headPath" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="工资" v-bind="validateInfos.wages" id="BizEmployeesInfoForm-wages" name="wages">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.wages" dictCode="wages" placeholder="请选择工资" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="身高" v-bind="validateInfos.height" id="BizEmployeesInfoForm-height" name="height">
|
||||||
|
<a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="体重" v-bind="validateInfos.weight" id="BizEmployeesInfoForm-weight" name="weight">
|
||||||
|
<a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="家庭住址" v-bind="validateInfos.address" id="BizEmployeesInfoForm-address" name="address">
|
||||||
|
<a-input v-model:value="formData.address" placeholder="请输入家庭住址" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="是否吸烟" v-bind="validateInfos.isSmoking" id="BizEmployeesInfoForm-isSmoking" name="isSmoking">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.isSmoking" dictCode="is_smoking" placeholder="请选择是否吸烟" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="BizEmployeesInfoForm-healthStatus" name="healthStatus">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" placeholder="请选择健康状况" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="BizEmployeesInfoForm-houseAddress" name="houseAddress">
|
||||||
|
<a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance" id="BizEmployeesInfoForm-politicalAppearance" name="politicalAppearance">
|
||||||
|
<j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" placeholder="请选择政治面貌" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact" id="BizEmployeesInfoForm-emergencyContact" name="emergencyContact">
|
||||||
|
<a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="联系人电话" v-bind="validateInfos.emergencyTel" id="BizEmployeesInfoForm-emergencyTel" name="emergencyTel">
|
||||||
|
<a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship" id="BizEmployeesInfoForm-emergencyRelationship" name="emergencyRelationship">
|
||||||
|
<a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="户口性质" v-bind="validateInfos.hukouNature" id="BizEmployeesInfoForm-hukouNature" name="hukouNature">
|
||||||
|
<j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" placeholder="请选择户口性质" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="6">
|
||||||
|
<a-form-item label="备注" v-bind="validateInfos.content" id="BizEmployeesInfoForm-content" name="content">
|
||||||
|
<a-input v-model:value="formData.content" placeholder="请输入备注" allow-clear ></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card>
|
||||||
|
<a-card title="证件信息">
|
||||||
|
<a-tabs v-model:activeKey="activeKey">
|
||||||
|
<a-tab-pane key="1" tab="身份证">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive" id="BizEmployeesInfoForm-idCardPositive" name="idCardPositive">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardPositive" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative" id="BizEmployeesInfoForm-idCardNegative" name="idCardNegative">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.idCardNegative" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="2" tab="合同信息">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="合同正面" v-bind="validateInfos.contractPositive" id="BizEmployeesInfoForm-contractPositive" name="contractPositive">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractPositive" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="合同反面" v-bind="validateInfos.contractNegative" id="BizEmployeesInfoForm-contractNegative" name="contractNegative">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.contractNegative" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="3" tab="健康证">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive" id="BizEmployeesInfoForm-healthCertificatePositive" name="healthCertificatePositive">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificatePositive" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="健康证反面" v-bind="validateInfos.healthCertificateNegative" id="BizEmployeesInfoForm-healthCertificateNegative" name="healthCertificateNegative">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.healthCertificateNegative" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="4" tab="银行卡">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive" id="BizEmployeesInfoForm-bankPositive" name="bankPositive">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankPositive" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative" id="BizEmployeesInfoForm-bankNegative" name="bankNegative">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.bankNegative" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="5" tab="资质证件">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="资质证" v-bind="validateInfos.qualification" id="BizEmployeesInfoForm-qualification" name="qualification">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.qualification" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="6" tab="无犯罪证明">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="无犯罪证明" v-bind="validateInfos.noCrimeCertificate" id="BizEmployeesInfoForm-noCrimeCertificate" name="noCrimeCertificate">
|
||||||
|
<j-image-upload :fileMax="0" :bizPath="`employeesZzxx`" v-model:value="formData.noCrimeCertificate" ></j-image-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
</a-card>
|
||||||
|
</a-form>
|
||||||
|
</template>
|
||||||
|
</JFormContainer>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
|
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||||
|
import { getValueType } from '/@/utils';
|
||||||
|
import { saveOrUpdate } from '../BizEmployeesInfo.api';
|
||||||
|
import { Form } from 'ant-design-vue';
|
||||||
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||||
|
const props = defineProps({
|
||||||
|
formDisabled: { type: Boolean, default: false },
|
||||||
|
formData: { type: Object, default: () => ({})},
|
||||||
|
formBpm: { type: Boolean, default: true }
|
||||||
|
});
|
||||||
|
const formRef = ref();
|
||||||
|
const useForm = Form.useForm;
|
||||||
|
const emit = defineEmits(['register', 'ok']);
|
||||||
|
const formData = reactive<Record<string, any>>({
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
sex: '',
|
||||||
|
national: '',
|
||||||
|
idCard: '',
|
||||||
|
headPath: '',
|
||||||
|
tel: '',
|
||||||
|
entryTime: '',
|
||||||
|
postLevel: '',
|
||||||
|
dateOfBirth: '',
|
||||||
|
marriedOrNot: '',
|
||||||
|
wages: '',
|
||||||
|
height: undefined,
|
||||||
|
weight: undefined,
|
||||||
|
address: '',
|
||||||
|
isSmoking: '',
|
||||||
|
healthStatus: '',
|
||||||
|
houseAddress: '',
|
||||||
|
politicalAppearance: '',
|
||||||
|
emergencyContact: '',
|
||||||
|
emergencyTel: '',
|
||||||
|
emergencyRelationship: '',
|
||||||
|
hukouNature: '',
|
||||||
|
content: '',
|
||||||
|
idCardPositive: '',
|
||||||
|
idCardNegative: '',
|
||||||
|
contractPositive: '',
|
||||||
|
contractNegative: '',
|
||||||
|
healthCertificatePositive: '',
|
||||||
|
healthCertificateNegative: '',
|
||||||
|
bankPositive: '',
|
||||||
|
bankNegative: '',
|
||||||
|
qualification: '',
|
||||||
|
noCrimeCertificate: '',
|
||||||
|
regional: '',
|
||||||
|
serviceTag: '',
|
||||||
|
});
|
||||||
|
const { createMessage } = useMessage();
|
||||||
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||||
|
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||||
|
const confirmLoading = ref<boolean>(false);
|
||||||
|
//表单验证
|
||||||
|
const validatorRules = reactive({
|
||||||
|
name: [{ required: true, message: '请输入姓名!' }],
|
||||||
|
idCard: [{ required: false }, { pattern: '^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$', message: '身份证号错误!' }],
|
||||||
|
});
|
||||||
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
|
|
||||||
|
// 表单禁用
|
||||||
|
const disabled = computed(()=>{
|
||||||
|
if(props.formBpm === true){
|
||||||
|
if(props.formData.disabled === false){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return props.formDisabled;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
edit({});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
nextTick(() => {
|
||||||
|
resetFields();
|
||||||
|
const tmpData = {};
|
||||||
|
Object.keys(formData).forEach((key) => {
|
||||||
|
if(record.hasOwnProperty(key)){
|
||||||
|
tmpData[key] = record[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//赋值
|
||||||
|
Object.assign(formData, tmpData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交数据
|
||||||
|
*/
|
||||||
|
async function submitForm() {
|
||||||
|
try {
|
||||||
|
// 触发表单验证
|
||||||
|
await validate();
|
||||||
|
} catch ({ errorFields }) {
|
||||||
|
if (errorFields) {
|
||||||
|
const firstField = errorFields[0];
|
||||||
|
if (firstField) {
|
||||||
|
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Promise.reject(errorFields);
|
||||||
|
}
|
||||||
|
confirmLoading.value = true;
|
||||||
|
const isUpdate = ref<boolean>(false);
|
||||||
|
//时间格式化
|
||||||
|
let model = formData;
|
||||||
|
if (model.id) {
|
||||||
|
isUpdate.value = true;
|
||||||
|
}
|
||||||
|
//循环数据
|
||||||
|
for (let data in model) {
|
||||||
|
//如果该数据是数组并且是字符串类型
|
||||||
|
if (model[data] instanceof Array) {
|
||||||
|
let valueType = getValueType(formRef.value.getProps, data);
|
||||||
|
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||||
|
if (valueType === 'string') {
|
||||||
|
model[data] = model[data].join(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await saveOrUpdate(model, isUpdate.value)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
createMessage.success(res.message);
|
||||||
|
emit('ok');
|
||||||
|
} else {
|
||||||
|
createMessage.warning(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
confirmLoading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
submitForm,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.antd-modal-form {
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,77 @@
|
||||||
|
<template>
|
||||||
|
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
|
<BizEmployeesInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BizEmployeesInfoForm>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import BizEmployeesInfoForm from './BizEmployeesInfoForm.vue'
|
||||||
|
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<string>('90%');
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const disableSubmit = ref<boolean>(false);
|
||||||
|
const registerForm = ref();
|
||||||
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function add() {
|
||||||
|
title.value = '入职登记';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.add();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
function edit(record) {
|
||||||
|
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.edit(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
disableSubmit,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
/**隐藏样式-modal确定按钮 */
|
||||||
|
.jee-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="less" scoped></style>
|
|
@ -0,0 +1,206 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="rowA">
|
||||||
|
<div>
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" >
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
可选服务标签
|
||||||
|
</template>
|
||||||
|
<!--操作栏-->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<TableAction :actions="getTableAction(record)" />
|
||||||
|
</template>
|
||||||
|
<!--字段回显插槽-->
|
||||||
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 8px;">
|
||||||
|
<div>已选服务标签</div>
|
||||||
|
<a-table :dataSource="employeesDataSource" :columns="employeesTagcolumns" style="margin-top:8px;" bordered size="small" :pagination="false">
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.key === 'action'" >
|
||||||
|
<a @click="handleYichu(record)">移除</a>
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a @click="handleEmlDetail(record)">详情</a>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="rowB" style="padding: 8px;">
|
||||||
|
<div style="border: 1px solid rgb(243, 239, 239);padding: 8px;">
|
||||||
|
详情
|
||||||
|
<a-list item-layout="horizontal" :data-source="tagsDetailData" >
|
||||||
|
<template #renderItem="{ item ,index}">
|
||||||
|
<a-list-item>
|
||||||
|
<a-list-item-meta :description="item.serviceContent">
|
||||||
|
<template #title>
|
||||||
|
{{ (index+1) +'、 '+ item.categoryName +'-'+item.typeName +'-'+item.directiveName }}
|
||||||
|
<span v-if="item.tagsName">({{item.tagsName}})</span>
|
||||||
|
</template>
|
||||||
|
</a-list-item-meta>
|
||||||
|
</a-list-item>
|
||||||
|
</template>
|
||||||
|
</a-list>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="bizEmployeesInfo-nuBizEmployeesServcieTags" setup>
|
||||||
|
import {ref, reactive, computed, unref} from 'vue';
|
||||||
|
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||||
|
import {useModal} from '/@/components/Modal';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
|
import { serviceTagcolumns ,employeesTagcolumns } from '../BizEmployeesInfo.data';
|
||||||
|
import { getEmployeesList,queryTagsById,checkTags,removeTags,getEmployessServiceTags } from '../BizEmployeesInfo.api';
|
||||||
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { number } from 'vue-types';
|
||||||
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const checkedKeys = ref<Array<string | number>>([]);
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
const rowA = ref<number>(24);
|
||||||
|
const rowB = ref<number>(0);
|
||||||
|
const employeesDataSource = ref<any[]>([]);
|
||||||
|
const tagsDetailData = ref<any[]>([]);
|
||||||
|
const employeesInfo = reactive<any>({});
|
||||||
|
//注册model
|
||||||
|
const [registerModal, {openModal}] = useModal();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||||
|
tableProps:{
|
||||||
|
title: '员工配置的服务标签',
|
||||||
|
api: getEmployeesList,
|
||||||
|
columns: serviceTagcolumns,
|
||||||
|
canResize:false,
|
||||||
|
immediate: false,
|
||||||
|
showIndexColumn: true,
|
||||||
|
formConfig: {
|
||||||
|
//labelWidth: 120,
|
||||||
|
autoSubmitOnEnter:true,
|
||||||
|
showAdvancedButton:true,
|
||||||
|
fieldMapToNumber: [
|
||||||
|
],
|
||||||
|
fieldMapToTime: [
|
||||||
|
],
|
||||||
|
},
|
||||||
|
actionColumn: {
|
||||||
|
width: 120,
|
||||||
|
fixed:'right'
|
||||||
|
},
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return Object.assign(params, queryParam);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const [registerTable, {reload}] = tableContext
|
||||||
|
/**
|
||||||
|
* 选择
|
||||||
|
*/
|
||||||
|
async function handleXuanze(record) {
|
||||||
|
const model = {employeesId:employeesInfo.value.id,tagsId:record.id};
|
||||||
|
await checkTags(model).then((res) => {
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
reload();
|
||||||
|
getEmployessServiceTagsList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 移除
|
||||||
|
*/
|
||||||
|
async function handleYichu(record) {
|
||||||
|
const model = {id:record.id};
|
||||||
|
await removeTags(model).then((res) => {
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
reload();
|
||||||
|
getEmployessServiceTagsList();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工选择服务标签后的详情
|
||||||
|
*/
|
||||||
|
function handleEmlDetail(record) {
|
||||||
|
console.log(record);
|
||||||
|
rowA.value = 18;
|
||||||
|
rowB.value = 6;
|
||||||
|
|
||||||
|
queryTagsById({ id: record.employeesTagsId }).then(item => {
|
||||||
|
console.log(item);
|
||||||
|
tagsDetailData.value = item.directives;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 服务标签列表详情
|
||||||
|
*/
|
||||||
|
function handleDetail(record) {
|
||||||
|
rowA.value = 18;
|
||||||
|
rowB.value = 6;
|
||||||
|
console.log(record);
|
||||||
|
|
||||||
|
queryTagsById({ id: record.id }).then(item => {
|
||||||
|
console.log(item);
|
||||||
|
tagsDetailData.value = item.directives;
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 操作栏
|
||||||
|
*/
|
||||||
|
function getTableAction(record){
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '选择',
|
||||||
|
onClick: handleXuanze.bind(null, record),
|
||||||
|
ifShow: record.employeesTagsId == '0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '详情',
|
||||||
|
onClick: handleDetail.bind(null, record),
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取员工已获取的服务标签
|
||||||
|
function getEmployessServiceTagsList(){
|
||||||
|
const model = {employeesId:employeesInfo.value.id};
|
||||||
|
getEmployessServiceTags(model).then(item => {
|
||||||
|
employeesDataSource.value = item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function init(record){
|
||||||
|
//初始化
|
||||||
|
queryParam.employeesId = record.id;
|
||||||
|
employeesInfo.value= record;
|
||||||
|
rowA.value = 24;
|
||||||
|
rowB.value = 0;
|
||||||
|
reload();
|
||||||
|
getEmployessServiceTagsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
init,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
:deep(.ant-picker),:deep(.ant-input-number){
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<template>
|
||||||
|
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||||
|
<EmployeesServiceTagForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></EmployeesServiceTagForm>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, nextTick, defineExpose } from 'vue';
|
||||||
|
import EmployeesServiceTagForm from './EmployeesServiceTagForm.vue'
|
||||||
|
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||||
|
|
||||||
|
const title = ref<string>('');
|
||||||
|
const width = ref<string>('90%');
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const disableSubmit = ref<boolean>(false);
|
||||||
|
const registerForm = ref();
|
||||||
|
const emit = defineEmits(['register', 'success']);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
function init(record) {
|
||||||
|
title.value = '服务标签';
|
||||||
|
visible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
registerForm.value.init(record);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确定按钮点击事件
|
||||||
|
*/
|
||||||
|
function handleOk() {
|
||||||
|
registerForm.value.submitForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* form保存回调事件
|
||||||
|
*/
|
||||||
|
function submitCallback() {
|
||||||
|
handleCancel();
|
||||||
|
emit('success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消按钮回调事件
|
||||||
|
*/
|
||||||
|
function handleCancel() {
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
init,
|
||||||
|
disableSubmit,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
/**隐藏样式-modal确定按钮 */
|
||||||
|
.jee-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="less" scoped></style>
|
Loading…
Reference in New Issue