@@ -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'
}
@@ -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);
};
@@ -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="{
}"
</div>