This commit is contained in:
wangyilin 2024-12-19 10:11:16 +08:00
parent 5ebc6c9b84
commit d8d1a7db13
7 changed files with 44 additions and 43 deletions

View File

@ -71,7 +71,7 @@
<nut-dialog content="详情" v-model:visible="visible" @ok="onOk" @cancel="cancel">
<slot>
<view style="margin-bottom: 5px">
<view>姓名{{ securityNumberByIdCard?.name ? securityNumberByIdCard?.name : '无' }}</view>
<view>姓名{{ securityNumberByIdCard.name ? securityNumberByIdCard.name : '无' }}</view>
<view>保安证件号{{ securityNumberByIdCard?.bayzh ? securityNumberByIdCard?.bayzh : '无' }}</view>
<view>身份证{{ securityNumberByIdCard?.sfzhm ? securityNumberByIdCard?.sfzhm : '无' }}</view>
</view>
@ -90,17 +90,17 @@ import dayjs from 'dayjs'
import { SecurityUserFormParams, securityNumberByIdCard } from '@/types/subPages/projectManager/securityUserForm'
import { FormInstance } from '@nutui/nutui-taro'
import { generateSimpleObjectName, getResignedObjectUrl } from '@/utils'
import {IconFont} from "@nutui/icons-vue-taro";
const SEX = enumSelectNodes('Sex')
const SEX:any = enumSelectNodes('Sex')
const minioBaseUrl = process.env.TARO_APP_MINIO_URL
const BUCKET = process.env.TARO_APP_MINIO_BUCKET
const showPicker = ref(false)
const Url = ref('')
const type = ref<'formInput' | 'QcCodeInput'>(null!)
const formData = ref<SecurityUserFormParams>({} as any)
const formRef = ref<FormInstance>(null!)
const visible = ref<boolean>(false)
const securityNumberByIdCard = ref<securityNumberByIdCard>()
const securityNumberByIdCard = ref<securityNumberByIdCard | any>()
const uploadRef = ref<any>(null)
const modelValue = ref('')
@ -144,27 +144,32 @@ useLoad((options) => {
const idCardBlur = async (e: any, num: number) => {
const value = e.idCard
if (value) {
Taro.request({
url: 'https://www.hnjinglian.cn:5678/common/querySecurityNumberByIdCard',
data: {
idCard: value,
},
method: 'GET',
success: ({ data }) => {
visible.value = true
securityNumberByIdCard.value = data.data
},
})
return
if(BUCKET === 'police-security-dev'){
Taro.request({
url: 'https://www.hnjinglian.cn:5678/common/querySecurityNumberByIdCard',
data: {
idCard: value,
},
method: 'GET',
success: ({ data }) => {
console.log(data.data)
visible.value = true
securityNumberByIdCard.value = data.data
},
})
}else{
const resp = await api.get('/common/querySecurityNumberByIdCard',{ idCard: value})
visible.value = true
securityNumberByIdCard.value = resp?.data
}
} else {
visible.value = false
console.log(value)
}
cardBlur(value, num)
}
const cardBlur = (e, num) => {
let value = ''
const cardBlur = (e:any, num:number) => {
let value: string
if (num === 0) {
value = e
} else {

View File

@ -4,10 +4,10 @@ export interface SecurityUserFormParams {
serviceProjectId: string;
name: string | undefined;
workPost?: string;
telephone: value | null;
sex: number;
telephone: value | any;
sex: number | any;
nativePlace?: string;
idCard: value | null;
idCard: value | any;
dateOfBirth?: Date | null;
securityNumber?: string;
photo?:string;
@ -21,8 +21,8 @@ export interface value{
originalValue?:string
}
export interface securityNumberByIdCard{
export interface securityNumberByIdCard {
name: string | undefined
bayzh?: string
sfzhm?: string
bayzh?: string | undefined
sfzhm?: string | undefined
}

View File

@ -1,4 +1,4 @@
VITE_APP_NAME=超级后台
VITE_APP_NAME=保安后台
VITE_APP_ENV=development
VITE_APP_PORT=1000
VITE_DROP_CONSOLE=false

View File

@ -1,4 +1,4 @@
VITE_APP_NAME=超级后台
VITE_APP_NAME=保安后台
VITE_APP_ENV=production
VITE_APP_PORT=1001
VITE_DROP_CONSOLE=true

View File

@ -1,6 +1,6 @@
{
"name": "supermanagement",
"appName": "超级后台",
"name": "securitymanagement",
"appName": "保安后台",
"private": true,
"version": "1.0.0",
"type": "module",

View File

@ -258,6 +258,8 @@ const idNumberDisabled = ref<boolean>(true)
const netType = computed(() => {
return formParams.value.type === 'security' ? dictSelectNodes("ServiceProjectTwoType") : dictSelectNodes("UserType" as any)
})
const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdateParams>>({
name: {
type: 'input',
@ -287,10 +289,14 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
required: true,
options:enterprisesUnitIdList,
componentsProps:{
allowClear:true,
allowClear:true,
showSearch:true,
onChange:async (value:string)=>{
console.log(value)
enterprisesUnitId.value = value
},
filterOption:(input: string, option: any)=>{
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}
}
},

View File

@ -1,20 +1,10 @@
<template>
<AdministrativeDivisionsTree v-model:value="value" :show-search="{ filter }" @change="searchAdministrativeDivisionTree"></AdministrativeDivisionsTree>
<div >
</div>
</template>
<script setup lang="ts">
import AdministrativeDivisionsTree from "@/components/tree/AdministrativeDivisionsTree.vue";
import {ref} from "vue";
import {ShowSearchType} from "ant-design-vue/es/cascader";
const value = ref([ "110000", "110100", "110116", "110116005" ])
const filter: ShowSearchType['filter'] = (inputValue, path) => {
return path?.some(option => option.label.toLowerCase().indexOf(inputValue?.toLowerCase()) > -1);
};
const searchAdministrativeDivisionTree = (e:Array<string>)=>{
value.value = e as any
}
</script>