Compare commits

..

1 Commits

13477
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -26,7 +26,8 @@ export async function getPictureTypeList(): Promise<any> {
url: `/static/admin/web/distionary/bytypecode/izpicturetype`, url: `/static/admin/web/distionary/bytypecode/izpicturetype`,
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[]
const list = res.data[0].distionaryList
return list return list
} }
@ -72,7 +73,7 @@ export async function getTFList() {
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -144,7 +145,7 @@ export async function getIztaskrromList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -160,7 +161,7 @@ export async function getIztaskstatusList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -190,7 +191,7 @@ export async function getIzfirmList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -206,7 +207,7 @@ export async function getIzproductnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -222,7 +223,7 @@ export async function getizcustomnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -236,7 +237,7 @@ export async function getIzCustomtypeList(): Promise<any> {
method: 'get', method: 'get',
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -252,7 +253,7 @@ export async function getIzcustomlevel(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -268,7 +269,7 @@ export async function getIzprojecttypeList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list return list
} }
@ -297,7 +298,8 @@ export async function getRejectList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] const list = res.data[0].distionaryList
return list
} }
/** /**
@ -310,7 +312,7 @@ export async function getBackList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
@ -363,7 +365,7 @@ export async function getRelationTypeList() {
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
@ -375,7 +377,7 @@ export async function getizstatusList() {
url: `/static/admin/web/distionary/bytypecode/izstatus`, url: `/static/admin/web/distionary/bytypecode/izstatus`,
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }
/** /**
@ -387,5 +389,5 @@ export async function getizApprovalStatusList() {
url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`, url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
method: 'get', method: 'get',
}) })
return res.data&&res.data.length?res.data[0].distionaryList:[] return res.data[0].distionaryList
} }

@ -15,7 +15,6 @@ export async function getApprovalList(page: any) {
pageSize: page.pageSize, pageSize: page.pageSize,
currPage: page.pageNo, currPage: page.pageNo,
keyword: page.keyword, keyword: page.keyword,
userSearchId:page.userSearchId
}, },
}) })

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>卡片模式</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-3040.000000, -6389.000000)" fill-rule="nonzero">
<g id="卡片模式" transform="translate(3040.000000, 6389.000000)">
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="64" height="64"></rect>
<path d="M52.8,52.8 L52.8,38.95 L38.95,38.95 L38.95,52.8 L52.8,52.8 M25.05,52.8 L25.05,38.95 L11.2,38.95 L11.2,52.8 L25.05,52.8 M52.8,25.05 L52.8,11.2 L38.95,11.2 L38.95,25.05 L52.8,25.05 M25.05,25.05 L25.05,11.2 L11.2,11.2 L11.2,25.05 L25.05,25.05 M54.55,58 L37.2,58 C35.3,58 33.75,56.45 33.75,54.55 L33.75,37.2 C33.75,35.3 35.3,33.75 37.2,33.75 L54.55,33.75 C56.45,33.75 58,35.3 58,37.2 L58,54.55 C58,56.45 56.45,58 54.55,58 L54.55,58 Z M26.8,58 L9.45,58 C7.55,58 6,56.45 6,54.55 L6,37.2 C6,35.3 7.55,33.75 9.45,33.75 L26.8,33.75 C28.7,33.75 30.25,35.3 30.25,37.2 L30.25,54.55 C30.25,56.45 28.7,58 26.8,58 L26.8,58 Z M54.55,30.25 L37.2,30.25 C35.3,30.25 33.75,28.7 33.75,26.8 L33.75,9.45 C33.75,7.55 35.3,6 37.2,6 L54.55,6 C56.45,6 58,7.55 58,9.45 L58,26.8 C58,28.7 56.45,30.25 54.55,30.25 L54.55,30.25 Z M26.8,30.25 L9.45,30.25 C7.55,30.25 6,28.7 6,26.8 L6,9.45 C6,7.55 7.55,6 9.45,6 L26.8,6 C28.7,6 30.25,7.55 30.25,9.45 L30.25,26.8 C30.25,28.7 28.7,30.25 26.8,30.25 L26.8,30.25 Z" id="形状" fill="#333333"></path>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -3,7 +3,7 @@
<div v-for="(item, index) in data" :key="index" class="header_item"> <div v-for="(item, index) in data" :key="index" class="header_item">
<img :src="item.link" /> <img :src="item.link" />
<div class="data_wrap"> <div class="data_wrap">
<div class="data_title" :style="hasColor?`color:${item.color || ''}`:''">{{ item.count }}</div> <div class="data_title">{{ item.count }}</div>
<div class="data_content">{{ item.title }}</div> <div class="data_content">{{ item.title }}</div>
</div> </div>
</div> </div>
@ -12,55 +12,36 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineProps, onMounted } from "vue";
defineProps({
hasColor: {
type: Boolean,
default: () => false,
},
});
const initRem = () => {
const designWidth = 1440;
const rempPx = 16;
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = scale * rempPx + "px";
};
onMounted(()=>{
initRem();
})
const data = [ const data = [
{ {
link: "/src/assets/images/taskCount.png", link: "/src/assets/images/taskCount.png",
title: "任务总数", title: "任务包总数",
count: 6399, count: 6399,
}, },
{ {
link: "/src/assets/images/nocheck.png", link: "/src/assets/images/nocheck.png",
title: "待审批", title: "未标记",
count: 6290, count: 6290,
}, },
{ {
link: "/src/assets/images/check.png", link: "/src/assets/images/check.png",
title: "已审批", title: "已标记",
count: 109, count: 109,
}, },
{ {
link: "/src/assets/images/status.png", link: "/src/assets/images/status.png",
title: "通过", title: "",
count: 3290, count: 3290,
color: "#03c984",
}, },
{ {
link: "/src/assets/images/status.png", link: "/src/assets/images/status.png",
title: "不通过", title: "",
count: 3000, count: 3000,
color: "#ff8b8b",
}, },
{ {
link: "/src/assets/images/pic.png", link: "/src/assets/images/pic.png",
title: "片重复数", title: "相似度100%图",
count: 230, count: 230,
}, },
{ {
@ -77,39 +58,37 @@ const data = [
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 1rem 3.125rem; padding: 20px 30px;
background: #fff; background: #fff;
margin-bottom: 1rem;
.header_item { .header_item {
width: 10%; width: 10%;
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 { img{
width: 3.125rem; width: 50px;
height: 3.125rem; height: 50px
} }
.data_wrap { .data_wrap {
.data_title { .data_title {
font-size: 1.25rem; font-size: 20px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
font-weight: Bold; font-weight: Bold;
text-align: left; text-align: left;
color: #202020; color: #202020;
line-height: 1.4375rem; line-height: 23px;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.data_content { .data_content {
opacity: 0.6; opacity: 0.6;
font-size: .875rem; font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular; font-weight: Regular;
text-align: center; text-align: center;
color: #202020; color: #202020;
line-height: 1rem; line-height: 16px;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }

@ -1,5 +1,5 @@
import type { AsideEntity } from './aside' import type { AsideEntity } from './aside'
import { IzApprovalStatus, IzCustomlevel, IzCustomname, IzCustomtype, IzProductVue, IzProjectVue, IzProjecttype, IzShowAll, IzStatus, IzVisitcity, IzfirmVue, IztaskrromVue, IzvisitproVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items' import { IzApprovalStatus, IzProjectVue, IzStatus, IztaskrromVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue, IzCustomname, IzCustomtype, IzVisitcity, IzCustomlevel, IzProjecttype, IzProductVue, IzvisitproVue, IzfirmVue } from '@/views/home/aside/comp/items'
export interface RowData { export interface RowData {
id: string id: string
@ -125,11 +125,12 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: true, defaultValue: true,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izshowall', key: 'izshowall',
component: IzShowAll, component: PictureDownloadVue,
inFilterList: false, inFilterList: false,
}, },
} }
// 审批添加筛选配置 (左侧) // 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = { export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: { izstatus: {
@ -193,7 +194,7 @@ export const asideTaskMap: Recordable<AsideEntity> = {
defaultValue: null, defaultValue: null,
isDefaultFilter: true, isDefaultFilter: true,
key: 'izcustomlevel', key: 'izcustomlevel',
component: IzCustomlevel, component: IzCustomlevel
}, },
izprojecttype: { izprojecttype: {
label: '项目类别', label: '项目类别',
@ -222,5 +223,5 @@ export const asideTaskMap: Recordable<AsideEntity> = {
isDefaultFilter: true, isDefaultFilter: true,
key: 'izfirm', key: 'izfirm',
component: IzfirmVue, component: IzfirmVue,
}, }
} }

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import Masonry from 'masonry-layout' import Masonry from 'masonry-layout'
import { useDialog, useMessage } from 'naive-ui' import { useDialog, useMessage } from 'naive-ui'
import { computed, nextTick, onBeforeMount, onMounted, onUpdated, reactive, ref, unref, watch } from 'vue' import { computed, onBeforeMount, onMounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import { dubiousfilelist, removeFiles } from '@/api/task/task' import { dubiousfilelist, removeFiles } from '@/api/task/task'
import { viewOptions } from '@/config/home' import { viewOptions } from '@/config/home'
@ -22,13 +22,7 @@ const cardStyle = {
const message = useMessage() const message = useMessage()
const timeRange = ref('') const timeRange = ref('')
const similarRange = ref('')
const batch = ref(false) const batch = ref(false)
let filterId = null;
let sortObj: any = {
orderByUptime: 'desc'
};
const timeOptions = [{ const timeOptions = [{
label: '升序', label: '升序',
value: 'asc', value: 'asc',
@ -36,14 +30,6 @@ const timeOptions = [{
label: '降序', label: '降序',
value: 'desc', value: 'desc',
}] }]
// const similarOptions = [{
// label: '',
// value: 'asc',
// }, {
// label: '',
// value: 'desc',
// }]
const timeLabel = computed(() => { const timeLabel = computed(() => {
const item = timeOptions.find((option) => { const item = timeOptions.find((option) => {
return option.value === timeRange.value return option.value === timeRange.value
@ -118,8 +104,7 @@ useInfiniteScroll(
async function featchList() { async function featchList() {
loading = true loading = true
try { try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value }) const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO // TODO
// result.data = Array.from({ length: 30 }) // result.data = Array.from({ length: 30 })
result.pageCount = 1 result.pageCount = 1
@ -224,18 +209,7 @@ function upHandler(event: MouseEvent) {
} }
const gridHeight = computed(() => { const gridHeight = computed(() => {
// return viewMode.value !== 'masonry' ? '157px' : '' return viewMode.value !== 'masonry' ? '157px' : ''
let height = "";
if (viewMode.value === "masonry") {
height = "";
} else if (viewMode.value === "horizontalVersion") {
height = "145px";
} else if (viewMode.value === "verticalVersion") {
height = "300px";
} else if (viewMode.value === "3:4") {
height = "240px";
}
return height;
}) })
function addListeners() { function addListeners() {
@ -273,23 +247,7 @@ async function showModal() {
layout() layout()
} }
async function onChange(val) { async function onChange() {
console.log("val------------------------", val);
sortObj = {
// orderbyname: val,
orderByUptime: val
}
pagination.pageNo = 1
const list = await featchList()
listData.value = list
}
async function onChangeView(val) {
console.log("val------------------------", val);
sortObj = {
// orderbyname: val,
orderBySimilarity: val
}
pagination.pageNo = 1 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
@ -430,30 +388,11 @@ function doAudit(param: any) {
function reloadList() { function reloadList() {
refreshHandler() refreshHandler()
} }
async function refreshHandler(filtersearchId?: any) { async function refreshHandler() {
// rao start reset()
// reset() const list = await featchList()
// const list = await featchList() listData.value = list
// listData.value = list layout()
// layout()
// rao end
reset();
if (filtersearchId) {
filterId = filtersearchId;
}
nextTick(() => {
setTimeout(() => {
useInfiniteScroll(
el as any,
() => {
loadMore();
},
{ distance: 10, canLoadMore: () => canloadMore }
);
}, 300);
});
} }
</script> </script>
@ -482,12 +421,6 @@ async function refreshHandler(filtersearchId?: any) {
<SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" /> <SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" />
</div> </div>
</n-popselect> </n-popselect>
<n-popselect v-model:value="similarRange" :options="timeOptions" trigger="click" @change="onChangeView">
<div class="wrapper-content-form-dropdown">
<span>相似度排序</span>
<SvgIcon class="wrapper-content-form-dropdown-gap" name="arrow-botton" size="14" />
</div>
</n-popselect>
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click"> <n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
<div class="wrapper-form-dropdown"> <div class="wrapper-form-dropdown">
<span>视图模式</span> <span>视图模式</span>
@ -527,13 +460,8 @@ async function refreshHandler(filtersearchId?: any) {
<div v-for="(item, index) in listData" :key="item.pictureId" :data-id="item.pictureId" <div v-for="(item, index) in listData" :key="item.pictureId" :data-id="item.pictureId"
:class="{ 'grid-item-selected': isSelected(item.pictureId) }" :style="{ height: gridHeight }" :class="{ 'grid-item-selected': isSelected(item.pictureId) }" :style="{ height: gridHeight }"
class="grid-item"> class="grid-item">
<n-image <n-image :src="item.imgUrl" class="img "
:src="item.imgUrl" :class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }" />
class="img "
:class="{
'img-fit': viewMode === 'horizontalVersion',
'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
/>
<n-checkbox v-if="batch && item.historyStates === 1" v-model:checked="item.checked" <n-checkbox v-if="batch && item.historyStates === 1" v-model:checked="item.checked"
style="position:absolute;left:20px;top:20px" @click.prevent style="position:absolute;left:20px;top:20px" @click.prevent
@update:checked="onCheckChange($event, item)" /> @update:checked="onCheckChange($event, item)" />
@ -621,9 +549,7 @@ async function refreshHandler(filtersearchId?: any) {
} }
.img { .img {
border-radius: 7px; border-radius: 8px;
display: block;
height: 100%;
} }
.wrapper { .wrapper {

@ -101,8 +101,8 @@ const options = computed(() => {
> >
<template #trigger> <template #trigger>
<div class="setting"> <div class="setting">
<span style="color:#333333">{{ useInfo.username }}</span> <span>{{ useInfo.username }}</span>
<SvgIcon style="margin-left: 6px" :name="iconName" size="16" /> <SvgIcon style="margin-left: 6px" :name="iconName" size="14" />
</div> </div>
</template> </template>
<div class="container"> <div class="container">

@ -197,7 +197,6 @@ export default defineComponent({
<!-- 菜单收起 --> <!-- 菜单收起 -->
<div <div
class="ml-1 layout-header-trigger layout-header-trigger-min" class="ml-1 layout-header-trigger layout-header-trigger-min"
style="padding-top: 2px;"
@click="() => $emit('update:collapsed', !collapsed)" @click="() => $emit('update:collapsed', !collapsed)"
> >
<SvgIcon name="homepage" size="16" /> <SvgIcon name="homepage" size="16" />
@ -246,7 +245,7 @@ export default defineComponent({
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0; padding: 0;
height: 62px; height: 64px;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
width: 100%; width: 100%;
z-index: 11; z-index: 11;
@ -268,7 +267,7 @@ export default defineComponent({
img { img {
width: auto; width: auto;
height: 34px; height: 32px;
margin-right: 10px; margin-right: 10px;
} }
@ -281,7 +280,7 @@ export default defineComponent({
&-right { &-right {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 24px; margin-right: 20px;
.back { .back {
width: 28px; width: 28px;

@ -47,11 +47,8 @@ const leftMenuWidth = computed(() => {
flex: auto; flex: auto;
background-image: url('../assets/images/bg.png'); background-image: url('../assets/images/bg.png');
background-size: cover; background-size: cover;
// height: 1100px;
// width: 1440px;
height: 100%; height: 100%;
max-height:1100px;
overflow: hidden;
.layout-sider { .layout-sider {
min-height: 100vh; min-height: 100vh;
border-right: 1px solid #dae4f3; border-right: 1px solid #dae4f3;

@ -28,10 +28,9 @@ const routes: Array<RouteRecordRaw> = [
children: [ children: [
{ {
path: 'final', path: 'final',
name: 'FinalMain', name: 'final-main',
meta: { meta: {
title: '任务终审', title: '任务终审',
keepAlive: true,
}, },
component: () => import('@/views/final/index.vue'), component: () => import('@/views/final/index.vue'),
}, },

@ -5,8 +5,6 @@ import { getFilter } from '@/api/home/filter'
export interface ConfigState { export interface ConfigState {
customConfig: string[] | null customConfig: string[] | null
asideValue: any asideValue: any
listKey: number
filterConfig: any[]
} }
export const useFinalStore = defineStore({ export const useFinalStore = defineStore({
@ -14,8 +12,6 @@ export const useFinalStore = defineStore({
state: (): ConfigState => ({ state: (): ConfigState => ({
customConfig: null, customConfig: null,
asideValue: null, asideValue: null,
listKey: 0,
filterConfig: [],
}), }),
getters: { getters: {
getCustomConfig(): string[] | null { getCustomConfig(): string[] | null {
@ -24,33 +20,17 @@ export const useFinalStore = defineStore({
getAsideValue(): any { getAsideValue(): any {
return this.asideValue return this.asideValue
}, },
getFilterConfig(): any {
return this.filterConfig
},
}, },
actions: { actions: {
setAsideValue(value) { setAsideValue(value) {
this.asideValue = value this.asideValue = value
}, },
// 设置个性化配置
setCustomConfig(value) {
this.customConfig = value
},
setListKey() {
this.listKey = new Date().getTime()
},
setFilterConfig(value) {
this.filterConfig = value
},
// 获取终审个性化配置 // 获取终审个性化配置
async fetchCustomConfig() { async fetchCustomConfig() {
const res = await getFilter(1) const res = await getFilter(1)
console.log(res.data)
console.log(898989)
const { data } = res const { data } = res
const list = data && data.searchcount ? data.searchcount.split(',') : [] const list = data && data.searchcount ? data.searchcount.split(',') : []
this.customConfig = list this.customConfig = list
console.log(list)
return list return list
}, },
}, },

@ -10,299 +10,162 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from 'vue' } from "vue";
import { cloneDeep, isEqual } from 'lodash-es' import { CustomFilterModalVue, FilterModal, NewFilterModal } from "@/views/final/comp";
import { CustomFilterModalVue, FilterModal, NewFilterModal } from '@/views/final/comp' import Search from "@/views/home/aside/comp/Search.vue";
import Search from '@/views/home/aside/comp/Search.vue' import AdvanceFilter from "@/views/home/aside/comp/AdvanceFilter.vue";
import AdvanceFilter from '@/views/home/aside/comp/AdvanceFilter.vue' import { getViewportOffset } from "@/utils/domUtils";
import { getViewportOffset } from '@/utils/domUtils' import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' import { useFinal } from "@/store/modules/final";
import { useFinal } from '@/store/modules/final' import type { Filter } from "/#/home";
import type { Filter } from '/#/home' import type { AsideEntity } from "@/config/aside";
import { getFilterList } from '@/api/home/main' import { asideMap } from "@/config/final";
import type { AsideEntity } from '@/config/aside' import type { AsideConfig } from "/#/api";
import { asideMap } from '@/config/final' import emitter from "@/utils/mitt";
import type { AsideConfig } from '/#/api'
import emitter from '@/utils/mitt' const emit = defineEmits(["inputChange"]);
const finalStore = useFinal();
const emit = defineEmits(['inputChange'])
const finalStore = useFinal()
// //
const asideValue: Record<keyof typeof asideMap, any> = reactive({}) const asideValue: Record<keyof typeof asideMap, any> = reactive({});
// : // :
const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({}) const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({});
// //
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([]) const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
const { defaultValue, inFilterList } = asideMap[key] const { defaultValue, inFilterList } = asideMap[key];
if (inFilterList !== false) if (inFilterList !== false) asideValue[key] = defaultValue;
asideValue[key] = defaultValue });
})
const filterModalRef = ref(null);
const filterModalRef = ref(null) const newFilterModalRef = ref(null);
const newFilterModalRef = ref(null) const customModalRef = ref(null);
const customModalRef = ref(null)
const AdvanceFilterRef: any = ref(null)
const customObjRef = ref<any>(null) //
const customTempObjRef = ref<any>(null) // ()
const configFilterRef = ref<any>([]) //
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any const modal = unref(modalRef)! as any;
modal.showModal() modal.showModal();
} }
const mousetrap = inject('mousetrap') as any const mousetrap = inject("mousetrap") as any;
mousetrap.bind('[', collapseHandler) mousetrap.bind("[", collapseHandler);
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
computeSlideHeight() computeSlideHeight();
}) });
}) });
const collapse = ref(false) const collapse = ref(false);
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value;
} }
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308;
}) });
const asideHeight = ref(500) const asideHeight = ref(500);
const asideStyle = computed(() => { const asideStyle = computed(() => {
return { return {
width: `${asideWidth.value}px`, width: `${asideWidth.value}px`,
height: `${asideHeight.value}px`, height: `${asideHeight.value}px`,
} };
}) });
const collapseIcon = computed(() => { const collapseIcon = computed(() => {
return collapse.value ? 'expand-cir' : 'collapse-cir' return collapse.value ? "expand-cir" : "collapse-cir";
}) });
function computeSlideHeight() { function computeSlideHeight() {
const headEl = document.querySelector('.aside-header')! const headEl = document.querySelector(".aside-header")!;
const { bottomIncludeBody } = getViewportOffset(headEl) const { bottomIncludeBody } = getViewportOffset(headEl);
const height = bottomIncludeBody const height = bottomIncludeBody;
asideHeight.value = height - 24 asideHeight.value = height - 24;
} }
useWindowSizeFn(computeSlideHeight, 280) useWindowSizeFn(computeSlideHeight, 280);
onBeforeMount(async () => { onBeforeMount(async () => {
finalStore.fetchCustomConfig() finalStore.fetchCustomConfig();
}) });
function initFilter(args, state) { finalStore.$subscribe(() => {
const customConfig = finalStore.getCustomConfig const customConfig = finalStore.getCustomConfig;
console.log(9999)
console.log(customConfig) if (customConfig === null) return;
console.log('args===>', args)
console.log('state===>', state) const showKeys: string[] = [...customConfig];
if (
customObjRef.value
&& isEqual(customObjRef.value, customTempObjRef.value)
)
return
if (customConfig === null)
return
// const sortKeyList: any = []
// finalStore.getFilterConfig.map((item: any) => {
// sortKeyList.push(item.id)
// })
// const showKeys = [...sortKeyList]
// console.log(showKeys)
// Object.keys(customConfig).forEach((key) => {
// if (key.startsWith('iz') && asideMap[key] !== undefined) {
// asideVisible[key]
// = (showKeys.includes(key) || asideMap[key].isDefaultFilter) && customConfig[key] === 'Y'
// }
// })
console.log(9999)
const showKeys: string[] = [...customConfig]
const defaultKeys = Object.keys(asideMap).filter( const defaultKeys = Object.keys(asideMap).filter(
key => asideMap[key].isDefaultFilter, (key) => asideMap[key].isDefaultFilter
) );
console.log(defaultKeys) showKeys.unshift(...defaultKeys);
showKeys.unshift(...defaultKeys)
console.log(asideMap)
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
// //
console.log(key) if (key.startsWith("iz"))
if (key.startsWith('iz')) { asideVisible[key] =
asideVisible[key] asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
= asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter) });
}
})
console.log(asideVisible)
if (customObjRef.value) {
console.log('*******')
console.log('customObjRef.value', customObjRef.value)
//
Object.keys(customObjRef.value).map((key) => {
console.log(key)
console.log(asideMap)
if (asideMap.hasOwnProperty(key)) {
const str = key.toLowerCase()
console.log('customObjRef.value[str]1111111111111', customObjRef.value[str])
if (str == 'izsimilarity') {
if (typeof customObjRef.value[str] == 'string')
customObjRef.value[str] = customObjRef.value[str].split(',')
asideValue[key] = customObjRef.value[str] //
console.log('相似度2222222222', asideValue[key])
}
else if (str == 'izyear') {
if (typeof customObjRef.value[str] == 'string') {
const time = customObjRef.value[str].split('-')
time[0] = new Date(time[0]).getTime()
time[1] = new Date(time[1]).getTime()
customObjRef.value[str] = time
}
asideValue[key] = customObjRef.value[str] //
console.log('时间2222222222', asideValue[key])
}
else if (str != 'izsimilarity' && str != 'izyear' && customObjRef.value[str]) {
console.log('customObjRef.value[str]222222', customObjRef.value[str])
// let list = customObjRef.value[str].split(',');
// console.log("list222222", list);
asideValue[key] = customObjRef.value[str] //
}
else {
asideValue[key] = null
}
// asideMap[str].defaultValue = customObjRef.value[str];//
}
})
customTempObjRef.value = customObjRef.value
console.log('asideValue直接处理后的结果', asideValue)
console.log('customTempObjRef.value', customTempObjRef.value)
const tempobj = cloneDeep(asideValue)
console.log('tempObj', tempobj)
finalStore.setAsideValue(tempobj)
}
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
if (asideMap[key]) { if (asideMap[key]) {
const config = { const config = {
key, key,
config: asideMap[key], config: asideMap[key],
} };
return [...acc, config] return [...acc, config];
} } else {
else { return acc;
return acc
} }
}, []) }, []);
console.log(items)
showItems.value = items showItems.value = items;
configFilterRef.value = finalStore.getFilterConfig });
}
finalStore.$subscribe((args, state) => {
initFilter(args, state)
})
watch(asideVisible, (newVal) => { watch(asideVisible, (newVal) => {
Object.keys(asideValue).forEach((key) => { Object.keys(asideValue).forEach((key) => {
if (newVal[key] === false) if (newVal[key] === false) asideValue[key] = asideMap[key].defaultValue;
asideValue[key] = asideMap[key].defaultValue });
}) });
})
const asideEnter = ref(false) const asideEnter = ref(false);
const showCollapse = computed(() => { const showCollapse = computed(() => {
return collapse.value ? true : asideEnter.value return collapse.value ? true : asideEnter.value;
}) });
const showSearch = ref(false) const showSearch = ref(false);
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
showSearch.value = value showSearch.value = value;
if (!value) if(!value){
inputChange('') inputChange('')
}
} }
// key // key
function scrollHandler(key: string) { function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`) const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true) element?.scrollIntoView(true);
} }
// function filterHandler(searchId: string) { function filterHandler(searchId: string) {
// console.log(searchId) emitter.emit("filter-final", searchId);
// emitter.emit('filter-final', searchId)
// }
// ->
async function filterHandler(searchId: string) {
// emitter.emit('filter', searchId)
const res = await getFilterList({ userSearchId: searchId })
// console.log("", res);
if (res.code == 'OK') {
const obj = res.data
customObjRef.value = {
izproject: null,
izcustomtype: null,
izcustomlevel: null,
izcustomname: null,
iztaskrrom: null,
iztaskstatus: [5],
izstatus: [5],
izvisitpro: null,
izfirm: null,
izproductname: null,
izprojecttype: null,
izupuser: null,
izplan: null,
izsimilarity: null,
izshow: null,
izyear: null,
izpicturetype: null,
izvisitcity: null,
izYeardddd: null,
}
const showKeys: any[] = []
Object.keys(obj).map((key) => {
if (asideMap.hasOwnProperty(key))
showKeys.push(key)
})
console.log(showKeys)
initFilter()
// finalStore.setCustomConfig(showKeys)
}
} }
function editFilter(filter: any) { function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any const modal = unref(newFilterModalRef)! as any;
modal.showModal() modal.showModal();
modal.edit(filter) modal.edit(filter);
} }
watch(asideValue, (newVal) => { watch(asideValue, (newVal) => {
finalStore.setAsideValue(newVal) finalStore.setAsideValue(newVal);
}) });
function inputChange(keyword) { const inputChange = (keyword) => {
emit('inputChange', keyword) emit("inputChange", keyword);
} };
function handleOk(item: any) {
console.log('handleOk', item)
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname)
filterHandler(item.id)
}
else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced('高级筛选')
filterHandler('')
}
}
</script> </script>
<template> <template>
@ -324,12 +187,11 @@ function handleOk(item: any) {
v-show="showSearch" v-show="showSearch"
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
@input-change="inputChange" @inputChange="inputChange"
/> />
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef"
:type="1" :type="1"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@ -354,7 +216,6 @@ function handleOk(item: any) {
ref="filterModalRef" ref="filterModalRef"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModal ref="newFilterModalRef" /> <NewFilterModal ref="newFilterModalRef" />

@ -312,7 +312,7 @@ const showSearch = computed(() => {
<span class="wrapper-title">全部筛选值</span> <span class="wrapper-title">全部筛选值</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form" v-if="!showSearch"> <div class="wrapper-form" v-if="!showSearch">

@ -261,7 +261,7 @@ defineExpose({
<span class="wrapper-title">{{ modalTitle }}</span> <span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">

@ -40,7 +40,6 @@ import type { ApprovalParam } from '/#/api'
import emitter from '@/utils/mitt' import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import DataHeader from '@/components/DataHeader/index.vue'
const emit = defineEmits(['changeShow']) const emit = defineEmits(['changeShow'])
function changeContent() { function changeContent() {
@ -488,8 +487,7 @@ const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any, taskName?: string) { async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
const asideParmas = unref(finalStore.getAsideValue) const asideParmas = unref(finalStore.getAsideValue)
// 使使 // 使使
let params = filterId ? { userSearchId: filterId } : asideParmas const params = filterId ? { userSearchId: filterId } : asideParmas
params = params.izshowall ? {} : params
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
pageSize, pageSize,
@ -511,8 +509,10 @@ async function handleSorterChange(value) {
let name = value.columnKey let name = value.columnKey
if (name === 'fromuptime') if (name === 'fromuptime')
name = 'field11' name = 'field11'
else if (name === 'similarityscore') else if (name === 'similarityscore')
name = 'similarity_score' name = 'similarity_score'
else if (name === 'fromusername') else if (name === 'fromusername')
name = 'fromuserid' name = 'fromuserid'
@ -829,13 +829,6 @@ watch(
{ deep: true }, { deep: true },
) )
watch(
() => finalStore.listKey,
(newVal, oldVal) => {
refreshHandler()
},
)
function reset() { function reset() {
pagination.page = 1 pagination.page = 1
pagination.pageCount = 1 pagination.pageCount = 1
@ -852,7 +845,8 @@ function filterTableData(keyword) {
if (keyword) if (keyword)
// tableData.value = tableData.value.filter(item => item.id.includes(keyword)) // tableData.value = tableData.value.filter(item => item.id.includes(keyword))
query(pagination.page, pagination.pageSize, '', keyword) query(pagination.page, pagination.pageSize, '', keyword)
else query(pagination.page, pagination.pageSize) else
query(pagination.page, pagination.pageSize)
} }
defineExpose({ defineExpose({
filterTableData, filterTableData,
@ -864,12 +858,7 @@ defineExpose({
<div class="wrapper-header"> <div class="wrapper-header">
<div class="wrapper-header-left"> <div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span> <span class="wrapper-header-font">任务管理列表</span>
<SvgIcon <SvgIcon size="16" name="list-mode" @click="changeContent" />
style="cursor: pointer"
size="16"
name="list-mode"
@click="changeContent"
/>
</div> </div>
<div> <div>
<SvgIcon <SvgIcon
@ -941,9 +930,6 @@ defineExpose({
</n-popover> </n-popover>
</div> </div>
</div> </div>
<div class="header_data">
<DataHeader :has-color="true" />
</div>
<!-- <div class="wrapper-statistic"> <!-- <div class="wrapper-statistic">
<div v-for="i in 7" :key="i" class="item"> <div v-for="i in 7" :key="i" class="item">
<div class="icon" /> <div class="icon" />

@ -1,14 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
const emit = defineEmits(["changeShow"]);
function changeContent() {
emit("changeShow");
}
const item = { const item = {
// img: "/src/assets/images/test.png", // img: "/src/assets/images/test.png",
img: "http://47.93.59.251/api/image/thumbnail_1755061416414842880.jpeg", img:'http://47.93.59.251/api/image/thumbnail_1752999610491604992.jpeg',
checked: false, checked: false,
title: "YP4567890545", title: "YP4567890545",
date: "2023-12-19 12:09:18", date: "2023-12-19 12:09:18",
@ -16,7 +11,7 @@ const item = {
const data = ref<any[]>([]); const data = ref<any[]>([]);
onMounted(() => { onMounted(() => {
for (let i = 0; i < 8; i++) { for (let i = 0; i < 20; i++) {
data.value.push(item as any); data.value.push(item as any);
} }
}); });
@ -24,50 +19,32 @@ onMounted(() => {
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="wrapper-header"> <div class="item" v-for="(item, index) in data" :key="index">
<div class="wrapper-header-left"> <div class="top">
<span class="wrapper-header-font">任务管理列表</span> <div
<SvgIcon class="img"
style="cursor: pointer" :style="`background:url(${item.img});background-size:100%;background-repeat: no-repeat;`"
size="16" >
name="card-mode" <div class="check_box"><n-checkbox size="medium" label=" " /></div>
@click="changeContent" </div>
/> <div class="content">
</div> <div class="title">任务ID{{ item.title }}</div>
</div> <div class="date">{{ item.date }}</div>
<div class="tag_box">
<div class="header_data"> <div
<DataHeader :hasColor="true" /> class="tag_item"
</div> v-for="index in 2"
:key="index"
<div class="data_wrapper"> :style="index == 2 ? 'color:#02C984' : 'color:#507AFD'"
<div class="item" v-for="(item, index) in data" :key="index"> >
<div class="top"> {{ index==1?'待确认':'张思' }}
<div
class="img"
:style="`background:url(${item.img});background-size:100%;background-repeat: no-repeat;`"
>
<div class="check_box"><n-checkbox size="medium" label=" " /></div>
</div>
<div class="content">
<div class="title">任务ID{{ item.title }}</div>
<div class="date">{{ item.date }}</div>
<div class="tag_box">
<div
class="tag_item"
v-for="index in 2"
:key="index"
:style="index == 2 ? 'color:#02C984' : 'color:#507AFD'"
>
{{ index == 1 ? "待确认" : "张思" }}
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="bottom"> </div>
<div class="resovle_action">通过</div> <div class="bottom">
<div class="reject_action">通过</div> <div class="resovle_action">通过</div>
</div> <div class="reject_action">不通过</div>
</div> </div>
</div> </div>
</div> </div>
@ -75,167 +52,85 @@ onMounted(() => {
<style scoped lang="less"> <style scoped lang="less">
.wrapper { .wrapper {
// display: flex; display: flex;
// flex-flow: row wrap; flex-flow: row wrap;
// align-items: center; align-items: center;
// justify-content: flex-start; justify-content: flex-start;
// flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
margin-left: 16px; margin-left: 16px;
width: 100%; width: 100%;
background: #fff; background: #fff;
padding: 0px 24px 24px 24px; padding: 0px 24px 24px 24px;
&-header { .item {
display: flex; width: 23%;
justify-content: space-between; border: 1px solid #ededed;
align-items: center; border-radius: 3px;
box-sizing: border-box; padding: 8px 10px;
height: 64px; margin-right: 10px;
width: 100%; .top {
div {
display: flex;
align-items: center;
}
.xjcc {
font-weight: bold;
color: #507afd;
margin-right: 20px;
}
.title {
color: #507afd;
font-weight: bold;
font-size: 14px;
margin-left: 8px;
}
.btn {
width: 118px;
height: 36px;
background: linear-gradient(135deg, #5b85f8, #3c6cf0);
border-radius: 17px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
display: flex; display: flex;
flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
color: #fff; .img {
margin-right: 6px; width: 50%;
cursor: pointer; height: 70px;
} border-radius: 3px;
.check_box {
.more {
width: 30px;
height: 30px;
line-height: 30px;
opacity: 0.1;
background: linear-gradient(144deg, #73a7f9 0%, #3e6ef1 96%);
border-radius: 8px;
}
&-font {
font-size: 20px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600;
color: #0d0b22;
margin-right: 8px;
}
&-action {
padding: 8px;
li {
height: 32px;
line-height: 32px;
cursor: pointer;
&:hover {
background-color: #f3f8ff;
}
}
}
}
.header_data {
width: 100%;
}
.data_wrapper {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: flex-start;
flex: 1;
.item {
width: 23%;
border: 1px solid #ededed;
border-radius: 3px;
padding: 8px 10px;
margin-right: 10px;
.top {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: flex-start;
.img {
width: 50%;
height: 70px;
border-radius: 3px;
.check_box {
margin-left: 8px;
}
}
.content {
margin-left: 8px; margin-left: 8px;
.title,
.date {
font-size: 11px;
font-weight: bolder;
text-align: left;
color: #323233;
line-height: 16px;
}
} }
.tag_box { }
display: flex; .content {
flex-flow: row nowrap; margin-left: 8px;
align-items: center; .title,
justify-content: flex-start; .date {
.tag_item { font-size: 11px;
width: 31px; font-weight: bolder;
height: 14px; text-align: left;
font-size: 10px; color: #323233;
font-weight: bolder; line-height: 16px;
text-align: left;
// color: #507afd;
line-height: 14px;
letter-spacing: 0.1px;
margin-right: 8px;
}
} }
} }
.bottom { .tag_box {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-start;
.resovle_action { .tag_item {
font-size: 12px; width: 31px;
font-weight: bolder; height: 14px;
text-align: left; font-size: 10px;
color: #507afd;
line-height: 17px;
}
.reject_action {
font-size: 12px;
font-weight: bolder; font-weight: bolder;
text-align: left; text-align: left;
color: #ff4e4f; // color: #507afd;
line-height: 17px; line-height: 14px;
margin-left: 15px; letter-spacing: 0.1px;
margin-right: 8px;
} }
} }
} }
.bottom {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: flex-end;
.resovle_action {
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #507afd;
line-height: 17px;
}
.reject_action {
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #ff4e4f;
line-height: 17px;
margin-left: 15px;
}
}
} }
} }
</style> </style>

@ -4,26 +4,25 @@ import Aside from './aside/Aside.vue'
import Content from './content/Content.vue' import Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
defineOptions({ const showList = ref(false);
name: 'FinalMain', const contentRef:any = ref(null);
}) const inputChange = (keyword)=>{
const showList = ref(false)
const contentRef: any = ref(null)
function inputChange(keyword) {
contentRef.value.filterTableData(keyword) contentRef.value.filterTableData(keyword)
} }
</script> </script>
<template> <template>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->
<Aside @input-change="inputChange" /> <Aside @inputChange="inputChange" />
<!-- 内容 --> <!-- 内容 -->
<Content v-show="!showList" ref="contentRef" @change-show="showList = true" /> <Content @changeShow="showList=true" ref="contentRef" />
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<ListContent v-show="showList" @change-show="showList = false" /> <!-- <ListContent /> -->
</div> </div>
</template> </template>

@ -10,110 +10,109 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from 'vue' } from "vue";
import dayjs from 'dayjs' import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from "./comp/modals";
import { cloneDeep, isEqual } from 'lodash-es' import Search from "./comp/Search.vue";
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals' import AdvanceFilter from "./comp/AdvanceFilter.vue";
import Search from './comp/Search.vue' import { getViewportOffset } from "@/utils/domUtils";
import AdvanceFilter from './comp/AdvanceFilter.vue' import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { getViewportOffset } from '@/utils/domUtils' import { useConfig } from "@/store/modules/asideConfig";
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn' import type { Filter } from "/#/home";
import { useConfig } from '@/store/modules/asideConfig' import type { AsideEntity } from "@/config/aside";
import type { Filter } from '/#/home' import { asideMap } from "@/config/aside";
import type { AsideEntity } from '@/config/aside' import type { AsideConfig } from "/#/api";
import { asideMap } from '@/config/aside' import emitter from "@/utils/mitt";
import type { AsideConfig } from '/#/api' import { getFilterList } from "@/api/home/main";
import emitter from '@/utils/mitt' import dayjs from "dayjs";
import { getFilterList } from '@/api/home/main' import { cloneDeep, isEqual } from "lodash-es";
const configStore = useConfig() const configStore = useConfig();
// //
const asideValue: Record<keyof typeof asideMap, any> = reactive({}) let asideValue: Record<keyof typeof asideMap, any> = reactive({});
// : // :
const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({}) const asideVisible: Partial<Record<keyof AsideConfig, boolean>> = reactive({});
// //
const showItems = shallowRef<{ key: string, config: AsideEntity }[]>([]) const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
const entity = asideMap[key] const entity = asideMap[key];
const { defaultValue } = entity const { defaultValue } = entity;
asideValue[key] = defaultValue asideValue[key] = defaultValue;
}) });
const filterModalRef: any = ref(null) const filterModalRef: any = ref(null);
const newFilterModalRef = ref(null) const newFilterModalRef = ref(null);
const customModalRef = ref(null) const customModalRef = ref(null);
const customObjRef = ref<any>(null) // const customObjRef = ref<any>(null); //
const customTempObjRef = ref<any>(null) // () const customTempObjRef = ref<any>(null); // ()
const configFilterRef = ref<any>([]) // const configFilterRef = ref<any>([]); //
const AdvanceFilterRef: any = ref(null) const AdvanceFilterRef: any = ref(null);
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any const modal = unref(modalRef)! as any;
modal.showModal() modal.showModal();
} }
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
computeSlideHeight() computeSlideHeight();
const tempAsideValue = cloneDeep(asideValue) let tempAsideValue = cloneDeep(asideValue);
// configStore.setAsideValue(tempAsideValue); // configStore.setAsideValue(tempAsideValue);
console.log('asideMap和asideValue', tempAsideValue) console.log("asideMap和asideValue", tempAsideValue);
}) });
}) });
const collapse = ref(false) const collapse = ref(false);
const mousetrap = inject('mousetrap') as any const mousetrap = inject("mousetrap") as any;
mousetrap.bind('[', collapseHandler) mousetrap.bind("[", collapseHandler);
function collapseHandler() { function collapseHandler() {
collapse.value = !collapse.value collapse.value = !collapse.value;
} }
const asideWidth = computed(() => { const asideWidth = computed(() => {
return collapse.value ? 0 : 308 return collapse.value ? 0 : 308;
}) });
const asideHeight = ref(500) const asideHeight = ref(500);
const asideStyle = computed(() => { const asideStyle = computed(() => {
return { return {
width: `${asideWidth.value}px`, width: `${asideWidth.value}px`,
height: `${asideHeight.value}px`, height: `${asideHeight.value}px`,
} };
}) });
const collapseIcon = computed(() => { const collapseIcon = computed(() => {
return collapse.value ? 'expand-cir' : 'collapse-cir' return collapse.value ? "expand-cir" : "collapse-cir";
}) });
function computeSlideHeight() { function computeSlideHeight() {
const headEl = document.querySelector('.aside-header')! const headEl = document.querySelector(".aside-header")!;
const { bottomIncludeBody } = getViewportOffset(headEl) const { bottomIncludeBody } = getViewportOffset(headEl);
const height = bottomIncludeBody const height = bottomIncludeBody;
asideHeight.value = height - 24 asideHeight.value = height - 24;
} }
useWindowSizeFn(computeSlideHeight, 280) useWindowSizeFn(computeSlideHeight, 280);
onBeforeMount(async () => { onBeforeMount(async () => {
configStore.fetchConfig() configStore.fetchConfig();
configStore.fetchCustomConfig() configStore.fetchCustomConfig();
}) });
configStore.$subscribe(() => { configStore.$subscribe(() => {
const config = configStore.getConfig const config = configStore.getConfig;
const customConfig = configStore.getCustomConfig const customConfig = configStore.getCustomConfig;
if ( if (
configFilterRef.value.length > 0 configFilterRef.value.length > 0 &&
&& isEqual(configFilterRef.value, configStore.getFilterConfig) isEqual(configFilterRef.value, configStore.getFilterConfig) &&
&& customObjRef.value customObjRef.value &&
&& isEqual(customObjRef.value, customTempObjRef.value) isEqual(customObjRef.value, customTempObjRef.value)
) ) {
return return;
}
if (config == null || customConfig == null) if (config == null || customConfig == null) return;
return
// console.log("config", config, "customConfig", customConfig); // console.log("config", config, "customConfig", customConfig);
/* rao /* rao
const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter
@ -121,160 +120,150 @@ configStore.$subscribe(() => {
showKeys.unshift(...defaultKeys) showKeys.unshift(...defaultKeys)
*/ */
const sortKeyList: any = [] let sortKeyList: any = [];
console.log('init')
configStore.getFilterConfig.map((item: any) => { configStore.getFilterConfig.map((item: any) => {
console.log(item) sortKeyList.push(item.id);
console.log('item') });
const showKeys = [...sortKeyList];
sortKeyList.push(item.id)
})
const showKeys = [...sortKeyList]
Object.keys(config).forEach((key) => { Object.keys(config).forEach((key) => {
if (key.startsWith('iz') && asideMap[key] !== undefined) { if (key.startsWith("iz") && asideMap[key] !== undefined)
asideVisible[key] asideVisible[key] =
= (showKeys.includes(key) || asideMap[key].isDefaultFilter) && config[key] === 'Y' (showKeys.includes(key) || asideMap[key].isDefaultFilter) && config[key] === "Y";
} });
})
if (customObjRef.value) { if (customObjRef.value) {
// //
Object.keys(customObjRef.value).map((key) => { Object.keys(customObjRef.value).map((key) => {
if (asideMap.hasOwnProperty(key)) { if (asideMap.hasOwnProperty(key)) {
const str = key.toLowerCase() const str = key.toLowerCase();
// console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]); // console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]);
if (str == 'izsimilarity') { if (str == "izsimilarity") {
if (typeof customObjRef.value[str] == 'string') if (typeof customObjRef.value[str] == "string") {
customObjRef.value[str] = customObjRef.value[str].split(',') customObjRef.value[str] = customObjRef.value[str].split(",");
asideValue[key] = customObjRef.value[str] //
console.log('相似度2222222222', asideValue[key])
}
else if (str == 'izyear') {
if (typeof customObjRef.value[str] == 'string') {
const time = customObjRef.value[str].split('-')
time[0] = new Date(time[0]).getTime()
time[1] = new Date(time[1]).getTime()
customObjRef.value[str] = time
} }
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str]; //
console.log('时间2222222222', asideValue[key]) console.log("相似度2222222222", asideValue[key]);
} } else if (str == "izyear") {
else if (str != 'izsimilarity' && str != 'izyear' && customObjRef.value[str]) { if (typeof customObjRef.value[str] == "string") {
console.log('customObjRef.value[str]222222', customObjRef.value[str]) let time = customObjRef.value[str].split("-");
time[0] = new Date(time[0]).getTime();
time[1] = new Date(time[1]).getTime();
customObjRef.value[str] = time;
}
asideValue[key] = customObjRef.value[str]; //
console.log("时间2222222222", asideValue[key]);
} else if (str != "izsimilarity" && str != "izyear" && customObjRef.value[str]) {
console.log("customObjRef.value[str]222222", customObjRef.value[str]);
// let list = customObjRef.value[str].split(','); // let list = customObjRef.value[str].split(',');
// console.log("list222222", list); // console.log("list222222", list);
asideValue[key] = customObjRef.value[str] // asideValue[key] = customObjRef.value[str]; //
} } else {
else { asideValue[key] = null;
asideValue[key] = null
} }
// asideMap[str].defaultValue = customObjRef.value[str];// // asideMap[str].defaultValue = customObjRef.value[str];//
} }
}) });
customTempObjRef.value = customObjRef.value customTempObjRef.value = customObjRef.value;
console.log('asideValue直接处理后的结果', asideValue) console.log("asideValue直接处理后的结果", asideValue);
console.log('customTempObjRef.value', customTempObjRef.value) console.log("customTempObjRef.value", customTempObjRef.value);
const tempobj = cloneDeep(asideValue) let tempobj = cloneDeep(asideValue);
console.log('tempObj', tempobj) console.log("tempObj", tempobj);
configStore.setAsideValue(tempobj) configStore.setAsideValue(tempobj);
} }
// console.log("showKeys", showKeys); // console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => { const items = showKeys.reduce((acc, key) => {
const { render } = asideMap[key] const { render } = asideMap[key];
if (render !== false) { if (render !== false) {
const str = key.toLowerCase() const str = key.toLowerCase();
const o = { const o = {
key: str, key: str,
config: asideMap[str], config: asideMap[str],
} };
return [...acc, o] return [...acc, o];
} } else {
else { return acc;
return acc
} }
}, []) }, []);
console.log('showItems=================================', items) console.log("showItems=================================", items);
showItems.value = items showItems.value = items;
configFilterRef.value = configStore.getFilterConfig configFilterRef.value = configStore.getFilterConfig;
}) });
const asideEnter = ref(false) const asideEnter = ref(false);
const showCollapse = computed(() => { const showCollapse = computed(() => {
return collapse.value ? true : asideEnter.value return collapse.value ? true : asideEnter.value;
}) });
const showSearch = ref(false) const showSearch = ref(false);
function setShowSearch(value: boolean) { function setShowSearch(value: boolean) {
showSearch.value = value showSearch.value = value;
} }
function newFilterOk() { const newFilterOk = () => {
filterModalRef.value.query( filterModalRef.value.query(
filterModalRef.value.pagination.page, filterModalRef.value.pagination.page,
filterModalRef.value.pagination.pageSize, filterModalRef.value.pagination.pageSize
) );
} };
// key // key
function scrollHandler(key: string) { function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`) const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true) element?.scrollIntoView(true);
} }
// -> // ->
async function filterHandler(searchId: string) { async function filterHandler(searchId: string) {
// emitter.emit('filter', searchId) // emitter.emit('filter', searchId)
const res = await getFilterList({ userSearchId: searchId }) const res = await getFilterList({ userSearchId: searchId });
// console.log("", res); // console.log("", res);
if (res.code == 'OK') { if (res.code == "OK") {
const obj = res.data let obj = res.data;
customObjRef.value = res.data customObjRef.value = res.data;
const showKeys: any[] = [] let showKeys: any[] = [];
Object.keys(obj).map((key) => { Object.keys(obj).map((key) => {
if (asideMap.hasOwnProperty(key)) if (asideMap.hasOwnProperty(key)) {
showKeys.push(key) showKeys.push(key);
}) }
console.log(showKeys) });
configStore.setCustomConfig(showKeys) // console.log(showKeys);
configStore.setCustomConfig(showKeys);
} }
} }
function editFilter(filter: any) { function editFilter(filter: any) {
const modal = unref(newFilterModalRef)! as any const modal = unref(newFilterModalRef)! as any;
modal.showModal() modal.showModal();
modal.edit(filter) modal.edit(filter);
} }
function updateComponent(key, e) { function updateComponent(key, e) {
console.log('跟新值', key, e) console.log("跟新值", key, e);
console.log('tempAsideValue跟新值', configStore.getAsideValue, asideValue) console.log("tempAsideValue跟新值", configStore.getAsideValue, asideValue);
// let tempAsideValue = configStore.getAsideValue || asideValue; // let tempAsideValue = configStore.getAsideValue || asideValue;
const tempobj = cloneDeep(asideValue) let tempobj = cloneDeep(asideValue);
console.log(tempobj, 'tempobj') console.log(tempobj, "tempobj");
tempobj[key] = e tempobj[key] = e;
console.log(tempobj, 'tempobj After') console.log(tempobj, "tempobj After");
customObjRef.value = tempobj customObjRef.value = tempobj;
// asideValue = Object.assign({}, asideValue, tempobj); // asideValue = Object.assign({}, asideValue, tempobj);
console.log('asideValue跟新值', tempobj) console.log("asideValue跟新值", tempobj);
configStore.setAsideValue(tempobj) configStore.setAsideValue(tempobj);
} }
function handleOk(item: any) { const handleOk = (item: any) => {
console.log('handleOk', item) console.log("handleOk", item);
if (item) { if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname) AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
filterHandler(item.id) filterHandler(item.id);
} else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced("高级筛选");
filterHandler("");
} }
else { };
AdvanceFilterRef.value.setCurrentlySelectedAdvanced('高级筛选')
filterHandler('')
}
}
// watch(asideValue, (newVal) => { // watch(asideValue, (newVal) => {
// console.log("asideValue", newVal); // console.log("asideValue", newVal);
@ -305,12 +294,12 @@ function handleOk(item: any) {
<!-- 高级筛选 --> <!-- 高级筛选 -->
<AdvanceFilter <AdvanceFilter
v-show="!showSearch" v-show="!showSearch"
ref="AdvanceFilterRef"
:type="0" :type="0"
@select="filterHandler" @select="filterHandler"
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@show-custom="showModal(customModalRef)" @show-custom="showModal(customModalRef)"
@show-filter="showModal(filterModalRef)" @show-filter="showModal(filterModalRef)"
ref="AdvanceFilterRef"
/> />
</div> </div>
@ -329,10 +318,10 @@ function handleOk(item: any) {
ref="filterModalRef" ref="filterModalRef"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk" @handleOk="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" /> <NewFilterModalVue ref="newFilterModalRef" @onOk="newFilterOk" />
<!-- 筛选 --> <!-- 筛选 -->
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
</n-scrollbar> </n-scrollbar>

@ -1,46 +0,0 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
const props = defineProps({
value: {
type: Boolean,
default: true,
},
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>

@ -20,6 +20,6 @@ import ReportUserVue from './ReportUser.vue'
import SimilarityVue from './Similarity.vue' import SimilarityVue from './Similarity.vue'
import TimeVue from './Time.vue' import TimeVue from './Time.vue'
import IzApprovalStatus from './IzApprovalStatus.vue' import IzApprovalStatus from './IzApprovalStatus.vue'
import IzShowAll from './IzShowAll.vue'
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus, IzShowAll } export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus }

@ -364,7 +364,7 @@ const handleOk = () => {
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span <span
:style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }" :style="{ 'margin-left': '18px', 'font-size': '16px' }"
class="wrapper-info-title" class="wrapper-info-title"
>基本信息</span >基本信息</span
> >

@ -310,7 +310,7 @@ defineExpose({
<span class="wrapper-title">{{ modalTitle }}</span> <span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">

@ -186,13 +186,12 @@ watch(
const listData = ref<any[]>([]); const listData = ref<any[]>([]);
async function featchList(userSearchId?:string) { async function featchList() {
loading.value = true; loading.value = true;
try { try {
const contentParams = { const contentParams = {
search_month: timeRange.value, search_month: timeRange.value,
search_history: 0, search_history: 0,
userSearchId
}; };
pagination.pageNo += 1; pagination.pageNo += 1;
@ -408,11 +407,6 @@ async function commitHandler(settingParam) {
onMounted(() => { onMounted(() => {
emitter.on("filter", refreshHandler); emitter.on("filter", refreshHandler);
// emitter.on("filter", (searchId)=>{
// console.log("emitter on filter" + searchId)
// reset();
// featchList(searchId);
// });
// //
getLastCheckNo().then((res) => { getLastCheckNo().then((res) => {
if (res.code === "OK") { if (res.code === "OK") {
@ -785,7 +779,7 @@ const dropdownOptions = ref([
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #fff; background: #fff;
padding: 0px 16px 0px 15px; padding: 0px 15px 0px 15px;
box-sizing: border-box; box-sizing: border-box;
height: 64px; height: 64px;
border: 1px solid rgb(239, 239, 245); border: 1px solid rgb(239, 239, 245);
@ -802,10 +796,7 @@ const dropdownOptions = ref([
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
width: 89px; margin-left: 12px;
height: 25px;
white-space: nowrap;
// margin-left: 12px;
} }
} }

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import { getToolsCount } from "@/api/home/main"; import {getToolsCount } from '@/api/home/main'
const emit = defineEmits<{ const emit = defineEmits<{
(e: "reject", params: any); (e: "reject", params: any);
@ -10,16 +10,16 @@ const emit = defineEmits<{
const show = ref(false); const show = ref(false);
const toolsData = ref({} as any); const toolsData = ref({} as any);
async function getData() { async function getData(){
const res = await getToolsCount(); const res=await getToolsCount();
toolsData.value = res.data || {}; toolsData.value=res.data || {};
if (res.code == "OK") { if(res.code == 'OK'){
showModal(); showModal();
} }
} }
onMounted(() => { onMounted(()=>{
getData(); getData()
}); })
function showModal() { function showModal() {
show.value = true; show.value = true;
@ -40,6 +40,8 @@ async function viewRepeat(e: MouseEvent) {
closeModal(); closeModal();
} }
defineExpose({ defineExpose({
showModal, showModal,
}); });
@ -53,33 +55,32 @@ defineExpose({
<div class="wrapper-mark">某某有限公司-某某事业部-张小凡</div> <div class="wrapper-mark">某某有限公司-某某事业部-张小凡</div>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<div class="flex_box"> <div class="flex_box" style="height: 100px">
<div class="item"> <div class="item">
<SvgIcon name="task_count" width="49" height="58" /> <SvgIcon name="task_count" width="80" height="96" />
<div class="num_box">{{ toolsData?.total || 0 }}</div> <div class="num_box">{{ toolsData?.total || 0 }}</div>
<div class="title_box">任务总数</div> <div class="title_box">任务总数</div>
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="task_wait" width="49" height="58" /> <SvgIcon name="task_wait" width="80" height="96" />
<div class="num_box">{{ toolsData?.treat || 0 }}</div> <div class="num_box">{{ toolsData?.treat || 0 }}</div>
<div class="title_box">待审批</div> <div class="title_box">待审批</div>
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="task_over" width="49" height="58" /> <SvgIcon name="task_over" width="80" height="96" />
<div class="num_box">{{ toolsData?.approvedCount || 0 }}</div> <div class="num_box">{{ toolsData?.approvedCount || 0 }}</div>
<div class="title_box">已审批</div> <div class="title_box">已审批</div>
</div> </div>
</div> </div>
<div class="footer" @click="viewRepeat"></div> <div class="footer">
<!-- <div class="footer">
<SvgIcon <SvgIcon
@click="viewRepeat" @click="viewRepeat"
style="cursor: pointer" style="cursor: pointer"
name="login_r" name="login_r"
width="167" width="200"
height="60" height="70"
/> />
</div> --> </div>
</div> </div>
</div> </div>
</n-modal> </n-modal>
@ -90,61 +91,60 @@ defineExpose({
background-image: url(../../../../assets/images/approval_modal_bg.png); background-image: url(../../../../assets/images/approval_modal_bg.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
width: 510px; width: 700px;
height: 361px; height: 500px;
box-shadow: none !important; box-shadow: none !important;
} }
.wrapper { .wrapper {
position: absolute; position: absolute;
left: calc(50% - 350px); left: calc(50% - 350px);
.wrapper-hearder { .wrapper-hearder {
margin-top: 80px; margin-top: 110px;
.wrapper-title { .wrapper-title {
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
font-family: PingFang SC, PingFang SC-Semibold; font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600; font-weight: Semibold;
text-align: center; text-align: center;
color: #333333; color: #333333;
line-height: 22px; line-height: 32px;
} }
.wrapper-mark { .wrapper-mark {
text-align: center;
font-size: 13px; font-size: 13px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular;
font-weight: 400; font-weight: Regular;
text-align: center; text-align: center;
color: #666666; color: #666666;
line-height: 18px; line-height: 18px;
margin-top: 8px;
} }
} }
.wrapper-content { .wrapper-content {
flex: 1; flex: 1;
border-radius: 8px; border-radius: 8px;
margin: 24px 50px 16px 48px; margin: 100px 60px 35px 120px;
.flex_box { .flex_box {
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;
margin: 58.5px 0 0 20px;
.item { .item {
.num_box { .num_box {
font-size: 20px; font-size: 32px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
font-weight: bold; font-weight: Bold;
text-align: center; text-align: left;
color: #202020; color: #202020;
line-height: 23px; text-align: center;
} }
.title_box { .title_box {
opacity: 0.6; opacity: 0.6;
font-size: 12px; font-size: 16px;
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular; font-weight: Regular;
text-align: center; text-align: center;
color: #202020; color: #202020;
line-height: 16px; text-align: center;
} }
} }
} }
@ -193,39 +193,14 @@ defineExpose({
} }
} }
.footer { .footer {
width: 153px; display: flex;
height: 46px; flex-flow: row nowrap;
background: linear-gradient(135deg, #3258e8, #786efc); align-items: center;
border: 1px solid; justify-content: center;
border-image: linear-gradient(123deg, #d7dffe 2%, #d7d5ff 88%) 1 1; margin: 20px 30px 0 0;
border-radius: 24px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
cursor: pointer;
margin: 20px auto 0;
position: relative; position: relative;
bottom: -30px; bottom: -80px;
left: 20px;
font-size: 24px;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
text-align: center;
color: #ffffff;
line-height: 46px;
border: none;
font-style: italic;
} }
// .footer {
// display: flex;
// flex-flow: row nowrap;
// align-items: center;
// justify-content: center;
// margin: 20px 30px 0 0;
// position: relative;
// bottom: -30px;
// left: 20px;
// }
} }
} }
</style> </style>

@ -77,7 +77,7 @@ function afterLeave() {
<span class="wrapper-title">生成任务包设置</span> <span class="wrapper-title">生成任务包设置</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<n-form ref="formRef" :model="model" require-mark-placement="left" style="margin-top: 8px;" :rules="rules"> <n-form ref="formRef" :model="model" require-mark-placement="left" style="margin-top: 8px;" :rules="rules">
@ -111,9 +111,8 @@ function afterLeave() {
flex-direction: column; flex-direction: column;
&-title { &-title {
font-weight: 600; font-weight: bold;
// font-weight: bold; font-size: 16px;
font-size: 18px;
color: #333; color: #333;
} }

@ -26,7 +26,6 @@ const CustomFieldModalRef = ref(null)
const collapse = ref(false) const collapse = ref(false)
const taskStore = useTaskStore() const taskStore = useTaskStore()
const taskListRef: any = ref(null) const taskListRef: any = ref(null)
const AdvanceFilterRef: any = ref(null);
// //
const showFieldList = ref<any[]>([]) const showFieldList = ref<any[]>([])
const search = ref('') const search = ref('')
@ -172,16 +171,6 @@ function setAsideItemName(text) {
defineExpose({ defineExpose({
setAsideItemName, setAsideItemName,
}) })
const handleOk = (item: any) => {
if (item) {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced(item.searchname);
filterHandler(item.id);
} else {
AdvanceFilterRef.value.setCurrentlySelectedAdvanced("高级筛选");
filterHandler("");
}
};
</script> </script>
<template> <template>
@ -226,7 +215,6 @@ const handleOk = (item: any) => {
@update:search="setShowSearch(true)" @update:search="setShowSearch(true)"
@show-custom="showModal(CustomFieldModalRef)" @show-custom="showModal(CustomFieldModalRef)"
@show-filter="showModal(filterModalRef)" @show-filter="showModal(filterModalRef)"
ref="AdvanceFilterRef"
/> />
<div v-show="showSearch" class="warpper"> <div v-show="showSearch" class="warpper">
@ -251,10 +239,9 @@ const handleOk = (item: any) => {
<TaskList <TaskList
ref="taskListRef" ref="taskListRef"
:show-field-list="showFieldList" :show-field-list="showFieldList"
style="height: 811px" style="height: calc(100vh - 146px)"
class="work-sheet-list" class="work-sheet-list"
/> />
<!-- calc(100vh - 146px) -->
<CustomFieldModal <CustomFieldModal
ref="CustomFieldModalRef" ref="CustomFieldModalRef"
:review-type="reviewType" :review-type="reviewType"
@ -266,7 +253,6 @@ const handleOk = (item: any) => {
:type="2" :type="2"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handleOk="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" /> <NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" />

@ -4,7 +4,6 @@ import { defineProps, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import ListItem from './ListItem.vue' import ListItem from './ListItem.vue'
import emitter from '@/utils/mitt' import emitter from '@/utils/mitt'
import { useTaskStore } from '@/store/modules/task' import { useTaskStore } from '@/store/modules/task'
import { filter } from 'lodash'
defineProps({ defineProps({
showFieldList: { showFieldList: {
@ -19,7 +18,6 @@ const el = ref<HTMLDivElement | null>(null)
const keyword = ref('') const keyword = ref('')
const canloadMore = ref(true) const canloadMore = ref(true)
const isLoading = ref(false) const isLoading = ref(false)
const searchId = ref('')
const pagination = reactive({ const pagination = reactive({
pageNo: 0, pageNo: 0,
@ -39,6 +37,7 @@ useInfiniteScroll(
) )
async function loadMore() { async function loadMore() {
console.log(77888)
if (isLoading.value || el.value == null) if (isLoading.value || el.value == null)
return return
isLoading.value = true isLoading.value = true
@ -58,7 +57,6 @@ async function fetchList() {
const result = await taskStore.fetchApprovalList({ const result = await taskStore.fetchApprovalList({
...pagination, ...pagination,
keyword: keyword.value, keyword: keyword.value,
userSearchId:searchId.value
}) })
const { data, pageCount } = result const { data, pageCount } = result
canloadMore.value = pageCount >= pagination.pageNo canloadMore.value = pageCount >= pagination.pageNo
@ -82,6 +80,7 @@ function reset() {
pagination.pageSize = 30 pagination.pageSize = 30
canloadMore.value = true canloadMore.value = true
data.value.length = 0 data.value.length = 0
taskStore.reset() taskStore.reset()
} }
@ -99,11 +98,6 @@ async function search(word: string) {
onMounted(() => { onMounted(() => {
emitter.on('refresh', refreshHandler) emitter.on('refresh', refreshHandler)
emitter.on('filter',async(id)=>{
await reset();
searchId.value = id;
data.value = await fetchList();
})
}) })
onUnmounted(() => { onUnmounted(() => {

@ -1,110 +1,103 @@
<script lang="ts" setup> <script lang="ts" setup>
import { import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from 'vue'
computed, import { chunk, clone } from 'lodash-es'
onMounted, import { useDialog, useMessage } from 'naive-ui'
onUnmounted, import { useRoute, useRouter } from 'vue-router'
reactive, import BatchModal from '../modal/BatchModal.vue'
ref, import CustomSettingModal from '../modal/CustomSettingModal.vue'
unref, import PictureTable from './PictureTable.vue'
watch, import TaskTable from './TaskTable.vue'
} from "vue"; import History from './History.vue'
import { chunk, clone } from "lodash-es"; import NotPassed from '@/components/Approval/NotPassed.vue'
import { useDialog, useMessage } from "naive-ui"; import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { useRoute, useRouter } from "vue-router"; import { TASK_STATUS_OBJ } from '@/enums/index'
import BatchModal from "../modal/BatchModal.vue";
import CustomSettingModal from "../modal/CustomSettingModal.vue";
import PictureTable from "./PictureTable.vue";
import TaskTable from "./TaskTable.vue";
import History from "./History.vue";
import NotPassed from "@/components/Approval/NotPassed.vue";
import { getAllfieldList, getfieldList } from "@/api/home/filter";
import { TASK_STATUS_OBJ } from "@/enums/index";
import { useFinal } from "@/store/modules/final";
import { import {
audit, audit,
dubiousfileyd, dubiousfileyd,
getSimilarityList, getSimilarityList,
getTaskDetailInfo, getTaskDetailInfo,
} from "@/api/task/task"; } from '@/api/task/task'
import { useTask } from "@/store/modules/task"; import { useTask } from '@/store/modules/task'
import { useUser } from "@/store/modules/user"; import { useUser } from '@/store/modules/user'
import { isEmpty } from "@/utils"; import { isEmpty } from '@/utils'
import { formatToDateHMS } from "@/utils/dateUtil"; import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from "@/utils/image"; import { hideDownload } from '@/utils/image'
const emit = defineEmits(["setAsideItemName"]); const emit = defineEmits(['setAsideItemName'])
const router = useRouter(); const router = useRouter()
const batch = ref(false); const batch = ref(false)
const selectItems = ref<any[]>([]); const selectItems = ref<any[]>([])
const message = useMessage(); const message = useMessage()
const dialog = useDialog(); const dialog = useDialog()
const notPassModalRef = ref(null); const notPassModalRef = ref(null)
const batchModalRef: any = ref(null); const batchModalRef: any = ref(null)
const totalCount = ref(0); const totalCount = ref(0)
const taskId: any = ref(""); // id const taskId: any = ref('') // id
const packageId: any = ref(""); // id const packageId: any = ref('') // id
const CustomSettingModalRef = ref(null); const CustomSettingModalRef = ref(null)
const taskTableData = ref<any[]>([]); const taskTableData = ref<any[]>([])
const route = useRoute(); const route = useRoute()
const isDetail = ref(false); // const isDetail = ref(false) //
const finalStore = useFinal();
const sortBy: any = { const sortBy: any = {
orderType: "desc", orderType: 'desc',
orderName: "similarityScore", orderName: 'similarityScore',
}; }
function onCheckChange(checked: any, item: any) { function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item); const index = selectItems.value.indexOf(item)
item.checked = checked; item.checked = checked
if (index === -1 && checked) selectItems.value.push(item); if (index === -1 && checked)
else selectItems.value.splice(index, 1); selectItems.value.push(item)
else selectItems.value.splice(index, 1)
} }
const showActions = computed(() => { const showActions = computed(() => {
return selectItems.value.length > 0 && batch; return selectItems.value.length > 0 && batch
}); })
const taskpagination = reactive({ const taskpagination = reactive({
pageNo: 1, pageNo: 1,
pageSize: 30, pageSize: 30,
}); })
const taskStore = useTask(); const taskStore = useTask()
const overTask = ref<any>(null); const overTask = ref<any>(null)
const taskDetailInfo = ref<any>({}); const taskDetailInfo = ref<any>({})
const taskDetailPictureList = ref<any[]>([]); const taskDetailPictureList = ref<any[]>([])
const userStore = useUser(); const userStore = useUser()
const imageRef = ref<ComponentElRef | null>(); const imageRef = ref<ComponentElRef | null>()
let processItems: any[] = []; let processItems: any[] = []
const isFullScreen = ref(false); const isFullScreen = ref(false)
const fullscreenStyles = computed<any>(() => ({ const fullscreenStyles = computed<any>(() => ({
width: isFullScreen.value ? "100vw" : "", width: isFullScreen.value ? '100vw' : '',
height: isFullScreen.value ? "100vh" : "", height: isFullScreen.value ? '100vh' : '',
position: isFullScreen.value ? "fixed" : "", position: isFullScreen.value ? 'fixed' : '',
top: isFullScreen.value ? "0" : "", top: isFullScreen.value ? '0' : '',
left: isFullScreen.value ? "0" : "", left: isFullScreen.value ? '0' : '',
zIndex: isFullScreen.value ? "100" : "", zIndex: isFullScreen.value ? '100' : '',
})); }))
onMounted(() => { onMounted(() => {
window.addEventListener("keydown", handleKeydown); window.addEventListener('keydown', handleKeydown)
if (route.query.id) { if (route.query.id) {
taskId.value = route.query.id; taskId.value = route.query.id
packageId.value = route.query.packageid; packageId.value = route.query.packageid
isDetail.value = true; isDetail.value = true
getDetail(); getDetail()
} }
}); })
// //
function handleKeydown(event) { function handleKeydown(event) {
if (event.key === "ArrowLeft") backHandler(); if (event.key === 'ArrowLeft')
backHandler()
// //
else if (event.key === "ArrowRight") forwardHandler(); else if (event.key === 'ArrowRight')
forwardHandler()
// //
} }
@ -112,26 +105,27 @@ function setBatch(value: boolean) {
// if (totalCount.value === 0) // if (totalCount.value === 0)
// return // return
batch.value = value; batch.value = value
if (value === false) { if (value === false) {
taskDetailInfo.value.checked = false; taskDetailInfo.value.checked = false
selectItems.value = []; selectItems.value = []
taskDetailPictureList.value.forEach((item) => { taskDetailPictureList.value.forEach((item) => {
item.checked = false; item.checked = false
}); })
} }
} }
// storeid // storeid
function currentTaskId() { function currentTaskId() {
const index = taskStore.getCurrentIndex; const index = taskStore.getCurrentIndex
return taskStore.getApprovalList[index]?.id || ""; return taskStore.getApprovalList[index]?.id || ''
} }
// states:1234 // states:1234
function validate(items: any[]) { function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务"; if (items.length === 0)
return '至少选中一个任务'
// const useInfo = userStore.getUserInfo // const useInfo = userStore.getUserInfo
// const username = useInfo.loginname // const username = useInfo.loginname
@ -148,129 +142,131 @@ function validate(items: any[]) {
// return '' // return ''
// } // }
return null; return null
} }
function approvalHandler(items?: any) { function approvalHandler(items?: any) {
let cloneItem: any; let cloneItem: any
if (batch.value) { if (batch.value) {
processItems = selectItems.value; processItems = selectItems.value
} else if (overTask.value) { }
cloneItem = clone(overTask.value); else if (overTask.value) {
processItems = [cloneItem]; cloneItem = clone(overTask.value)
processItems = [cloneItem]
} }
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent))
processItems = items; processItems = items
const msg = validate(processItems); const msg = validate(processItems)
if (msg !== null) { if (msg !== null) {
message.error(msg); message.error(msg)
return; return
} }
console.log(processItems); console.log(processItems)
const list: any = []; const list: any = []
processItems.forEach((item) => { processItems.forEach((item) => {
list.push({ list.push({
formId: item.id, formId: item.id,
taskId: item.taskId, taskId: item.taskId,
taskName: item.fromTaskName, taskName: item.fromTaskName,
}); })
}); })
const param = { const param = {
result: true, result: true,
comment: "", comment: '',
disposeType: "", disposeType: '',
disposeTypeId: "", disposeTypeId: '',
failCauseId: "", failCauseId: '',
failCauseName: "", failCauseName: '',
flowTaskInfoList: list, flowTaskInfoList: list,
}; }
dialog.info({ dialog.info({
title: "确认提示", title: '确认提示',
content: "确认给该任务审批为【通过】吗?", content: '确认给该任务审批为【通过】吗?',
positiveText: "确定", positiveText: '确定',
negativeText: "取消", negativeText: '取消',
onPositiveClick: () => { onPositiveClick: () => {
doAudit(param); doAudit(param)
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}); })
} }
function rejectHandler(items?: any) { function rejectHandler(items?: any) {
const modal = unref(notPassModalRef)! as any; const modal = unref(notPassModalRef)! as any
modal.showModal(items); modal.showModal(items)
} }
function singleRejectHandler() { function singleRejectHandler() {
const modal = unref(notPassModalRef)! as any; const modal = unref(notPassModalRef)! as any
modal.showModal([taskDetailInfo.value]); modal.showModal([taskDetailInfo.value])
} }
function doAudit(param: any) { function doAudit(param: any) {
audit(param).then((res) => { audit(param).then((res) => {
const { code } = res; const { code } = res
if (code === "OK") { if (code === 'OK') {
message.success(res.message); message.success(res.message)
setBatch(false); setBatch(false)
reloadList(param, "通过"); reloadList(param, '通过')
batchModalRef.value.reload(); batchModalRef.value.reload()
} }
}); })
} }
function showModal(modalRef: any) { function showModal(modalRef: any) {
const modal = unref(modalRef)! as any; const modal = unref(modalRef)! as any
modal.showModal(taskId.value); modal.showModal(taskId.value)
} }
function forwardHandler() { function forwardHandler() {
taskStore.forward(); taskStore.forward()
} }
function backHandler() { function backHandler() {
taskStore.back(); taskStore.back()
} }
async function handleDragEnd(event, item) { async function handleDragEnd(event, item) {
// //
const flag = taskStore.getInFile; const flag = taskStore.getInFile
if (flag) { if (flag) {
const res = await dubiousfileyd({ pictureid: item.pictureId }); const res = await dubiousfileyd({ pictureid: item.pictureId })
if (res.code === "OK") { if (res.code === 'OK') {
message.success("加入成功"); message.success('加入成功')
setBatch(false); setBatch(false)
getTableData(); getTableData()
getImgList(); getImgList()
} else { }
message.error(res.message); else {
message.error(res.message)
} }
taskStore.setInFile(false); taskStore.setInFile(false)
} }
} }
async function getTableData() { async function getTableData() {
const useInfo = userStore.getUserInfo; const useInfo = userStore.getUserInfo
const listData = []; const listData = []
const reviewType = 3; // const reviewType = 3 //
let res = await getAllfieldList(reviewType); let res = await getAllfieldList(reviewType)
const fieldList = (res as any)?.data; const fieldList = (res as any)?.data
res = await getfieldList(reviewType, useInfo.id); res = await getfieldList(reviewType, useInfo.id)
const userFieldList = (res as any)?.data.userFieldFixed; const userFieldList = (res as any)?.data.userFieldFixed
const blueList = [ const blueList = [
"拜访终端名称", '拜访终端名称',
"定位信息", '定位信息',
"拜访日期", '拜访日期',
"定位距离", '定位距离',
"拜访小结", '拜访小结',
"拜访项目类别", '拜访项目类别',
]; ]
fieldList.map((v) => { fieldList.map((v) => {
if (userFieldList.includes(v.name)) { if (userFieldList.includes(v.name)) {
const item = { const item = {
@ -278,11 +274,11 @@ async function getTableData() {
value: taskDetailInfo.value.ocrPicture[v.name], value: taskDetailInfo.value.ocrPicture[v.name],
key: v.name, key: v.name,
blue: blueList.includes(v.fieldDesc), blue: blueList.includes(v.fieldDesc),
}; }
listData.push(item); listData.push(item)
} }
}); })
taskTableData.value = chunk(listData, 2); taskTableData.value = chunk(listData, 2)
} }
async function getImgList() { async function getImgList() {
@ -291,97 +287,98 @@ async function getImgList() {
...taskpagination, ...taskpagination,
...sortBy, ...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id, pictureId: taskDetailInfo.value.ocrPicture.id,
}); })
taskDetailPictureList.value = data; taskDetailPictureList.value = data
totalCount.value = total; totalCount.value = total
} else { }
taskDetailPictureList.value.length = 0; else {
totalCount.value = 0; taskDetailPictureList.value.length = 0
totalCount.value = 0
} }
} }
function overTaskHandle() { function overTaskHandle() {
const item = taskDetailInfo.value; const item = taskDetailInfo.value
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null; overTask.value = null
return; return
} }
if (validate([item]) == null && batch.value === false) overTask.value = item; if (validate([item]) == null && batch.value === false)
overTask.value = item
} }
function leaveTaskHandler() { function leaveTaskHandler() {
overTask.value = null; overTask.value = null
} }
function showActionsModal() { function showActionsModal() {
const modal = unref(CustomSettingModalRef)! as any; const modal = unref(CustomSettingModalRef)! as any
modal.showModal(); modal.showModal()
} }
onUnmounted(() => { onUnmounted(() => {
taskStore.reset(); taskStore.reset()
window.removeEventListener("keydown", handleKeydown); window.removeEventListener('keydown', handleKeydown)
}); })
function immersionHandler() { function immersionHandler() {
// taskStore.updateImmersion() // taskStore.updateImmersion()
toggleFullScreen(); toggleFullScreen()
} }
// //
function toggleFullScreen() { function toggleFullScreen() {
isFullScreen.value = !isFullScreen.value; isFullScreen.value = !isFullScreen.value
} }
function previewHandler(event: MouseEvent) { function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation(); event.stopImmediatePropagation()
event.stopPropagation(); event.stopPropagation()
if (imageRef.value && (imageRef.value as any).src) if (imageRef.value && (imageRef.value as any).src)
(imageRef.value as any).mergedOnClick(); (imageRef.value as any).mergedOnClick()
} }
watch( watch(
() => [taskStore.activeId], () => [taskStore.activeId],
() => { () => {
if (!isEmpty(taskStore.getActiveId)) { if (!isEmpty(taskStore.getActiveId)) {
packageId.value = taskStore.getPackageid; packageId.value = taskStore.getPackageid
taskId.value = taskStore.getActiveId; taskId.value = taskStore.getActiveId
getDetail(); getDetail()
} }
} },
); )
// //
async function getDetail() { async function getDetail() {
taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value); taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value)
setBatch(false); setBatch(false)
getTableData(); getTableData()
getImgList(); getImgList()
} }
function notPassSuccess(param) { function notPassSuccess(param) {
batchModalRef.value.reload(); batchModalRef.value.reload()
reloadList(param, "不通过"); reloadList(param, '不通过')
} }
function reloadList(param, text) { function reloadList(param, text) {
// //
const id = currentTaskId(); const id = currentTaskId()
const hasCurrentId = param.flowTaskInfoList.find( const hasCurrentId = param.flowTaskInfoList.find(item => item.formId === id)
(item) => item.formId === id
); if (hasCurrentId)
finalStore.setListKey(); emit('setAsideItemName', text)
if (hasCurrentId) emit("setAsideItemName", text);
getDetail()
getDetail();
} }
function goBack() { function goBack() {
router.back(); router.back()
} }
function switchBatch() { function switchBatch() {
setBatch(!batch.value); setBatch(!batch.value)
} }
</script> </script>
@ -391,18 +388,8 @@ function switchBatch() {
<div class="left"> <div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span> <span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<template v-if="!isDetail"> <template v-if="!isDetail">
<SvgIcon <SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
size="22" <SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
</template> </template>
</div> </div>
<div v-if="!isDetail" class="right"> <div v-if="!isDetail" class="right">
@ -437,20 +424,8 @@ function switchBatch() {
</ul> </ul>
</n-popover> --> </n-popover> -->
<div class="icon-wrap"> <div class="icon-wrap">
<SvgIcon <SvgIcon v-if="isFullScreen" size="20" name="power-off" style="cursor: pointer;" @click="immersionHandler" />
v-if="isFullScreen" <SvgIcon v-else size="20" name="immersion-model" style="cursor: pointer;" @click="immersionHandler" />
size="20"
name="power-off"
style="cursor: pointer"
@click="immersionHandler"
/>
<SvgIcon
v-else
size="20"
name="immersion-model"
style="cursor: pointer"
@click="immersionHandler"
/>
</div> </div>
</div> </div>
<div v-show="showActions" class="batch"> <div v-show="showActions" class="batch">
@ -465,14 +440,14 @@ function switchBatch() {
src="@/assets/images/task/btn-not-pass.png" src="@/assets/images/task/btn-not-pass.png"
alt="" alt=""
@click.stop="rejectHandler(selectItems)" @click.stop="rejectHandler(selectItems)"
/> >
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<img <img
class="btn-approval" class="btn-approval"
src="@/assets/images/task/btn-pass.png" src="@/assets/images/task/btn-pass.png"
alt="" alt=""
@click.stop="approvalHandler" @click.stop="approvalHandler"
/> >
</div> </div>
</div> </div>
<div v-else class="right"> <div v-else class="right">
@ -525,27 +500,19 @@ function switchBatch() {
class="img-status" class="img-status"
src="@/assets/images/task/pass.png" src="@/assets/images/task/pass.png"
alt="" alt=""
/> >
<img <img
v-show="taskDetailInfo?.userapprove?.statshis === 3" v-show="taskDetailInfo?.userapprove?.statshis === 3"
class="img-status" class="img-status"
src="@/assets/images/task/not_pass.png" src="@/assets/images/task/not_pass.png"
alt="" alt=""
/> >
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
</div> </div>
<div class="big-mark" /> <div class="big-mark" />
<div class="preview" @click="previewHandler"> <div class="preview" @click="previewHandler">
@ -555,11 +522,7 @@ function switchBatch() {
<n-grid x-gap="12" y-gap="10" :cols="12"> <n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img <img class="icon-status" src="@/assets/images/task/status.png" alt="">
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
@ -574,47 +537,23 @@ function switchBatch() {
class="icon-status" class="icon-status"
src="@/assets/images/task/similarity.png" src="@/assets/images/task/similarity.png"
alt="" alt=""
/> >
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value num" <span class="value num">{{ totalCount }}<span class="unit"></span> </span>
>{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span> <span class="label">相似匹配</span>
</n-gi> </n-gi>
</n-grid> </n-grid>
</div> </div>
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
class="svg-time" <span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp)) : '-' }}</span>
color="#FFF"
size="16"
name="camera-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp)
)
: "-"
}}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
class="svg-time" <span>{{ taskDetailInfo?.ocrPicture?.submitDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp)) : '-' }}</span>
color="#FFF"
size="16"
name="submit-time"
/>
<span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
)
: "-"
}}</span>
</div> </div>
</div> </div>
<div style="display: none"> <div style="display: none">
@ -638,23 +577,11 @@ function switchBatch() {
/> />
</div> </div>
<div class="list"> <div class="list">
<div <div v-for="item in taskDetailPictureList" :key="item.id" class="item">
v-for="item in taskDetailPictureList"
:key="item.id"
class="item"
draggable="true"
@dragend="
(event) => {
handleDragEnd(event, item);
}
"
>
<div <div
draggable="true" draggable="true"
class="img-wrapper" class="img-wrapper"
:style="{ :style="{ 'background-image': `url(${item.serverThumbnailUrl})` }"
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@dragend=" @dragend="
(event) => { (event) => {
handleDragEnd(event, item); handleDragEnd(event, item);
@ -676,39 +603,21 @@ function switchBatch() {
class="tag-status" class="tag-status"
src="@/assets/images/task/tag-pass.png" src="@/assets/images/task/tag-pass.png"
alt="" alt=""
/> >
<img <img
v-if="item.historyStates === 3" v-if="item.historyStates === 3"
class="tag-status" class="tag-status"
src="@/assets/images/task/tag-not-pass.png" src="@/assets/images/task/tag-not-pass.png"
alt="" alt=""
/> >
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
class="svg-time" <span>{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }}</span>
color="#FFF"
size="8"
name="camera-time"
/>
<span>{{
item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp))
: "-"
}}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
class="svg-time" <span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
color="#FFF"
size="8"
name="submit-time"
/>
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
: "-"
}}</span>
</div> </div>
</div> </div>
<div <div
@ -740,7 +649,10 @@ function switchBatch() {
<History :data="taskDetailInfo" /> <History :data="taskDetailInfo" />
</n-tab-pane> </n-tab-pane>
</n-tabs> </n-tabs>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" /> <NotPassed
ref="notPassModalRef"
@success="notPassSuccess"
/>
<BatchModal <BatchModal
ref="batchModalRef" ref="batchModalRef"
@reject="rejectHandler" @reject="rejectHandler"
@ -836,9 +748,7 @@ function switchBatch() {
background: #fff; background: #fff;
border-radius: 3px; border-radius: 3px;
border: 1px solid rgb(239, 239, 245); border: 1px solid rgb(239, 239, 245);
height: 892px; height: calc(100vh - 88px);
// 62+82+16
// height: 100%;
overflow-y: scroll; overflow-y: scroll;
&-header { &-header {
@ -928,7 +838,7 @@ function switchBatch() {
z-index: 3; z-index: 3;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.20);
border-radius: 6px; border-radius: 6px;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
display: flex; display: flex;
@ -937,7 +847,7 @@ function switchBatch() {
cursor: pointer; cursor: pointer;
} }
.big-mark { .big-mark{
width: 100%; width: 100%;
height: 151px; height: 151px;
background: linear-gradient( background: linear-gradient(
@ -998,10 +908,7 @@ function switchBatch() {
z-index: 3; z-index: 3;
left: 16px; left: 16px;
bottom: 16px; bottom: 16px;
padding-left: 10px;
width: 195px;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item { .time-item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1117,10 +1024,6 @@ function switchBatch() {
z-index: 3; z-index: 3;
left: 3px; left: 3px;
bottom: 3px; bottom: 3px;
width: 98%;
background: rgba(216, 216, 216, 0.4);
border-radius: 7px;
.time-item { .time-item {
display: flex; display: flex;
align-items: center; align-items: center;

@ -74,7 +74,7 @@ defineProps({
align-items: center; align-items: center;
font-size: 16px; font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600; font-weight: 500;
color: #333333; color: #333333;
&:before { &:before {

@ -1,28 +1,22 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from "vue"; import { ref } from 'vue'
import Aside from "./aside/Aside.vue"; import Aside from './aside/Aside.vue'
import Content from "./content/Content.vue"; import Content from './content/Content.vue'
import DataHeader from "@/components/DataHeader/index.vue";
const asideRef: any = ref(null); const asideRef: any = ref(null)
function setAsideItemName(text) { function setAsideItemName(text) {
asideRef.value.setAsideItemName(text); asideRef.value.setAsideItemName(text)
} }
</script> </script>
<template> <template>
<div style="width: 100%; "> <div class="main">
<div class="header"> <!-- 侧边 -->
<DataHeader /> <Aside ref="asideRef" />
</div>
<div class="main">
<!-- 侧边 -->
<Aside ref="asideRef" />
<!-- 内容 --> <!-- 内容 -->
<Content @set-aside-item-name="setAsideItemName" /> <Content @set-aside-item-name="setAsideItemName" />
</div>
</div> </div>
</template> </template>

@ -275,7 +275,7 @@ defineExpose({
<span class="wrapper-title">{{ modalTitle }}</span> <span class="wrapper-title">{{ modalTitle }}</span>
<div class="wrapper-bar"> <div class="wrapper-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span> <span :style="{ 'margin-left': '18px' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">

@ -15,7 +15,7 @@ const ApprovalOver = (packageId) => {
<template> <template>
<div style="width: 100%"> <div style="width: 100%">
<div class="header"> <div class="header">
<DataHeader /> <DataHeader v-show="false" />
</div> </div>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->

Loading…
Cancel
Save