| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <input id="uploadfile" @change= "handleFileChange" type="file" name="file" multiple="multiple" accept=".xls,.xlsx,.mdb,.shp.zip,.gdb.zip" style="display: none"></input> |
| | | <!-- <el-button icon="el-icon-document-add" @click="fileSelect" class="primary">{{ |
| | | $t('common.file') |
| | | }}</el-button> --> |
| | | |
| | | <el-input v-model="formInline.fileName" disabled> |
| | | <template slot="append"> |
| | | <el-button v-if="formInline.fileName == '未选择文件'" |
| | | <el-form-item> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="formInline.fileName" |
| | | |
| | | class="nm-skin-pretty" |
| | | show-word-limit |
| | | :rows="2" resize='none' |
| | | style="width: 650px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <input id="uploadfile" @change= "handleFileChange" type="file" name="file" multiple="multiple" accept=".xls,.xlsx,.mdb,.shp.zip,.gdb.zip" style="display: none"></input> |
| | | |
| | | <el-button v-if="formInline.fileName == '未选择文件'" |
| | | type="info" |
| | | @click="fileSelect"> |
| | | 选择文件 |
| | |
| | | > |
| | | 重置 |
| | | </el-button> |
| | | </template> |
| | | </el-input> |
| | | |
| | | |
| | | |
| | | </el-form-item> |
| | | <br /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.describe')"> |
| | | <el-form-item > |
| | | <el-input |
| | | type="textarea" |
| | | v-model="formInline.descr" |
| | |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | | wareSelectOne: null, |
| | | wareSelectTwo: null, |
| | | |
| | | listWare: [], |
| | | wareSelectOne: null, |
| | | wareSelectTwo: null, |
| | | activeName: '', |
| | | activeName2: '', |
| | | activeName3: '', |
| | |
| | | |
| | | }, |
| | | singleElection3(res) { |
| | | |
| | | this.wareTableFlag = res; |
| | | this.activeName3 = this.tableWareThree[res].tab + res; |
| | | |
| | | }, |
| | | |
| | | //查询所有的表 |
| | |
| | | }, |
| | | //文件上传 |
| | | setFileUpload() { |
| | | this.handlerLoading(true); |
| | | this.fullscreenLoading = true; |
| | | var token = getToken(); |
| | | var formData = new FormData(); |
| | | |
| | |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | |
| | | this.getFileLength(); |
| | | |
| | | this.$message({ |
| | | this.fullscreenLoading = false; |
| | | this.$message({ |
| | | message: '数据上传成功', |
| | | type: 'success' |
| | | }); |
| | | this.getFileLength(); |
| | | |
| | | |
| | | this.clearFileSelect(); |
| | | }, |
| | | error: (rs) => { |
| | | this.fullscreenLoading = false; |
| | | this.$message.error('数据上传失败'); |
| | | this.clearFileSelect(); |
| | | } |
| | | }); |
| | | |
| | | this.handlerLoading(false); |
| | | |
| | | }, |
| | | //获取文件上传数据 |
| | | async getFileLength() { |
| | |
| | | $("#uploadfile").click(); |
| | | }, |
| | | handleFileChange(event) { |
| | | var std =[]; |
| | | var len = event.currentTarget.files.length; |
| | | for(var i = 0;i<len;i++){ |
| | | var f = event.currentTarget.files[i]; |
| | | std.push(f.name) |
| | | } |
| | | |
| | | // var fs = document.getElementById("uploadfile"); |
| | | var f = event.currentTarget.files[0] |
| | | this.formInline.fileName = f.name; |
| | | this.formInline.fileName =std.toString() ; |
| | | |
| | | |
| | | }, |
| | | clearFileSelect(){ |
| | |
| | | |
| | | //Loading显隐 |
| | | handlerLoading(res) { |
| | | this.fullscreenLoading = res; |
| | | |
| | | }, |
| | | //目录切换 |
| | | catalogChange(value) { |
| | |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-loading-spinner i { |
| | | color: #1890ff !important; |
| | | } |
| | | </style> |