ruanqi 3 years ago
parent
commit
18e0e35bfb
  1. 8
      src/views/modules/eam/com_eam_object_add_update.vue
  2. 10
      src/views/modules/eam/eam_device_list.vue

8
src/views/modules/eam/com_eam_object_add_update.vue

@ -78,6 +78,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="关联机台:" >
<el-input v-model="pageData.resourceID" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveEamObject()">保存</el-button> <el-button type="primary" @click="saveEamObject()">保存</el-button>
@ -115,6 +122,7 @@ export default {
groupID: '', groupID: '',
supplierID: '', supplierID: '',
manufacturerID: '', manufacturerID: '',
resourceID: '',
seqNo: '', seqNo: '',
purchessDate: '', purchessDate: '',
active: 'Y', active: 'Y',

10
src/views/modules/eam/eam_device_list.vue

@ -148,7 +148,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a> <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>
<a @click="downloadFile(scope.row.url)" >下载2</a>
<a @click="downloadFile(scope.row)" >下载2</a>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -922,6 +922,7 @@
import { import {
deleteResourceSpare, deleteResourceSpare,
} from '@/api/partspare/resourcespare.js' } from '@/api/partspare/resourcespare.js'
import FileSaver from 'file-saver';
/*引入組件*/ /*引入組件*/
import comAddUpdateEamObject from "./com_eam_object_add_update";/*新增或者修改的組件*/ import comAddUpdateEamObject from "./com_eam_object_add_update";/*新增或者修改的組件*/
import comEamObjectUploadFile from "./com_eam_object_upload_file";/*上传文件的組件*/ import comEamObjectUploadFile from "./com_eam_object_upload_file";/*上传文件的組件*/
@ -3122,8 +3123,11 @@
return this.exportList; return this.exportList;
}, },
downloadFile(url){
downloadFile(row){
var file = new Blob("http://192.168.1.130:80/file/"+row.url, {
type: 'application/'+'txt'
});
FileSaver.saveAs(file,row.fileName);
}, },
startDownload() { startDownload() {
// this.exportData = this.dataList // this.exportData = this.dataList

Loading…
Cancel
Save