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`, 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
} }
@ -73,7 +72,7 @@ export async function getTFList() {
method: 'get', method: 'get',
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -145,7 +144,7 @@ export async function getIztaskrromList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -161,7 +160,7 @@ export async function getIztaskstatusList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -191,7 +190,7 @@ export async function getIzfirmList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -207,7 +206,7 @@ export async function getIzproductnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -223,7 +222,7 @@ export async function getizcustomnameList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -237,7 +236,7 @@ export async function getIzCustomtypeList(): Promise<any> {
method: 'get', method: 'get',
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -253,7 +252,7 @@ export async function getIzcustomlevel(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -269,7 +268,7 @@ export async function getIzprojecttypeList(enabled: string) {
params: { enabled }, params: { enabled },
}) })
const list = res.data[0].distionaryList const list = res.data&&res.data.length?res.data[0].distionaryList:[]
return list return list
} }
@ -298,8 +297,7 @@ export async function getRejectList() {
method: 'get', method: 'get',
}) })
const list = res.data[0].distionaryList return res.data&&res.data.length?res.data[0].distionaryList:[]
return list
} }
/** /**
@ -312,7 +310,7 @@ export async function getBackList() {
method: 'get', 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', 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`, url: `/static/admin/web/distionary/bytypecode/izstatus`,
method: 'get', 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`, url: `/static/admin/web/distionary/bytypecode/izApprovalStatus`,
method: 'get', 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, pageSize: page.pageSize,
currPage: page.pageNo, currPage: page.pageNo,
keyword: page.keyword, 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"> <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">{{ item.count }}</div> <div class="data_title" :style="hasColor?`color:${item.color || ''}`:''">{{ item.count }}</div>
<div class="data_content">{{ item.title }}</div> <div class="data_content">{{ item.title }}</div>
</div> </div>
</div> </div>
@ -12,36 +12,55 @@
</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: "相似度100%图", title: "片重复数",
count: 230, count: 230,
}, },
{ {
@ -58,37 +77,39 @@ 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: 20px 30px; padding: 1rem 3.125rem;
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: 50px; width: 3.125rem;
height: 50px height: 3.125rem;
} }
.data_wrap { .data_wrap {
.data_title { .data_title {
font-size: 20px; font-size: 1.25rem;
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: 23px; line-height: 1.4375rem;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.data_content { .data_content {
opacity: 0.6; opacity: 0.6;
font-size: 14px; font-size: .875rem;
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; line-height: 1rem;
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, 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 { export interface RowData {
id: string id: string
@ -125,12 +125,11 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: true, defaultValue: true,
isDefaultFilter: false, isDefaultFilter: false,
key: 'izshowall', key: 'izshowall',
component: PictureDownloadVue, component: IzShowAll,
inFilterList: false, inFilterList: false,
}, },
} }
// 审批添加筛选配置 (左侧) // 审批添加筛选配置 (左侧)
export const asideTaskMap: Recordable<AsideEntity> = { export const asideTaskMap: Recordable<AsideEntity> = {
izstatus: { izstatus: {
@ -194,7 +193,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: '项目类别',
@ -223,5 +222,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, 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 { dubiousfilelist, removeFiles } from '@/api/task/task'
import { viewOptions } from '@/config/home' import { viewOptions } from '@/config/home'
@ -22,7 +22,13 @@ 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',
@ -30,6 +36,14 @@ 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
@ -104,7 +118,8 @@ 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
@ -209,7 +224,18 @@ 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() {
@ -247,7 +273,23 @@ async function showModal() {
layout() 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 pagination.pageNo = 1
const list = await featchList() const list = await featchList()
listData.value = list listData.value = list
@ -388,11 +430,30 @@ function doAudit(param: any) {
function reloadList() { function reloadList() {
refreshHandler() refreshHandler()
} }
async function refreshHandler() { async function refreshHandler(filtersearchId?: any) {
reset() // rao start
const list = await featchList() // reset()
listData.value = list // const list = await featchList()
layout() // listData.value = list
// layout()
// rao end
reset();
if (filtersearchId) {
filterId = filtersearchId;
}
nextTick(() => {
setTimeout(() => {
useInfiniteScroll(
el as any,
() => {
loadMore();
},
{ distance: 10, canLoadMore: () => canloadMore }
);
}, 300);
});
} }
</script> </script>
@ -421,6 +482,12 @@ async function refreshHandler() {
<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>
@ -460,8 +527,13 @@ async function refreshHandler() {
<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 :src="item.imgUrl" class="img " <n-image
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }" /> :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" <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)" />
@ -549,7 +621,9 @@ async function refreshHandler() {
} }
.img { .img {
border-radius: 8px; border-radius: 7px;
display: block;
height: 100%;
} }
.wrapper { .wrapper {

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

@ -197,6 +197,7 @@ 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" />
@ -245,7 +246,7 @@ export default defineComponent({
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0; padding: 0;
height: 64px; height: 62px;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
width: 100%; width: 100%;
z-index: 11; z-index: 11;
@ -267,7 +268,7 @@ export default defineComponent({
img { img {
width: auto; width: auto;
height: 32px; height: 34px;
margin-right: 10px; margin-right: 10px;
} }
@ -280,7 +281,7 @@ export default defineComponent({
&-right { &-right {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20px; margin-right: 24px;
.back { .back {
width: 28px; width: 28px;

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

@ -5,6 +5,8 @@ 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({
@ -12,6 +14,8 @@ 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 {
@ -20,17 +24,33 @@ 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,162 +10,299 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from "vue"; } from 'vue'
import { CustomFilterModalVue, FilterModal, NewFilterModal } from "@/views/final/comp"; import { cloneDeep, isEqual } from 'lodash-es'
import Search from "@/views/home/aside/comp/Search.vue"; import { CustomFilterModalVue, FilterModal, NewFilterModal } from '@/views/final/comp'
import AdvanceFilter from "@/views/home/aside/comp/AdvanceFilter.vue"; import Search from '@/views/home/aside/comp/Search.vue'
import { getViewportOffset } from "@/utils/domUtils"; import AdvanceFilter from '@/views/home/aside/comp/AdvanceFilter.vue'
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn"; import { getViewportOffset } from '@/utils/domUtils'
import { useFinal } from "@/store/modules/final"; import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import type { Filter } from "/#/home"; import { useFinal } from '@/store/modules/final'
import type { AsideEntity } from "@/config/aside"; import type { Filter } from '/#/home'
import { asideMap } from "@/config/final"; import { getFilterList } from '@/api/home/main'
import type { AsideConfig } from "/#/api"; import type { AsideEntity } from '@/config/aside'
import emitter from "@/utils/mitt"; import { asideMap } from '@/config/final'
import type { AsideConfig } from '/#/api'
const emit = defineEmits(["inputChange"]); import emitter from '@/utils/mitt'
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) asideValue[key] = defaultValue; if (inFilterList !== false)
}); asideValue[key] = defaultValue
})
const filterModalRef = ref(null);
const newFilterModalRef = ref(null); const filterModalRef = ref(null)
const customModalRef = 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) { 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()
}); })
finalStore.$subscribe(() => { function initFilter(args, state) {
const customConfig = finalStore.getCustomConfig; const customConfig = finalStore.getCustomConfig
console.log(9999)
if (customConfig === null) return; console.log(customConfig)
console.log('args===>', args)
const showKeys: string[] = [...customConfig]; 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( const defaultKeys = Object.keys(asideMap).filter(
(key) => asideMap[key].isDefaultFilter key => asideMap[key].isDefaultFilter,
); )
showKeys.unshift(...defaultKeys); console.log(defaultKeys)
showKeys.unshift(...defaultKeys)
console.log(asideMap)
Object.keys(asideMap).forEach((key) => { Object.keys(asideMap).forEach((key) => {
// //
if (key.startsWith("iz")) console.log(key)
asideVisible[key] = if (key.startsWith('iz')) {
asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter); 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) => { 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 { }
return acc; 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) => { watch(asideVisible, (newVal) => {
Object.keys(asideValue).forEach((key) => { 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(() => { 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) {
emitter.emit("filter-final", searchId); // 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) { 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)
}); })
const inputChange = (keyword) => { function 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>
@ -187,11 +324,12 @@ const inputChange = (keyword) => {
v-show="showSearch" v-show="showSearch"
@select="scrollHandler" @select="scrollHandler"
@close="setShowSearch(false)" @close="setShowSearch(false)"
@inputChange="inputChange" @input-change="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)"
@ -216,6 +354,7 @@ const inputChange = (keyword) => {
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' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</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' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">

@ -40,6 +40,7 @@ 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() {
@ -487,7 +488,8 @@ 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)
// 使使 // 使使
const params = filterId ? { userSearchId: filterId } : asideParmas let 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,
@ -509,10 +511,8 @@ 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,6 +829,13 @@ 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
@ -845,8 +852,7 @@ 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 else query(pagination.page, pagination.pageSize)
query(pagination.page, pagination.pageSize)
} }
defineExpose({ defineExpose({
filterTableData, filterTableData,
@ -858,7 +864,12 @@ 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 size="16" name="list-mode" @click="changeContent" /> <SvgIcon
style="cursor: pointer"
size="16"
name="list-mode"
@click="changeContent"
/>
</div> </div>
<div> <div>
<SvgIcon <SvgIcon
@ -930,6 +941,9 @@ 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,9 +1,14 @@
<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_1752999610491604992.jpeg', img: "http://47.93.59.251/api/image/thumbnail_1755061416414842880.jpeg",
checked: false, checked: false,
title: "YP4567890545", title: "YP4567890545",
date: "2023-12-19 12:09:18", date: "2023-12-19 12:09:18",
@ -11,7 +16,7 @@ const item = {
const data = ref<any[]>([]); const data = ref<any[]>([]);
onMounted(() => { onMounted(() => {
for (let i = 0; i < 20; i++) { for (let i = 0; i < 8; i++) {
data.value.push(item as any); data.value.push(item as any);
} }
}); });
@ -19,32 +24,50 @@ onMounted(() => {
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="item" v-for="(item, index) in data" :key="index"> <div class="wrapper-header">
<div class="top"> <div class="wrapper-header-left">
<div <span class="wrapper-header-font">任务管理列表</span>
class="img" <SvgIcon
:style="`background:url(${item.img});background-size:100%;background-repeat: no-repeat;`" style="cursor: pointer"
> size="16"
<div class="check_box"><n-checkbox size="medium" label=" " /></div> name="card-mode"
</div> @click="changeContent"
<div class="content"> />
<div class="title">任务ID{{ item.title }}</div> </div>
<div class="date">{{ item.date }}</div> </div>
<div class="tag_box">
<div <div class="header_data">
class="tag_item" <DataHeader :hasColor="true" />
v-for="index in 2" </div>
:key="index"
:style="index == 2 ? 'color:#02C984' : 'color:#507AFD'" <div class="data_wrapper">
> <div class="item" v-for="(item, index) in data" :key="index">
{{ index==1?'待确认':'张思' }} <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> </div>
</div> <div class="bottom">
<div class="bottom"> <div class="resovle_action">通过</div>
<div class="resovle_action">通过</div> <div class="reject_action">通过</div>
<div class="reject_action">不通过</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -52,83 +75,165 @@ 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;
.item { &-header {
width: 23%; display: flex;
border: 1px solid #ededed; justify-content: space-between;
border-radius: 3px; align-items: center;
padding: 8px 10px; box-sizing: border-box;
margin-right: 10px; height: 64px;
.top { width: 100%;
div {
display: flex; display: flex;
flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: flex-start; }
.img {
width: 50%; .xjcc {
height: 70px; font-weight: bold;
border-radius: 3px; color: #507afd;
.check_box { margin-right: 20px;
margin-left: 8px; }
.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 { .header_data {
font-size: 11px; width: 100%;
font-weight: bolder; }
text-align: left; .data_wrapper {
color: #323233; display: flex;
line-height: 16px; 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; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-end;
.tag_item { .resovle_action {
width: 31px; font-size: 12px;
height: 14px;
font-size: 10px;
font-weight: bolder; font-weight: bolder;
text-align: left; text-align: left;
// color: #507afd; color: #507afd;
line-height: 14px; line-height: 17px;
letter-spacing: 0.1px; }
margin-right: 8px; .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 Content from './content/Content.vue'
import ListContent from './content/ListContent.vue' import ListContent from './content/ListContent.vue'
const showList = ref(false); defineOptions({
const contentRef:any = ref(null); name: 'FinalMain',
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 @inputChange="inputChange" /> <Aside @input-change="inputChange" />
<!-- 内容 --> <!-- 内容 -->
<Content @changeShow="showList=true" ref="contentRef" /> <Content v-show="!showList" ref="contentRef" @change-show="showList = true" />
<!-- 任务管理 --> <!-- 任务管理 -->
<!-- TODO:本地演示即可 上传注释注释 --> <!-- TODO:本地演示即可 上传注释注释 -->
<!-- <ListContent /> --> <ListContent v-show="showList" @change-show="showList = false" />
</div> </div>
</template> </template>

@ -10,109 +10,110 @@ import {
shallowRef, shallowRef,
unref, unref,
watch, watch,
} from "vue"; } from 'vue'
import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from "./comp/modals"; import dayjs from 'dayjs'
import Search from "./comp/Search.vue"; import { cloneDeep, isEqual } from 'lodash-es'
import AdvanceFilter from "./comp/AdvanceFilter.vue"; import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals'
import { getViewportOffset } from "@/utils/domUtils"; import Search from './comp/Search.vue'
import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn"; import AdvanceFilter from './comp/AdvanceFilter.vue'
import { useConfig } from "@/store/modules/asideConfig"; import { getViewportOffset } from '@/utils/domUtils'
import type { Filter } from "/#/home"; import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
import type { AsideEntity } from "@/config/aside"; import { useConfig } from '@/store/modules/asideConfig'
import { asideMap } from "@/config/aside"; import type { Filter } from '/#/home'
import type { AsideConfig } from "/#/api"; import type { AsideEntity } from '@/config/aside'
import emitter from "@/utils/mitt"; import { asideMap } from '@/config/aside'
import { getFilterList } from "@/api/home/main"; import type { AsideConfig } from '/#/api'
import dayjs from "dayjs"; import emitter from '@/utils/mitt'
import { cloneDeep, isEqual } from "lodash-es"; import { getFilterList } from '@/api/home/main'
const configStore = useConfig(); 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) => { 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()
let tempAsideValue = cloneDeep(asideValue); const 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) return; if (config == null || customConfig == null)
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
@ -120,150 +121,160 @@ configStore.$subscribe(() => {
showKeys.unshift(...defaultKeys) showKeys.unshift(...defaultKeys)
*/ */
let sortKeyList: any = []; const sortKeyList: any = []
console.log('init')
configStore.getFilterConfig.map((item: any) => { configStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item.id); console.log(item)
}); 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]; // asideValue[key] = customObjRef.value[str] //
console.log("相似度2222222222", asideValue[key]); console.log('相似度2222222222', asideValue[key])
} else if (str == "izyear") { }
if (typeof customObjRef.value[str] == "string") { else if (str == 'izyear') {
let time = customObjRef.value[str].split("-"); if (typeof customObjRef.value[str] == 'string') {
time[0] = new Date(time[0]).getTime(); const time = customObjRef.value[str].split('-')
time[1] = new Date(time[1]).getTime(); time[0] = new Date(time[0]).getTime()
customObjRef.value[str] = time; 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 != "izsimilarity" && str != "izyear" && customObjRef.value[str]) { }
console.log("customObjRef.value[str]222222", customObjRef.value[str]); 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 { }
asideValue[key] = null; else {
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)
let tempobj = cloneDeep(asideValue); const 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 { }
return acc; else {
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
} }
const newFilterOk = () => { function 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') {
let obj = res.data; const obj = res.data
customObjRef.value = res.data; customObjRef.value = res.data
let showKeys: any[] = []; const 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)
// console.log(showKeys); configStore.setCustomConfig(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;
let tempobj = cloneDeep(asideValue); const 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)
} }
const handleOk = (item: any) => { function 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);
@ -294,12 +305,12 @@ const 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>
@ -318,10 +329,10 @@ const handleOk = (item: any) => {
ref="filterModalRef" ref="filterModalRef"
@edit-filter="editFilter" @edit-filter="editFilter"
@show-new-filter="showModal(newFilterModalRef)" @show-new-filter="showModal(newFilterModalRef)"
@handleOk="handleOk" @handle-ok="handleOk"
/> />
<!-- 新增过滤 --> <!-- 新增过滤 -->
<NewFilterModalVue ref="newFilterModalRef" @onOk="newFilterOk" /> <NewFilterModalVue ref="newFilterModalRef" @on-ok="newFilterOk" />
<!-- 筛选 --> <!-- 筛选 -->
<CustomFilterModalVue ref="customModalRef" /> <CustomFilterModalVue ref="customModalRef" />
</n-scrollbar> </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 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 } 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-bar">
<div class="wrapper-info"> <div class="wrapper-info">
<span <span
:style="{ 'margin-left': '18px', 'font-size': '16px' }" :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }"
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' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</span>
</div> </div>
</div> </div>
<div class="wrapper-form"> <div class="wrapper-form">

@ -186,12 +186,13 @@ watch(
const listData = ref<any[]>([]); const listData = ref<any[]>([]);
async function featchList() { async function featchList(userSearchId?:string) {
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;
@ -407,6 +408,11 @@ 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") {
@ -779,7 +785,7 @@ const dropdownOptions = ref([
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background: #fff; background: #fff;
padding: 0px 15px 0px 15px; padding: 0px 16px 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);
@ -796,7 +802,10 @@ const dropdownOptions = ref([
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 25px; line-height: 25px;
margin-left: 12px; width: 89px;
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,8 +40,6 @@ async function viewRepeat(e: MouseEvent) {
closeModal(); closeModal();
} }
defineExpose({ defineExpose({
showModal, showModal,
}); });
@ -55,32 +53,33 @@ 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" style="height: 100px"> <div class="flex_box">
<div class="item"> <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="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="80" height="96" /> <SvgIcon name="task_wait" width="49" height="58" />
<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="80" height="96" /> <SvgIcon name="task_over" width="49" height="58" />
<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"> <div class="footer" @click="viewRepeat"></div>
<!-- <div class="footer">
<SvgIcon <SvgIcon
@click="viewRepeat" @click="viewRepeat"
style="cursor: pointer" style="cursor: pointer"
name="login_r" name="login_r"
width="200" width="167"
height="70" height="60"
/> />
</div> </div> -->
</div> </div>
</div> </div>
</n-modal> </n-modal>
@ -91,60 +90,61 @@ 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: 700px; width: 510px;
height: 500px; height: 361px;
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: 110px; margin-top: 80px;
.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: Semibold; font-weight: 600;
text-align: center; text-align: center;
color: #333333; color: #333333;
line-height: 32px; line-height: 22px;
} }
.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: Regular; font-weight: 400;
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: 100px 60px 35px 120px; margin: 24px 50px 16px 48px;
.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: 32px; 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;
color: #202020;
text-align: center; text-align: center;
color: #202020;
line-height: 23px;
} }
.title_box { .title_box {
opacity: 0.6; opacity: 0.6;
font-size: 16px; font-size: 12px;
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;
text-align: center; line-height: 16px;
} }
} }
} }
@ -193,14 +193,39 @@ defineExpose({
} }
} }
.footer { .footer {
display: flex; width: 153px;
flex-flow: row nowrap; height: 46px;
align-items: center; background: linear-gradient(135deg, #3258e8, #786efc);
justify-content: center; border: 1px solid;
margin: 20px 30px 0 0; 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; 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> </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' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</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,8 +111,9 @@ function afterLeave() {
flex-direction: column; flex-direction: column;
&-title { &-title {
font-weight: bold; font-weight: 600;
font-size: 16px; // font-weight: bold;
font-size: 18px;
color: #333; color: #333;
} }

@ -26,6 +26,7 @@ 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('')
@ -171,6 +172,16 @@ 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>
@ -215,6 +226,7 @@ defineExpose({
@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">
@ -239,9 +251,10 @@ defineExpose({
<TaskList <TaskList
ref="taskListRef" ref="taskListRef"
:show-field-list="showFieldList" :show-field-list="showFieldList"
style="height: calc(100vh - 146px)" style="height: 811px"
class="work-sheet-list" class="work-sheet-list"
/> />
<!-- calc(100vh - 146px) -->
<CustomFieldModal <CustomFieldModal
ref="CustomFieldModalRef" ref="CustomFieldModalRef"
:review-type="reviewType" :review-type="reviewType"
@ -253,6 +266,7 @@ defineExpose({
: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,6 +4,7 @@ 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: {
@ -18,6 +19,7 @@ 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,
@ -37,7 +39,6 @@ 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
@ -57,6 +58,7 @@ 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
@ -80,7 +82,6 @@ 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()
} }
@ -98,6 +99,11 @@ 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,103 +1,110 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from 'vue' import {
import { chunk, clone } from 'lodash-es' computed,
import { useDialog, useMessage } from 'naive-ui' onMounted,
import { useRoute, useRouter } from 'vue-router' onUnmounted,
import BatchModal from '../modal/BatchModal.vue' reactive,
import CustomSettingModal from '../modal/CustomSettingModal.vue' ref,
import PictureTable from './PictureTable.vue' unref,
import TaskTable from './TaskTable.vue' watch,
import History from './History.vue' } from "vue";
import NotPassed from '@/components/Approval/NotPassed.vue' import { chunk, clone } from "lodash-es";
import { getAllfieldList, getfieldList } from '@/api/home/filter' import { useDialog, useMessage } from "naive-ui";
import { TASK_STATUS_OBJ } from '@/enums/index' 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 { 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) if (index === -1 && checked) selectItems.value.push(item);
selectItems.value.push(item) else selectItems.value.splice(index, 1);
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') if (event.key === "ArrowLeft") backHandler();
backHandler()
// //
else if (event.key === 'ArrowRight') else if (event.key === "ArrowRight") forwardHandler();
forwardHandler()
// //
} }
@ -105,27 +112,26 @@ 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) if (items.length === 0) return "至少选中一个任务";
return '至少选中一个任务'
// const useInfo = userStore.getUserInfo // const useInfo = userStore.getUserInfo
// const username = useInfo.loginname // const username = useInfo.loginname
@ -142,131 +148,129 @@ 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) {
else if (overTask.value) { cloneItem = clone(overTask.value);
cloneItem = clone(overTask.value) processItems = [cloneItem];
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 {
else { message.error(res.message);
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 = {
@ -274,11 +278,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() {
@ -287,98 +291,97 @@ 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 {
else { taskDetailPictureList.value.length = 0;
taskDetailPictureList.value.length = 0 totalCount.value = 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) if (validate([item]) == null && batch.value === false) overTask.value = item;
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(item => item.formId === id) const hasCurrentId = param.flowTaskInfoList.find(
(item) => item.formId === id
if (hasCurrentId) );
emit('setAsideItemName', text) finalStore.setListKey();
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>
@ -388,8 +391,18 @@ 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 size="22" class="forward" name="arrow-left" @click="backHandler" /> <SvgIcon
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" /> size="22"
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">
@ -424,8 +437,20 @@ function switchBatch() {
</ul> </ul>
</n-popover> --> </n-popover> -->
<div class="icon-wrap"> <div class="icon-wrap">
<SvgIcon v-if="isFullScreen" size="20" name="power-off" style="cursor: pointer;" @click="immersionHandler" /> <SvgIcon
<SvgIcon v-else size="20" name="immersion-model" style="cursor: pointer;" @click="immersionHandler" /> 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> </div>
<div v-show="showActions" class="batch"> <div v-show="showActions" class="batch">
@ -440,14 +465,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">
@ -500,19 +525,27 @@ 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 v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" /> <SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div> </div>
<div class="mark"> <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>
<div class="big-mark" /> <div class="big-mark" />
<div class="preview" @click="previewHandler"> <div class="preview" @click="previewHandler">
@ -522,7 +555,11 @@ 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 class="icon-status" src="@/assets/images/task/status.png" alt=""> <img
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">
@ -537,23 +574,47 @@ 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">{{ totalCount }}<span class="unit"></span> </span> <span class="value num"
>{{ 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 class="svg-time" color="#FFF" size="16" name="camera-time" /> <SvgIcon
<span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp)) : '-' }}</span> class="svg-time"
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 class="svg-time" color="#FFF" size="16" name="submit-time" /> <SvgIcon
<span>{{ taskDetailInfo?.ocrPicture?.submitDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp)) : '-' }}</span> class="svg-time"
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">
@ -577,11 +638,23 @@ function switchBatch() {
/> />
</div> </div>
<div class="list"> <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 <div
draggable="true" draggable="true"
class="img-wrapper" class="img-wrapper"
:style="{ 'background-image': `url(${item.serverThumbnailUrl})` }" :style="{
'background-image': `url(${item.serverThumbnailUrl})`,
}"
@dragend=" @dragend="
(event) => { (event) => {
handleDragEnd(event, item); handleDragEnd(event, item);
@ -603,21 +676,39 @@ 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 class="svg-time" color="#FFF" size="8" name="camera-time" /> <SvgIcon
<span>{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }}</span> class="svg-time"
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 class="svg-time" color="#FFF" size="8" name="submit-time" /> <SvgIcon
<span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span> class="svg-time"
color="#FFF"
size="8"
name="submit-time"
/>
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
: "-"
}}</span>
</div> </div>
</div> </div>
<div <div
@ -649,10 +740,7 @@ function switchBatch() {
<History :data="taskDetailInfo" /> <History :data="taskDetailInfo" />
</n-tab-pane> </n-tab-pane>
</n-tabs> </n-tabs>
<NotPassed <NotPassed ref="notPassModalRef" @success="notPassSuccess" />
ref="notPassModalRef"
@success="notPassSuccess"
/>
<BatchModal <BatchModal
ref="batchModalRef" ref="batchModalRef"
@reject="rejectHandler" @reject="rejectHandler"
@ -748,7 +836,9 @@ 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: calc(100vh - 88px); height: 892px;
// 62+82+16
// height: 100%;
overflow-y: scroll; overflow-y: scroll;
&-header { &-header {
@ -838,7 +928,7 @@ function switchBatch() {
z-index: 3; z-index: 3;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: rgba(255, 255, 255, 0.20); background: rgba(255, 255, 255, 0.2);
border-radius: 6px; border-radius: 6px;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
display: flex; display: flex;
@ -847,7 +937,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(
@ -908,7 +998,10 @@ 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;
@ -1024,6 +1117,10 @@ 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: 500; font-weight: 600;
color: #333333; color: #333333;
&:before { &:before {

@ -1,22 +1,28 @@
<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 class="main"> <div style="width: 100%; ">
<!-- 侧边 --> <div class="header">
<Aside ref="asideRef" /> <DataHeader />
</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' }">基本信息</span> <span :style="{ 'margin-left': '18px', 'font-size': '16px','font-weight':'600' }">基本信息</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 v-show="false" /> <DataHeader />
</div> </div>
<div class="main"> <div class="main">
<!-- 侧边 --> <!-- 侧边 -->

Loading…
Cancel
Save