Hwf пре 10 месеци
родитељ
комит
02519b247a

+ 0 - 74
src/components/Dialog/index2.vue

@@ -1,74 +0,0 @@
-<template>
-  <div v-if="modelValue" class="dialog-wrap" :style="{ width: width ? width : '780px', height: height ? height : '590px' }">
-<!--    <div class="overlay" @click="closeDialog"></div>-->
-    <div class="dialog" :style="{ width: width ? width : '780px', height: height ? height : '590px' }">
-      <div class="dialog-header">
-        <div class="dialog-title">{{ title }}</div>
-        <div class="icon-close" @click="closeDialog">
-          <el-icon size="40px"><Close /></el-icon>
-        </div>
-      </div>
-      <div class="dialog-content">
-        <slot />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script lang="ts" setup>
-interface Props {
-  modelValue: boolean;
-  title?: string;
-  width?: string;
-  height?: string;
-}
-const props = withDefaults(defineProps<Props>(), {
-  modelValue: false
-});
-const emit = defineEmits(['update:modelValue', 'close']);
-
-// 关闭弹窗
-const closeDialog = () => {
-  emit('update:modelValue', false);
-  emit('close');
-};
-</script>
-
-<style lang="scss" scoped>
-.dialog-wrap {
-  position: fixed;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-  z-index: 2000;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 16px;
-  .dialog {
-    height: 590px;
-    margin: 0 auto;
-    background-color: #fff;
-    border-radius: 10px;
-  }
-}
-.dialog {
-  padding: 0 20px;
-  .dialog-header {
-    width: 100%;
-    height: 70px;
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    .dialog-title {
-      font-size: 36px;
-    }
-    .icon-close {
-      cursor: pointer;
-    }
-  }
-  .dialog-content {
-    padding: 10px 0;
-  }
-}
-</style>

+ 0 - 89
src/components/Dialog/index3.vue

@@ -1,89 +0,0 @@
-<template>
-  <div>
-    <template v-for="(item, index) in options">
-      <template v-if="values.includes(item.value)">
-        <span v-if="item.elTagType === 'default' || item.elTagType === ''" :key="item.value" :index="index" :class="item.elTagClass">
-          {{ item.label + ' ' }}
-        </span>
-        <el-tag
-          v-else
-          :key="item.value + ''"
-          :disable-transitions="true"
-          :index="index"
-          :type="
-            item.elTagType === 'primary' ||
-            item.elTagType === 'success' ||
-            item.elTagType === 'info' ||
-            item.elTagType === 'warning' ||
-            item.elTagType === 'danger'
-              ? item.elTagType
-              : 'default'
-          "
-          :class="item.elTagClass"
-        >
-          {{ item.label + ' ' }}
-        </el-tag>
-      </template>
-    </template>
-    <template v-if="unmatch && showValue">
-      {{ unmatchArray }}
-    </template>
-  </div>
-</template>
-
-<script setup lang="ts">
-interface Props {
-  options: Array<DictDataOption>;
-  value: number | string | Array<number | string>;
-  showValue?: boolean;
-  separator?: string;
-}
-const props = withDefaults(defineProps<Props>(), {
-  showValue: true,
-  separator: ','
-});
-
-const values = computed(() => {
-  if (props.value === '' || props.value === null || typeof props.value === 'undefined') return [];
-  return Array.isArray(props.value) ? props.value.map((item) => '' + item) : String(props.value).split(props.separator);
-});
-
-const unmatch = computed(() => {
-  if (props.options?.length == 0 || props.value === '' || props.value === null || typeof props.value === 'undefined') return false;
-  // 传入值为非数组
-  let unmatch = false; // 添加一个标志来判断是否有未匹配项
-  values.value.forEach((item) => {
-    if (!props.options.some((v) => v.value === item)) {
-      unmatch = true; // 如果有未匹配项,将标志设置为true
-    }
-  });
-  return unmatch; // 返回标志的值
-});
-
-const unmatchArray = computed(() => {
-  // 记录未匹配的项
-  const itemUnmatchArray: Array<string | number> = [];
-  if (props.value !== '' && props.value !== null && typeof props.value !== 'undefined') {
-    values.value.forEach((item) => {
-      if (!props.options.some((v) => v.value === item)) {
-        itemUnmatchArray.push(item);
-      }
-    });
-  }
-  // 没有value不显示
-  return handleArray(itemUnmatchArray);
-});
-
-const handleArray = (array: Array<string | number>) => {
-  if (array.length === 0) return '';
-  return array.reduce((pre, cur) => {
-    return pre + ' ' + cur;
-  });
-};
-</script>
-
-<style scoped>
-.el-tag + .el-tag {
-  margin-left: 10px;
-}
-</style>

+ 1 - 1
src/components/TimeAxis/index.vue

@@ -48,7 +48,7 @@
 
 <script lang="ts" setup name="TimeAxis">
 import { parseTime } from '@/utils/ruoyi';
-import Dialog from '@/components/Dialog/index2.vue';
+import Dialog from '@/components/Dialog/index.vue';
 import img1 from './tempImg/img1.jfif';
 import img2 from './tempImg/img2.jfif';
 import img3 from './tempImg/img3.jfif';

+ 0 - 2
src/types/components.d.ts

@@ -78,8 +78,6 @@ declare module 'vue' {
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
-    Index2: typeof import('./../components/Dialog/index2.vue')['default']
-    Index3: typeof import('./../components/Dialog/index3.vue')['default']
     LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
     Map: typeof import('./../components/Map/index.vue')['default']
     MapLogical: typeof import('./../components/Map/MapLogical.vue')['default']

+ 1 - 1
src/views/globalMap/RightMenu/Reservoir.vue

@@ -39,7 +39,7 @@
 
 <script lang="ts" setup>
 import { Search } from '@element-plus/icons-vue';
-import Dialog from '@/components/Dialog/index2.vue';
+import Dialog from '@/components/Dialog/index.vue';
 import { getWaterList2 } from '@/api/globalMap/reservoir';
 import { deepClone } from '@/utils';
 

+ 1 - 1
src/views/globalMap/RightMenu/ReservoirMonitor.vue

@@ -102,7 +102,7 @@
 </template>
 
 <script lang="ts" setup name="ReservoirMonitor">
-import Dialog from '@/components/Dialog/index2.vue';
+import Dialog from '@/components/Dialog/index.vue';
 import { option3 } from './echartOptions';
 import { getReservoirCourseLevel, getReservoirList, getReservoirWaterStatus } from '@/api/globalMap/reservoirMonitor';
 import { parseTime } from '@/utils/ruoyi';

+ 1 - 1
src/views/globalMap/RightMenu/RoadNetworkVideo.vue

@@ -44,7 +44,7 @@
 <script lang="ts" setup>
 import { Search } from '@element-plus/icons-vue';
 import { getEmergencyVideoCata } from '@/api/routineCommandMap';
-import Dialog from '@/components/Dialog/index2.vue';
+import Dialog from '@/components/Dialog/index.vue';
 import { deepClone } from '@/utils';
 import { getWaterList2 } from '@/api/globalMap/reservoir';
 import { getRoadVideoList } from '@/api/globalMap/roadNetworkVideo';