diff --git a/src/api/doc/index.ts b/src/api/doc/index.ts index 1316459..c7badfd 100644 --- a/src/api/doc/index.ts +++ b/src/api/doc/index.ts @@ -136,7 +136,7 @@ export function postCreateDir(uid:string,data?: createDir){ */ export function postDelMatter(uid:string,data?: any){ return request({ - url: '/hxpan/api/matter/delete', + url: '/hxpan/api/matter/soft/delete', method: 'post', headers: { 'Identifier':uid, @@ -145,10 +145,28 @@ export function postDelMatter(uid:string,data?: any){ data: data }); } + + + /** * 批量删除文件或目录 */ 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({ url: '/hxpan/api/matter/delete/batch', method: 'post', diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index a311287..d7201fa 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -2912,7 +2912,6 @@ function mergeArrays(a, b) { - // 自动填充设置 liwenxuan 20251230 start let datapropsformList = JSON.parse(JSON.stringify(props.formList)) @@ -2989,13 +2988,17 @@ const leftTopLabel = computed(() => { return `${indexColumnLabel.value}\\${titleColumnLabel.value}` }) -// 原始选项数组(标题行=列,索引列=行) +// 原始选项数组(标题行=列,索引列=行),将空值选项放在末尾,键改为'未选择' const titleOptions = computed(() => { - return currentTitleColumnNode.value?.options || [] + const options = currentTitleColumnNode.value?.options || [] + // 将空值选项放在正常选项后面,键改为'未选择' + return [...options, { label: '未选择', value: 'notChosen' }] }) 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 } - // 从 controlData 中获取之前保存的数据 + // 从 controlData 中获取之前保存的数据,并兼容旧数据(空字符串键) 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:只有标题行,没有索引列 if (newTitleOptions.length && !newIndexOptions.length) { - // 创建一行默认数据 - const defaultRowKey = 'default' + // 创建一行数据,键为'未选择' + const rowKey = 'notChosen' const rowObj = { - rowKey: defaultRowKey, - rowLabel: '默认' // 第一列显示"默认" + rowKey: rowKey, + rowLabel: '未选择' // 第一列显示"未选择" } // 为每个标题列生成值,如果有保存的数据则使用保存的数据 newTitleOptions.forEach(colItem => { const colKey = colItem.value - const savedValue = savedData[defaultRowKey]?.[colKey] || '' + const savedValue = convertedSavedData[rowKey]?.[colKey] || '' rowObj[`col_${colKey}`] = savedValue }) @@ -3048,8 +3067,8 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => { } // 创建一个默认列 - const defaultColKey = 'default' - const savedValue = savedData[rowKey]?.[defaultColKey] || '' + const defaultColKey = 'notChosen' + const savedValue = convertedSavedData[rowKey]?.[defaultColKey] || '' rowObj[`col_${defaultColKey}`] = savedValue return rowObj @@ -3057,7 +3076,7 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => { zdtcszTableData.value = newTableData } - // 情况3:标题行和索引列都有 + // 情况3:标题行和索引列都有(包括空值选项) else if (newTitleOptions.length && newIndexOptions.length) { // 生成新的表格数据 const newTableData = newIndexOptions.map(rowItem => { @@ -3070,7 +3089,7 @@ watch([titleOptions, indexOptions], ([newTitleOptions, newIndexOptions]) => { // 为每个标题列生成值,如果有保存的数据则使用保存的数据 newTitleOptions.forEach(colItem => { const colKey = colItem.value - const savedValue = savedData[rowKey]?.[colKey] || '' + const savedValue = convertedSavedData[rowKey]?.[colKey] || '' rowObj[`col_${colKey}`] = savedValue }) @@ -3135,9 +3154,6 @@ const handleDetermineZdtcszDialogFlag = () => { } - - - /** * 合并两个组件树,仅保留type为radio和select的节点,并过滤掉指定compId的节点,同时保留options属性 * @param {Array} treeA - 组件树a,包含表单结构信息 @@ -8693,6 +8709,7 @@ const formatTooltip = (val: number) => { size="small" placeholder="请选择" style="width: 100%;" + clearable @change="handleTableDataChange" > { //console.log(element.name) let rowValue = model.value[tbx] - //console.log(rowValue) + 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!=""){//允许直接选择被矩阵填充的字段 console.log(data.name) console.log("直接选择被矩阵填充的字段,允许") diff --git a/src/views/doc/logpanel.vue b/src/views/doc/logpanel.vue index 9217217..595aadb 100644 --- a/src/views/doc/logpanel.vue +++ b/src/views/doc/logpanel.vue @@ -1,7 +1,7 @@