feat: 修改bug

pull/32/head
raofuzi 1 year ago
parent 57a699f422
commit 84349062d4

@ -227,7 +227,7 @@ export default defineComponent({
<!-- 个人中心 -->
<div class="layout-header-trigger layout-header-trigger-min">
<!-- <n-avatar :src="getImgUrl(useInfo.usericon)" round /> -->
<n-avatar :src="getImgUrl(useInfo.usericon) || defaultAvatarSrc" round/>
<n-avatar :src="(useInfo.usericon && getImgUrl(useInfo.usericon)) || defaultAvatarSrc" round/>
</div>
<!-- 设置 -->
<UserSettings @logout="doLogout" />

@ -130,7 +130,7 @@ configStore.$subscribe(() => {
return acc
}
}, [])
// console.log("items", items);
console.log("items", items);
showItems.value = items
})

@ -54,6 +54,11 @@ const searchName = () => {
configStore.setSearchValue(searchKeyword.value);
}
const close = () => {
searchKeyword.value = "";
emit('close');
}
</script>
<template>
@ -63,22 +68,22 @@ const searchName = () => {
trigger="focus"
>
<template #trigger>
<n-input style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler">
<n-input v-model:value="searchKeyword" style="width: 260px;height: 32px;" placeholder="请输入你需要搜索的内容" @input="inputHandler">
<template #suffix>
<SvgIcon size="14px" name="magnifying-1" @click="searchName" style="cursor: pointer;" />
</template>
</n-input>
</template>
<div class="wrapper-popover">
<!-- <div class="wrapper-popover">
<ul class="wrapper-list">
<li v-for="(item, index) in data" v-show="item.label.includes(searchKeyword)" :key="index" @click="selectHandler(item)">
{{ item.label }}
</li>
</ul>
</div>
</div> -->
</n-popover>
<SvgIcon size="16px" style="margin-left: 6px;cursor: pointer;" name="clear" @click="$emit('close')" />
<SvgIcon size="16px" style="margin-left: 6px;cursor: pointer;" name="clear" @click="close" />
</div>
</template>

@ -3,7 +3,7 @@ import { getAllfieldList, getfieldList, setFilter } from '@/api/home/filter'
import { asideMap } from '@/config/aside'
import { useConfig } from '@/store/modules/asideConfig'
import { useUser } from "@/store/modules/user"
import { debounce, difference } from 'lodash-es'
import { debounce, difference, cloneDeep } from 'lodash-es'
import { computed, defineOptions, onMounted, ref, watch } from 'vue'
import { VueDraggable } from 'vue-draggable-plus'
@ -25,6 +25,7 @@ function showModal() {
if (config == null || customConfig == null)
return
const { showList, hideList } = generatList(config, customConfig)
console.log("showList", showList);
onList.value = showList
offList.value = hideList
//
@ -124,7 +125,15 @@ function generatList(config, customConfig) {
const fixedList = generateDefaultList(config)
offList.unshift(...fixedList)
onList.unshift(...fixedList)
return { showList: onList, hideList: offList }
// onListcustomConfig
let tempOnList = cloneDeep(onList);
let sortList: any = [];
customConfig.map(key => {
let tempItem = tempOnList.find(item => item.id == key);
sortList.push(tempItem);
});
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
}
configStore.$subscribe(() => {
@ -313,7 +322,7 @@ onMounted(() => {
<n-scrollbar style="max-height: 500px;border: 1px solid #cad2dd;border-radius: 2px;">
<div class="draggable-ul">
<div class="draggable-li">
<n-checkbox v-model:checked="checkAll" label="全" @update:checked="onCheckAllChange" :indeterminate="!checkAll"/>
<n-checkbox v-model:checked="checkAll" label="全" @update:checked="onCheckAllChange" :indeterminate="!checkAll"/>
</div>
<div
v-for="item in offList" v-show="item.name.includes(offKeyword)" :key="item.id" :class="{ 'disable-check': item.fix }"
@ -364,9 +373,9 @@ onMounted(() => {
<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 style="margin-left:15px; border: 1px solid #CAD2DD;" @click="closeModal">
取消
</n-button>
</div>
@ -476,7 +485,7 @@ onMounted(() => {
::v-deep(.n-card > .n-card-header .n-card-header__main){
font-weight: lighter !important;
font-size: 14px;
color: #333333;
color: #666;
}
::v-deep(.n-scrollbar){
border-left: 1px solid #cad2dd !important;

@ -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,18 @@ 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
// ,,..
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){
tasksLoadingModal.showModal()
tasksLoadingModal.showModal()
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){// rao
return;
}
debugger
//
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 +281,7 @@ async function showAddPackage() {
//,
async function tasksLoadingCloseCallback() {
const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.closeModal()
checkingTaskModal.showModal()
if(isRefresh.value) {
refresh(true);
}
@ -442,8 +455,8 @@ function refresh(val?: any) {
if ((checkTaskStatus.value === 2 || checkTaskStatus.value === 3) && isRefresh.value) {
configStore.setTimeNum(100);
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
tasksLoadingModal.closeModal();
// const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
// tasksLoadingModal.closeModal();
checkingTaskModal.closeModal()
isRefresh.value = false
if(checkTaskStatus.value === 2) {
@ -458,8 +471,8 @@ function refresh(val?: any) {
loadMore()
configStore.setTimeNum(0);
} else if (checkTaskStatus.value === 1) {
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
tasksLoadingModal.showModal();
// const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
// tasksLoadingModal.showModal();
if(calNum.value < 90) {
calNum.value = calNum.value + 10;
// console.log("calNum.value",calNum.value);
@ -475,7 +488,7 @@ function refresh(val?: any) {
refresh();
}, 200);
}
checkingTaskModal.showModal()
// checkingTaskModal.showModal()
// return
}
}
@ -543,11 +556,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>
@ -618,7 +631,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">
@ -854,5 +867,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>
Loading…
Cancel
Save