Compare commits
482 Commits
main
...
fix/simila
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 180 KiB |
@ -1,98 +1,230 @@
|
||||
<template>
|
||||
<div class="header_wrap">
|
||||
<div v-for="(item, index) in data" :key="index" class="header_item">
|
||||
<img :src="item.link" />
|
||||
<div class="data_wrap">
|
||||
<div class="data_title">{{ item.count }}</div>
|
||||
<div class="data_content">{{ item.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<SvgIcon size="14px" style="cursor: pointer" name="setting"></SvgIcon>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
const data = [
|
||||
import { defineProps, onMounted, ref,watch,onBeforeMount } from "vue";
|
||||
import { gettaskToolsCount } from "@/api/home/main";
|
||||
import { useDataHeaderStore } from '@/store/modules/DataHeader'
|
||||
defineProps({
|
||||
hasColor: {
|
||||
type: Boolean,
|
||||
default: () => false,
|
||||
},
|
||||
});
|
||||
const headerstore=useDataHeaderStore()
|
||||
const datalist = ref([
|
||||
{
|
||||
link: "/src/assets/images/taskCount.png",
|
||||
title: "任务包总数",
|
||||
count: 6399,
|
||||
link: "count",
|
||||
title: "任务总数",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/nocheck.png",
|
||||
title: "未标记",
|
||||
count: 6290,
|
||||
link: "wait",
|
||||
title: "待审批",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/check.png",
|
||||
title: "已标记",
|
||||
count: 109,
|
||||
link: "done",
|
||||
title: "已审批",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/status.png",
|
||||
title: "真",
|
||||
count: 3290,
|
||||
link: "resolve",
|
||||
title: "通过",
|
||||
count: 0,
|
||||
color: "#03c984",
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/status.png",
|
||||
title: "假",
|
||||
count: 3000,
|
||||
link: "reject",
|
||||
title: "不通过",
|
||||
count: 0,
|
||||
color: "#ff8b8b",
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/pic.png",
|
||||
title: "相似度100%图",
|
||||
count: 230,
|
||||
link: "reimg",
|
||||
title: "图片重复数",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/xiaojie.png",
|
||||
link: "breakcount",
|
||||
title: "小结重复数",
|
||||
count: 365,
|
||||
count: 0,
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
function initRem() {
|
||||
const designWidth = 1440;
|
||||
const rempPx = 16;
|
||||
const scale = window.innerWidth / designWidth;
|
||||
document.documentElement.style.fontSize = `${scale * rempPx}px`;
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
initRem();
|
||||
getData();
|
||||
setTimeout(() => {
|
||||
headerstore.setDataConfig(false)
|
||||
// alert(headerstore.DataConfig)
|
||||
}, 500);
|
||||
// headerstore.setDataConfig(false)
|
||||
});
|
||||
|
||||
async function getData() {
|
||||
const { data } = await gettaskToolsCount();
|
||||
if (data) {
|
||||
const {
|
||||
total,
|
||||
treat,
|
||||
alreadyApprove,
|
||||
repeatedNodules,
|
||||
repeat,
|
||||
approvedCount,
|
||||
notGoCount,
|
||||
} = data;
|
||||
let newdata=[
|
||||
{
|
||||
link: "count",
|
||||
title: "任务总数",
|
||||
count: total,
|
||||
},
|
||||
{
|
||||
link: "wait",
|
||||
title: "待审批",
|
||||
count: treat,
|
||||
},
|
||||
{
|
||||
link: "done",
|
||||
title: "已审批",
|
||||
count: alreadyApprove,
|
||||
},
|
||||
{
|
||||
link: "resolve",
|
||||
title: "通过",
|
||||
count: approvedCount,
|
||||
color: "#03c984",
|
||||
},
|
||||
{
|
||||
link: "reject",
|
||||
title: "不通过",
|
||||
count: notGoCount,
|
||||
color: "#ff8b8b",
|
||||
},
|
||||
{
|
||||
link: "reimg",
|
||||
title: "图片重复数",
|
||||
count: repeat,
|
||||
},
|
||||
{
|
||||
link: "breakcount",
|
||||
title: "小结重复数",
|
||||
count: repeatedNodules,
|
||||
},
|
||||
]
|
||||
datalist.value =newdata ;
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => headerstore.DataConfig,
|
||||
(newval) => {
|
||||
|
||||
if(headerstore.DataConfig){
|
||||
getData();
|
||||
headerstore.setDataConfig(false)
|
||||
}
|
||||
},
|
||||
)
|
||||
defineExpose({
|
||||
getData,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="header_wrap" :style="hasColor ? '' : 'margin-top: 7.375rem;'">
|
||||
|
||||
<div v-for="(item, index) in datalist" :key="index" class="header_box">
|
||||
<div class="header_item">
|
||||
<SvgIcon :name="item.link" :style="index == 0 ? 'margin-left:0.5rem' : ''" />
|
||||
<div class="data_wrap">
|
||||
<div class="data_title" :style="hasColor ? `color:${item.color || ''}` : ''">
|
||||
{{ item.count }}
|
||||
</div>
|
||||
<div class="data_content">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="line"
|
||||
:style="
|
||||
hasColor
|
||||
? 'margin-left:2.5rem;margin-right:2.0625rem'
|
||||
: 'margin-left:1.25rem;margin-right:0.8125rem'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<SvgIcon size="14px" style="cursor: pointer" name="setting" class="settingSvg" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.header_wrap {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 30px;
|
||||
background: #fff;
|
||||
.header_item {
|
||||
width: 10%;
|
||||
padding: 1rem 1rem 1rem 3.125rem;
|
||||
background: #f5f7f9;
|
||||
margin-bottom: 1rem;
|
||||
// 180-62 header
|
||||
padding-left: 2.125rem;
|
||||
.header_box {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img{
|
||||
width: 50px;
|
||||
height: 50px
|
||||
}
|
||||
.data_wrap {
|
||||
.data_title {
|
||||
font-size: 20px;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
||||
font-weight: Bold;
|
||||
text-align: left;
|
||||
color: #202020;
|
||||
line-height: 23px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
min-width: 10%;
|
||||
.header_item {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
svg {
|
||||
width: 2.75rem !important;
|
||||
height: 2.75rem !important;
|
||||
}
|
||||
.data_content {
|
||||
opacity: 0.6;
|
||||
font-size: 14px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: center;
|
||||
color: #202020;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
.data_wrap {
|
||||
margin-left: 0.75rem;
|
||||
.data_title {
|
||||
font-size: 1.125rem;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
||||
font-weight: 900;
|
||||
text-align: left;
|
||||
color: #202020;
|
||||
line-height: 1.4375rem;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data_content {
|
||||
opacity: 0.6;
|
||||
font-size: 0.75rem;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: #202020;
|
||||
line-height: 1rem;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.settingSvg {
|
||||
width: 1rem !important;
|
||||
height: 1rem !important;
|
||||
}
|
||||
.line {
|
||||
width: 0.0625rem;
|
||||
height: 1.25rem;
|
||||
background: #e8e8e8;
|
||||
}//
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div class="ip_box" :style="canClick?'cursor: pointer;':''">
|
||||
<img :src="IPImg" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import IPImg from "@/assets/images/IP.png";
|
||||
import { defineProps } from "vue";
|
||||
|
||||
defineProps({
|
||||
canClick: {
|
||||
type: Boolean,
|
||||
default: () => false,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.ip_box {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 20px;
|
||||
z-index: 1000;
|
||||
img {
|
||||
width: 80px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,14 @@
|
||||
import { inject, onMounted, onUnmounted, ref } from "vue"
|
||||
|
||||
export const useKeydown = (key,handler) => {
|
||||
const mousetrap = inject('mousetrap') as any
|
||||
const event = ref()
|
||||
onMounted(() => {
|
||||
event.value = mousetrap.bind(key, handler)
|
||||
|
||||
})
|
||||
onUnmounted(() => {
|
||||
event.value.unbind(key, handler)
|
||||
})
|
||||
|
||||
}
|
||||
@ -1,34 +1,36 @@
|
||||
<script lang="ts" setup>
|
||||
import { defineOptions, ref } from 'vue'
|
||||
import Quill from '@/components/RichEditor/Quill.vue'
|
||||
import { defineOptions, ref } from "vue";
|
||||
import Quill from "@/components/RichEditor/Quill.vue";
|
||||
|
||||
defineOptions({ name: 'FilterModal' })
|
||||
defineOptions({ name: "FilterModal" });
|
||||
|
||||
const emit = defineEmits(['showNewFilter'])
|
||||
const emit = defineEmits(["showNewFilter"]);
|
||||
|
||||
const show = ref(false)
|
||||
const show = ref(false);
|
||||
|
||||
function showModal() {
|
||||
show.value = true
|
||||
show.value = true;
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
show.value = false
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-modal v-model:show="show" transform-origin="center">
|
||||
<Quill />
|
||||
<n-modal
|
||||
v-model:show="show"
|
||||
transform-origin="center"
|
||||
style="margin: calc(13%-147px) auto 0 !important"
|
||||
>
|
||||
<Quill @close="show = false" />
|
||||
</n-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
import { store } from '@/store'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export interface ConfigState {
|
||||
|
||||
DataConfig: boolean
|
||||
}
|
||||
|
||||
export const useDataHeaderStore = defineStore({
|
||||
id: 'app-config',
|
||||
state: (): ConfigState => ({
|
||||
|
||||
DataConfig: false,
|
||||
|
||||
}),
|
||||
getters: {
|
||||
|
||||
getDataConfig():boolean {
|
||||
return this.DataConfig
|
||||
},
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
setDataConfig(value) {
|
||||
|
||||
this.DataConfig = value
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
// Need to be used outside the setup
|
||||
export function useConfig() {
|
||||
return useDataHeaderStore(store)
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { useConfig } from '@/store/modules/asideConfig'
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:value', value: boolean): void
|
||||
}>()
|
||||
|
||||
const configStore = useConfig()
|
||||
|
||||
const download = ref(props.value)
|
||||
|
||||
function onChange(value: boolean) {
|
||||
emit('update:value', value)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="download">
|
||||
<span class="download-title">{{ label }}</span>
|
||||
<n-switch v-model:value="download" @update:value="onChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.download {
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
justify-content: space-between;
|
||||
|
||||
&-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
</style>
|
||||