Merge branch 'test' of https://git.mcnetmart.com/guoxiangbin/ocr-web into fix/updatecontent

pull/68/head
raofuzi 1 year ago
commit 9adbf46067

@ -64,7 +64,7 @@ export async function repetitionTask() {
} }
/** /**
* *
* @returns * @returns
*/ */
export async function getRepeatList(params: FinalParam) { export async function getRepeatList(params: FinalParam) {
@ -76,8 +76,8 @@ export async function getRepeatList(params: FinalParam) {
const { data: { records, totalPage, totalCount } } = res const { data: { records, totalPage, totalCount } } = res
return { return {
pageCount: totalPage, pageCount: 3,
data: records, data: records,
totalCount, totalCount: 20,
} }
} }

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711952592553" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5038" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M178.016 592a16 16 0 0 1 16 16l-0.016 224h635.872V608a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v272a32 32 0 0 1-29.6 31.92l-2.4 0.08H146.016a32 32 0 0 1-32-32V608a16 16 0 0 1 16-16h48zM514.368 129.024c7.76 0.32 15.424 3.424 21.344 9.344l200.72 200.736a16 16 0 0 1 0 22.624l-33.936 33.936a16 16 0 0 1-22.624 0L552 267.792v394.688a16 16 0 0 1-16 16h-48a16 16 0 0 1-16-16V267.68l-127.984 128a16 16 0 0 1-22.624 0l-33.936-33.952a16 16 0 0 1 0-22.624L488.16 138.368c5.92-5.92 13.584-9.04 21.328-9.344z" p-id="5039" fill="#666666"></path></svg>

After

Width:  |  Height:  |  Size: 866 B

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1711952656753" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5379" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M184.224 514.112c80.672 145.056 199.472 227.936 327.744 227.936 128.288 0 247.088-82.88 327.808-227.936-80.72-145.056-199.536-227.872-327.792-227.872-128.288 0-247.088 82.816-327.76 227.872z m327.744 300.24c-159.28 0-310.432-106.8-404.368-285.648-4.8-9.12-4.8-20.048 0-29.184 93.92-178.848 245.12-285.632 404.368-285.632 159.28 0 310.464 106.784 404.432 285.632 4.8 9.136 4.8 20.048 0 29.184-93.968 178.848-245.152 285.648-404.432 285.648zM512 418.992c-51.696 0-93.728 42.656-93.728 95.136s42.032 95.12 93.728 95.12 93.728-42.656 93.728-95.136S563.68 418.976 512 418.976m0 255.616c-87.136 0-158.08-72-158.08-160.48 0-88.512 70.928-160.464 158.08-160.464 87.168 0 158.128 71.952 158.128 160.48 0 88.448-70.96 160.464-158.128 160.464" p-id="5380"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -147,7 +147,6 @@ function rowProps(row: RowData) {
} }
function handleCheck(rowKeys: DataTableRowKey[]) { function handleCheck(rowKeys: DataTableRowKey[]) {
console.log(rowKeys, selectionIds.value, "handleCheck");
selectionIds.value = rowKeys; selectionIds.value = rowKeys;
} }
@ -191,6 +190,7 @@ function deleteSelection(id = "") {
} }
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize); query(pagination.page, pagination.pageSize);
}); });
} }

