Springboot + Vue (Ruoyi) realizes the function of importing data from Excel

      This implementation is implemented by referring to the import function according to the document. Let me introduce all the processes from the front-end Vue to the back-end Springboot implementation in detail.

1. Front-end Vue

1. Add the following code to the required position in Vue's <template></template>: the framed part needs to be modified to its own path, usually the module name + business function name.

 <el-col :span="1.5">
  <el-button
    type="info"
    plain
    icon="el-icon-upload2"
    size="mini"
    @click="handleImport"
    v-hasPermi="['collegeManage:studentBase:import']"
  >导入</el-button>
</el-col>

2. Also add the following code at the required position in <template></template> in Vue. The code is a dialog for data import

The code of this dialog box is general, no need to modify, just paste and use it directly.

<!-- User import dialog -->
<e

Supongo que te gusta

Origin blog.csdn.net/weixin_52890053/article/details/129904827
Recomendado
Clasificación