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>
|
||||
import { defineProps, onBeforeMount, onMounted, ref, watch } 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: 'count',
|
||||
title: '任务总数',
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: 'wait',
|
||||
title: '待审批',
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: 'done',
|
||||
title: '已审批',
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: 'resolve',
|
||||
title: '通过',
|
||||
count: 0,
|
||||
color: '#03c984',
|
||||
},
|
||||
{
|
||||
link: 'reject',
|
||||
title: '不通过',
|
||||
count: 0,
|
||||
color: '#ff8b8b',
|
||||
},
|
||||
{
|
||||
link: 'reimg',
|
||||
title: '图片重复数',
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
link: 'breakcount',
|
||||
title: '小结重复数',
|
||||
count: 0,
|
||||
},
|
||||
])
|
||||
|
||||
const data = [
|
||||
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: "/src/assets/images/taskCount.png",
|
||||
title: "任务包总数",
|
||||
count: 6399,
|
||||
link: 'count',
|
||||
title: '任务总数',
|
||||
count: total,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/nocheck.png",
|
||||
title: "未标记",
|
||||
count: 6290,
|
||||
link: 'wait',
|
||||
title: '待审批',
|
||||
count: treat,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/check.png",
|
||||
title: "已标记",
|
||||
count: 109,
|
||||
link: 'done',
|
||||
title: '已审批',
|
||||
count: alreadyApprove,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/status.png",
|
||||
title: "真",
|
||||
count: 3290,
|
||||
link: 'resolve',
|
||||
title: '通过',
|
||||
count: approvedCount,
|
||||
color: '#03c984',
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/status.png",
|
||||
title: "假",
|
||||
count: 3000,
|
||||
link: 'reject',
|
||||
title: '不通过',
|
||||
count: notGoCount,
|
||||
color: '#ff8b8b',
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/pic.png",
|
||||
title: "相似度100%图",
|
||||
count: 230,
|
||||
link: 'reimg',
|
||||
title: '图片重复数',
|
||||
count: repeat,
|
||||
},
|
||||
{
|
||||
link: "/src/assets/images/xiaojie.png",
|
||||
title: "小结重复数",
|
||||
count: 365,
|
||||
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>
|
||||
<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">
|
||||
.header_wrap {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 30px;
|
||||
background: #fff;
|
||||
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;
|
||||
min-width: 10%;
|
||||
.header_item {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img{
|
||||
width: 50px;
|
||||
height: 50px
|
||||
svg {
|
||||
width: 2.75rem !important;
|
||||
height: 2.75rem !important;
|
||||
}
|
||||
.data_wrap {
|
||||
margin-left: 0.75rem;
|
||||
.data_title {
|
||||
font-size: 20px;
|
||||
font-size: 1.125rem;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
||||
font-weight: Bold;
|
||||
font-weight: 900;
|
||||
text-align: left;
|
||||
color: #202020;
|
||||
line-height: 23px;
|
||||
line-height: 1.4375rem;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.data_content {
|
||||
opacity: 0.6;
|
||||
font-size: 14px;
|
||||
font-size: 0.75rem;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: #202020;
|
||||
line-height: 16px;
|
||||
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,37 @@
|
||||
<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";
|
||||
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() {
|
||||
show.value = true
|
||||
show.value = true;
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
show.value = false
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
})
|
||||
showModal,closeModal
|
||||
});
|
||||
</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>
|
||||
|
||||
@ -1,24 +1,32 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import Search from '@/components/Search/Search.vue'
|
||||
import { useKeydown } from '@/hooks/event/useKeydown'
|
||||
|
||||
const show = ref(false)
|
||||
function showModal() {
|
||||
show.value = true
|
||||
}
|
||||
function closeModal() {
|
||||
show.value = false
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
showModal,closeModal
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<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" />
|
||||
</n-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
<style scoped lang="less"></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)
|
||||
}
|
||||