Commit 727ab1b2 authored by 彭俊龙's avatar 彭俊龙

app发版页样式优化

parent acf31b2d
Pipeline #93798 passed with stages
import React, { useEffect, useMemo, useState } from 'react'; import React, { useEffect, useMemo, useState } from 'react';
import styles from './index.less'; import styles from './index.less';
import { Form, Table, Input, message, Button, Upload, Tooltip, Space } from 'antd'; import { Form, Table, Input, message, Button, Upload, Tooltip, Space, Tag } from 'antd';
import { import {
getAppUploadRecords, getAppUploadRecords,
postAppVersionInfo, postAppVersionInfo,
getApkVerionInfo, getApkVerionInfo,
} from '@/services/mobileConfig/api'; } from '@/services/mobileConfig/api';
import { UploadOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import { UploadOutlined, QuestionCircleOutlined, DownloadOutlined } from '@ant-design/icons';
import { request } from '@wisdom-utils/utils/es'; import { request } from '@wisdom-utils/utils/es';
const ApkUpload = props => { const ApkUpload = props => {
const [loadding, setLoadding] = useState(false); const [loadding, setLoadding] = useState(false);
...@@ -27,7 +27,25 @@ const ApkUpload = props => { ...@@ -27,7 +27,25 @@ const ApkUpload = props => {
{ {
title: '版本号', title: '版本号',
dataIndex: 'Ver', dataIndex: 'Ver',
width: 200,
key: 'Ver', key: 'Ver',
render: (text, record, index) => {
if (index === 0)
return (
<>
{text}
<Tag
color="blue"
style={{
marginLeft: '10px',
}}
>
当前版本
</Tag>
</>
);
return <>{text}</>;
},
}, },
{ {
title: '上传时间', title: '上传时间',
...@@ -38,7 +56,7 @@ const ApkUpload = props => { ...@@ -38,7 +56,7 @@ const ApkUpload = props => {
title: '发版日志', title: '发版日志',
dataIndex: 'UploadLog', dataIndex: 'UploadLog',
key: 'UploadLog', key: 'UploadLog',
render: (text, recore, index) => ( render: (text, record, index) => (
<Tooltip title={text}> <Tooltip title={text}>
<div <div
style={{ style={{
...@@ -57,16 +75,15 @@ const ApkUpload = props => { ...@@ -57,16 +75,15 @@ const ApkUpload = props => {
title: '下载', title: '下载',
key: 'DownUrl', key: 'DownUrl',
dataIndex: 'DownUrl', dataIndex: 'DownUrl',
render: (text, record, index) => ( render: (text, record, index) => {
<UploadOutlined onClick={() => window.open(`${window.origin}${text}`, '_self')} /> return <DownloadOutlined onClick={() => window.open(`${window.origin}${text}`, '_self')} />;
), },
}, },
]; ];
const [form] = Form.useForm(); const [form] = Form.useForm();
useEffect(() => { useEffect(() => {
getRecords(); getRecords();
//getAppUploadRecords().then(x=> console.log(x, '上传记录'))
}, []); }, []);
const normFile = e => { const normFile = e => {
if (Array.isArray(e)) { if (Array.isArray(e)) {
...@@ -129,6 +146,7 @@ const ApkUpload = props => { ...@@ -129,6 +146,7 @@ const ApkUpload = props => {
display: 'flex', display: 'flex',
width: '100%', width: '100%',
}} }}
className={styles.apkUpload}
> >
<Form <Form
style={{ style={{
...@@ -146,18 +164,24 @@ const ApkUpload = props => { ...@@ -146,18 +164,24 @@ const ApkUpload = props => {
<Form.Item name="ApkName" label="应用名称" rules={[{ required: true }]}> <Form.Item name="ApkName" label="应用名称" rules={[{ required: true }]}>
<Input placeholder="请输入应用名称" /> <Input placeholder="请输入应用名称" />
</Form.Item> </Form.Item>
<Form.Item label="发版本号"> <Form.Item label="发版本号">
<Space> <Space>
<Form.Item name="Ver" noStyle rules={[{ required: true, message: '请输入版本号' }]}> <Form.Item name="Ver" noStyle rules={[{ required: true, message: '请输入版本号' }]}>
<Input placeholder="请输入发版本号" /> <Input placeholder="请输入发版本号" />
</Form.Item> </Form.Item>
<Tooltip title="版本号通过上传Apk获取或者手动填写"> <Tooltip title="上传apk自动获取">
<QuestionCircleOutlined /> <QuestionCircleOutlined />
</Tooltip> </Tooltip>
</Space> </Space>
</Form.Item> </Form.Item>
<Form.Item name="UploadLog" label="发版说明" rules={[{ required: true }]}> <Form.Item name="UploadLog" label="发版日志" rules={[{ required: true }]}>
<TextArea rows={6} placeholder="请输入发版说明" /> <TextArea
rows={6}
placeholder="请输入发版日志,例:
更新日志:
1.修复bugXXXX
2.新增功能XXXX"
/>
</Form.Item> </Form.Item>
<Form.Item name="DownUrl" style={{ display: 'none' }} /> <Form.Item name="DownUrl" style={{ display: 'none' }} />
<Form.Item <Form.Item
...@@ -208,6 +232,7 @@ const ApkUpload = props => { ...@@ -208,6 +232,7 @@ const ApkUpload = props => {
</Form.Item> </Form.Item>
</Form> </Form>
<Table <Table
bordered={true}
style={{ style={{
width: '50%', width: '50%',
}} }}
...@@ -216,6 +241,9 @@ const ApkUpload = props => { ...@@ -216,6 +241,9 @@ const ApkUpload = props => {
pageSize: 10, pageSize: 10,
}} }}
dataSource={dataSource} dataSource={dataSource}
rowClassName={(record, index) => {
if (index === 0) return 'newVer-row';
}}
/> />
</div> </div>
); );
......
.apkUpload{
:global{
.newVer-row{
background-color: #e6f7ff; /* 淡蓝色背景 */
font-weight: bold; /* 粗体字体 */
color: #1890ff; /* Ant Design主色 */
}
}
}
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