瀏覽代碼

修复不显示折线的问题

valentichu 1 年之前
父節點
當前提交
e251586fdd
共有 4 個文件被更改,包括 12 次插入4 次删除
  1. 0 0
      lib/index.js
  2. 1 1
      src/App.jsx
  3. 9 3
      src/pages/Alarm/components/components/AlarmDetail/index.jsx
  4. 2 0
      src/pages/Alarm/components/detail.jsx

File diff suppressed because it is too large
+ 0 - 0
lib/index.js


+ 1 - 1
src/App.jsx

@@ -15,7 +15,7 @@ function Home(props) {
           detail: {
             id: 275575,
             name: "测试",
-            rule_id: 110,
+            rule_id: 69,
             type: 1,
             sub_type: 13,
             status: 1,

+ 9 - 3
src/pages/Alarm/components/components/AlarmDetail/index.jsx

@@ -382,7 +382,13 @@ const Index = (props) => {
   return (
     <>
       <div className={styles.desc}>
-        <Descriptions column={3} style={{ margin: "0px 0px", width: "calc(100% - 287px)" }}>
+        <Descriptions
+          column={3}
+          style={{
+            margin: "0px 0px",
+            width: "calc(100% - 287px)",
+          }}
+        >
           <Descriptions.Item span={3} label="告警名称">
             {props.data?.data?.name}
           </Descriptions.Item>
@@ -442,7 +448,7 @@ const Index = (props) => {
       </div>
       {(props.data?.data?.sub_type === 13 ||
         props.data?.data?.sub_type === 14) && (
-        <div style={{ position: "relative" }}>
+        <div style={{ position: "relative", flex: 1, height: 0 }}>
           <div className={styles.range}>
             <RangePicker
               showTime
@@ -456,7 +462,7 @@ const Index = (props) => {
 
           {chartData && (
             <ReactECharts
-              style={{ height: "calc(100% - 248px)" }}
+              style={{ height: "100%" }}
               option={chartData}
               notMerge={true}
             />

+ 2 - 0
src/pages/Alarm/components/detail.jsx

@@ -93,6 +93,8 @@ const Detail = (props) => {
         }}
         bodyStyle={{
           height: "calc(90vh - 80px)",
+          display: "flex",
+          flexDirection: "column",
         }}
       >
         {props.open && (

Some files were not shown because too many files changed in this diff