|
|
|
@ -1,101 +1,104 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { 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 { 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)
|
|
|
|
|
}>()
|
|
|
|
|
(e: "reject", params: any);
|
|
|
|
|
(e: "notPass", params: any);
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
const dialog = useDialog()
|
|
|
|
|
const dialog = useDialog();
|
|
|
|
|
|
|
|
|
|
const state: any = reactive({
|
|
|
|
|
detail: {},
|
|
|
|
|
taskId: '',
|
|
|
|
|
})
|
|
|
|
|
const { detail } = toRefs(state)
|
|
|
|
|
taskId: "",
|
|
|
|
|
});
|
|
|
|
|
const { detail } = toRefs(state);
|
|
|
|
|
const cardStyle = {
|
|
|
|
|
'width': '450px',
|
|
|
|
|
'--n-padding-bottom': '10px',
|
|
|
|
|
'--n-padding-left': '0px',
|
|
|
|
|
}
|
|
|
|
|
width: "450px",
|
|
|
|
|
"--n-padding-bottom": "10px",
|
|
|
|
|
"--n-padding-left": "0px",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const show = ref(false)
|
|
|
|
|
const show = ref(false);
|
|
|
|
|
|
|
|
|
|
function showModal(id) {
|
|
|
|
|
console.log(id)
|
|
|
|
|
state.taskId = id
|
|
|
|
|
getDetail(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
|
|
|
|
|
const res = await aiApprovaltools({ taskid: id });
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
state.detail = res.data;
|
|
|
|
|
show.value = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
console.log(res);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function clearMark() {
|
|
|
|
|
const res = await aiApprovaltoolsClearmark({ taskid: state.taskId })
|
|
|
|
|
if (res.code === 'OK')
|
|
|
|
|
closeModal()
|
|
|
|
|
const res = await aiApprovaltoolsClearmark({ taskid: state.taskId });
|
|
|
|
|
if (res.code === "OK") closeModal();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closeModal() {
|
|
|
|
|
show.value = false
|
|
|
|
|
show.value = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function reject() {
|
|
|
|
|
// emit('reject', { a: 'todo' })
|
|
|
|
|
// closeModal()
|
|
|
|
|
dialog.info({
|
|
|
|
|
title: '确认提示',
|
|
|
|
|
content: '确认设置成假吗?',
|
|
|
|
|
positiveText: '确定',
|
|
|
|
|
negativeText: '取消',
|
|
|
|
|
title: "确认提示",
|
|
|
|
|
content: "确认设置成假吗?",
|
|
|
|
|
positiveText: "确定",
|
|
|
|
|
negativeText: "取消",
|
|
|
|
|
onPositiveClick: async () => {
|
|
|
|
|
// TODO:需要支持重置
|
|
|
|
|
// const result = await resetApproval()
|
|
|
|
|
clearMark()
|
|
|
|
|
clearMark();
|
|
|
|
|
},
|
|
|
|
|
onNegativeClick: () => {},
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function viewRepeat(e: MouseEvent) {
|
|
|
|
|
emit('notPass', {
|
|
|
|
|
emit("notPass", {
|
|
|
|
|
id: state.taskId,
|
|
|
|
|
detail: state.detail,
|
|
|
|
|
})
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
closeModal()
|
|
|
|
|
});
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
closeModal();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function getShowStatus() {
|
|
|
|
|
const res = await getToolsCount();
|
|
|
|
|
if (!JSON.parse(res.message)) {
|
|
|
|
|
show.value = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getShowStatus();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
showModal,
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<n-modal v-model: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"
|
|
|
|
|
/>
|
|
|
|
|
<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-title">智能AI审批工具</div>
|
|
|
|
|
<div class="wrapper-mark">
|
|
|
|
|
{{ detail.tenantusername }}
|
|
|
|
|
</div>
|
|
|
|
@ -105,25 +108,20 @@ defineExpose({
|
|
|
|
|
<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="task_id">任务ID:{{ detail.taskid }}</div>
|
|
|
|
|
<div class="tag_box">
|
|
|
|
|
<div class="tag_item">
|
|
|
|
|
基线任务
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tag_item error">
|
|
|
|
|
相似图片({{ detail.similarcount }})
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tag_item">基线任务</div>
|
|
|
|
|
<div class="tag_item error">相似图片({{ detail.similarcount }})</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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>
|
|
|
|
|
</n-scrollbar>
|
|
|
|
|
<div class="mark_text">
|
|
|
|
|
智能识别:{{ detail.similarComplete }}张图片来源于网络,建议将图片标记为假,或 快速审批不通过!
|
|
|
|
|
智能识别:{{ detail.similarComplete }}张图片来源于网络,建议将图片标记为假,或
|
|
|
|
|
快速审批不通过!
|
|
|
|
|
</div>
|
|
|
|
|
<div class="footer">
|
|
|
|
|
<SvgIcon
|
|
|
|
|