This commit is contained in:
xixi 2024-07-31 16:00:30 +08:00
parent c8b8f26051
commit d503e448b6
38 changed files with 789 additions and 185 deletions

View File

@ -1,3 +1,7 @@
// 引入Provider
import { Provider } from 'react-redux';
// 引入仓库
import store from './store';
import Head from './layout/head/Head.tsx';
import Body from './layout/body/Body.tsx';
// import Foot from './layout/foot/Foot.tsx';
@ -8,7 +12,7 @@ import {
GlobalDataActionType,
GlobalDispatchContext,
} from "./context/GlobalContext.ts";
import React, {Reducer, useReducer} from "react";
import React, { Reducer, useReducer } from "react";
const App: React.FC = () => {
@ -38,13 +42,15 @@ const App: React.FC = () => {
return (
<>
<GlobalContext.Provider value={globalData}>
<GlobalDispatchContext.Provider value={dispatch}>
<Head/>
<Body/>
{/* <Foot/> */}
</GlobalDispatchContext.Provider>
</GlobalContext.Provider>
<Provider store={store}>
<GlobalContext.Provider value={globalData}>
<GlobalDispatchContext.Provider value={dispatch}>
<Head />
<Body />
{/* <Foot/> */}
</GlobalDispatchContext.Provider>
</GlobalContext.Provider>
</Provider>
</>
);
};

View File

@ -114,7 +114,7 @@ export default function BelongPeople(props: propsInfo) {
const belongRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setauthorName(selectedRows[0].name)
setauthorIdCardType(selectedRows[0].idCardType)
setauthorIdCard(selectedRows[0].idCardNo)
@ -245,7 +245,7 @@ export default function BelongPeople(props: propsInfo) {
setIsLoading(true);
},
onSuccess({ data }: AxiosResponse) {
console.log('所属者表格', data);
// console.log('所属者表格', data);
setTableBelongData(data)
// const selectBelongArray = data.filter(item => item.name === authorName)
// console.log('嘻嘻',selectBelongArray);
@ -267,7 +267,7 @@ export default function BelongPeople(props: propsInfo) {
setIsLoading(true);
},
onSuccess({ data }: AxiosResponse) {
console.log('搜索所属者表格', data);
// console.log('搜索所属者表格', data);
setTableBelongData(data)
},
onFinally() {
@ -367,7 +367,7 @@ export default function BelongPeople(props: propsInfo) {
getProjOwnerList()
listArea('0').then(data => {
console.log('省市1', data);
// console.log('省市1', data);
// data.slice(0, 2).map
const options: Option[] = data.map(item => {
return {
@ -503,7 +503,8 @@ export default function BelongPeople(props: propsInfo) {
<Spin tip="加载中..." spinning={isLoading}>
<div className='belongPeople-bot'>
{/* 表格 */}
{props.isShow ? (<Table
{props.isShow ? (
<Table
rowSelection={{
type: 'radio',
...belongRowSelection,
@ -536,14 +537,14 @@ export default function BelongPeople(props: propsInfo) {
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
<Column
title="操作"
render={(text, record: any) => (
render={(_text, record: any) => (
<Space size="middle">
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setProjOwnerId(record.projOwnerId)
setbelongTitle('编辑所属者')
@ -654,14 +655,14 @@ export default function BelongPeople(props: propsInfo) {
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
<Column
title="操作"
render={(text, record: any) => (
render={(_text, record: any) => (
<Space size="middle">
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setProjOwnerId(record.projOwnerId)
setbelongTitle('编辑所属者')

View File

@ -61,7 +61,7 @@ export default function ContactPeople(props: any) {
messageApi,
url: `/api/proj-contact/list/self`,
onSuccess({ data }: AxiosResponse) {
console.log('联系人表格', data);
// console.log('联系人表格', data);
// setTableBelongData(data)
setTableContactData(data)
}
@ -82,8 +82,8 @@ export default function ContactPeople(props: any) {
// 联系人表格选择触发
const ContantRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
onChange: (_selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setApplyConcatId(selectedRows[0].projContactId)
setapplyContactCsaNo(selectedRows[0].csaNo)
setapplyContactEmail(selectedRows[0].email)
@ -99,13 +99,13 @@ export default function ContactPeople(props: any) {
messageApi,
url: `/api/csa/get`,
onSuccess({ data }: AxiosResponse) {
console.log('随机客服信息二维码', data.casQrCode);
// console.log('随机客服信息二维码', data.casQrCode);
formContact.setFieldsValue({
csaNo: data.csaNo
});
if (data.casQrCode) {
const imgUrl = downloadUrl(data.casQrCode);
console.log('图片地址', imgUrl);
const imgUrl = downloadUrl(data.casQrCode,false);
// console.log('图片地址', imgUrl);
setImgUrl(imgUrl)
}
@ -266,8 +266,8 @@ export default function ContactPeople(props: any) {
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setContactId(record.projContactId)
setContactTitle('编辑联系人')
@ -333,8 +333,8 @@ export default function ContactPeople(props: any) {
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setContactId(record.projContactId)
setContactTitle('编辑联系人')

View File

@ -46,7 +46,7 @@ export default function ProjConfigModEdit(props: idType) {
messageApi,
url: `api/proj-mod/get/${props.id}`,
onSuccess({ data }) {
console.log(data);
// console.log(data);
form.setFieldsValue({
projId: data.projId,
modName: data.modName,
@ -180,18 +180,18 @@ export default function ProjConfigModEdit(props: idType) {
setIsEditModalOpen(false);
// const reg = /^[\u4e00-\u9fa5]+$/; // 中文字符的正则表达式
console.log(((form.getFieldValue('fields'))[0].fieldDesc));
// console.log(((form.getFieldValue('fields'))[0].fieldDesc));
const isChinese =
(form.getFieldValue('fields')).every((item: { fieldDesc: string; }) => {
return /^([\u4e00-\u9fa5a-zA-Z]+)$/.test(item.fieldDesc);
});
console.log(isChinese);
// console.log(isChinese);
if (!isChinese) {
messageApi.error('描述由中文和字母组成')
} else {
console.log(projId);
// console.log(projId);
put({
messageApi,
@ -222,7 +222,7 @@ export default function ProjConfigModEdit(props: idType) {
}
},
onSuccess({ data }) {
console.log('更新',data);
// console.log('更新',data);
props.setUpdata(data)
}
})

View File

@ -73,7 +73,7 @@ export default function ProjConfigLoginpage(props: any) {
},
onSuccess({ data }) {
setIframeSrcDoc(data.data);
console.log(data);
// console.log(data);
}
})
@ -83,7 +83,7 @@ export default function ProjConfigLoginpage(props: any) {
messageApi,
url: '/api/loginpage/list',
onSuccess({ data }) {
console.log('登录页图片列表', data);
// console.log('登录页图片列表', data);
setloginpageArray(data)
// setDefaultId(data[0].loginpageId)
// upLoginPage(data[0].loginpageId)
@ -96,7 +96,7 @@ export default function ProjConfigLoginpage(props: any) {
messageApi,
url: '/api/loginpage/list',
onSuccess({ data }) {
console.log('登录页图片列表', data);
// console.log('登录页图片列表', data);
setloginpageArray(data)
// setDefaultId(data[0].loginpageId)
// upLoginPage(data[0].loginpageId)
@ -130,7 +130,7 @@ export default function ProjConfigLoginpage(props: any) {
messageApi,
url: `/api/proj/get/config-loginpage/${props.projId}`,
onSuccess({ data }) {
console.log('寻找被选中id', data);
// console.log('寻找被选中id', data);
if (data.loginpageId) {
form.setFieldValue('loginpageId', data.loginpageId);
setSelectedLoginpageId(data.loginpageId);
@ -511,7 +511,7 @@ export default function ProjConfigLoginpage(props: any) {
// setLoginpageArray([
// ...loginpageArray
// ])
console.log('选择的id', item.loginpageId);
// console.log('选择的id', item.loginpageId);
form.setFieldValue('loginpageId', item.loginpageId);
preview()
@ -537,7 +537,7 @@ export default function ProjConfigLoginpage(props: any) {
// console.log('发起球球的id',selectedLoginpageId);
setIsEditModalOpen(false);
console.log(logoImgArray)
// console.log(logoImgArray)
put({
messageApi,
url: `/api/proj/update/config-loginpage/${props.projId}`,

View File

@ -71,7 +71,7 @@ export default function ProjConfigLoginpage(props:any) {
},
onSuccess({ data }) {
setIframeSrcDoc(data.data);
console.log(data);
// console.log(data);
}
})
@ -81,7 +81,7 @@ export default function ProjConfigLoginpage(props:any) {
messageApi,
url: '/api/loginpage/list',
onSuccess({ data }) {
console.log('登录页图片列表', data);
// console.log('登录页图片列表', data);
setloginpageArray(data)
// setDefaultId(data[0].loginpageId)
upLoginPage(data[0].loginpageId)
@ -112,7 +112,7 @@ export default function ProjConfigLoginpage(props:any) {
messageApi,
url: `/api/proj/get/config-loginpage/${props.projId}`,
onSuccess({ data }) {
console.log('寻找被选中id', data);
// console.log('寻找被选中id', data);
setSelectedLoginpageId(data.loginpageId);
form.setFieldValue('loginpageId', data.loginpageId);
form.setFieldValue('subTitle', data.subTitle);

View File

@ -663,7 +663,7 @@ export default function AiHelper(props: PropsType) {
<div className='pagination'>
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
console.log(page);
// console.log(page);
// setPage(page)
setloginpageArray([])
getlistLoginpage(page)

View File

@ -55,7 +55,7 @@ export default function AiHelperMod(props: PropsType) {
}, [props.mods, props.newMods]);
useEffect(() => {
if (updata.length != 0) {
console.log('更新数据', updata);
// console.log('更新数据', updata);
setModArray(updata)
}

View File

@ -32,7 +32,7 @@ export default function AiHelperText(props: PropsType) {
messageApi,
url: `/api/proj/get/${pathParams.projId}`,
onSuccess({ data }) {
console.log('其他页面状态判断', data);
// console.log('其他页面状态判断', data);
setStatus(data.generate.generateStatus)
}
})

View File

@ -13,7 +13,7 @@ export default function BalanceHead() {
</div>
<div className="balance" onClick={() => {
console.log('查看余额')
// console.log('查看余额')
}}>{globalContext.user.balance}</div>
</div>
)

View File

@ -14,7 +14,7 @@ export type ImgSelect = {
export default function CardImgSelect(props: ImgSelect) {
const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${props.imgs}`;
console.log(imgSrc)
// console.log(imgSrc)
return (
<div className={props.selected ? 'card-img-select card-img-selected' : 'card-img-select' }
style={{marginRight:'10px',marginBottom:'10px'}}

View File

@ -46,6 +46,16 @@ export default function CardProj(props: any) {
const [displayOrderShowOpen, setDisplayOrderShowOpen] = useState(false)
const data = props.item;
const pkg = data.pay.chargeAdditionals.match(/PKG:(\d+)/);
const video = data.pay.chargeAdditionals.match(/VIDEO_DEMO:(\d+)/);
const URGENT = data.pay.chargeAdditionals.match(/URGENT:(\d+)/);
// 基础服务费
// const basics = data.pay.charge.match(/:(\d+)/);
const pkgValue: number | null = pkg ? parseInt(pkg[1], 10) / 100 : null;
const videoDemoValue: number | null = video ? parseInt(video[1], 10) / 100 : null;
const URGENTvalue: number | null = URGENT ? parseInt(URGENT[1], 10) / 100 : null;
// const basicsValue: number | null = basics ? parseInt(basics[1], 10)/100 : null;
const [projId] = useState(data.projId)
const isShow = data.pay.chargeAdditionals.includes('PKG') || data.pay.charge.includes('ALL')
@ -103,6 +113,11 @@ export default function CardProj(props: any) {
}
setCharge(charge)
setPayCharge(chargeName);
// console.log('额外收费安装包',pkgValue);
// console.log('额外收费视频',videoDemoValue);
// console.log('额外收费加急',URGENTvalue);
// console.log('基础服务费',basicsValue);
}, [])
return (
@ -123,8 +138,25 @@ export default function CardProj(props: any) {
<div className='cp-time'>
{data.gmtCreate}
</div>
</div>
<div style={{ display: payCharge == '全托管' ? 'block' : 'none' }}>
<div className='proj-progress'>
{data.progress == 'DONE' ? '已下证' : data.progress == 'SUBMIT_FOR_REVIEW' ? '已提交版权中心' : data.progress == 'PRODUCTION' ? '正在制作中' : '等待制作中'}
</div>
</div>
{/* <div style={{ display: payCharge !== '' ? 'block' : 'none' }}>
<div className='proj-progress' style={{display:data.progress?'block':'none'}}>
{data.progress == 'DONE' ? '已完成' : data.progress == 'SUBMIT_FOR_REVIEW' ? '已提交版权中心' : data.progress == 'PRODUCTION' ? '正在制作中' : '等待制作中'}
</div>
</div> */}
<div className='cpt-right'>
{
data.generate.generateStatus == GenerateStatus.SUCCESS ? (
<span className="cpt-text-btn">
@ -155,12 +187,12 @@ export default function CardProj(props: any) {
<Carousel autoplay dots={false}>
<div className='cpb-left-imgX'>
<img src={downloadUrl(data.loginpage.loginpagePreviewImgs)} height={'143px'} alt="" />
<img src={downloadUrl(data.loginpage.loginpagePreviewImgs,true)} height={'143px'} alt="" />
</div>
<div className='cpb-left-imgX'>
<img src={downloadUrl(data.codeTypePage.previewImgs)} height={'143px'} alt="" />
<img src={downloadUrl(data.codeTypePage.previewImgs,true)} height={'143px'} alt="" />
</div>
@ -168,9 +200,17 @@ export default function CardProj(props: any) {
</div>
{/* <img src={downloadUrl(data.codeTypePage.previewImgs)} className='cpb-left-img' alt="" /> */}
<div className='cpbl-right'>
<div className='cpbl-money'>
<span className='money'>() : </span>
<span className='num'>{data.pay.payment / 100}</span>
<div style={{ display: 'flex' }}>
<div className='cpbl-money'>
<span className='money'>() : </span>
<span className='num'>{data.pay.payment / 100}</span>
</div>
<div className='otherMoney'>
{/* <div>基础费用:{basicsValue}</div> */}
<Tag color="#f50" style={{ display: URGENTvalue ? 'block' : 'none' }}>:{URGENTvalue}</Tag>
<Tag color="#2db7f5" style={{ display: pkgValue ? 'block' : 'none' }}>:{pkgValue}</Tag>
<Tag color="#87d068" style={{ display: videoDemoValue ? 'block' : 'none' }}>:{videoDemoValue}</Tag>
</div>
</div>
<div className='cpbl-btn'>
<div className='threeBtn' onClick={() => {
@ -245,11 +285,10 @@ export default function CardProj(props: any) {
}
</div>
<div className='cpbc-bot'>
{/* <div className='cpbc-bot'>
<div>
<FolderOutlined />
</div>
{/* 层级 */}
<Dropdown menu={{
items: indexListContext.categorys,
onClick: (e) => {
@ -285,6 +324,9 @@ export default function CardProj(props: any) {
}} />
) : <></>
}
</div> */}
<div className='cpbc-bot' style={{color:'#FFA415'}}>
:{data.apply.authorName }
</div>
</div>
{/* <div className='cline'></div> */}

View File

@ -87,7 +87,22 @@
font-size: 14px;
color: #888888;
}
.proj-progress{
height: 29px;
background: #ff7b00;
/* background: #01a13f; */
border-radius: 5px;
/* font-family: Microsoft YaHei UI; */
font-weight: 400;
font-size: 14px;
color: #ffffff;
text-align: center;
line-height: 29px;
padding-left: 9px;
padding-right: 9px;
margin-left: 19px;
}
.cpt-right {
font-size: 14px;
color: #FFA415;
@ -182,7 +197,17 @@
margin-left: 15px;
}
.otherMoney{
display: flex;
margin-left: 10px;
height: 47px;
/* background-color: #F3F3F3; */
padding: 0 10px;
align-items: center;
/* color: #797979; */
}
.moneyBox{
}
.cpbl-btn {
display: flex;

View File

@ -29,8 +29,11 @@ export default function ListProj() {
// // setKeywords(state.keyword)
// }
const keywords = state ? state.keyword : ''
const name = state ? state.name : ''
const name = state ? state.name : ''
const chargeAdditionals = state? state.chargeAdditionals:''
const progress = state? state.progress:''
const authorId = state? state.authorId:''
// console.log(keywords);
// const images = [syminga,symingb,symingc,symingd]
const listProjRef: MutableRefObject<HTMLDivElement | null> = useRef(null);
@ -51,7 +54,8 @@ export default function ListProj() {
get<IListPage<IProj>>({
messageApi: messageApi,
url: '/api/proj/listpage/self',
// url: '/api/proj/listpage/self',
url: '/api/proj/claim/listpage/self',
config: {
params: {
page: currentPage,
@ -59,6 +63,8 @@ export default function ListProj() {
keywords: keywords,
charge: name,
chargeAdditionals:chargeAdditionals,
progress:progress,
authorId:authorId,
projCategoryId: indexListContext.category,
status: indexListContext.status ? indexListContext.status : getMenuActive()
}
@ -67,6 +73,8 @@ export default function ListProj() {
setIsLoading(true);
},
onSuccess({ data }) {
// console.log('数据',data);
setPage(data.page);
setTotal(data.total);
setProjs(data.rows);
@ -140,28 +148,33 @@ export default function ListProj() {
});
}
const renderCategory = () => {
}
// const renderCategory = () => {
// }
useEffect(() => {
setShowPage(false)
setPage(1)
if (indexListContext.categorys) {
reqData(1);
renderCategory();
}
reqData(1);
// if (indexListContext.categorys) {
// reqData(1);
// renderCategory();
// }
//
// if(!keywords && !name && !chargeAdditionals && !progress && !authorId){
// reqData(1)
// }
setTimeout(() => {
setShowPage(true)
}, 0);
}, [indexListContext.status, keywords, name,chargeAdditionals])
}, [indexListContext.status, keywords, name,chargeAdditionals,progress,authorId])
useEffect(() => {
if (indexListContext.categorys) {
reqData(page);
// if (indexListContext.categorys) {
reqData(page);
renderCategory();
}
// reqData(page);
// // renderCategory();
// }
}, [indexListContext.categoryChangeCount, indexListContext.category])
// const renderStatus = () => {

View File

@ -14,7 +14,7 @@ import NoData from "../../assets/no-data.png";
export default function ListProjAgent() {
const indexListContext = useContext(IndexListContext);
console.log(indexListContext.status);
// console.log(indexListContext.status);
const [messageApi, messageApiHolder] = useMessage();
const listProjRef: MutableRefObject<HTMLDivElement | null> = useRef(null);

View File

@ -31,7 +31,13 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
<li className={item.active ? 'active' : ''} key={item.id} onClick={(e) => {
props.handleListItem(e, index, item);
setMenuActive(item.id)
navugate('/home')
navugate('/home',{
state: {
keyword: props.keywords,
name: props.type,
chargeAdditionals: props.chargeAdditionals,
}
})
}}>
{item.icon ? (<img src={item.icon} className="menu-icon" alt="加载失败" />) : <></>}

View File

@ -9,7 +9,7 @@ export default function StepProjEdit(props: IStepProj) {
useEffect(() => {
// console.log(props);
// location.pathname.includes('/proj-eall')
console.log('路由', location.pathname);
// console.log('路由', location.pathname);
setAllShow(location.pathname.includes('/proj-eall') ? true : false)
}, [])
const height = window.innerHeight - 375;

View File

@ -19,5 +19,7 @@ export interface IMenuWithTopButton {
list: Array<IMenuListItem>;
handleListItem(e: MouseEvent<HTMLLIElement>, index: number, item: IMenuListItem): void;
keywords?:string;
type?:string ;
chargeAdditionals?:string;
}

View File

@ -1,10 +1,11 @@
import './head.css'
import { useDispatch } from 'react-redux'
import BalanceHead from '../../components/balance/BalanceHead.tsx';
import RechargeHead from '../../components/recharge/RechargeHead.tsx';
import { Dropdown, MenuProps, message, Modal, Space, Spin } from "antd";
import { DownOutlined, UserOutlined, KeyOutlined, LogoutOutlined, AccountBookOutlined, MenuFoldOutlined, UsergroupAddOutlined } from "@ant-design/icons";
import { useContext, useEffect, useState } from "react";
import { put } from "../../util/AjaxUtils.ts";
import { put,get} from "../../util/AjaxUtils.ts";
import { GlobalContext, GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
import UserEdit from "../../components/user/UserEdit.tsx";
import PasswordChange from "../../components/password/PasswordChange.tsx";
@ -18,6 +19,29 @@ import BelongPeople from '../../components/BelongPeople/BelongPeople.tsx'
import ContactPeople from '../../components/ContactPeople/ContactPeople.tsx'
export default function Head() {
const dispath = useDispatch()
// 更新所属者表格储存至redux
const upBelongArray = () => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onBefore() {
},
onSuccess(data: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
dispath({
type: 'uparray',
val: data.data
})
},
onFinally() {
}
})
}
const globalContext = useContext(GlobalContext);
const globalDispatchContext = useContext(GlobalDispatchContext);
const [messageApi, contextHolder] = message.useMessage();
@ -54,8 +78,50 @@ export default function Head() {
applyContactPhone: '',
applyContactCompany: ''
})
// const [belongArray,setBelongArray] = useState([])
// // 获取初始所属者数组
// const getLength = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// // setBelongPeopleArray(data.data)
// setBelongArray(data.data )
// },
// onFinally() {
// }
// })
// }
// // 获取更新的所属者数组并且做对比查看是否刷新网页
// const getNewLength = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// // setBelongPeopleArray(data.data)
// console.log('查看结果',data.data != belongArray);
// // if (data.data == belongArray) {
// // window.location.reload();
// // }
// },
// onFinally() {
// }
// })
// }
useEffect(() => {
// getLength()
reloadUser(messageApi, globalDispatchContext).then((data) => {
if (!data.hasUserInfo) {
setIsSelfModalOpen(true);
@ -276,6 +342,8 @@ export default function Head() {
footer={null}
onCancel={() => {
upBelongArray()
// getNewLength()
setBelongModal(false)
}}>

View File

@ -103,7 +103,7 @@ export default function EditModal(props: any) {
);
useEffect(() => {
listArea('0').then(data => {
console.log('省市1', data);
// console.log('省市1', data);
// data.slice(0, 2).map
const options: Option[] = data.map(item => {
return {

View File

@ -19,7 +19,7 @@ export default function SearchList() {
// const [keywords, setKeywords] = useState('');
const [messageApi, contextHolder] = message.useMessage();
const {state} = useLocation()
console.log(state);
// console.log(state);
const reqData = (currentPage: number) => {
get<IListPage<IProj>>({

View File

@ -1,14 +1,20 @@
import './index.css';
// import { MouseEvent, Reducer, useEffect, useReducer, useState, useContext } from "react";
import { MouseEvent, Reducer, useEffect, useReducer, useState } from "react";
import { useSelector, useDispatch } from 'react-redux'
import { useNavigate, useSearchParams, Outlet } from "react-router-dom";
import { IMenuListItem, IMenuWithTopButton } from "../../interfaces/menu/IMenuWithTopButton.ts";
import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
// import ListProj from "../../components/list/ListProj.tsx";
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
import { MenuProps, Select } from 'antd';
import {
MenuProps, Select,
Button,
Pagination,
Empty
} from 'antd';
import {
IndexListContext,
IndexListDataType,
@ -17,25 +23,110 @@ import {
ListData,
} from "../../context/IndexListContext.ts";
import {
MenuFoldOutlined,
ClearOutlined
} from '@ant-design/icons';
import { useLocation } from 'react-router-dom';
import { get } from '../../util/AjaxUtils.ts'
import gpsImg from '../../static/right/gps.png'
import backImg from '../../static/right/back.png'
import { Link } from "react-router-dom";
import { Input, Breadcrumb } from 'antd';
import { Input, Breadcrumb, message } from 'antd';
const { Search } = Input;
export default function Index() {
const dispath = useDispatch()
//redux的belongArray
const redxuState: any = useSelector(state => state)
const belongArray = redxuState.belongArray
// 获取所属者表格储存至redux 更新表格
const getProjOwnerList = () => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onBefore() {
},
onSuccess(data: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
dispath({
type: 'uparray',
val: data.data
})
},
onFinally() {
}
})
}
// 更新数据
// const upBelongArray = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// },
// onFinally() {
// }
// })
// }
// 监听redux的belongArray
// useEffect(()=>{
// },[belongArray])
const [messageApi, contextHolder] = message.useMessage();
// 临时关键字 (过度)
const [nowKeyword, setNowKeyWord] = useState('')
// 关键字
const [keywords, setKeywords] = useState('');
const [type, setType] = useState('')
const [chargeAdditionals,setchargeAdditionals] = useState('')
const [type, setType] = useState<string | null>(null)
const [chargeAdditionals, setchargeAdditionals] = useState<string | null>(null)
const [progress, setprogress] = useState<string | null>(null)
const [authorId, setauthorId] = useState('')
// const indexListContext = useContext(IndexListContext);
// 所属者信息
// const [belongPeopleArray, setBelongPeopleArray] = useState<any[]>([])
const [currentPage, setCurrentPage] = useState(1);
const itemsPerPage = 5;
// 计算总页数
const totalItems = belongArray.length;
const totalPages = Math.ceil(totalItems / itemsPerPage);
// 计算当前页数据的起始和结束索引
const startIndex = (currentPage - 1) * itemsPerPage;
const endIndex = Math.min(startIndex + itemsPerPage, totalItems);
// 提取当前页的数据
const currentPageData = belongArray.slice(startIndex, endIndex);
// 处理页码切换
const handlePageChange = (page: number) => {
if (page >= 1 && page <= totalPages) {
setCurrentPage(page);
}
};
// // 初始化搜索条件
const init = () => {
setNowKeyWord('')
setKeywords('')
setType(null)
setchargeAdditionals(null)
setprogress(null)
}
const nav = useNavigate();
const [searchParams] = useSearchParams();
@ -198,6 +289,8 @@ export default function Index() {
const [pathArray, setPathArray] = useState<any>([])
const [showSearchBox, setShowSearchBox] = useState(true)
useEffect(() => {
// const nowname = sessionStorage.getItem('now')
if (location.pathname.includes('/home')) {
@ -325,43 +418,61 @@ export default function Index() {
})
}
getProjOwnerList()
}, []);
useEffect(() => {
// console.log('监听', '类型:', type, '关键字:', keywords, '额外付费:', chargeAdditionals,'进度:',progress);
// console.log(Boolean(keywords));
// if (location.pathname.includes('/home')) {
if (!keywords && !type && !chargeAdditionals && !progress) {
setKeywords('')
setType('')
setchargeAdditionals('')
setprogress('')
}
if (location.pathname.includes('/home')) {
nav('/home', {
state: {
keyword: keywords,
name: type
name: type,
chargeAdditionals: chargeAdditionals,
progress: progress,
authorId: authorId
}
})
}
// }
}, [type]);
}, [type, chargeAdditionals, keywords, progress, authorId]);
const handleSearch = (value: string) => {
console.log(value);
// console.log(value);
setKeywords(value)
nav('/home', {
state: {
keyword: value,
name: type,
chargeAdditionals:chargeAdditionals,
chargeAdditionals: chargeAdditionals,
progress: progress,
authorId: authorId
}
})
}
const handleChange = (e: any) => {
console.log(e.target.value);
setNowKeyWord(e.target.value)
// console.log(e.target.value);
if (e.target.value == '') {
setKeywords('')
nav('/home', {
state: {
keyword: '',
name: type,
chargeAdditionals:chargeAdditionals,
chargeAdditionals: chargeAdditionals,
progress: progress,
authorId: authorId
}
})
}
@ -373,6 +484,7 @@ export default function Index() {
{title: <Link to={'/'}></Link>}
]}
/> */}
{contextHolder}
<IndexListContext.Provider value={listData} >
<IndexListDispatchContext.Provider value={dispatch}>
<div className="index">
@ -383,8 +495,91 @@ export default function Index() {
button={projMenu.button}
list={projMenu.list}
handleListItem={projMenu.handleListItem}
keywords={keywords}
type={type ? type : ""}
chargeAdditionals={chargeAdditionals ? chargeAdditionals : ""}
/>
<MenuTreeWithTopButton />
<div className='belongPeopleMenu'>
<div className='belongPeopleMenu-title'>
<MenuFoldOutlined style={{ marginLeft: 10, marginRight: 10 }} />
</div>
<div style={{ display: belongArray.length > 0 ? 'block' : 'none' }}>
<div className='belongPeopleMenu-box'>
{
currentPageData.map((item: any) => {
return (
<div className='belongpeopleName' key={item.projOwnerId} onClick={() => {
if (authorId == item.projOwnerId) {
setauthorId('')
nav('/home', {
state: {
keyword: keywords,
name: type,
chargeAdditionals: chargeAdditionals,
progress: progress,
authorId: ''
}
})
} else {
setauthorId(item.projOwnerId)
nav('/home', {
state: {
keyword: keywords,
name: type,
chargeAdditionals: chargeAdditionals,
progress: progress,
authorId: item.projOwnerId
}
})
}
}}
style={{ background: authorId == item.projOwnerId ? '#FF9F08' : '', color: authorId == item.projOwnerId ? '#FFF' : '' }}
title={ item.name} // 添加 title 属性以显示完整文本
>
:{item.name}
</div>
)
})
}
</div>
{/* 分页控件 */}
{/* <div className='pagination-controls'>
<Button
type="primary"
onClick={() => handlePageChange(currentPage - 1)}
disabled={currentPage === 1}
>
</Button>
<Button
type="primary"
onClick={() => handlePageChange(currentPage + 1)}
disabled={currentPage === totalPages}
style={{ marginLeft: 10 }}
>
</Button>
</div> */}
<div className='belong-pagination'>
<Pagination
current={currentPage}
total={totalItems}
pageSize={itemsPerPage}
onChange={handlePageChange} // 页码改变时的回调
className="custom-pagination"
/>
</div>
</div>
<div style={{ display: belongArray.length > 0 ? 'none' : 'block', height: 230 }}>
<div style={{width:230,height:230,display:'flex',alignItems:'center',justifyContent:'center'}}>
<Empty
description="暂无数据"
/>
</div>
</div>
</div>
{/* <MenuTreeWithTopButton /> */}
{/* <MenuWithBottomButtom
button={agentMenu.button}
list={agentMenu.list}
@ -425,6 +620,7 @@ export default function Index() {
}}
></div>
<Search placeholder="输入项目名称"
value={nowKeyword}
onSearch={handleSearch}
onChange={handleChange}
style={{
@ -434,6 +630,8 @@ export default function Index() {
}}
/>
<Select
value={type}
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
@ -443,22 +641,26 @@ export default function Index() {
nav('/home', {
state: {
keyword: keywords,
chargeAdditionals:chargeAdditionals,
name: value
chargeAdditionals: chargeAdditionals,
name: value,
progress: progress,
authorId: authorId
}
})
}}
options={[
{ value: '', label: '全部类型' },
// { value: '', label: '全部类型' },
{ value: 'FREE', label: '免费试用' },
{ value: 'MATERIAL', label: '写材料' },
{ value: 'ALL', label: '全托管' },
]}
defaultValue=""
// placeholder={'选择类型'}
// defaultValue=""
placeholder={'选择类型'}
/>
<Select
<Select
value={chargeAdditionals}
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
@ -470,20 +672,57 @@ export default function Index() {
state: {
keyword: keywords,
name: type,
chargeAdditionals:value
chargeAdditionals: value,
progress: progress,
authorId: authorId
}
})
}}
options={[
{ value: '', label: '选择拓展收费' },
// { value: '', label: '全部项目' },
{ value: 'PKG', label: '安装包' },
{ value: 'VIDEO_DEMO', label: '演示视频' },
{ value: 'URGENT', label: '加急' },
]}
defaultValue=""
// placeholder={'选择类型'}
// defaultValue=""
placeholder={'选择拓展收费'}
/>
<Select
value={progress}
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
setprogress(value)
// alert(`selected ${value}`)
// lyp
nav('/home', {
state: {
keyword: keywords,
name: type,
chargeAdditionals: chargeAdditionals,
progress: value,
authorId: authorId
}
})
}}
options={[
{ value: 'PRODUCTION', label: '正在制作中' },
{ value: 'SUBMIT_FOR_REVIEW', label: '已提交版权中心' },
{ value: 'DONE', label: '已下证' },
]}
placeholder={'选择全托管制作进度'}
/>
<Button onClick={() => {
init()
}} style={{ marginLeft: 10, display: location.pathname.includes('/home') ? 'block' : 'none', height: 31 }} type="primary" icon={<ClearOutlined />}>
</Button>
<div style={{
width: '253px',
height: '31px',

View File

@ -4,7 +4,8 @@
/* margin-top: 74px; */
display: flex;
}
.leftbox{
.leftbox {
width: 250px;
height: calc(100vh - 65px);
/* background-color: red; */
@ -14,6 +15,7 @@
overflow: auto;
}
.index .left {
/* position: fixed; */
/* width: 267px; */
@ -23,7 +25,51 @@
/* top: 65px; */
/* left: 0; */
background-color: var(--color-light);
}
.belongPeopleMenu {
/* background-color: pink; */
}
.belongPeopleMenu-title {
background-color: #FFFBEF;
border-top: 1px solid #fde9ab;
border-bottom: 1px solid #fde9ab;
height: 56px;
color: #FFAF22;
font-size: 18px;
display: flex;
align-items: center;
/* justify-content: center; */
}
.belongPeopleMenu-box {
min-height: 200px;
/* background-color: pink; */
border-bottom: 1px solid #fde9ab;
}
.belongpeopleName {
color: #313131;
width:230px;
height:40px;
text-align: center;
font-size: 16px;
padding: 10px;
box-sizing: border-box;
overflow: hidden;
text-wrap: nowrap;
text-overflow: ellipsis;
cursor: pointer;
}
.pagination-controls {
/* background-color: skyblue; */
display: flex;
justify-content: center;
}
.index .right {
@ -31,10 +77,11 @@
box-sizing: border-box;
height: 100%;
position: fixed;
width:calc(100vw - 270px);
width: calc(100vw - 270px);
/* width: 1575px; */
}
.index .right .top{
.index .right .top {
/* margin-top: 11px; */
box-sizing: border-box;
height: 62px;
@ -44,17 +91,20 @@
border-bottom: 1px solid var(--color-border);
background-color: var(--color-light);
}
.index .right .top .gps {
display: flex;
align-items: center;
font-size: 14px;
}
.index .right .top .gps img {
width: 18px;
height: 21px;
margin-left: 22px;
margin-right: 16px;
}
.index .right .top .line {
width: 1px;
height: 23px;
@ -62,12 +112,13 @@
margin-left: 33px;
margin-right: 31px;
}
.nowPosition {
display: flex;
align-items: center;
/* width: 349px; */
height: 100%;
margin-left: 98px;
/* margin-left: 98px; */
font-weight: 300;
font-size: 13px;
color: #676767;
@ -75,14 +126,36 @@
/* background-color: rgb(228, 191, 191); */
position: relative;
}
.nowPosition img{
.nowPosition img {
width: 349px;
height: 62px;
position: absolute;
left: 0;
top: 0;
}
.nowPosition div{
.nowPosition div {
margin-left: 133px;
z-index: 99;
}
/* 所属人分页 */
.belong-pagination{
display: flex;
justify-content: flex-end;
margin-top: 5px;
/* background-color: skyblue; */
}
/* 设置分页不显示页码 */
.custom-pagination .ant-pagination-item,
.custom-pagination .ant-pagination-jump-prev,
.custom-pagination .ant-pagination-jump-next,
.custom-pagination .ant-pagination-options-size-changer,
.custom-pagination .ant-pagination-options-quick-jumper {
display: none !important;
}
.custom-pagination .ant-pagination-prev,
.custom-pagination .ant-pagination-next {
display: inline-block;
}

View File

@ -46,14 +46,14 @@ export default function ProjCreate() {
messageApi: messageApi,
url: '/api/env/custom/get-proj-create-notice',
onSuccess({ data }) {
console.log('广告', data);
// console.log('广告', data);
setAd(data.data)
setShow(data.data == '' ? false : true)
}
})
// sessionStorage.setItem('pathArray', JSON.stringify([ { title: <Link to={'/home'}>首页</Link> },{ title: '创建项目' }]));
// sessionStorage.setItem('now', '创建');
console.log(allInfo);
// console.log(allInfo);
}
useEffect(() => {
get<any>({
@ -61,7 +61,7 @@ export default function ProjCreate() {
url: '/api/proj/charge/get',
onSuccess({ data }) {
setCharge(data.additional);
console.log("创建数据", data);
// console.log("创建数据", data);
// console.log(charge.projTypes[0].price);
setAllInfo(data.projTypes[0])
setMaterialInfo(data.projTypes[1])
@ -72,7 +72,7 @@ export default function ProjCreate() {
})
// sessionStorage.setItem('pathArray', JSON.stringify([ { title: <Link to={'/home'}>首页</Link> },{ title: '创建项目' }]));
// sessionStorage.setItem('now', '创建');
console.log(allInfo);
// console.log(allInfo);
getAd()
}, [])

View File

@ -1,4 +1,5 @@
import './proj-edit.css';
import { useDispatch } from 'react-redux'
// import {Link, useNavigate, useParams} from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import {
@ -45,6 +46,29 @@ type ProjModType = {
}
export default function ProjEdit() {
const dispath = useDispatch()
// 更新所属者表格储存至redux
const upBelongArray = () => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onBefore() {
},
onSuccess(data: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
dispath({
type: 'uparray',
val: data.data
})
},
onFinally() {
}
})
}
//第一步 标题简介弹窗
const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false)
const [titleIntroductionShowOpen, setTitleIntroductionShowOpen] = useState(false)
@ -97,7 +121,7 @@ export default function ProjEdit() {
// const height = window.innerHeight - 240;
const renderEditStep = (data: any, isEdited: boolean, isGenerateSuccess: boolean) => {
console.log('嘻嘻', data);
// console.log('嘻嘻', data);
// projIntroduction
const editStepArray: IProjEdit[] = [];
editStepArray.push(
@ -279,7 +303,7 @@ export default function ProjEdit() {
messageApi: messageApi,
url: `/api/proj/get/${pathParams.projId}`,
onSuccess({ data }) {
console.log('状态判断', data.pay.chargeAdditionals);
// console.log('状态判断', data.pay.chargeAdditionals);
// setShowZpi(true)
const isShow = data.pay.chargeAdditionals.includes('PKG')
// console.log(isShow);
@ -359,7 +383,7 @@ export default function ProjEdit() {
},
onSuccess({ data }) {
console.log('模块信息', data);
// console.log('模块信息', data);
// setListMods(data)
if (data.length > 0) {
setAiHelperModalOpen(false);
@ -724,6 +748,7 @@ export default function ProjEdit() {
width={1500}
destroyOnClose={true}
onCancel={() => {
upBelongArray()
setSoftwareOpen(false);
// setTimeout(() => {
// props.closeModal()
@ -736,6 +761,7 @@ export default function ProjEdit() {
footer={null}
>
<SoftwareInfo closeModal={() => {
upBelongArray()
setSoftwareOpen(false)
renderData()
}}></SoftwareInfo>

View File

@ -97,11 +97,11 @@ export default function ProjEditAll() {
return true; // 允许上传文件
},
onChange: (info) => {
console.log(info.fileList);
// console.log(info.fileList);
if (info.file.status === 'done') {
message.success('上传成功');
// info.file.name = '协议文件';
console.log('列表', info.file);
// console.log('列表', info.file);
setUploadedFiles([...uploadedFiles, info.file]); // 将上传成功的文件信息添加到列表中
// setUploadSignFileId(info.file.response.data.fileId);
@ -112,7 +112,7 @@ export default function ProjEditAll() {
},
// action={uploadFileUrl()}
onRemove: (info) => {
console.log('删除', info);
// console.log('删除', info);
setUploadedFiles(prevFiles => prevFiles.filter(prevFile => prevFile.uid !== info.uid));
}
};
@ -173,7 +173,7 @@ export default function ProjEditAll() {
// const height = window.innerHeight - 240;
const renderEditStep = (data: any, isEdited: boolean) => {
console.log('嘻嘻', data);
// console.log('嘻嘻', data);
// projIntroduction
const editStepArray: IProjEdit[] = [];
editStepArray.push(
@ -353,10 +353,10 @@ export default function ProjEditAll() {
// url: `/api/proj/get/${pathParams.projId}`,
url: `/api/proj/claim/get/${pathParams.projId}`,
onSuccess({ data }) {
console.log('嘻嘻', data);
// console.log('嘻嘻', data);
setcertificate(data.certificates)
setprogress(data.progress)
console.log('状态判断', data.pay.chargeAdditionals);
// console.log('状态判断', data.pay.chargeAdditionals);
// setShowZpi(true)
// const isShow = data.pay.chargeAdditionals.includes('PKG')
// console.log(isShow);
@ -405,7 +405,7 @@ export default function ProjEditAll() {
messageApi: messageApi,
url: `/api/proj/materials/add/listpage/${pathParams.projId}`,
onSuccess({ data }) {
console.log('问题列表', data);
// console.log('问题列表', data);
setQuestionList(data.rows)
// console.log(JSON.parse(data.rows[0].aFiles));
@ -1009,9 +1009,9 @@ export default function ProjEditAll() {
open={replyModal}
width={800}
onOk={() => {
console.log('上传文件', uploadedFiles);
// console.log('上传文件', uploadedFiles);
// return
console.log('上传信息', aContent)
// console.log('上传信息', aContent)
if (aContent == '') {
messageApi.open({
type: 'error',

View File

@ -1,4 +1,5 @@
import './proj-edit.css';
import { useDispatch } from 'react-redux'
import { useNavigate, useParams } from "react-router-dom";
import { Button, message, Modal } from "antd";
import StepProjEdit from "../../components/step/StepProjEdit.tsx";
@ -39,6 +40,29 @@ type ProjModType = {
}
export default function ProjEdit() {
const dispath = useDispatch()
// 更新所属者表格储存至redux
const upBelongArray = () => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onBefore() {
},
onSuccess(data: any) {
// console.log('所属者表格', data.data);
// setBelongPeopleArray(data.data)
// 存redux的belongArray
dispath({
type: 'uparray',
val: data.data
})
},
onFinally() {
}
})
}
const height = window.innerHeight - 180;
const [aiHelperModalOpen, setAiHelperModalOpen] = useState(false);
const [isGenerateModalOpen, setIsGenerateModalOpen] = useState(false);
@ -82,6 +106,46 @@ export default function ProjEdit() {
const [generateEmainingTime, setGenerateEmainingTime] = useState(0);
// const height = window.innerHeight - 240;
const [generateErrorModal, setGenerateErrorModal] = useState(false);
// const [length,setLength] = useState(0)
// // 获取初始所属者数组长度
// const getLength = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// // setBelongPeopleArray(data.data)
// setLength((data.data).length )
// },
// onFinally() {
// }
// })
// }
// // 获取更新的所属者数组长度并且做对比查看是否刷新网页
// const getNewLength = () => {
// get({
// messageApi,
// url: `/api/proj-owner/list/self`,
// onBefore() {
// },
// onSuccess(data: any) {
// // console.log('所属者表格', data.data);
// // setBelongPeopleArray(data.data)
// if ((data.data).length != length) {
// window.location.reload();
// }
// },
// onFinally() {
// }
// })
// }
// 查看ai是否关闭
const getListMods = () => {
get<any>({
@ -96,7 +160,7 @@ export default function ProjEdit() {
},
onSuccess({ data }) {
console.log('模块信息', data);
// console.log('模块信息', data);
// setListMods(data)
if (data.length > 0) {
setAiHelperModalOpen(false);
@ -378,6 +442,7 @@ export default function ProjEdit() {
useEffect(() => {
renderData();
getAiData()
// getLength()
}, [])
return (
@ -675,6 +740,7 @@ export default function ProjEdit() {
width={1500}
destroyOnClose={true}
onCancel={() => {
upBelongArray()
setSoftwareOpen(false);
// setTimeout(() => {
// props.closeModal()
@ -687,6 +753,7 @@ export default function ProjEdit() {
footer={null}
>
<SoftwareInfo closeModal={() => {
upBelongArray()
setSoftwareOpen(false)
renderData()
}}></SoftwareInfo>

View File

@ -84,7 +84,7 @@ export default function ProjNew() {
messageApi: messageApi,
url: '/api/proj/charge/get',
onSuccess({ data }) {
console.log(data);
// console.log(data);
const charge = data as any;
// console.log('创建页price',charge.proj.materialAgent);
@ -119,19 +119,19 @@ export default function ProjNew() {
if (pkg) {
price += charge.additional.pkg;
oldlistProjChargeAdditional.push(ProjAdditionalType.PKG);
console.log(listProjChargeAdditional);
// console.log(listProjChargeAdditional);
}
if (videoDemo) {
price += charge.additional.videoDemo;
oldlistProjChargeAdditional.push(ProjAdditionalType.VIDEO_DEMO);
console.log(listProjChargeAdditional);
// console.log(listProjChargeAdditional);
}
if(urgent){
price += charge.additional.urgent;
oldlistProjChargeAdditional.push(ProjAdditionalType.URGENT);
console.log(listProjChargeAdditional);
// console.log(listProjChargeAdditional);
}
setChargePrice(price);
setlistProjChargeAdditional(oldlistProjChargeAdditional)

View File

@ -18,7 +18,7 @@ import {
} from "antd";
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { DevUserId, get, downloadUrl, put, uploadImageUrl, post, Axios } from "../../../util/AjaxUtils.ts";
import { DevUserId, get, downloadUrl, put, uploadImageUrl, post } from "../../../util/AjaxUtils.ts";
import { Button, Form } from 'antd';
// import CardImgSelect, { } from "../../../components/card/CardImgSelect.tsx";
@ -94,7 +94,7 @@ export default function ProjConfigLoginpage(props: any) {
}
},
onSuccess({ data }) {
console.log('登录页图片列表', data);
// console.log('登录页图片列表', data);
setloginpageArray(data.rows)
// setDefaultId(data[0].loginpageId)
// upLoginPage(data[0].loginpageId)
@ -164,7 +164,7 @@ export default function ProjConfigLoginpage(props: any) {
messageApi,
url: `/api/proj/get/config-loginpage/${projId}`,
onSuccess({ data }) {
console.log('数据', data);
// console.log('数据', data);
// if(data.adminPassword adminUsername)
form.setFieldValue('adminUsername', data.adminUsername ? data.adminUsername : 'admin');
form.setFieldValue('adminPassword', data.adminPassword ? data.adminPassword : 'admin');
@ -570,7 +570,7 @@ export default function ProjConfigLoginpage(props: any) {
}}>
{/* src={`${Axios.defaults?.baseURL}/route/file/v2/download/true/${previewImgs}`} */}
<img src={downloadUrl(selectImgs)} alt="" width={'93%'} height={'97%'} />
<img src={downloadUrl(selectImgs,false)} alt="" width={'93%'} height={'97%'} />
</div>
</div>
@ -590,7 +590,7 @@ export default function ProjConfigLoginpage(props: any) {
// console.log('发起球球的id',selectedLoginpageId);
setIsEditModalOpen(false);
console.log(logoImgArray)
// console.log(logoImgArray)
put({
messageApi,
url: `/api/proj/update/config-loginpage/${projId}`,
@ -661,7 +661,7 @@ export default function ProjConfigLoginpage(props: any) {
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'flex-start', flexWrap: 'wrap', marginTop: 10, }}>
{
loginpageArray.map((item) => {
const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
// const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
return (
<div key={item.loginpageId} className={item.loginpageId == modalId ? 'page-img-select page-img-selected' : 'page-img-select'}
style={{ marginRight: '10px', marginBottom: '10px',height:270 }}
@ -672,7 +672,7 @@ export default function ProjConfigLoginpage(props: any) {
>
<div className="page-img" >
<Image
src={imgSrc}
src={downloadUrl(item.previewImgs, false)}
preview={false} width={500} height={270} />
</div>
<div className="page-title">
@ -688,7 +688,7 @@ export default function ProjConfigLoginpage(props: any) {
<div className='pagination'>
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
console.log(page);
// console.log(page);
// setPage(page)
setloginpageArray([])
getlistLoginpage(page)

View File

@ -75,7 +75,7 @@ export default function ProjConfigLoginpage(props:any) {
},
onSuccess({ data }) {
setIframeSrcDoc(data.data);
console.log(data);
// console.log(data);
}
})
@ -85,7 +85,7 @@ export default function ProjConfigLoginpage(props:any) {
messageApi,
url: '/api/loginpage/list',
onSuccess({ data }) {
console.log('登录页图片列表', data);
// console.log('登录页图片列表', data);
setloginpageArray(data)
// setDefaultId(data[0].loginpageId)
upLoginPage(data[0].loginpageId)
@ -132,7 +132,7 @@ export default function ProjConfigLoginpage(props:any) {
messageApi,
url: `/api/proj/get/config-loginpage/${projId}`,
onSuccess({ data }) {
console.log('寻找被选中id', data);
// console.log('寻找被选中id', data);
setSelectedLoginpageId(data.loginpageId);
form.setFieldValue('loginpageId', data.loginpageId);
form.setFieldValue('subTitle', data.subTitle);
@ -523,7 +523,7 @@ export default function ProjConfigLoginpage(props:any) {
// console.log('发起球球的id',selectedLoginpageId);
setIsEditModalOpen(false);
console.log(logoImgArray)
// console.log(logoImgArray)
put({
messageApi,
url: `/api/proj/update/config-loginpage/${pathParams.projId}`,

View File

@ -195,7 +195,7 @@ export default function ProjConfigModEdit(props: PropsType) {
setIsEditModalOpen(false);
// const reg = /^[\u4e00-\u9fa5]+$/; // 中文字符的正则表达式
console.log(((form.getFieldValue('fields'))));
// console.log(((form.getFieldValue('fields'))));
const isChinese =

View File

@ -2,9 +2,9 @@ import './proj-edit-step.css';
import { Col, Flex, message, Modal, Row, Spin, Pagination, Image } from "antd";
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { get, put, Axios } from "../../../util/AjaxUtils.ts";
import { get, put,downloadUrl } from "../../../util/AjaxUtils.ts";
import { Button, Form, Input } from 'antd';
import { AxiosResponse } from "axios";
import { AxiosResponse, } from "axios";
import { errorImage } from "../../../util/CommonUtil.ts";
// import { useRowStyle } from 'antd/es/grid/style/index';
@ -56,7 +56,7 @@ export default function ProjEditStep1(props: any) {
}
},
onSuccess(data: any) {
console.log(data);
// console.log(data);
settotal(data.data.total)
setpageImgArray(data.data.rows)
}
@ -80,7 +80,7 @@ export default function ProjEditStep1(props: any) {
messageApi,
url: `/api/proj/get/edit-step1/${pathParams.projId}`,
onSuccess({ data }: AxiosResponse) {
console.log(data);
// console.log(data);
form.setFieldsValue({
projName: data.projName,
@ -158,7 +158,8 @@ export default function ProjEditStep1(props: any) {
<div className='pageImg' onClick={openPageImgModal} style={{ width: 300, height: 150 }}>
{/* <img src={`${Axios.defaults?.baseURL}/route/file/v2/download/true/${codeTypePageId}`} alt="" /> */}
<Image
src={`${Axios.defaults?.baseURL}/route/file/v2/download/true/${previewImgs}`}
// src={`${Axios.defaults?.baseURL}/route/file/v2/download/true/${previewImgs}`}
src={downloadUrl(previewImgs, false)}
fallback={errorImage}
preview={false} width={300} height={150} />
</div>
@ -291,7 +292,7 @@ export default function ProjEditStep1(props: any) {
width={1070}
style={{ position: 'relative' }}
onOk={() => {
console.log(codeTypePageId);
// console.log(codeTypePageId);
init()
// getData()
@ -323,7 +324,7 @@ export default function ProjEditStep1(props: any) {
<div style={{ height: `${height - 80}px`, overflow: 'auto', display: 'flex', justifyContent: 'flex-start', flexWrap: 'wrap', marginTop: 10, }}>
{
pageImgArray.map((item) => {
const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
// const imgSrc = `${Axios.defaults?.baseURL}/route/file/v2/download/true/${item.previewImgs}`;
return (
<div key={item.codeTypePageId} className={item.codeTypePageId == selectedId ? 'page-img-select page-img-selected' : 'page-img-select'}
style={{ marginRight: '10px', marginBottom: '10px' ,height:250}}
@ -334,7 +335,8 @@ export default function ProjEditStep1(props: any) {
>
<div className="page-img" >
<Image
src={imgSrc}
// src={imgSrc}
src={downloadUrl(item.previewImgs, false)}
fallback={errorImage}
preview={false} width={500} height={250} />
</div>
@ -351,7 +353,7 @@ export default function ProjEditStep1(props: any) {
<div className='pagination'>
{/* defaultCurrent: 默认当前页数 total:数据总数 defaultPageSize:'页面显示几条' */}
<Pagination defaultCurrent={1} total={total} defaultPageSize={10} onChange={(page) => {
console.log(page);
// console.log(page);
setpage(page)
setpageImgArray([])
getPageImgData(page)

View File

@ -125,8 +125,8 @@ export default function ProjEditStep2(props: any) {
// 所属者表格选择触发
const belongRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
onChange: (_selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setauthorName(selectedRows[0].name)
setauthorIdCardType(selectedRows[0].idCardType)
setauthorIdCard(selectedRows[0].idCardNo)
@ -145,8 +145,8 @@ export default function ProjEditStep2(props: any) {
// 联系人表格选择触发
const ContantRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
onChange: (_selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setApplyConcatId(selectedRows[0].projContactId)
setapplyContactCsaNo(selectedRows[0].csaNo)
setapplyContactEmail(selectedRows[0].email)
@ -267,7 +267,7 @@ export default function ProjEditStep2(props: any) {
setapplyContactCompany(data.applyContactCompany)
setapplyContactCsaNo(data.applyContactCsaNo)
setapplyContactEmail(data.applyContactEmail)
console.log('基本信息', data);
// console.log('基本信息', data);
setAuthorId(data.authorId)
setApplyConcatId(data.applyContactId)
formInfo.setFieldsValue({
@ -281,28 +281,29 @@ export default function ProjEditStep2(props: any) {
}
})
}
// 获取所属者表格
const getProjOwnerList = () => {
get({
messageApi,
url: `/api/proj-owner/list/self`,
onSuccess({ data }: AxiosResponse) {
console.log('所属者表格', data);
setTableBelongData(data)
// const selectBelongArray = data.filter(item => item.name === authorName)
// console.log('嘻嘻',selectBelongArray);
// setSelectedRowKeys(selectBelongArray)
}
})
}
// 获取联系人表格
const getProjContactList = () => {
get({
messageApi,
url: `/api/proj-contact/list/self`,
onSuccess({ data }: AxiosResponse) {
console.log('联系人表格', data);
// console.log('联系人表格', data);
// setTableBelongData(data)
setTableContactData(data)
}
@ -314,7 +315,7 @@ export default function ProjEditStep2(props: any) {
messageApi,
url: `/api/proj-owner/list/self?keywords=${keywords}&type=${type}`,
onSuccess({ data }: AxiosResponse) {
console.log('搜索所属者表格', data);
// console.log('搜索所属者表格', data);
setTableBelongData(data)
}
})
@ -413,13 +414,13 @@ export default function ProjEditStep2(props: any) {
messageApi,
url: `/api/csa/get`,
onSuccess({ data }: AxiosResponse) {
console.log('随机客服信息二维码', data.casQrCode);
// console.log('随机客服信息二维码', data.casQrCode);
formContact.setFieldsValue({
csaNo: data.csaNo
});
if (data.casQrCode) {
const imgUrl = downloadUrl(data.casQrCode);
console.log('图片地址', imgUrl);
const imgUrl = downloadUrl(data.casQrCode,false);
// console.log('图片地址', imgUrl);
setImgUrl(imgUrl)
}
@ -495,7 +496,7 @@ export default function ProjEditStep2(props: any) {
getProjOwnerList()
getProjContactList()
listArea('0').then(data => {
console.log('省市1', data);
// console.log('省市1', data);
// data.slice(0, 2).map
const options: Option[] = data.map(item => {
return {
@ -760,8 +761,8 @@ export default function ProjEditStep2(props: any) {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setProjOwnerId(record.projOwnerId)
setbelongTitle('编辑所属者')
@ -907,8 +908,8 @@ export default function ProjEditStep2(props: any) {
<a onClick={() => {
// alert(record.projOwnerId);
console.log('text:', text);
console.log('record:', record);
// console.log('text:', text);
// console.log('record:', record);
setContactId(record.projContactId)
setContactTitle('编辑联系人')

View File

@ -119,7 +119,7 @@ export default function ProjEditStep2() {
const belongRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: BelongDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setauthorName(selectedRows[0].name)
setauthorIdCardType(selectedRows[0].idCardType)
setauthorIdCard(selectedRows[0].idCardNo)
@ -139,7 +139,7 @@ export default function ProjEditStep2() {
const ContantRowSelection = {
// selectedRowKeys: React.Key[]
onChange: (selectedRowKeys: React.Key[], selectedRows: ContactDataType[]) => {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
setApplyConcatId(selectedRows[0].projContactId)
setapplyContactCsaNo(selectedRows[0].csaNo)
setapplyContactEmail(selectedRows[0].email)
@ -255,7 +255,7 @@ export default function ProjEditStep2() {
setapplyContactPhone(data.applyContactPhone)
setapplyContactCsaNo(data.applyContactCsaNo)
setapplyContactEmail(data.applyContactEmail)
console.log('基本信息', data);
// console.log('基本信息', data);
setAuthorId(data.authorId)
setApplyConcatId(data.applyContactId)
formInfo.setFieldsValue({
@ -274,7 +274,7 @@ export default function ProjEditStep2() {
messageApi,
url: `/api/proj-owner/list/self`,
onSuccess({ data }: AxiosResponse) {
console.log('所属者表格', data);
// console.log('所属者表格', data);
setTableBelongData(data)
// const selectBelongArray = data.filter(item => item.name === authorName)
// console.log('嘻嘻',selectBelongArray);
@ -289,7 +289,7 @@ export default function ProjEditStep2() {
messageApi,
url: `/api/proj-contact/list/self`,
onSuccess({ data }: AxiosResponse) {
console.log('联系人表格', data);
// console.log('联系人表格', data);
// setTableBelongData(data)
setTableContactData(data)
}
@ -301,7 +301,7 @@ export default function ProjEditStep2() {
messageApi,
url: `/api/proj-owner/list/self?keywords=${keywords}&type=${type}`,
onSuccess({ data }: AxiosResponse) {
console.log('搜索所属者表格', data);
// console.log('搜索所属者表格', data);
setTableBelongData(data)
}
})
@ -395,13 +395,13 @@ export default function ProjEditStep2() {
messageApi,
url: `/api/csa/get`,
onSuccess({ data }: AxiosResponse) {
console.log('随机客服信息二维码', data.casQrCode);
// console.log('随机客服信息二维码', data.casQrCode);
formContact.setFieldsValue({
csaNo: data.csaNo
});
if (data.casQrCode) {
const imgUrl = downloadUrl(data.casQrCode);
console.log('图片地址', imgUrl);
// console.log('图片地址', imgUrl);
setImgUrl(imgUrl)
}

View File

@ -37,7 +37,7 @@ export default function ProjEditStep3(props:any) {
url: `/api/proj/get/edit-step3/${pathParams.projId}`,
onSuccess({ data }: AxiosResponse) {
// resolve(data);
console.log('获取页面信息', data);
// console.log('获取页面信息', data);
setenvHardDev(data.envHardDev)
setenvHardProd(data.envHardProd)
setenvIndustry(data.envIndustry)
@ -143,7 +143,7 @@ export default function ProjEditStep3(props:any) {
url: `/api/proj/dict/get-industry`,
onSuccess({ data }: AxiosResponse) {
// resolve(data);
console.log('面向领域', data);
// console.log('面向领域', data);
setenvIndustry(data.data)
}
})

View File

@ -35,7 +35,7 @@ export default function ProjEditStep3() {
url: `/api/proj/get/edit-step3/${pathParams.projId}`,
onSuccess({ data }: AxiosResponse) {
// resolve(data);
console.log('获取页面信息', data);
// console.log('获取页面信息', data);
setenvHardDev(data.envHardDev)
setenvHardProd(data.envHardProd)
setenvIndustry(data.envIndustry)

View File

@ -60,7 +60,7 @@ export default function ProjEditStep4() {
messageApi,
url: `/api/proj/get/edit-step4/${pathParams.projId}`,
onSuccess({data}: AxiosResponse) {
console.log(data);
// console.log(data);
form.setFieldsValue({
authorName: data.authorName,

33
src/store/index.ts Normal file
View File

@ -0,0 +1,33 @@
import {createStore} from "redux"
// 设置数据
const baseState = {
msg:'嘻嘻嘻嘻嘻嘻',
num:10,
shuju:{
name:'小白',
hobby:'吃饭',
val:''
},
belongArray:[]
}
// 创建仓库
const reducer = (state = baseState,action:any)=>{
const nstate:any = JSON.parse(JSON.stringify(state))
if(action.type=="numadd"){
nstate.num++
// console.log('123');
}
if(action.type=='new'){
nstate.shuju.val = action.val
console.log(nstate.shuju.val);
}
// redux 要求 state必须深拷贝一次 才能返回
if(action.type == 'uparray'){
nstate.belongArray = action.val
}
return nstate
}
const store = createStore(reducer)
export default store