bill 1 周之前
父節點
當前提交
662c792128

+ 8 - 0
src/components/materials/index.vue

@@ -69,6 +69,14 @@
                 </span>
               </div>
             </template>
+            <template v-if="column.key === 'caseTitle'">
+              <div class="name">
+                <span>
+                  {{ record.caseTitle || "-" }}
+                </span>
+              </div>
+            </template>
+
             <template v-if="column.key === 'size'">
               {{ getSizeStr(record.size) }}
             </template>

+ 2 - 2
src/components/tagging/sign-new.vue

@@ -35,9 +35,9 @@
           </div>
           <template v-if="defStyleType.id !== taggingStyle?.typeId">
             <p><span>提取方法:</span>{{ tagging.method }}</p>
-            <p><span>提取时间:</span>{{ tagging.method }}</p>
+            <p><span>提取时间:</span>{{ tagging.tqTime }}</p>
             <p><span>提取人:</span>{{ tagging.principal }}</p>
-            <p><span>委托状态:</span>{{ tagging.principal }}</p>
+            <p><span>委托状态:</span>{{ tagging.tqStatus }}</p>
           </template>
         </div>
         <Images

+ 3 - 2
src/store/tagging-style.ts

@@ -34,10 +34,11 @@ export const createTaggingStyle = (style: Partial<TaggingStyle> = {}): TaggingSt
 })
 
 export const getTaggingStyle = (id: TaggingStyle['id']) => {
-  return taggingStyles.value.find(style => Number(style.id) === Number(id))
+  return taggingStyles.value.find(style => {
+    return style.id === id || Number(style.id) === Number(id)
+  })
 }
 
