From 540b20fa4883b453f990d54617fda621548d18e3 Mon Sep 17 00:00:00 2001 From: han2015 <1019850453@qq.com> Date: Wed, 4 Jun 2025 10:10:55 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/doc/index.ts | 18 ++-- src/api/doc/type.ts | 2 + src/api/hr/people/share_ctrol.ts | 87 ++++++++++++++++++ src/views/doc/manage.vue | 60 +++++++++--- src/views/doc/share.vue | 35 +++++-- src/views/doc/sharePermission.vue | 146 ++++++++++++++++++++++++++++++ 6 files changed, 318 insertions(+), 30 deletions(-) create mode 100644 src/api/hr/people/share_ctrol.ts create mode 100644 src/views/doc/sharePermission.vue diff --git a/src/api/doc/index.ts b/src/api/doc/index.ts index d144cda..86ca4bb 100644 --- a/src/api/doc/index.ts +++ b/src/api/doc/index.ts @@ -17,7 +17,7 @@ export function getShareList( uid:string,data?: matterPage): AxiosPromise + +/** + * 获取行政组织树 + */ + export function getOrgTreeList(data: {orgid?:number}): AxiosPromise{ + return request({ + url: '/hrapi/org/govnewthreeing', + method: 'post', + data: data + }); +} + +/** + * 获取人员档案 + */ + export function getArchivesListPage(data?: parsArchList): AxiosPromise { + return request({ + url: '/hrapi/staff/archiveslistcont', + method: 'post', + data: data + }); +} + +/** + * 获取文档成员权限列表 + */ +export function getPermitedList(uid:string,data:{uuid:string}): AxiosPromise { + return request({ + url: '/hxpan/api/share/permits', + method: 'post', + headers: { + 'Identifier':uid, + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: data + }); +} + +/** + * 保存文档成员权限修改 + */ +export function postPermitedList(uid:string,data?:{permitList:string, update:string,uid:string,uuid:string,len:number}){ + return request({ + url: '/hxpan/api/share/permits', + method: 'post', + headers: { + 'Identifier':uid, + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: data + }); +} diff --git a/src/views/doc/manage.vue b/src/views/doc/manage.vue index 239f3db..8cf8c02 100644 --- a/src/views/doc/manage.vue +++ b/src/views/doc/manage.vue @@ -5,6 +5,7 @@ --> + + \ No newline at end of file From 20d80863472b0f2303e85838590a32a0d3130213 Mon Sep 17 00:00:00 2001 From: han2015 <1019850453@qq.com> Date: Thu, 5 Jun 2025 14:38:20 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=88=90=E5=91=98=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/doc/type.ts | 5 ++-- src/api/hr/people/share_ctrol.ts | 5 ++-- src/views/doc/manage.vue | 21 ++++++++-------- src/views/doc/share.vue | 41 +++++++++++++++++++++++++------ src/views/doc/sharePermission.vue | 34 ++++++++++++++++--------- 5 files changed, 72 insertions(+), 34 deletions(-) diff --git a/src/api/doc/type.ts b/src/api/doc/type.ts index 28499e7..7472d70 100644 --- a/src/api/doc/type.ts +++ b/src/api/doc/type.ts @@ -49,8 +49,9 @@ export interface createShare{ matterUuids:string; expireInfinity:boolean; expireTime:string; - permitList:string - len:number + permitList:string; + permitInfos:string; + len:number; } export interface respCreateShare{ diff --git a/src/api/hr/people/share_ctrol.ts b/src/api/hr/people/share_ctrol.ts index 1b5b4c3..c9dae72 100644 --- a/src/api/hr/people/share_ctrol.ts +++ b/src/api/hr/people/share_ctrol.ts @@ -30,6 +30,7 @@ export interface memberInfo{ state:number, keystr:string, positionname :string, + maindeparmentname:string } export type shareArchivesList = PageResult @@ -59,7 +60,7 @@ export type shareArchivesList = PageResult /** * 获取文档成员权限列表 */ -export function getPermitedList(uid:string,data:{uuid:string}): AxiosPromise { +export function getPermitedList(uid:string,data:{uuid:string}): AxiosPromise<{permited:string[],infos:string[]}> { return request({ url: '/hxpan/api/share/permits', method: 'post', @@ -74,7 +75,7 @@ export function getPermitedList(uid:string,data:{uuid:string}): AxiosPromise([]) const searchname=ref("") -const newdir=ref("") -const currentHoverRow=ref("") -const selectedValue = ref("sixhour") -const tabSelected=ref([]) +const newdir=ref("") //创建新目录时的目录名 +const currentHoverRow=ref("") //table 行的按钮控制 +const selectedValue = ref("sixhour") //分享弹窗的世间变量 +const tabSelected=ref([]) //table组件多选数据维护 //to support tree mode refactor const treeData=ref([{name:'root',uuid:'root',children:[]}]) const treeRef = ref(); @@ -69,6 +69,7 @@ const fileList=ref([])//upload files function onShareMatter(row?:matterInfo){ const showSharePermission=ref(false) let permited ="" + let infos="" let _len=0 ElMessageBox({ title: row?.name+' 请选择分享有效时间', @@ -103,13 +104,11 @@ function onShareMatter(row?:matterInfo){ uid: uid, uuid: row?.uuid ?? "", modelValue: showSharePermission.value, - // "onUpdate:modelValue": (val: boolean) => { - // showSharePermission.value = val - // }, - confirmFunc: (_list: string[]) => { + confirmFunc: (_list: string[],_infos:string[]) => { // 组织权限数据 _len=_list.length permited = btoa(_list.join("|")) + infos=_infos.join("|"), showSharePermission.value = false }, closeFunc: () => { @@ -122,9 +121,11 @@ function onShareMatter(row?:matterInfo){ }).then(() => { let param; if (row){ - param={matterUuids:row.uuid,expireInfinity:false,expireTime:"",permitList:permited,len:_len} + param={matterUuids:row.uuid,expireInfinity:false,expireTime:"", + permitList:permited,len:_len,permitInfos:infos} }else if (tabSelected.value.length>1){ - param={matterUuids:tabSelected.value.map((item:matterInfo)=>item.uuid).join(","),expireInfinity:false,expireTime:"",permitList:permited,len:_len} + param={matterUuids:tabSelected.value.map((item:matterInfo)=>item.uuid).join(","),expireInfinity:false,expireTime:"", + permitList:permited,len:_len,permitInfos:infos} } if(param){ diff --git a/src/views/doc/share.vue b/src/views/doc/share.vue index 318bfad..c9b30ab 100644 --- a/src/views/doc/share.vue +++ b/src/views/doc/share.vue @@ -17,8 +17,8 @@ import { Share, Avatar, } from '@element-plus/icons-vue' -import {ElDialog, ElText } from "element-plus"; -import { getExpirTime, getFileIcon,checkExpirTime } from "./tools" +import {ElText } from "element-plus"; +import {getFileIcon,checkExpirTime } from "./tools" import sharePermission from './sharePermission.vue'; const route = useRoute() @@ -26,13 +26,14 @@ const userStore = useUserStore(); const uid=btoa("p0"+userStore.userInfoCont.userId); const siteHost=document.location.origin; const apiURL=import.meta.env.VITE_APP_BASE_API+"/hxpan/api" -const matterList = ref() +const matterList = ref() //文件列表 const browerMode=ref(false) //share模式 1)self-list(default) 2)brower -const currentHoverRow=ref("") - +const currentHoverRow=ref("") //当前选择的table行 +const drawerModel=ref(false) //右侧隐藏抽屉组件的状态控制 +const permitListRef=ref("") //右侧抽屉组件中文档成员列表的key数组字符串 import type { VNode } from 'vue' -const dynamicVNode = ref(null) +const dynamicVNode = ref(null) //permission 组件的父组件 @@ -86,8 +87,13 @@ function onShareMember(row:matterInfo){ dynamicVNode.value=h(sharePermission,{ uid:uid, uuid:row.uuid, - closeFunc:()=>{ + closeFunc:(refresh?:boolean)=>{ dynamicVNode.value=null + if (refresh) { + permitListRef.value="" + drawerModel.value=false + onLoadShareList() + } } }) } @@ -150,7 +156,7 @@ onMounted(() => {