@ -31,7 +31,7 @@ const actions = computed(() => {
<div :data-id="id"> <div :data-id="id">
<n-button <n-button
v-for="(action, index) in actions" :key="index" class="normal" v-for="(action, index) in actions" :key="index" class="normal"
:class="{ gap: index !== 0, reject: index === 1 }" text @click="(trigger(action) as any)" :class="{ gap: index !== 0, reject: action.key === 'reject' }" text @click="(trigger(action) as any)"
> >
{{ action.label }} {{ action.label }}
</n-button> </n-button>

@ -14,6 +14,7 @@ import {
} from 'vue' } from 'vue'
import { NDataTable, useDialog, useMessage } from 'naive-ui' import { NDataTable, useDialog, useMessage } from 'naive-ui'
import type { DataTableColumns, DataTableRowKey } from 'naive-ui' import type { DataTableColumns, DataTableRowKey } from 'naive-ui'
import { useRouter } from 'vue-router'
import { import {
ListAction, ListAction,
StatusItem, StatusItem,
@ -21,7 +22,7 @@ import {
import { RejectModal } from './index' import { RejectModal } from './index'
import { useDictionary } from '@/store/modules/dictonary' import { useDictionary } from '@/store/modules/dictonary'
import type { RowData } from '@/config/final' import type { RowData } from '@/config/final'
import { getFinalList, getRepeatList } from '@/api/final' import { getRepeatList } from '@/api/final'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { audit } from '@/api/task/task' import { audit } from '@/api/task/task'
import NotPassed from '@/components/Approval/NotPassed.vue' import NotPassed from '@/components/Approval/NotPassed.vue'
@ -35,6 +36,7 @@ const show = ref(false)
const izstatusList = ref([]) const izstatusList = ref([])
const dialog = useDialog() const dialog = useDialog()
const checkedRowKeys = ref([]) const checkedRowKeys = ref([])
const router = useRouter()
onBeforeMount(() => { onBeforeMount(() => {
dicStore.fetchizstatusListt() dicStore.fetchizstatusListt()
@ -59,7 +61,7 @@ const columns: DataTableColumns<RowData> = [
}, },
}, },
{ {
title: '任务Id', title: '任务ID',
key: 'id', key: 'id',
fixed: 'left', fixed: 'left',
width: 180, width: 180,
@ -234,6 +236,7 @@ function actionHandler(action: any, row: any) {
const { key } = action const { key } = action
switch (key) { switch (key) {
case 'view': case 'view':
goDetail(row)
break break
case 'reset': case 'reset':
// resetHandler() // resetHandler()
@ -355,6 +358,10 @@ function reload() {
checkedRowKeys.value = [] checkedRowKeys.value = []
} }
function goDetail(row) {
router.push({ name: 'final-detail', query: { id: row.id, packageid: row.packageid } })
}
defineExpose({ defineExpose({
showModal, showModal,
}) })
@ -373,45 +380,45 @@ defineExpose({
aria-modal="true" aria-modal="true"
> >
<div class="wrapper"> <div class="wrapper">
<span class="wrapper-title">重复任务</span> <div class="card-top">
<div class="wrapper-bar"> <span class="wrapper-title">重复任务</span>
<div class="wrapper-info"> <div class="wrapper-bar">
<span :style="{ 'margin-left': '18px' }">任务信息</span> <div class="wrapper-info">
<span>任务信息</span>
</div>
</div>
<div class="batch">
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="batchReject">
<SvgIcon size="24" name="vs" />
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
</div>
<div class="wrapper-content">
<NDataTable
ref="tableRef"
v-model:checked-row-keys="checkedRowKeys"
remote
:columns="columnsRef"
:scroll-x="1250"
:max-height="maxHeight"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
/>
</div> </div>
</div>
<div class="batch">
<img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="batchReject">
<SvgIcon size="24" name="vs" />
<img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
</div>
<div class="wrapper-content">
<NDataTable
ref="tableRef"
v-model:checked-row-keys="checkedRowKeys"
remote
:columns="columnsRef"
:scroll-x="1250"
:max-height="maxHeight"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
/>
</div> </div>
</div> </div>
<template #footer> <div class="wrapper-footer">
<div class="wrapper-footer"> <n-button class="btn1" type="info" @click="handleSumbit">
<n-button type="info" @click="handleSumbit"> 确定
确认 </n-button>
</n-button> <n-button secondary class="btn" style="margin-left: 15px" @click="closeModal">
<n-button secondary style="margin-left: 15px" @click="closeModal"> 取消
取消 </n-button>
</n-button> </div>
</div>
</template>
</n-card> </n-card>
</n-modal> </n-modal>
<RejectModal ref="rejectModalRef" @commit="rejectHandler" /> <RejectModal ref="rejectModalRef" @commit="rejectHandler" />
@ -435,9 +442,15 @@ defineExpose({
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.card-top{
padding: 24px;
}
&-title { &-title {
font-weight: bold; font-size: 18px;
font-size: 16px; font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600;
color: #333333;
} }
&-bar { &-bar {
@ -455,19 +468,31 @@ defineExpose({
&-footer { &-footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
border-top: 0.5px solid #d9d9d9;
padding: 15px 24px;
} }
&-info { &-info {
font-weight: bold; font-weight: bold;
position: relative; position: relative;
height: 29px;
background: #f8f8f8;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 600;
color: #333333;
display: flex;
align-items: center;
padding-left: 14px;
&:before { &:before {
background-color: #1980ff; background-color: #507AFD;
content: ""; content: "";
width: 5px; height: 18px;
border-radius: 2px; width: 4px;
top: 0; border-radius: 3px;
bottom: 0; top: 5px;
left: 0;
position: absolute; position: absolute;
} }
} }
@ -488,4 +513,21 @@ defineExpose({
--n-padding-top: 0px; --n-padding-top: 0px;
--n-padding-bottom: 12px; --n-padding-bottom: 12px;
} }
::v-deep(.n-card__content) {
padding: 0!important;
}
::v-deep(.n-data-table .n-data-table-td) {
padding: 10px 12px!important;
}
.btn1{
background: #507AFD;
}
.btn{
border: 1px solid #cad2dd;
background-color: #fff;
}
</style> </style>

@ -17,7 +17,6 @@ import {
import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row' import { rowPropKeys } from 'naive-ui/es/legacy-grid/src/Row'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { import {
Action,
CustomTabelModal, CustomTabelModal,
ImportExcelModal, ImportExcelModal,
ListAction, ListAction,
@ -784,11 +783,13 @@ async function refreshHandler(searchId?: any) {
trigger="click" trigger="click"
> >
<template #trigger> <template #trigger>
<SvgIcon style="cursor: pointer" size="20" name="more-ver" /> <div class="icon-wrap">
<SvgIcon size="20" name="more-blue" />
</div>
</template> </template>
<ul class="wrapper-header-action"> <ul class="wrapper-header-action">
<li @click="importHandler"> <li @click="importHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">批量导入数据</span> <SvgIcon size="20" name="import" /><span style="margin-left: 5px">批量导入数据</span>
</li> </li>
<li @click="exportHandler"> <li @click="exportHandler">
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span> <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出待审数据</span>
@ -796,6 +797,9 @@ async function refreshHandler(searchId?: any) {
<li> <li>
<SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span> <SvgIcon size="20" name="download" /><span style="margin-left: 5px">导出全部数据</span>
</li> </li>
<!-- <li>
<SvgIcon size="20" name="look" /><span style="margin-left: 5px">查看导入记录</span>
</li> -->
</ul> </ul>
</n-popover> </n-popover>
</div> </div>
@ -864,6 +868,7 @@ async function refreshHandler(searchId?: any) {
.batch { .batch {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 10px;
.btn-approval{ .btn-approval{
width: 68px; width: 68px;
@ -875,6 +880,17 @@ async function refreshHandler(searchId?: any) {
margin-left: 16px; margin-left: 16px;
} }
} }
.icon-wrap {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: rgba(80, 122, 253, 0.1);
border-radius: 8px;
cursor: pointer;
}
.wrapper { .wrapper {
display: flex; display: flex;
flex: 1; flex: 1;
@ -901,7 +917,7 @@ async function refreshHandler(searchId?: any) {
.xjcc { .xjcc {
font-weight: bold; font-weight: bold;
color: #6a80fc; color: #507AFD;
margin-right: 20px; margin-right: 20px;
} }

@ -219,6 +219,7 @@ function deleteSelection(id = "") {
} }
deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { deleteCondition({ ids: selectionIds.value.join(",") }).then(() => {
selectionIds.value = [];
query(pagination.page, pagination.pageSize); query(pagination.page, pagination.pageSize);
}); });
} }
@ -308,6 +309,10 @@ const inputHandler = debounce((word) => {
keyword.value = word; keyword.value = word;
query(1, 5); query(1, 5);
}, 300); }, 300);
const showSearch = computed(() => {
return selectionIds.value.length > 0;
});
</script> </script>
<template> <template>
@ -336,27 +341,49 @@ const inputHandler = debounce((word) => {
> >
</div> </div>
</div> </div>
<div class="wrapper-form">
<div class="wrapper-form" v-if="!showSearch">
<n-input <n-input
:style="{ width: '360px', border: '1px solid #cad2dd' }" :style="{ width: '360px', border: '1px solid #cad2dd' }"
placeholder="请输入过滤条件名称搜索" placeholder="请输入过滤条件名称搜索"
@input="inputHandler" @input="inputHandler"
> >
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" color="#fff" /> <SvgIcon size="14px" name="magnifying-1" />
</template> </template>
</n-input> </n-input>
<n-button type="info" style="background: #507afd" @click="handleClick"> <n-button type="info" @click="handleClick">
创建 创建
<template #icon> <template #icon>
<img <SvgIcon size="14px" name="magnifying-1" />
src="../../../../../assets/images/addIcon.png"
style="width: 16px; height: 16px"
/>
</template> </template>
</n-button> </n-button>
</div> </div>
<div class="wrapper-form" v-else>
<div class="del_btn">
<n-button icon-placement="left" size="medium" @click="deleteSelection">
<template #icon>
<SvgIcon name="delete-history" size="16" />
</template>
删除</n-button
>
</div>
<div class="msg">
<span
>已选中
<span style="color: #507afd; font-size: 16px">{{
selectionIds.length
}}</span>
</span
>
<a @click="selectionIds = []">清空</a>
</div>
</div>
<div class="wrapper-table"> <div class="wrapper-table">
<NDataTable <NDataTable
ref="tableRef" ref="tableRef"
@ -372,6 +399,7 @@ const inputHandler = debounce((word) => {
@update-page-size="handlePageSizeChange" @update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck"
@update:sorter="sortData" @update:sorter="sortData"
:checked-row-keys="selectionIds"
/> />
</div> </div>
</div> </div>

@ -178,11 +178,15 @@ function handleSubmit(e) {
const { data: userInfo } = await userStore.getInformation(); const { data: userInfo } = await userStore.getInformation();
message.destroyAll(); message.destroyAll();
const toPath = decodeURIComponent((route.query?.redirect || "/") as string); const toPath = decodeURIComponent((route.query?.redirect || "/") as string);
message.success("登录成功,即将进入系统");
if (route.name === LOGIN_NAME) if (route.name === LOGIN_NAME)
router.replace( if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) {
userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" message.success("登录成功,即将进入系统");
); router.replace(
userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/"
);
} else {
message.error("用户无菜单权限,请联系管理员");
}
else router.replace(toPath); else router.replace(toPath);
} else { } else {
loginSuccess.value = false; loginSuccess.value = false;
@ -249,12 +253,18 @@ function handleSmsSubmit(e) {
const { data: userInfo } = await userStore.getInformation(); const { data: userInfo } = await userStore.getInformation();
message.destroyAll(); message.destroyAll();
const toPath = decodeURIComponent((route.query?.redirect || "/") as string); const toPath = decodeURIComponent((route.query?.redirect || "/") as string);
message.success("登录成功,即将进入系统"); if (route.name === LOGIN_NAME) {
if (route.name === LOGIN_NAME) if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) {
router.replace( message.success("登录成功,即将进入系统");
userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" router.replace(
); userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/"
else router.replace(toPath); );
} else {
message.error("用户无菜单权限,请联系管理员");
}
} else {
router.replace(toPath);
}
} else { } else {
message.destroyAll(); message.destroyAll();
message.info(msg || "登录失败"); message.info(msg || "登录失败");
@ -300,10 +310,10 @@ async function sendCode(value) {
phone: formSms.phone, phone: formSms.phone,
agentcode: formSms.agentcode, agentcode: formSms.agentcode,
}); });
if(res.code == 'OK'){ if (res.code == "OK") {
startCount(); startCount();
}else{ } else {
message.error(res.message) message.error(res.message);
} }
} }

@ -645,7 +645,7 @@ function switchBatch() {
@reject="rejectHandler" @reject="rejectHandler"
@approval="approvalHandler" @approval="approvalHandler"
/> />
<CustomSettingModal ref="CustomSettingModalRef" /> <CustomSettingModal ref="CustomSettingModalRef" @onOk="getDetail"/>
</div> </div>
</template> </template>

@ -33,7 +33,7 @@ const pagination = reactive({
pageSize: 10, pageSize: 10,
}) })
const approvalModalRef = ref(null) const approvalModalRef: any = ref(null)
const notPassedRef: any = ref(null) const notPassedRef: any = ref(null)
const overTask = ref<any>(null); const overTask = ref<any>(null);
@ -94,8 +94,9 @@ watch(
(newVal) => { (newVal) => {
if (isEmpty(newVal)) if (isEmpty(newVal))
return return
activeId.value = newVal;
activeId.value = newVal approvalModalRef.value.showModal(activeId.value)
}, },
) )

@ -136,7 +136,7 @@ async function featchList() {
try { try {
taskpagination.pageNo += 1; taskpagination.pageNo += 1;
const { data, total, pageCount } = await getTaskDetailPictureList( const { data, total, pageCount } = await getTaskDetailPictureList(
{ ...taskpagination, ...sortBy, checkDuplicateId: workStore.activeId, pictureId: taskDetailInfo.value.pictureid } { ...taskpagination, ...sortBy, checkDuplicateId: workStore.activeId, pictureId: taskDetailInfo.value.id }
); );
totalCount.value = total; totalCount.value = total;
@ -223,10 +223,8 @@ async function queryDetail(checkDuplicateId: any) {
refreshHandler(); refreshHandler();
} }
async function handleSelect(item: any) { async function handleSelect(item: any) {
taskDetailInfo.value = await getTaskDetailInfo(workStore.activeId); taskDetailInfo.value = await getTaskDetailInfo(item.id)
const packageid = workStore.getActiveId; const packageid = workStore.getActiveId;
if (isEmpty(packageid)) { if (isEmpty(packageid)) {
listData.value.length = 0; listData.value.length = 0;
totalCount.value = 0; totalCount.value = 0;
@ -239,7 +237,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 === "desc" ? "desc" : "asc"; sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc";
refreshHandler(); refreshHandler();
} }
@ -296,6 +294,10 @@ function rejectHandler() {
const modal = unref(notPassModalRef)! as any const modal = unref(notPassModalRef)! as any
modal.showModal(selectItems.value) modal.showModal(selectItems.value)
} }
function singleRejectHandler(item) {
const modal = unref(notPassModalRef)! as any
modal.showModal([item])
}
function reject(idOrDesc: string, backId: string, isOther: boolean) { function reject(idOrDesc: string, backId: string, isOther: boolean) {
const formIds: string[] = processItems.map(item => item.id) const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map(item => item.taskId) const taskIds: string[] = processItems.map(item => item.taskId)
@ -488,15 +490,21 @@ function reloadList() {
<n-scrollbar style="max-height: 100%"> <n-scrollbar style="max-height: 100%">
<n-ellipsis style="max-width: 350px">任务ID{{ taskDetailInfo.taskname }}</n-ellipsis> <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.historyStates == 1">{{ TASK_STATUS_OBJ[taskDetailInfo.historyStates] <!-- <div class="tag tag-submiting" v-if="taskDetailInfo.workStatus == '1'">{{ TASK_STATUS_OBJ[taskDetailInfo.workStatus]
}}</div> }}</div>
<div class="tag tag-approve" v-else-if="taskDetailInfo.historyStates == 2">{{ <div class="tag tag-submited" v-else-if="taskDetailInfo.workStatus == '2'">已审批</div>
<div class="tag tag-passed" v-if="taskDetailInfo.historyStates == 2">{{
TASK_STATUS_OBJ[taskDetailInfo.historyStates] }}</div> TASK_STATUS_OBJ[taskDetailInfo.historyStates] }}</div>
<div class="tag tag-passed" v-else-if="taskDetailInfo.historyStates == 3">{{ <div class="tag tag-not-passed" v-else-if="taskDetailInfo.workStatus == 3">{{
TASK_STATUS_OBJ[taskDetailInfo.historyStates] TASK_STATUS_OBJ[taskDetailInfo.historyStates]
}}</div> }}</div> -->
<div class="tag tag-approved" v-else-if="taskDetailInfo.historyStates == 4">{{ <div class="tag tag-submiting" v-if="taskDetailInfo.historyStates == '1'"></div>
<div class="tag tag-submited" v-else-if="taskDetailInfo.historyStates == 2 || taskDetailInfo.workStatus == 3">已审批</div>
<div class="tag tag-passed" v-if="taskDetailInfo.historyStates == 2">{{
TASK_STATUS_OBJ[taskDetailInfo.historyStates] }}</div> TASK_STATUS_OBJ[taskDetailInfo.historyStates] }}</div>
<div class="tag tag-not-passed" v-else-if="taskDetailInfo.workStatus == 3">{{
TASK_STATUS_OBJ[taskDetailInfo.historyStates]
}}</div>
</div> </div>
<n-divider class="divider-line" /> <n-divider class="divider-line" />
<div class="property"> <div class="property">
@ -605,7 +613,7 @@ function reloadList() {
</div> --> </div> -->
<div v-show="overTask && overTask.id === item.id" class="action"> <div v-show="overTask && overTask.id === item.id" class="action">
<SvgIcon style="cursor: pointer" name="t1" @click.stop="approvalHandler" /> <SvgIcon style="cursor: pointer" name="t1" @click.stop="approvalHandler" />
<SvgIcon style="cursor: pointer;margin-left: 40px;" name="t2" @click.stop="rejectHandler" /> <SvgIcon style="cursor: pointer;margin-left: 40px;" name="t2" @click.stop="singleRejectHandler(item)" />
</div> </div>
</div> </div>
</div> </div>
@ -909,17 +917,21 @@ function reloadList() {
line-height: 16px; line-height: 16px;
} }
.tag-submited {
color: #507AFD;
border: 1px solid #507AFD;
}
.tag-submiting { .tag-submiting {
color: #feaf2d; color: #FFB800;
border: 1px solid #feaf2d; border: 1px solid #FFB800;
} }
.tag-approve { .tag-passed {
color: #398ade; color: #02C984;
border: 1px solid #398ade; border: 1px solid #02C984;
} }
.tag-passed { .tag-not-passed {
color: #ff7575; color: #ff7575;
border: 1px solid #ff7575; border: 1px solid #ff7575;
} }

@ -1,10 +1,11 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, reactive, ref, toRefs } from "vue"; import { nextTick, onDeactivated, 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, setTF } from "@/api/work/work";
import { getToolsCount } from "@/api/home/main"; import { getToolsCount } from "@/api/home/main";
import { storage } from "@/utils/Storage";
import { CURRENT_USER } from "@/store/mutation-types";
const emit = defineEmits<{ const emit = defineEmits<{
(e: "reject", params: any); (e: "reject", params: any);
(e: "notPass", params: any); (e: "notPass", params: any);
@ -14,7 +15,7 @@ const dialog = useDialog();
const state: any = reactive({ const state: any = reactive({
detail: {}, detail: {},
taskId: "", packageid: "",
}); });
const { detail } = toRefs(state); const { detail } = toRefs(state);
const cardStyle = { const cardStyle = {
@ -26,23 +27,32 @@ const cardStyle = {
const show = ref(false); const show = ref(false);
function showModal(id) { function showModal(id) {
console.log(id); state.packageid = id;
state.taskId = id;
getDetail(id); getDetail(id);
} }
async function getDetail(id) { async function getDetail(id) {
// const userInfo = storage.get(CURRENT_USER);
// const nodeType = userInfo.nodeType;
id = "264626184091111068";
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);
} }
const handleReject = async () => {
const res = await setTF({
taskchildpictureids: state.detail.taskIdList.join(","),
packageid: state.packageid,
iztrueorfalse: 0,
});
console.log(res, "handleReject");
};
async function clearMark() { async function clearMark() {
const res = await aiApprovaltoolsClearmark({ taskid: state.taskId }); const res = await aiApprovaltoolsClearmark({ taskid: state.packageid });
if (res.code === "OK") closeModal(); if (res.code === "OK") closeModal();
} }
@ -69,7 +79,7 @@ async function reject() {
async function viewRepeat(e: MouseEvent) { async function viewRepeat(e: MouseEvent) {
emit("notPass", { emit("notPass", {
id: state.taskId, id: state.packageid,
detail: state.detail, detail: state.detail,
}); });
e.preventDefault(); e.preventDefault();
@ -78,12 +88,28 @@ async function viewRepeat(e: MouseEvent) {
async function getShowStatus() { async function getShowStatus() {
const res = await getToolsCount(); const res = await getToolsCount();
if (res.code == 'OK') { if (res.code == "OK") {
show.value = true; show.value = true;
} }
} }
const initRem = () => {
const designWidth = 1440;
const rempPx = 16;
const scale = window.innerWidth / designWidth;
document.documentElement.style.fontSize = scale * rempPx + "px";
};
onMounted(() => { onMounted(() => {
getShowStatus(); getShowStatus();
nextTick(() => {
initRem();
});
window.addEventListener("resize", () => {
initRem();
});
});
onDeactivated(() => {
window.removeEventListener("resize", () => {});
}); });
defineExpose({ defineExpose({
@ -92,7 +118,7 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap"> <n-modal :show="show" transform-origin="center" class="modal_wrap">
<div class="wrapper"> <div class="wrapper">
<div class="closed"> <div class="closed">
<SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" /> <SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" />
@ -100,31 +126,37 @@ defineExpose({
<div class="wrapper-hearder"> <div class="wrapper-hearder">
<div class="wrapper-title">智能AI审批工具</div> <div class="wrapper-title">智能AI审批工具</div>
<div class="wrapper-mark"> <div class="wrapper-mark">
{{ detail.tenantusername }} {{ detail.tenantUserName }}-{{ detail.packageName }}
</div> </div>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<n-scrollbar style="height: 200px"> <div 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">#AI任务包{{ detail.packageId }}</div>
<div class="task_id">任务ID{{ detail.taskid }}</div> <div class="tag_box">
<div class="tag_box"> <div class="tag_item error">
<div class="tag_item">基线任务</div> <span style="color: red">error</span> 重复图片({{
<div class="tag_item error">相似图片({{ detail.similarcount }})</div> detail.similarComplete
</div> }})
<div class="time_box">
{{ format(detail.createtime, "yyyy-MM-dd HH:mm:ss") }}
</div> </div>
</div> </div>
<div class="time_box">
任务包生成时间
{{ format(detail?.createtime || 0, "yyyy-MM-dd HH:mm:ss") }}
</div>
</div> </div>
</n-scrollbar> </div>
<div class="mark_text"> <div class="mark_text">
智能识别{{ detail.similarComplete }}张图片来源于网络建议将图片标记为假 智能提示{{ detail?.similarComplete }} 张图片相似度为100%重复图片{{
快速审批不通过 detail?.passCount
}}张审批状态为<span style="color: #02c984">通过</span>剩余{{
detail?.pendingApprovaCount
}}张图片建议审批为不通过
</div> </div>
<div class="footer"> <div class="footer" @click="handleReject">
<SvgIcon 立即审批
<!-- <SvgIcon
style="cursor: pointer" style="cursor: pointer"
name="r3" name="r3"
width="162" width="162"
@ -137,7 +169,7 @@ defineExpose({
width="162" width="162"
height="54" height="54"
@click="viewRepeat" @click="viewRepeat"
/> /> -->
</div> </div>
</div> </div>
</div> </div>
@ -149,8 +181,10 @@ 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: 700px;
height: 500px; // height: 500px;
width: 510px;
height: 361px;
box-shadow: none !important; box-shadow: none !important;
} }
.wrapper { .wrapper {
@ -162,41 +196,40 @@ defineExpose({
left: 90%; left: 90%;
} }
.wrapper-hearder { .wrapper-hearder {
margin-top: 40px; margin-top: 20px;
.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: 35px 60px 35px 120px; margin: 24px 50px 16px 48px;
.item { .item {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
margin: 20px 0;
} }
.imgwrapper { .imgwrapper {
width: 200px; width: 138px;
height: 120px; height: 80px;
margin-right: 20px; margin-right: 23px;
border-radius: 8px; border-radius: 8px;
background-image: url("../../../assets/images/test.png"); background-image: url("../../../assets/images/test.png");
background-repeat: no-repeat; background-repeat: no-repeat;
@ -215,6 +248,7 @@ defineExpose({
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
margin: 8px 0; margin: 8px 0;
.tag_item { .tag_item {
background: rgba(80, 122, 253, 0.1); background: rgba(80, 122, 253, 0.1);
border-radius: 2px; border-radius: 2px;
@ -238,6 +272,7 @@ defineExpose({
text-align: left; text-align: left;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
white-space: nowrap;
} }
} }
.mark_text { .mark_text {
@ -247,13 +282,28 @@ defineExpose({
text-align: left; text-align: left;
color: #666666; color: #666666;
line-height: 16px; line-height: 16px;
margin-top: 16px;
} }
.footer { .footer {
cursor: pointer;
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 20px 30px 0 0; margin: 16px auto 0;
width: 132px;
height: 40px;
background: linear-gradient(135deg, #3258e8, #786efc);
border-image: linear-gradient(123deg, #d7dffe 2%, #d7d5ff 88%) 1 1;
border-radius: 23px;
box-shadow: 0px 2px 6px 0px rgba(116, 153, 253, 0.3);
font-size: 20px;
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
font-weight: Regular;
text-align: left;
color: #ffffff;
line-height: 26px;
font-style: italic;
} }
} }
} }

@ -39,7 +39,7 @@ defineExpose({
</script> </script>
<template> <template>
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap"> <n-modal :show="true" transform-origin="center" class="modal_wrap">
<div class="wrapper"> <div class="wrapper">
<div class="closed"> <div class="closed">
<SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal"/> <SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal"/>

@ -0,0 +1,260 @@
<script lang="ts" setup>
import { onMounted, reactive, ref, toRefs } from "vue";
import { format } from "date-fns";
import { NButton, NDataTable, useDialog, useMessage } from "naive-ui";
import { aiApprovaltools, aiApprovaltoolsClearmark } from "@/api/work/work";
import { getToolsCount } from "@/api/home/main";
const emit = defineEmits<{
(e: "reject", params: any);
(e: "notPass", params: any);
}>();
const dialog = useDialog();
const state: any = reactive({
detail: {},
taskId: "",
});
const { detail } = toRefs(state);
const cardStyle = {
width: "450px",
"--n-padding-bottom": "10px",
"--n-padding-left": "0px",
};
const show = ref(false);
function showModal(id) {
console.log(id);
state.taskId = id;
getDetail(id);
}
async function getDetail(id) {
const res = await aiApprovaltools({ taskid: id });
if (res.code === "OK") {
state.detail = res.data;
show.value = true;
}
console.log(res,'getDetail');
}
async function clearMark() {
const res = await aiApprovaltoolsClearmark({ taskid: state.taskId });
if (res.code === "OK") closeModal();
}
function closeModal() {
show.value = false;
}
async function reject() {
// emit('reject', { a: 'todo' })
// closeModal()
dialog.info({
title: "确认提示",
content: "确认设置成假吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: async () => {
// TODO
// const result = await resetApproval()
clearMark();
},
onNegativeClick: () => {},
});
}
async function viewRepeat(e: MouseEvent) {
emit("notPass", {
id: state.taskId,
detail: state.detail,
});
e.preventDefault();
closeModal();
}
async function getShowStatus() {
const res = await getToolsCount();
if (res.code == 'OK') {
show.value = true;
}
}
onMounted(() => {
getShowStatus();
});
defineExpose({
showModal,
});
</script>
<template>
<n-modal :show="show" transform-origin="center" class="modal_wrap">
<div class="wrapper">
<div class="closed">
<SvgIcon style="cursor: pointer" name="cut-down" width="32" @click="closeModal" />
</div>
<div class="wrapper-hearder">
<div class="wrapper-title">智能AI审批工具</div>
<div class="wrapper-mark">
{{ detail.tenantusername }}
</div>
</div>
<div class="wrapper-content">
<n-scrollbar style="height: 200px">
<div v-for="i in 1" :key="i" class="item">
<div class="imgwrapper" />
<div class="content">
<div class="task_id">任务ID{{ detail.taskid }}</div>
<div class="tag_box">
<div class="tag_item">基线任务</div>
<div class="tag_item error">相似图片({{ detail.similarcount }})</div>
</div>
<div class="time_box">
{{ format(detail?.createtime || 0, "yyyy-MM-dd HH:mm:ss") }}
</div>
</div>
</div>
</n-scrollbar>
<div class="mark_text">
智能识别{{ detail.similarComplete }}张图片来源于网络建议将图片标记为假
快速审批不通过
</div>
<div class="footer">
<SvgIcon
style="cursor: pointer"
name="r3"
width="162"
height="54"
@click="reject"
/>
<SvgIcon
style="cursor: pointer"
name="r2"
width="162"
height="54"
@click="viewRepeat"
/>
</div>
</div>
</div>
</n-modal>
</template>
<style lang="less" scoped>
.modal_wrap {
background-image: url(../../../assets/images/approval_modal_bg.png);
background-repeat: no-repeat;
background-size: 100%;
width: 700px;
height: 500px;
box-shadow: none !important;
}
.wrapper {
position: absolute;
left: calc(50% - 350px);
.closed {
position: relative;
top: 0px;
left: 90%;
}
.wrapper-hearder {
margin-top: 40px;
.wrapper-title {
text-align: center;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: Semibold;
text-align: center;
color: #333333;
line-height: 32px;
}
.wrapper-mark {
text-align: center;
font-size: 13px;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular;
font-weight: Regular;
text-align: center;
color: #666666;
line-height: 18px;
}
}
.wrapper-content {
flex: 1;
border-radius: 8px;
margin: 35px 60px 35px 120px;
.item {
display: flex;
flex-flow: row nowrap;
align-items: center;
margin: 20px 0;
}
.imgwrapper {
width: 200px;
height: 120px;
margin-right: 20px;
border-radius: 8px;
background-image: url("../../../assets/images/test.png");
background-repeat: no-repeat;
background-size: cover;
}
.content {
.task_id {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #333333;
line-height: 20px;
}
.tag_box {
display: flex;
flex-flow: row nowrap;
margin: 8px 0;
.tag_item {
background: rgba(80, 122, 253, 0.1);
border-radius: 2px;
font-size: 12px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #507afd;
line-height: 16px;
margin-right: 10px;
}
.error {
background: rgba(255, 78, 79, 0.1);
color: #ff4e4f;
}
}
.time_box {
font-size: 14px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #333333;
line-height: 20px;
}
}
.mark_text {
font-size: 13px;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: Regular;
text-align: left;
color: #666666;
line-height: 16px;
}
.footer {
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
margin: 20px 30px 0 0;
}
}
}
</style>
Loading…
Cancel
Save