wenhongquan 11 months ago
parent
commit
2859f2ae34
2 changed files with 10 additions and 4 deletions
  1. 8 2
      src/views/project/list/index.vue
  2. 2 2
      vite.config.ts

+ 8 - 2
src/views/project/list/index.vue

@@ -710,12 +710,17 @@ const deletefilebanch = () => {
 const getfilelist =()=>{
   getArchives(currentitem.value.id).then(res1=>{
     currentitem.value = res1.data;
-
     getArchive_files(currentitem.value.id).then((res1) => {
+      var resultArray = res1.data.sort(
+        function compareFunction(param1, param2) {
+          return param1.originalName.localeCompare(param2.originalName,"zh");
+        }
+      );
+      res1.data = resultArray;
       if(currentitem.value.ext2!=null && currentitem.value.ext2!=undefined){
         let filenewdata =  JSON.parse(currentitem.value.ext2);
         if(filenewdata["newfile"]!=undefined){
-          res1.data= res1.data.map(i=>{
+          res1.data= resultArray.map(i=>{
             if(filenewdata["newfile"].indexOf(i.ossId)!=-1){
               return {...i,isnew:true}
             }else{
@@ -724,6 +729,7 @@ const getfilelist =()=>{
           })
         }
       }
+
       filelist.value = res1.data
     });
   })

+ 2 - 2
vite.config.ts

@@ -26,8 +26,8 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://localhost:8080',
-          // target: 'https://filesystem.njdnyjs.com/api',
+          // target: 'http://localhost:8080',
+          target: 'https://filesystem.njdnyjs.com/api',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')