| | |
| | | // BASE_API: '"http://192.168.0.8:8006"', |
| | | // IMG_API: '"http://192.168.0.8:8006/upload/"', |
| | | // |
| | | BASE_API: '"http://192.168.0.69:8006"', |
| | | IMG_API: '"http://192.168.0.69:8006/upload/"', |
| | | // BASE_API: '"http://192.168.0.69:8006"', |
| | | // IMG_API: '"http://192.168.0.69:8006/upload/"', |
| | | |
| | | // BASE_API: '"http://192.168.0.35:8006"', |
| | | // IMG_API: '"http://192.168.0.35:8006/upload/"', |
| | | BASE_API: '"http://192.168.0.35:8006"', |
| | | IMG_API: '"http://192.168.0.35:8006/upload/"', |
| | | // BASE_API: '"http://192.168.0.62:8006"', |
| | | // IMG_API: '"http://192.168.0.62:8006/upload/"', |
| | | // BASE_API: '"http://222.92.213.22:8006/zhongtai"', |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskAnaUnit/import', |
| | | url: process.env.BASE_API + '/prevent/fileHandler/insert/riskUnitImport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskEvent/import', |
| | | url: process.env.BASE_API + '/prevent/fileHandler/insert/eventImport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskControlMeasure/import', |
| | | url: process.env.BASE_API + '/prevent/fileHandler/insert/measureImport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/riskSource/import', |
| | | url: process.env.BASE_API + '/prevent/fileHandler/insert/deviceImport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showAnalyseUnitForm('','新增')">新增</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showDepartmentChart()">图表</el-button>--> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button>--> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel()">导出</el-button>--> |
| | | </div> |
| | | <div class="table_content"> |
| | |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskControlMeasureForm('','新增')" v-show="showCurrent">新增</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button>--> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel">导出</el-button>--> |
| | | </div> |
| | | <div class="table_content"> |
| | |
| | | </div> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskEvent('','新增')">新增</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button>--> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel">导出</el-button>--> |
| | | </div> |
| | | <div class="table_content"> |
| | |
| | | |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskSourceForm('','新增')">新增</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button>--> |
| | | <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="showImportDialog()">导入</el-button> |
| | | <!-- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" @click="exportToExcel()">导出</el-button>--> |
| | | </div> |
| | | <div class="table_content"> |
| | |
| | | }) |
| | | } |
| | | else{ |
| | | let allData = res.data.result |
| | | let allData = res.data.result.map(item => { |
| | | return { |
| | | name:item.name, |
| | | level:this.levelList.find(i =>i.id === item.level).name, |
| | | depName:item.depName, |
| | | location:item.location, |
| | | } |
| | | }) |
| | | import('@/vendor/Export2Excel').then((excel) => { |
| | | const tHeader = [ |
| | | '生产装置名称', |
| | | '风险等级', |
| | | '可能导致的事故描述', |
| | | '区域位置', |
| | | '所属部门名称', |
| | | '区域位置', |
| | | |
| | | ] |
| | | const filterVal = [ |
| | | 'name', |
| | | 'level', |
| | | 'accidentDesc', |
| | | 'location', |
| | | 'depName', |
| | | 'location', |
| | | |
| | | ] |
| | | const data = this.formatJson(filterVal, allData) |
| | | excel.export_json_to_excel({ |