|
|
|
@ -30,6 +30,7 @@ import LoginSuccessModal from './modal/LoginSuccessModal.vue'
|
|
|
|
|
import PackageSettingsModal from './modal/PackageSettingsModal.vue'
|
|
|
|
|
import QueryRepeatedTasksModal from './modal/QueryRepeatedTasksModal.vue'
|
|
|
|
|
import type { PictureSortParam } from "/#/api"
|
|
|
|
|
import defaultAvatar from '@/assets/icons/avatar.svg'
|
|
|
|
|
|
|
|
|
|
const deviceHeight = ref(600)
|
|
|
|
|
let _masonry: null | Masonry = null
|
|
|
|
@ -140,6 +141,7 @@ const viewLabel = computed(() => {
|
|
|
|
|
let isAllowDownload = ref(true)
|
|
|
|
|
let calNum = ref(0);
|
|
|
|
|
const searchValue = ref('');
|
|
|
|
|
const isInitSeaerch = ref(false);// 是否初始化搜索
|
|
|
|
|
|
|
|
|
|
configStore.$subscribe(() => {
|
|
|
|
|
isAllowDownload.value = configStore.isAllowDownload;
|
|
|
|
@ -150,9 +152,13 @@ configStore.$subscribe(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => searchValue.value,
|
|
|
|
|
(newVal, oldVal) => {
|
|
|
|
|
async (newVal, oldVal) => {
|
|
|
|
|
if(newVal) {
|
|
|
|
|
featchList()
|
|
|
|
|
isInitSeaerch.value = true;
|
|
|
|
|
const more = await featchList()
|
|
|
|
|
listData.value = more;
|
|
|
|
|
isInitSeaerch.value = false;
|
|
|
|
|
// configStore.setSearchValue("");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
@ -181,8 +187,12 @@ async function featchList() {
|
|
|
|
|
sortObj.ordertype = sortBy.orderbyname
|
|
|
|
|
}else if(sortBy.orderbyvalue == "fromuptime") {
|
|
|
|
|
sortObj.orderByTime = sortBy.orderbyname
|
|
|
|
|
}// rao end
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(params['izsimilarity'] && typeof params['izsimilarity'] != "string") {
|
|
|
|
|
params['izsimilarity'] = params['izsimilarity'].join('-');
|
|
|
|
|
}
|
|
|
|
|
// rao end
|
|
|
|
|
|
|
|
|
|
if (checkTaskStatus.value === 2 && isRefresh) {
|
|
|
|
|
result = await queryPageListByCheckNo({ ...pagination, ...contentParams, ...params, ...sortObj, checkDuplicateNo: checkDuplicateNo.value, upUserName: searchValue })
|
|
|
|
|
} else {
|
|
|
|
@ -217,6 +227,10 @@ async function loadMore() {
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
const more = await featchList()
|
|
|
|
|
// if(isInitSeaerch.value) {
|
|
|
|
|
// listData.value = [];
|
|
|
|
|
// isInitSeaerch.value = false;
|
|
|
|
|
// }
|
|
|
|
|
listData.value.push(...more)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -238,19 +252,54 @@ async function oneCheck() {
|
|
|
|
|
const asideVal = cloneDeep(configStore.getAsideValue)
|
|
|
|
|
asideVal.izyear = dayjs(asideVal.izyear[0]).format("YYYY/MM/DD") + '-' + dayjs(asideVal.izyear[1]).format("YYYY/MM/DD")
|
|
|
|
|
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('calNum.value111111111111111', calNum.value, checkTaskStatus.value);
|
|
|
|
|
if(calNum.value == 0 && isRefresh.value) {
|
|
|
|
|
if(timer.value) {
|
|
|
|
|
clearInterval(timer.value);
|
|
|
|
|
}
|
|
|
|
|
timer.value = setInterval(() => {
|
|
|
|
|
console.log('calNum.value2222222222222', calNum.value,checkTaskStatus.value);
|
|
|
|
|
if (checkDuplicateNo.value) {
|
|
|
|
|
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkTaskStatus.value = res.data.status;
|
|
|
|
|
if(calNum.value < 90) {
|
|
|
|
|
calNum.value = calNum.value + 10;
|
|
|
|
|
}
|
|
|
|
|
configStore.setTimeNum(calNum.value);
|
|
|
|
|
if(checkTaskStatus.value === 2 || checkTaskStatus.value === 3) {
|
|
|
|
|
if(checkTaskStatus.value === 2) {
|
|
|
|
|
message.success('任务执行完毕,正在刷新数据...');
|
|
|
|
|
}else {
|
|
|
|
|
message.error('查询异常');
|
|
|
|
|
}
|
|
|
|
|
tasksLoadingModal.closeOnlyModal();
|
|
|
|
|
configStore.setTimeNum(100);
|
|
|
|
|
if(timer.value) {
|
|
|
|
|
clearInterval(timer.value);
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
configStore.setTimeNum(0);
|
|
|
|
|
}, 1000);
|
|
|
|
|
reset()
|
|
|
|
|
loadMore()
|
|
|
|
|
}
|
|
|
|
|
}})
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
// 查重任务编号,状态不为空,或者状态执行中..
|
|
|
|
|
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
return;
|
|
|
|
|
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){// 暂时rao
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//调用查重任务开启流程
|
|
|
|
|
oneClickCheckTaskPackage(asideVal).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkDuplicateNo.value = res.data.checkDuplicateNo
|
|
|
|
|
checkTaskStatus.value = res.data.status
|
|
|
|
|
tasksLoadingModal.closeModal()
|
|
|
|
|
tasksLoadingModal.showModal() // 暂时rao
|
|
|
|
|
} else {
|
|
|
|
|
message.error(res.message || '查重失败')
|
|
|
|
|
}
|
|
|
|
@ -268,7 +317,7 @@ async function showAddPackage() {
|
|
|
|
|
//查重任务加载提示框,关闭回调
|
|
|
|
|
async function tasksLoadingCloseCallback() {
|
|
|
|
|
const checkingTaskModal = checkingTaskModalRef.value as any
|
|
|
|
|
checkingTaskModal.closeModal()
|
|
|
|
|
checkingTaskModal.showModal()
|
|
|
|
|
if(isRefresh.value) {
|
|
|
|
|
refresh(true);
|
|
|
|
|
}
|
|
|
|
@ -440,39 +489,23 @@ function refresh(val?: any) {
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (checkTaskStatus.value === 2 && isRefresh.value) {
|
|
|
|
|
if ((checkTaskStatus.value === 2 || checkTaskStatus.value === 3) && isRefresh.value) {
|
|
|
|
|
configStore.setTimeNum(100);
|
|
|
|
|
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
|
|
|
|
|
tasksLoadingModal.closeModal();
|
|
|
|
|
checkingTaskModal.closeModal()
|
|
|
|
|
isRefresh.value = false
|
|
|
|
|
message.success('任务执行完毕,正在刷新数据...');
|
|
|
|
|
if(checkTaskStatus.value === 2) {
|
|
|
|
|
message.success('任务执行完毕,正在刷新数据...');
|
|
|
|
|
}else {
|
|
|
|
|
message.error('查询异常');
|
|
|
|
|
}
|
|
|
|
|
if(timer.value) {
|
|
|
|
|
clearInterval(timer.value);
|
|
|
|
|
}
|
|
|
|
|
reset()
|
|
|
|
|
loadMore()
|
|
|
|
|
// configStore.setTimeNum(0);
|
|
|
|
|
configStore.setTimeNum(0);
|
|
|
|
|
} else if (checkTaskStatus.value === 1) {
|
|
|
|
|
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
|
|
|
|
|
tasksLoadingModal.showModal();
|
|
|
|
|
if(calNum.value < 90) {
|
|
|
|
|
calNum.value = calNum.value + 10;
|
|
|
|
|
// console.log("calNum.value计算后的值",calNum.value);
|
|
|
|
|
}
|
|
|
|
|
configStore.setTimeNum(calNum.value);
|
|
|
|
|
// console.log("calNum.value timer.value外面------", timer.value, calNum.value, isRefresh.value);
|
|
|
|
|
if(calNum.value == 10 && isRefresh.value) {
|
|
|
|
|
if(timer.value) {
|
|
|
|
|
clearInterval(timer.value);
|
|
|
|
|
}
|
|
|
|
|
timer.value = setInterval(() => {
|
|
|
|
|
// console.log("calNum.value timer.value里面------", timer.value, calNum.value);
|
|
|
|
|
refresh();
|
|
|
|
|
}, 200);
|
|
|
|
|
}
|
|
|
|
|
checkingTaskModal.showModal()
|
|
|
|
|
// return
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -539,11 +572,11 @@ const dropdownOptions = ref([
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
:options="dropdownOptions"
|
|
|
|
|
>
|
|
|
|
|
<n-button style="margin-left: 10px;">
|
|
|
|
|
<Icon>
|
|
|
|
|
<EllipsisHorizontal />
|
|
|
|
|
<span class="expand-icon">
|
|
|
|
|
<Icon style="position: relative; top: 2px;">
|
|
|
|
|
<EllipsisHorizontal style="color: #507afd;"/>
|
|
|
|
|
</Icon>
|
|
|
|
|
</n-button>
|
|
|
|
|
</span>
|
|
|
|
|
</n-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -614,7 +647,7 @@ const dropdownOptions = ref([
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="left">
|
|
|
|
|
<n-avatar :src="getAvatar(item.uphead)" class="avatar" round />
|
|
|
|
|
<n-avatar :src="(item.uphead && getAvatar(item.uphead)) || defaultAvatar" class="avatar" round />
|
|
|
|
|
<span>{{ item.upname }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="right">
|
|
|
|
@ -850,5 +883,16 @@ const dropdownOptions = ref([
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.expand-icon {
|
|
|
|
|
display: block;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
background: linear-gradient(144deg, rgba(115, 167, 249, 0.1) 0%, rgba(62, 110, 241, 0.1) 96%);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|