-
 let bcStyles: TaggingStyles = []
 export const getBackupTaggingStyles = () => bcStyles
 export const backupTaggingStyles = () => {

+ 1 - 1
src/store/tagging.ts

@@ -55,7 +55,7 @@ export const createTagging = (tagging: Partial<Tagging> = {}): Tagging => {
     styleId: '',
     desc: '',
     part: '',
-    method: '',
+    method: '未送检',
     show3dTitle: false,
     audioName: '',
     principal: '',

+ 7 - 0
src/views/setting/index.vue

@@ -6,6 +6,7 @@
           :value="caseProject!.fusionTitle"
           @update:value="(title: string) => changeBack(undefined, title)"
           style="width: 100%; height: 40px"
+          defaultValue="多元融合"
           :maxlength="500"
         />
       </ui-group-option>
@@ -57,6 +58,7 @@ import { analysisPose, sdk } from "@/sdk";
 import selectBack from "./select-back.vue";
 import { Input } from "ant-design-vue";
 import { updateCaseInfo } from "@/api";
+import Message from "bill/components/message/message.vue";
 
 const updateGPS = (val: any) => {
   console.log(val);
@@ -109,8 +111,13 @@ const changeBack = (mapData?: [string | null, number | null], title?: string) =>
       isFirst = true;
     });
     enterOld(async () => {
+      if (!caseProject.value?.fusionTitle?.trim()) {
+        Message.error("标题不能为空");
+        throw "标题不能为空";
+      }
       initBack = setting.value!.back;
       initMapId = setting.value!.mapId;
+      caseProject.value!.fusionTitle = caseProject.value?.fusionTitle?.trim();
       initTitle = caseProject.value?.fusionTitle;
       isSave = true;
 

+ 5 - 6
src/views/tagging/hot/edit.vue

@@ -6,10 +6,7 @@
         <ui-icon type="close" ctrl @click.stop="$emit('quit')" class="edit-close" />
       </h3>
       <div class="style-select">
-        <span>图标样式</span>
-        <span>
-          <StyleTypeSelect v-model:value="type" />
-        </span>
+        <StyleTypeSelect v-model:value="type" />
       </div>
 
       <StylesManage
@@ -58,7 +55,7 @@
           class="input preplace"
           width="100%"
           placeholder=""
-          type="select"
+          type="search"
           v-model="tagging.method"
           :options="tqMethodOptions"
         >
@@ -180,7 +177,7 @@
 </template>
 
 <script lang="ts" setup>
-import StyleTypeSelect from "./style-type-select.vue";
+import StyleTypeSelect from "./style-float-select.vue";
 import StylesManage from "./styles.vue";
 import Images from "./images.vue";
 
@@ -232,6 +229,7 @@ const tqMethodOptions = [
   { label: "领导审批", value: "领导审批" },
   { label: "打印报告", value: "打印报告" },
   { label: "提交归档", value: "提交归档" },
+  { label: "确认归档", value: "确认归档" },
   { label: "文书发放", value: "文书发放" },
   { label: "检验鉴定完成", value: "检验鉴定完成" },
   { label: "自动失效", value: "自动失效" },
@@ -327,6 +325,7 @@ const uploadStyle = (style: TaggingStyle) => {
   style.typeId = type.value;
   taggingStyles.value.push(style);
   tagging.value.styleId = style.id;
+  console.log("--->", tagging.value.styleId, style);
 };
 
 const audioChange = (file: LocalImageFile) => {

+ 5 - 2
src/views/tagging/hot/images.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref } from "vue";
+import { ref, watchEffect } from "vue";
 import { getFileUrl } from "@/utils";
 import { Tagging } from "@/store";
 import { getResource } from "@/env";
@@ -41,12 +41,15 @@ export type ImagesProps = {
   hideInfo?: boolean;
 };
 
-defineProps<ImagesProps>();
+const props = defineProps<ImagesProps>();
 defineEmits<{
   (e: "pull", index: number): void;
   (e: "change", i: number): void;
 }>();
 const index = ref(0);
+watchEffect(() => {
+  index.value = Math.max(0, Math.min(props.tagging.images.length - 1, index.value));
+});
 </script>
 
 <style lang="scss" scoped>

+ 225 - 0
src/views/tagging/hot/style-float-select.vue

@@ -0,0 +1,225 @@
+<template>
+  <Dropdown
+    placement="bottom"
+    v-if="current.length"
+    v-model:open="visible"
+    :trigger="['click']"
+  >
+    <div class="fsd">
+      <ui-input
+        type="text"
+        readonly
+        :modelValue="[current[current.length - 1]] .map((i: any) => i.title).join('/')"
+        width="100%"
+      >
+        <template #icon>
+          <DownOutlined />
+        </template>
+      </ui-input>
+    </div>
+    <!-- <DownOutlined /> -->
+    <template #overlay>
+      <div class="flat" @click.stop="visible = true">
+        <div>
+          <span
+            v-for="item in items"
+            @click.stop="
+              () => {
+                handleClick(item), !item.children && (visible = false);
+              }
+            "
+            :class="{ active: current?.includes(item) }"
+          >
+            {{ item.title }}
+            <DownOutlined v-if="item.children?.length" class="jdd" />
+          </span>
+        </div>
+        <div>
+          <template v-if="current[0].children">
+            <span
+              v-for="item in current[0].children"
+              @click.stop="
+                () => {
+                  handleClick(item), (visible = false);
+                }
+              "
+              :class="{ active: current?.includes(item) }"
+            >
+              {{ item.title }}
+            </span>
+          </template>
+        </div>
+      </div>
+    </template>
+  </Dropdown>
+</template>
+
+<script lang="ts" setup>
+import { styleTypes } from "@/api";
+import { computed, ref, watchEffect } from "vue";
+import { Menu, Dropdown } from "ant-design-vue";
+import { DownOutlined } from "@ant-design/icons-vue";
+import { taggings, getTaggingStyle } from "@/store";
+
+const props = defineProps<{ value: number; all?: boolean; count?: boolean }>();
+const emit = defineEmits<{ (e: "update:value", v: number): void }>();
+const allType = { name: "全部", id: -1 };
+const getTypeCount = (item: any) => {
+  if (item.id === allType.id) {
+    return taggings.value.length;
+  } else if (item.children) {
+    return item.children.reduceRight((c: number, item: any) => {
+      return (
+        c +
+        taggings.value.filter((tag) => {
+          return getTaggingStyle(tag.styleId)?.typeId === item.id;
+        }).length
+      );
+    }, 0);
+  } else {
+    return taggings.value.filter((tag) => {
+      return getTaggingStyle(tag.styleId)?.typeId === item.id;
+    }).length;
+  }
+};
+const open = ref(false);
+
+const getItems = (types = styleTypes): any => {
+  return types
+    .map((item) => {
+      let count = 0;
+      if (props.count) {
+        count = getTypeCount(item);
+      }
+      return {
+        label: item.name + (props.count ? ` (${count}) ` : ""),
+        title: item.name,
+        count,
+        key: item.id,
+        children: "children" in item ? getItems(item.children) : null,
+      };
+    })
+    .filter((item) => !props.count || item.count || item.key === allType.id);
+};
+const getCurrentItem = (type: number, all = items.value): any => {
+  for (const item of all) {
+    if (type === item.key) {
+      return [item];
+    } else if ("children" in item && item.children) {
+      const citem = getCurrentItem(type, item.children);
+      if (citem.length) {
+        return [item, ...citem];
+      }
+    }
+  }
+  return [];
+};
+const types = computed(() => {
+  if (props.all) {
+    return [allType, ...styleTypes];
+  } else {
+    return styleTypes;
+  }
+});
+const visible = ref(false);
+const items = computed(() => getItems(types.value));
+const current = computed(() => getCurrentItem(props.value));
+
+if (props.count && props.all) {
+  watchEffect(() => {
+    if (
+      current.value.length === 0 ||
+      current.value[current.value.length - 1].count === 0
+    ) {
+      emit("update:value", allType.id);
+    }
+  });
+}
+const handleClick = (info: any) => {
+  emit("update:value", info.key);
+};
+</script>
+
+<style scoped lang="scss">
+span {
+  font-size: 14px;
+  cursor: pointer;
+
+  .count {
+    color: var(--color-main-normal);
+  }
+}
+
+.current {
+  width: 100%;
+  display: flex;
+}
+
+.flat {
+  width: 370px;
+  height: 588px;
+
+  background: rgba(27, 27, 28, 0.8);
+  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3);
+  border-radius: 4px;
+  display: flex;
+
+  > div {
+    height: 100%;
+    overflow-y: auto;
+    display: flex;
+    flex-direction: column;
+
+    &:first-child {
+      width: 120px;
+      border-right: 1px solid #4a4a4a;
+    }
+
+    &:last-child {
+      flex: 1;
+    }
+
+    span {
+      padding: 12px 20px;
+      font-size: 14px;
+      color: #ffffff;
+      position: relative;
+
+      .jdd {
+        position: absolute;
+        top: 50%;
+        right: 5px;
+        color: currentColor;
+        transform: translateY(-50%) rotate(-90deg);
+        padding: 0;
+      }
+
+      &.active {
+        color: #00c8af;
+      }
+    }
+  }
+}
+
+.fsd {
+  position: relative;
+  width: 100%;
+  cursor: pointer;
+  &::after {
+    content: "";
+    position: absolute;
+    inset: 0;
+    z-index: 999;
+  }
+}
+</style>
+
+<style>
+.ant-dropdown-menu-sub.ant-dropdown-menu-vertical {
+  margin-left: -5px;
+}
+
+.ant-dropdown-menu {
+  border-radius: 2px !important;
+}
+</style>