ow
This commit is contained in:
1 parent
ef688db767
commit
3759fcc14a
8 files changed
+338
-263
No files matched your search
@@ -101,15 +101,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
reactive,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
ref,
|
||||
unref,
|
||||
h,
|
||||
provide,
|
||||
} from "vue";
|
||||
import { reactive, onMounted, onUnmounted, ref, unref, h, provide } from "vue";
|
||||
import { BindOption } from "@/data/custom/bindOption";
|
||||
import { SelectOption } from "@/data/auto/selectOption";
|
||||
import { DmsFileUploadViewDisplayData } from "@/data/auto/dmsFileUploadViewDisplayData";
|
||||
@@ -245,9 +237,8 @@ const shareEnquiry = ref<ShareEnquiry | null>(null);
|
||||
|
||||
const sound = ref();
|
||||
|
||||
const toUploadView = (
|
||||
r: Record<string, any>,
|
||||
): DmsFileUploadViewDisplayData => r as DmsFileUploadViewDisplayData;
|
||||
const toUploadView = (r: Record<string, any>): DmsFileUploadViewDisplayData =>
|
||||
r as DmsFileUploadViewDisplayData;
|
||||
|
||||
onUnmounted(() => {
|
||||
sound.value?.stop();
|
||||
@@ -340,9 +331,7 @@ onMounted(async () => {
|
||||
|
||||
await initBindOption();
|
||||
|
||||
pathStack.value = [
|
||||
{ value: rootPath.value, displayName: "我的云盘" },
|
||||
];
|
||||
pathStack.value = [{ value: rootPath.value, displayName: "我的云盘" }];
|
||||
|
||||
onSearchByFilePath(rootPath.value);
|
||||
});
|
||||
@@ -421,11 +410,15 @@ const uploadChunk = async (
|
||||
}
|
||||
};
|
||||
|
||||
const CHUNK_SIZE = 1024 * 1024;
|
||||
const CHUNK_SIZE = 100 * 1024 * 1024;
|
||||
|
||||
const splitFile = (file: any) => {
|
||||
const chunks: Blob[] = [];
|
||||
if (!file || typeof file.size !== "number" || typeof file.slice !== "function") {
|
||||
if (
|
||||
!file ||
|
||||
typeof file.size !== "number" ||
|
||||
typeof file.slice !== "function"
|
||||
) {
|
||||
return chunks;
|
||||
}
|
||||
let start = 0;
|
||||
@@ -489,10 +482,7 @@ const onVideoPlay = async (fid: number) => {
|
||||
});
|
||||
};
|
||||
|
||||
const onPreviewFile = async (
|
||||
usernameOrRecord: any,
|
||||
orderKey?: string,
|
||||
) => {
|
||||
const onPreviewFile = async (usernameOrRecord: any, orderKey?: string) => {
|
||||
let username: string;
|
||||
let fname: string;
|
||||
if (typeof usernameOrRecord === "object") {
|
||||
@@ -506,10 +496,7 @@ const onPreviewFile = async (
|
||||
getPreviewFile(username, fname);
|
||||
};
|
||||
|
||||
const onPreviewOrgFile = async (
|
||||
usernameOrRecord: any,
|
||||
orderKey?: string,
|
||||
) => {
|
||||
const onPreviewOrgFile = async (usernameOrRecord: any, orderKey?: string) => {
|
||||
let fileId: number;
|
||||
let orgFileName: string;
|
||||
if (typeof usernameOrRecord === "object") {
|
||||
@@ -1128,11 +1115,20 @@ const onShareSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
const onPublishSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
if (items.length === 0) return;
|
||||
const first = items[0];
|
||||
if (fileTypePolicy.isImage(first.OrderKey) || fileTypePolicy.isImage(first.OrgFileName)) {
|
||||
if (
|
||||
fileTypePolicy.isImage(first.OrderKey) ||
|
||||
fileTypePolicy.isImage(first.OrgFileName)
|
||||
) {
|
||||
onPublishPhoto();
|
||||
} else if (fileTypePolicy.isVideo(first.OrderKey) || fileTypePolicy.isVideo(first.OrgFileName)) {
|
||||
} else if (
|
||||
fileTypePolicy.isVideo(first.OrderKey) ||
|
||||
fileTypePolicy.isVideo(first.OrgFileName)
|
||||
) {
|
||||
onPublishVideo();
|
||||
} else if (fileTypePolicy.isAudio(first.OrderKey) || fileTypePolicy.isAudio(first.OrgFileName)) {
|
||||
} else if (
|
||||
fileTypePolicy.isAudio(first.OrderKey) ||
|
||||
fileTypePolicy.isAudio(first.OrgFileName)
|
||||
) {
|
||||
onPublishAudio();
|
||||
}
|
||||
};
|
||||
@@ -1140,11 +1136,20 @@ const onPublishSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
const onViewPreviewSelected = (items: DmsFileUploadViewDisplayData[]) => {
|
||||
if (items.length === 0) return;
|
||||
const first = items[0];
|
||||
if (fileTypePolicy.isImage(first.OrderKey) || fileTypePolicy.isImage(first.OrgFileName)) {
|
||||
if (
|
||||
fileTypePolicy.isImage(first.OrderKey) ||
|
||||
fileTypePolicy.isImage(first.OrgFileName)
|
||||
) {
|
||||
onViewPreviewPhoto(first.FilePath);
|
||||
} else if (fileTypePolicy.isVideo(first.OrderKey) || fileTypePolicy.isVideo(first.OrgFileName)) {
|
||||
} else if (
|
||||
fileTypePolicy.isVideo(first.OrderKey) ||
|
||||
fileTypePolicy.isVideo(first.OrgFileName)
|
||||
) {
|
||||
onViewPreviewVideo(first.FilePath);
|
||||
} else if (fileTypePolicy.isAudio(first.OrderKey) || fileTypePolicy.isAudio(first.OrgFileName)) {
|
||||
} else if (
|
||||
fileTypePolicy.isAudio(first.OrderKey) ||
|
||||
fileTypePolicy.isAudio(first.OrgFileName)
|
||||
) {
|
||||
onViewPreviewAudio(first.FilePath);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,21 +84,13 @@ const columns = ref([
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "顶级目录",
|
||||
title: "共享路径",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: '80px',
|
||||
sequence: 2,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "目录",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.FOLDER_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: '80px',
|
||||
sequence: 3,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "目录描述",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.NOTICE,
|
||||
|
||||
@@ -1,59 +1,108 @@
|
||||
<template>
|
||||
<search @on-submit="onSubmit" @on-print="onPrint" @on-reset="onReset" @use-pagination="onPagination" :scrollx="400"
|
||||
:is-modal="isModal" :loading="loading" :pagination="result" :rowSelectionType="selectionType"
|
||||
@on-select-change="onSelectChange">
|
||||
<template #control>
|
||||
|
||||
</template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
|
||||
</template>
|
||||
<template #footer>
|
||||
<div v-if="!isModal" class="page-footer">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="24" :sm="24">
|
||||
<a-row v-if="!isEdit" :gutter="[16, 8]">
|
||||
<a-space>
|
||||
<a-popconfirm title="确定是否删除这些记录?" ok-text="是" cancel-text="否" @confirm="onDelete">
|
||||
<a-button type="primary" danger :icon="h(DeleteOutlined)" v-if="canDelete"
|
||||
:disabled="!(keys && keys.length > 0)">删除</a-button>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</a-row>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
</search>
|
||||
<search
|
||||
@on-submit="onSubmit"
|
||||
@on-print="onPrint"
|
||||
@on-reset="onReset"
|
||||
@use-pagination="onPagination"
|
||||
:scrollx="400"
|
||||
:is-modal="isModal"
|
||||
:loading="loading"
|
||||
:pagination="result"
|
||||
:rowSelectionType="selectionType"
|
||||
@on-select-change="onSelectChange"
|
||||
>
|
||||
<template #control> </template>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template
|
||||
v-if="
|
||||
column.dataIndex ===
|
||||
FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME
|
||||
"
|
||||
>
|
||||
<FolderOutlined /> {{ record.TopFolderLocalName +(record.TopFolderLocalName!=record.FolderLocalName?(' > '+record.FolderLocalName):'') }}
|
||||
</template>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div v-if="!isModal" class="page-footer">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="24" :sm="24">
|
||||
<a-row v-if="!isEdit" :gutter="[16, 8]">
|
||||
<a-space>
|
||||
<a-popconfirm
|
||||
title="确定是否删除这些记录?"
|
||||
ok-text="是"
|
||||
cancel-text="否"
|
||||
@confirm="onDelete"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
danger
|
||||
:icon="h(DeleteOutlined)"
|
||||
v-if="canDelete"
|
||||
:disabled="!(keys && keys.length > 0)"
|
||||
>删除</a-button
|
||||
>
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</a-row>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
</search>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive, inject, defineComponent, onMounted, ref, unref, provide, h } from "vue";
|
||||
import {
|
||||
reactive,
|
||||
inject,
|
||||
defineComponent,
|
||||
onMounted,
|
||||
ref,
|
||||
unref,
|
||||
provide,
|
||||
h,
|
||||
} from "vue";
|
||||
import { BindOption } from "@/data/custom/bindOption";
|
||||
import { SelectOption } from "@/data/auto/selectOption";
|
||||
import search from "@/components/basic/Search.vue";
|
||||
import { DeleteOutlined, EditOutlined, FileAddOutlined, FileTextOutlined } from "@ant-design/icons-vue";
|
||||
import {
|
||||
DeleteOutlined,
|
||||
FolderOutlined,
|
||||
EditOutlined,
|
||||
FileAddOutlined,
|
||||
FileTextOutlined,
|
||||
} from "@ant-design/icons-vue";
|
||||
|
||||
import { FamilyGroupResultData } from "@/data/auto/familyGroupResultData";
|
||||
import { FamilyFolderFavoriteViewEntity } from "@/data/auto/familyFolderFavoriteViewEntity";
|
||||
import { FamilyFolderFavoriteEntity } from "@/data/auto/familyFolderFavoriteEntity";
|
||||
import { FamilyGroupFolderEntity } from "@/data/auto/familyGroupFolderEntity";
|
||||
import { SearchFilter } from "@/data/auto/searchFilter"
|
||||
import { SearchFilter } from "@/data/auto/searchFilter";
|
||||
import dmsFileService from "@/service/master/dmsFileService";
|
||||
import familyGroupService from "@/service/master/familyGroupService";
|
||||
import { FamilyGroupManagerUserSearchCriteria } from "@/data/auto/familyGroupManagerUserSearchCriteria";
|
||||
|
||||
import { SearchCriteriaResultData } from "@/data/auto/searchCriteriaResultData";
|
||||
import { PermissionContext, usePermissionContext } from "@/hooks/PermissionContext"
|
||||
import {
|
||||
PermissionContext,
|
||||
usePermissionContext,
|
||||
} from "@/hooks/PermissionContext";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
import { useBindOption } from "@/hooks/useBindOption";
|
||||
import { SearchFilterOperatorPolicy } from "@/data/custom/searchFilterOperatorPolicy"
|
||||
import { SearchFilterTypePolicy } from "@/data/custom/searchFilterTypePolicy"
|
||||
import { SearchFilterOperatorPolicy } from "@/data/custom/searchFilterOperatorPolicy";
|
||||
import { SearchFilterTypePolicy } from "@/data/custom/searchFilterTypePolicy";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { GridColumnInfo } from "@/data/auto/gridColumnInfo"
|
||||
import { useGridColumnInfo } from "@/hooks/gridColumnInfo"
|
||||
import { GridColumnInfo } from "@/data/auto/gridColumnInfo";
|
||||
import { useGridColumnInfo } from "@/hooks/gridColumnInfo";
|
||||
import { title } from "process";
|
||||
import { enquiryMethodKey, searchCriteriaManagerKey, masterOperationToEnquiryMethodKey, MasterOperationToEnquiryModelOption, layoutProviderMethodKey } from "@/injections";
|
||||
import {
|
||||
enquiryMethodKey,
|
||||
searchCriteriaManagerKey,
|
||||
masterOperationToEnquiryMethodKey,
|
||||
MasterOperationToEnquiryModelOption,
|
||||
layoutProviderMethodKey,
|
||||
} from "@/injections";
|
||||
import { useOrderedChildren } from "@/hooks/use-ordered-children";
|
||||
import { SearchCriteriaContext } from "@/injections";
|
||||
//page from-----------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -66,7 +115,7 @@ const isModal = ref(inject("isModalShare", false) as boolean);
|
||||
//初始化查询条件的值
|
||||
const initBindOptions = ref(inject("initBindOptionsShare", []) as BindOption[]);
|
||||
//记录单选还是多选
|
||||
const selectionType = ref(inject("selectionTypeShare", 'checkbox') as string);
|
||||
const selectionType = ref(inject("selectionTypeShare", "checkbox") as string);
|
||||
|
||||
//================inject================
|
||||
|
||||
@@ -80,58 +129,48 @@ const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
width: '3%',
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
sequence: 0,
|
||||
hidden: 'N',
|
||||
format: ''
|
||||
},
|
||||
{
|
||||
title: "群组",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.FAMILY_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: '10%',
|
||||
sequence: 1,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "顶级目录",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: '10%',
|
||||
sequence: 2,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "目录",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.FOLDER_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: '10%',
|
||||
sequence: 3,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "目录描述",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.NOTICE,
|
||||
sorter: false,
|
||||
width: '30%',
|
||||
sequence: 4,
|
||||
hidden: 'N'
|
||||
},
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "index",
|
||||
width: "3%",
|
||||
align: "center",
|
||||
fixed: "left",
|
||||
sequence: 0,
|
||||
hidden: "N",
|
||||
format: "",
|
||||
},
|
||||
{
|
||||
title: "群组",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.FAMILY_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: "10%",
|
||||
sequence: 1,
|
||||
hidden: "N",
|
||||
},
|
||||
{
|
||||
title: "共享路径",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.TOP_FOLDER_LOCAL_NAME,
|
||||
sorter: false,
|
||||
width: "10%",
|
||||
sequence: 2,
|
||||
hidden: "N",
|
||||
},
|
||||
{
|
||||
title: "目录描述",
|
||||
dataIndex: FamilyFolderFavoriteViewEntity.NOTICE,
|
||||
sorter: false,
|
||||
width: "30%",
|
||||
sequence: 4,
|
||||
hidden: "N",
|
||||
},
|
||||
]);
|
||||
|
||||
const viewOption = {
|
||||
Value: 'default',
|
||||
SelectOptions: [{ BindValue: 'default', DisplayName: "默认" }],
|
||||
Columns: [{ BindValue: 'default', BindColumn: columns }]
|
||||
Value: "default",
|
||||
SelectOptions: [{ BindValue: "default", DisplayName: "默认" }],
|
||||
Columns: [{ BindValue: "default", BindColumn: columns }],
|
||||
};
|
||||
|
||||
|
||||
|
||||
const bindOptions = ref<BindOption[]>([]);
|
||||
const datas = ref<FamilyFolderFavoriteViewEntity[]>([]);
|
||||
const pagingParams = ref<PagingParams>({ pageSize: 20, page: 1 });
|
||||
@@ -140,177 +179,213 @@ const result = ref<SearchCriteriaResultData>(new SearchCriteriaResultData());
|
||||
const data = ref<FamilyGroupResultData>(new FamilyGroupResultData());
|
||||
const currentFilter = ref<SearchFilter[]>([]);
|
||||
const isSearched = ref<boolean>(false);
|
||||
const currentSearchCriteria = ref<FamilyGroupManagerUserSearchCriteria>(new FamilyGroupManagerUserSearchCriteria());
|
||||
const currentSearchCriteria = ref<FamilyGroupManagerUserSearchCriteria>(
|
||||
new FamilyGroupManagerUserSearchCriteria(),
|
||||
);
|
||||
|
||||
const keys = ref<FamilyFolderFavoriteViewEntity[]>([]);
|
||||
|
||||
const {
|
||||
children: items,
|
||||
addChild: addItem,
|
||||
removeChild: removeItem,
|
||||
children: items,
|
||||
addChild: addItem,
|
||||
removeChild: removeItem,
|
||||
} = useOrderedChildren<SearchCriteriaContext>();
|
||||
//================provide================
|
||||
//初始化查询条件UI(search)
|
||||
provide(enquiryMethodKey, {
|
||||
getLayoutSetting: () => { return { controlLeft: 16, controlRight: 8, space: true, soltLeft: 24, soltRight: 24 }; },
|
||||
getBindOptions: () => { return unref(bindOptions); },
|
||||
getViewOption: () => { return unref(viewOption); },
|
||||
getDatas: () => { return datas; },
|
||||
getLayoutSetting: () => {
|
||||
return {
|
||||
controlLeft: 16,
|
||||
controlRight: 8,
|
||||
space: true,
|
||||
soltLeft: 24,
|
||||
soltRight: 24,
|
||||
};
|
||||
},
|
||||
getBindOptions: () => {
|
||||
return unref(bindOptions);
|
||||
},
|
||||
getViewOption: () => {
|
||||
return unref(viewOption);
|
||||
},
|
||||
getDatas: () => {
|
||||
return datas;
|
||||
},
|
||||
});
|
||||
|
||||
provide(
|
||||
searchCriteriaManagerKey,
|
||||
reactive({
|
||||
items,
|
||||
addItem,
|
||||
removeItem,
|
||||
})
|
||||
searchCriteriaManagerKey,
|
||||
reactive({
|
||||
items,
|
||||
addItem,
|
||||
removeItem,
|
||||
}),
|
||||
);
|
||||
|
||||
//================provide================
|
||||
|
||||
defineExpose({
|
||||
keys,
|
||||
initBindOptions,
|
||||
})
|
||||
keys,
|
||||
initBindOptions,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
let pContext: PermissionContext = usePermissionContext();
|
||||
canView.value = pContext.canView(route.meta.permission as string);
|
||||
canAmend.value = pContext.canAmend(route.meta.permission as string);
|
||||
canDelete.value = pContext.canDelete(route.meta.permission as string);
|
||||
canCreate.value = pContext.canCreate(route.meta.permission as string);
|
||||
initBindOption();
|
||||
onSubmit(items.value[0].getFilter());
|
||||
})
|
||||
let pContext: PermissionContext = usePermissionContext();
|
||||
canView.value = pContext.canView(route.meta.permission as string);
|
||||
canAmend.value = pContext.canAmend(route.meta.permission as string);
|
||||
canDelete.value = pContext.canDelete(route.meta.permission as string);
|
||||
canCreate.value = pContext.canCreate(route.meta.permission as string);
|
||||
initBindOption();
|
||||
onSubmit(items.value[0].getFilter());
|
||||
});
|
||||
|
||||
const onSelectChange = ((selected: FamilyFolderFavoriteViewEntity[]) => {
|
||||
keys.value = selected;
|
||||
})
|
||||
const onSelectChange = (selected: FamilyFolderFavoriteViewEntity[]) => {
|
||||
keys.value = selected;
|
||||
};
|
||||
|
||||
const onDelete = (async () => {
|
||||
let fgfs: FamilyFolderFavoriteEntity[] = [];
|
||||
let fgf: FamilyFolderFavoriteEntity;
|
||||
keys.value.forEach(element => {
|
||||
fgf = new FamilyFolderFavoriteEntity();
|
||||
fgf.UserName = element.UserName;
|
||||
fgf.FolderName = element.FolderName;
|
||||
fgfs.push(fgf);
|
||||
const onDelete = async () => {
|
||||
let fgfs: FamilyFolderFavoriteEntity[] = [];
|
||||
let fgf: FamilyFolderFavoriteEntity;
|
||||
keys.value.forEach((element) => {
|
||||
fgf = new FamilyFolderFavoriteEntity();
|
||||
fgf.UserName = element.UserName;
|
||||
fgf.FolderName = element.FolderName;
|
||||
fgfs.push(fgf);
|
||||
});
|
||||
|
||||
await familyGroupService.DeleteFamilyFolderFavorites(fgfs).then(() => {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录删除成功",
|
||||
placement: "topRight",
|
||||
});
|
||||
onReload();
|
||||
});
|
||||
};
|
||||
|
||||
await familyGroupService.DeleteFamilyFolderFavorites(fgfs).then(() => {
|
||||
notification.info({
|
||||
message: '系统提示:',
|
||||
description: '记录删除成功',
|
||||
placement: "topRight",
|
||||
});
|
||||
onReload();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
const onReset = (() => {
|
||||
keys.value = [];
|
||||
result.value.Total = 0;
|
||||
})
|
||||
|
||||
|
||||
const setBindOptionValue = ((bindValue: string, value: string, value1: string, values: string[], disabled: boolean) => {
|
||||
let bindOption: BindOption = bindOptions.value.filter(x => x.BindValue == bindValue)[0];
|
||||
if (!bindOption) return;
|
||||
bindOption.Value = value;
|
||||
bindOption.Value1 = value1;
|
||||
bindOption.Values = values;
|
||||
bindOption.disabled = disabled;
|
||||
})
|
||||
|
||||
const onReset = () => {
|
||||
keys.value = [];
|
||||
result.value.Total = 0;
|
||||
};
|
||||
|
||||
const setBindOptionValue = (
|
||||
bindValue: string,
|
||||
value: string,
|
||||
value1: string,
|
||||
values: string[],
|
||||
disabled: boolean,
|
||||
) => {
|
||||
let bindOption: BindOption = bindOptions.value.filter(
|
||||
(x) => x.BindValue == bindValue,
|
||||
)[0];
|
||||
if (!bindOption) return;
|
||||
bindOption.Value = value;
|
||||
bindOption.Value1 = value1;
|
||||
bindOption.Values = values;
|
||||
bindOption.disabled = disabled;
|
||||
};
|
||||
|
||||
//初始化查询条件
|
||||
const initBindOption = (async () => {
|
||||
let ubo = useBindOption();
|
||||
let bindOption: BindOption = ubo.getBindOption(FamilyFolderFavoriteViewEntity.DB_FAMILY_LOCAL_NAME, '群组名称', SearchFilterTypePolicy.TEXT, SearchFilterOperatorPolicy.CN_CONTAIN);
|
||||
bindOptions.value.push(bindOption);
|
||||
const initBindOption = async () => {
|
||||
let ubo = useBindOption();
|
||||
let bindOption: BindOption = ubo.getBindOption(
|
||||
FamilyFolderFavoriteViewEntity.DB_FAMILY_LOCAL_NAME,
|
||||
"群组名称",
|
||||
SearchFilterTypePolicy.TEXT,
|
||||
SearchFilterOperatorPolicy.CN_CONTAIN,
|
||||
);
|
||||
bindOptions.value.push(bindOption);
|
||||
|
||||
bindOption = ubo.getBindOption(FamilyFolderFavoriteViewEntity.DB_FOLDER_LOCAL_NAME, '目录名称', SearchFilterTypePolicy.TEXT, SearchFilterOperatorPolicy.CN_CONTAIN);
|
||||
bindOption.lg = 10;
|
||||
bindOptions.value.push(bindOption);
|
||||
bindOption = ubo.getBindOption(
|
||||
FamilyFolderFavoriteViewEntity.DB_FOLDER_LOCAL_NAME,
|
||||
"目录名称",
|
||||
SearchFilterTypePolicy.TEXT,
|
||||
SearchFilterOperatorPolicy.CN_CONTAIN,
|
||||
);
|
||||
bindOption.lg = 10;
|
||||
bindOptions.value.push(bindOption);
|
||||
|
||||
initBindOptions.value.forEach(element => {
|
||||
setBindOptionValue(element.BindValue, element.Value, element.Value1, element.Values, element.disabled);
|
||||
});
|
||||
})
|
||||
initBindOptions.value.forEach((element) => {
|
||||
setBindOptionValue(
|
||||
element.BindValue,
|
||||
element.Value,
|
||||
element.Value1,
|
||||
element.Values,
|
||||
element.disabled,
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
//table from-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
result.value.Page = pagingParams.value.page ?? 1;
|
||||
result.value.Limit = pagingParams.value.pageSize;
|
||||
|
||||
const onSubmit = (async (filters: SearchFilter[]) => {
|
||||
const onSubmit = async (filters: SearchFilter[]) => {
|
||||
let c: FamilyGroupManagerUserSearchCriteria =
|
||||
new FamilyGroupManagerUserSearchCriteria();
|
||||
currentFilter.value = filters;
|
||||
isSearched.value = true;
|
||||
c.Filter = filters;
|
||||
c.limit = pagingParams.value.pageSize;
|
||||
c.page = pagingParams.value.page ?? 1;
|
||||
c.GridColumns = [];
|
||||
currentSearchCriteria.value = c;
|
||||
await findBySearchCriteria(c);
|
||||
};
|
||||
|
||||
let c: FamilyGroupManagerUserSearchCriteria = new FamilyGroupManagerUserSearchCriteria();
|
||||
currentFilter.value = filters;
|
||||
isSearched.value = true;
|
||||
c.Filter = filters;
|
||||
c.limit = pagingParams.value.pageSize;
|
||||
c.page = pagingParams.value.page ?? 1;
|
||||
c.GridColumns = [];
|
||||
currentSearchCriteria.value = c;
|
||||
await findBySearchCriteria(c);
|
||||
})
|
||||
const onPrint = async () => {
|
||||
let c: FamilyGroupManagerUserSearchCriteria =
|
||||
new FamilyGroupManagerUserSearchCriteria();
|
||||
if (currentFilter.value.length > 0) c.Filter = currentFilter.value;
|
||||
else c.Filter = [];
|
||||
|
||||
const onPrint = (async () => {
|
||||
let c: FamilyGroupManagerUserSearchCriteria = new FamilyGroupManagerUserSearchCriteria();
|
||||
if (currentFilter.value.length > 0)
|
||||
c.Filter = currentFilter.value;
|
||||
else c.Filter = [];
|
||||
c.limit = pagingParams.value.pageSize;
|
||||
c.page = pagingParams.value.page ?? 1;
|
||||
c.GridColumns = useGridColumnInfo().getGridColumnInfo(unref(columns));
|
||||
c.ReportName = layoutProviderMethod?.getLayoutProvider().layoutTitle!;
|
||||
try {
|
||||
let sss = await familyGroupService.FamilyFolderFavoriteBySearchCriteria(c);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
c.limit = pagingParams.value.pageSize;
|
||||
c.page = pagingParams.value.page ?? 1;
|
||||
c.GridColumns = useGridColumnInfo().getGridColumnInfo(unref(columns));
|
||||
c.ReportName = layoutProviderMethod?.getLayoutProvider().layoutTitle!;
|
||||
try {
|
||||
let sss = await familyGroupService.FamilyFolderFavoriteBySearchCriteria(c);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
const findBySearchCriteria = async (
|
||||
c: FamilyGroupManagerUserSearchCriteria,
|
||||
) => {
|
||||
try {
|
||||
data.value =
|
||||
await familyGroupService.FamilyFolderFavoriteBySearchCriteria(c);
|
||||
result.value.Total = data.value.Total;
|
||||
result.value.Page = data.value.Page;
|
||||
result.value.Limit = data.value.Limit;
|
||||
datas.value = data.value.Favorites;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
})
|
||||
const onPagination = async (params: PagingParams) => {
|
||||
if (!isSearched.value) return;
|
||||
let c: FamilyGroupManagerUserSearchCriteria =
|
||||
new FamilyGroupManagerUserSearchCriteria();
|
||||
|
||||
const findBySearchCriteria = (async (c: FamilyGroupManagerUserSearchCriteria) => {
|
||||
try {
|
||||
data.value = await familyGroupService.FamilyFolderFavoriteBySearchCriteria(c);
|
||||
result.value.Total = data.value.Total;
|
||||
result.value.Page = data.value.Page;
|
||||
result.value.Limit = data.value.Limit;
|
||||
datas.value = data.value.Favorites;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
if (currentFilter.value.length > 0) c.Filter = currentFilter.value;
|
||||
else c.Filter = [];
|
||||
|
||||
const onPagination = (async (params: PagingParams) => {
|
||||
c.limit = params.pageSize;
|
||||
c.page = params.page ?? 1;
|
||||
if (params.sortField) c.orderby = params.sortField!;
|
||||
if (params.sortOrder)
|
||||
c.orderbytag = params.sortOrder?.toString().substring(0, 4)!;
|
||||
c.GridColumns = [];
|
||||
currentSearchCriteria.value = c;
|
||||
await findBySearchCriteria(c);
|
||||
};
|
||||
|
||||
if (!isSearched.value) return;
|
||||
let c: FamilyGroupManagerUserSearchCriteria = new FamilyGroupManagerUserSearchCriteria();
|
||||
|
||||
if (currentFilter.value.length > 0)
|
||||
c.Filter = currentFilter.value;
|
||||
else c.Filter = [];
|
||||
|
||||
c.limit = params.pageSize;
|
||||
c.page = params.page ?? 1;
|
||||
if (params.sortField)
|
||||
c.orderby = params.sortField!;
|
||||
if (params.sortOrder)
|
||||
c.orderbytag = params.sortOrder?.toString().substring(0, 4)!;
|
||||
c.GridColumns = [];
|
||||
currentSearchCriteria.value = c;
|
||||
await findBySearchCriteria(c);
|
||||
});
|
||||
|
||||
const onReload = (async () => {
|
||||
await findBySearchCriteria(unref(currentSearchCriteria));
|
||||
})
|
||||
const onReload = async () => {
|
||||
await findBySearchCriteria(unref(currentSearchCriteria));
|
||||
};
|
||||
//table end-----------------------------------------------------------------------------------------------------------------------------------
|
||||
</script>
|
||||
@@ -19,7 +19,7 @@
|
||||
v-if="canCreate && !isModal"
|
||||
:icon="h(FolderAddOutlined)"
|
||||
@click.prevent="onCreate"
|
||||
>新增文件夹</a-button
|
||||
>新增</a-button
|
||||
>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in new issue
Block a user