机构信息
-
北京九思恒源科技有限公司
-
- 雄厚的技术与人才实力,赢得了客户的深厚信赖,获得了政府部门的高度认可,公司先后荣获“全国重合同守信用单位”、“先进施工企业”、“长沙市利税大户”等诸多荣誉称号。与此同时,公司承建的湖南中联重科起重机厂钢结构厂房、三一重工娄底基地车间、北京资源集团宁乡基地车间、双胞胎饲料集团长沙基地厂房、南昌西客站高铁钢结构候客大厅、江西送变电建设中超公司厂房等一大批各类钢结构优质工程,缔造了“鼎盛钢构”卓尔不群的品牌知名度和美誉度。
-
+
{selectedAgent.basicsName}
+
机构证书
-
-
-
-
-
-
+
{renderCertifications(selectedAgent.basicsId)}
- 联系人:XXXXXX
- 联系电话:13888888888
+ 联系人:{selectedAgent.basicsContactPerson}
+ 联系电话:{selectedAgent.basicsContactNumber}
- 联系地址:内蒙古呼和浩特新城区XXXXXX
+ 联系地址:{selectedAgent.basicsAddresss}
@@ -114,15 +203,51 @@ export default function AgentSelect() {
价格种类:
{
- console.log('radio checked', e.target.value);
- setValue(e.target.value);
- }} value={value}>
- 普通件:200
- 加急件:400
-
+ setSelectedPriceValue(e.target.value);
+ }} defaultValue={selectedPriceValue}>{renderPrice(selectedAgent.priceDTOS)}
-
+
>
)
@@ -134,42 +259,38 @@ export default function AgentSelect() {
items={[
{title:
首页},
{title:
创建项目},
- {
- title:
{
- e.preventDefault();
- nav(-1)
- }}>编辑项目
- },
+ {title:
编辑项目},
{title: '找代理'},
]}
/>
-
- {renderAgent()}
-
-
-
-
+
+
+ {renderAgent()}
+
+ {
+ showAgentMoreBtn ? (
+
+
+
+ ) : <>>
+ }
+
-
{renderSelectedAgent()}
+
+
+ {renderSelectedAgent()}
+
+
+
+ {contextHolder}
+ {modalHolder}
>
-
)
}
\ No newline at end of file
diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx
new file mode 100644
index 0000000..38f37ac
--- /dev/null
+++ b/src/route/index/Index.tsx
@@ -0,0 +1,113 @@
+import './index.css';
+import {MouseEvent, Reducer, useReducer} from "react";
+import {Link, useNavigate} from "react-router-dom";
+import {IMenuListItem, IMenuWithTopButton} from "../../interfaces/menu/IMenuWithTopButton.ts";
+import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
+import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
+import ListProj from "../../components/list/ListProj.tsx";
+import ListProjAgent from "../../components/list/ListProjAgent.tsx";
+import {Breadcrumb} from 'antd';
+import {
+ IndexListContext,
+ IndexListDataType,
+ IndexListDispatchContext,
+ ListAction,
+ ListData
+} from "../../context/IndexListContext.ts";
+
+export default function Index() {
+ const nav = useNavigate();
+
+ const listReducer = (state: ListData, action: ListAction) => {
+ if(action.type == IndexListDataType.PROJ) {
+ state.type = IndexListDataType.PROJ;
+ state.status = action.value;
+ } else if(action.type == IndexListDataType.AGENT) {
+ state.type = IndexListDataType.AGENT;
+ state.status = action.value;
+ }
+ return {
+ ...state
+ };
+ }
+
+ const [listData, dispatch] = useReducer>(listReducer, {
+ type: IndexListDataType.PROJ
+ });
+
+ const projMenu: IMenuWithTopButton = {
+ button: {
+ name: '创建项目',
+ handle() {
+ nav('/proj-create')
+ }
+ },
+ list: [
+ {id: 'ALL', name: '全部项目'},
+ {id: 'PROCESSING', name: '进行中的'},
+ {id: 'COMPLETE', name: '已完成的'}
+ ],
+ handleListItem(_e, _index,item: IMenuListItem) {
+ dispatch({
+ type: IndexListDataType.PROJ,
+ value: item.id
+ })
+ }
+ }
+
+ const agentMenu: IMenuWithTopButton = {
+ button: {
+ name: '代理服务',
+ handle() {
+
+ }
+ },
+ list: [
+ {id: 'ALL', name: '全部项目'},
+ {id: 'PROCESSING', name: '进行中的'},
+ {id: 'COMPLETE', name: '已完成的'},
+ ],
+ handleListItem(_e: MouseEvent, _index: number, item: IMenuListItem) {
+ dispatch({
+ type: IndexListDataType.AGENT,
+ value: item.id
+ })
+ }
+ }
+
+ return (
+ <>
+ 首页}
+ ]}
+ />
+
+
+
+
+
+
+
+
+
+ {
+ listData.type === IndexListDataType.PROJ ? : (
+ listData.type == IndexListDataType.AGENT ? : <>>
+ )
+ }
+
+
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/route/index/index.tsx b/src/route/index/index.tsx
deleted file mode 100644
index ff03dc2..0000000
--- a/src/route/index/index.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import './index.css';
-import {MouseEvent, useState} from "react";
-import {Link, useNavigate} from "react-router-dom";
-import {IMenuListItem, IMenuWithTopButton} from "../../interfaces/menu/IMenuWithTopButton.ts";
-import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
-import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
-import ListProj from "../../components/list/ListProj.tsx";
-import ListProjAgent from "../../components/list/ListProjAgent.tsx";
-import {Breadcrumb} from 'antd';
-
-export default function Index() {
- const [listType, setListType] = useState('proj');
- const nav = useNavigate();
- const projMenu: IMenuWithTopButton = {
- button: {
- name: '创建项目',
- handle() {
- nav('/proj-create')
- }
- },
- list: [
- {id: 'proj1', name: '全部项目'},
- {id: 'proj2', name: '进行中的'},
- {id: 'proj3', name: '已完成的'}
- ],
- handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
- console.log(e);
- console.log(index);
- console.log(item)
- setListType('proj');
- }
- }
-
- const agentMenu: IMenuWithTopButton = {
- button: {
- name: '代理服务',
- handle(e: MouseEvent) {
- console.log(e)
- }
- },
- list: [
- {id: 'agent1', name: '全部项目'},
- {id: 'agent2', name: '进行中的'},
- {id: 'agent3', name: '已完成的'},
- ],
- handleListItem(e: MouseEvent, index: number, item: IMenuListItem) {
- console.log(e);
- console.log(index);
- console.log(item)
- setListType('projAgent');
- }
- }
-
- return (
- <>
- 首页}
- ]}
- />
-
-
-
-
-
-
-
{listType === 'proj' ? : }
-
- >
- )
-}
\ No newline at end of file
diff --git a/src/route/proj/ProjEdit.tsx b/src/route/proj/ProjEdit.tsx
index 6502f51..507fc47 100644
--- a/src/route/proj/ProjEdit.tsx
+++ b/src/route/proj/ProjEdit.tsx
@@ -175,7 +175,7 @@ export default function ProjEdit() {
}
const renderData = () => {
- get({
+ get({
messageApi: messageApi,
url: `/api/proj/get/${pathParams.projId}`,
onSuccess({data}) {
@@ -346,10 +346,10 @@ export default function ProjEdit() {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/${pathParams.projId}`)
}}
/>
- {
- nav('/agent-select/2');
+ nav(`/agent-select/${pathParams.projId}`);
}}
/>
diff --git a/src/route/router.tsx b/src/route/router.tsx
new file mode 100644
index 0000000..9279b9c
--- /dev/null
+++ b/src/route/router.tsx
@@ -0,0 +1,134 @@
+import {createBrowserRouter} from "react-router-dom";
+import Index from "../route/index/Index.tsx";
+import ProjCreate from "./proj/ProjCreate.tsx";
+import ProjNew from "./proj/ProjNew.tsx";
+import ProjEdit from "./proj/ProjEdit.tsx";
+import ProjEditStep1 from "./proj/edit/ProjEditStep1.tsx";
+import ProjEditStep1Show from "./proj/edit/ProjEditStep1Show.tsx";
+import ProjEditStep2 from "./proj/edit/ProjEditStep2.tsx";
+import ProjEditStep2Show from "./proj/edit/ProjEditStep2Show.tsx";
+import ProjEditStep3 from "./proj/edit/ProjEditStep3.tsx";
+import ProjEditStep3Show from "./proj/edit/ProjEditStep3Show.tsx";
+import ProjEditStep4 from "./proj/edit/ProjEditStep4.tsx";
+import ProjEditStep4Show from "./proj/edit/ProjEditStep4Show.tsx";
+import ProjEditStep5 from "./proj/edit/ProjEditStep5.tsx";
+import ProjEditStep5Show from "./proj/edit/ProjEditStep5Show.tsx";
+import ProjEditStep6 from "./proj/edit/ProjEditStep6.tsx";
+import ProjEditStep6Show from "./proj/edit/ProjEditStep6Show.tsx";
+import ProjConfigLoginpage from "./proj/edit/ProjConfigLoginpage.tsx";
+import ProjConfigLoginpageShow from "./proj/edit/ProjConfigLoginpageShow.tsx";
+import ProjConfigModList from "./proj/edit/ProjConfigModList.tsx";
+import ProjConfigModListShow from "./proj/edit/ProjConfigModListShow.tsx";
+import ProjConfigModSave from "./proj/edit/ProjConfigModSave.tsx";
+import ProjConfigModEdit from "./proj/edit/ProjConfigModEdit.tsx";
+import ProjConfigModShow from "./proj/edit/ProjConfigModShow.tsx";
+import ProjConfigMenuList from "./proj/edit/ProjConfigMenuList.tsx";
+import ProjConfigMenuListShow from "./proj/edit/ProjConfigMenuListShow.tsx";
+import AgentSelect from "./agent/AgentSelect.tsx";
+
+export const router = createBrowserRouter([
+ {
+ path: '/',
+ element:
+ },
+ {
+ path: '/proj-create',
+ element:
+ },
+ {
+ path: '/proj-new/:projChargeType',
+ element:
+ },
+ {
+ path: '/proj-edit/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step1/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step1-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step2/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step2-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step3/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step3-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step4/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step4-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step5/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step5-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step6/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/step6-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-loginpage/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-loginpage-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-mod-list/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-mod-list-show/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-mod-save/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-mod-edit/:projId/:projModId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-mod-show/:projId/:projModId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-menu-list/:projId',
+ element:
+ },
+ {
+ path: '/proj-edit/config-menu-list-show/:projId',
+ element:
+ },
+ {
+ path: '/agent-select/:projId',
+ element:
+ }
+])
\ No newline at end of file
diff --git a/src/util/AjaxUtils.ts b/src/util/AjaxUtils.ts
index 6e85f3c..1d35610 100644
--- a/src/util/AjaxUtils.ts
+++ b/src/util/AjaxUtils.ts
@@ -4,13 +4,13 @@ import type {MessageInstance} from "antd/es/message/interface";
export const Axios = axios;
export const DevUserId: string = '80d3365e-0597-4988-979e-18ef1c3ec671';
-type Req = {
+type Req = {
messageApi: MessageInstance;
url: string;
body?: any;
config?: AxiosRequestConfig;
onBefore?(): void;
- onSuccess(data: AxiosResponse): void;
+ onSuccess(data: AxiosResponse): void;
onFinally?(): void;
}
@@ -37,7 +37,7 @@ export function uploadFileUrl() {
return `${Axios.defaults?.baseURL}/api/file/v2/upload-file`;
}
-export function get(req: Req) {
+export function get(req: Req) {
req.onBefore?.();
Axios.get(req.url, req.config).then(res => {
req.onSuccess(res);
@@ -56,7 +56,7 @@ export function get(req: Req) {
})
}
-export function post(req: Req) {
+export function post(req: Req) {
req.onBefore?.();
Axios.post(req.url, req.body, req.config).then(res => {
req.onSuccess(res);
@@ -75,7 +75,7 @@ export function post(req: Req) {
})
}
-export function put(req: Req) {
+export function put(req: Req) {
req.onBefore?.();
Axios.put(req.url, req.body, req.config).then(res => {
req.onSuccess(res);
@@ -94,7 +94,7 @@ export function put(req: Req) {
})
}
-export function del(req: Req) {
+export function del(req: Req) {
req.onBefore?.();
Axios.delete(req.url, req.config).then(res => {
req.onSuccess(res);