Commit 084f0ed6 authored by chenjiahao's avatar chenjiahao

Merge remote-tracking branch 'origin/master'

parents 6964b3ee d6f59107
This diff is collapsed.
This diff is collapsed.
<template> <template>
<BasicModal width="40%" v-bind="$attrs" @register="registerModal" :title="getTitle" @ok="handleSubmit"> <BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {ref, computed, unref, reactive} from 'vue'; import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal'; import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import { accountFormSchema } from './institution.data'; import { accountFormSchema } from './institution.data';
import { getDeptList } from '@/api/system/dept/dept'; import { getDeptList } from '@/api/system/dept/dept';
import {addUserApi,UserDetailApi,UserUpdataApi} from '@/api/system/user/user' import { addUserApi, UserDetailApi, UserUpdataApi } from '@/api/system/user/user';
import { encryptTwo } from '../../../../src/utils/jsencrypt.js' import { encryptTwo } from '../../../../src/utils/jsencrypt.js';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import {TreeData} from "@/views/dataSharingAndExchange/catalogingManagement/institutionData"; import { TreeData } from '@/views/dataSharingAndExchange/catalogingManagement/institutionData';
defineOptions({ name: 'AccountModal' }); defineOptions({ name: 'AccountModal' });
const emit = defineEmits(['success', 'register']); const emit = defineEmits(['success', 'register']);
...@@ -36,6 +43,7 @@ import {ref, computed, unref, reactive} from 'vue'; ...@@ -36,6 +43,7 @@ import {ref, computed, unref, reactive} from 'vue';
resetFields(); resetFields();
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
isMove.value = !!data?.isMove; isMove.value = !!data?.isMove;
if (unref(isUpdate)) { if (unref(isUpdate)) {
// 获取行数据的id // 获取行数据的id
...@@ -46,13 +54,12 @@ import {ref, computed, unref, reactive} from 'vue'; ...@@ -46,13 +54,12 @@ import {ref, computed, unref, reactive} from 'vue';
}); });
} }
const treeList = handleTree(TreeData, 'businessId', undefined, undefined, undefined);
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([ updateSchema([
{ {
field: 'institutionId', field: 'institutionId',
componentProps: { componentProps: {
treeData: treeList treeData: treeList,
}, },
}, },
]); ]);
...@@ -61,51 +68,65 @@ import {ref, computed, unref, reactive} from 'vue'; ...@@ -61,51 +68,65 @@ import {ref, computed, unref, reactive} from 'vue';
const getTitle = computed(() => (!unref(isUpdate) ? '新增账号' : '编辑账号')); const getTitle = computed(() => (!unref(isUpdate) ? '新增账号' : '编辑账号'));
function handleTree(data, id, parentId, children, rootId) { function handleTree(data, id, parentId, children, rootId) {
id = id || 'id' id = id || 'id';
parentId = parentId || 'parentId' parentId = parentId || 'parentId';
children = children || 'children' children = children || 'children';
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0 rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆 // 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data)) const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项 // 循环所有项
const treeData = cloneData.filter(father => { const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter(child => { const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组 // 返回每一项的子级数组
return father[id] === child[parentId] return father[id] === child[parentId];
}) });
branchArr.length > 0 ? father.children = branchArr : '' branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层 // 返回第一层
return father[parentId] === rootId return father[parentId] === rootId;
}) });
return treeData !== '' ? treeData : data return treeData !== '' ? treeData : data;
} }
/**确定按钮*/ /**确定按钮*/
async function handleSubmit() { async function handleSubmit() {
try { try {
//拿到表单内容 // 拿到表单内容
const values = await validate(); const values = await validate();
//通过表单获取的institutionId去查找相同TreeData中的institutionId的institutionName //通过表单获取的institutionId去查找相同TreeData中的institutionId的institutionName
const institutionName = TreeData.find(item => item.businessId === values.institutionId).institutionName // const institutionName = TreeData.find(
values.institutionName = institutionName // (item) => item.businessId === values.institutionId,
// ).institutionName;
// values.institutionName = institutionName;
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
// 编辑 // 编辑
if(unref(isUpdate)) { if (unref(isUpdate)) {
values.businessId = rowId.value values.businessId = rowId.value;
//修改列表值 //修改列表值
emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } }); emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
createMessage.success('编辑成功'); createMessage.success('编辑成功');
closeModal(); closeModal();
}else { } else {
//根据institutionId去查找相同TreeData中的institutionId的institutionName //根据institutionId去查找相同TreeData中的institutionId的institutionName
const institutionName = TreeData.find(item => item.businessId === values.institutionId).institutionName // const institutionName = TreeData.find(
// (item) => item.businessId === values.institutionId,
// ).institutionName;
const paramsAdd = { const paramsAdd = {
username: values.username, username: values.username,
name: values.name, name: values.name,
institutionId: values.institutionId, institutionId: values.institutionId,
institutionName: institutionName, project: values.project,
createDate: formatDate(new Date()) describe: values.describe,
} // institutionName: institutionName,
createDate: formatDate(new Date()),
};
emit('success', { isUpdate: unref(isUpdate), values: { ...paramsAdd } }); emit('success', { isUpdate: unref(isUpdate), values: { ...paramsAdd } });
createMessage.success('新增成功'); createMessage.success('新增成功');
closeModal(); closeModal();
...@@ -115,15 +136,15 @@ import {ref, computed, unref, reactive} from 'vue'; ...@@ -115,15 +136,15 @@ import {ref, computed, unref, reactive} from 'vue';
} }
} }
// 格式化日期 // 格式化日期
function formatDate(date) { function formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1 const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1
const day = String(date.getDate()).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0'); const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0'); const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0'); const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
} }
</script> </script>
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
/> />
<Icon <Icon
@click="handleGoBack" @click="handleGoBack"
icon="ph:building-apartment-bold" icon="dashicons:images-alt2"
class="header_icon" class="header_icon"
size="40px" size="40px"
/> />
<div> <div>
<div class="header_title">人力资源信息</div> <div class="header_title">轮播图详情</div>
</div> </div>
</div> </div>
<div class="right_section"> <div class="right_section">
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
:data="permissionsData" :data="permissionsData"
:schema="permissionsInfo" :schema="permissionsInfo"
/> />
<div class="mianBodyEditContainer"> <!-- <div class="mianBodyEditContainer">
<Tabs v-model:activeKey="page" size="large" class="mianBodyEditContainerTabs"> <Tabs v-model:activeKey="page" size="large" class="mianBodyEditContainerTabs">
<a-tab-pane key="1" tab="采样数据"> <a-tab-pane key="1" tab="采样数据">
<div v-if="page === '1'"> <div v-if="page === '1'">
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
</Tabs> </Tabs>
</div> </div> -->
<StorageManageModal @register="registerStorageManageModal" /> <StorageManageModal @register="registerStorageManageModal" />
<AccountModal @register="registerEditModal" @success="handleSuccess" /> <AccountModal @register="registerEditModal" @success="handleSuccess" />
</PageWrapper> </PageWrapper>
...@@ -248,7 +248,6 @@ ...@@ -248,7 +248,6 @@
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const page = ref('1'); const page = ref('1');
const tableData = ref([]); const tableData = ref([]);
const samplingTableData = ref([]); const samplingTableData = ref([]);
const associationData = ref([]); const associationData = ref([]);
......
...@@ -24,8 +24,13 @@ ...@@ -24,8 +24,13 @@
</template> </template>
<BasicTable @register="registerTable" :searchInfo="searchInfo"> <BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar> <template #toolbar>
<a-button type="primary">新增轮播图</a-button> <a-button type="primary" @click="handleAdd">新增轮播图</a-button>
<a-button type="primary">批量删除</a-button> <a-button
type="error"
@click="handleDeleteBatch"
:disabled="getRowSelection().selectedRowKeys <= 0"
>批量删除</a-button
>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
...@@ -41,8 +46,20 @@ ...@@ -41,8 +46,20 @@
{ {
icon: 'dashicons:edit-large', icon: 'dashicons:edit-large',
tooltip: '编辑', tooltip: '编辑',
onClick: handleEdit.bind(null, record),
// onClick: handleDetails.bind(null, record), // onClick: handleDetails.bind(null, record),
}, },
// 删除按钮
{
icon: 'ant-design:delete-outlined',
color: 'error',
tooltip: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]" ]"
/> />
</template> </template>
...@@ -188,12 +205,14 @@ ...@@ -188,12 +205,14 @@
openModal(true, { openModal(true, {
record, record,
isAdd: true, isAdd: true,
isUpdate: false,
}); });
} }
/** 编辑按钮*/ /** 编辑按钮*/
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
openModal(true, { openModal(true, {
record, record,
isAdd: false,
isUpdate: true, isUpdate: true,
}); });
} /** 详情按钮*/ } /** 详情按钮*/
...@@ -216,7 +235,17 @@ ...@@ -216,7 +235,17 @@
createMessage.success('删除成功!'); createMessage.success('删除成功!');
reload(); reload();
} }
function handleDeleteBatch(record: Recordable) {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('删除成功!');
reload();
},
});
}
/** 导入成功*/ /** 导入成功*/
function handleImportSuccess() { function handleImportSuccess() {
reload(); reload();
......
...@@ -86,7 +86,7 @@ export const columns: BasicColumn[] = [ ...@@ -86,7 +86,7 @@ export const columns: BasicColumn[] = [
}, },
{ {
title: '轮播图描述', title: '轮播图描述',
dataIndex: 'ownerInstitution', dataIndex: 'describe',
width: 150, width: 150,
}, },
{ {
...@@ -135,7 +135,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -135,7 +135,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'ownerInstitution', field: 'describe',
label: ' ', label: ' ',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
...@@ -167,67 +167,79 @@ export const accountFormSchema: any[] = [ ...@@ -167,67 +167,79 @@ export const accountFormSchema: any[] = [
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入姓名', message: '请输入名称',
}, },
], ],
}, },
{ {
field: 'describe', field: 'project',
label: '描述', label: '轮播图文件名',
component: 'Input', component: 'Input',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入描述', message: '请输入文件名',
},
],
},
{
field: 'visibleRange',
label: '可见范围',
component: 'Select',
componentProps: {
options: [
{ label: '所有人', value: '所有人' },
{ label: '用户1', value: '用户1' },
{ label: '用户2', value: '用户2' },
],
},
colProps: { lg: 24, md: 24 },
rules: [
{
required: true,
message: '请输入登录名',
}, },
], ],
}, },
{ {
field: 'resourceNum', field: 'describe',
label: '可见资源数', label: '轮播图描述',
component: 'InputNumber', component: 'Input',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
rules: [ rules: [
{ {
required: true, required: true,
message: '请输入', message: '请输入描述',
}, },
], ],
}, },
{ // {
field: 'institutionId', // field: 'visibleRange',
label: '所属编目', // label: '可见范围',
component: 'TreeSelect', // component: 'Select',
colProps: { lg: 24, md: 24 }, // componentProps: {
componentProps: { // options: [
fieldNames: { // { label: '所有人', value: '所有人' },
label: 'institutionName', // { label: '用户1', value: '用户1' },
value: 'businessId', // { label: '用户2', value: '用户2' },
}, // ],
getPopupContainer: () => document.body, // },
}, // colProps: { lg: 24, md: 24 },
required: true, // rules: [
}, // {
// required: true,
// message: '请输入登录名',
// },
// ],
// },
// {
// field: 'resourceNum',
// label: '可见资源数',
// component: 'InputNumber',
// colProps: { lg: 24, md: 24 },
// rules: [
// {
// required: true,
// message: '请输入',
// },
// ],
// },
// {
// field: 'institutionId',
// label: '所属编目',
// component: 'TreeSelect',
// colProps: { lg: 24, md: 24 },
// componentProps: {
// fieldNames: {
// label: 'institutionName',
// value: 'businessId',
// },
// getPopupContainer: () => document.body,
// },
// required: true,
// },
]; ];
export const EditFormSchema: any[] = [ export const EditFormSchema: any[] = [
{ {
......
...@@ -286,7 +286,7 @@ export const tableDataForIndex: any[] = [ ...@@ -286,7 +286,7 @@ export const tableDataForIndex: any[] = [
name: '一级资源', name: '一级资源',
project: '一级编目', project: '一级编目',
releaseStatus: '已发布', releaseStatus: '已发布',
ownerInstitution: 'test1', describe: 'test1',
resourceNum: 3, resourceNum: 3,
institutionId: 101, institutionId: 101,
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -303,7 +303,7 @@ export const tableDataForIndex: any[] = [ ...@@ -303,7 +303,7 @@ export const tableDataForIndex: any[] = [
releaser: 'duck', releaser: 'duck',
name: '二级资源', name: '二级资源',
project: '公共安全', project: '公共安全',
ownerInstitution: 'test2', describe: 'test2',
releaseStatus: '已发布', releaseStatus: '已发布',
resourceNum: 4, resourceNum: 4,
institutionId: 102, institutionId: 102,
...@@ -322,7 +322,7 @@ export const tableDataForIndex: any[] = [ ...@@ -322,7 +322,7 @@ export const tableDataForIndex: any[] = [
name: '三级资源', name: '三级资源',
project: '卫生健康', project: '卫生健康',
releaseStatus: '已发布', releaseStatus: '已发布',
ownerInstitution: 'test1', describe: 'test1',
resourceNum: 5, resourceNum: 5,
institutionId: 103, institutionId: 103,
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -340,7 +340,7 @@ export const tableDataForIndex: any[] = [ ...@@ -340,7 +340,7 @@ export const tableDataForIndex: any[] = [
name: '四级资源', name: '四级资源',
project: '文化休闲', project: '文化休闲',
releaseStatus: '已发布', releaseStatus: '已发布',
ownerInstitution: 'test3', describe: 'test3',
resourceNum: 6, resourceNum: 6,
institutionId: 104, institutionId: 104,
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -358,7 +358,7 @@ export const tableDataForIndex: any[] = [ ...@@ -358,7 +358,7 @@ export const tableDataForIndex: any[] = [
name: '五级资源', name: '五级资源',
project: '经济建设', project: '经济建设',
releaseStatus: '已发布', releaseStatus: '已发布',
ownerInstitution: 'test1', describe: 'test1',
resourceNum: 7, resourceNum: 7,
institutionId: 105, institutionId: 105,
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -376,7 +376,7 @@ export const tableDataForIndex: any[] = [ ...@@ -376,7 +376,7 @@ export const tableDataForIndex: any[] = [
name: '特级资源', name: '特级资源',
project: '科技教育', project: '科技教育',
releaseStatus: '未发布', releaseStatus: '未发布',
ownerInstitution: 'test4', describe: 'test4',
resourceNum: 8, resourceNum: 8,
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
releaseDate: '2024-10-25 10:04:04', releaseDate: '2024-10-25 10:04:04',
......
...@@ -312,6 +312,6 @@ ...@@ -312,6 +312,6 @@
} }
.headerForm { .headerForm {
margin-top: 30px; margin-bottom: 30px;
} }
</style> </style>
...@@ -4,7 +4,7 @@ import { InputProps } from 'ant-design-vue'; ...@@ -4,7 +4,7 @@ import { InputProps } from 'ant-design-vue';
export const identityFormSchema: FormSchema[] = [ export const identityFormSchema: FormSchema[] = [
{ {
field: 'identity', field: 'identity',
label: '身份选择', label: '身份选择',
defaultValue: '数据买家', defaultValue: '数据买家',
slot: 'identity', slot: 'identity',
required: true, required: true,
...@@ -13,25 +13,25 @@ export const identityFormSchema: FormSchema[] = [ ...@@ -13,25 +13,25 @@ export const identityFormSchema: FormSchema[] = [
export const enterpriseFormSchema: FormSchema[] = [ export const enterpriseFormSchema: FormSchema[] = [
{ {
field: 'license', field: 'license',
label: '营业执照', label: '营业执照',
slot: 'license', slot: 'license',
required: true, required: true,
}, },
{ {
field: 'logo', field: 'logo',
label: '公司LOGO', label: '公司LOGO',
slot: 'logo', slot: 'logo',
required: true, required: true,
}, },
{ {
field: 'companyName', field: 'companyName',
label: '公司名称', label: '公司名称',
slot: 'companyName', slot: 'companyName',
required: true, required: true,
}, },
{ {
field: 'code', field: 'code',
label: '统一社会信用代码', label: '统一社会信用代码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入统一社会信用代码', placeholder: '请输入统一社会信用代码',
...@@ -40,13 +40,13 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -40,13 +40,13 @@ export const enterpriseFormSchema: FormSchema[] = [
}, },
{ {
field: 'leader', field: 'leader',
label: '法人', label: '法人',
slot: 'leader', slot: 'leader',
required: true, required: true,
}, },
{ {
field: 'leaderNum', field: 'leaderNum',
label: '法人身份证号码', label: '法人身份证号码',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入法人身份证号码', placeholder: '请输入法人身份证号码',
...@@ -55,7 +55,7 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -55,7 +55,7 @@ export const enterpriseFormSchema: FormSchema[] = [
}, },
{ {
field: 'buildTime', field: 'buildTime',
label: '成立日期', label: '成立日期',
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
placeholder: '请选择成立日期', placeholder: '请选择成立日期',
...@@ -64,7 +64,7 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -64,7 +64,7 @@ export const enterpriseFormSchema: FormSchema[] = [
}, },
{ {
field: 'registerNum', field: 'registerNum',
label: '注册资本', label: '注册资本',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入注册资本', placeholder: '请输入注册资本',
...@@ -73,7 +73,7 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -73,7 +73,7 @@ export const enterpriseFormSchema: FormSchema[] = [
}, },
{ {
field: 'businessRange', field: 'businessRange',
label: '经营范围', label: '经营范围',
component: 'InputTextArea', component: 'InputTextArea',
componentProps: { componentProps: {
placeholder: '请输入经营范围(最多1024个字符)', placeholder: '请输入经营范围(最多1024个字符)',
...@@ -83,14 +83,14 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -83,14 +83,14 @@ export const enterpriseFormSchema: FormSchema[] = [
}, },
{ {
field: 'registerAddress', field: 'registerAddress',
label: '注册地址', label: '注册地址',
component: 'Select', component: 'Select',
componentProps: {}, componentProps: {},
required: true, required: true,
}, },
{ {
field: 'detailAddress', field: 'detailAddress',
label: '详细地址', label: '详细地址',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入详细地址(最多30个字符)', placeholder: '请输入详细地址(最多30个字符)',
...@@ -101,37 +101,37 @@ export const enterpriseFormSchema: FormSchema[] = [ ...@@ -101,37 +101,37 @@ export const enterpriseFormSchema: FormSchema[] = [
export const applicantFormSchema: FormSchema[] = [ export const applicantFormSchema: FormSchema[] = [
{ {
field: 'type', field: 'type',
label: '申办人身份', label: '申办人身份',
defaultValue: '授权代表', defaultValue: '授权代表',
slot: 'type', slot: 'type',
}, },
{ {
field: 'idCardFront', field: 'idCardFront',
label: '申办人身份证正面', label: '申办人身份证正面',
required: true, required: true,
slot: 'idCardFront', slot: 'idCardFront',
}, },
{ {
field: 'idCardReverse', field: 'idCardReverse',
label: '申办人身份证反面', label: '申办人身份证反面',
required: true, required: true,
slot: 'idCardReverse', slot: 'idCardReverse',
}, },
{ {
field: 'name', field: 'name',
label: '申办人姓名', label: '申办人姓名',
required: true, required: true,
slot: 'name', slot: 'name',
}, },
{ {
field: 'idNo', field: 'idNo',
label: '申办人身份证号码', label: '申办人身份证号码',
required: true, required: true,
slot: 'idNo', slot: 'idNo',
}, },
{ {
field: 'phone', field: 'phone',
label: '申办人电话', label: '申办人电话',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入申办人电话', placeholder: '请输入申办人电话',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="flex"> <div class="flex">
<div class="flex-1 header"> <div class="flex-1 header">
<!-- <LeftOutlined class="h-back" @click="handleBack" />--> <!-- <LeftOutlined class="h-back" @click="handleBack" />-->
<ApiOutlined class="h-icon" /> <VerifiedOutlined class="h-icon" />
<div class="h-txt"> <div class="h-txt">
<div class="h-des">企业认证</div> <div class="h-des">企业认证</div>
<div class="h-path">个人中心/企业认证</div> <div class="h-path">个人中心/企业认证</div>
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
<template #doc="{ field, model }"> <template #doc="{ field, model }">
<div class="field-item flex"> <div class="field-item flex">
<div class="label"> <div class="label">
<div class="required" style="margin-right: 2em">企业授权文件</div> <div class="required" style="margin-right: 1em">企业授权文件</div>
<div>(需要加盖公章)</div> <div>(需要加盖公章)</div>
</div> </div>
<div class="flex-1"> <div class="flex-1">
<UploadDragger <UploadDragger
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<div class="field-item flex"> <div class="field-item flex">
<div class="label"> <div class="label">
<div class="required" style="margin-right: 2em">企业承诺函</div> <div class="required" style="margin-right: 2em">企业承诺函</div>
<div>(需要加盖公章)</div> <div>(需要加盖公章)</div>
</div> </div>
<div class="flex-1"> <div class="flex-1">
<UploadDragger <UploadDragger
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
Checkbox, Checkbox,
} from 'ant-design-vue'; } from 'ant-design-vue';
import { identityOptions, typeOptions } from './ecData'; import { identityOptions, typeOptions } from './ecData';
import { ApiOutlined, PlusOutlined } from '@ant-design/icons-vue'; import { VerifiedOutlined, PlusOutlined } from '@ant-design/icons-vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import BasicForm from '@/components/Form/src/BasicForm.vue'; import BasicForm from '@/components/Form/src/BasicForm.vue';
import { FormProps, useForm } from '@/components/Form'; import { FormProps, useForm } from '@/components/Form';
...@@ -250,9 +250,7 @@ ...@@ -250,9 +250,7 @@
createMessage.warning('请阅读并勾选平台协议!'); createMessage.warning('请阅读并勾选平台协议!');
return; return;
} }
// await identityValidate(); // await Promise.all([identityValidate(), enterpriseValidate(), applicantValidate()]);
// await enterpriseValidate();
// await applicantValidate();
createMessage.success('提交成功!'); createMessage.success('提交成功!');
} }
function handleSave() { function handleSave() {
...@@ -269,6 +267,7 @@ ...@@ -269,6 +267,7 @@
actionColOptions: { actionColOptions: {
span: 23, span: 23,
}, },
} as FormProps); } as FormProps);
const [enterpriseForm, { validate: enterpriseValidate }] = useForm({ const [enterpriseForm, { validate: enterpriseValidate }] = useForm({
labelWidth: 150, labelWidth: 150,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="flex"> <div class="flex">
<div class="flex-1 header"> <div class="flex-1 header">
<!-- <LeftOutlined class="h-back" @click="handleBack" />--> <!-- <LeftOutlined class="h-back" @click="handleBack" />-->
<ApiOutlined class="h-icon" /> <UserOutlined class="h-icon" />
<div class="h-txt"> <div class="h-txt">
<div class="h-des">个人信息</div> <div class="h-des">个人信息</div>
<div class="h-path">个人中心/个人信息</div> <div class="h-path">个人中心/个人信息</div>
...@@ -12,6 +12,126 @@ ...@@ -12,6 +12,126 @@
</div> </div>
</div> </div>
</template> </template>
<div class="flex" style="gap: 20px">
<div class="w-3/4 main-left">
<div class="pe-body main-header">
<div class="t-left">
<div class="t-des"> 企业实名认证 </div>
<div class="t-icon">未认证</div>
</div>
<div>
<a-button type="link" @click="handleAuthentic"> 立刻认证 </a-button>
</div>
</div>
<div class="pe-body">
<div class="title"> 企业信息 </div>
<Divider style="margin: 0" />
<div class="enterprise-form">
<Row :gutter="[16, 30]">
<Col :span="8" v-for="info in enterpriseList" :key="info">
<div class="col-item">
<div class="item-label">{{ info.label }}:</div>
<div class="item-des">{{
enterprise[info.field] ? enterprise[info.field] : '-'
}}</div>
</div>
</Col>
</Row>
</div>
</div>
<div class="pe-body">
<div class="title"> 申办人信息 </div>
<Divider style="margin: 0" />
<div class="enterprise-form">
<Row :gutter="[16, 30]">
<Col :span="8" v-for="info in applicantList" :key="info">
<div class="col-item">
<div class="item-label">{{ info.label }}:</div>
<div class="item-des">{{
applicant[info.field] ? applicant[info.field] : '-'
}}</div>
</div>
</Col>
</Row>
</div>
</div>
</div>
<div class="w-1/4 main-right">
<div class="pe-body user-info">
<div class="user-hd">
<img class="img" src="/src/assets/images/userImg.png" alt="" />
<div class="hd-right">
<div class="user-name"> admin </div>
<div class="user-welcome"> 欢迎登录数据要数建设与应用服务平台 </div>
</div>
</div>
<div>
<Alert message="您尚未进行企业认证" type="warning" show-icon>
<template #action>
<a-button size="small" type="link" @click="handleAuthentic">
立即认证
<RightOutlined />
</a-button>
</template>
</Alert>
</div>
<div class="field-item">
<div class="label"> 登录ID </div>
<div class="value"> 1883668527055888802 </div>
</div>
<div class="field-item">
<div class="label"> 注册时间 </div>
<div class="value"> 2023-08-13 15:22:28 </div>
</div>
<Divider style="margin: 0" />
<div class="flex" style="gap: 10px">
<div class="flex">
<div class="tab">
<CheckCircleFilled class="icon" />
<div class="des"> 数据买家 </div>
</div>
</div>
<div class="flex">
<div class="tab">
<CheckCircleFilled class="icon" />
<div class="des"> 数据卖家 </div>
</div>
</div>
</div>
</div>
<div class="pe-body platform">
<div class="title"> 平台对接 </div>
<Divider style="margin: 0" />
<div class="p-card">
<div class="field-item">
<div class="label"> PublicKey </div>
<div class="value"> 暂无 </div>
</div>
<div class="field-item">
<div class="label"> SecretKey </div>
<div class="value"> 暂无 </div>
</div>
</div>
</div>
<div class="pe-body platform">
<div class="title"> 账号安全 </div>
<Divider style="margin: 0" />
<div class="p-card">
<div class="field-item">
<div class="label"> 登录密码 </div>
<div class="value flex">
<div>已设置</div>
<a style="margin-left: 15px">修改</a>
</div>
</div>
<div class="field-item">
<div class="label"> 手机号 </div>
<div class="value"> 166****3686 </div>
</div>
</div>
</div>
</div>
</div>
</PageWrapper> </PageWrapper>
</template> </template>
...@@ -24,8 +144,17 @@ ...@@ -24,8 +144,17 @@
Input, Input,
RadioGroup, RadioGroup,
Checkbox, Checkbox,
Row,
Col,
Alert,
} from 'ant-design-vue'; } from 'ant-design-vue';
import { ApiOutlined, PlusOutlined } from '@ant-design/icons-vue'; import {
ApiOutlined,
PlusOutlined,
UserOutlined,
RightOutlined,
CheckCircleFilled,
} from '@ant-design/icons-vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import BasicForm from '@/components/Form/src/BasicForm.vue'; import BasicForm from '@/components/Form/src/BasicForm.vue';
import { FormProps, useForm } from '@/components/Form'; import { FormProps, useForm } from '@/components/Form';
...@@ -36,6 +165,21 @@ ...@@ -36,6 +165,21 @@
} from '@/views/personalCenter/enterpriseCertification/ec.data'; } from '@/views/personalCenter/enterpriseCertification/ec.data';
import { ref } from 'vue'; import { ref } from 'vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { enterpriseList, applicantList } from './personalData';
// 初始化
const router = useRouter();
// 数据
const enterprise = ref({});
const applicant = ref({});
/**
* 方法
*/
function handleAuthentic() {
router.push({
path: '/personalCenter/enterpriseCertification',
});
}
</script> </script>
<style scoped> <style scoped>
...@@ -62,4 +206,103 @@ ...@@ -62,4 +206,103 @@
} }
} }
} }
.pe-body {
background-color: #ffffff;
}
.title {
font-size: 16px;
padding: 20px 30px;
}
.main-left {
display: flex;
flex-direction: column;
gap: 15px;
.main-header {
padding: 10px 30px;
display: flex;
.t-left {
flex: 1;
display: flex;
gap: 10px;
.t-des {
font-size: 18px;
line-height: 32px;
}
.t-icon {
height: 20px;
line-height: 16px;
padding: 2px 8px;
margin-top: 6px;
color: #ffffff;
background-color: #ee3533;
}
}
}
.enterprise-form {
padding: 30px 0 0 3%;
margin-bottom: 30px;
.col-item {
display: flex;
.item-label {
width: 150px;
}
}
}
}
.main-right {
display: flex;
flex-direction: column;
gap: 15px;
.user-info {
padding: 10px 20px;
display: flex;
flex-direction: column;
gap: 20px;
.user-hd {
display: flex;
gap: 10px;
.img {
width: 80px;
height: 80px;
}
.hd-right {
display: flex;
flex-direction: column;
gap: 10px;
justify-content: center;
.user-name {
font-size: 22px;
font-weight: bolder;
}
.user-welcome {
font-size: 16px;
}
}
}
.tab {
border: 1px solid #2ac01d;
padding: 6px 10px;
color: #2ac01d;
display: flex;
gap: 6px;
}
}
.platform {
.p-card {
padding: 20px;
display: flex;
flex-direction: column;
gap: 15px;
}
}
.field-item {
display: flex;
}
.label {
color: #888888;
flex: 1;
}
.value {
}
}
</style> </style>
export const enterpriseList = [
{
label: '企业名称',
field: 'companyName',
},
{
label: '统一社会信用代码',
field: 'code',
},
{
label: '法人',
field: 'leader',
},
{
label: '法人身份证号码',
field: 'leaderNum',
},
{
label: '成立日期',
field: 'buildTime',
},
{
label: '注册资本',
field: 'registerNum',
},
{
label: '经营范围',
field: 'businessRange',
},
{
label: '注册地址',
field: 'registerAddress',
},
{
label: '详细地址',
field: 'detailAddress',
},
{
label: '营业执照',
field: 'license',
},
{
label: '公司LOGO',
field: 'logo',
},
];
export const applicantList = [
{
label: '申办人姓名',
field: 'name',
},
{
label: '申办人电话',
field: 'phone',
},
{
label: '申办人身份证号码',
field: 'idNo',
},
{
label: '身份证正面',
field: 'idCardFront',
},
{
label: '身份证反面',
field: 'idCardReverse',
},
{
label: '企业承诺函',
field: 'letter',
},
{
label: '企业授权文件',
field: 'doc',
},
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment