Hwf 6 месяцев назад
Родитель
Сommit
d7ea29f894

BIN
src/assets/images/disasterRiskMonitor/reservoirMonitor/icon1.png


BIN
src/assets/images/disasterRiskMonitor/reservoirMonitor/icon2.png


BIN
src/assets/images/disasterRiskMonitor/reservoirMonitor/icon3.png


BIN
src/assets/images/disasterRiskMonitor/reservoirMonitor/icon4.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/box1.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/icon1.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/icon2.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/icon3.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/icon4.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/icon5.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/speaker.png


BIN
src/assets/images/disasterRiskMonitor/riverMonitor/thickness.png


+ 26 - 10
src/views/disasterRiskMonitor/cityEmergencyEvent.vue

@@ -12,15 +12,17 @@
     />
     <div ref="searchBoxRef" class="search-box">
       <van-search
-        v-model="queryParams.keywords"
-        class="common-search"
-        :left-icon="searchImg"
-        :right-icon="closeImg"
-        :clearable="false"
-        placeholder="请输入位置信息"
-        @search="onSearchKeyword"
-        @click-right-icon.stop="onSearchCancel"
-      />
+          v-model="queryParams.keywords"
+          placeholder="请输入位置信息"
+          class="common-search"
+          :left-icon="searchImg"
+          show-action
+          @search="onSearchKeyword"
+      >
+        <template #action>
+          <div class="search-btn" @click="onSearchKeyword">搜索</div>
+        </template>
+      </van-search>
       <div v-show="showSearch" class="search-list">
         <van-list
           v-model:loading="loading"
