0909
This commit is contained in:
		| @ -32,12 +32,10 @@ | ||||
|             <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['supplierInput:supplierInput:add']">新增</el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button type="primary" plain icon="Download" @click="handleImport" v-hasPermi="['supplierInput:supplierInput:import']">导入</el-button> | ||||
|             <el-button type="warning" plain icon="Upload" @click="handleImport" v-hasPermi="['supplierInput:supplierInput:import']">导入</el-button> | ||||
|           </el-col> | ||||
|           <el-col :span="1.5"> | ||||
|             <el-button type="primary" plain icon="Upload" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']" | ||||
|               >导出模板</el-button | ||||
|             > | ||||
|             <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['supplierInput:supplierInput:export']">导出模板</el-button> | ||||
|           </el-col> | ||||
|           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> | ||||
|         </el-row> | ||||
| @ -700,12 +698,12 @@ const handleDelete = async (row?: SupplierInputVO) => { | ||||
|   } | ||||
| }; | ||||
|  | ||||
| /** 导出操作(下载静态模板文件) */ | ||||
| /** 导出操作 */ | ||||
| const handleExport = () => { | ||||
|   try { | ||||
|     // 创建a标签并直接下载public目录下的静态文件 | ||||
|     const link = document.createElement('a'); | ||||
|     link.href = '/xx.xlsx'; // 使用public目录下现有的Excel文件作为模板 | ||||
|     link.href = '/assets/files/供应商导入模板.xlsx'; // 使用public目录下现有的Excel文件作为模板 | ||||
|     link.download = '供应商导入模板.xlsx'; | ||||
|     document.body.appendChild(link); | ||||
|     link.click(); | ||||
| @ -748,7 +746,7 @@ const handleImport = () => { | ||||
|         loading.value = true; | ||||
|         // 调用导入接口 | ||||
|         const res = await leadingIn(formData, queryParams.value.projectId); | ||||
|         console.log('111111111111', queryParams.value.projectId); | ||||
|         console.log("111111111111",queryParams.value.projectId); | ||||
|  | ||||
|         if (res.code === 200) { | ||||
|           proxy?.$modal.msgSuccess('导入成功'); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user