liujt пре 2 недеља
родитељ
комит
b786a5e635

+ 2 - 2
src/api/system/file/index.js

@@ -76,10 +76,10 @@ export async function downLoadTemplate() {
 /**
  * 下载模板
  */
-export async function downLoadTemplateNew(url, fileName) {
+export async function downLoadTemplateNew(url, fileName, data={}) {
   const res = await request.post(
     url,
-    {},
+    data,
     {
       responseType: 'blob'
     }

+ 5 - 1
src/components/upload/import-dialogNew.vue

@@ -61,6 +61,10 @@
       param: {
         type: Object,
         default: () => ({})
+      },
+      fileParam: {
+        type: Object,
+        default: () => ({})
       }
     },
     //注册组件
@@ -116,7 +120,7 @@
       },
       //下载模板
       downLoadTemplate() {
-        downLoadTemplateNew(this.fileUrl, this.fileName);
+        downLoadTemplateNew(this.fileUrl, this.fileName, this.fileParam);
       }
     }
   };

+ 8 - 3
src/views/classifyManage/treeClassify/details.vue

@@ -186,12 +186,17 @@
     />
     <importDialog
       ref="importDialogRef"
-      :apiUrl="'/main/factoryworkstation/importBatch'"
-      :fileUrl="'/main/factoryworkstation/downLoadTemplate'"
+      :apiUrl="`/main/import/CATEGORY_LEVEL?parentId=${current.id}`"
+      :fileUrl="`/main/import/template`"
       fileName="分类导入模板"
       @success="reload"
       :param="{
-        id: current.id
+        parentId: current.id,
+        importType: 'CATEGORY_LEVEL'
+      }"
+      :fileParam="{
+        parentId: current.id,
+        importType: 'CATEGORY_LEVEL'
       }"
     />
   </div>