diff --git a/src/views/final/comp/FilterModal.vue b/src/views/final/comp/FilterModal.vue index 4c13bf5..d8bc149 100644 --- a/src/views/final/comp/FilterModal.vue +++ b/src/views/final/comp/FilterModal.vue @@ -147,7 +147,6 @@ function rowProps(row: RowData) { } function handleCheck(rowKeys: DataTableRowKey[]) { - console.log(rowKeys, selectionIds.value, "handleCheck"); selectionIds.value = rowKeys; } @@ -191,6 +190,7 @@ function deleteSelection(id = "") { } deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { + selectionIds.value = []; query(pagination.page, pagination.pageSize); }); } diff --git a/src/views/home/aside/comp/modals/FilterModal.vue b/src/views/home/aside/comp/modals/FilterModal.vue index d12ad9a..4690ee0 100644 --- a/src/views/home/aside/comp/modals/FilterModal.vue +++ b/src/views/home/aside/comp/modals/FilterModal.vue @@ -219,6 +219,7 @@ function deleteSelection(id = "") { } deleteCondition({ ids: selectionIds.value.join(",") }).then(() => { + selectionIds.value = []; query(pagination.page, pagination.pageSize); }); } @@ -308,6 +309,10 @@ const inputHandler = debounce((word) => { keyword.value = word; query(1, 5); }, 300); + +const showSearch = computed(() => { + return selectionIds.value.length > 0; +}); @@ -336,27 +341,49 @@ const inputHandler = debounce((word) => { > - + + - + - + 创建 - + + + + + + + + 删除 + + + 已选中 + {{ + selectionIds.length + }} + 项 + 清空 + + + + + + { @update-page-size="handlePageSizeChange" @update:checked-row-keys="handleCheck" @update:sorter="sortData" + :checked-row-keys="selectionIds" /> diff --git a/src/views/login/components/Login.vue b/src/views/login/components/Login.vue index 4b50660..8d8cd14 100644 --- a/src/views/login/components/Login.vue +++ b/src/views/login/components/Login.vue @@ -178,11 +178,15 @@ function handleSubmit(e) { const { data: userInfo } = await userStore.getInformation(); message.destroyAll(); const toPath = decodeURIComponent((route.query?.redirect || "/") as string); - message.success("登录成功,即将进入系统"); if (route.name === LOGIN_NAME) - router.replace( - userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" - ); + if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) { + message.success("登录成功,即将进入系统"); + router.replace( + userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" + ); + } else { + message.error("用户无菜单权限,请联系管理员"); + } else router.replace(toPath); } else { loginSuccess.value = false; @@ -249,12 +253,18 @@ function handleSmsSubmit(e) { const { data: userInfo } = await userStore.getInformation(); message.destroyAll(); const toPath = decodeURIComponent((route.query?.redirect || "/") as string); - message.success("登录成功,即将进入系统"); - if (route.name === LOGIN_NAME) - router.replace( - userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" - ); - else router.replace(toPath); + if (route.name === LOGIN_NAME) { + if (userInfo.frontmenuTList && userInfo.frontmenuTList.length) { + message.success("登录成功,即将进入系统"); + router.replace( + userInfo.frontmenuTList ? userInfo.frontmenuTList[0]["resUrl"] : "/" + ); + } else { + message.error("用户无菜单权限,请联系管理员"); + } + } else { + router.replace(toPath); + } } else { message.destroyAll(); message.info(msg || "登录失败"); @@ -300,10 +310,10 @@ async function sendCode(value) { phone: formSms.phone, agentcode: formSms.agentcode, }); - if(res.code == 'OK'){ + if (res.code == "OK") { startCount(); - }else{ - message.error(res.message) + } else { + message.error(res.message); } } diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index b7a2d19..651b84c 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -645,7 +645,7 @@ function switchBatch() { @reject="rejectHandler" @approval="approvalHandler" /> - + diff --git a/src/views/worksheet/aside/WorkSheetList.vue b/src/views/worksheet/aside/WorkSheetList.vue index f797a21..330b045 100644 --- a/src/views/worksheet/aside/WorkSheetList.vue +++ b/src/views/worksheet/aside/WorkSheetList.vue @@ -33,7 +33,7 @@ const pagination = reactive({ pageSize: 10, }) -const approvalModalRef = ref(null) +const approvalModalRef: any = ref(null) const notPassedRef: any = ref(null) const overTask = ref(null); @@ -94,8 +94,9 @@ watch( (newVal) => { if (isEmpty(newVal)) return - - activeId.value = newVal + activeId.value = newVal; + approvalModalRef.value.showModal(activeId.value) + }, ) diff --git a/src/views/worksheet/modal/ApprovalModal.vue b/src/views/worksheet/modal/ApprovalModal.vue index eac9608..e075306 100644 --- a/src/views/worksheet/modal/ApprovalModal.vue +++ b/src/views/worksheet/modal/ApprovalModal.vue @@ -2,9 +2,10 @@ 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 { aiApprovaltools, aiApprovaltoolsClearmark, setTF } from "@/api/work/work"; import { getToolsCount } from "@/api/home/main"; - +import { storage } from "@/utils/Storage"; +import { CURRENT_USER } from "@/store/mutation-types"; const emit = defineEmits<{ (e: "reject", params: any); (e: "notPass", params: any); @@ -14,7 +15,7 @@ const dialog = useDialog(); const state: any = reactive({ detail: {}, - taskId: "", + packageid: "", }); const { detail } = toRefs(state); const cardStyle = { @@ -26,23 +27,34 @@ const cardStyle = { const show = ref(false); function showModal(id) { - console.log(id); - state.taskId = id; + state.packageid = id; getDetail(id); } async function getDetail(id) { + // const userInfo = storage.get(CURRENT_USER); + // const nodeType = userInfo.nodeType; + id = "264626184091111068"; const res = await aiApprovaltools({ taskid: id }); if (res.code === "OK") { state.detail = res.data; show.value = true; } - console.log(res); + console.log(res, "getDetail"); } +const handleReject = async () => { + const res = await setTF({ + taskchildpictureids: state.detail.taskIdList.join(","), + packageid: state.packageid, + iztrueorfalse: 0, + }); + console.log(res, "handleReject"); +}; + async function clearMark() { - const res = await aiApprovaltoolsClearmark({ taskid: state.taskId }); + const res = await aiApprovaltoolsClearmark({ taskid: state.packageid }); if (res.code === "OK") closeModal(); } @@ -69,7 +81,7 @@ async function reject() { async function viewRepeat(e: MouseEvent) { emit("notPass", { - id: state.taskId, + id: state.packageid, detail: state.detail, }); e.preventDefault(); @@ -78,7 +90,7 @@ async function viewRepeat(e: MouseEvent) { async function getShowStatus() { const res = await getToolsCount(); - if (res.code == 'OK') { + if (res.code == "OK") { show.value = true; } } @@ -92,7 +104,7 @@ defineExpose({ - + @@ -100,31 +112,36 @@ defineExpose({ 智能AI审批工具 - {{ detail.tenantusername }} + {{ detail.tenantUserName }}-{{ detail.packageName }} - - - - - 任务ID:{{ detail.taskid }} - - 基线任务 - 相似图片({{ detail.similarcount }}) - - - {{ format(detail.createtime, "yyyy-MM-dd HH:mm:ss") }} + + + + #AI任务包{{ detail.packageId }} + + + error 重复图片({{ + detail.similarComplete + }}) + + 任务包生成时间: + {{ format(detail?.createtime || 0, "yyyy-MM-dd HH:mm:ss") }} + - + - 智能识别:{{ detail.similarComplete }}张图片来源于网络,建议将图片标记为假,或 - 快速审批不通过! + 智能提示:{{detail?.similarComplete}} 张图片相似度为100%重复图片,{{detail?.passCount}}张审批状态为通过,剩余{{detail?.pendingApprovaCount}}张图片建议审批为不通过! - @@ -185,7 +202,7 @@ defineExpose({ .wrapper-content { flex: 1; border-radius: 8px; - margin: 35px 60px 35px 120px; + margin: 70px 60px 35px 120px; .item { display: flex; flex-flow: row nowrap; @@ -249,11 +266,24 @@ defineExpose({ line-height: 16px; } .footer { + cursor: pointer; display: flex; flex-flow: row nowrap; align-items: center; justify-content: center; - margin: 20px 30px 0 0; + margin: 20px 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; } } } diff --git a/src/views/worksheet/modal/ApprovalModal2.vue b/src/views/worksheet/modal/ApprovalModal2.vue index d706c26..0bbe525 100644 --- a/src/views/worksheet/modal/ApprovalModal2.vue +++ b/src/views/worksheet/modal/ApprovalModal2.vue @@ -39,7 +39,7 @@ defineExpose({ - + diff --git a/src/views/worksheet/modal/ApprovalModal_bak.vue b/src/views/worksheet/modal/ApprovalModal_bak.vue new file mode 100644 index 0000000..7346134 --- /dev/null +++ b/src/views/worksheet/modal/ApprovalModal_bak.vue @@ -0,0 +1,260 @@ + + + + + + + + + + 智能AI审批工具 + + {{ detail.tenantusername }} + + + + + + + + 任务ID:{{ detail.taskid }} + + 基线任务 + 相似图片({{ detail.similarcount }}) + + + {{ format(detail?.createtime || 0, "yyyy-MM-dd HH:mm:ss") }} + + + + + + 智能识别:{{ detail.similarComplete }}张图片来源于网络,建议将图片标记为假,或 + 快速审批不通过! + + + + + + + +