Compare commits
606 Commits
main
...
fix/change
|
After Width: | Height: | Size: 1.6 KiB |
|
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: 3.6 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 3.5 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: 7.7 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 997 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 977 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 902 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 10 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 |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 31 KiB |
@ -1,98 +1,232 @@
|
|||||||
<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>
|
<script lang="ts" setup>
|
||||||
|
import { defineProps, onBeforeMount, onMounted, ref, watch } from 'vue'
|
||||||
|
import { gettaskToolsCount } from '@/api/home/main'
|
||||||
|
import { useDataHeaderStore } from '@/store/modules/DataHeader'
|
||||||
|
|
||||||
const data = [
|
defineProps({
|
||||||
|
hasColor: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const headerstore = useDataHeaderStore()
|
||||||
|
const datalist = ref([
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/taskCount.png",
|
link: 'count',
|
||||||
title: "任务包总数",
|
title: '任务总数',
|
||||||
count: 6399,
|
count: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/nocheck.png",
|
link: 'wait',
|
||||||
title: "未标记",
|
title: '待审批',
|
||||||
count: 6290,
|
count: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/check.png",
|
link: 'done',
|
||||||
title: "已标记",
|
title: '已审批',
|
||||||
count: 109,
|
count: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/status.png",
|
link: 'resolve',
|
||||||
title: "真",
|
title: '通过',
|
||||||
count: 3290,
|
count: 0,
|
||||||
|
color: '#03c984',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/status.png",
|
link: 'reject',
|
||||||
title: "假",
|
title: '不通过',
|
||||||
count: 3000,
|
count: 0,
|
||||||
|
color: '#ff8b8b',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/pic.png",
|
link: 'reimg',
|
||||||
title: "相似度100%图",
|
title: '图片重复数',
|
||||||
count: 230,
|
count: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: "/src/assets/images/xiaojie.png",
|
link: 'breakcount',
|
||||||
title: "小结重复数",
|
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
|
||||||
|
const 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>
|
</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>
|
||||||
|
<n-tooltip placement="left" trigger="hover">
|
||||||
|
<template #trigger>
|
||||||
|
<SvgIcon size="14px" style="cursor: pointer" name="setting" class="settingSvg" />
|
||||||
|
</template>
|
||||||
|
<span>二期功能开发中...</span>
|
||||||
|
</n-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.header_wrap {
|
.header_wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 20px 30px;
|
padding: 1rem 1rem 1rem 3.125rem;
|
||||||
background: #fff;
|
background: #f5f7f9;
|
||||||
.header_item {
|
margin-bottom: 1rem;
|
||||||
width: 10%;
|
// 180-62 header
|
||||||
|
padding-left: 2.125rem;
|
||||||
|
.header_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row nowrap;
|
flex-flow: row nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
img{
|
min-width: 10%;
|
||||||
width: 50px;
|
.header_item {
|
||||||
height: 50px
|
display: flex;
|
||||||
}
|
flex-flow: row nowrap;
|
||||||
.data_wrap {
|
align-items: center;
|
||||||
.data_title {
|
justify-content: center;
|
||||||
font-size: 20px;
|
svg {
|
||||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
width: 2.75rem !important;
|
||||||
font-weight: Bold;
|
height: 2.75rem !important;
|
||||||
text-align: left;
|
|
||||||
color: #202020;
|
|
||||||
line-height: 23px;
|
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
.data_content {
|
.data_wrap {
|
||||||
opacity: 0.6;
|
margin-left: 0.75rem;
|
||||||
font-size: 14px;
|
.data_title {
|
||||||
font-family: PingFang SC, PingFang SC-Regular;
|
font-size: 1.125rem;
|
||||||
font-weight: Regular;
|
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
||||||
text-align: center;
|
font-weight: 900;
|
||||||
color: #202020;
|
text-align: left;
|
||||||
line-height: 16px;
|
color: #202020;
|
||||||
text-align: center;
|
line-height: 1.4375rem;
|
||||||
white-space: nowrap;
|
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>
|
</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,37 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineOptions, ref } from 'vue'
|
import { defineOptions, ref } from "vue";
|
||||||
import Quill from '@/components/RichEditor/Quill.vue'
|
import Quill from "@/components/RichEditor/Quill.vue";
|
||||||
|
import { useKeydown } from '@/hooks/event/useKeydown'
|
||||||
|
|
||||||
defineOptions({ name: 'FilterModal' })
|
defineOptions({ name: "FilterModal" });
|
||||||
|
|
||||||
const emit = defineEmits(['showNewFilter'])
|
const emit = defineEmits(["showNewFilter"]);
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false);
|
||||||
|
|
||||||
function showModal() {
|
function showModal() {
|
||||||
show.value = true
|
show.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
show.value = false
|
show.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
showModal,
|
showModal,closeModal
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<n-modal v-model:show="show" transform-origin="center">
|
<n-modal
|
||||||
<Quill />
|
v-model:show="show"
|
||||||
|
transform-origin="center"
|
||||||
|
style="margin: calc(13%-147px) auto 0 !important"
|
||||||
|
>
|
||||||
|
<Quill @close="show = false" />
|
||||||
</n-modal>
|
</n-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -1,24 +1,32 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import Search from '@/components/Search/Search.vue'
|
import Search from '@/components/Search/Search.vue'
|
||||||
|
import { useKeydown } from '@/hooks/event/useKeydown'
|
||||||
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
function showModal() {
|
function showModal() {
|
||||||
show.value = true
|
show.value = true
|
||||||
}
|
}
|
||||||
|
function closeModal() {
|
||||||
|
show.value = false
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
showModal,
|
showModal,closeModal
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<n-modal v-model:show="show" :mask="false" :showMask="false" transform-origin="center">
|
<n-modal
|
||||||
|
v-model:show="show"
|
||||||
|
:mask="false"
|
||||||
|
:show-mask="false"
|
||||||
|
transform-origin="center"
|
||||||
|
>
|
||||||
<Search @close="show = false" />
|
<Search @close="show = false" />
|
||||||
</n-modal>
|
</n-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less"></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { store } from '@/store'
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||