Merge branch 'test' into shen

# Conflicts:
#	src/views/task/content/Content.vue
pull/23/head
Dragon 1 year ago
commit be9badc045

@ -23,7 +23,7 @@ const adminInfo = {
value: 'task-main', value: 'task-main',
}, },
{ {
label: 'AI工单', label: '图审审批管理',
value: 'worksheet-main', value: 'worksheet-main',
}, },
], ],

@ -180,6 +180,19 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
params params
}) })
} }
/**
*
* @param
* @returns
*/
export async function deletePackage(params) {
return http.request({
url: `/ocr/ocrTaskPackage/deletePackage`,
method: 'get',
params
})
}
/** /**
* *
* @param * @param

@ -1,5 +1,5 @@
import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/router/constant' import { Layout } from '@/router/constant'
import type { RouteRecordRaw } from 'vue-router'
/** /**
* @param name , , * @param name , ,
@ -19,7 +19,7 @@ const routes: Array<RouteRecordRaw> = [
redirect: '/worksheet', redirect: '/worksheet',
component: Layout, component: Layout,
meta: { meta: {
title: 'AI工单', title: '图审审批管理',
permissions: ['worksheet-main'], permissions: ['worksheet-main'],
svgname: 'worksheet', svgname: 'worksheet',
svgsize: 22, svgsize: 22,
@ -30,7 +30,7 @@ const routes: Array<RouteRecordRaw> = [
path: 'worksheet', path: 'worksheet',
name: 'worksheet-main', name: 'worksheet-main',
meta: { meta: {
title: 'AI工单', title: '图审审批管理',
}, },
component: () => import('@/views/worksheet/index.vue'), component: () => import('@/views/worksheet/index.vue'),
}, },

@ -150,7 +150,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() { function createCondition() {
formValue.conditions.push({ formValue.conditions.push({
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}) })
} }
@ -227,7 +227,7 @@ function leaveHandler() {
formValue.conditions = [ formValue.conditions = [
{ {
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}, },
] ]
@ -269,7 +269,7 @@ defineExpose({
<n-form-item path="name" label="标题"> <n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系" v-show="false">
<n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
</n-form-item> </n-form-item>
<n-form-item <n-form-item

@ -158,7 +158,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() { function createCondition() {
formValue.conditions.push({ formValue.conditions.push({
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}) })
} }
@ -260,7 +260,7 @@ function leaveHandler() {
formValue.conditions = [ formValue.conditions = [
{ {
type: null, type: null,
operator: null, operator: 'eq',
result: null, result: null,
}, },
] ]
@ -302,7 +302,7 @@ defineExpose({
<n-form-item path="name" label="标题"> <n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent /> <n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</n-form-item> </n-form-item>
<n-form-item path="logic" label="逻辑关系"> <n-form-item path="logic" label="逻辑关系" v-show="false">
<n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" /> <n-select filterable v-model:value="formValue.logic" placeholder="请选择逻辑关系" :options="logicOptions" />
</n-form-item> </n-form-item>
<n-form-item <n-form-item

@ -236,11 +236,6 @@ async function tasksLoadingCloseCallback() {
checkingTaskModal.showModal() checkingTaskModal.showModal()
} }
async function showLoginSuccessModal() {
const modal = LoginSuccessModalRef.value as any
// modal.showModal()
}
async function commitHandler(settingParam) { async function commitHandler(settingParam) {
const params = { const params = {
name: settingParam.packagename, name: settingParam.packagename,

@ -93,7 +93,7 @@ const rules = {
if (loginSuccess.value || !value) { if (loginSuccess.value || !value) {
return true; return true;
} }
if (loginRejectMessge.value.indexOf("用户名") > -1) { if (loginRejectMessge.value.indexOf("用户名") > -1||loginRejectMessge.value.indexOf("账号") > -1) {
return new Error(loginRejectMessge.value); return new Error(loginRejectMessge.value);
} }
}, },

@ -12,7 +12,12 @@ import NotPassed from '@/components/Approval/NotPassed.vue'
import { getAllfieldList, getfieldList } from '@/api/home/filter' import { getAllfieldList, getfieldList } from '@/api/home/filter'
import { TASK_STATUS_OBJ } from '@/enums/index' import { TASK_STATUS_OBJ } from '@/enums/index'
import { audit, dubiousfileyd, getSimilarityList, getTaskDetailInfo } from '@/api/task/task' import {
audit,
dubiousfileyd,
getSimilarityList,
getTaskDetailInfo,
} 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'
@ -190,8 +195,6 @@ function doAudit(param: any) {
setBatch(false) setBatch(false)
reloadList(param, '通过') reloadList(param, '通过')
} }
else { message.error(res.message) }
}) })
} }
@ -232,12 +235,21 @@ async function getTableData() {
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 = [
'拜访终端名称',
'定位信息',
'拜访日期',
'定位距离',
'拜访小结',
'拜访项目类别',
]
fieldList.map((v) => { fieldList.map((v) => {
if (userFieldList.includes(v.name)) { if (userFieldList.includes(v.name)) {
const item = { const item = {
label: v.fieldDesc, label: v.fieldDesc,
value: taskDetailInfo.value.ocrPicture[v.name], value: taskDetailInfo.value.ocrPicture[v.name],
key: v.name, key: v.name,
blue: blueList.includes(v.fieldDesc),
} }
listData.push(item) listData.push(item)
} }
@ -247,13 +259,11 @@ async function getTableData() {
async function getImgList() { async function getImgList() {
if (!isEmpty(taskDetailInfo.value.ocrPicture.id)) { if (!isEmpty(taskDetailInfo.value.ocrPicture.id)) {
const { data, total } = await getSimilarityList( const { data, total } = await getSimilarityList({
{ ...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
} }
@ -336,24 +346,11 @@ function reloadList(param, text) {
<div class="wrapper-header"> <div class="wrapper-header">
<div class="left"> <div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span> <span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<SvgIcon <SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
size="22" <SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
</div> </div>
<div class="right"> <div class="right">
<div <div v-show="!showActions" style="display: flex; align-items: center">
v-show="!showActions"
style="display: flex; align-items: center"
>
<div class="btn" @click="setBatch(true)"> <div class="btn" @click="setBatch(true)">
<SvgIcon style="margin-right: 6px" size="22" name="batch" /> <SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批 批量审批
@ -384,11 +381,7 @@ function reloadList(param, text) {
</ul> </ul>
</n-popover> --> </n-popover> -->
<div class="icon-wrap"> <div class="icon-wrap">
<SvgIcon <SvgIcon size="20" name="immersion-model" @click="immersionHandler" />
size="20"
name="immersion-model"
@click="immersionHandler"
/>
</div> </div>
</div> </div>
<div v-show="showActions" class="batch"> <div v-show="showActions" class="batch">
@ -398,9 +391,19 @@ function reloadList(param, text) {
</template> </template>
返回 返回
</n-button> </n-button>
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="rejectHandler"> <img
class="btn-approval btn-left"
src="@/assets/images/task/btn-not-pass.png"
alt=""
@click.stop="rejectHandler"
>
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="approvalHandler"> <img
class="btn-approval"
src="@/assets/images/task/btn-pass.png"
alt=""
@click.stop="approvalHandler"
>
</div> </div>
</div> </div>
</div> </div>
@ -440,22 +443,24 @@ function reloadList(param, text) {
</div> </div>
<div class="status"> <div class="status">
<img v-show="taskDetailInfo?.userapprove?.statshis === 2" class="img-status" src="@/assets/images/task/pass.png" alt=""> <img
<img v-show="taskDetailInfo?.userapprove?.statshis === 3" class="img-status" src="@/assets/images/task/not_pass.png" alt=""> v-show="taskDetailInfo?.userapprove?.statshis === 2"
class="img-status"
src="@/assets/images/task/pass.png"
alt=""
>
<img
v-show="taskDetailInfo?.userapprove?.statshis === 3"
class="img-status"
src="@/assets/images/task/not_pass.png"
alt=""
>
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
</div> </div>
<div class="big-mark" /> <div class="big-mark" />
<div class="preview" @click="previewHandler"> <div class="preview" @click="previewHandler">
@ -469,18 +474,22 @@ function reloadList(param, text) {
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value">{{ TASK_STATUS_OBJ[taskDetailInfo?.userapprove?.statshis] }}</span> <span class="value">{{
TASK_STATUS_OBJ[taskDetailInfo?.userapprove?.statshis]
}}</span>
<span class="label">审批状态</span> <span class="label">审批状态</span>
</n-gi> </n-gi>
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img class="icon-status" src="@/assets/images/task/similarity.png" alt=""> <img
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value num">{{ <span class="value num">{{ totalCount }}<span class="unit"></span> </span>
totalCount
}}<span class="unit"></span> </span>
<span class="label">相似匹配</span> <span class="label">相似匹配</span>
</n-gi> </n-gi>
</n-grid> </n-grid>
@ -516,16 +525,16 @@ function reloadList(param, text) {
/> />
</div> </div>
<div class="list"> <div class="list">
<div <div v-for="item in taskDetailPictureList" :key="item.id" class="item">
v-for="(item) in taskDetailPictureList"
:key="item.id"
class="item"
>
<div <div
draggable="true" draggable="true"
class="img-wrapper" class="img-wrapper"
:style="{ 'background-image': `url(${item.imgUrl})` }" :style="{ 'background-image': `url(${item.imgUrl})` }"
@dragend="(event) => { handleDragEnd(event, item) }" @dragend="
(event) => {
handleDragEnd(event, item);
}
"
/> />
<div class="small-mark" /> <div class="small-mark" />
<div class="check"> <div class="check">
@ -537,8 +546,18 @@ function reloadList(param, text) {
/> />
</div> </div>
<img v-if="item.historyStates === 2" class="tag-status" src="@/assets/images/task/tag-pass.png" alt=""> <img
<img v-if="item.historyStates === 3" class="tag-status" src="@/assets/images/task/tag-not-pass.png" alt=""> v-if="item.historyStates === 2"
class="tag-status"
src="@/assets/images/task/tag-pass.png"
alt=""
>
<img
v-if="item.historyStates === 3"
class="tag-status"
src="@/assets/images/task/tag-not-pass.png"
alt=""
>
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" /> <SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
@ -549,7 +568,10 @@ function reloadList(param, text) {
<span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span> <span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</div> </div>
</div> </div>
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent"> <div
:class="{ 'percent-red': item.similarityScore === 100 }"
class="percent"
>
{{ item.similarityScore }}<span class="percent-unit">%</span> {{ item.similarityScore }}<span class="percent-unit">%</span>
</div> </div>
</div> </div>
@ -562,7 +584,11 @@ function reloadList(param, text) {
<n-tabs type="line" animated> <n-tabs type="line" animated>
<n-tab-pane name="task-info" tab="任务信息"> <n-tab-pane name="task-info" tab="任务信息">
<TaskTable :data="taskDetailInfo" :task-table-data="taskTableData" @show-modal="showActionsModal" /> <TaskTable
:data="taskDetailInfo"
:task-table-data="taskTableData"
@show-modal="showActionsModal"
/>
</n-tab-pane> </n-tab-pane>
<n-tab-pane name="picture-info" tab="图片信息"> <n-tab-pane name="picture-info" tab="图片信息">
<PictureTable :data="taskDetailInfo" /> <PictureTable :data="taskDetailInfo" />
@ -577,7 +603,6 @@ function reloadList(param, text) {
@reject="rejectHandler" @reject="rejectHandler"
@approval="approvalHandler" @approval="approvalHandler"
/> />
<CustomSettingModal ref="CustomSettingModalRef" :review-type="3" @on-ok="getTableData" />
</div> </div>
</template> </template>
@ -589,7 +614,7 @@ function reloadList(param, text) {
color: #666666; color: #666666;
} }
::v-deep(.n-tabs-tab--active .n-tabs-tab__label) { ::v-deep(.n-tabs-tab--active .n-tabs-tab__label) {
color: #507AFD; color: #507afd;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
} }
@ -608,49 +633,48 @@ function reloadList(param, text) {
} }
} }
.icon-wrap{ .icon-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 30px; width: 30px;
height: 30px; height: 30px;
background: rgba(80,122,253,.1); background: rgba(80, 122, 253, 0.1);
border-radius: 8px; border-radius: 8px;
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
} }
.img-info{ .img-info {
.icon-status{ .icon-status {
width: 32px; width: 32px;
height: 32px; height: 32px;
} }
.label{ .label {
font-size: 11px; font-size: 11px;
font-family: PingFang SC, PingFang SC-Medium; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
} }
.value{ .value {
font-size: 15px; font-size: 15px;
font-family: PingFang SC, PingFang SC-Semibold; font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600; font-weight: 600;
color: #ffffff; color: #ffffff;
} }
.num{ .num {
font-size: 18px; font-size: 18px;
font-family: PingFang SC, PingFang SC-Semibold; font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600; font-weight: 600;
color: #ffffff; color: #ffffff;
} }
.unit{ .unit {
font-size: 11px; font-size: 11px;
} }
} }
.wrapper { .wrapper {
display: flex; display: flex;
@ -713,13 +737,13 @@ function reloadList(param, text) {
display: flex; display: flex;
align-items: center; align-items: center;
.btn-approval{ .btn-approval {
width: 68px; width: 68px;
height: 28px; height: 28px;
cursor: pointer; cursor: pointer;
} }
.btn-left{ .btn-left {
margin-left: 16px; margin-left: 16px;
} }
} }
@ -764,7 +788,12 @@ function reloadList(param, text) {
.big-mark{ .big-mark{
width: 100%; width: 100%;
height: 151px; height: 151px;
background: linear-gradient(180deg,rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.00) 29%, rgba(3,0,0,0.73)); background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0) 29%,
rgba(3, 0, 0, 0.73)
);
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -818,7 +847,7 @@ function reloadList(param, text) {
left: 16px; left: 16px;
bottom: 16px; bottom: 16px;
.time-item{ .time-item {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
@ -828,12 +857,12 @@ function reloadList(param, text) {
margin-bottom: 4px; margin-bottom: 4px;
} }
.time-item2{ .time-item2 {
margin-bottom: 0; margin-bottom: 0;
} }
.svg-time{ .svg-time {
margin-right: 5px margin-right: 5px;
} }
} }
@ -849,20 +878,20 @@ function reloadList(param, text) {
justify-content: center; justify-content: center;
} }
.check{ .check {
position: absolute; position: absolute;
z-index: 3; z-index: 3;
left: 2%; left: 2%;
top: 2%; top: 2%;
} }
.status{ .status {
position: absolute; position: absolute;
z-index: 3; z-index: 3;
left: 0; left: 0;
top: 0; top: 0;
.img-status{ .img-status {
width: 133px; width: 133px;
height: 129px; height: 129px;
} }
@ -871,12 +900,12 @@ function reloadList(param, text) {
.right { .right {
flex: 0.5; flex: 0.5;
background: #F6F9FD; background: #f6f9fd;
border-radius: 8px; border-radius: 8px;
margin-left: 20px; margin-left: 20px;
padding: 24px; padding: 24px;
.right-card{ .right-card {
padding: 3px; padding: 3px;
} }
@ -905,10 +934,14 @@ function reloadList(param, text) {
// overflow: hidden; // overflow: hidden;
margin: 0px 16px 27px 0px; margin: 0px 16px 27px 0px;
.small-mark{ .small-mark {
width: 100%; width: 100%;
height: 36px; height: 36px;
background: linear-gradient(180deg,rgba(0,0,0,0.01), rgba(0,0,0,0.44) 88%); background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.44) 88%
);
border-radius: 0px 8px 8px 8px; border-radius: 0px 8px 8px 8px;
position: absolute; position: absolute;
left: 0; left: 0;
@ -916,7 +949,7 @@ function reloadList(param, text) {
z-index: 0; z-index: 0;
} }
.tag-status{ .tag-status {
width: 46px; width: 46px;
height: 22px; height: 22px;
position: absolute; position: absolute;
@ -929,7 +962,7 @@ function reloadList(param, text) {
z-index: 3; z-index: 3;
left: 3px; left: 3px;
bottom: 3px; bottom: 3px;
.time-item{ .time-item {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 10px; font-size: 10px;
@ -940,12 +973,12 @@ function reloadList(param, text) {
line-height: 12px; line-height: 12px;
} }
.time-item2{ .time-item2 {
margin-bottom: 0; margin-bottom: 0;
} }
.svg-time{ .svg-time {
margin-right: 5px margin-right: 5px;
} }
} }
@ -985,12 +1018,12 @@ function reloadList(param, text) {
font-size: 14px; font-size: 14px;
} }
.percent-unit{ .percent-unit {
font-size: 8px; font-size: 8px;
margin-top: 4px margin-top: 4px;
} }
.percent-red{ .percent-red {
background: #ff4e4f; background: #ff4e4f;
} }
} }

@ -1,4 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from "vue";
defineProps({ defineProps({
data: { data: {
type: Object as PropType<any>, type: Object as PropType<any>,
@ -8,19 +10,17 @@ defineProps({
type: Array as any, type: Array as any,
default: () => [[]], default: () => [[]],
}, },
}) });
const emit = defineEmits(['showModal']) const emit = defineEmits(["showModal"]);
function showActionsModal() { function showActionsModal() {
emit('showModal') emit("showModal");
} }
</script> </script>
<template> <template>
<div class="info-header"> <div class="info-header">
<div class="left_box"> <div class="left_box">
<div class="title"> <div class="title">填报信息</div>
填报信息
</div>
</div> </div>
<div class="right_box" @click="showActionsModal"> <div class="right_box" @click="showActionsModal">
自定义设置 自定义设置
@ -32,13 +32,13 @@ function showActionsModal() {
<th v-if="item && item[0]"> <th v-if="item && item[0]">
{{ item[0].label }} {{ item[0].label }}
</th> </th>
<td v-if="item && item[0]" :class="item.blue ? 'blue' : ''"> <td v-if="item && item[0]" :class="item[0].blue ? 'blue' : ''">
{{ item[0].value }} {{ item[0].value }}
</td> </td>
<th v-if="item && item.length > 1"> <th v-if="item && item.length > 1">
{{ item[1].label }} {{ item[1].label }}
</th> </th>
<td v-if="item && item.length > 1" :class="item.blue ? 'blue' : ''"> <td v-if="item && item.length > 1" :class="item[1].blue ? 'blue' : ''">
{{ item[1].value }} {{ item[1].value }}
</td> </td>
</tr> </tr>
@ -81,8 +81,8 @@ function showActionsModal() {
font-family: PingFang SC, PingFang SC-Regular; font-family: PingFang SC, PingFang SC-Regular;
color: #666666; color: #666666;
.icon{ .icon {
margin-left: 7px margin-left: 7px;
} }
} }
} }

@ -251,7 +251,10 @@ function removeHandler(id: string) {
let index = onList.value.findIndex((item) => { let index = onList.value.findIndex((item) => {
return item.id === id; return item.id === id;
}); });
if (index !== -1) onList.value.splice(index, 1); if (index !== -1) {
onList.value.splice(index, 1);
onShowList.value.splice(index, 1);
}
index = offList.value.findIndex((v) => v.id == id); index = offList.value.findIndex((v) => v.id == id);
offList.value[index].checked = false; offList.value[index].checked = false;

@ -1,8 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { format } from 'date-fns'; import { format } from 'date-fns';
import { computed, onMounted } from "vue"; import { computed, onMounted, ref } from "vue";
import type { PackageListItem } from "/#/workorder"; import type { PackageListItem } from "/#/workorder";
defineOptions({ name: "ListItem" }); defineOptions({ name: "ListItem" });
const emit = defineEmits(['dismisClick'])
const props = defineProps({ const props = defineProps({
selected: { selected: {
@ -21,19 +23,22 @@ const props = defineProps({
type: Array, type: Array,
default: () => [], default: () => [],
}, },
mouseOverTask: {
type: Array,
default: () => [],
},
}); });
console.log(props.dicts, "dicts"); const isDismissTask = ref(false)
const svgName = computed(() => { const svgName = computed(() => {
return props.selected ? "taskpack-select" : "taskpack"; return props.selected ? "taskpack-select" : "taskpack";
}); });
function getValueByLabel(label) {
const result = props.dicts.filter(item => item.name === label)
if (result.length === 0) { function handleDismissTask() {
return "" isDismissTask.value = true
} else { emit('dismisClick', props.mouseOverTask.id)
return props.dicts.filter(item => item.name === label)[0].fieldDesc
}
} }
onMounted(async () => { onMounted(async () => {
}) })
</script> </script>
@ -45,8 +50,16 @@ onMounted(async () => {
<div class="id-wrap"> <div class="id-wrap">
<SvgIcon :name="svgName" size="28" /> <SvgIcon :name="svgName" size="28" />
<span class="list-item-header-name" :class="{ 'list-item-header-selected': selected }"> <span class="list-item-header-name" :class="{ 'list-item-header-selected': selected }">
<span class="list-item-title" :title="listItem.name">{{ listItem.name }} </span> <n-ellipsis style="max-width: 180px">
{{ listItem.name }}
</n-ellipsis>
<span class="list-item-header-selected">({{ listItem.pictureCount }})</span> <span class="list-item-header-selected">({{ listItem.pictureCount }})</span>
<n-popover placement="bottom" trigger="hover" >
<template #trigger>
<span class="dismiss-task-pack" v-show="mouseOverTask?.id" style="cursor: pointer;" @click.stop="handleDismissTask">...</span>
</template>
<span>解散任务包</span>
</n-popover>
</span> </span>
</div> </div>
</div> </div>
@ -103,6 +116,11 @@ onMounted(async () => {
margin-bottom: 6px margin-bottom: 6px
} }
.dismiss-task-pack {
position: absolute;
right: 15px;
}
.list-item-header-name { .list-item-header-name {
width: 250px; width: 250px;
font-size: 16px; font-size: 16px;
@ -111,8 +129,10 @@ onMounted(async () => {
color: #333333; color: #333333;
margin-bottom: 0 0 8px 8px; margin-bottom: 0 0 8px 8px;
display: flex; display: flex;
justify-content: space-between; justify-content: flex-start;
.list-item-title{ align-items: center;
.list-item-title {
width: 200px; width: 200px;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;

@ -1,9 +1,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { deletePackage } from '@/api/home/main'
import NotPassed from '@/components/NotPassed.vue' import NotPassed from '@/components/NotPassed.vue'
import { useWorkOrder } from '@/store/modules/workOrder' import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils' import { isEmpty } from '@/utils'
import { useInfiniteScroll } from '@vueuse/core' import { useInfiniteScroll } from '@vueuse/core'
import { reactive, ref, unref, watch } from 'vue' import { useMessage } from 'naive-ui'
import { reactive, ref, watch } from 'vue'
import ApprovalModal from '../modal/ApprovalModal.vue' import ApprovalModal from '../modal/ApprovalModal.vue'
import ListItem from './ListItem.vue' import ListItem from './ListItem.vue'
import type { PackageListItem } from '/#/workorder' import type { PackageListItem } from '/#/workorder'
@ -33,11 +35,7 @@ const pagination = reactive({
const approvalModalRef = ref(null) const approvalModalRef = ref(null)
const notPassedRef: any = ref(null) const notPassedRef: any = ref(null)
const overTask = ref<any>(null);
function showModal(modalRef: any, id) {
const modal = unref(modalRef)! as any
modal.showModal(id)
}
function selectHandler(id: string, index: number) { function selectHandler(id: string, index: number) {
workStore.setActive(index) workStore.setActive(index)
@ -125,7 +123,21 @@ async function search(word: string) {
{ distance: 10, canLoadMore: () => canloadMore.value }, { distance: 10, canLoadMore: () => canloadMore.value },
) )
} }
function overTaskHandelr(item: any) {
overTask.value = item
}
function leaveTaskHandler() {
overTask.value = null;
}
const message = useMessage()
function dismisClick(packageId:string) {
deletePackage({packageId: packageId}).then((res) => {
if(res.code==="OK"){
message.success("解散任务包成功")
loadMore()
}
})
}
defineExpose({ defineExpose({
search, search,
}) })
@ -143,7 +155,11 @@ defineExpose({
:list-item="item" :list-item="item"
:show-field-list="showFieldList" :show-field-list="showFieldList"
:dicts="dicts" :dicts="dicts"
:mouse-over-task="overTask"
@click="selectHandler(item.id, index)" @click="selectHandler(item.id, index)"
@mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
@dismisClick="dismisClick"
/> />
</div> </div>
</n-spin> </n-spin>

@ -53,7 +53,7 @@ const taskpagination = reactive({
pageSize: 10, pageSize: 10,
}); });
const sortBy: SimilarityPictureSortParam = { const sortBy: SimilarityPictureSortParam = {
orderType: "asc", orderType: "desc",
orderName: "similarityScore", orderName: "similarityScore",
}; };
const workStore = useWorkOrder(); const workStore = useWorkOrder();
@ -234,7 +234,7 @@ async function handleSelect(item: any) {
async function sortHandler(orderby: "similarityScore" | "createdate") { async function sortHandler(orderby: "similarityScore" | "createdate") {
selectedSortName.value = orderby; selectedSortName.value = orderby;
sortBy.orderName = orderby; sortBy.orderName = orderby;
sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc"; sortBy.orderType = sortBy.orderType === "desc" ? "desc" : "asc";
refreshHandler(); refreshHandler();
} }
@ -480,7 +480,7 @@ function reloadList() {
<!-- 右侧任务 标题信息 --> <!-- 右侧任务 标题信息 -->
<div class="right"> <div class="right">
<n-scrollbar style="max-height: 100%"> <n-scrollbar style="max-height: 100%">
<span class="task-name" :title="taskDetailInfo.taskname">任务ID{{ taskDetailInfo.taskname }}</span> <n-ellipsis style="max-width: 350px">任务ID{{ taskDetailInfo.taskname }}</n-ellipsis>
<div class="tags"> <div class="tags">
<div class="tag tag-submiting" v-if="taskDetailInfo.states == 1">{{ TASK_STATUS_OBJ[taskDetailInfo.states] <div class="tag tag-submiting" v-if="taskDetailInfo.states == 1">{{ TASK_STATUS_OBJ[taskDetailInfo.states]
}}</div> }}</div>
@ -517,7 +517,7 @@ function reloadList() {
<div class="property"> <div class="property">
<span class="property-name top" style=" color: #666666">提报人 <span class="property-name top" style=" color: #666666">提报人
</span> </span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo?.source || "-" }}</span> <span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.upname || "-" }}</span>
</div> </div>
<div class="property"> <div class="property">
<span class="property-name top" style=" color: #666666">创建时间 <span class="property-name top" style=" color: #666666">创建时间
@ -527,8 +527,8 @@ function reloadList() {
<div class="property"> <div class="property">
<span class="property-name top" style=" color: #666666">提报时间 <span class="property-name top" style=" color: #666666">提报时间
</span> </span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.uploadTime && <span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.submitDateTimestamp &&
format(taskDetailInfo?.pictureInfo?.uploadTime, 'yyyy-MM-dd HH:mm:ss') || '-' }}</span> format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss') || '-' }}</span>
</div> </div>
<div v-for="key in Object.keys(propertys)" :key="key" class="property"> <div v-for="key in Object.keys(propertys)" :key="key" class="property">
<span class="property-name">{{ fieldMap[key] }}</span> <span class="property-name">{{ fieldMap[key] }}</span>
@ -914,8 +914,8 @@ function reloadList() {
} }
.tag-passed { .tag-passed {
color: #02C984; color: #ff7575;
border: 1px solid #02C984; border: 1px solid #ff7575;
} }
.tag-approved { .tag-approved {

@ -1,101 +1,104 @@
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, ref, toRefs } from 'vue' import { onMounted, reactive, ref, toRefs } from "vue";
import { format } from 'date-fns' import { format } from "date-fns";
import { NButton, NDataTable, useDialog, useMessage } from 'naive-ui' import { NButton, NDataTable, useDialog, useMessage } from "naive-ui";
import { aiApprovaltools, aiApprovaltoolsClearmark } from '@/api/work/work' import { aiApprovaltools, aiApprovaltoolsClearmark } from "@/api/work/work";
import { getToolsCount } from "@/api/home/main";
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'reject', params: any) (e: "reject", params: any);
(e: 'notPass', params: any) (e: "notPass", params: any);
}>() }>();
const dialog = useDialog() const dialog = useDialog();
const state: any = reactive({ const state: any = reactive({
detail: {}, detail: {},
taskId: '', taskId: "",
}) });
const { detail } = toRefs(state) const { detail } = toRefs(state);
const cardStyle = { const cardStyle = {
'width': '450px', width: "450px",
'--n-padding-bottom': '10px', "--n-padding-bottom": "10px",
'--n-padding-left': '0px', "--n-padding-left": "0px",
} };
const show = ref(false) const show = ref(false);
function showModal(id) { function showModal(id) {
console.log(id) console.log(id);
state.taskId = id state.taskId = id;
getDetail(id) getDetail(id);
} }
async function getDetail(id) { async function getDetail(id) {
const res = await aiApprovaltools({ taskid: id }) const res = await aiApprovaltools({ taskid: id });
if (res.code === 'OK') { if (res.code === "OK") {
state.detail = res.data state.detail = res.data;
show.value = true show.value = true;
} }
console.log(res) console.log(res);
} }
async function clearMark() { async function clearMark() {
const res = await aiApprovaltoolsClearmark({ taskid: state.taskId }) const res = await aiApprovaltoolsClearmark({ taskid: state.taskId });
if (res.code === 'OK') if (res.code === "OK") closeModal();
closeModal()
} }
function closeModal() { function closeModal() {
show.value = false show.value = false;
} }
async function reject() { async function reject() {
// emit('reject', { a: 'todo' }) // emit('reject', { a: 'todo' })
// closeModal() // closeModal()
dialog.info({ dialog.info({
title: '确认提示', title: "确认提示",
content: '确认设置成假吗?', content: "确认设置成假吗?",
positiveText: '确定', positiveText: "确定",
negativeText: '取消', negativeText: "取消",
onPositiveClick: async () => { onPositiveClick: async () => {
// TODO // TODO
// const result = await resetApproval() // const result = await resetApproval()
clearMark() clearMark();
}, },
onNegativeClick: () => {}, onNegativeClick: () => {},
}) });
} }
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit('notPass', { emit("notPass", {
id: state.taskId, id: state.taskId,
detail: state.detail, detail: state.detail,
}) });
e.preventDefault() e.preventDefault();
closeModal() closeModal();
}
async function getShowStatus() {
const res = await getToolsCount();
if (!JSON.parse(res.message)) {
show.value = true;
}
} }
onMounted(() => {
getShowStatus();
});
defineExpose({ defineExpose({
showModal, showModal,
}) });
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap"> <n-modal v-model:show="show" transform-origin="center" class="modal_wrap">
<div class="wrapper"> <div class="wrapper">
<div class="closed"> <div class="closed">
<SvgIcon <SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" />
style="cursor: pointer"
name="cut-down"
width="32"
@click="closeModal"
/>
</div> </div>
<div class="wrapper-hearder"> <div class="wrapper-hearder">
<div class="wrapper-title"> <div class="wrapper-title">智能AI审批工具</div>
智能AI审批工具
</div>
<div class="wrapper-mark"> <div class="wrapper-mark">
{{ detail.tenantusername }} {{ detail.tenantusername }}
</div> </div>
@ -105,25 +108,20 @@ defineExpose({
<div v-for="i in 1" :key="i" class="item"> <div v-for="i in 1" :key="i" class="item">
<div class="imgwrapper" /> <div class="imgwrapper" />
<div class="content"> <div class="content">
<div class="task_id"> <div class="task_id">任务ID{{ detail.taskid }}</div>
任务ID{{ detail.taskid }}
</div>
<div class="tag_box"> <div class="tag_box">
<div class="tag_item"> <div class="tag_item">基线任务</div>
基线任务 <div class="tag_item error">相似图片({{ detail.similarcount }})</div>
</div>
<div class="tag_item error">
相似图片({{ detail.similarcount }})
</div>
</div> </div>
<div class="time_box"> <div class="time_box">
{{ format(detail.createtime, 'yyyy-MM-dd HH:mm:ss') }} {{ format(detail.createtime, "yyyy-MM-dd HH:mm:ss") }}
</div> </div>
</div> </div>
</div> </div>
</n-scrollbar> </n-scrollbar>
<div class="mark_text"> <div class="mark_text">
智能识别{{ detail.similarComplete }}张图片来源于网络建议将图片标记为假 快速审批不通过 智能识别{{ detail.similarComplete }}张图片来源于网络建议将图片标记为假
快速审批不通过
</div> </div>
<div class="footer"> <div class="footer">
<SvgIcon <SvgIcon

Loading…
Cancel
Save