Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
79b50df5ac
File diff suppressed because it is too large
Load Diff
|
@ -14,6 +14,7 @@
|
|||
"@vueuse/core": "^11.2.0",
|
||||
"ant-design-vue": "^4.2.3",
|
||||
"axios": "^1.7.5",
|
||||
"dayjs": "^1.11.13",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"pinia": "^2.2.2",
|
||||
|
|
|
@ -6,6 +6,7 @@ type DictType =
|
|||
| 'IsEnable'
|
||||
| 'IsOrNot'
|
||||
| 'Sex'
|
||||
| 'EducationLevel'
|
||||
|
||||
export const initEnums = () => {
|
||||
api.get<Record<DictType, SelectNodeVo<any>[]>>('/common/enums').then(resp => {
|
||||
|
|
|
@ -131,6 +131,7 @@ export interface securityUnitIdListParams {
|
|||
securityNumber?: string;
|
||||
noSecurityNumberDesc?: string;
|
||||
homeAddress?: string;
|
||||
educationLevel?: string;
|
||||
}
|
||||
export interface securityUnitIdListPagerVo {
|
||||
snowFlakeId?: string;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import dayjs from 'dayjs'
|
||||
import { TableProMaxProps, TableProMaxSlots } from '@/types/components/table'
|
||||
import { EnterprisesUnitPagerQueryParams, securityUnitIdListPagerVo, securityUnitIdListParams, PoliceUnitPagerVo } from '@/types/views/unitManage/police/policeUnit.ts'
|
||||
import { reactive, ref, h } from 'vue'
|
||||
|
@ -33,27 +34,45 @@ const _formParams = reactive<securityUnitIdListParams>({
|
|||
noSecurityNumberDesc: '',
|
||||
homeAddress: '',
|
||||
remark: '',
|
||||
educationLevel: '',
|
||||
})
|
||||
|
||||
const cardBlur = () => {
|
||||
let value = _formParams.idCard
|
||||
if (!value?.length || value.length < 18) {
|
||||
_formParams.dateOfBirth = ''
|
||||
return
|
||||
}
|
||||
const birthDate = value.substring(6, 14)
|
||||
const year = birthDate.substring(0, 4)
|
||||
const month = birthDate.substring(4, 6)
|
||||
const day = birthDate.substring(6, 8)
|
||||
var _data = new Date(parseInt(year), parseInt(month) - 1, parseInt(day))
|
||||
_formParams.dateOfBirth = dayjs(_data).format('YYYY-MM-DD HH:mm:ss')
|
||||
console.log('🚀 ~ cardBlur ~ _data:', _formParams.dateOfBirth)
|
||||
}
|
||||
const searchSecurityUnitId = debounce(async () => {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// console.log('process.env.NODE_ENV === development')
|
||||
console.log('process.env.NODE_ENV === development')
|
||||
const res = await axios.get(`https://www.hnjinglian.cn:5678/common/querySecurityNumberByIdCard?idCard=${_formParams.idCard}`)
|
||||
if (res.data?.data?.hasOwnProperty('bayzh')) {
|
||||
_formParams.securityNumber = res.data.data.bayzh
|
||||
_formParams.name = res.data.name
|
||||
message.success(res.data.message)
|
||||
} else {
|
||||
message.error('未查询到保安证件号')
|
||||
}
|
||||
} else {
|
||||
const res = await api.get<any>('/common/querySecurityNumberByIdCard', { idCard: _formParams.idCard })
|
||||
if (res.data?.data?.hasOwnProperty('bayzh')) {
|
||||
_formParams.securityNumber = res.data.data.bayzh
|
||||
message.success(res.data.message)
|
||||
console.log(res)
|
||||
if (res.data?.hasOwnProperty('bayzh')) {
|
||||
_formParams.securityNumber = res.data.bayzh
|
||||
_formParams.name = res.data.name
|
||||
message.success(res.message)
|
||||
} else {
|
||||
message.error('未查询到保安证件号')
|
||||
}
|
||||
}
|
||||
cardBlur()
|
||||
}, 300)
|
||||
const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) => {
|
||||
// console.log('🚀 ~ saveOrUpdateEnterprisesUnit ~ params:', params)
|
||||
|
@ -69,6 +88,7 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
|
|||
_formParams.telephone = params.telephone.originalValue
|
||||
_formParams.workPost = params.workPost
|
||||
_formParams.sex = params.sex.value
|
||||
_formParams.educationLevel = params.educationLevel.value
|
||||
_formParams.nativePlace = params.nativePlace
|
||||
_formParams.idCard = params.idCard.originalValue
|
||||
_formParams.dateOfBirth = params.dateOfBirth
|
||||
|
@ -109,7 +129,7 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
|
|||
telephone: {
|
||||
type: 'input',
|
||||
label: '手机号',
|
||||
required: true,
|
||||
// required: true,
|
||||
},
|
||||
sex: {
|
||||
type: 'radioGroup',
|
||||
|
@ -117,10 +137,18 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
|
|||
required: true,
|
||||
options: [...dictSelectNodes('Sex')],
|
||||
},
|
||||
|
||||
educationLevel: {
|
||||
type: 'radioGroup',
|
||||
label: '文化程度',
|
||||
required: true,
|
||||
options: [...dictSelectNodes('EducationLevel')],
|
||||
},
|
||||
|
||||
securityNumber: {
|
||||
type: 'input',
|
||||
label: '保安证号',
|
||||
required: true,
|
||||
// required: true,
|
||||
},
|
||||
dateOfBirth: {
|
||||
type: 'datePicker',
|
||||
|
@ -165,28 +193,33 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
|
|||
..._formParams,
|
||||
})
|
||||
message.success(resp.message)
|
||||
clearForm()
|
||||
callback && callback()
|
||||
},
|
||||
onCancel: async () => {
|
||||
_formParams.snowFlakeId = ''
|
||||
_formParams.serviceProjectId = ''
|
||||
_formParams.securityUnitId = ''
|
||||
_formParams.name = ''
|
||||
_formParams.photo = ''
|
||||
_formParams.telephone = ''
|
||||
_formParams.workPost = ''
|
||||
_formParams.sex = ''
|
||||
_formParams.nativePlace = ''
|
||||
_formParams.idCard = ''
|
||||
_formParams.dateOfBirth = ''
|
||||
_formParams.securityNumber = ''
|
||||
_formParams.noSecurityNumberDesc = ''
|
||||
_formParams.homeAddress = ''
|
||||
_formParams.remark = ''
|
||||
clearForm()
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const clearForm = () => {
|
||||
_formParams.snowFlakeId = ''
|
||||
_formParams.serviceProjectId = ''
|
||||
_formParams.securityUnitId = ''
|
||||
_formParams.name = ''
|
||||
_formParams.photo = ''
|
||||
_formParams.telephone = ''
|
||||
_formParams.workPost = ''
|
||||
_formParams.sex = ''
|
||||
_formParams.nativePlace = ''
|
||||
_formParams.idCard = ''
|
||||
_formParams.dateOfBirth = ''
|
||||
_formParams.securityNumber = ''
|
||||
_formParams.noSecurityNumberDesc = ''
|
||||
_formParams.homeAddress = ''
|
||||
_formParams.remark = ''
|
||||
_formParams.educationLevel = ''
|
||||
|
||||
}
|
||||
export const showEnterprisesUnit = (record_) => {
|
||||
// console.log('🚀 ~ showEnterprisesUnit ~ record_:', record_)
|
||||
const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
|
||||
|
|
|
@ -369,9 +369,9 @@ const formParams = ref<{
|
|||
remark?: string
|
||||
}>({
|
||||
name: '',
|
||||
enterprisesUnitId: null,
|
||||
enterprisesUnitId: '',
|
||||
type: 'security',
|
||||
securityUnitId: null,
|
||||
securityUnitId: '',
|
||||
})
|
||||
const securityUnitIdList = ref<any>([])
|
||||
const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdateParams_>>({
|
||||
|
@ -547,13 +547,13 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
|||
{
|
||||
dataIndex: 'serviceArea',
|
||||
title: '服务区域面积',
|
||||
width: 60,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'buildingTotal',
|
||||
title: '楼栋数量',
|
||||
width: 60,
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
},
|
||||
|
||||
|
@ -566,13 +566,13 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
|||
{
|
||||
dataIndex: 'staffTotal',
|
||||
title: '工作人员数量',
|
||||
width: 60,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'securityUserTotal',
|
||||
title: '保安人员数量',
|
||||
width: 60,
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.changhu.module.miniProgram.pojo.params;
|
|||
|
||||
import com.changhu.common.db.enums.Sex;
|
||||
import com.changhu.common.validator.annotation.IdCard;
|
||||
import com.changhu.common.validator.annotation.IsMobile;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
@ -34,8 +33,6 @@ public class SecurityUserSaveOrUpdateParams {
|
|||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@IsMobile
|
||||
@Schema(description = "手机号")
|
||||
private String telephone;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"terser": "^5.36.0",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript": "5.6.2",
|
||||
"unplugin-vue-components": "^0.27.4",
|
||||
"vite": "^5.4.1",
|
||||
"vue-tsc": "^2.0.29"
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<div class="root">
|
||||
<div class="header">
|
||||
<img src="@/assets/vue.svg" alt="Logo" height="33" width="33"/>
|
||||
<div class="logo-text">超级后台</div>
|
||||
<div class="logo-text">{{ appInfo.appName}}</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="left-banner"></div>
|
||||
<div class="login-card">
|
||||
<div class="title">
|
||||
欢迎来到超级后台
|
||||
欢迎来到{{ appInfo.appName}}
|
||||
</div>
|
||||
<a-tabs class="account-tab" v-model:active-key="activeKey">
|
||||
<a-tab-pane :key="0" tab="账号登录">
|
||||
|
@ -42,6 +42,7 @@ import TelephoneLogin from '@/components/login/TelephoneLogin.vue';
|
|||
import {ref} from "vue";
|
||||
|
||||
const activeKey = ref(0)
|
||||
const appInfo = __APP_INFO
|
||||
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue