|
|
|
@ -28,14 +28,10 @@
|
|
|
|
:on-error="uploadFail"
|
|
|
|
:on-error="uploadFail"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em>直接导入</div>
|
|
|
|
<div class="el-upload__tip" slot="tip">只能上传xls/xlsx文件</div>
|
|
|
|
<div class="el-upload__tip" slot="tip">只能上传xls/xlsx文件</div>
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="title" style="margin-top: 10px;">数据预览</div>
|
|
|
|
|
|
|
|
<Table :data="tableList" :columns="table" style="margin-top: 10px;"></Table>
|
|
|
|
|
|
|
|
<div style="font-size: 12px;zoom: 0.8;">总共数据:{{ tableList.length }}条</div>
|
|
|
|
|
|
|
|
<el-button type="primary" size="small" style="margin-top: 10px;" @click="imports">确认导入</el-button>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -261,7 +257,7 @@ export default {
|
|
|
|
console.log(res)
|
|
|
|
console.log(res)
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
type: 'success',
|
|
|
|
type: 'success',
|
|
|
|
message: `成功导入${res.total}条`
|
|
|
|
message: `总计${res.total},成功导入${res.total-res.fail}条`
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.hidden();
|
|
|
|
this.hidden();
|
|
|
|
|