wenhongquan 3 жил өмнө
parent
commit
745211f394

+ 17 - 2
index.html

@@ -11,8 +11,8 @@
     <!--    <script src="../webClient/initWebSocket.js"></script>-->
     <!--    <script src="../webClient/webClient_initWnd.js"></script>-->
 
-    <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g6-3.1.1/build/g6.js"></script>
-    <link rel="stylesheet" href="http://61.147.254.211:21009/minemapapi/v2.1.0/minemap.css">
+    <!-- <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g6-3.1.1/build/g6.js"></script> -->
+    <!-- <link rel="stylesheet" href="http://61.147.254.211:21009/minemapapi/v2.1.0/minemap.css">
     <script src="http://61.147.254.211:21009/minemapapi/v2.1.0/minemap.js"></script>
     <script>
         minemap.domainUrl = 'http://61.147.254.211:21009';
@@ -26,6 +26,21 @@
          */
         minemap.key = "d054b0f4433b42f1a28c1a97fbf8317d";
         minemap.solution = 12886;
+    </script> -->
+
+
+    <link rel="stylesheet" href="https://minedata.cn/minemapapi/v2.1.0/minemap.css" />
+    <script src="https://minedata.cn/minemapapi/v2.1.0/minemap.js"></script>
+
+    <script>
+        minemap.domainUrl = 'https://minedata.cn';
+        minemap.dataDomainUrl = 'https://minedata.cn';
+        minemap.serverDomainUrl = 'https://minedata.cn';
+        minemap.spriteUrl = 'https://minedata.cn/minemapapi/v2.1.0/sprite/sprite';
+        minemap.serviceUrl = 'https://minedata.cn/service/';
+
+        minemap.key = '77ef70465c2d4888b3a5132523494b94';
+        minemap.solution = 16857;
     </script>
     <script>
         (function(win, lib) {

+ 16 - 0
src/api/incident.ts

@@ -54,6 +54,20 @@ export interface IncidentItemDetailProcessItem {
   createTime?: string;
   createBy?: null;
   userRead?: string;
+  userUnRead?: string;
+  incidentStatus?: number;
+}
+export interface IncidentItemDetailProcessItemPersonVo {
+  id?: string;
+  incidentTaskId?: string;
+  position?: string;
+  person?: string;
+}
+export interface IncidentItemDetailProcessItemCmdVo {
+  command?: string;
+  id?: string;
+  incidentTaskId?: string;
+  index?: number;
 }
 export interface IncidentItemDetailTaskItem {
   id?: string;
@@ -64,6 +78,8 @@ export interface IncidentItemDetailTaskItem {
   delFlag?: string;
   createTime?: string;
   createBy?: null;
+  taskPersonVos?: IncidentItemDetailProcessItemPersonVo[];
+  taskCommandVos?: IncidentItemDetailProcessItemCmdVo[];
 }
 
 export interface IncidentItemEmergencyPlan {

BIN
src/assets/card-bg/archive@2x.png


BIN
src/assets/card-bg/neglect@2x.png


+ 2 - 1
src/constants/constants.ts

@@ -1,5 +1,6 @@
 export const BaseMediaUrl =
-  'http://61.147.254.211:30876/YJZH-SQ/api/common/download/resource?resource=';
+  // 'http://61.147.254.211:30876/YJZH-SQ/api/common/download/resource?resource=';
+  'http://sqpcbg.xt.wenhq.top:8083/api/common/download/resource?resource=';
 export const BaseLoginUrl = 'http://61.147.254.211:9999/home/#/login';
 export const BaseReg = /^\+\+\+\+[\.]+|[\d|\w|\s|\u4e00-\u9fa5]+\+\+\+\+$/;
 

+ 1 - 1
src/utils/request.ts

@@ -40,7 +40,7 @@ axios.interceptors.response.use(
         const main = useMainStore();
         main.clearReqToken();
         window.localStorage.setItem('Authorization', '');
-        window.location.href = BaseLoginUrl;
+        // window.location.href = BaseLoginUrl;
 
         throw Error(res.statusText);
       }

+ 1 - 1
src/views/IncidentDetail/AccidentCard/index.tsx

@@ -41,7 +41,7 @@ export default defineComponent({
     return () => (
       <Card cardType="accident-scene">
         <div>
-          <el-carousel ref={carousel} autoplay={false} arrow="always">
+          <el-carousel ref={carousel} autoplay={false} arrow={"always"}>
             {(store.incidentDetail?.baseInfo?.pic?.split(',') ?? []).map(
               (item) => (
                 <el-carousel-item>

+ 42 - 9
src/views/IncidentDetail/EmergencyCard/index.tsx

@@ -1,6 +1,7 @@
 import Card from '@/components/Card';
-import { useIncidentStore } from '@/store';
-import { defineComponent, ref } from 'vue-demi';
+import { useIncidentStore, useCommonStore } from '@/store';
+import { ClickOutside as vClickOutside } from 'element-plus';
+import { defineComponent, ref, onMounted,unref } from 'vue-demi';
 
 // @ts-ignore
 import Icondownload from '@/assets/icons/detail/download@2x.png';
@@ -10,8 +11,24 @@ export default defineComponent({
   name: 'EmergencyCard',
   setup(props) {
     const store = useIncidentStore();
+    const commonStore = useCommonStore();
 
     const types = ref([]);
+    // const dpropc = ref();
+    // const download = ref();
+    // onMounted(() => { 
+    //   download.value.addEventListener("click", () => { 
+    //     // debugger
+    //     dpropc.value?.popperRef?.delayHide?.();
+    //   });
+    // });
+
+    const onClickOutside = () => {
+
+      // unref(dpropc).popperRef?.delayHide?.();
+    };
+
+
 
     return () => (
       <Card cardType="emergency-plan">
@@ -19,20 +36,36 @@ export default defineComponent({
           <div class="toph">
             <div class="djcc">
               <div class="dj">等级</div>
-              <div class="djc">I级</div>
+              <div class="djc">
+                {commonStore.globalDict['zhdd_incident_level']?.find(
+                  (i) =>
+                    i.dictValue?.toString() ===
+                    store.incidentDetail?.baseInfo['level']?.toString(),
+                )?.dictLabel ?? '-'}
+              </div>
             </div>
 
-            <div class="dl">
+            {/* <div class="dl" ref={download}>
               <img src={Icondownload} />
               下载附件
             </div>
+
+            <el-popover
+              trigger="click"
+              title="With title"
+              virtual-triggering
+              virtual-ref={download}
+              ref={dpropc}>
+              <span> Some content </span>
+            </el-popover> */}
           </div>
+
           <div class="content">
-            {store.incidentDetail.baseTask[
-              store.incidentDetail.baseInfo?.level
-            ].map((i, index) => (
-              <div>{index + 1 + '、' + i.taskName}</div>
-            ))}
+            {store.incidentDetail.baseTask != undefined
+              ? store.incidentDetail?.baseTask[
+                  store.incidentDetail.baseInfo?.level
+                ].map((i, index) => <div>{index + 1 + '、' + i.taskName}</div>)
+              : ''}
           </div>
         </div>
       </Card>

+ 12 - 4
src/views/IncidentDetail/ExecutionLogCard/index.tsx

@@ -63,7 +63,7 @@ export default defineComponent({
 
           {store.incidentDetail?.process?.map((item, idx) => (
             <div
-              class={`pitem pitem${(idx % 3) + 1}`}
+              class={`pitem pitem${item.incidentStatus }`}
               datatype={`${
                 idx + 1 == store.incidentDetail?.process?.length ? 'last' : '1'
               }`}>
@@ -75,9 +75,17 @@ export default defineComponent({
                 </div>
                 <div class="pdesc">
                   <div> {item.des} </div>
-                  <div class="exdesc" style={`${item.userRead==null?"display:none":""}`}>
-                    {item.userRead}
-                    <span style="color:#39D6FE">30</span>人未读
+                  <div
+                    class="exdesc"
+                    style={`${item.userUnRead == null ? 'display:none' : ''}`}>
+                    {(item.userUnRead ?? ''.split('、') ?? [])
+                      .slice(0, 5)
+                      .join('、')}{' '}
+                    等
+                    <span style="color:#39D6FE;margin-left:5px;margin-right:5px">
+                      {((item.userUnRead ?? '').split('、') ?? []).length}
+                    </span>
+                    人未读
                   </div>
                 </div>
               </div>

+ 26 - 5
src/views/IncidentDetail/IncidentPlanCard/index.tsx

@@ -22,11 +22,32 @@ export default defineComponent({
     return () => (
       <Card cardType="incident-plan">
         <div class="plan-container">
-          <el-checkbox-group v-model={types.value}>
-            {store?.incidentDetail?.task?.map((t) => (
-              <el-checkbox disabled class="plan-item" label={t.taskName} />
-            ))}
-          </el-checkbox-group>
+          {/* <el-checkbox-group v-model={types.value}> */}
+          {store?.incidentDetail?.task?.map((t) => (
+            <div class="plan-content">
+              <div class="plan-title">{t.taskName}</div>
+              <div class="plan-c">
+                <div class="plan-comm">
+                  <div class="pt">指挥:</div>
+                  <div class="pc">
+                    {t.taskPersonVos
+                      ?.map((i) => (i.person ?? '') + (i.position ?? ''))
+                      .join('、')}
+                  </div>
+                </div>
+                <div class="plan-cmd">
+                  <div class="pt">指令:</div>
+                   <div class="pc">
+                  {t.taskCommandVos?.map((i) => (
+                    <div>{i.command}</div>
+                  ))}
+                  </div>
+                  </div>
+              </div>
+            </div>
+            // <el-checkbox disabled class="plan-item" label={t.taskName} />
+          ))}
+          {/* </el-checkbox-group> */}
         </div>
       </Card>
     );

+ 67 - 5
src/views/IncidentDetail/index.scss

@@ -402,6 +402,38 @@
                             font-weight: 400;
                         }
                     }
+                    .plan-content {
+                        font-size: px2rem(18px * 2);
+                        font-family: Source Han Sans CN, Source Han Sans CN-Regular;
+                        font-weight: 400;
+                        text-align: left;
+                        color: #ffffff;
+                        margin-bottom: px2rem(20px * 2);
+                        .plan-c {
+                            margin-left: px2rem(13px * 2);
+                            margin-top: px2rem(17px * 2);
+                            opacity: 0.66;
+                            font-size: px2rem(16px * 2);
+                            font-family: Source Han Sans CN, Source Han Sans CN-Regular;
+                            font-weight: 400;
+                            text-align: left;
+                            color: #ffffff;
+                            .plan-comm,
+                            .plan-cmd {
+                                margin-top: px2rem(10px * 2);
+                            }
+                            .plan-comm {
+                                .pc {
+                                    color: #0ED0FF;
+                                }
+                            }
+                        }
+                    }
+                }
+                .pt,
+                .pc {
+                    display: inline-block;
+                    vertical-align: top;
                 }
             }
             &-bg-emergency-linkage {
@@ -582,21 +614,31 @@
                             }
                         }
                     }
-                    .pitem1 {
+                    .pitem3 {
                         .ptime {
                             background-image: url("../../assets/card-bg/blue@2x.png") !important;
                         }
                     }
-                    .pitem2 {
+                    .pitem1 {
                         .ptime {
                             background-image: url("../../assets/card-bg/red@2x.png") !important;
                         }
                     }
-                    .pitem3 {
+                    .pitem2 {
                         .ptime {
                             background-image: url("../../assets/card-bg/yellow@2x.png") !important;
                         }
                     }
+                    .pitem4 {
+                        .ptime {
+                            background-image: url("../../assets/card-bg/archive@2x.png") !important;
+                        }
+                    }
+                    .pitem5 {
+                        .ptime {
+                            background-image: url("../../assets/card-bg/neglect@2x.png") !important;
+                        }
+                    }
                     .pitem {
                         position: relative;
                         .pline {
@@ -627,7 +669,8 @@
                             }
                         }
                         .pcontent {
-                            min-height: px2rem(48px * 2 + 158px *2);
+                            min-height: px2rem(48px * 2 + 8px *2);
+                            padding-bottom: px2rem(28px * 2);
                             z-index: 1;
                             position: relative;
                             font-size: px2rem(18px * 2);
@@ -758,6 +801,7 @@
                     border-radius: px2rem(5px * 2);
                     text-align: center;
                     margin-top: px2rem(5px * 2);
+                    margin-right: px2rem(5px * 2);
                     color: #39d6fe;
                     img {
                         width: px2rem(15px * 2);
@@ -767,11 +811,29 @@
                 }
                 .content {
                     margin-top: px2rem(20px * 2);
-                    max-height: px2rem(250px * 2);
+                    max-height: px2rem(230px * 2);
                     overflow-y: auto;
                     div {
                         margin-bottom: px2rem(25px * 2);
                     }
+                    &::-webkit-scrollbar-thumb {
+                        background: #39d6fe;
+                        border-radius: 3px;
+                    }
+                    // &::-webkit-scrollbar-track {
+                    //     border-radius: 3px;
+                    //     background-color: #39d6fe;
+                    // }
+                    &::-webkit-scrollbar {
+                        width: 6px;
+                        background-color: rgba(0, 0, 0, 0);
+                        opacity: 1;
+                    }
+                    // &::-webkit-scrollbar-thumb {
+                    //     border-radius: 10px;
+                    //     -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+                    //     background-color: #555;
+                    // }
                 }
             }
             &-bg-accident-scene {}

+ 2 - 1
vite.config.ts

@@ -26,7 +26,8 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
       force: true,
       proxy: {
         '/api': {
-          target: 'http://61.147.254.211:30876/YJZH-SQ/',
+          // target: 'http://61.147.254.211:30876/YJZH-SQ/',
+          target: 'http://sqpcbg.xt.wenhq.top:8083/',
           changeOrigin: true,
           // rewrite: (path) => path.replace(/^\/api/, ''),
         },