Compare commits

..

No commits in common. "d153b4fb458b0aad35b0f82fe170a9dca2f59d6d" and "d10acd386ed1ce0aa033cb35c46051155dcac82d" have entirely different histories.

8 changed files with 251 additions and 417 deletions

View File

@ -9,53 +9,16 @@
<menu-fold-outlined v-else class="trigger" @click="() => (collapsed = !collapsed)"/> <menu-fold-outlined v-else class="trigger" @click="() => (collapsed = !collapsed)"/>
</div> </div>
<div class="margin-right flex-center"> <div class="margin-right flex-center">
<a-dropdown :trigger="['click']" placement="bottomRight" :arrow="{ pointAtCenter: true }"> <a-avatar/>
<a-avatar/>
<template #overlay >
<a-menu style="width: 100px;text-align: center">
<a-menu-item key="0" @click="logout"> 退出登录</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ExclamationCircleOutlined, MenuFoldOutlined, MenuUnfoldOutlined} from "@ant-design/icons-vue"; import {MenuFoldOutlined, MenuUnfoldOutlined} from "@ant-design/icons-vue";
import router from "@/router";
import {useUserStore} from "@/stores/modules/userStore.ts";
import {Modal} from "ant-design-vue";
import {createVNode} from "vue";
const collapsed = defineModel<boolean>('collapsed') const collapsed = defineModel<boolean>('collapsed')
const userStore = useUserStore()
// const logout = ()=>{
// localStorage.removeItem("baUserStore");
// router.push('/login')
// userStore.resetUserInfo()
// }
const logout = () => {
Modal.confirm({
title: '确定要退出登录么?',
icon: createVNode(ExclamationCircleOutlined),
async onOk() {
//
await userStore.resetUserInfo();
//
await router.push({
path: '/login'
})
},
async onCancel() {
console.log('Cancel');
},
class: 'test',
});
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -1,122 +1,96 @@
<template> <template>
<div class="simpleUploadDiv"> <div class="simpleUploadDiv">
<a-progress v-if="uploading" type="circle" :percent="percent" /> <a-progress v-if="uploading" type="circle" :percent="percent"/>
<a-image <a-image
height="80%" height="80%"
v-else v-else
:src="minioBaseUrl + modelValue" :src="minioBaseUrl+modelValue"
alt="avatar" alt="avatar"/>
/>
<a-button class="btn-success" @click="selectFile">{{ btnLabel }}</a-button> <a-button class="btn-success" @click="selectFile">{{ btnLabel }}</a-button>
<input :id="id" type="file" style="display: none" ref="fileInput" /> <input id="myFileInput" type="file" style="display: none" ref="fileInput" />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { message } from "ant-design-vue"; import {message} from "ant-design-vue";
import { onMounted, onUnmounted, ref } from "vue"; import {onMounted, onUnmounted, ref} from "vue";
import { import {generateSimpleObjectName, getResignedObjectUrl} from "@/utils/minioUtil";
generateSimpleObjectName, import axios, {CancelTokenSource} from "axios";
getResignedObjectUrl, import {convertFileSizeToStr} from "@/utils/index.ts";
} from "@/utils/minioUtil";
import axios, { CancelTokenSource } from "axios";
import { convertFileSizeToStr } from "@/utils/index.ts";
const minioBaseUrl = __APP_ENV.VITE_APP_MINIO_URL; const minioBaseUrl = __APP_ENV.VITE_APP_MINIO_URL
const modelValue = defineModel<string>("value"); const modelValue = defineModel<string>('value')
const props = withDefaults( const props = withDefaults(defineProps<{
defineProps<{ parentDir?: string,
parentDir?: string; allowedExtensions?: string[],
allowedExtensions?: string[]; maxSize?: number,
maxSize?: number; width?: string | number,
width?: string | number; height?: string | number,
height?: string | number; btnLabel?: string
btnLabel?: string; }>(), {
id: string; parentDir: '',
}>(), allowedExtensions: () => ['jpg', 'jpeg', 'png', 'gif'],
{ maxSize: 1024 * 1024 * 4,
parentDir: "", width: '150px',
allowedExtensions: () => ["jpg", "jpeg", "png", "gif"], height: '150px',
maxSize: 1024 * 1024 * 4, btnLabel: '选择图片'
width: "150px", })
height: "150px",
btnLabel: "选择图片",
id: "myFileInput",
}
);
const uploading = ref(false); const uploading = ref(false)
const percent = ref(0); const percent = ref(0)
let cancelToken: CancelTokenSource | null = null; let cancelToken: CancelTokenSource | null = null
const uploadUrl = ref(); const uploadUrl = ref()
const fileInput = ref(null); const fileInput = ref(null);
const selectFile = () => { const selectFile = () => {
document.getElementById(props.id)?.click(); document.getElementById('myFileInput')?.click()
}; }
async function inputFileListener(this: HTMLInputElement) { async function inputFileListener(this: HTMLInputElement) {
const selectedFile: File = this.files?.[0] as File; const selectedFile: File = this.files?.[0] as File;
const fileExtension = selectedFile.name const fileExtension = selectedFile.name?.split('.').pop().toLowerCase() as string;
?.split(".")
.pop()
.toLowerCase() as string;
if (!props.allowedExtensions.includes(fileExtension)) { if (!props.allowedExtensions.includes(fileExtension)) {
return message.error( return message.error(`错误:不支持的文件格式,目前支持:【${props.allowedExtensions}`)
`错误:不支持的文件格式,目前支持:【${props.allowedExtensions}`
);
} }
const isMax = selectedFile.size > props.maxSize; const isMax = selectedFile.size > props.maxSize;
if (isMax) { if (isMax) {
return message.error( return message.error(`文件大小超出限制,最大支持:【${convertFileSizeToStr(props.maxSize)}`);
`文件大小超出限制,最大支持:【${convertFileSizeToStr(props.maxSize)}`
);
} }
cancelToken?.cancel(); cancelToken?.cancel();
percent.value = 0; percent.value = 0;
uploading.value = true; uploading.value = true;
const objectName = generateSimpleObjectName( const objectName = generateSimpleObjectName(selectedFile.name, props.parentDir)
selectedFile.name, uploadUrl.value = await getResignedObjectUrl(__APP_ENV.VITE_APP_MINIO_BUCKET, objectName)
props.parentDir cancelToken = axios.CancelToken.source()
);
uploadUrl.value = await getResignedObjectUrl(
__APP_ENV.VITE_APP_MINIO_BUCKET,
objectName
);
cancelToken = axios.CancelToken.source();
await axios.put(uploadUrl.value, selectedFile, { await axios.put(uploadUrl.value, selectedFile, {
cancelToken: cancelToken.token, cancelToken: cancelToken.token,
onUploadProgress: (progressEvent) => { onUploadProgress: (progressEvent) => {
percent.value = percent.value = (progressEvent.loaded / (progressEvent.total as number) * 100 | 0)
((progressEvent.loaded / (progressEvent.total as number)) * 100) | 0; }
}, })
}); modelValue.value = '/' + __APP_ENV.VITE_APP_MINIO_BUCKET + objectName;
modelValue.value = "/" + __APP_ENV.VITE_APP_MINIO_BUCKET + objectName;
uploading.value = false; uploading.value = false;
} }
const fileDelete = () => { const fileDelete = ()=>{
uploadUrl.value = ""; uploadUrl.value = ''
fileInput.value.value = ""; fileInput.value.value = ''
modelValue.value = ""; modelValue.value = ''
}; }
onMounted(() => { onMounted(() => {
document document.getElementById('myFileInput')?.addEventListener('change', inputFileListener);
.getElementById(props.id) })
?.addEventListener("change", inputFileListener);
});
onUnmounted(() => { onUnmounted(() => {
document document.getElementById('myFileInput')?.removeEventListener('change', inputFileListener);
.getElementById(props.id) })
?.removeEventListener("change", inputFileListener); defineExpose({fileDelete})
});
defineExpose({ fileDelete });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -20,8 +20,6 @@ router.beforeEach(async (to, from, next) => {
Modal.destroyAll(); Modal.destroyAll();
//判断访问的是不是登录页 //判断访问的是不是登录页
const userStore = useUserStore(); const userStore = useUserStore();
console.log(to.path.toLocaleLowerCase())
console.log(userStore)
if (to.path.toLocaleLowerCase() === '/login' && userStore.getTokenInfo?.value) { if (to.path.toLocaleLowerCase() === '/login' && userStore.getTokenInfo?.value) {
//如果已登录 且访问login页面 直接返回当前页面 //如果已登录 且访问login页面 直接返回当前页面
await message.warn('当前已登录,请先退出账号'); await message.warn('当前已登录,请先退出账号');

View File

@ -20,7 +20,7 @@ export const useUserStore = defineStore({
getTokenInfo: (state): TokenInfo => state.tokenInfo as TokenInfo, getTokenInfo: (state): TokenInfo => state.tokenInfo as TokenInfo,
}, },
persist: { persist: {
key: "baUserStore", key: "baUserStore", //spUserStore
storage: window.localStorage, storage: window.localStorage,
paths: ["tokenInfo"], paths: ["tokenInfo"],
} }

View File

@ -6,8 +6,7 @@ export interface formDatePort {
telephone:string, telephone:string,
administrativeDivisionCodes:string, administrativeDivisionCodes:string,
address:string, address:string,
nature:string, nature:string
securityServiceLicence:string
} }
export interface statusPort { export interface statusPort {

View File

@ -11,7 +11,6 @@ export interface serviceProjectSaveOrUpdateParams extends BaseTableRowRecord {
twoType: BaseEnum<any>, twoType: BaseEnum<any>,
outsourceName:string, outsourceName:string,
isFiling:BaseEnum<number>, isFiling:BaseEnum<number>,
securityServiceContract:string,
idNumber: string, idNumber: string,
serviceArea: number, serviceArea: number,
buildingTotal: number, buildingTotal: number,

View File

@ -1,21 +1,15 @@
<template> <template>
<!-- 背景色覆盖整个页面并且能够正常滚动内容同时固定内层内容的位置 --> <!-- 背景色覆盖整个页面并且能够正常滚动内容同时固定内层内容的位置 -->
<body style="margin: 0; padding: 0; overflow: auto"> <body style="margin: 0; padding: 0; overflow: auto">
<!-- 背景色层 --> <!-- 背景色层 -->
<div <div class="bg-gray-100" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1"></div>
class="bg-gray-100" <!-- 内容层 -->
style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1" <div class="flex justify-center" style="position: relative; margin: 20px auto">
></div> <!-- 卡片盒子 -->
<!-- 内容层 --> <div class="w-full max-w-3xl p-6 bg-white rounded-xl shadow-md">
<div <a-tabs v-model:activeKey="activeKey" :tabBarGutter="300" centered >
class="flex justify-center" <a-tab-pane key="1" tab="企业入驻">
style="position: relative; margin: 20px auto" <a-form
>
<!-- 卡片盒子 -->
<div class="w-full max-w-3xl p-6 bg-white rounded-xl shadow-md">
<a-tabs v-model:activeKey="activeKey" :tabBarGutter="300" centered>
<a-tab-pane key="1" tab="企业入驻">
<a-form
ref="formDateRef" ref="formDateRef"
:rules="rules" :rules="rules"
:label-col="labelCol" :label-col="labelCol"
@ -23,22 +17,18 @@
layout="horizontal" layout="horizontal"
:model="formDate" :model="formDate"
@finish="onFinish" @finish="onFinish"
> >
<a-form-item label="名称" name="name"> <a-form-item label="名称" name="name">
<a-input :allowClear="true" v-model:value="formDate.name" /> <a-input :allowClear="true" v-model:value="formDate.name" />
</a-form-item> </a-form-item>
<a-form-item <a-form-item :allowClear="true" label="统一社会编码" name="socialCode">
:allowClear="true" <a-input v-model:value="formDate.socialCode"/>
label="统一社会编码" </a-form-item>
name="socialCode" <a-form-item label="公司性质" name="nature">
> <a-input :allowClear="true" v-model:value="formDate.nature"/>
<a-input v-model:value="formDate.socialCode" /> </a-form-item>
</a-form-item> <a-form-item label="行政区划" name="administrativeDivisionCodes">
<a-form-item label="公司性质" name="nature"> <a-cascader
<a-input :allowClear="true" v-model:value="formDate.nature" />
</a-form-item>
<a-form-item label="行政区划" name="administrativeDivisionCodes">
<a-cascader
v-model:value="formDate.administrativeDivisionCodes" v-model:value="formDate.administrativeDivisionCodes"
:options="administrativeDivisionTree" :options="administrativeDivisionTree"
:load-data="loadData" :load-data="loadData"
@ -46,292 +36,225 @@
@change="searchAdministrativeDivisionTree" @change="searchAdministrativeDivisionTree"
placeholder="请选择行政区划" placeholder="请选择行政区划"
change-on-select change-on-select
/> />
</a-form-item> </a-form-item>
<a-form-item label="营业执照" name="businessLicense"> <a-form-item label="营业执照" name="businessLicense">
<SingleImageFileUpload <SingleImageFileUpload v-model:value="formDate.businessLicense" ref="fileUpload"></SingleImageFileUpload>
type="businessLicense" </a-form-item>
btnLabel="营业执照上传" <a-form-item label="法人名称">
v-model:value="formDate.businessLicense" <a-input :allowClear="true" v-model:value="formDate.legalPersonInfo" />
ref="fileUpload" </a-form-item>
></SingleImageFileUpload> <a-form-item label="法人手机号码">
</a-form-item> <a-input :allowClear="true" v-model:value="formDate.telephone" />
<a-form-item label="备案证/许可证" name="securityServiceLicence"> </a-form-item>
<div style="display: flex"> <a-form-item label="详细地址" >
<SingleImageFileUpload <a-input :allowClear="true" v-model:value="formDate.address" />
v-model:value="formDate.securityServiceLicence" </a-form-item>
ref="permitUpload" <a-form-item :wrapper-col="{ offset: 8, span: 16 }">
id="securityServiceLicenceInput" <a-button type="primary" html-type="submit" style="width: 100px">确认</a-button>
></SingleImageFileUpload> <a-button style="width: 100px;margin-left: 10px" @click="resetForm">重置表单</a-button>
<div style="color: red; text-align: left"> </a-form-item>
自行招用单位备案证或保安许可证 </a-form>
</div> </a-tab-pane>
</div> <a-tab-pane key="2" tab="查询企业状态" >
</a-form-item> <a-form
<a-form-item label="法人名称">
<a-input
:allowClear="true"
v-model:value="formDate.legalPersonInfo"
/>
</a-form-item>
<a-form-item label="法人手机号码">
<a-input
:allowClear="true"
v-model:value="formDate.telephone"
/>
</a-form-item>
<a-form-item label="详细地址">
<a-input :allowClear="true" v-model:value="formDate.address" />
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button type="primary" html-type="submit" style="width: 100px"
>确认</a-button
>
<a-button
style="width: 100px; margin-left: 10px"
@click="resetForm"
>重置表单</a-button
>
</a-form-item>
</a-form>
</a-tab-pane>
<a-tab-pane key="2" tab="查询企业状态">
<a-form
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
:model="statusDate" :model="statusDate"
layout="horizontal" layout="horizontal">
> <a-form-item label="统一社会编码" name="onlyCode" :rules="[{ required: true, message: '请输入统一社会编码进行查询' }]">
<a-form-item <a-input :allowClear="true" v-model:value="statusDate.onlyCode"></a-input>
label="统一社会编码" </a-form-item>
name="onlyCode" <a-form-item :wrapper-col="{ offset: 8, span: 16 }">
:rules="[ <a-button type="primary" html-type="submit" style="width: 100px" @click="getCheckStatus">确认</a-button>
{ required: true, message: '请输入统一社会编码进行查询' }, </a-form-item>
]" </a-form>
> </a-tab-pane></a-tabs>
<a-input
:allowClear="true"
v-model:value="statusDate.onlyCode"
></a-input>
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button
type="primary"
html-type="submit"
style="width: 100px"
@click="getCheckStatus"
>确认</a-button
>
</a-form-item>
</a-form>
</a-tab-pane></a-tabs
>
</div>
</div> </div>
</div>
</body> </body>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, createVNode, h } from "vue"; import {ref, onMounted,createVNode,h} from 'vue';
import type { Rule } from "ant-design-vue/es/form"; import type { Rule } from 'ant-design-vue/es/form';
import type { ShowSearchType } from "ant-design-vue/es/cascader"; import type { ShowSearchType } from 'ant-design-vue/es/cascader';
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import api from "@/axios"; import api from "@/axios";
import { CascaderProps, message, Modal } from "ant-design-vue"; import {CascaderProps, message, Modal} from 'ant-design-vue';
import SingleImageFileUpload from "@/components/upload/SingleImageFileUpload.vue"; import SingleImageFileUpload from "@/components/upload/SingleImageFileUpload.vue";
import { useRouter } from "vue-router"; import {useRouter} from "vue-router";
import { formDatePort, statusPort } from "@/types/views/enterprise.ts"; import {formDatePort, statusPort} from "@/types/views/enterprise.ts";
const activeKey = ref("1"); const activeKey = ref('1');
const labelCol = { style: { width: "120px" } }; const labelCol = { style: { width: '120px' } };
const wrapperCol = { span: 14 }; const wrapperCol = { span: 14 };
const administrativeDivisionTree = ref<TreeNodeVo<string>[]>([]); const administrativeDivisionTree = ref<TreeNodeVo<string>[]>([])
const formDateRef = ref(); const formDateRef = ref();
const fileUpload = ref(); const fileUpload = ref()
const permitUpload = ref(); const router = useRouter()
const router = useRouter();
const formDate = ref<formDatePort>({ const formDate = ref<formDatePort>({
name: "", name:'',
socialCode: "", socialCode:'',
businessLicense: "", businessLicense:'',
legalPersonInfo: "", legalPersonInfo:'',
telephone: "", telephone:'',
administrativeDivisionCodes: "", administrativeDivisionCodes:'',
address: "", address:'',
nature: "", nature:''
securityServiceLicence: "", })
}); const statusDate = ref<statusPort>({
const statusDate = ref<statusPort>({ onlyCode:'',
onlyCode: "", unitOptType:'SECURITY_UNIT'
unitOptType: "SECURITY_UNIT", })
});
const rules: Record<string, Rule[]> = { const rules: Record<string, Rule[]> = {
name: [{ required: true, message: "请输入姓名", trigger: "change" }], name: [
socialCode: [ { required: true, message: '请输入姓名', trigger: 'change' },
{ required: true, message: "请输入社会编码", trigger: "change" },
], ],
nature: [{ required: true, message: "请填写公司性质", trigger: "change" }], socialCode:[
businessLicense: [ { required: true, message: '请输入社会编码', trigger: 'change' },
{ required: true, message: "请上传营业执照", trigger: "change" },
], ],
securityServiceLicence: [ nature:[
{ required: true, message: "请上传备案证/许可证", trigger: "change" }, { required: true, message: '请填写公司性质', trigger: 'change' },
], ],
administrativeDivisionCodes: [ businessLicense:[
{ required: true, message: "请选择行政区划", trigger: "change" }, { required: true, message: '请上传营业执照', trigger: 'change' },
], ],
administrativeDivisionCodes:[
{ required: true, message: '请选择行政区划', trigger: 'change' },
]
}; };
// 1 // 1
const DivisionTree = async () => { const DivisionTree = async ()=>{
const resp = await api.get<TreeNodeVo<string>[]>( const resp = await api.get<TreeNodeVo<string>[]>('/common/administrativeDivisionByParentCode',{parentCode:'0'})
"/common/administrativeDivisionByParentCode", administrativeDivisionTree.value = resp.data as TreeNodeVo<string>[]
{ parentCode: "0" }
); }
administrativeDivisionTree.value = resp.data as TreeNodeVo<string>[];
};
const loadData: CascaderProps["loadData"] = async (selectedOptions) => { const loadData: CascaderProps['loadData'] = async selectedOptions => {
const targetOption = selectedOptions[selectedOptions.length - 1]; const targetOption = selectedOptions[selectedOptions.length - 1];
targetOption.loading = true; targetOption.loading = true;
const resp = await api.get<TreeNodeVo<string>[]>( const resp = await api.get<TreeNodeVo<string>[]>('/common/administrativeDivisionByParentCode',{parentCode:targetOption.value})
"/common/administrativeDivisionByParentCode",
{ parentCode: targetOption.value }
);
targetOption.loading = false; targetOption.loading = false;
targetOption.children = [administrativeDivisionTree.value, ...resp.data]; targetOption.children = [administrativeDivisionTree.value,...resp.data]
}; };
// //
const transformData = (val: any, tree: any) => { const transformData = (val:any,tree:any)=>{
for (let i = 0; i < val.length - 1; i++) { for(let i = 0; i< val.length - 1;i++){
tree.forEach(async (item: any) => { tree.forEach(async(item:any)=>{
if (item.value === val[i]) { if(item.value === val[i]){
item.children = []; item.children = []
let data = await api.get<TreeNodeVo<string>[]>( let data = await api.get<TreeNodeVo<string>[]>('/common/administrativeDivisionByParentCode',{parentCode:val[i]})
"/common/administrativeDivisionByParentCode", item.children = data.data.map((items:any)=>{
{ parentCode: val[i] }
);
item.children = data.data.map((items: any) => {
return { return {
label: items.label, label:items.label,
value: items.value, value:items.value
}; }
}); })
transformData(val, item.children); transformData(val,item.children)
} }
}); })
} }
}; }
// 2 // 2
const filter: ShowSearchType["filter"] = (inputValue, path) => { const filter: ShowSearchType['filter'] = (inputValue, path) => {
return path?.some( return path?.some(option => option.label.toLowerCase().indexOf(inputValue?.toLowerCase()) > -1);
(option) =>
option.label.toLowerCase().indexOf(inputValue?.toLowerCase()) > -1
);
}; };
// //
const searchAdministrativeDivisionTree = (e: Array<string>) => { const searchAdministrativeDivisionTree = (e:Array<string>)=>{
formDate.value.administrativeDivisionCodes = e as any; formDate.value.administrativeDivisionCodes = e as any
}; }
// //
const onFinish = async () => { const onFinish = async ()=>{
// //
await formDateRef.value.validate(); await formDateRef.value.validate()
const legalPersonInfo = { const legalPersonInfo = {
name: formDate.value.legalPersonInfo, name:formDate.value.legalPersonInfo,
telephone: formDate.value.telephone, telephone:formDate.value.telephone
}; }
const securityUnitRegisterParams = { const securityUnitRegisterParams = {
name: formDate.value.name, name:formDate.value.name,
socialCode: formDate.value.socialCode, socialCode:formDate.value.socialCode,
businessLicense: formDate.value.businessLicense, businessLicense:formDate.value.businessLicense,
legalPersonInfo: legalPersonInfo, legalPersonInfo:legalPersonInfo,
nature: formDate.value.nature, nature:formDate.value.nature,
administrativeDivisionCodes: formDate.value.administrativeDivisionCodes, administrativeDivisionCodes:formDate.value.administrativeDivisionCodes,
address: formDate.value.address, address:formDate.value.address
securityServiceLicence: formDate.value.securityServiceLicence, }
}; const resp = await api.post('/common/securityUnitRegister',securityUnitRegisterParams)
const resp = await api.post( message.success(resp.message)
"/common/securityUnitRegister", fileUpload.value.fileDelete()
securityUnitRegisterParams await resetForm()
); }
message.success(resp.message);
fileUpload.value.fileDelete();
permitUpload.value.fileDelete();
await resetForm();
};
// //
const resetForm = async () => { const resetForm = async ()=>{
await formDateRef.value.resetFields(); await formDateRef.value.resetFields()
formDate.value = { formDate.value = {
name: "", name:'',
socialCode: "", socialCode:'',
businessLicense: "", businessLicense:'',
legalPersonInfo: "", legalPersonInfo:'',
telephone: "", telephone:'',
administrativeDivisionCodes: "", administrativeDivisionCodes:'',
address: "", address:'',
nature: "", nature:''
securityServiceLicence: "", }
}; fileUpload.value.fileDelete()
fileUpload.value.fileDelete(); }
permitUpload.value.fileDelete();
};
// //
const getCheckStatus = async ()=>{
const getCheckStatus = async () => {
const indexCheckStatusParams = { const indexCheckStatusParams = {
onlyCode: statusDate.value.onlyCode, onlyCode:statusDate.value.onlyCode,
unitOptType: statusDate.value.unitOptType, unitOptType:statusDate.value.unitOptType
}; }
const resp = await api.post<dataStatus>( const resp = await api.post<dataStatus>('/management/getCheckStatus',indexCheckStatusParams)
"/management/getCheckStatus", showConfirm(resp.data)
indexCheckStatusParams }
);
showConfirm(resp.data);
};
const showConfirm = (columnsDate: dataStatus) => { const showConfirm = (columnsDate:dataStatus) => {
if (columnsDate.checkStatus.value === 0) { if(columnsDate.checkStatus.value === 0){
Modal.success({ Modal.success({
title: `审核通过`, title: `审核通过`,
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
content: h("div", {}, [ content: h('div', {}, [
h("div", `账号:${columnsDate.account}`), h('div', `账号:${columnsDate.account}`),
h("div", `密码:${columnsDate.password}`), h('div', `密码:${columnsDate.password}`),
h("div", `${columnsDate.remark}`), h('div', `${columnsDate.remark}`)
]), ]),
okText: "跳转", okText:'跳转',
async onOk() { async onOk() {
await router await router.push({
.push({ path:'/login',
path: "/login", query:{
query: { account:columnsDate.account,
account: columnsDate.account, password:columnsDate.password
password: columnsDate.password, }
}, }).then(()=>{})
})
.then(() => {});
}, },
onCancel() {}, onCancel() {},
}); });
} else { }else{
Modal.error({ Modal.error({
title: `未审核`, title: `未审核`,
icon: createVNode(ExclamationCircleOutlined), icon: createVNode(ExclamationCircleOutlined),
content: `${columnsDate.remark}`, content:`${columnsDate.remark}`,
}); });
} }
}; };
onMounted(async () => { onMounted( async ()=>{
await DivisionTree(); await DivisionTree()
await transformData( await transformData(formDate.value.administrativeDivisionCodes,administrativeDivisionTree.value)
formDate.value.administrativeDivisionCodes, })
administrativeDivisionTree.value
);
});
</script> </script>

View File

@ -19,8 +19,7 @@
@ok="submit" @ok="submit"
@cancel="closeModal" @cancel="closeModal"
> >
<FormProMax ref="formRef" v-model:value="formParams" :form-item-options="formItemOptions"> <FormProMax ref="formRef" v-model:value="formParams" :form-item-options="formItemOptions"/>
</FormProMax>
</a-modal> </a-modal>
</div> </div>
@ -38,7 +37,6 @@ import {FormExpose} from "ant-design-vue/es/form/Form";
import {FormProMaxItemOptions} from "@/types/components/form"; import {FormProMaxItemOptions} from "@/types/components/form";
import FormProMax from "@/components/form/FormProMax.vue"; import FormProMax from "@/components/form/FormProMax.vue";
import {message} from "ant-design-vue"; import {message} from "ant-design-vue";
import SingleImageFileUpload from "@/components/upload/SingleImageFileUpload.vue";
type TableProps = TableProMaxProps<serviceProjectSaveOrUpdateParams> // type TableProps = TableProMaxProps<serviceProjectSaveOrUpdateParams> //
@ -87,7 +85,6 @@ const formParams = ref<{
outsourceName?:string, outsourceName?:string,
isFiling:number, isFiling:number,
idNumber?: string, idNumber?: string,
securityServiceContract?:string,
serviceArea?:number, serviceArea?:number,
buildingTotal?:number, buildingTotal?:number,
houseTotal?:number, houseTotal?:number,
@ -119,6 +116,7 @@ const columns: TableProps['columns'] = [
title: '企事业单位名称', title: '企事业单位名称',
width: 150, width: 150,
ellipsis: true, ellipsis: true,
}, },
{ {
dataIndex:'type', dataIndex:'type',
@ -148,19 +146,10 @@ const columns: TableProps['columns'] = [
title: '保安服务许可证', title: '保安服务许可证',
width:170 width:170
}, },
{
dataIndex:'securityServiceContract',
title:'保安服务合同',
width:200,
customRender({text}) {
return <a-image width={100} height={100} src={__APP_ENV.VITE_APP_MINIO_URL + text}></a-image>
},
ellipsis: true,
},
{ {
dataIndex:'serviceArea', dataIndex:'serviceArea',
title:'服务区域面积', title:'服务区域面积',
width:120, width:120
}, },
{ {
dataIndex:'buildingTotal', dataIndex:'buildingTotal',
@ -236,7 +225,6 @@ const columns: TableProps['columns'] = [
formParams.value. securityUserTotal = record.securityUserTotal formParams.value. securityUserTotal = record.securityUserTotal
formParams.value.enterprisesUnitId = record.enterprisesUnitName formParams.value.enterprisesUnitId = record.enterprisesUnitName
formParams.value.administrativeDivisionCodes = record.enterprisesUnitAdministrativeDivisionCodes formParams.value.administrativeDivisionCodes = record.enterprisesUnitAdministrativeDivisionCodes
formParams.value.securityServiceContract = record.securityServiceContract
}}>编辑</a-button> }}>编辑</a-button>
</a-space> </a-space>
@ -359,17 +347,10 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
idNumber: { idNumber: {
type: 'input', type: 'input',
label: '保安服务许可证', label: '保安服务许可证',
// componentsProps:{
// disabled:idNumberDisabled as any
// }
}, },
securityServiceContract:{
type:'custom',
label: '保安服务合同',
required: true,
customRender: () =>
<div>
<SingleImageFileUpload height={200} v-model:value={formParams.value.securityServiceContract} />
<div class="securityServiceContract">只需提供体现签订合同的单位和执行合同起止时间的页面即可两张合在一起进行上传</div>
</div>
},
serviceArea:{ serviceArea:{
type:'inputNumber', type:'inputNumber',
label:'服务区域面积', label:'服务区域面积',
@ -378,7 +359,7 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
buildingTotal:{ buildingTotal:{
type:'inputNumber', type:'inputNumber',
label:'楼栋数量', label:'楼栋数量',
componentsProps:{ componentsProps:{
formatter:(value:any)=>{ formatter:(value:any)=>{
return Math.round(value)?Math.round(value):'' as any return Math.round(value)?Math.round(value):'' as any
}, },
@ -451,7 +432,6 @@ const submit = async()=>{
staffTotal:formParams.value.staffTotal, staffTotal:formParams.value.staffTotal,
securityUserTotal:formParams.value.securityUserTotal, securityUserTotal:formParams.value.securityUserTotal,
remark: formParams.value.remark, remark: formParams.value.remark,
securityServiceContract:formParams.value.securityServiceContract
} }
const resp = await api.post('/m3/sp/add_upd',serviceProjectSaveOrUpdateParams) const resp = await api.post('/m3/sp/add_upd',serviceProjectSaveOrUpdateParams)
message.success(resp.message) message.success(resp.message)
@ -491,8 +471,6 @@ onMounted(async ()=>{
</script> </script>
<style lang="scss"> <style scoped lang="scss">
.securityServiceContract{
color: red;
}
</style> </style>