@@ -392,7 +394,17 @@ const initData = () => {
   }
 }
 .common-search {
-  border: 1px solid #ededed;
+  border: 1px solid #dce0ee;
+  border-radius: 2px;
+  padding: 0;
+  :deep(.van-field__control) {
+    &::placeholder {
+      color: #c9cfd9;
+    }
+  }
+  :deep(.van-search__content) {
+    background-color: #ffffff;
+  }
   :deep(.van-field__left-icon) {
     .van-icon__image {
       width: 12px;
@@ -408,6 +420,10 @@ const initData = () => {
       height: 30px;
     }
   }
+  .search-btn {
+    font-size: 14px;
+    color: #2c81ff;
+  }
 }
 .box {
   background-color: #fff;

+ 231 - 35
src/views/disasterRiskMonitor/reservoirMonitor.vue

@@ -1,32 +1,68 @@
 <template>
   <div class="container">
-    <van-search
-        v-model="keyword"
-        class="common-search"
-        :left-icon="searchImg"
-        :right-icon="closeImg"
-        :clearable="false"
-        @search="onSearchKeyword"
-        @click-right-icon.stop="onSearchCancel"
-    />
+    <div class="box1">
+      <van-search
+          v-model="keyword"
+          placeholder="请输入位置信息"
+          class="common-search"
+          :left-icon="searchImg"
+          show-action
+          @search="onSearchKeyword"
+      >
+        <template #action>
+          <div class="search-btn" @click="onSearchKeyword">搜索</div>
+        </template>
+      </van-search>
+    </div>
     <Map ref="mapRef" class="map" active-map="satellite" :point-type="pointType" :event-details="eventDetails" />
-    <van-text-ellipsis class="text-box" :content="detailsData.text" rows="3" expand-text="展开" collapse-text="收起" />
-    <div class="checked-box">
+    <div class="box2">
+      <div class="title-box">
+        <div class="title"><i class="icon-speaker" />详情信息</div>
+      </div>
+      <van-text-ellipsis class="text-box" :content="detailsData.text" rows="2" expand-text="展开" collapse-text="收起" />
+    </div>
+    <div class="card-box2">
       <div
-          v-for="(item, index) in tags"
+          v-for="(item, index) in menu1"
           :key="index"
-          :class="item.checked ? 'tag-box tag-box-active': 'tag-box'"
-          @click="handleClickTag(item)"
+          :class="item.checked ? 'card-item checked' : 'card-item'"
+          @click="handleClick(item)"
       >
-        <div class="tag">
-          <i :class="item.icon" />
-          <van-icon v-show="!!item.checked" class="checked-icon" name="checked" />
+        <i
+            class="icon"
+            :style="{ backgroundImage: 'url(' + item.icon + ')' }"
+        />
+        <div class="text1">{{ item.name }}</div>
+        <div>{{ item.num }}</div>
+      </div>
+      <div class="card-item" @click="showMenu = !showMenu">
+        <i
+            class="icon"
+            :style="{
+                backgroundImage: 'url(' + getImageUrl1('icon5') + ')'
+              }"
+        />
+        <div class="text1" style="color: #2c81ff">
+          {{ showMenu ? "收起" : "展开" }}
         </div>
-        <div class="text">{{ item.name }}</div>
-        <div class="text">{{ '(' + item.num + ')' }}</div>
       </div>
     </div>
-    <el-table :data="detailsData.dataList" border>
+    <div v-show="showMenu" class="card-box2">
+      <div
+          v-for="(item, index) in menu2"
+          :key="index"
+          :class="item.checked ? 'card-item checked' : 'card-item'"
+          @click="handleClick(item)"
+      >
+        <i
+            class="icon"
+            :style="{ backgroundImage: 'url(' + item.icon + ')' }"
+        />
+        <div class="text1">{{ item.name }}</div>
+        <div>{{ item.num }}</div>
+      </div>
+    </div>
+    <el-table :data="detailsData.dataList" table-layout="auto" header-cell-class-name="common-table-header" :row-class-name="getTableRowClass">
       <el-table-column label="站点" prop="data1" align="center" />
       <el-table-column label="政区" prop="data2" align="center" />
       <el-table-column label="时间" prop="data3" align="center" />
@@ -38,22 +74,36 @@
 
 <script lang="ts" setup name="reservoirMonitor">
 import searchImg from "@/assets/images/search.png";
-import closeImg from "@/assets/images/close.png";
 import {onMounted, reactive, ref} from "vue";
 import {ElTable, ElTableColumn} from "element-plus";
 
+const getImageUrl1 = name => {
+  return new URL(
+      `../../assets/images/disasterRiskMonitor/geologicalDisaster/${name}.png`,
+      import.meta.url
+  ).href;
+};
+const getImageUrl2 = name => {
+  return new URL(
+      `../../assets/images/disasterRiskMonitor/reservoirMonitor/${name}.png`,
+      import.meta.url
+  ).href;
+};
 let pointType = ref([]);
 let eventDetails = ref({});
 let keyword = ref('');
-let tags = reactive([
-  { name: '大型', num: 0, icon: 'icon1', checked: true },
-  { name: '中型', num: 0, icon: 'icon2', checked: true },
-  { name: '小I型', num: 0, icon: 'icon3', checked: true },
-  { name: '小II型', num: 0, icon: 'icon4', checked: false },
-  { name: '超汛限', num: 0, icon: 'icon5', checked: false },
-  { name: '低旱警', num: 0, icon: 'icon5', checked: false },
-  { name: '病险', num: 0, icon: 'icon5', checked: false },
-  { name: '在建', num: 0, icon: 'icon5', checked: false },
+let menu1 = ref([
+  { name: '大型', num: 0, icon: getImageUrl1('icon1'), checked: true },
+  { name: '中型', num: 0, icon: getImageUrl1('icon2'), checked: true },
+  { name: '小I型', num: 0, icon: getImageUrl1('icon3'), checked: true },
+  { name: '小II型', num: 0, icon: getImageUrl1('icon4'), checked: false },
+]);
+let showMenu = ref(true);
+let menu2 = ref([
+  { name: '超汛限', num: 0, icon: getImageUrl2('icon1'), checked: false },
+  { name: '低旱警', num: 0, icon: getImageUrl2('icon2'), checked: false },
+  { name: '病险', num: 0, icon: getImageUrl2('icon3'), checked: false },
+  { name: '在建', num: 0, icon: getImageUrl2('icon4'), checked: false }
 ]);
 const detailsData = ref({
   text: '',
@@ -69,9 +119,9 @@ const onSearchCancel = () => {
   keyword.value = '';
   initData();
 }
-const handleClickTag = (item) => {
+const handleClick = item => {
   item.checked = !item.checked;
-}
+};
 const initData = () => {
   detailsData.value = {
     text: '就诞生了附件两款发动机了解案件来看世界分手机否结束骄傲就开了房间离开家可怜见立刻就杀了对方吉林省大家逻辑了及时了解多方了解逻辑范德萨发给收到发给对方独放个',
@@ -81,7 +131,10 @@ const initData = () => {
     ]
   }
 }
-
+// table样式
+const getTableRowClass = ({ rowIndex }) => {
+  return rowIndex % 2 === 0 ? "" : "common-table-tr";
+};
 onMounted(() => {
   initData();
 })
@@ -90,9 +143,129 @@ onMounted(() => {
 <style lang="scss" scoped>
 .container {
   height: 100vh;
+  padding: 16px;
+  .box1 {
+    padding: 13px 9px;
+    background-color: #ffffff;
+  }
+  .box2 {
+    position: relative;
+    width: 344px;
+    min-height: 114px;
+    background: url('@/assets/images/disasterRiskMonitor/riverMonitor/box1.png') no-repeat;
+    background-size: 100% 100%;
+    box-shadow:0 2px 4px 0 rgba(228, 240, 255, 1);
+    padding: 35px 0 0 0;
+    .title-box {
+      position: absolute;
+      top: 0;
+      left: 5px;
+      height: 30px;
+      background-color: #ffffff; /* 背景颜色 */
+      transform: skewX(-20deg); /* 斜切变形 */
+      box-shadow:0 2px 4px 0 rgba(250, 217, 97, 0.18);
+      padding: 0 10px;
+      display: flex;
+      align-items: center;
+      border-radius: 2px;
+      &::after {
+        content: '';
+        position: absolute;
+        top: 0;
+        right: -6px;
+        transform: skewX(20deg);
+        width: 11px;
+        height: 27px;
+        background: url('@/assets/images/disasterRiskMonitor/riverMonitor/thickness.png') no-repeat;
+        background-size: 100% 100%;
+      }
+      .title {
+        font-size: 14px;
+        color: #FFAF00;
+        transform: skewX(20deg);
+        display: flex;
+        align-items: center;
+        .icon-speaker {
+          display: inline-block;
+          width: 16px;
+          height: 16px;
+          background: url('@/assets/images/disasterRiskMonitor/riverMonitor/speaker.png') no-repeat;
+          background-size: 100% 100%;
+          margin-right: 5px;
+        }
+      }
+    }
+  }
+  .card-box2 {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 20px 10px;
+    background-color: #fff;
+    .card-item {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      font-size: 12px;
+      color: #7f8b9f;
+      margin-right: 14px;
+      &:nth-child(1n) {
+        width: 48px;
+      }
+      &:nth-child(2n) {
+        width: 60px;
+      }
+      &:nth-child(3n) {
+        width: 48px;
+      }
+      &:nth-child(4n) {
+        width: 60px;
+      }
+      &:nth-child(5n) {
+        width: 48px;
+        margin-right: 0;
+      }
+      .icon {
+        display: inline-block;
+        width: 32px;
+        height: 32px;
+        background-repeat: no-repeat;
+        background-size: 100% 100%;
+      }
+      .text1 {
+        margin-top: 6px;
+      }
+    }
+    .checked {
+      color: #2c81ff;
+      .icon {
+        position: relative;
+        &::before {
+          content: "";
+          width: 10px;
+          height: 11px;
+          background: url("@/assets/images/disasterRiskMonitor/geologicalDisaster/checked.png")
+          no-repeat;
+          background-size: 100% 100%;
+          position: absolute;
+          top: 0;
+          right: 0;
+        }
+      }
+    }
+  }
   .common-search {
+    border: 1px solid #dce0ee;
+    border-radius: 2px;
+    padding: 0;
+    :deep(.van-field__control) {
+      &::placeholder {
+        color: #c9cfd9;
+      }
+    }
+    :deep(.van-search__content) {
+      background-color: #ffffff;
+    }
     :deep(.van-field__left-icon) {
-
       .van-icon__image {
         width: 12px;
         height: 12px;
@@ -107,6 +280,10 @@ onMounted(() => {
         height: 30px;
       }
     }
+    .search-btn {
+      font-size: 14px;
+      color: #2c81ff;
+    }
   }
   .map {
     width: 100%;
@@ -114,7 +291,6 @@ onMounted(() => {
   }
   .text-box {
     padding: 10px;
-    background-color: #fff;
   }
 }
 .checked-box {
@@ -161,4 +337,24 @@ onMounted(() => {
     }
   }
 }
+.icon1 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon1.png') no-repeat;
+}
+.icon2 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon2.png') no-repeat;
+}
+.icon3 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon3.png') no-repeat;
+}
+.icon4 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon4.png') no-repeat;
+}
+.icon5 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon5.png') no-repeat;
+}
+.icon1, .icon2, .icon3, .icon4, .icon5 {
+  width: 32px;
+  height: 33px;
+  background-size: 100% 100%;
+}
 </style>

+ 125 - 29
src/views/disasterRiskMonitor/riverMonitor.vue

@@ -1,16 +1,27 @@
 <template>
   <div class="container">
-    <van-search
-        v-model="keyword"
-        class="common-search"
-        :left-icon="searchImg"
-        :right-icon="closeImg"
-        :clearable="false"
-        @search="onSearchKeyword"
-        @click-right-icon.stop="onSearchCancel"
-    />
-    <Map ref="mapRef" class="map" active-map="satellite" :point-type="pointType" :event-details="eventDetails" />
-    <van-text-ellipsis class="text-box" :content="detailsData.text" rows="3" expand-text="展开" collapse-text="收起" />
+    <div class="box1">
+      <van-search
+          v-model="keyword"
+          placeholder="请输入位置信息"
+          class="common-search"
+          :left-icon="searchImg"
+          show-action
+          @search="onSearchKeyword"
+      >
+        <template #action>
+          <div class="search-btn" @click="onSearchKeyword">搜索</div>
+        </template>
+      </van-search>
+    </div>
+    <Map ref="mapRef" class="map" active-map="satellite" :event-details="eventDetails" />
+    <div class="box2">
+      <div class="title-box">
+        <div class="title"><i class="icon-speaker" />详情信息</div>
+      </div>
+      <van-text-ellipsis class="text-box" :content="detailsData.text" rows="2" expand-text="展开" collapse-text="收起" />
+    </div>
+
     <div class="checked-box">
       <div
           v-for="(item, index) in tags"
@@ -20,13 +31,13 @@
       >
         <div class="tag">
           <i :class="item.icon" />
-          <van-icon v-show="!!item.checked" class="checked-icon" name="checked" />
+          <i v-show="!!item.checked" class="checked-icon" />
         </div>
         <div class="text">{{ item.name }}</div>
         <div class="text">{{ '(' + item.num + ')' }}</div>
       </div>
     </div>
-    <el-table :data="detailsData.dataList" border>
+    <el-table :data="detailsData.dataList" table-layout="auto" header-cell-class-name="common-table-header" :row-class-name="getTableRowClass">
       <el-table-column label="站点" prop="data1" align="center" />
       <el-table-column label="河流" prop="data2" align="center" />
       <el-table-column label="时间" prop="data3" align="center" />
@@ -38,7 +49,6 @@
 
 <script lang="ts" setup name="riverMonitor">
 import searchImg from "@/assets/images/search.png";
-import closeImg from "@/assets/images/close.png";
 import {onMounted, reactive, ref} from "vue";
 import {ElTable, ElTableColumn} from "element-plus";
 
@@ -46,7 +56,7 @@ let pointType = ref([]);
 let eventDetails = ref({});
 let keyword = ref('');
 let tags = reactive([
-  { name: '超堰顶河道站', num: 0, icon: 'icon1', checked: true },
+  { name: '超堰顶', num: 0, icon: 'icon1', checked: true },
   { name: '超警戒河道站', num: 0, icon: 'icon2', checked: true },
   { name: '漫堤河道站', num: 0, icon: 'icon3', checked: true },
   { name: '水文站', num: 0, icon: 'icon4', checked: false },
@@ -78,7 +88,10 @@ const initData = () => {
     ]
   }
 }
-
+// table样式
+const getTableRowClass = ({ rowIndex }) => {
+  return rowIndex % 2 === 0 ? "" : "common-table-tr";
+};
 onMounted(() => {
   initData();
 })
@@ -87,9 +100,72 @@ onMounted(() => {
 <style lang="scss" scoped>
 .container {
   height: 100vh;
+  padding: 16px;
+  .box1 {
+    padding: 13px 9px;
+    background-color: #ffffff;
+  }
+  .box2 {
+    position: relative;
+    width: 344px;
+    min-height: 114px;
+    background: url('@/assets/images/disasterRiskMonitor/riverMonitor/box1.png') no-repeat;
+    background-size: 100% 100%;
+    box-shadow:0 2px 4px 0 rgba(228, 240, 255, 1);
+    padding: 35px 0 0 0;
+    .title-box {
+      position: absolute;
+      top: 0;
+      left: 5px;
+      height: 30px;
+      background-color: #ffffff; /* 背景颜色 */
+      transform: skewX(-20deg); /* 斜切变形 */
+      box-shadow:0 2px 4px 0 rgba(250, 217, 97, 0.18);
+      padding: 0 10px;
+      display: flex;
+      align-items: center;
+      border-radius: 2px;
+      &::after {
+        content: '';
+        position: absolute;
+        top: 0;
+        right: -6px;
+        transform: skewX(20deg);
+        width: 11px;
+        height: 27px;
+        background: url('@/assets/images/disasterRiskMonitor/riverMonitor/thickness.png') no-repeat;
+        background-size: 100% 100%;
+      }
+      .title {
+        font-size: 14px;
+        color: #FFAF00;
+        transform: skewX(20deg);
+        display: flex;
+        align-items: center;
+        .icon-speaker {
+          display: inline-block;
+          width: 16px;
+          height: 16px;
+          background: url('@/assets/images/disasterRiskMonitor/riverMonitor/speaker.png') no-repeat;
+          background-size: 100% 100%;
+          margin-right: 5px;
+        }
+      }
+    }
+  }
   .common-search {
+    border: 1px solid #dce0ee;
+    border-radius: 2px;
+    padding: 0;
+    :deep(.van-field__control) {
+      &::placeholder {
+        color: #c9cfd9;
+      }
+    }
+    :deep(.van-search__content) {
+      background-color: #ffffff;
+    }
     :deep(.van-field__left-icon) {
-
       .van-icon__image {
         width: 12px;
         height: 12px;
@@ -104,6 +180,10 @@ onMounted(() => {
         height: 30px;
       }
     }
+    .search-btn {
+      font-size: 14px;
+      color: #2c81ff;
+    }
   }
   .map {
     width: 100%;
@@ -111,7 +191,6 @@ onMounted(() => {
   }
   .text-box {
     padding: 10px;
-    background-color: #fff;
   }
 }
 .checked-box {
@@ -119,19 +198,14 @@ onMounted(() => {
   flex-wrap: wrap;
   width: 100%;
   background-color: #fff;
-  padding: 10px 0;
+  padding: 20px 0;
   .tag-box {
     width: 45px;
-    margin: 0 15px;
+    margin: 0 11px;
     display: flex;
     flex-direction: column;
     align-items: center;
     .tag {
-      width: 45px;
-      height: 45px;
-      border-radius: 8px;
-      background-color: #f4f6f8;
-      border: 1px solid #ededed;
       display: flex;
       justify-content: center;
       align-items: center;
@@ -146,11 +220,13 @@ onMounted(() => {
     .tag {
       position: relative;
       .checked-icon {
-        color: #56bd69;
-        font-size: 20px;
+        width: 10px;
+        height: 10px;
+        background: url('@/assets/images/disasterRiskMonitor/geologicalDisaster/checked.png') no-repeat;
+        background-size: 100% 100%;
         position: absolute;
-        top: -10px;
-        right: -10px;
+        top: -2px;
+        right: -2px;
       }
     }
     .text {
@@ -158,4 +234,24 @@ onMounted(() => {
     }
   }
 }
+.icon1 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon1.png') no-repeat;
+}
+.icon2 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon2.png') no-repeat;
+}
+.icon3 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon3.png') no-repeat;
+}
+.icon4 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon4.png') no-repeat;
+}
+.icon5 {
+  background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon5.png') no-repeat;
+}
+.icon1, .icon2, .icon3, .icon4, .icon5 {
+  width: 32px;
+  height: 33px;
+  background-size: 100% 100%;
+}
 </style>

+ 1 - 76
src/views/leader/index.vue

@@ -364,7 +364,7 @@ onUnmounted(() => {
   }
   .box {
     width: 100%;
-    height: 72px;
+    min-height: 72px;
     background: url("@/assets/images/index/boxBg.png") no-repeat;
     background-size: 100% 100%;
     margin-bottom: 12px;
@@ -427,79 +427,4 @@ onUnmounted(() => {
     }
   }
 }
-
-/*
-.custom-dialog {
-  position: relative;
-  .btn {
-    position: absolute;
-    top: 10px;
-    right: 6px;
-    font-size: 12px;
-    color: #2c81ff;
-  }
-  .line {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    height: 70px;
-    .icon-tip {
-      width: 30px;
-      height: 31px;
-      background: url("@/assets/images/onlineRollCall/tip.png") no-repeat;
-      background-size: 100% 100%;
-    }
-    .text1 {
-      font-size: 24px;
-      color: #2c81ff;
-    }
-  }
-}
-.float-box {
-  position: fixed;
-  right: 10px;
-  bottom: 70px;
-  width: 86px;
-  height: 77px;
-  background: url("@/assets/images/onlineRollCall/float.png") no-repeat;
-  background-size: 100% 100%;
-}
-.custom-dialog2 {
-  .dialog-content {
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    margin-top: 16px;
-  }
-  .img-box {
-    width: 267px;
-    height: 284px;
-    background-color: #ededed;
-    margin-bottom: 16px;
-  }
-  .text1 {
-    font-size: 14px;
-    color: #2c81ff;
-    line-height: 26px;
-  }
-  .text2 {
-    font-size: 12px;
-    color: #ffaf00;
-    line-height: 26px;
-  }
-  .text3 {
-    font-size: 12px;
-    color: #40c75f;
-    line-height: 26px;
-  }
-  .btn {
-    background: #2c81ff;
-    border-radius: 2px;
-    font-size: 12px;
-    color: #ffffff;
-    padding: 3px 14px;
-  }
-}
-*/
 </style>