feat: 修改冲突

pull/25/head
raofuzi 2 years ago
commit 1154bcf325

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

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

@ -7,11 +7,15 @@ import { ContentTypeEnum } from '@/enums/httpEnum'
*
* @returns
*/
export async function getApprovalList(page: PageParam) {
export async function getApprovalList(page: any) {
const res = await http.request({
url: `/flow/task/listalldata`,
method: 'get',
params: { pageSize: page.pageSize, currPage: page.pageNo },
params: {
pageSize: page.pageSize,
currPage: page.pageNo,
keyword: page.keyword,
},
})
const { data: { list, totalCount } } = res

@ -0,0 +1,18 @@
<?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>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-1986.000000, -6758.000000)">
<g id="自定义列" transform="translate(1986.000000, 6758.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M36.9854854,42.6064492 C37.5377701,42.6064492 37.9854854,43.0541645 37.9854854,43.6064492 L37.9854854,56 C37.9854854,56.5522847 37.5377701,57 36.9854854,57 L33.9854854,57 C33.4332006,57 32.9854854,56.5522847 32.9854854,56 L32.985,52.303 L7,52.3032246 C6.44771525,52.3032246 6,51.8555094 6,51.3032246 L6,48.3032246 C6,47.7509399 6.44771525,47.3032246 7,47.3032246 L32.985,47.303 L32.9854854,43.6064492 C32.9854854,43.0541645 33.4332006,42.6064492 33.9854854,42.6064492 L36.9854854,42.6064492 Z M54.4637884,47.3032246 C55.0160731,47.3032246 55.4637884,47.7509399 55.4637884,48.3032246 L55.4637884,51.3032246 C55.4637884,51.8555094 55.0160731,52.3032246 54.4637884,52.3032246 L44.6371044,52.3032246 C44.0848196,52.3032246 43.6371044,51.8555094 43.6371044,51.3032246 L43.6371044,48.3032246 C43.6371044,47.7509399 44.0848196,47.3032246 44.6371044,47.3032246 L54.4637884,47.3032246 Z M29.8824782,24.8032246 C30.4347629,24.8032246 30.8824782,25.2509399 30.8824782,25.8032246 L30.882,29.5 L57,29.5 C57.5522847,29.5 58,29.9477153 58,30.5 L58,33.5 C58,34.0522847 57.5522847,34.5 57,34.5 L30.882,34.5 L30.8824782,38.1967754 C30.8824782,38.7490601 30.4347629,39.1967754 29.8824782,39.1967754 L26.8824782,39.1967754 C26.3301934,39.1967754 25.8824782,38.7490601 25.8824782,38.1967754 L25.8824782,25.8032246 C25.8824782,25.2509399 26.3301934,24.8032246 26.8824782,24.8032246 L29.8824782,24.8032246 Z M19.2308592,29.5 C19.7831439,29.5 20.2308592,29.9477153 20.2308592,30.5 L20.2308592,33.5 C20.2308592,34.0522847 19.7831439,34.5 19.2308592,34.5 L7,34.5 C6.44771525,34.5 6,34.0522847 6,33.5 L6,30.5 C6,29.9477153 6.44771525,29.5 7,29.5 L19.2308592,29.5 Z M36.9854854,7 C37.5377701,7 37.9854854,7.44771525 37.9854854,8 L37.9854854,20.3935508 C37.9854854,20.9458355 37.5377701,21.3935508 36.9854854,21.3935508 L33.9854854,21.3935508 C33.4332006,21.3935508 32.9854854,20.9458355 32.9854854,20.3935508 L32.985,16.696 L7,16.6967754 C6.44771525,16.6967754 6,16.2490601 6,15.6967754 L6,12.6967754 C6,12.1444906 6.44771525,11.6967754 7,11.6967754 L32.985,11.696 L32.9854854,8 C32.9854854,7.44771525 33.4332006,7 33.9854854,7 L36.9854854,7 Z M54.4637884,11.6967754 C55.0160731,11.6967754 55.4637884,12.1444906 55.4637884,12.6967754 L55.4637884,15.6967754 C55.4637884,16.2490601 55.0160731,16.6967754 54.4637884,16.6967754 L44.6371044,16.6967754 C44.0848196,16.6967754 43.6371044,16.2490601 43.6371044,15.6967754 L43.6371044,12.6967754 C43.6371044,12.1444906 44.0848196,11.6967754 44.6371044,11.6967754 L54.4637884,11.6967754 Z" id="形状结合" fill="#666666" fill-rule="nonzero" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>沉浸模式-开启</title>
<g id="图审审批" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="沉浸模式1.1" transform="translate(-1375.000000, -32.000000)" fill-rule="nonzero">
<g id="更多操作" transform="translate(1370.000000, 27.000000)">
<g id="沉浸模式-开启" transform="translate(5.000000, 5.000000)">
<polygon id="路径" fill-opacity="0" fill="#FFFFFF" points="0 0 20 0 20 20 0 20"></polygon>
<g id="编组" transform="translate(2.000000, 2.000000)" fill="#507AFD">
<path d="M8,16 C3.59999999,16 0,12.4444444 0,8.09876544 C0,6.22222223 0.700000007,4.34567902 2,2.86419753 C2.40000001,2.4691358 3,2.37037037 3.4,2.76543209 C3.8,3.16049383 3.89999999,3.75308642 3.5,4.14814814 C2.5,5.23456791 2,6.61728395 2,8.09876544 C2,11.3580247 4.70000001,14.0246914 8,14.0246914 C11.3,14.0246914 14,11.3580247 14,8.09876544 C14,6.61728395 13.5,5.23456791 12.5,4.14814816 C12.1,3.75308642 12.2,3.16049383 12.6,2.76543211 C13,2.37037037 13.6,2.46913581 14,2.86419755 C15.3,4.34567903 16,6.12345681 16,8.09876545 C16,12.4444444 12.4,16 8,16 Z" id="路径"></path>
<path d="M8.99999999,5.92592592 C8.99999999,6.41975308 8.6,6.91358025 7.99999999,6.91358025 L7.99999999,6.91358025 C7.4,6.91358025 6.99999999,6.51851852 6.99999999,5.92592592 L6.99999999,0.987654328 C6.99999999,0.493827172 7.4,0 7.99999999,0 L7.99999999,0 C8.49999999,0 8.99999999,0.395061734 8.99999999,0.987654328 L8.99999999,5.92592592 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -4,9 +4,7 @@ import { useMessage } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { audit } from '@/api/task/task'
const emit = defineEmits<{
(e: 'success')
}>()
const emit = defineEmits(['success'])
const message = useMessage()
const loading = ref(false)
@ -32,8 +30,8 @@ const rules = {
}
const formData = reactive({
disposeTypeId: '',
failCauseId: '',
disposeTypeId: '262403670085013522',
failCauseId: '260402999231251188',
comment: '',
})
@ -104,7 +102,7 @@ async function handleSumbit(e: MouseEvent) {
const { code } = res
if (code === 'OK') {
message.success('审核成功')
emit('success')
emit('success', param)
closeModal()
}
else { message.error(res.message) }
@ -151,7 +149,7 @@ async function selectChange(id) {
<n-select v-model:value="formData.failCauseId" filterable :options="failCauseOptions" @change="selectChange" />
</n-form-item>
<n-form-item v-show="showOther" class="form-item-area" label="" path="">
<n-input v-model:value="formData.comment" type="textarea" placeholder="备注内容" />
<n-input v-model:value="formData.comment" placeholder-class="pl" type="textarea" placeholder="备注内容" />
</n-form-item>
</div>
</n-form>
@ -159,9 +157,9 @@ async function selectChange(id) {
<template #footer>
<div class="wrapper-footer">
<n-button type="info" @click="handleSumbit">
</n-button>
<n-button secondary style="margin-left:15px" @click="closeModal">
<n-button secondary class="btn" style="margin-left:15px" @click="closeModal">
取消
</n-button>
</div>
@ -221,6 +219,7 @@ async function selectChange(id) {
.form-item-area{
margin-top: -30px;
}
}
::v-deep(.n-card__content) {
@ -236,4 +235,13 @@ async function selectChange(id) {
margin-top: 0px;
margin-bottom: 0px;
}
::v-deep(.n-input__placeholder) {
color: #333333!important;
}
.btn{
border: 1px solid #cad2dd;
background-color: #fff;
}
</style>

@ -13,9 +13,9 @@ import { useUser } from '@/store/modules/user'
import { useTaskStore } from '@/store/modules/task'
import defaultAvatar from '@/assets/icons/avatar.svg';
const taskStore = useTaskStore()
const taskStore = useTaskStore();
export default defineComponent({
name: 'PageHeader',
name: "PageHeader",
components: {
UserSettings,
QuillModal,
@ -31,139 +31,137 @@ export default defineComponent({
type: Boolean,
},
},
emits: ['update:collapsed'],
emits: ["update:collapsed"],
setup() {
const message = useMessage()
const dialog = useDialog()
const message = useMessage();
const dialog = useDialog();
const userStore = useUser()
const useInfo = userStore.getUserInfo
const userStore = useUser();
const useInfo = userStore.getUserInfo;
const name = ''
const name = "";
const state = reactive({
username: name ?? '',
fullscreenIcon: 'FullscreenOutlined',
})
username: name ?? "",
fullscreenIcon: "FullscreenOutlined",
});
const router = useRouter()
const route = useRoute()
const routename = ref(route.meta.title)
const router = useRouter();
const route = useRoute();
const routename = ref(route.meta.title);
// mm
const iconList = ref([
{
icon: 'magnifying-1',
icon: "magnifying-1",
handle: searchHandler,
},
{
icon: 'shortcut-keys',
icon: "shortcut-keys",
handle: shortcutHandler,
},
{
icon: 'suspicious-folder',
icon: "suspicious-folder",
handle: recycleHandler,
},
{
icon: 'memo',
icon: "memo",
handle: quillHandler,
},
{
icon: 'nomessage',
icon: "nomessage",
handle: goMessage,
},
])
]);
watch(
() => route.fullPath,
() => {
routename.value = route.meta.title
},
)
routename.value = route.meta.title;
}
);
const handleDragOver = (event, item) => {
taskStore.setInFile(true)
}
taskStore.setInFile(true);
};
const handleDragLeave = (event, item) => {
taskStore.setInFile(false)
}
taskStore.setInFile(false);
};
const dropdownSelect = (key) => {
router.push({ name: key })
}
router.push({ name: key });
};
// 退
const doLogout = () => {
dialog.info({
title: '提示',
content: '您确定要退出登录吗',
positiveText: '确定',
negativeText: '取消',
title: "提示",
content: "您确定要退出登录吗",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: () => {
userStore.logout().then(() => {
message.success('成功退出登录')
message.success("成功退出登录");
router
.replace({
name: 'Login',
name: "Login",
query: {
// redirect: route.fullPath,
},
})
.finally(() => location.reload())
})
.finally(() => location.reload());
});
},
onNegativeClick: () => {},
})
}
});
};
const quillModalRef = ref(null)
const shortcutModal = ref(null)
const recycleModalRef = ref(null)
const SearchModalRef = ref(null)
const quillModalRef = ref(null);
const shortcutModal = ref(null);
const recycleModalRef = ref(null);
const SearchModalRef = ref(null);
function quillHandler() {
const modal = unref(quillModalRef)! as any
modal.showModal()
const modal = unref(quillModalRef)! as any;
modal.showModal();
}
function shortcutHandler() {
const modal = unref(shortcutModal)! as any
modal.showModal()
const modal = unref(shortcutModal)! as any;
modal.showModal();
}
function recycleHandler() {
const modal = unref(recycleModalRef)! as any
modal.showModal()
const modal = unref(recycleModalRef)! as any;
modal.showModal();
}
function searchHandler() {
const modal = unref(SearchModalRef)! as any
modal.showModal()
const modal = unref(SearchModalRef)! as any;
modal.showModal();
}
function goMessage() {
router.push({ name: 'message-main' })
router.push({ name: "message-main" });
}
async function getMessage() {
const res = await msgPolling()
if (res.data)
iconList.value[4].icon = 'hasmessage'
else
iconList.value[4].icon = 'nomessage'
const res = await msgPolling();
if (res.data) iconList.value[4].icon = "hasmessage";
else iconList.value[4].icon = "nomessage";
}
setInterval(() => {
getMessage()
}, 5000)
getMessage();
}, 5000);
const mousetrap = inject('mousetrap') as any
const mousetrap = inject("mousetrap") as any;
onMounted(() => {
mousetrap.bind('n r', quillHandler)
mousetrap.bind('n t', quillHandler)
mousetrap.bind('n n', recycleHandler)
mousetrap.bind('m m', searchHandler)
})
getMessage();
mousetrap.bind("n r", quillHandler);
mousetrap.bind("n t", quillHandler);
mousetrap.bind("n n", recycleHandler);
mousetrap.bind("m m", searchHandler);
});
const defaultAvatarSrc = ref(defaultAvatar);
@ -189,7 +187,7 @@ export default defineComponent({
defaultAvatarSrc,
}
},
})
});
</script>
<template>
@ -211,8 +209,16 @@ export default defineComponent({
v-for="item in iconList"
:key="item.icon"
class="layout-header-trigger layout-header-trigger-min"
@dragover.prevent="(e) => { handleDragOver(e, item) }"
@dragleave.prevent="(e) => { handleDragLeave(e, item) }"
@dragover.prevent="
(e) => {
handleDragOver(e, item);
}
"
@dragleave.prevent="
(e) => {
handleDragLeave(e, item);
}
"
>
<div class="back" @click="item.handle">
<SvgIcon :name="item.icon" size="18" />
@ -331,9 +337,7 @@ export default defineComponent({
}
.layout-header-left {
::v-deep(
.n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link
) {
::v-deep(.n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link) {
color: #515a6e;
}
}

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

@ -74,6 +74,7 @@ const columns: DataTableColumns<RowData> = [
{
title: "创建时间",
key: "createtime",
sorter: (row1, row2) => new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime()
},
{
title: "更新者",
@ -146,32 +147,32 @@ function rowProps(row: RowData) {
}
function handleCheck(rowKeys: DataTableRowKey[]) {
console.log(rowKeys, selectionIds.value, "handleCheck");
selectionIds.value = rowKeys;
}
function select(key: number) {
function select(key: number, id: string) {
switch (key) {
case 1:
editSelection();
editSelection(id);
break;
case 2:
deleteSelection();
deleteSelection(id);
break;
default:
break;
}
}
function editSelection() {
function editSelection(id = "") {
// eslint-disable-next-line dot-notation
const $message = window["$message"];
// const $message = window["$message"];
// if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
// $message.error("");
// return;
// }
if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
$message.error("请选中一条过滤");
return;
}
const selectedId = selectionIds.value[0];
const selectedId = id;
const selectedFilter = tableData.value.find((item: any) => {
return item.id === selectedId;
});
@ -180,12 +181,12 @@ function editSelection() {
closeModal();
}
function deleteSelection() {
function deleteSelection(id = "") {
// eslint-disable-next-line dot-notation
const $message = window["$message"];
if (selectionIds.value.length === 0) {
$message.error("至少选中一条过滤");
deleteCondition({ ids: id }).then(() => {
query(pagination.page, pagination.pageSize);
});
return;
}
@ -335,12 +336,19 @@ const showSearch = computed(() => {
<div class="del_btn">
<n-button icon-placement="left" size="medium">
<template #icon>
<SvgIcon name="delete-history" size="16" />
<SvgIcon name="delete-history" size="16" />
</template>
删除</n-button>
删除</n-button
>
</div>
<div class="msg">
<span>已选中 <span style="color:#507afd;font-size:16px">{{ selectionIds.length }}</span> </span>
<span
>已选中
<span style="color: #507afd; font-size: 16px">{{
selectionIds.length
}}</span>
</span
>
<a @click="selectionIds = []">清空</a>
</div>
</div>
@ -400,11 +408,10 @@ const showSearch = computed(() => {
width: 300px;
border: 1px solid gray;
}
.del_btn{
.del_btn {
}
.msg{
a{
.msg {
a {
margin-left: 30px;
cursor: pointer;
color: #507afd;

@ -150,7 +150,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() {
formValue.conditions.push({
type: null,
operator: null,
operator: 'eq',
result: null,
})
}
@ -227,7 +227,7 @@ function leaveHandler() {
formValue.conditions = [
{
type: null,
operator: null,
operator: 'eq',
result: null,
},
]
@ -269,7 +269,7 @@ defineExpose({
<n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</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-form-item>
<n-form-item

File diff suppressed because it is too large Load Diff

@ -1,10 +1,10 @@
<script lang="ts" setup>
import type { DropdownMixedOption } from 'naive-ui/es/dropdown/src/interface'
import type { PropType } from 'vue'
import type { DropdownMixedOption } from "naive-ui/es/dropdown/src/interface";
import type { PropType } from "vue";
defineOptions({ name: 'Action' })
defineOptions({ name: "Action" });
defineProps({
const props = defineProps({
options: {
type: Array as PropType<DropdownMixedOption[]>,
default: null,
@ -12,18 +12,21 @@ defineProps({
},
select: {
type: Function as PropType<Function>,
default: () => { },
default: () => {},
},
id: {
type: String,
default: '',
default: "",
},
})
});
const fun = (key) => {
props.select(key, props.id);
};
</script>
<template>
<div :data-id="id">
<n-dropdown trigger="hover" :options="options" @select="(select as any)">
<n-dropdown trigger="hover" :options="options" @select="fun">
<SvgIcon name="more-hor" size="20" />
</n-dropdown>
</div>

@ -17,7 +17,10 @@ const props = defineProps({
required: true,
},
});
const ruleForm = reactive({
keyword: "",
});
const ruleformRef = ref();
const emit = defineEmits<{
(e: "show-filter"): void;
(e: "show-custom"): void;
@ -27,7 +30,7 @@ const emit = defineEmits<{
const data = ref<FilterEntity[]>([]);
const unData = ref<FilterEntity[]>([]);
const loading = ref(false);
const loading = ref(false);
const canloadMore = true;
const el = ref<HTMLDivElement | null>(null);
const popover = ref<ComponentRef | null>(null);
@ -74,8 +77,8 @@ useInfiniteScroll(
},
{ distance: 10, interval: 300, canLoadMore: () => false }
);
const showClick =async () => {
getSearchedList('')
const showClick = async () => {
getSearchedList("");
};
async function loadMore() {
@ -92,7 +95,7 @@ async function featchList() {
loading.value = true;
try {
const searchParam: FilterSearchParam = {
search_searchname: { value: keyword.value, op: "like", type: "string" },
search_searchname: { value: ruleForm.keyword, op: "like", type: "string" },
};
const result = await getConditionList(pagination, searchParam, props.type);
const { data } = result;
@ -121,11 +124,8 @@ function generateFilterEntityList(data) {
};
});
const reg = new RegExp(keyword.value, "gi");
const hilightText = searchname.replace(
reg,
`<span>${keyword.value}</span>`
);
const reg = new RegExp(ruleForm.keyword, "gi");
const hilightText = searchname.replace(reg, `<span>${ruleForm.keyword}</span>`);
return {
id,
@ -134,7 +134,7 @@ function generateFilterEntityList(data) {
isDefaultFilter: false,
filterList: list,
reorder,
searchname
searchname,
};
});
@ -143,12 +143,17 @@ function generateFilterEntityList(data) {
function selectHandler(item: FilterEntity) {
(popover.value as any).setShow(false);
currentlySelectedAdvanced.value = item.searchname
currentlySelectedAdvanced.value = item.searchname;
emit("select", item.id);
}
const inputHandler = debounce((word) => {
getSearchedList(word)
ruleForm.keyword = word;
ruleformRef.value.validate();
if (word.length < 2 && word) {
return;
}
getSearchedList(word);
}, 300);
function getSearchedList(word) {
@ -157,7 +162,7 @@ function getSearchedList(word) {
} else {
pagination.pageSize = 10;
}
keyword.value = word;
ruleForm.keyword = word;
featchList().then((list) => {
let dataArr: FilterEntity[] = [];
let unDataArr: FilterEntity[] = [];
@ -195,10 +200,26 @@ function favoriteHandler(event: MouseEvent, item: any) {
}
});
inputHandler(keyword.value);
inputHandler(ruleForm.keyword);
}
}
const rules = {
keyword: [
{
trigger: ["blur", "input", "change"],
level: "error",
validator(_rule, value) {
if (value.length >= 2) {
return true;
} else {
return new Error("搜索关键字最少为两个");
}
},
},
],
};
function unFavoriteHandler(event: MouseEvent, item) {
event.stopImmediatePropagation();
event.stopPropagation();
@ -208,7 +229,7 @@ function unFavoriteHandler(event: MouseEvent, item) {
if (!isDefaultFilter) {
item.favorite = false;
unfavorite(id);
inputHandler(keyword.value);
inputHandler(ruleForm.keyword);
}
}
@ -233,29 +254,37 @@ const moveEnd = () => {
>
<template #trigger>
<div class="wrapper-left-dropdown" @click="showClick">
<span style="font-size: 20px;color: #333333;font-weight: Medium;">{{currentlySelectedAdvanced}}</span>
<SvgIcon :style="{ marginLeft: '5px' }" name="down" size="14" />
<span style="font-size: 20px; color: #333333; font-weight: Medium">{{
currentlySelectedAdvanced
}}</span>
<SvgIcon :style="{ marginLeft: '5px' }" name="down" size="14" color="#999999"/>
</div>
</template>
<n-spin :show="loading">
<div class="wrapper-left-popover">
<n-input
:style="{ '--n-border': '0px' }"
placeholder="请输入关键词"
@input="inputHandler"
>
<template #prefix>
<SvgIcon size="14px" name="magnifying-1" />
</template>
<template #suffix>
<SvgIcon
size="14px"
style="cursor: pointer"
name="setting"
@click="emit('show-filter')"
/>
</template>
</n-input>
<n-form :rules="rules" ref="ruleformRef" :model="ruleForm">
<n-form-item path="keyword">
<n-input
:style="{ '--n-border': '0px' }"
placeholder="请输入关键字"
@input="inputHandler"
:value="ruleForm.keyword"
:minlength="2"
>
<template #prefix>
<SvgIcon size="14px" name="magnifying-1" />
</template>
<template #suffix>
<SvgIcon
size="14px"
style="cursor: pointer"
name="setting"
@click="emit('show-filter')"
/>
</template>
</n-input>
</n-form-item>
</n-form>
<ul ref="el" class="wrapper-left-list">
<li
@ -264,23 +293,28 @@ const moveEnd = () => {
style="display: flex; align-items: center"
@click="selectHandler(item)"
>
<SvgIcon name="drag" size="18" color="#333333" style="margin-right:3px"/>
<SvgIcon
name="drag"
size="18"
color="#333333"
style="margin-right: 3px"
/>
<SvgIcon
v-if="item.favorite && !item.isDefaultFilter"
name="favorite-fill"
color="#fd9b0a"
size="18"
style="margin-right:3px"
style="margin-right: 3px"
@click="unFavoriteHandler($event, item)"
/>
<SvgIcon
v-else-if="!item.favorite && !item.isDefaultFilter"
name="favorite-unfill"
size="18"
style="margin-right:3px"
style="margin-right: 3px"
@click="favoriteHandler($event, item)"
/>
<div v-html="item.name" style="color: #333333;"/>
<div v-html="item.name" style="color: #333333" />
</li>
<!-- filter=".draggable-li[draggable='false']" -->
<VueDraggable
@ -298,14 +332,14 @@ const moveEnd = () => {
class="cursor-move draggable-li fix"
:draggable="true"
>
<SvgIcon name="drag" size="18" style="margin-right:3px"/>
<SvgIcon name="drag" size="18" style="margin-right: 3px" />
<SvgIcon
v-if="item.favorite && !item.isDefaultFilter"
name="favorite-fill"
color="#fd9b0a"
size="18"
fill="#666666"
style="cursor: pointer!important;margin-right:3px;"
style="cursor: pointer !important; margin-right: 3px"
@click="unFavoriteHandler($event, item)"
/>
<SvgIcon
@ -313,10 +347,10 @@ const moveEnd = () => {
name="favorite-unfill"
size="18"
fill="#666666"
style="cursor: pointer!important;margin-right:3px;"
style="cursor: pointer !important; margin-right: 3px"
@click="favoriteHandler($event, item)"
/>
<div v-html="item.name" style="color: #333333;"/>
<div v-html="item.name" style="color: #333333" />
</li>
</VueDraggable>
</ul>

@ -43,6 +43,23 @@ interface RowData {
updatetime: string;
}
const sortData = (row) => {
console.log("sortData", row);
if (row.order == "descend") {
tableData.value.sort(
(a, b) =>
new Date(a[row.columnKey]).getTime() - new Date(b[row.columnKey]).getTime()
);
} else if (row.order == "ascend") {
tableData.value.sort(
(a, b) =>
new Date(b[row.columnKey]).getTime() - new Date(a[row.columnKey]).getTime()
);
} else {
tableData.value.sort((a, b) => Number((a as any).reorder) - Number((b as any).reorder));
}
};
const columns: DataTableColumns<RowData> = [
{
type: "selection",
@ -73,6 +90,12 @@ const columns: DataTableColumns<RowData> = [
title: "创建时间",
key: "createtime",
width: 180,
sorter: (row1, row2) => {
// tableData.value.sort(
// (a, b) => new Date(a?.createtime).getTime() - new Date(b?.createtime).getTime()
// );
return new Date(row1?.createtime).getTime() - new Date(row2?.createtime).getTime();
},
},
{
title: "更新者",
@ -148,43 +171,41 @@ function handleCheck(rowKeys: DataTableRowKey[]) {
selectionIds.value = rowKeys;
}
function select(key: number) {
function select(key: number, id: string) {
switch (key) {
case 1:
editSelection();
editSelection(id);
break;
case 2:
deleteSelection();
deleteSelection(id);
break;
default:
break;
}
}
function editSelection() {
function editSelection(id) {
// eslint-disable-next-line dot-notation
const $message = window["$message"];
if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
$message.error("请选中一条过滤");
return;
}
const selectedId = selectionIds.value[0];
// const $message = window["$message"];
// if (selectionIds.value.length === 0 || selectionIds.value.length > 1) {
// $message.error("");
// return;
// }
const selectedId = id;
const selectedFilter = tableData.value.find((item: any) => {
return item.id === selectedId;
});
emit("editFilter", selectedFilter);
closeModal();
// closeModal();
}
function deleteSelection() {
function deleteSelection(id = "") {
// eslint-disable-next-line dot-notation
const $message = window["$message"];
if (selectionIds.value.length === 0) {
$message.error("至少选中一条过滤");
deleteCondition({ ids: id }).then(() => {
query(pagination.page, pagination.pageSize);
});
return;
}
@ -274,7 +295,6 @@ defineExpose({
showModal,
});
const inputHandler = debounce((word) => {
keyword.value = word;
query(1, 5);
@ -342,7 +362,7 @@ const inputHandler = debounce((word) => {
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
@update:sorter="sortData"
/>
</div>
</div>
@ -420,4 +440,7 @@ const inputHandler = debounce((word) => {
}
}
}
::v-deep(.n-data-table .n-data-table-th){
font-weight: bold !important;
}
</style>

@ -158,7 +158,7 @@ function unformatValue(searchfield: string, searchvalue: any) {
function createCondition() {
formValue.conditions.push({
type: null,
operator: null,
operator: 'eq',
result: null,
})
}
@ -260,7 +260,7 @@ function leaveHandler() {
formValue.conditions = [
{
type: null,
operator: null,
operator: 'eq',
result: null,
},
]
@ -302,7 +302,7 @@ defineExpose({
<n-form-item path="name" label="标题">
<n-input v-model:value="formValue.name" :style="{ width: '780px' }" @keydown.enter.prevent />
</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-form-item>
<n-form-item

@ -565,14 +565,14 @@ const dropdownOptions = ref([
<SvgIcon class="gap" name="arrow-botton" size="14" />
</div>
</n-popselect>
<div style="margin-left: 15px;cursor: pointer;color:#323233" @click="sortHandler('pictureResult')">
<span>相似度排序</span>
<SvgIcon style="margin-left: 8px;" name="sort" size="12" />
</div>
<div style="margin-left: 15px;cursor: pointer;color:#323233" @click="sortHandler('fromuptime')">
<span>时间排序</span>
<SvgIcon style="margin-left: 8px;" name="sort" size="12" />
</div>
<div style="margin-left: 15px;cursor: pointer;color:#323233" @click="sortHandler('pictureResult')">
<span>相似度排序</span>
<SvgIcon style="margin-left: 8px;" name="sort" size="12" />
</div>
</div>
<span style="font-size: 16px;color: #333"> <span style="color: #507AFD;font-weight: 500;">{{ totalCount
}}</span> </span>

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

@ -20,7 +20,7 @@ import emitter from '@/utils/mitt'
const CustomFieldModalRef = ref(null)
const collapse = ref(false)
const taskStore = useTaskStore()
const taskListRef = ref<HTMLDivElement | null>(null)
const taskListRef: any = ref(null)
//
const showFieldList = ref<any[]>([])
@ -144,6 +144,14 @@ function editFilter(filter: any) {
modal.showModal()
modal.edit(filter)
}
function setAsideItemName(text) {
taskListRef.value.setStatusName(text)
}
defineExpose({
setAsideItemName,
})
</script>
<template>

@ -53,7 +53,7 @@ const svgName = computed(() => {
"
>{{ listItem.statshisText }}</span>
</li>
<li v-else-if="item.id === 'createdate'">
<li v-else-if="item.id === ''">
提交时间{{ format(listItem.createdate, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li v-else class="ellipsis">

@ -1,119 +1,131 @@
<script lang="ts" setup>
import { useInfiniteScroll } from "@vueuse/core";
import { onMounted, onUnmounted, reactive, ref, watch, defineProps } from "vue";
import ListItem from "./ListItem.vue";
import emitter from "@/utils/mitt";
import { useTaskStore } from "@/store/modules/task";
const taskStore = useTaskStore();
const data = ref<any[]>([]);
const activeId = ref("");
const el = ref<HTMLDivElement | null>(null);
const keyword = ref("");
const canloadMore = ref(true);
const isLoading = ref(false);
import { useInfiniteScroll } from '@vueuse/core'
import { defineProps, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import ListItem from './ListItem.vue'
import emitter from '@/utils/mitt'
import { useTaskStore } from '@/store/modules/task'
defineProps({
showFieldList: {
type: Array,
default: () => [],
},
});
})
const taskStore = useTaskStore()
const data = ref<any[]>([])
const activeId = ref('')
const el = ref<HTMLDivElement | null>(null)
const keyword = ref('')
const canloadMore = ref(true)
const isLoading = ref(false)
const pagination = reactive({
pageNo: 0,
pageSize: 100,
});
pageSize: 30,
})
function selectHandler(id: string, index: number) {
taskStore.setActive(index);
taskStore.setActive(index)
}
useInfiniteScroll(
el as any,
() => {
loadMore();
loadMore()
},
{ distance: 10, interval: 1500, canLoadMore: () => canloadMore.value }
);
{ distance: 10, interval: 1500, canLoadMore: () => canloadMore.value },
)
async function loadMore() {
if (isLoading.value || el.value == null) return;
isLoading.value = true;
console.log(77888)
if (isLoading.value || el.value == null)
return
isLoading.value = true
try {
const more = await fetchList();
data.value.push(...more);
} finally {
isLoading.value = false;
const more = await fetchList()
data.value.push(...more)
}
finally {
isLoading.value = false
}
}
//
async function fetchList() {
try {
pagination.pageNo += 1;
const result = await taskStore.fetchApprovalList(pagination);
const { data, pageCount } = result;
canloadMore.value = pageCount >= pagination.pageNo;
return data || [];
} catch (error) {
canloadMore.value = false;
return [];
pagination.pageNo += 1
const result = await taskStore.fetchApprovalList({
...pagination,
keyword: keyword.value,
})
const { data, pageCount } = result
canloadMore.value = pageCount >= pagination.pageNo
return data || []
}
catch (error) {
canloadMore.value = false
return []
}
}
watch(
() => taskStore.activeId,
(newVal) => {
activeId.value = newVal;
}
);
activeId.value = newVal
},
)
function reset() {
pagination.pageNo = 0;
pagination.pageSize = 100;
canloadMore.value = true;
data.value.length = 0;
pagination.pageNo = 0
pagination.pageSize = 30
canloadMore.value = true
data.value.length = 0
taskStore.reset();
taskStore.reset()
}
async function search(word: string) {
keyword.value = word;
reset();
keyword.value = word
reset()
useInfiniteScroll(
el as any,
() => {
loadMore();
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore.value }
);
{ distance: 10, canLoadMore: () => canloadMore.value },
)
}
onMounted(() => {
emitter.on("refresh", refreshHandler);
});
emitter.on('refresh', refreshHandler)
})
onUnmounted(() => {
emitter.off("refresh", refreshHandler);
});
emitter.off('refresh', refreshHandler)
})
async function refreshHandler() {
search("");
search('')
}
function setStatusName(text) {
const index = taskStore.getCurrentIndex
data.value[index].statshisText = text
}
defineExpose({
search,
});
setStatusName,
})
</script>
<template>
<n-spin :show="isLoading">
<div ref="el" class="list">
<ListItem
:showFieldList="showFieldList"
v-for="(item, index) in data"
:key="item.id"
:show-field-list="showFieldList"
:selected="activeId === item.id"
:list-item="item"
@click="selectHandler(item.id, index)"

@ -12,13 +12,19 @@ import NotPassed from '@/components/Approval/NotPassed.vue'
import { getAllfieldList, getfieldList } from '@/api/home/filter'
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 { useUser } from '@/store/modules/user'
import { isEmpty } from '@/utils'
import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
const emit = defineEmits(['setAsideItemName'])
const batch = ref(false)
const selectItems = ref<any[]>([])
const message = useMessage()
@ -43,11 +49,8 @@ function setBatch(value: boolean) {
batch.value = value
if (value === false) {
selectItems.value.forEach(item => (item.checked = false))
selectItems.value.length = 0
selectItems.value.length = 0
}
if (value === false)
selectItems.value = []
}
function onCheckChange(checked: any, item: any) {
@ -94,6 +97,12 @@ function handleKeydown(event) {
//
}
// storeid
function currentTaskId() {
const index = taskStore.getCurrentIndex
return taskStore.getApprovalList[index]?.id || ''
}
// states:1234
function validate(items: any[]) {
if (items.length === 0)
@ -169,39 +178,23 @@ function approvalHandler(items?: any) {
}
function rejectHandler(items?: any) {
// let cloneItem: any
// if (batch.value) {
// processItems = selectItems.value
// }
// else if (overTask.value) {
// cloneItem = clone(overTask.value)
// processItems = [cloneItem]
// }
// if (items !== undefined && !(items instanceof PointerEvent))
// processItems = items
// const msg = validate(processItems)
// if (msg !== null) {
// message.error(msg)
// return
// }
const modal = unref(notPassModalRef)! as any
modal.showModal(selectItems.value)
}
function singleRejectHandler() {
const modal = unref(notPassModalRef)! as any
modal.showModal([taskDetailInfo.value])
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
setBatch(false)
if (code === 'OK') {
message.success('审核成功')
reloadList()
setBatch(false)
reloadList(param, '通过')
}
else { message.error(res.message) }
})
}
@ -222,7 +215,7 @@ async function handleDragEnd(event, item) {
//
const flag = taskStore.getInFile
if (flag) {
const res = await dubiousfileyd({ pictureid: item.pictureid })
const res = await dubiousfileyd({ pictureid: item.pictureId })
if (res.code === 'OK') {
message.success('加入成功')
getTableData()
@ -242,12 +235,21 @@ async function getTableData() {
const fieldList = (res as any)?.data
res = await getfieldList(reviewType, useInfo.id)
const userFieldList = (res as any)?.data.userFieldFixed
const blueList = [
'拜访终端名称',
'定位信息',
'拜访日期',
'定位距离',
'拜访小结',
'拜访项目类别',
]
fieldList.map((v) => {
if (userFieldList.includes(v.name)) {
const item = {
label: v.fieldDesc,
value: taskDetailInfo.value.ocrPicture[v.name],
key: v.name,
blue: blueList.includes(v.fieldDesc),
}
listData.push(item)
}
@ -257,13 +259,11 @@ async function getTableData() {
async function getImgList() {
if (!isEmpty(taskDetailInfo.value.ocrPicture.id)) {
const { data, total } = await getSimilarityList(
{
...taskpagination,
...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id,
},
)
const { data, total } = await getSimilarityList({
...taskpagination,
...sortBy,
pictureId: taskDetailInfo.value.ocrPicture.id,
})
taskDetailPictureList.value = data
totalCount.value = total
}
@ -273,12 +273,6 @@ async function getImgList() {
}
}
// storeid
const currentTaskId = computed(() => {
const index = taskStore.getCurrentIndex
return taskStore.getApprovalList[index]?.id || ''
})
function overTaskHandle() {
const item = taskDetailInfo.value
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
@ -319,9 +313,11 @@ function previewHandler(event: MouseEvent) {
watch(
() => [taskStore.activeId],
() => {
packageId.value = taskStore.getPackageid
taskId.value = taskStore.getActiveId
getDetail()
if (!isEmpty(taskStore.getActiveId)) {
packageId.value = taskStore.getPackageid
taskId.value = taskStore.getActiveId
getDetail()
}
},
)
@ -333,7 +329,14 @@ async function getDetail() {
getImgList()
}
function reloadList() {
function reloadList(param, text) {
//
const id = currentTaskId()
const hasCurrentId = param.flowTaskInfoList.find(item => item.formId === id)
if (hasCurrentId)
emit('setAsideItemName', text)
getDetail()
}
</script>
@ -342,25 +345,12 @@ function reloadList() {
<div class="wrapper">
<div class="wrapper-header">
<div class="left">
<span class="font">任务ID{{ currentTaskId }}</span>
<SvgIcon
size="22"
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
</div>
<div class="right">
<div
v-show="!showActions"
style="display: flex; align-items: center"
>
<div v-show="!showActions" style="display: flex; align-items: center">
<div class="btn" @click="setBatch(true)">
<SvgIcon style="margin-right: 6px" size="22" name="batch" />
批量审批
@ -391,11 +381,7 @@ function reloadList() {
</ul>
</n-popover> -->
<div class="icon-wrap">
<SvgIcon
size="20"
name="immersion-model"
@click="immersionHandler"
/>
<SvgIcon size="20" name="immersion-model" @click="immersionHandler" />
</div>
</div>
<div v-show="showActions" class="batch">
@ -405,9 +391,19 @@ function reloadList() {
</template>
返回
</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" />
<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>
@ -434,7 +430,7 @@ function reloadList() {
width="168"
height="48"
name="r7"
@click.stop="rejectHandler"
@click.stop="singleRejectHandler"
/>
</div>
<div class="check">
@ -447,24 +443,29 @@ function reloadList() {
</div>
<div class="status">
<img 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="">
<img
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 class="mark">
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
</div>
<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 class="big-mark" />
<div class="preview" @click="previewHandler">
<SvgIcon size="16" name="zoom-out" />
</div>
<div class="info img-info">
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
@ -473,30 +474,34 @@ function reloadList() {
</span>
</n-gi>
<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>
</n-gi>
<n-gi span="4" class="gi1">
<span>
<img class="icon-status" src="@/assets/images/task/similarity.png" alt="">
<img
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
>
</span>
</n-gi>
<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>
</n-gi>
</n-grid>
</div>
<div class="time">
<div v-if="taskDetailInfo?.ocrPicture?.photoDateTimestamp" class="time-item">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{ formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp) || 0) }}</span>
<span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.photoDateTimestamp)) : '-' }}</span>
</div>
<div v-if="taskDetailInfo?.ocrPicture?.submitDateTimestamp" class="time-item time-item2">
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{ formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp) || 0) }}</span>
<span>{{ taskDetailInfo?.ocrPicture?.submitDateTimestamp ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp)) : '-' }}</span>
</div>
</div>
<div style="display: none">
@ -520,16 +525,16 @@ function reloadList() {
/>
</div>
<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">
<div
draggable="true"
class="img-wrapper"
:style="{ 'background-image': `url(${item.imgUrl})` }"
@dragend="(event) => { handleDragEnd(event, item) }"
@dragend="
(event) => {
handleDragEnd(event, item);
}
"
/>
<div class="small-mark" />
<div class="check">
@ -541,19 +546,32 @@ function reloadList() {
/>
</div>
<img 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="">
<img
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 v-if="item.photoDateTimestamp" class="time-item">
<div class="time-item">
<SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
<span>{{ formatToDateHMS(Number(item.photoDateTimestamp) || 0) }}</span>
<span>{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)) : '-' }}</span>
</div>
<div v-if="item.submitDateTimestamp" class="time-item time-item2">
<div class="time-item time-item2">
<SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
<span>{{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }}</span>
<span>{{ item.submitDateTimestamp ? formatToDateHMS(Number(item.submitDateTimestamp)) : '-' }}</span>
</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>
</div>
</div>
@ -566,7 +584,11 @@ function reloadList() {
<n-tabs type="line" animated>
<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 name="picture-info" tab="图片信息">
<PictureTable :data="taskDetailInfo" />
@ -575,13 +597,12 @@ function reloadList() {
<History :data="taskDetailInfo" />
</n-tab-pane>
</n-tabs>
<NotPassed ref="notPassModalRef" @success="reloadList" />
<NotPassed ref="notPassModalRef" @success="(param) => reloadList(param, '不通过')" />
<BatchModal
ref="batchModalRef"
@reject="rejectHandler"
@approval="approvalHandler"
/>
<CustomSettingModal ref="CustomSettingModalRef" :review-type="3" @on-ok="getTableData" />
</div>
</template>
@ -593,7 +614,7 @@ function reloadList() {
color: #666666;
}
::v-deep(.n-tabs-tab--active .n-tabs-tab__label) {
color: #507AFD;
color: #507afd;
font-size: 16px;
font-weight: 500;
}
@ -612,49 +633,48 @@ function reloadList() {
}
}
.icon-wrap{
.icon-wrap {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
background: rgba(80,122,253,.1);
background: rgba(80, 122, 253, 0.1);
border-radius: 8px;
margin-left: 10px;
cursor: pointer;
}
.img-info{
.icon-status{
.img-info {
.icon-status {
width: 32px;
height: 32px;
}
.label{
.label {
font-size: 11px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #ffffff;
}
.value{
.value {
font-size: 15px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600;
color: #ffffff;
}
.num{
.num {
font-size: 18px;
font-family: PingFang SC, PingFang SC-Semibold;
font-weight: 600;
color: #ffffff;
}
.unit{
.unit {
font-size: 11px;
}
}
.wrapper {
display: flex;
@ -717,13 +737,13 @@ function reloadList() {
display: flex;
align-items: center;
.btn-approval{
.btn-approval {
width: 68px;
height: 28px;
cursor: pointer;
}
.btn-left{
.btn-left {
margin-left: 16px;
}
}
@ -749,10 +769,31 @@ function reloadList() {
border-radius: 8px;
position: relative;
.preview {
position: absolute;
right: 10px;
top: 10px;
z-index: 3;
width: 30px;
height: 30px;
background: rgba(255, 255, 255, 0.20);
border-radius: 6px;
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.big-mark{
width: 100%;
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;
left: 0;
bottom: 0;
@ -806,7 +847,7 @@ function reloadList() {
left: 16px;
bottom: 16px;
.time-item{
.time-item {
display: flex;
align-items: center;
font-size: 14px;
@ -816,12 +857,12 @@ function reloadList() {
margin-bottom: 4px;
}
.time-item2{
.time-item2 {
margin-bottom: 0;
}
.svg-time{
margin-right: 5px
.svg-time {
margin-right: 5px;
}
}
@ -837,20 +878,20 @@ function reloadList() {
justify-content: center;
}
.check{
.check {
position: absolute;
z-index: 3;
left: 2%;
top: 2%;
}
.status{
.status {
position: absolute;
z-index: 3;
left: 0;
top: 0;
.img-status{
.img-status {
width: 133px;
height: 129px;
}
@ -859,12 +900,12 @@ function reloadList() {
.right {
flex: 0.5;
background: #F6F9FD;
background: #f6f9fd;
border-radius: 8px;
margin-left: 20px;
padding: 24px;
.right-card{
.right-card {
padding: 3px;
}
@ -893,10 +934,14 @@ function reloadList() {
// overflow: hidden;
margin: 0px 16px 27px 0px;
.small-mark{
.small-mark {
width: 100%;
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;
position: absolute;
left: 0;
@ -904,7 +949,7 @@ function reloadList() {
z-index: 0;
}
.tag-status{
.tag-status {
width: 46px;
height: 22px;
position: absolute;
@ -917,7 +962,7 @@ function reloadList() {
z-index: 3;
left: 3px;
bottom: 3px;
.time-item{
.time-item {
display: flex;
align-items: center;
font-size: 10px;
@ -928,12 +973,12 @@ function reloadList() {
line-height: 12px;
}
.time-item2{
.time-item2 {
margin-bottom: 0;
}
.svg-time{
margin-right: 5px
.svg-time {
margin-right: 5px;
}
}
@ -973,12 +1018,12 @@ function reloadList() {
font-size: 14px;
}
.percent-unit{
.percent-unit {
font-size: 8px;
margin-top: 4px
margin-top: 4px;
}
.percent-red{
.percent-red {
background: #ff4e4f;
}
}

@ -19,35 +19,42 @@ defineProps({
<tr>
<th>图片名称</th>
<td class="blue">
{{ data?.ocrPicture?.imgname }}
{{ data?.pictureInfo?.imgName }}
</td>
<th>图片格式</th>
<td class="blue" />
<td class="blue">
{{ data?.pictureInfo?.imgFormat }}
</td>
</tr>
<tr>
<th>图片大小</th>
<td />
<td class="blue">
{{ (data?.pictureInfo?.imgSize / 1024).toFixed(2) }}kb
</td>
<th>图片尺寸</th>
<td />
<td class="blue">
{{ data?.pictureInfo?.imgMeasure }}
</td>
</tr>
<tr>
<th>上传时间</th>
<td> {{ data?.ocrPicture?.uptime }}</td>
<td> {{ data?.pictureInfo?.uploadTime }}</td>
<th>生成时间</th>
<td> {{ data?.ocrPicture?.gentime }}</td>
<td> {{ data?.pictureInfo?.createTime }}</td>
</tr>
<tr>
<th>标记时间</th>
<td />
<td> {{ data?.pictureInfo?.tagTime }}</td>
<th>色彩空间</th>
<td>{{ data?.ocrPicture?.space }}</td>
<td>{{ data?.pictureInfo?.imgSpace }}</td>
</tr>
<tr>
<th>
来源
</th>
<td colspan="3">
{{ data?.ocrPicture?.source }}
{{ data?.pictureInfo?.source }}
</td>
</tr>
</table>
@ -125,7 +132,7 @@ td {
}
.blue {
color: #507afd;
// color: #507afd;
}
.black {

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

@ -1,15 +1,22 @@
<script lang="ts" setup>
import { ref } from 'vue'
import Aside from './aside/Aside.vue'
import Content from './content/Content.vue'
const asideRef: any = ref(null)
function setAsideItemName(text) {
asideRef.value.setAsideItemName(text)
}
</script>
<template>
<div class="main">
<!-- 侧边 -->
<Aside />
<Aside ref="asideRef" />
<!-- 内容 -->
<Content />
<Content @set-aside-item-name="setAsideItemName" />
</div>
</template>

@ -251,7 +251,10 @@ function removeHandler(id: string) {
let index = onList.value.findIndex((item) => {
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);
offList.value[index].checked = false;

@ -1,8 +1,10 @@
<script lang="ts" setup>
import { format } from 'date-fns';
import { computed, onMounted } from "vue";
import { computed, onMounted, ref } from "vue";
import type { PackageListItem } from "/#/workorder";
defineOptions({ name: "ListItem" });
const emit = defineEmits(['dismisClick'])
const props = defineProps({
selected: {
@ -21,19 +23,22 @@ const props = defineProps({
type: Array,
default: () => [],
},
mouseOverTask: {
type: Array,
default: () => [],
},
});
console.log(props.dicts, "dicts");
const isDismissTask = ref(false)
const svgName = computed(() => {
return props.selected ? "taskpack-select" : "taskpack";
});
function getValueByLabel(label) {
const result = props.dicts.filter(item => item.name === label)
if (result.length === 0) {
return ""
} else {
return props.dicts.filter(item => item.name === label)[0].fieldDesc
}
function handleDismissTask() {
isDismissTask.value = true
emit('dismisClick', props.mouseOverTask.id)
}
onMounted(async () => {
})
</script>
@ -45,8 +50,16 @@ onMounted(async () => {
<div class="id-wrap">
<SvgIcon :name="svgName" size="28" />
<span class="list-item-header-name" :class="{ 'list-item-header-selected': selected }">
{{ listItem.name }}
<n-ellipsis style="max-width: 180px">
{{ listItem.name }}
</n-ellipsis>
<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>
</div>
</div>
@ -63,7 +76,7 @@ onMounted(async () => {
提交时间{{ format(listItem.createdate, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li v-else-if="item.id === 'createTime'">
生成时间{{ format(listItem.createTime, "yyyy-MM-dd HH:mm:ss") }}
生成时间{{ listItem.createTime && format(listItem.createTime, "yyyy-MM-dd HH:mm:ss") }}
</li>
<li v-else class="ellipsis" v-if="listItem[item.id]">
<span class="label">{{ item.name }}</span>{{ listItem[item.id] }}
@ -103,16 +116,29 @@ onMounted(async () => {
margin-bottom: 6px
}
.dismiss-task-pack {
position: absolute;
right: 15px;
}
.list-item-header-name {
width: 226px;
width: 250px;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 700;
color: #333333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0 0 8px 8px;
display: flex;
justify-content: flex-start;
align-items: center;
.list-item-title {
width: 200px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
&-name {

@ -1,9 +1,11 @@
<script lang="ts" setup>
import { deletePackage } from '@/api/home/main'
import NotPassed from '@/components/NotPassed.vue'
import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils'
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 ListItem from './ListItem.vue'
import type { PackageListItem } from '/#/workorder'
@ -33,11 +35,7 @@ const pagination = reactive({
const approvalModalRef = ref(null)
const notPassedRef: any = ref(null)
function showModal(modalRef: any, id) {
const modal = unref(modalRef)! as any
modal.showModal(id)
}
const overTask = ref<any>(null);
function selectHandler(id: string, index: number) {
workStore.setActive(index)
@ -125,7 +123,21 @@ async function search(word: string) {
{ 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({
search,
})
@ -143,7 +155,11 @@ defineExpose({
:list-item="item"
:show-field-list="showFieldList"
:dicts="dicts"
:mouse-over-task="overTask"
@click="selectHandler(item.id, index)"
@mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
@dismisClick="dismisClick"
/>
</div>
</n-spin>

@ -21,7 +21,7 @@ import { computed, onUnmounted, onUpdated, reactive, ref, unref, watch } from "v
import ConfrimModal from "../modal/ConfrimModal.vue";
import type { ApprovalParam, SimilarityPictureSortParam } from "/#/api";
const batch = ref(false);
const batch = ref(false); //
const selectItems = ref<any[]>([]);
const message = useMessage();
const dialog = useDialog();
@ -29,7 +29,11 @@ const totalCount = ref(0);
let _imagesload: any;
function setBatch(value: boolean) {
batch.value = value;
if (value && batch.value) {
batch.value = !value;
} else {
batch.value = value;
}
if (value === false) {
selectItems.value.forEach((item) => (item.checked = false));
selectItems.value.length = 0;
@ -53,7 +57,7 @@ const taskpagination = reactive({
pageSize: 10,
});
const sortBy: SimilarityPictureSortParam = {
orderType: "asc",
orderType: "desc",
orderName: "similarityScore",
};
const workStore = useWorkOrder();
@ -234,7 +238,7 @@ async function handleSelect(item: any) {
async function sortHandler(orderby: "similarityScore" | "createdate") {
selectedSortName.value = orderby;
sortBy.orderName = orderby;
sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc";
sortBy.orderType = sortBy.orderType === "desc" ? "desc" : "asc";
refreshHandler();
}
@ -269,7 +273,10 @@ function immersionHandler() {
}
function showAction() {
const item = taskDetailInfo.value;
const item = taskDetailInfo.value;
if (item.states === 2 || item.states === 3) {
return
}
if (batch.value === false) overTask.value = item;
}
@ -309,12 +316,7 @@ function approvalHandler(items?: any) {
processItems = selectItems.value
}
else if (overTask.value) {
// => => /
cloneItem = clone(overTask.value)
//
// if (!cloneItem.taskId) {
// cloneItem.taskId = "taskIdtaskIdtaskIdtaskIdtaskId"
// }
processItems = [cloneItem]
}
// => => /
@ -328,31 +330,37 @@ function approvalHandler(items?: any) {
return
}
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
})
})
const param = {
result: true,
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
}
dialog.info({
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
approval()
doAudit(param)
},
onNegativeClick: () => { },
})
}
function approval() {
const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: true,
taskComment: 'approval',
taskname: tasknames,
}
doAudit(param)
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res
@ -366,7 +374,8 @@ function doAudit(param: any) {
}
function reloadList() {
loadMore()
setBatch(false)
refreshHandler()
}
</script>
@ -385,7 +394,8 @@ function reloadList() {
批量审批
</div>
<div class="icon-wrap">
<SvgIcon size="20" name="immersion-model" @click="immersionHandler" />
<SvgIcon size="20" v-if="isFullScreen" name="power-off" @click="immersionHandler" style="cursor: pointer;"/>
<SvgIcon size="20" v-else name="immersion-model" @click="immersionHandler" style="cursor: pointer;"/>
</div>
</div>
@ -428,8 +438,8 @@ function reloadList() {
</div>
</div>
<div class="status">
<img v-show="taskDetailInfo?.states === 3" class="img-status" src="@/assets/images/task/pass.png" alt="">
<img v-show="taskDetailInfo?.states === 5" class="img-status" src="@/assets/images/task/not_pass.png"
<img v-show="taskDetailInfo?.states === 2" class="img-status" src="@/assets/images/task/pass.png" alt="">
<img v-show="taskDetailInfo?.states === 3" class="img-status" src="@/assets/images/task/not_pass.png"
alt="">
</div>
<!-- 右下信息 -->
@ -474,7 +484,7 @@ function reloadList() {
<!-- 右侧任务 标题信息 -->
<div class="right">
<n-scrollbar style="max-height: 100%">
<span class="task-name">任务ID{{ taskDetailInfo.taskname }}</span>
<n-ellipsis style="max-width: 350px">任务ID{{ taskDetailInfo.taskname }}</n-ellipsis>
<div class="tags">
<div class="tag tag-submiting" v-if="taskDetailInfo.states == 1">{{ TASK_STATUS_OBJ[taskDetailInfo.states]
}}</div>
@ -490,7 +500,7 @@ function reloadList() {
<div class="property">
<span class="property-name top" style=" color: #666666">图片大小
</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo &&
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo && taskDetailInfo?.pictureInfo?.imgSize&&
(taskDetailInfo?.pictureInfo?.imgSize / 1000).toFixed(2) }}KB</span>
</div>
<div class="property">
@ -511,19 +521,18 @@ function reloadList() {
<div class="property">
<span class="property-name top" style=" color: #666666">提报人
</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo?.source || "-" }}</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.upname || "-" }}</span>
</div>
<div class="property">
<span class="property-name top" style=" color: #666666">创建时间
</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo &&
format(taskDetailInfo?.pictureInfo?.createTime, 'yyyy-MM-dd HH:mm:ss') }}</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.pictureInfo && taskDetailInfo?.pictureInfo.createTime }}</span>
</div>
<div class="property">
<span class="property-name top" style=" color: #666666">提报时间
</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.uploadTime &&
format(taskDetailInfo?.pictureInfo?.uploadTime, 'yyyy-MM-dd HH:mm:ss') || '-' }}</span>
<span style=" color: #333333; font-size: 16px">{{ taskDetailInfo?.submitDateTimestamp &&
format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss') || '-' }}</span>
</div>
<div v-for="key in Object.keys(propertys)" :key="key" class="property">
<span class="property-name">{{ fieldMap[key] }}</span>
@ -571,7 +580,7 @@ function reloadList() {
</div>
</div>
<div class="check">
<n-checkbox v-show="batch" v-model:checked="item.checked" @click.stop
<n-checkbox v-show="batch && item.historyStates !== 2 && item.historyStates !== 3" v-model:checked="item.checked" @click.stop
@update:checked="onCheckChange($event, item)" />
</div>
<div class="percent">
@ -909,8 +918,8 @@ function reloadList() {
}
.tag-passed {
color: #02C984;
border: 1px solid #02C984;
color: #ff7575;
border: 1px solid #ff7575;
}
.tag-approved {

@ -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

Loading…
Cancel
Save