Compare commits

...

30 Commits

Author SHA1 Message Date
Dragon bba565500f 暂存
1 year ago
shenhailong 921f8ee7f6 Merge pull request 'feat:fix/highSearch' (#114) from fix/highSearch into test
1 year ago
Dragon f21579e774 Merge branch 'test' into fix/highSearch
1 year ago
Dragon 4356e499ea 左侧检索-高级检索功能-显示全部任务数据
1 year ago
lihui_ocr b4cb862d5f Merge pull request 'fix:图片时间区域加蒙层' (#112) from fix/changeimgback into test
1 year ago
lihui_ocr 22fb56564d fix:图片时间区域加蒙层
1 year ago
lihui_ocr cda699acf8 Merge pull request 'fix:图片中文字及阈值拖拽问题处理' (#111) from fix/changecontent into test
1 year ago
lihui_ocr 831484af02 fix:图片文字区域或阈值可拖拽
1 year ago
shenhailong 337d1bc73c Merge pull request 'feat:任务详情开启关闭规则' (#110) from fix/approvelDetail into test
1 year ago
Dragon c1581d69a0 任务详情开启关闭规则
1 year ago
lihui_ocr cb53ffcc2b 提交信息
1 year ago
raoyongjun e6a00eab6b Merge pull request 'feat: 修改bug' (#109) from fix/suspiciousSort into test
1 year ago
raofuzi c4ef80c082 feat: 修改bug
1 year ago
lihui_ocr afcf3f538e Revert "fix: 图片增加蒙层,图片文字阈值可拖拽"
1 year ago
赵辉 1cca2fc1d0 fix: 图片增加蒙层,图片文字阈值可拖拽
1 year ago
shenhailong 7ff4a7324c Merge pull request 'feat:终审右侧列表动态列问题' (#108) from fix/zhongshenlie into test
1 year ago
Dragon 4bfd0e8928 终审右侧列表动态列问题
1 year ago
yaoshuli 4787f2dd21 Merge pull request 'fix/suspiciousSort' (#107) from fix/suspiciousSort into test
1 year ago
raofuzi 030216cb3a feat: 修改可疑排序规则
1 year ago
raofuzi 0df2265e1f feat: 修改可疑排序规则
1 year ago
刘释隆 175353b86d Merge pull request 'feat: 修改ui样式' (#106) from feat/ui_hw into test
1 year ago
刘释隆 7c6e5b9c45 feat: 修改ui样式
1 year ago
刘释隆 e48c729bc0 Merge pull request 'feat: 任务审批页面调整为1440*1100' (#105) from feat/ui_hw into test
1 year ago
刘释隆 0ee2ea778e feat: 任务审批页面调整为1440*1100
1 year ago
刘释隆 74e6119eb3 Merge pull request 'feat: 任务审批模块左侧筛选条件联动' (#104) from feat/header_data into test
1 year ago
刘释隆 53d3062faa feat: 任务审批模块左侧筛选条件联动
1 year ago
刘释隆 b2d0714264 Merge pull request 'feat: 终审页面卡片列表切换功能添加' (#103) from feat/header_data into test
1 year ago
刘释隆 868b24c023 feat: 终审页面卡片列表切换功能添加
1 year ago
刘释隆 e64c6ad7ee Merge pull request 'feat: 按RP添加头部信息栏' (#102) from feat/header_data into test
1 year ago
刘释隆 087a43ad7e feat: 按RP添加头部信息栏
1 year ago

13909
package-lock.json generated

File diff suppressed because it is too large Load Diff

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

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

@ -0,0 +1,12 @@
<?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>

After

Width:  |  Height:  |  Size: 1.6 KiB

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

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

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

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

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

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

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

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

@ -10,162 +10,299 @@ import {
shallowRef,
unref,
watch,
} from "vue";
import { CustomFilterModalVue, FilterModal, NewFilterModal } from "@/views/final/comp";
import Search from "@/views/home/aside/comp/Search.vue";
import AdvanceFilter from "@/views/home/aside/comp/AdvanceFilter.vue";
import { getViewportOffset } from "@/utils/domUtils";
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
import { useFinal } from "@/store/modules/final";
import type { Filter } from "/#/home";
import type { AsideEntity } from "@/config/aside";
import { asideMap } from "@/config/final";
import type { AsideConfig } from "/#/api";
import emitter from "@/utils/mitt";
const emit = defineEmits(["inputChange"]);
const finalStore = useFinal();
} from 'vue'
import { cloneDeep, isEqual } from 'lodash-es'
import { CustomFilterModalVue, FilterModal, NewFilterModal } from '@/views/final/comp'
import Search from '@/views/home/aside/comp/Search.vue'
import AdvanceFilter from '@/views/home/aside/comp/AdvanceFilter.vue'
import { getViewportOffset } from '@/utils/domUtils'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import { useFinal } from '@/store/modules/final'
import type { Filter } from '/#/home'
import { getFilterList } from '@/api/home/main'
import type { AsideEntity } from '@/config/aside'
import { asideMap } from '@/config/final'
import type { AsideConfig } from '/#/api'
import emitter from '@/utils/mitt'
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) => {
const { defaultValue, inFilterList } = asideMap[key];
if (inFilterList !== false) asideValue[key] = defaultValue;
});
const filterModalRef = ref(null);
const newFilterModalRef = ref(null);
const customModalRef = ref(null);
const { defaultValue, inFilterList } = asideMap[key]
if (inFilterList !== false)
asideValue[key] = defaultValue
})
const filterModalRef = ref(null)
const newFilterModalRef = 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) {
const modal = unref(modalRef)! as any;
modal.showModal();
const modal = unref(modalRef)! as any
modal.showModal()
}
const mousetrap = inject("mousetrap") as any;
mousetrap.bind("[", collapseHandler);
const mousetrap = inject('mousetrap') as any
mousetrap.bind('[', collapseHandler)
onMounted(() => {
nextTick(() => {
computeSlideHeight();
});
});
computeSlideHeight()
})
})
const collapse = ref(false);
const collapse = ref(false)
function collapseHandler() {
collapse.value = !collapse.value;
collapse.value = !collapse.value
}
const asideWidth = computed(() => {
return collapse.value ? 0 : 308;
});
return collapse.value ? 0 : 308
})
const asideHeight = ref(500);
const asideHeight = ref(500)
const asideStyle = computed(() => {
return {
width: `${asideWidth.value}px`,
height: `${asideHeight.value}px`,
};
});
}
})
const collapseIcon = computed(() => {
return collapse.value ? "expand-cir" : "collapse-cir";
});
return collapse.value ? 'expand-cir' : 'collapse-cir'
})
function computeSlideHeight() {
const headEl = document.querySelector(".aside-header")!;
const { bottomIncludeBody } = getViewportOffset(headEl);
const height = bottomIncludeBody;
asideHeight.value = height - 24;
const headEl = document.querySelector('.aside-header')!
const { bottomIncludeBody } = getViewportOffset(headEl)
const height = bottomIncludeBody
asideHeight.value = height - 24
}
useWindowSizeFn(computeSlideHeight, 280);
useWindowSizeFn(computeSlideHeight, 280)
onBeforeMount(async () => {
finalStore.fetchCustomConfig();
});
finalStore.$subscribe(() => {
const customConfig = finalStore.getCustomConfig;
if (customConfig === null) return;
const showKeys: string[] = [...customConfig];
finalStore.fetchCustomConfig()
})
function initFilter(args, state) {
const customConfig = finalStore.getCustomConfig
console.log(9999)
console.log(customConfig)
console.log('args===>', args)
console.log('state===>', state)
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(
(key) => asideMap[key].isDefaultFilter
);
showKeys.unshift(...defaultKeys);
key => asideMap[key].isDefaultFilter,
)
console.log(defaultKeys)
showKeys.unshift(...defaultKeys)
console.log(asideMap)
Object.keys(asideMap).forEach((key) => {
//
if (key.startsWith("iz"))
asideVisible[key] =
asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
});
console.log(key)
if (key.startsWith('iz')) {
asideVisible[key]
= 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) => {
if (asideMap[key]) {
const config = {
key,
config: asideMap[key],
};
return [...acc, config];
} else {
return acc;
}
return [...acc, config]
}
else {
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) => {
Object.keys(asideValue).forEach((key) => {
if (newVal[key] === false) asideValue[key] = asideMap[key].defaultValue;
});
});
if (newVal[key] === false)
asideValue[key] = asideMap[key].defaultValue
})
})
const asideEnter = ref(false);
const asideEnter = ref(false)
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) {
showSearch.value = value;
if(!value){
showSearch.value = value
if (!value)
inputChange('')
}
}
// key
function scrollHandler(key: string) {
const element = document.querySelector(`#${key}`);
element?.scrollIntoView(true);
const element = document.querySelector(`#${key}`)
element?.scrollIntoView(true)
}
function filterHandler(searchId: string) {
emitter.emit("filter-final", searchId);
// function filterHandler(searchId: string) {
// console.log(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) {
const modal = unref(newFilterModalRef)! as any;
modal.showModal();
modal.edit(filter);
const modal = unref(newFilterModalRef)! as any
modal.showModal()
modal.edit(filter)
}
watch(asideValue, (newVal) => {
finalStore.setAsideValue(newVal);
});
finalStore.setAsideValue(newVal)
})
const inputChange = (keyword) => {
emit("inputChange", keyword);
};
function 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>
<template>
@ -187,11 +324,12 @@ const inputChange = (keyword) => {
v-show="showSearch"
@select="scrollHandler"
@close="setShowSearch(false)"
@inputChange="inputChange"
@input-change="inputChange"
/>
<!-- 高级筛选 -->
<AdvanceFilter
v-show="!showSearch"
ref="AdvanceFilterRef"
:type="1"
@select="filterHandler"
@update:search="setShowSearch(true)"
@ -216,6 +354,7 @@ const inputChange = (keyword) => {
ref="filterModalRef"
@edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)"
@handle-ok="handleOk"
/>
<!-- 新增过滤 -->
<NewFilterModal ref="newFilterModalRef" />

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

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

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

@ -1,9 +1,14 @@
<script lang="ts" setup>
import { onMounted, ref } from "vue";
const emit = defineEmits(["changeShow"]);
function changeContent() {
emit("changeShow");
}
const item = {
// img: "/src/assets/images/test.png",
img:'http://47.93.59.251/api/image/thumbnail_1752999610491604992.jpeg',
img: "http://47.93.59.251/api/image/thumbnail_1755061416414842880.jpeg",
checked: false,
title: "YP4567890545",
date: "2023-12-19 12:09:18",
@ -11,7 +16,7 @@ const item = {
const data = ref<any[]>([]);
onMounted(() => {
for (let i = 0; i < 20; i++) {
for (let i = 0; i < 8; i++) {
data.value.push(item as any);
}
});
@ -19,32 +24,50 @@ onMounted(() => {
<template>
<div class="wrapper">
<div class="item" v-for="(item, index) in data" :key="index">
<div class="top">
<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 class="wrapper-header">
<div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span>
<SvgIcon
style="cursor: pointer"
size="16"
name="card-mode"
@click="changeContent"
/>
</div>
</div>
<div class="header_data">
<DataHeader :hasColor="true" />
</div>
<div class="data_wrapper">
<div class="item" v-for="(item, index) in data" :key="index">
<div class="top">
<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 class="bottom">
<div class="resovle_action">通过</div>
<div class="reject_action">不通过</div>
<div class="bottom">
<div class="resovle_action">通过</div>
<div class="reject_action">通过</div>
</div>
</div>
</div>
</div>
@ -52,83 +75,165 @@ onMounted(() => {
<style scoped lang="less">
.wrapper {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: flex-start;
flex: 1;
// display: flex;
// flex-flow: row wrap;
// align-items: center;
// justify-content: flex-start;
// flex: 1;
box-sizing: border-box;
margin-left: 16px;
width: 100%;
background: #fff;
padding: 0px 24px 24px 24px;
.item {
width: 23%;
border: 1px solid #ededed;
border-radius: 3px;
padding: 8px 10px;
margin-right: 10px;
.top {
&-header {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
height: 64px;
width: 100%;
div {
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;
}
.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;
align-items: center;
justify-content: center;
color: #fff;
margin-right: 6px;
cursor: pointer;
}
.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;
}
}
.content {
margin-left: 8px;
.title,
.date {
font-size: 11px;
font-weight: bolder;
text-align: left;
color: #323233;
line-height: 16px;
}
}
.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;
.title,
.date {
font-size: 11px;
font-weight: bolder;
text-align: left;
color: #323233;
line-height: 16px;
}
}
.tag_box {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: flex-start;
.tag_item {
width: 31px;
height: 14px;
font-size: 10px;
font-weight: bolder;
text-align: left;
// color: #507afd;
line-height: 14px;
letter-spacing: 0.1px;
margin-right: 8px;
}
}
}
.tag_box {
.bottom {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: flex-start;
.tag_item {
width: 31px;
height: 14px;
font-size: 10px;
justify-content: flex-end;
.resovle_action {
font-size: 12px;
font-weight: bolder;
text-align: left;
// color: #507afd;
line-height: 14px;
letter-spacing: 0.1px;
margin-right: 8px;
color: #507afd;
line-height: 17px;
}
.reject_action {
font-size: 12px;
font-weight: bolder;
text-align: left;
color: #ff4e4f;
line-height: 17px;
margin-left: 15px;
}
}
}
.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;
}
}
}

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

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

@ -0,0 +1,46 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { useConfig } from '@/store/modules/asideConfig'
const props = defineProps({
value: {
type: Boolean,
default: 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 TimeVue from './Time.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 }
export { IzProjecttype, IzStatus, IzVisitcity, IzCustomlevel, IzCustomtype, IzCustomname, IzfirmVue, IzProductVue, IzvisitproVue, IztaskstatusVue, IztaskrromVue, IzProjectVue, PictureDownloadVue, PictureUploadVue, PlaceHolderVue, RegionVue, SimilarityVue, ReportUserVue, PlanVue, PictureTypeVue, TimeVue, IzApprovalStatus, IzShowAll }

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save