Commit 3e260d4a authored by liwei's avatar liwei

通用文件操作完善

parent 6f444502
...@@ -98,7 +98,7 @@ export const accountFormSchema: any[] = [ ...@@ -98,7 +98,7 @@ export const accountFormSchema: any[] = [
/**移动*/ /**移动*/
export const MoveFormSchema: any[] = [ export const MoveFormSchema: any[] = [
{ {
field: 'institutionId', field: 'taskId',
label: '路径', label: '路径',
component: 'TreeSelect', component: 'TreeSelect',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
...@@ -132,7 +132,7 @@ export const resetNameFormSchema: FormSchema[] = [ ...@@ -132,7 +132,7 @@ export const resetNameFormSchema: FormSchema[] = [
]; ];
export const createFileFormSchema: FormSchema[] = [ export const createFileFormSchema: FormSchema[] = [
{ {
field: 'institutionId', field: 'taskId',
label: '路径', label: '路径',
component: 'TreeSelect', component: 'TreeSelect',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
...@@ -163,7 +163,7 @@ export const createFileFormSchema: FormSchema[] = [ ...@@ -163,7 +163,7 @@ export const createFileFormSchema: FormSchema[] = [
]; ];
export const createTaskFormSchema: FormSchema[] = [ export const createTaskFormSchema: FormSchema[] = [
{ {
field: 'institutionId', field: 'taskId',
label: '路径', label: '路径',
component: 'TreeSelect', component: 'TreeSelect',
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
......
...@@ -64,7 +64,7 @@ export const TreeData: any[] = [ ...@@ -64,7 +64,7 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-24 10:04:04",
...@@ -81,7 +81,7 @@ export const TreeData: any[] = [ ...@@ -81,7 +81,7 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-24 10:04:04",
...@@ -98,7 +98,7 @@ export const TreeData: any[] = [ ...@@ -98,7 +98,7 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/个人体验",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-24 10:04:04",
...@@ -115,10 +115,10 @@ export const TreeData: any[] = [ ...@@ -115,10 +115,10 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例/总-智慧财务总体流程",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-22 8:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-22 8:04:04",
}, },
{ {
"delFlag" : "0", "delFlag" : "0",
...@@ -132,10 +132,10 @@ export const TreeData: any[] = [ ...@@ -132,10 +132,10 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例/分-落地区",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-21 9:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-21 9:04:04",
}, },
{ {
"delFlag" : "0", "delFlag" : "0",
...@@ -149,10 +149,10 @@ export const TreeData: any[] = [ ...@@ -149,10 +149,10 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例/分-改良区",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-23 12:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-23 12:04:04",
}, },
{ {
"delFlag" : "0", "delFlag" : "0",
...@@ -166,10 +166,10 @@ export const TreeData: any[] = [ ...@@ -166,10 +166,10 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例/分-个人体验1",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-24 13:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-24 13:04:04",
}, },
{ {
"delFlag" : "0", "delFlag" : "0",
...@@ -183,10 +183,10 @@ export const TreeData: any[] = [ ...@@ -183,10 +183,10 @@ export const TreeData: any[] = [
// "children" : [ ], // "children" : [ ],
"selectType" : null, "selectType" : null,
"fileSize": '1024KB', "fileSize": '1024KB',
"location":"位置1", "location":"/任务流/典型案例/分-个人体验2",
"holder":"admin", "holder":"admin",
"createDate": "2024-10-24 10:04:04", "createDate": "2024-10-24 14:04:04",
"updateDate": "2024-10-24 10:04:04", "updateDate": "2024-10-25 14:04:04",
}, },
]; ];
export const DetailTreeData: any[] = [ export const DetailTreeData: any[] = [
......
...@@ -35,12 +35,17 @@ ...@@ -35,12 +35,17 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields(); resetFields();
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate; const formData = {
isMove.value = !!data?.isMove; taskId: '100'
}
// 塞值
setFieldsValue({
...formData,
});
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined) const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([ updateSchema([
{ {
field: 'institutionId', field: 'taskId',
componentProps: { componentProps: {
treeData: treeList treeData: treeList
}, },
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
]); ]);
}); });
const getTitle = computed(() => ('重命名')); const getTitle = computed(() => ('新建文件流'));
/**确定按钮*/ /**确定按钮*/
......
...@@ -35,12 +35,17 @@ ...@@ -35,12 +35,17 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields(); resetFields();
setModalProps({ confirmLoading: false }); setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate; const formData = {
isMove.value = !!data?.isMove; taskId: '100'
}
// 塞值
setFieldsValue({
...formData,
});
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined) const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([ updateSchema([
{ {
field: 'institutionId', field: 'taskId',
componentProps: { componentProps: {
treeData: treeList treeData: treeList
}, },
...@@ -48,7 +53,7 @@ ...@@ -48,7 +53,7 @@
]); ]);
}); });
const getTitle = computed(() => ('重命名')); const getTitle = computed(() => ('新建任务流'));
/**数组对象转成树*/ /**数组对象转成树*/
function handleTree(data, id, parentId, children, rootId) { function handleTree(data, id, parentId, children, rootId) {
......
...@@ -99,7 +99,11 @@ ...@@ -99,7 +99,11 @@
api: async (params) => { api: async (params) => {
//过滤掉tableData.value中,businessId等于100的 //过滤掉tableData.value中,businessId等于100的
var data = []; var data = [];
if (params.taskId === undefined){
data = tableData.value.filter((item) => item.businessId >= 200); data = tableData.value.filter((item) => item.businessId >= 200);
}else {
data = tableData.value.filter((item) => item.parentId == params.taskId);
}
const response = { const response = {
pageNu: "1", pageNu: "1",
pageSize: "10", pageSize: "10",
...@@ -120,7 +124,7 @@ ...@@ -120,7 +124,7 @@
schemas: searchFormSchema, schemas: searchFormSchema,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
resetFunc: () => { resetFunc: () => {
searchInfo.institutionId='' searchInfo.taskId=''
}, },
}, },
useSearchForm: true, useSearchForm: true,
...@@ -201,8 +205,8 @@ ...@@ -201,8 +205,8 @@
} }
/** 部门树的select*/ /** 部门树的select*/
function handleSelect(institutionId = '') { function handleSelect(taskId = '') {
searchInfo.institutionId = institutionId; searchInfo.taskId = taskId;
reload(); reload();
} }
......
...@@ -44,7 +44,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data ...@@ -44,7 +44,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
rowData.value.push(data.record) rowData.value.push(data.record)
//单个移动 //单个移动
rowId.value = data.record.businessId; rowId.value = data.record.businessId;
data.record.institutionId = data.record.parentId data.record.taskId = data.record.businessId
setFieldsValue({ setFieldsValue({
...data.record, ...data.record,
}); });
...@@ -52,7 +52,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data ...@@ -52,7 +52,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined) const treeList = handleTree(TreeData, 'businessId',undefined,undefined,undefined)
updateSchema([ updateSchema([
{ {
field: 'institutionId', field: 'taskId',
componentProps: { componentProps: {
treeData: treeList treeData: treeList
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment