Răsfoiți Sursa

调整透明度、图表线条颜色和累计收益率显示样式

yourname 6 luni în urmă
părinte
comite
b9ff312df8

+ 1 - 0
file-starter

@@ -0,0 +1 @@
+Subproject commit 237ec1aa24340d9c09fb1f268de43cf0d167392e

+ 9 - 1
src/client/admin/components/SubmissionComparisonDialog.tsx

@@ -100,7 +100,15 @@ export const SubmissionComparisonDialog: React.FC<SubmissionComparisonDialogProp
                       <TableCell className="font-medium">{row.user}</TableCell>
                       {comparisonData.classrooms.map(classroom => (
                         <TableCell key={classroom} className="text-center">
-                          {row[classroom] || '-'}
+                          <span className={
+                            (row[classroom] as string).startsWith('-')
+                              ? 'text-green-500'
+                              : row[classroom] !== '-' && row[classroom] !== '0%'
+                                ? 'text-red-500'
+                                : ''
+                          }>
+                            {row[classroom] || '-'}
+                          </span>
                         </TableCell>
                       ))}
                     </TableRow>

+ 3 - 1
src/client/admin/pages/SubmissionRecordsPage.tsx

@@ -353,7 +353,9 @@ export const SubmissionRecordsPage = () => {
                     </TableCell>
                     <TableCell>{record.status || '-'}</TableCell>
                     <TableCell>{record.profitPercent ? `${record.profitPercent}%` : '-'}</TableCell>
-                    <TableCell>{record.totalProfitPercent ? `${record.totalProfitPercent}%` : '-'}</TableCell>
+                    <TableCell className={record.totalProfitPercent > 0 ? 'text-red-500' : record.totalProfitPercent < 0 ? 'text-green-500' : ''}>
+                      {record.totalProfitPercent ? `${record.totalProfitPercent}%` : '-'}
+                    </TableCell>
                     <TableCell className="text-right">
                       <div className="flex justify-end gap-2">
                         <Button

+ 13 - 3
src/client/live/components/stock/components/stock-chart/src/lib/config/ChartBaseConfig.ts

@@ -53,13 +53,15 @@ export class ChartBaseConfig {
         {
           left: '10%',
           right: '8%',
-          height: '50%'
+          height: '50%',
+          backgroundColor: 'rgba(0, 0, 0, 0.1)'
         },
         {
           left: '10%',
           right: '8%',
           top: '63%',
-          height: '16%'
+          height: '16%',
+          backgroundColor: 'rgba(0, 0, 0, 0.1)'
         }
       ],
       xAxis: this.createXAxisConfig(categoryData),
@@ -137,7 +139,15 @@ export class ChartBaseConfig {
     return [
       {
         scale: true,
-        splitArea: { show: true }
+        splitArea: { show: true },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            type: 'dashed',
+            color: 'rgba(255, 255, 255, 0.6)', // 白色虚线,透明度60%
+            width: 1
+          }
+        }
       },
       {
         scale: true,

+ 5 - 2
src/client/mobile/components/Exam/ExamAdmin.tsx

@@ -19,11 +19,12 @@ type ColumnType = GetProp<TableProps,'columns'>[number]
 function CurrentAnswers({ answers, columns }: { answers: Answer[], columns: any[] }) {
   return (
     <div>
-      <Table 
+      <Table
         columns={columns}
         dataSource={answers}
         rowKey={(record) => `${record.userId}-${record.date}`}
         pagination={false}
+        className="border border-dashed border-gray-300 opacity-30"
       />
     </div>
   );
@@ -33,11 +34,12 @@ function CurrentAnswers({ answers, columns }: { answers: Answer[], columns: any[
 function DailyStatistics({ dailyAnswers, columns }: { dailyAnswers: {[key: string]: Answer[]}, columns: any[] }) {
   return (
     <div>
-      <Table 
+      <Table
         columns={columns}
         dataSource={Object.keys(dailyAnswers).map(date => ({ date }))}
         rowKey="date"
         pagination={false}
+        className="border border-dashed border-gray-300 opacity-30"
       />
     </div>
   );
@@ -52,6 +54,7 @@ function CumulativeResults({ results, columns }: { results: CumulativeResult[],
         dataSource={results}
         rowKey="userId"
         pagination={false}
+        className="border border-dashed border-gray-300 opacity-30"
       />
     </div>
   );

+ 13 - 3
src/client/mobile/components/stock/components/stock-chart/src/lib/config/ChartBaseConfig.ts

@@ -53,13 +53,15 @@ export class ChartBaseConfig {
         {
           left: '10%',
           right: '8%',
-          height: '50%'
+          height: '50%',
+          backgroundColor: 'rgba(0, 0, 0, 0.1)'
         },
         {
           left: '10%',
           right: '8%',
           top: '63%',
-          height: '16%'
+          height: '16%',
+          backgroundColor: 'rgba(0, 0, 0, 0.1)'
         }
       ],
       xAxis: this.createXAxisConfig(categoryData),
@@ -137,7 +139,15 @@ export class ChartBaseConfig {
     return [
       {
         scale: true,
-        splitArea: { show: true }
+        splitArea: { show: true },
+        splitLine: {
+          show: true,
+          lineStyle: {
+            type: 'dashed',
+            color: 'rgba(255, 255, 255, 0.6)', // 白色虚线,透明度60%
+            width: 1
+          }
+        }
       },
       {
         scale: true,

+ 2 - 0
src/client/mobile/components/stock/components/stock-chart/src/lib/drawing/ChartDrawingTools.ts

@@ -103,6 +103,7 @@ export class ChartDrawingTools {
         markLineData.push({
           yAxis: line.points[0].yValue,
           lineStyle: {
+            color: '#666666', // 暗灰色
             ...line.style,
             type: line.style?.type || 'solid'
           }
@@ -151,6 +152,7 @@ export class ChartDrawingTools {
         animation: false,
         symbol: ['none', 'none'],
         lineStyle: {
+          color: '#666666', // 暗灰色
           width: 1,
           type: 'solid'
         },