diff --git a/web/src/api/testtask/index.ts b/web/src/api/testtask/index.ts index 6b90488..480d68c 100644 --- a/web/src/api/testtask/index.ts +++ b/web/src/api/testtask/index.ts @@ -78,3 +78,31 @@ export function importTaskSql(queryParams: any) { headers: { 'Content-Type': 'multipart/form-data' } }); } +// +export function commonItems() { + return request({ + url: '/api/common-items', + method: 'get' + }); +} +export function addCommonItems(queryParams: any) { + return request({ + url: '/api/common-items', + method: 'post', + data: queryParams, + }); +} +export function delCommonItems(queryParams: any) { + return request({ + url: '/api/common-items', + method: 'delete', + data: queryParams, + }); +} +export function batchCommonItems(queryParams: any) { + return request({ + url: '/api/common-items/batch', + method: 'post', + data: queryParams, + }); +} \ No newline at end of file diff --git a/web/src/assets/MenuIcon/save.png b/web/src/assets/MenuIcon/save.png new file mode 100644 index 0000000..cdab532 Binary files /dev/null and b/web/src/assets/MenuIcon/save.png differ diff --git a/web/src/assets/MenuIcon/select.png b/web/src/assets/MenuIcon/select.png new file mode 100644 index 0000000..ca3a1ce Binary files /dev/null and b/web/src/assets/MenuIcon/select.png differ diff --git a/web/src/assets/MenuIcon/set.png b/web/src/assets/MenuIcon/set.png new file mode 100644 index 0000000..b2409cf Binary files /dev/null and b/web/src/assets/MenuIcon/set.png differ diff --git a/web/src/components/file/file/useFilePwd.js b/web/src/components/file/file/useFilePwd.js index b6d93cd..7e689ae 100644 --- a/web/src/components/file/file/useFilePwd.js +++ b/web/src/components/file/file/useFilePwd.js @@ -1,6 +1,6 @@ import minimatch from "minimatch"; import useRouterData from "@/components/file/useRouterData"; -import { removeDuplicateSlashes } from "fast-glob/out/managers/patterns"; +// import { removeDuplicateSlashes } from "fast-glob/out/managers/patterns"; import common from "@/components/file/common"; import { useStorage } from '@vueuse/core'; let { storageKey, currentPath } = useRouterData() @@ -8,7 +8,9 @@ let { storageKey, currentPath } = useRouterData() const zfilePasswordCache = useStorage('zfile-pwd-cache', {}); export default function useFilePwd() { - +function removeDuplicateSlashes(path) { + return path.replace(/\\/g, '/').replace(/\/+/g, '/'); +} // 向缓存中写入当前路径密码 let putPathPwd = (pattern, password) => { if (pattern) { diff --git a/web/src/utils/rsaEncrypt.ts b/web/src/utils/rsaEncrypt.ts index 00590bb..cb55e8b 100644 --- a/web/src/utils/rsaEncrypt.ts +++ b/web/src/utils/rsaEncrypt.ts @@ -1,4 +1,4 @@ -import JSEncrypt from 'jsencrypt/bin/jsencrypt.min' +import JSEncrypt from 'jsencrypt'; // 密钥对生成 http://web.chacuo.net/netrsakeypair const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' + diff --git a/web/src/views/testdata/datamanagement/index.vue b/web/src/views/testdata/datamanagement/index.vue index 431b753..054be59 100644 --- a/web/src/views/testdata/datamanagement/index.vue +++ b/web/src/views/testdata/datamanagement/index.vue @@ -154,7 +154,7 @@ function getProject() { setupWebSocket() ws2 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + "id_extract_" + projectId.value) setupWebSocket2() - gettreedata() + gettreedata('') tonstatus(false) }) } @@ -179,7 +179,7 @@ function tonstatus(ready: any) { tonloading.value = true buttonmsg.value = '处理中...' } - gettreedata() + gettreedata('') }) //解压 @@ -242,9 +242,13 @@ const treeForm = ref({ //获取树数据 const treeRef = ref(); const filepath = ref('') -function gettreedata() { +function gettreedata(type:string) { treeloading.value = true - treeForm.value.taskId = projectId.value + if(type == '节点搜索' && projectId.value !== ''){ + treeForm.value.taskId = '' + }else{ + treeForm.value.taskId = projectId.value + } let keyar = projectArr.value.find(item => item.id === projectId.value); storageKey.value = keyar.key getTsNodesTree(treeForm.value).then((res: any) => { @@ -252,6 +256,7 @@ function gettreedata() { treeloading.value = false if (treedata.value[0]) { pathid.value = treedata.value[0].nodeId + projectId.value = treedata.value[0].taskId nodename.value = res.data[0].nodeName if (nodename.value == '根节点') { filepath.value = res.data[0].path @@ -273,6 +278,7 @@ const pathid = ref() const nodename = ref('') function handleNodeClick(data: any, node: any) { pathid.value = data.nodeId + projectId.value = data.taskId // filepath.value = data.path + data.nodeName + '/' creatform.value.parentId = '' patharr.value.length = 0 @@ -349,7 +355,7 @@ async function submitForm(formEl: any) { if (projectForme.value.nodeId) { updateTsNodes(projectForme.value).then((res: any) => { if (res.code == 0) { - gettreedata() + gettreedata('') ElMessage.success("修改成功") frame.value = false } @@ -358,7 +364,7 @@ async function submitForm(formEl: any) { } else { addTsNodes(projectForme.value).then((res: any) => { if (res.code == 0) { - gettreedata() + gettreedata('') ElMessage.success("添加成功") frame.value = false } @@ -393,7 +399,7 @@ function delSubItem(row: any) { loading.value = true deleteTsNodesById({ id: row.nodeId, path: row.path }).then((res: any) => { if (res.code == 0) { - gettreedata() + gettreedata('') ElMessage({ type: 'success', message: '删除成功', @@ -1863,12 +1869,12 @@ const configradio: any = ref(null)