Commit 3e260d4a authored by liwei's avatar liwei

通用文件操作完善

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