小程序

This commit is contained in:
wangyilin 2024-09-10 10:59:29 +08:00
parent 62913342e2
commit bcde6a1839
4 changed files with 41 additions and 26 deletions

View File

@ -7,10 +7,10 @@
collapsible
>
<div v-if="!collapsed" class="title flex-center">
<div>超级后台</div>
<div>保安后台</div>
</div>
<div v-else class="logo flex-center">
<img src="@/assets/vue.svg" title="超级后台" alt="xx">
<img src="@/assets/vue.svg" title="保安后台" alt="xx">
</div>
<SystemMenus/>
</a-layout-sider>

View File

@ -0,0 +1,15 @@
export interface formDatePort {
name:string,
socialCode:string,
businessLicense:string,
legalPersonInfo:string,
telephone:string,
administrativeDivisionCodes:Record<string, any>,
address:string,
nature:string
}
export interface statusPort {
onlyCode:string,
unitOptType:string
}

View File

@ -27,11 +27,11 @@
<a-form-item label="公司性质" name="nature">
<a-input :allowClear="true" v-model:value="formDate.nature"/>
</a-form-item>
<a-form-item label="行政区划" >
<a-form-item label="行政区划" name="administrativeDivisionCodes">
<a-cascader v-model:value="formDate.administrativeDivisionCodes" :show-search="{ filter }" :options="administrativeDivisionTree" @change="searchAdministrativeDivisionTree" />
</a-form-item>
<a-form-item label="营业执照" name="businessLicense">
<SingleImageFileUpload v-model:value="formDate.businessLicense"></SingleImageFileUpload>
<SingleImageFileUpload v-model:value="formDate.businessLicense" ref="fileUpload"></SingleImageFileUpload>
</a-form-item>
<a-form-item label="法人名称">
<a-input :allowClear="true" v-model:value="formDate.legalPersonInfo" />
@ -76,42 +76,25 @@ import api from "@/axios";
import {message, Modal} from 'ant-design-vue';
import SingleImageFileUpload from "@/components/upload/SingleImageFileUpload.vue";
import {useRouter} from "vue-router";
import {formDatePort, statusPort} from "@/types/views/enterprise.ts";
const activeKey = ref('1');
const labelCol = { style: { width: '120px' } };
const wrapperCol = { span: 14 };
const administrativeDivisionTree = ref<TreeNodeVo<string>[]>([])
const formDateRef = ref();
const fileUpload = ref()
const router = useRouter()
interface formDatePort {
name:string,
socialCode:string,
businessLicense:string,
legalPersonInfo:string,
telephone:string,
administrativeDivisionCodes:Record<string, any>,
address:string,
nature:string
}
interface statusPort {
onlyCode:string,
unitOptType:string
}
const formDate = ref<formDatePort>({
name:'',
socialCode:'',
businessLicense:'',
legalPersonInfo:'',
telephone:'',
administrativeDivisionCodes:[''],
administrativeDivisionCodes:undefined,
address:'',
nature:''
})
const statusDate = ref<statusPort>({
onlyCode:'',
unitOptType:'SECURITY_UNIT'
@ -177,7 +160,7 @@ const onFinish = async ()=>{
businessLicense:'',
legalPersonInfo:'',
telephone:'',
administrativeDivisionCodes:[''],
administrativeDivisionCodes:undefined,
address:'',
nature:''
}

View File

@ -52,7 +52,8 @@ const searchFormOptions: TableProps["searchFormOptions"] = {
},
projectManagerMiniProgramUserName:{
type: 'input',
label: '服务经理用户名称'
label: '服务经理用户名称',
},
remark: {
type: 'input',
@ -77,6 +78,7 @@ const formParams = ref<{
enterprisesUnitId:string,
administrativeDivisionCodes?:null,
projectManagerMiniProgramUserId?:string,
projectManagerMiniProgramUserName?:string
name: string,
type:string,
isRecruitSecurity:number,
@ -204,6 +206,7 @@ const columns: TableProps['columns'] = [
idNumberDisabled.value = true
}
}
formParams.value.projectManagerMiniProgramUserId = record.projectManagerMiniProgramUserName
formParams.value.snowFlakeId = record.snowFlakeId
formParams.value.name = record.name
formParams.value.type = record.type.value
@ -232,6 +235,13 @@ const getAdministrativeDivisionTree = async ()=>{
administrativeDivisionTree.value = resp.data as TreeNodeVo<string>[]
}
//
const userNameOptions = ref([])
const projectManagerMiniProgram = async()=>{
const resp = await api.get('/securityUnit/listProjectManager')
userNameOptions.value = resp.data as any
}
//
const enterprisesUnitIdList = ref<SelectNodeVo<string>[]>([])
const enterprisesUnitId = ref('')
@ -244,6 +254,11 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
label: '名称',
required: true,
},
projectManagerMiniProgramUserId:{
type:'select',
label:'项目经理',
options:userNameOptions,
},
administrativeDivisionCodes:{
type:'cascader',
label:'行政区划',
@ -366,6 +381,7 @@ const submit = async()=>{
const serviceProjectSaveOrUpdateParams = {
snowFlakeId: snowFlakeId.value,
enterprisesUnitId:UnitId.value,
projectManagerMiniProgramUserId:formParams.value.projectManagerMiniProgramUserId,
name: formParams.value.name,
type:formParams.value.type,
isRecruitSecurity:formParams.value.isRecruitSecurity,
@ -411,6 +427,7 @@ const addServiceProjects = () => {
onMounted(async ()=>{
await getAdministrativeDivisionTree()
await projectManagerMiniProgram()
})
</script>