This commit is contained in:
lyp 2025-04-03 15:32:34 +08:00
parent 6cec1c6572
commit 91caf756bd

View File

@ -395,6 +395,7 @@ export default function ProjNew() {
} }
}, [packNum]); }, [packNum]);
const [languageArray, setLanguageArray] = useState<any[]>([]) //语言列表
useEffect(() => { useEffect(() => {
get({ get({
messageApi: messageApi, messageApi: messageApi,
@ -464,9 +465,21 @@ export default function ProjNew() {
// console.log('价格', showPrice); // console.log('价格', showPrice);
getPickList(1) getPickList(1)
// console.log() // console.log()
get({
messageApi: messageApi,
url: 'api/env/custom/list-active-lang',
onSuccess({ data }:any) {
// setDefultLanguage(data[0])
setLanguageArray(data.map((item:any) => ({ value: item, label: item })));
// console.log(data[0],data.map((item:any) => ({ value: item, label: item })));
}
})
}, []); }, []);
return ( return (
<> <>
{contextHolder} {contextHolder}
@ -480,13 +493,13 @@ export default function ProjNew() {
<div className='projNew' style={{ height: `${height}px`, overflow: 'auto' }}> <div className='projNew' style={{ height: `${height}px`, overflow: 'auto' }}>
<div className="proj-new"> <div className="proj-new">
{/* <div className="proj-title">请完善项目的基本信息</div> */} {/* <div className="proj-title">请完善项目的基本信息</div> */}
<div className="proj-form"> <div className="proj-form" >
<Form <Form
name="basic" name="basic"
form={form} form={form}
initialValues={{ initialValues={{
projVersion: 'V1.0', projVersion: 'V1.0',
backendCodeLang: 'JAVA' // backendCodeLang: defultLanguage,
}} // 添加 initialValues 属性 }} // 添加 initialValues 属性
layout={'vertical'} layout={'vertical'}
labelCol={{ span: 24 }} labelCol={{ span: 24 }}
@ -748,12 +761,13 @@ export default function ProjNew() {
placeholder="请选择系统语言" placeholder="请选择系统语言"
className='langselect' className='langselect'
// defaultValue="JAVA" // defaultValue="JAVA"
options={[ // options={[
{ value: 'JAVA', label: 'JAVA' }, // { value: 'JAVA', label: 'JAVA' },
// { value: 'NODE', label: 'NODE(JAVASCRIPT)' }, // // { value: 'NODE', label: 'NODE(JAVASCRIPT)' },
// { value: 'PYTHON', label: 'PYTHON' }, // // { value: 'PYTHON', label: 'PYTHON' },
// { value: 'GO', label: 'GO' }, // // { value: 'GO', label: 'GO' },
]} // ]}
options={languageArray}
> >
</Select> </Select>
</Form.Item> </Form.Item>