bc06177a by lihua

匿名化文件夹支持选择内置文件

1 parent 8563bd4e
......@@ -391,4 +391,10 @@ export const downDicomPath = (taskExecGuid) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/anon-task/down-dicom-path?taskExecGuid=${taskExecGuid}`,
method: 'get',
responseType: 'blob'
})
/** 获取内置的文件夹路径 */
export const getInnerFolderPath = () => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/anon-task/get-dicom-path`,
method: 'get'
})
\ No newline at end of file
......
......@@ -52,11 +52,19 @@
<!-- 弹框展示服务器文件夹目录,并选择 -->
<Dialog ref="dialogRef" :dialog-info="uploadFileDialogInfo" @btnClick="dialogBtnClick">
<template #extra-content>
<div class="folder-main-content" v-loading="uploadFileDialogInfo.contentLoading">
<div class="radio-main">
<span>是否选择内置文件夹路径:</span>
<el-radio-group v-model="isBuiltInPath">
<el-radio :value="true"></el-radio>
<el-radio :value="false"></el-radio>
</el-radio-group>
</div>
<div v-show="!isBuiltInPath" class="folder-main-content" v-loading="uploadFileDialogInfo.contentLoading">
<Tree ref="treeInfoRef" :treeInfo="folderTreeInfo" @nodeClick="nodeClick" key="path"
@loadNode="loadFolderTreeNode" />
</div>
<div class="folder-foot">{{ '当前选中文件夹路径:' + (dialogOpenSelectNode.path || '--') }}</div>
<div v-show="!isBuiltInPath" class="folder-foot">{{ '当前选中文件夹路径:' + (dialogOpenSelectNode.path || '--') }}</div>
<div v-show="isBuiltInPath" class="builtIn-folder-foot">{{ '内置文件夹路径:' + (builtInPath || '--') }}</div>
</template>
</Dialog>
<div v-show="clickSelectNode.path && dicomStatisticsData.state" class="folder-foot">{{ '当前提取文件夹路径:' +
......@@ -235,7 +243,8 @@ import {
scanFolder,
getDicomMeta,
getDicomStatistics,
retryDicom
retryDicom,
getInnerFolderPath
} from '@/api/modules/dataAnonymization';
import {
parseAndDecodeUrl,
......@@ -946,6 +955,11 @@ const uploadFileChange = (file) => {
/*** ----------------------- 解析扫描文件 ------------------------------ */
/** 是否选择内置文件夹路径 */
const isBuiltInPath = ref(false);
const builtInPath = ref('');
/** 上传选择文件夹对话框 */
const uploadFileDialogInfo = ref({
visible: false,
......@@ -1013,7 +1027,7 @@ const refreshFolderResult = () => {
const dialogBtnClick = (btn) => {
if (btn.value == 'submit') {
clickSelectNode.value = dialogOpenSelectNode.value;
if (!clickSelectNode.value.path) {
if (!isBuiltInPath.value && !clickSelectNode.value.path) {
proxy.$ElMessage.error('请先选择文件夹');
return;
}
......@@ -1024,7 +1038,7 @@ const dialogBtnClick = (btn) => {
saveParams.coverageArea = [];
}
saveParams.filePath = {
url: clickSelectNode.value.path
url: isBuiltInPath.value ? builtInPath.value : clickSelectNode.value.path
};
saveParams.samplingRate = null;
if (taskGuid.value) {
......@@ -1138,6 +1152,15 @@ const uploadFolder = () => {
clickSelectNode.value = {};
dialogOpenSelectNode.value = {};
uploadFileDialogInfo.value.visible = true;
if (!builtInPath.value) {
getInnerFolderPath().then((res: any) => {
if (res?.code == proxy.$passCode) {
builtInPath.value = res.data || '';
} else {
ElMessage.error(res.msg);
}
})
}
folderTreeInfo.value.loading = true;
scanFolder().then((res: any) => {
folderTreeInfo.value.loading = false;
......@@ -2377,8 +2400,8 @@ onUnmounted(() => {
}
.folder-main-content {
height: 450px;
padding: 8px 16px;
height: 420px;
padding: 0px 16px 8px;
:deep(.tree_panel) {
height: 100%;
......@@ -2389,8 +2412,17 @@ onUnmounted(() => {
}
}
.radio-main {
padding: 8px 24px 0px;
}
.folder-foot {
padding: 0px 16px 8px;
padding: 0px 24px 8px;
line-height: 21px;
}
.builtIn-folder-foot {
padding: 8px 24px;
line-height: 21px;
}
......
......@@ -1588,7 +1588,7 @@ onActivated(() => {
<span class="item_label">创建时间:</span>
<span class="item_value">{{ detailInfo.createTime || '--' }}</span>
</div>
<div class="list_item" style=" width: 55%;">
<!-- <div class="list_item" style=" width: 55%;">
<span class="item_label">有效期:</span>
<span class="item_value">{{ !detailInfo.signatureTime ? '--' : (detailInfo.signatureTime + '至' +
detailInfo.endTime) }}</span>
......@@ -1596,7 +1596,7 @@ onActivated(() => {
<div class="list_item" style=" width: 45%;">
<span class="item_label">签署时间:</span>
<span class="item_value">{{ detailInfo.signatureTime || '--' }}</span>
</div>
</div> -->
</div>
</div>
<div class="empty-div"></div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!