|
|
|
@ -78,6 +78,10 @@ |
|
|
|
@click="handleImportRelation">导入文献 |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button v-hasPermi="['system:SysPoint:add']" type="info" plain style="float: left" icon="el-icon-upload2" size="mini" |
|
|
|
@click="handleImportRelation2">导入txt |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="warning"--> |
|
|
|
@ -169,6 +173,25 @@ |
|
|
|
<el-button @click="upload1.open = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog :title="upload2.title" :visible.sync="upload2.open" width="400px" append-to-body> |
|
|
|
<el-upload ref="upload2" :limit="1" accept=".csv" :headers="upload2.headers" :action="upload2.url" |
|
|
|
:disabled="upload2.isUploading" :on-progress="handleFileUploadProgressRelation2" |
|
|
|
:on-success="handleFileSuccess2" |
|
|
|
:auto-upload="false" drag> |
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
<div class="el-upload__text">将 txt 文件拖到此处,或 <em>点击上传</em></div> |
|
|
|
<div class="el-upload__tip text-center" slot="tip"> |
|
|
|
<span style="color: #999;">仅允许导入 .txt 格式文件(逗号分隔文本)</span> |
|
|
|
<br/> |
|
|
|
</div> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="submitFileFormR2">确 定</el-button> |
|
|
|
<el-button @click="upload2.open = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -188,6 +211,15 @@ export default { |
|
|
|
updateSupport: 0, |
|
|
|
url: "http://"+process.env.VUE_APP_IP+"/system/SysPoint/insertPoint" |
|
|
|
}, |
|
|
|
upload2: { |
|
|
|
tip: "准备上传文件", |
|
|
|
open: false, |
|
|
|
title: "", |
|
|
|
oprnIno: false, |
|
|
|
isUploading: false, |
|
|
|
updateSupport: 0, |
|
|
|
url: "http://"+process.env.VUE_APP_IP+"/system/SysPoint/insertPoint2" |
|
|
|
}, |
|
|
|
typeOptions: [ |
|
|
|
{ label: '作者', value: 'author' }, |
|
|
|
{ label: '机构', value: 'agency' }, |
|
|
|
@ -237,18 +269,37 @@ export default { |
|
|
|
this.$message.success('导入补充文件成功'); |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
handleFileSuccess2(response, file, fileList) { |
|
|
|
this.upload2.open = false; |
|
|
|
this.upload2.isUploading = false; |
|
|
|
this.$refs.upload2.clearFiles(); |
|
|
|
this.$message.success('导入补充文件成功'); |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
handleFileUploadProgressRelation(event, file, fileList) { |
|
|
|
this.upload1.isUploading = true; |
|
|
|
this.upload1.oprnIno = true; |
|
|
|
|
|
|
|
}, |
|
|
|
handleFileUploadProgressRelation2(event, file, fileList) { |
|
|
|
this.upload2.isUploading = true; |
|
|
|
this.upload2.oprnIno = true; |
|
|
|
|
|
|
|
}, |
|
|
|
submitFileFormR() { |
|
|
|
this.$refs.upload1.submit(); |
|
|
|
}, |
|
|
|
submitFileFormR2() { |
|
|
|
this.$refs.upload2.submit(); |
|
|
|
}, |
|
|
|
handleImportRelation() { |
|
|
|
this.upload1.title = "导入文献"; |
|
|
|
this.upload1.open = true; |
|
|
|
}, |
|
|
|
handleImportRelation2() { |
|
|
|
this.upload2.title = "导入文献"; |
|
|
|
this.upload2.open = true; |
|
|
|
}, |
|
|
|
deletAllInfo(){ |
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除全部的数据项?').then(function() { |
|
|
|
|