9f888656 by lihua

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

1 parent 4ee13d62
...@@ -379,3 +379,9 @@ export const downDicomPath = (taskExecGuid) => request({ ...@@ -379,3 +379,9 @@ export const downDicomPath = (taskExecGuid) => request({
379 method: 'get', 379 method: 'get',
380 responseType: 'blob' 380 responseType: 'blob'
381 }) 381 })
382
383 /** 获取内置的文件夹路径 */
384 export const getInnerFolderPath = () => request({
385 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/anon-task/get-dicom-path`,
386 method: 'get'
387 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -56,11 +56,19 @@ ...@@ -56,11 +56,19 @@
56 class="mr8" @click=uploadFolder>上传文件</el-button> 56 class="mr8" @click=uploadFolder>上传文件</el-button>
57 <Dialog ref="dialogRef" :dialog-info="uploadFileDialogInfo" @btnClick="dialogBtnClick"> 57 <Dialog ref="dialogRef" :dialog-info="uploadFileDialogInfo" @btnClick="dialogBtnClick">
58 <template #extra-content> 58 <template #extra-content>
59 <div class="folder-main-content" v-loading="uploadFileDialogInfo.contentLoading"> 59 <div class="radio-main">
60 <span>是否选择内置文件夹路径:</span>
61 <el-radio-group v-model="isBuiltInPath">
62 <el-radio :value="true"></el-radio>
63 <el-radio :value="false"></el-radio>
64 </el-radio-group>
65 </div>
66 <div v-show="!isBuiltInPath" class="folder-main-content" v-loading="uploadFileDialogInfo.contentLoading">
60 <Tree ref="treeInfoRef" :treeInfo="folderTreeInfo" @nodeClick="nodeClick" key="path" 67 <Tree ref="treeInfoRef" :treeInfo="folderTreeInfo" @nodeClick="nodeClick" key="path"
61 @loadNode="loadFolderTreeNode" /> 68 @loadNode="loadFolderTreeNode" />
62 </div> 69 </div>
63 <div class="folder-foot">{{ '当前选中文件夹路径:' + (dialogOpenSelectNode.path || '--') }}</div> 70 <div v-show="!isBuiltInPath" class="folder-foot">{{ '当前选中文件夹路径:' + (dialogOpenSelectNode.path || '--') }}</div>
71 <div v-show="isBuiltInPath" class="builtIn-folder-foot">{{ '内置文件夹路径:' + (builtInPath || '--') }}</div>
64 </template> 72 </template>
65 </Dialog> 73 </Dialog>
66 <div v-show="clickSelectNode.path && dicomStatisticsData.state" class="folder-foot">{{ '当前提取文件夹路径:' + 74 <div v-show="clickSelectNode.path && dicomStatisticsData.state" class="folder-foot">{{ '当前提取文件夹路径:' +
...@@ -235,7 +243,8 @@ import { ...@@ -235,7 +243,8 @@ import {
235 scanFolder, 243 scanFolder,
236 getDicomMeta, 244 getDicomMeta,
237 getDicomStatistics, 245 getDicomStatistics,
238 retryDicom 246 retryDicom,
247 getInnerFolderPath
239 } from '@/api/modules/dataAnonymization'; 248 } from '@/api/modules/dataAnonymization';
240 import { 249 import {
241 parseAndDecodeUrl, 250 parseAndDecodeUrl,
...@@ -1161,6 +1170,11 @@ const uploadFileChange = (file) => { ...@@ -1161,6 +1170,11 @@ const uploadFileChange = (file) => {
1161 1170
1162 /*** ----------------------- 解析扫描文件 ------------------------------ */ 1171 /*** ----------------------- 解析扫描文件 ------------------------------ */
1163 1172
1173 /** 是否选择内置文件夹路径 */
1174 const isBuiltInPath = ref(false);
1175
1176 const builtInPath = ref('');
1177
1164 /** 上传选择文件夹对话框 */ 1178 /** 上传选择文件夹对话框 */
1165 const uploadFileDialogInfo = ref({ 1179 const uploadFileDialogInfo = ref({
1166 visible: false, 1180 visible: false,
...@@ -1228,7 +1242,7 @@ const refreshFolderResult = () => { ...@@ -1228,7 +1242,7 @@ const refreshFolderResult = () => {
1228 const dialogBtnClick = (btn) => { 1242 const dialogBtnClick = (btn) => {
1229 if (btn.value == 'submit') { 1243 if (btn.value == 'submit') {
1230 clickSelectNode.value = dialogOpenSelectNode.value; 1244 clickSelectNode.value = dialogOpenSelectNode.value;
1231 if (!clickSelectNode.value.path) { 1245 if (!isBuiltInPath.value && !clickSelectNode.value.path) {
1232 proxy.$ElMessage.error('请先选择文件夹'); 1246 proxy.$ElMessage.error('请先选择文件夹');
1233 return; 1247 return;
1234 } 1248 }
...@@ -1239,7 +1253,7 @@ const dialogBtnClick = (btn) => { ...@@ -1239,7 +1253,7 @@ const dialogBtnClick = (btn) => {
1239 saveParams.coverageArea = []; 1253 saveParams.coverageArea = [];
1240 } 1254 }
1241 saveParams.filePath = { 1255 saveParams.filePath = {
1242 url: clickSelectNode.value.path 1256 url: isBuiltInPath.value ? builtInPath.value : clickSelectNode.value.path
1243 }; 1257 };
1244 saveParams.samplingRate = null; 1258 saveParams.samplingRate = null;
1245 if (taskGuid.value) { 1259 if (taskGuid.value) {
...@@ -1353,6 +1367,15 @@ const uploadFolder = () => { ...@@ -1353,6 +1367,15 @@ const uploadFolder = () => {
1353 clickSelectNode.value = {}; 1367 clickSelectNode.value = {};
1354 dialogOpenSelectNode.value = {}; 1368 dialogOpenSelectNode.value = {};
1355 uploadFileDialogInfo.value.visible = true; 1369 uploadFileDialogInfo.value.visible = true;
1370 if (!builtInPath.value) {
1371 getInnerFolderPath().then((res: any) => {
1372 if (res?.code == proxy.$passCode) {
1373 builtInPath.value = res.data || '';
1374 } else {
1375 ElMessage.error(res.msg);
1376 }
1377 })
1378 }
1356 folderTreeInfo.value.loading = true; 1379 folderTreeInfo.value.loading = true;
1357 scanFolder().then((res: any) => { 1380 scanFolder().then((res: any) => {
1358 folderTreeInfo.value.loading = false; 1381 folderTreeInfo.value.loading = false;
...@@ -2643,8 +2666,8 @@ onUnmounted(() => { ...@@ -2643,8 +2666,8 @@ onUnmounted(() => {
2643 } 2666 }
2644 2667
2645 .folder-main-content { 2668 .folder-main-content {
2646 height: 450px; 2669 height: 420px;
2647 padding: 8px 16px; 2670 padding: 0px 16px 8px;
2648 2671
2649 :deep(.tree_panel) { 2672 :deep(.tree_panel) {
2650 height: 100%; 2673 height: 100%;
...@@ -2655,8 +2678,17 @@ onUnmounted(() => { ...@@ -2655,8 +2678,17 @@ onUnmounted(() => {
2655 } 2678 }
2656 } 2679 }
2657 2680
2681 .radio-main {
2682 padding: 8px 24px 0px;
2683 }
2684
2658 .folder-foot { 2685 .folder-foot {
2659 padding: 0px 16px 8px; 2686 padding: 0px 24px 8px;
2687 line-height: 21px;
2688 }
2689
2690 .builtIn-folder-foot {
2691 padding: 8px 24px;
2660 line-height: 21px; 2692 line-height: 21px;
2661 } 2693 }
2662 2694
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!