Merge pull request 'feat: 修改问题' (#289) from fix/updatesyspic into test

Reviewed-on: #289
pull/292/head
yaoshuli 1 year ago
commit f0797278be

@ -161,7 +161,6 @@ useInfiniteScroll(
el as any,
() => {
// loading = false
console.log('加载了000000000000000---------------------------')
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore },
@ -172,7 +171,7 @@ async function featchList() {
try {
// const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value })
pagination.pageNo += 1
console.log('pagination.pageNo------------', pagination.pageNo)
// console.log('pagination.pageNo------------', pagination.pageNo)
const result = await dubiousfilelist({ ...pagination, ...sortObj })
// TODO
// result.data = Array.from({ length: 30 })
@ -180,7 +179,7 @@ async function featchList() {
pagination.pageNo = data.current
// canloadMore = pageCount >= pagination.pageNo && pageCount > 0;
canloadMore = data.pages >= pagination.pageNo && data.pages > 0
console.log('canloadMore------------', canloadMore)
// console.log('canloadMore------------', canloadMore)
loading = false
return result.data.records
// const list = data.map((item) => {
@ -211,8 +210,8 @@ async function loadMore() {
if (pagination.pageNo <= 2) {
listData.value = []
listData.value = listData.value.concat(more)
console.log('listData.value出来了11111111111111', listData.value)
if (pagination.pageNo == 1)
console.log('listData.value出来了11111111111111', listData.value, pagination.pageNo)
if (pagination.pageNo <= 2)
waterfallRef.value?.resize()
}
else {
@ -299,7 +298,7 @@ function imUpdateSelectIds(x: number, y: number, w: number, h: number) {
}
function isSelected(pictureId: number) {
console.log('selectIds.value多少只啊啊啊啊啊啊啊啊啊啊啊啊啊', selectIds.value, pictureId)
// console.log('selectIds.value', selectIds.value, pictureId)
return selectIds.value.includes(String(pictureId))
}
@ -499,7 +498,7 @@ function setBatch(value) {
batch.value = !value
else
batch.value = value
waterfallRef.value?.resize()
if (value === false) {
selectIds.value = []
selectedApproveItems.value.forEach(item => (item.checked = false))
@ -566,7 +565,6 @@ function approvalHandler(items?: any) {
// => => /
if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items]
console.log('batch-------------', batch.value, selectedApproveItems.value, processItems)
const msg = validate(processItems)
if (msg !== null) {
@ -612,13 +610,17 @@ function doAudit(param: any) {
if (code === 'OK') {
message.info(res.message)
// emitter.emit('refresh')
refreshHandler()
// refreshHandler()
reset()
loadMore()
}
else { message.error(res.message) }
})
}
function reloadList() {
refreshHandler()
// refreshHandler()
reset()
loadMore()
}
async function refreshHandler(filtersearchId?: any) {
// rao start
@ -650,7 +652,7 @@ async function refreshHandler(filtersearchId?: any) {
}
function finish() {
console.log('finish')
// console.log('finish')
}
onBeforeMount(async () => {
@ -738,7 +740,7 @@ watch(() => show.value, async (newVal) => {
批量审批
</div>
<div v-show="showActions" class="batch">
<n-button text @click="setBatch(false)">
<n-button text style="margin-left: 20px;" @click="setBatch(false)">
<template #icon>
<SvgIcon name="revoke" />
</template>
@ -853,7 +855,7 @@ watch(() => show.value, async (newVal) => {
:style="{ backgroundImage: `url(${loading ? bgLoadingImg : 'none'})`, display: 'none' }"
/>
<n-checkbox
v-if="batch && item.historyStates === 1" v-model:checked="item.checked"
v-if="batch && item.historyStates === 1"
style="position:absolute;left:20px;top:20px" @click.prevent.stop
@update:checked="onCheckChange($event, item)"
/>
@ -1039,7 +1041,7 @@ watch(() => show.value, async (newVal) => {
width: 46px;
height: 22px;
position: absolute;
left: 16px;
left: 2px;
top: 20px;
}
@ -1056,8 +1058,8 @@ watch(() => show.value, async (newVal) => {
background: #6f92fd;
border-radius: 6px 0px 6px 0px;
z-index: 5;
right: 28px;
top: 0px;
right: 16px;
top: 6px;
color: #fff;
font-size: 14px;
@ -1073,10 +1075,10 @@ watch(() => show.value, async (newVal) => {
.time {
position: absolute;
width: 182px;
// padding-left: 10px;
padding-left: 10px;
z-index: 3;
left: 6px;
bottom: 0px;
bottom: 6px;
background: linear-gradient(180deg,rgba(6,0,0,0.01),rgba(0, 0, 0, 0.44) 100%);
border-radius: 0 0 7px 7px;
.time-item {
@ -1100,6 +1102,7 @@ watch(() => show.value, async (newVal) => {
.scroll {
overflow-y: auto;
overflow-x: hidden;
// height: calc(100vh - 282px);
height: 800px;
margin-left: 20px;

@ -140,7 +140,6 @@ const listStyle = computed(() => {
useInfiniteScroll(
el as any,
() => {
console.log('初始化加载了')
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore },
@ -182,14 +181,14 @@ const isInitSeaerch = ref(false) // 是否初始化搜索
const collapse = ref(1)
nextTick(() => {
configStore.$subscribe(() => {
console.log('subscribe', 'configStore')
// console.log('subscribe', 'configStore')
isAllowDownload.value = configStore.isAllowDownload
calNum.value = configStore.getTimeNum
// console.log("calNum.value----------", calNum.value);
searchValue.value = configStore.getSearchValue
console.log(configStore.getSearchValue, 'getSearchValue')
// console.log(configStore.getSearchValue, 'getSearchValue')
collapse.value = configStore.getCollapse ? 1 : 0
console.log('collapse.value的这个肚饿的点点滴滴的点点滴滴', collapse.value)
// console.log('collapse.value饿', collapse.value)
})
})
@ -222,20 +221,26 @@ watch(() => collapse.value, (newVal, oldVal) => {
watch(
() => searchValue.value,
async (newVal, oldVal) => {
console.log('搜索框的值', newVal, oldVal)
// console.log('', newVal, oldVal)
if (newVal) {
isInitSeaerch.value = true
pagination.pageNo = 0
const more = await featchList()
listData.value = more
// pagination.pageNo = 0
// const more = await featchList()
// listData.value = more
// isInitSeaerch.value = false
// // configStore.setSearchValue("");
reset()
loadMore()
isInitSeaerch.value = false
// configStore.setSearchValue("");
}
else {
isInitSeaerch.value = true
pagination.pageNo = 0
const more = await featchList()
listData.value = more
// pagination.pageNo = 0
// const more = await featchList()
// listData.value = more
// isInitSeaerch.value = false
reset()
loadMore()
isInitSeaerch.value = false
}
},
@ -244,6 +249,7 @@ watch(
watch(
() => configStore.getAsideValue,
async (newVal, oldVal) => {
// console.log('configStore.getAsideValue', configStore.getAsideValue, pagination.pageNo)
if (pagination.pageNo > 1 && newVal && !(Object.entries(newVal).toString() === Object.entries(oldVal).toString())) {
reset()
loadMore()
@ -333,7 +339,7 @@ async function featchList(userSearchId?: string) {
}
async function loadMore() {
console.log('loading.value加兹安', loading.value, el.value)
// console.log('loading.value', loading.value, el.value)
if (loading.value || el.value == null)
return
canloadMore = false
@ -347,6 +353,8 @@ async function loadMore() {
listData.value = listData.value.concat(more)
console.log('listData.value出来了', listData.value)
waterfallRef.value?.resize()
if (listData.value.length == 0)
waterfallRef.value?.clear()
}
else {
listData.value = listData.value.concat(more)
@ -398,7 +406,6 @@ async function oneCheck() {
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)
@ -559,8 +566,7 @@ async function refreshHandler(filtersearchId?: any) {
if (filtersearchId)
filterId = filtersearchId
console.log('refreshHandler执行了')
loadMore(true)
loadMore()
// nextTick(() => {
// setTimeout(() => {
// useInfiniteScroll(
@ -662,7 +668,6 @@ function refresh(val?: any) {
if (timer.value)
clearInterval(timer.value)
console.log('refresh刷新了')
reset()
loadMore()
configStore.setTimeNum(0)
@ -716,7 +721,7 @@ const dropdownOptions = ref([
])
function finish() {
console.log('finish')
// console.log('finish')
}
const masonryRef = ref(null)

@ -96,7 +96,7 @@ onBeforeMount(async () => {
useWindowSizeFn(computeListHeight)
function finish() {
console.log('finish')
// console.log('finish')
}
// const layout = debounce(() => {
@ -140,14 +140,12 @@ let canloadMore = true
useInfiniteScroll(
el as any,
() => {
console.log(123456)
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore },
)
async function loadMore() {
console.log('loadMore')
if (loading.value || el.value == null)
return
@ -189,7 +187,7 @@ async function fetchList() {
)
// pagination.pageNo = current
canloadMore = pageCount >= pagination.pageNo && pageCount > 0
console.log('canloadMore的值为', canloadMore, pageCount, pagination.pageNo)
// console.log('canloadMore', canloadMore, pageCount, pagination.pageNo)
totalCount.value = total
loading.value = false
return data
@ -311,7 +309,6 @@ function handleKeydown(event) {
}
function showModal(value) {
taskId.value = value
console.log('showModal')
refreshHandler()
show.value = true
}
@ -349,11 +346,15 @@ watch(() => selectIds.value.length, () => {
})
const showActions = computed(() => {
return selectIds.value.length > 0 && batch
return selectIds.value.length > 0 && batch.value
})
function setBatch(value: boolean) {
batch.value = value
listData.value.forEach((item) => {
item.pictureId += 1
})
waterfallRef.value?.resize()
if (value === false) {
selectIds.value = []
listData.value.forEach((item) => {
@ -612,7 +613,7 @@ defineExpose({
<div v-if="viewMode != 'masonry'" class="grid" :style="{ 'grid-template-columns': `repeat(${cols}, 182px)` }">
<div
v-for="(item, index) in listData"
:key="index"
:key="item.pictureId"
:style="{ height: gridHeight }"
class="grid-item"
>
@ -657,9 +658,8 @@ defineExpose({
</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="">
<div class="check">
<div v-show="batch && item.historyStates == 1" class="check">
<n-checkbox
v-show="batch && item.historyStates === 1"
v-model:checked="item.checked" @click.prevent
@update:checked="onCheckChange($event, item)"
/>
@ -673,7 +673,7 @@ defineExpose({
<waterfall v-if="viewMode === 'masonry'" ref="waterfallRef" :col="cols" :data="listData" :gutter-width="10" @finish="finish">
<div
v-for="(item, index) in listData"
:key="index"
:key="item.pictureId"
:style="{ height: gridHeight }"
class="grid-item"
>
@ -718,10 +718,10 @@ defineExpose({
</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="">
<div class="check">
<div v-show="item.historyStates == 1 && batch" class="check">
<n-checkbox
v-show="batch && item.historyStates === 1"
v-model:checked="item.checked" @click.prevent
@click.prevent
@update:checked="onCheckChange($event, item)"
/>
</div>
@ -785,14 +785,14 @@ defineExpose({
height: 22px;
position: absolute;
left: 3px;
top: 6px;
top: 16px;
}
.time {
position: absolute;
z-index: 3;
left: 6px;
bottom: 6px;
left: 12px;
bottom: 12px;
.time-item{
display: flex;
align-items: center;
@ -1005,8 +1005,8 @@ defineExpose({
.check{
position: absolute;
z-index: 3;
left: 6px;
top: 6px;
left: 12px;
top: 12px;
}
.percent {
@ -1020,7 +1020,7 @@ defineExpose({
background: #6f92fd;
border-radius: 6px 0px 6px 0px;
z-index: 5;
right: 6px;
right: 18px;
top: 6px;
color: #fff;
font-size: 14px;

Loading…
Cancel
Save