|
|
|
@ -12,6 +12,7 @@ import { debounce } from 'lodash-es'
|
|
|
|
|
import { audit } from '@/api/task/task'
|
|
|
|
|
import NotPassed from '@/components/Approval/NotPassed.vue'
|
|
|
|
|
import { off, on } from '@/utils/domUtils'
|
|
|
|
|
import ConfrimModal from "./ConfrimModal.vue"
|
|
|
|
|
|
|
|
|
|
const cardStyle = {
|
|
|
|
|
'--n-padding-bottom': '40px',
|
|
|
|
@ -59,6 +60,7 @@ const show = ref(false)
|
|
|
|
|
const selectedApproveItems = ref<any[]>([]); // 审核批量选中
|
|
|
|
|
const dialog = useDialog();
|
|
|
|
|
let processItems: any[] = [];
|
|
|
|
|
const confrimModalRef = ref<any>();
|
|
|
|
|
|
|
|
|
|
const layout = debounce(() => {
|
|
|
|
|
if (!show.value)
|
|
|
|
@ -252,14 +254,8 @@ function closeModal(event: MouseEvent) {
|
|
|
|
|
selectedApproveItems.value = []
|
|
|
|
|
show.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function remove() {
|
|
|
|
|
if ( !selectIds.value|| selectIds.value.length === 0) {
|
|
|
|
|
message.error('至少选中一个')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const ids = selectIds.value.join(',')
|
|
|
|
|
async function commit() {
|
|
|
|
|
const ids = selectIds.value.join(',')
|
|
|
|
|
const res = await removeFiles({ pictureid: ids })
|
|
|
|
|
if (res.code === 'OK') {
|
|
|
|
|
message.success('移除成功')
|
|
|
|
@ -269,6 +265,13 @@ async function remove() {
|
|
|
|
|
layout()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function remove() {
|
|
|
|
|
if ( !selectIds.value|| selectIds.value.length === 0) {
|
|
|
|
|
message.error('至少选中一个')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
confrimModalRef?.value?.showModal()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setBatch(value) {
|
|
|
|
@ -288,11 +291,9 @@ defineExpose({
|
|
|
|
|
showModal,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const checked = ref(false)
|
|
|
|
|
|
|
|
|
|
const notPassModalRef = ref(null)
|
|
|
|
|
const showActions = computed(() => {
|
|
|
|
|
console.log('selectedApproveItems',selectedApproveItems)
|
|
|
|
|
console.log('selectedApproveItems', selectedApproveItems)
|
|
|
|
|
return selectedApproveItems.value.length > 0 && batch;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -385,7 +386,7 @@ function doAudit(param: any) {
|
|
|
|
|
function reloadList() {
|
|
|
|
|
refreshHandler()
|
|
|
|
|
}
|
|
|
|
|
function refreshHandler(){
|
|
|
|
|
function refreshHandler() {
|
|
|
|
|
reset()
|
|
|
|
|
featchList()
|
|
|
|
|
}
|
|
|
|
@ -394,14 +395,10 @@ function refreshHandler(){
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<n-modal
|
|
|
|
|
v-model:show="show" :mask-closable="false" style="position: relative;" transform-origin="center"
|
|
|
|
|
@after-enter="afterEnter" @after-leave="afterLeave"
|
|
|
|
|
>
|
|
|
|
|
<n-card
|
|
|
|
|
:style="cardStyle" class="card card-1" style="position: fixed;top:64px" :bordered="false" size="huge" role="dialog"
|
|
|
|
|
aria-modal="true"
|
|
|
|
|
>
|
|
|
|
|
<n-modal v-model:show="show" :mask-closable="false" style="position: relative;" transform-origin="center"
|
|
|
|
|
@after-enter="afterEnter" @after-leave="afterLeave">
|
|
|
|
|
<n-card :style="cardStyle" class="card card-1" style="position: fixed;top:64px" :bordered="false" size="huge"
|
|
|
|
|
role="dialog" aria-modal="true">
|
|
|
|
|
<div class="wrapper">
|
|
|
|
|
<div class="wrapper-m32">
|
|
|
|
|
<SvgIcon name="recycle" size="16" />
|
|
|
|
@ -436,45 +433,37 @@ function refreshHandler(){
|
|
|
|
|
批量审批
|
|
|
|
|
</div>
|
|
|
|
|
<div v-show="showActions" class="batch">
|
|
|
|
|
<n-button text @click="setBatch(false)">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="revoke" />
|
|
|
|
|
</template>
|
|
|
|
|
返回
|
|
|
|
|
</n-button>
|
|
|
|
|
<div style="cursor: pointer; margin-left: 16px" @click.stop="rejectHandler">
|
|
|
|
|
<SvgIcon width="64" height="28" name="a1" />
|
|
|
|
|
</div>
|
|
|
|
|
<SvgIcon size="24" name="vs" />
|
|
|
|
|
<div style="cursor: pointer" @click.stop="approvalHandler">
|
|
|
|
|
<SvgIcon width="64" height="28" name="a2" />
|
|
|
|
|
</div>
|
|
|
|
|
<n-button text @click="setBatch(false)">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="revoke" />
|
|
|
|
|
</template>
|
|
|
|
|
返回
|
|
|
|
|
</n-button>
|
|
|
|
|
<div style="cursor: pointer; margin-left: 16px" @click.stop="rejectHandler">
|
|
|
|
|
<SvgIcon width="64" height="28" name="a1" />
|
|
|
|
|
</div>
|
|
|
|
|
<SvgIcon size="24" name="vs" />
|
|
|
|
|
<div style="cursor: pointer" @click.stop="approvalHandler">
|
|
|
|
|
<SvgIcon width="64" height="28" name="a2" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div ref="el" class="scroll">
|
|
|
|
|
<!-- <n-scrollbar :on-scroll="scrollHandler"> -->
|
|
|
|
|
<div ref="masonryRef" class="grid">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in listData" :key="item.id" :data-id="item.id"
|
|
|
|
|
:class="{ 'grid-item-selected': isSelected(item.id) }" :style="{ height: gridHeight }" class="grid-item"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="(item, index) in listData" :key="item.id" :data-id="item.id"
|
|
|
|
|
:class="{ 'grid-item-selected': isSelected(item.id) }" :style="{ height: gridHeight }"
|
|
|
|
|
class="grid-item">
|
|
|
|
|
<!-- <img
|
|
|
|
|
class="wrapper-content-item-img"
|
|
|
|
|
:class="{ 'wrapper-content-item-img-fit': viewMode !== 'masonry' }" :src="item.imgUrl"
|
|
|
|
|
> -->
|
|
|
|
|
<n-image
|
|
|
|
|
:src="item.imgurl"
|
|
|
|
|
class="img "
|
|
|
|
|
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
|
|
|
|
|
/>
|
|
|
|
|
<n-checkbox
|
|
|
|
|
v-if="batch"
|
|
|
|
|
v-model:checked="item.checked"
|
|
|
|
|
style="position:absolute;left:20px;top:20px" @click.prevent
|
|
|
|
|
@update:checked="onCheckChange($event, item)"
|
|
|
|
|
/>
|
|
|
|
|
<n-image :src="item.imgurl" class="img "
|
|
|
|
|
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }" />
|
|
|
|
|
<n-checkbox v-if="batch" v-model:checked="item.checked" style="position:absolute;left:20px;top:20px"
|
|
|
|
|
@click.prevent @update:checked="onCheckChange($event, item)" />
|
|
|
|
|
<!-- <div class="percent">
|
|
|
|
|
{{ getPercent(item.pictureid, item) }}
|
|
|
|
|
</div> -->
|
|
|
|
@ -491,6 +480,7 @@ function refreshHandler(){
|
|
|
|
|
</n-card>
|
|
|
|
|
</n-modal>
|
|
|
|
|
<NotPassed ref="notPassModalRef" @success="reloadList" />
|
|
|
|
|
<ConfrimModal ref="confrimModalRef" @commit="commit" :selectedTotal="selectIds.length"/>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -502,11 +492,9 @@ function refreshHandler(){
|
|
|
|
|
user-select: none;
|
|
|
|
|
border-top-left-radius: 10px;
|
|
|
|
|
border-top-right-radius: 10px;
|
|
|
|
|
|
|
|
|
|
/* Standard syntax */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.remove{
|
|
|
|
|
.remove {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -538,7 +526,7 @@ function refreshHandler(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img{
|
|
|
|
|
.img {
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -553,7 +541,7 @@ function refreshHandler(){
|
|
|
|
|
padding: 24px 0px 12px 0px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-m32{
|
|
|
|
|
&-m32 {
|
|
|
|
|
margin-left: 32px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -636,21 +624,23 @@ function refreshHandler(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wrapper-content-form-button{
|
|
|
|
|
.wrapper-content-form-button {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img-fit {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.img-full {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
::v-deep(img) {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.img-full {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
::v-deep(img) {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|