|
@@ -40,7 +40,16 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { isEdit, monitors, taggings } from "@/store";
|
|
|
|
|
|
+import {
|
|
|
|
+ autoSaveTaggings,
|
|
|
|
+ createTagging,
|
|
|
|
+ defaultStyle,
|
|
|
|
+ isEdit,
|
|
|
|
+ monitors,
|
|
|
|
+ saveTaggings,
|
|
|
|
+ taggings,
|
|
|
|
+ taggingStyles,
|
|
|
|
+} from "@/store";
|
|
import Hot from "./hot/index.vue";
|
|
import Hot from "./hot/index.vue";
|
|
import Monitor from "./monitor/index.vue";
|
|
import Monitor from "./monitor/index.vue";
|
|
import { RightFillPano } from "@/layout";
|
|
import { RightFillPano } from "@/layout";
|
|
@@ -48,6 +57,9 @@ import { nextTick, reactive, ref, watchEffect } from "vue";
|
|
import { currentIsFullView } from "@/utils/full";
|
|
import { currentIsFullView } from "@/utils/full";
|
|
import { Dropdown, MenuItem, Menu } from "ant-design-vue";
|
|
import { Dropdown, MenuItem, Menu } from "ant-design-vue";
|
|
import { selectMaterials } from "@/components/materials/quisk";
|
|
import { selectMaterials } from "@/components/materials/quisk";
|
|
|
|
+import { defStyleType, getStyleTypeId, tqStatusEnum } from "@/api";
|
|
|
|
+import { formatDate } from "@/utils";
|
|
|
|
+import { FileType } from "@/api/material";
|
|
|
|
|
|
const current = ref("tagging");
|
|
const current = ref("tagging");
|
|
const tabs = reactive([
|
|
const tabs = reactive([
|
|
@@ -68,8 +80,44 @@ const quiskAdd = async (key: string) => {
|
|
const exposeTagging = async () => {
|
|
const exposeTagging = async () => {
|
|
const list = await selectMaterials({
|
|
const list = await selectMaterials({
|
|
useType: "trace_evidence",
|
|
useType: "trace_evidence",
|
|
|
|
+ format: ["jpg", "png", "mp4", "mp3", "wav"],
|
|
});
|
|
});
|
|
- console.log(list);
|
|
|
|
|
|
+ if (!list) return;
|
|
|
|
+
|
|
|
|
+ const addTaggings = list!.map((item) => {
|
|
|
|
+ const tagging = createTagging({
|
|
|
|
+ styleId: defStyleType.id.toString(),
|
|
|
|
+ title: item.content?.title || item.name,
|
|
|
|
+ desc: item.content?.feature || "",
|
|
|
|
+ tqTime: formatDate(
|
|
|
|
+ new Date(Number(item.content?.collectedTime) || Date.now()),
|
|
|
|
+ "yyyy-MM-dd hh:mm:ss"
|
|
|
|
+ ),
|
|
|
|
+ part: item.content?.leftPosition || "",
|
|
|
|
+ method: item.content?.collectionModeName || "未送检",
|
|
|
|
+ principal: item.content?.createAccount || "",
|
|
|
|
+ tqStatus: [tqStatusEnum.UN, tqStatusEnum.ING, tqStatusEnum.END][
|
|
|
|
+ item.content?.status || 0
|
|
|
|
+ ],
|
|
|
|
+ });
|
|
|
|
+ if (item.fileType === FileType.IMAGE || item.fileType === FileType.VIDEO) {
|
|
|
|
+ tagging.images.push(item.url);
|
|
|
|
+ }
|
|
|
|
+ if (item.fileType === FileType.MUSIC) {
|
|
|
|
+ tagging.audio = item.url;
|
|
|
|
+ tagging.audioName = item.name;
|
|
|
|
+ }
|
|
|
|
+ if (item.dictId) {
|
|
|
|
+ const typeId = getStyleTypeId(item.dictId);
|
|
|
|
+ const styles = taggingStyles.value.filter((item) => item.typeId === typeId);
|
|
|
|
+ if (styles.length) {
|
|
|
|
+ tagging.styleId = styles[0].id;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return tagging;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ taggings.value.push(...addTaggings);
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|