herenshan112 2 days ago
parent
commit
48074083f8
  1. 20
      src/api/doc/index.ts
  2. 51
      src/components/DesignForm/formControlPropertiNew.vue
  3. 18
      src/components/DesignForm/public/form/form.vue
  4. 2
      src/views/doc/logpanel.vue
  5. 64
      src/views/doc/manage.vue
  6. 2
      src/views/doc/share.vue
  7. 24
      src/views/doc/space.vue

20
src/api/doc/index.ts

@ -136,7 +136,7 @@ export function postCreateDir(uid:string,data?: createDir){
*/ */
export function postDelMatter(uid:string,data?: any){ export function postDelMatter(uid:string,data?: any){
return request({ return request({
url: '/hxpan/api/matter/delete', url: '/hxpan/api/matter/soft/delete',
method: 'post', method: 'post',
headers: { headers: {
'Identifier':uid, 'Identifier':uid,
@ -145,10 +145,28 @@ export function postDelMatter(uid:string,data?: any){
data: data data: data
}); });
} }
/** /**
* *
*/ */
export function postDelMatBatch(uid:string,data?: any){ export function postDelMatBatch(uid:string,data?: any){
return request({
url: '/hxpan/api/matter/soft/delete/batch',
method: 'post',
headers: {
'Identifier':uid,
'Content-Type': 'application/x-www-form-urlencoded'
},
data: data
});
}
/**
*
*/
export function postClearDelsBatch(uid:string,data?: any){
return request({ return request({
url: '/hxpan/api/matter/delete/batch', url: '/hxpan/api/matter/delete/batch',
method: 'post', method: 'post',

51
src/components/DesignForm/formControlPropertiNew.vue

@ -2912,7 +2912,6 @@ function mergeArrays(a, b) {
// liwenxuan 20251230 start // liwenxuan 20251230 start
let datapropsformList = JSON.parse(JSON.stringify(props.formList)) let datapropsformList = JSON.parse(JSON.stringify(props.formList))
@ -2989,13 +2988,17 @@ const leftTopLabel = computed(() => {
return `${indexColumnLabel.value}\\${titleColumnLabel.value}` return `${indexColumnLabel.value}\\${titleColumnLabel.value}`
}) })
// == // ==''
const titleOptions = computed(() => { const titleOptions = computed(() => {
return currentTitleColumnNode.value?.options || [] const options = currentTitleColumnNode.value?.options || []
// ''
return [...options, { label: '未选择', value: 'notChosen' }]
}) })
const indexOptions = computed(() => { const indexOptions = computed(() => {
return currentIndexColumnNode.value?.options || [] const options = currentIndexColumnNode.value?.options || []
// ''
return [...options, { label: '未选择', value: 'notChosen' }]
}) })
// //
@ -3016,22 +3019,38 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => {
return return
} }
// controlData // controlData
const savedData = controlData.value?.control?.zdtcsz?.tableData || {} const savedData = controlData.value?.control?.zdtcsz?.tableData || {}
// ''
const convertOldData = (data) => {
const converted = {}
Object.keys(data).forEach(rowKey => {
const newRowKey = rowKey === '' ? 'notChosen' : rowKey
converted[newRowKey] = {}
Object.keys(data[rowKey]).forEach(colKey => {
const newColKey = colKey === '' ? 'notChosen' : colKey
converted[newRowKey][newColKey] = data[rowKey][colKey]
})
})
return converted
}
const convertedSavedData = convertOldData(savedData)
// 1 // 1
if (newTitleOptions.length && !newIndexOptions.length) { if (newTitleOptions.length && !newIndexOptions.length) {
// // ''
const defaultRowKey = 'default' const rowKey = 'notChosen'
const rowObj = { const rowObj = {
rowKey: defaultRowKey, rowKey: rowKey,
rowLabel: '默认' // "" rowLabel: '未选择' // ""
} }
// 使 // 使
newTitleOptions.forEach(colItem => { newTitleOptions.forEach(colItem => {
const colKey = colItem.value const colKey = colItem.value
const savedValue = savedData[defaultRowKey]?.[colKey] || '' const savedValue = convertedSavedData[rowKey]?.[colKey] || ''
rowObj[`col_${colKey}`] = savedValue rowObj[`col_${colKey}`] = savedValue
}) })
@ -3048,8 +3067,8 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => {
} }
// //
const defaultColKey = 'default' const defaultColKey = 'notChosen'
const savedValue = savedData[rowKey]?.[defaultColKey] || '' const savedValue = convertedSavedData[rowKey]?.[defaultColKey] || ''
rowObj[`col_${defaultColKey}`] = savedValue rowObj[`col_${defaultColKey}`] = savedValue
return rowObj return rowObj
@ -3057,7 +3076,7 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => {
zdtcszTableData.value = newTableData zdtcszTableData.value = newTableData
} }
// 3 // 3
else if (newTitleOptions.length && newIndexOptions.length) { else if (newTitleOptions.length && newIndexOptions.length) {
// //
const newTableData = newIndexOptions.map(rowItem => { const newTableData = newIndexOptions.map(rowItem => {
@ -3070,7 +3089,7 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => {
// 使 // 使
newTitleOptions.forEach(colItem => { newTitleOptions.forEach(colItem => {
const colKey = colItem.value const colKey = colItem.value
const savedValue = savedData[rowKey]?.[colKey] || '' const savedValue = convertedSavedData[rowKey]?.[colKey] || ''
rowObj[`col_${colKey}`] = savedValue rowObj[`col_${colKey}`] = savedValue
}) })
@ -3135,9 +3154,6 @@ const handleDetermineZdtcszDialogFlag = () => {
} }
/** /**
* 合并两个组件树仅保留type为radio和select的节点并过滤掉指定compId的节点同时保留options属性 * 合并两个组件树仅保留type为radio和select的节点并过滤掉指定compId的节点同时保留options属性
* @param {Array} treeA - 组件树a包含表单结构信息 * @param {Array} treeA - 组件树a包含表单结构信息
@ -8693,6 +8709,7 @@ const formatTooltip = (val: number) => {
size="small" size="small"
placeholder="请选择" placeholder="请选择"
style="width: 100%;" style="width: 100%;"
clearable
@change="handleTableDataChange" @change="handleTableDataChange"
> >
<el-option <el-option

18
src/components/DesignForm/public/form/form.vue

@ -694,9 +694,9 @@ function showOrHide(data: any,currentDataNameValue?:any) {
if(data=="onMounted"||data=="kong"){ if(data=="onMounted"||data=="kong"){
}else{ }else{
console.log(data) //console.log(data)
dataObjFlag = true dataObjFlag = true
console.log(data.name) //console.log(data.name)
} }
if(dataObjFlag){ if(dataObjFlag){
if(data.type=="select"||data.type=="radio"||data.type=="checkbox"||data.type=="switch"){ if(data.type=="select"||data.type=="radio"||data.type=="checkbox"||data.type=="switch"){
@ -1306,10 +1306,20 @@ nextTick(()=>{
//console.log(element.name) //console.log(element.name)
let rowValue = model.value[tbx] let rowValue = model.value[tbx]
//console.log(rowValue)
let columnValue = model.value[tby] let columnValue = model.value[tby]
//console.log(columnValue)
if(rowValue==""){
rowValue="notChosen"
}
if(columnValue==""){
columnValue="notChosen"
}
/* console.log(rowValue)
console.log(columnValue) */
/* if(dataObjFlag && element.name==data.name && currentDataNameValue!=""){//允许直接选择被矩阵填充的字段 /* if(dataObjFlag && element.name==data.name && currentDataNameValue!=""){//允许直接选择被矩阵填充的字段
console.log(data.name) console.log(data.name)
console.log("直接选择被矩阵填充的字段,允许") console.log("直接选择被矩阵填充的字段,允许")

2
src/views/doc/logpanel.vue

@ -1,7 +1,7 @@
<!-- <!--
@ 作者: han2015 @ 作者: han2015
@ 时间: 2025-05-12 15:39:13 @ 时间: 2025-05-12 15:39:13
@ 备注: 档管理组 @ 备注: 文件上传错误日志
--> -->
<script lang="ts" setup> <script lang="ts" setup>
import { getUploadErrList,ErrUploadLog} from "@/api/doc/type" import { getUploadErrList,ErrUploadLog} from "@/api/doc/type"

64
src/views/doc/manage.vue

@ -7,7 +7,7 @@
import { getExpirTime, getFileIcon, readableSize,fileType} from "./tools" import { getExpirTime, getFileIcon, readableSize,fileType} from "./tools"
import sharePermission from './sharePermission.vue'; import sharePermission from './sharePermission.vue';
import { useUserStore } from "@/store/modules/user"; import { useUserStore } from "@/store/modules/user";
import { getMatterList,postCreateDir,postDelMatter,postCreateShare,postMatterRename,postMatterMove, import { getMatterList,postCreateDir,postDelMatter,postClearDelsBatch,postCreateShare,postMatterRename,postMatterMove,
postDelMatBatch,getMySpaces,doCreateSpace,getRecyclingList} from "@/api/doc/index" postDelMatBatch,getMySpaces,doCreateSpace,getRecyclingList} from "@/api/doc/index"
import { matterPage,matterInfo,respCreateShare,matterTree, doFileUpload,matterPermit} from "@/api/doc/type" import { matterPage,matterInfo,respCreateShare,matterTree, doFileUpload,matterPermit} from "@/api/doc/type"
import { h } from 'vue' import { h } from 'vue'
@ -178,7 +178,7 @@ function onShareMatter(row?:matterInfo){
} }
function showShareMessage(row:respCreateShare){ function showShareMessage(row:respCreateShare){
let _shareURL=`${siteHost}/#/doc/share/?uuid=${row.uuid}&code=${row.code}` let _shareURL=`${siteHost}/#/doc/share/?uuid=${row.uuid}&code=${row.code}&分享=${row.name}`
ElMessageBox({ ElMessageBox({
title: '分享详情', title: '分享详情',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'}, customStyle: { '--el-messagebox-width':'800px',padding:'40px'},
@ -202,7 +202,7 @@ function onDelNodeMatter(row:matterInfo){
// //
function onDelMatter(row:matterInfo,dir?:boolean){ function onDelMatter(row:matterInfo,dir?:boolean){
if (row.uuid){ if (row.uuid){
ElMessageBox.confirm(`确认删除( ${row.name}) ?删除后不可恢复!取消则放弃删除操作。`, "警告", { ElMessageBox.confirm(`确认删除( ${row.name}) 到回收站?取消则放弃删除操作。`, "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -217,14 +217,14 @@ function onDelMatter(row:matterInfo,dir?:boolean){
} }
currentNode.value.uuid = row.puuid ?? "root" currentNode.value.uuid = row.puuid ?? "root"
} }
onLoadMatterList() onLoadMatterList()
}) })
}) })
} }
} }
function onDelMatBatch(){ function onDelMatBatch(){
ElMessageBox.confirm("确认删除选择的内容?", "警告", { ElMessageBox.confirm("确认删除选择的内容到回收站?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -237,6 +237,20 @@ function onDelMatBatch(){
}) })
} }
function onClearDelsBatch(){
ElMessageBox.confirm("确认删除选择的内容, 不可恢复!!!", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=>{
postClearDelsBatch(uid,{
"uuids":tabSelected.value.map((item:matterInfo)=>item.uuid).join(",")
}).then(()=>{
router.replace({ query: { t: Date.now() } })
})
})
}
function onDownload(row:matterInfo){ function onDownload(row:matterInfo){
ElMessageBox.confirm("确认下载此数据项?", "提示", { ElMessageBox.confirm("确认下载此数据项?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -370,6 +384,15 @@ function restoreMatter(row:matterInfo){
}) })
} }
} }
//
const gotoParentLevel=()=>{
const pnode=treeRef.value.getNode(currentNode.value.puuid)
if(pnode){
onNodeClick(pnode.data, null as unknown as TreeNode, null, null)
}else if(treeData.value.length>=0){
onNodeClick(treeData.value[0], null as unknown as TreeNode, null, null)
}
}
// //
function onLoadMatterList(){ function onLoadMatterList(){
@ -803,6 +826,14 @@ function flushSpaceTree(uuid:string,data:matterTree[]){
spaceTreeRef.value.updateKeyChildren(uuid,data) spaceTreeRef.value.updateKeyChildren(uuid,data)
} }
//manager->
const goSpaceParentLevel=(puuid:string)=>{
const pnode=spaceTreeRef.value.getNode(puuid)
if(pnode){
onSpaceNodeClick(pnode.data,null,null,null)
}
}
// //
function onAccessManage(){ function onAccessManage(){
dynamicVNode.value = h(sharePermission, { dynamicVNode.value = h(sharePermission, {
@ -1038,10 +1069,17 @@ const handleSelectionChange = (val:matterInfo[]) => {
<el-tabs v-model="tabName"> <el-tabs v-model="tabName">
<el-tab-pane name="main"> <el-tab-pane name="main">
<div v-if="PRIVATESPACE" class="app_container"> <div v-if="PRIVATESPACE" class="app_container">
<el-row v-if="modRecycling"><span style="margin: 12px 0px;font-weight: bold;font-size: 20px;"> 回收站 </span> </el-row> <el-row v-if="modRecycling">
<div style="display: flex;margin: 10px ;width: 97%;font-weight: bold;font-size: 20px;"> 回收站
<el-button style="margin:0 5px 0 auto;" @click="onClearDelsBatch">选中删除</el-button>
</div>
</el-row>
<el-row v-else :gutter="24" style="margin: 12px 0px;"> <el-row v-else :gutter="24" style="margin: 12px 0px;">
<el-link v-if="currentNode.name!=='root'" @click="onNodeClick(treeData[0], null as unknown as TreeNode, null, null)"> <el-link v-if="currentNode.name!=='root'" @click="onNodeClick(treeData[0], null as unknown as TreeNode, null, null)">
<span style="font-weight: bold;margin-right: 5px;align-content: center;">根目录</span>/ <span style="font-weight: bold;margin-right: 5px;align-content: center;">根目录</span>/
</el-link>
<el-link v-if="currentNode.name &&currentNode.name!=='root'" @click="gotoParentLevel">
<span style="font-weight: bold;margin: 0 5px;align-content: center;"> {{ '< 返回上一级' }} </span>/
</el-link> </el-link>
<span style="font-weight: bold;margin:0 5px;align-content:center;">{{ currentNode.name }}</span> <span style="font-weight: bold;margin:0 5px;align-content:center;">{{ currentNode.name }}</span>
@ -1071,8 +1109,8 @@ type="file" style="position: absolute;opacity: 0;width: 50px;"
</div> </div>
<el-button @click="createDir">新建目录</el-button> <el-button @click="createDir">新建目录</el-button>
<span v-if="tabSelected.length>1" style="margin:12px"> <span v-if="tabSelected.length>1" style="margin:12px">
<el-button @click="onShareMatter()">分享</el-button> <!-- <el-button @click="onShareMatter()">分享</el-button> -->
<el-button @click="onDelMatBatch">删除</el-button> <el-button @click="onDelMatBatch">批量删除</el-button>
</span> </span>
</el-col> </el-col>
<el-button-group style="margin:0 50px 0 auto;"> <el-button-group style="margin:0 50px 0 auto;">
@ -1093,7 +1131,7 @@ v-if="modListOrGrild"
:row-style ="() => ({ lineHeight: '36px' })" :row-style ="() => ({ lineHeight: '36px' })"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@cell-mouse-enter="handleMouseEnter"> @cell-mouse-enter="handleMouseEnter">
<!-- <el-table-column type="selection" width="50" /> --> <el-table-column type="selection" width="50" />
<el-table-column width="450" property="name" label="文件名"> <el-table-column width="450" property="name" label="文件名">
<template #default="scope"> <template #default="scope">
<input v-if="scope.row.name===''" v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" /> <input v-if="scope.row.name===''" v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" />
@ -1171,11 +1209,11 @@ v-if="modListOrGrild"
</div> </div>
<div v-else class="app_container"> <div v-else class="app_container">
<space <space
ref="spaceEleRef" :uid="uid" :raw-uid="rawUid" :list-or-grid="modListOrGrild" ref="spaceEleRef" :uid="uid" :raw-uid="rawUid" :list-or-grid="modListOrGrild"
:spaceid="SpaceID.uuid" :roles="Departs" :spacename="SpaceID.name" :space-permit="SpaceID.permits" :spaceid="SpaceID.uuid" :roles="Departs" :spacename="SpaceID.name" :space-permit="SpaceID.permits"
:owner="SpaceID.userUuid" :ismanager="SpaceID.manager" :owner="SpaceID.userUuid" :ismanager="SpaceID.manager"
:office-host="officeHost" :site-host="siteHost" :api-u-r-l="apiURL" :officeHost="officeHost" :site-host="siteHost" :api-u-r-l="apiURL"
:flush-space-tree="flushSpaceTree"></space> :flushSpaceTree="flushSpaceTree" :backToParent="goSpaceParentLevel"></space>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="logs"> <el-tab-pane name="logs">

2
src/views/doc/share.vue

@ -43,7 +43,7 @@ const dynamicVNode = ref<VNode | null>(null) //permission 组件的父组件
function showShareMessage(row:{uuid:string,code:string,name:string,expireTime:string}){ function showShareMessage(row:{uuid:string,code:string,name:string,expireTime:string}){
let _shareURL=`${siteHost}/#/doc/share?uuid=${row.uuid}&code=${row.code}` let _shareURL=`${siteHost}/#/doc/share?uuid=${row.uuid}&code=${row.code}&分享=${row.name}`
ElMessageBox({ ElMessageBox({
title: '分享详情', title: '分享详情',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'}, customStyle: { '--el-messagebox-width':'800px',padding:'40px'},

24
src/views/doc/space.vue

@ -78,7 +78,8 @@ const props = withDefaults(defineProps<{
ismanager:boolean, ismanager:boolean,
spacePermit:matterPermit, spacePermit:matterPermit,
flushSpaceTree:(uuid:string,data:matterTree[])=>void flushSpaceTree:(uuid:string,data:matterTree[])=>void,
backToParent:(uuid:string)=>void
}>(),{}) }>(),{})
// //
@ -310,7 +311,16 @@ function onSpaceMatterRename(row:matterInfo){
}) })
} }
//------------------------------------------ //------------------------------------------
const goBackToParent=(puuid:string)=>{
if(puuid=="root"){
handleDoubleClick(breadcrumbList.value[0])
return
}
props.backToParent(puuid)
}
// @cell-dblclick="handleDoubleClick" // @cell-dblclick="handleDoubleClick"
// //
function handleDoubleClick(row:matterInfo,ind?:number){ function handleDoubleClick(row:matterInfo,ind?:number){
@ -371,6 +381,9 @@ function handleDoubleClick(row:matterInfo,ind?:number){
function handleMouseEnter(row:any){ function handleMouseEnter(row:any){
currentHoverRow.value=row.name currentHoverRow.value=row.name
} }
//------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// //
function handleSingleUpload(response:any){ function handleSingleUpload(response:any){
handleAiUpload(response.data) handleAiUpload(response.data)
@ -553,7 +566,7 @@ function handleAiDelete(info:matterInfo){
// //
const onShareSpaceFile=(row:matterInfo)=>{ const onShareSpaceFile=(row:matterInfo)=>{
const str=btoa(encodeURIComponent(`${props.spaceid}|${row.puuid}|${row.name}`)) const str=btoa(encodeURIComponent(`${props.spaceid}|${row.puuid}|${row.name}`))
let _shareURL=`${siteHost}/#/doc/manage?s_token=${str}` let _shareURL=`${siteHost}/#/doc/manage?s_token=${str}&分享=${row.name}`
ElMessageBox({ ElMessageBox({
title: '文件分享:', title: '文件分享:',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'}, customStyle: { '--el-messagebox-width':'800px',padding:'40px'},
@ -671,9 +684,12 @@ function isOwner(){
<el-breadcrumb-item <el-breadcrumb-item
v-for="(item,index) in breadcrumbList" v-for="(item,index) in breadcrumbList"
:key="index" @click="handleDoubleClick(item,index)"> :key="index" @click="handleDoubleClick(item,index)">
<span style="font-weight: bold;cursor: pointer;">{{ item.name }}</span> <span style="font-weight: bold;cursor: pointer;">{{ item.name }} </span>
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<el-link v-if="currentNode.uuid!=='root'" @click="goBackToParent(currentNode.puuid)">
<span style="font-weight: bold;margin: 0 5px;align-content: center;">/ {{ '< 返回上一级' }}</span>
</el-link>
<span v-if="currentNode.uuid!='root'" style="font-weight: bold;margin:0 5px;align-content:center;">/ {{ currentNode.name }}</span> <span v-if="currentNode.uuid!='root'" style="font-weight: bold;margin:0 5px;align-content:center;">/ {{ currentNode.name }}</span>
<el-col :span="6" class="search"> <el-col :span="6" class="search">

Loading…
Cancel
Save