|
|
@ -7,14 +7,10 @@ |
|
|
|
@search="handleSearch" /> |
|
|
|
<el-card class="resi-card-table"> |
|
|
|
<div class="resi-row-btn"> |
|
|
|
<el-button type="success" |
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
class="diy-button--add" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
<el-button type="warning" |
|
|
|
size="small" |
|
|
|
:loading="exportBtn" |
|
|
|
@click="handleExport">{{exportBtnTitle}}</el-button> |
|
|
|
<!-- <el-button type="primary" size="small">下载人口模板</el-button> --> |
|
|
|
<el-upload ref="upload" |
|
|
|
class="upload-demo" |
|
|
|
action="uploadUlr" |
|
|
@ -26,10 +22,22 @@ |
|
|
|
:on-success="handleExcelSuccess" |
|
|
|
:before-upload="beforeExcelUpload" |
|
|
|
:http-request="uploadHttpRequest"> |
|
|
|
<el-button type="danger" |
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
class="diy-button--delete" |
|
|
|
:loading="importLoading">{{importBtnTitle}}</el-button> |
|
|
|
</el-upload> |
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
class="diy-button--reset" |
|
|
|
:loading="exportBtn" |
|
|
|
@click="handleExport">{{exportBtnTitle}}</el-button> |
|
|
|
<!-- <el-button type="primary" size="small">下载人口模板</el-button> --> |
|
|
|
<el-button |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule('room')">下载人口模板</el-button> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
<el-table ref="ref_table" :data="tableData" |
|
|
@ -77,16 +85,18 @@ |
|
|
|
<el-button @click="handleTransfer(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="btn-color-look">调动</el-button> |
|
|
|
class="div-table-button--detail" |
|
|
|
>调动</el-button> |
|
|
|
<el-button @click="handleChangeRecord(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="btn-color-look">变更记录</el-button> |
|
|
|
class="div-table-button--detail" |
|
|
|
>变更记录</el-button> |
|
|
|
<template v-if="filterEdit(scope.row.ORG_ID)"> |
|
|
|
<el-button @click="handleEdit(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="btn-color-edit">编辑</el-button> |
|
|
|
class="div-table-button--edit">编辑</el-button> |
|
|
|
<el-popconfirm title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDel(scope.row)"> |
|
|
|
<!-- <el-button slot="reference" |
|
|
@ -102,7 +112,7 @@ |
|
|
|
<div class="div_del"> |
|
|
|
<el-checkbox :indeterminate="isIndeterminate" |
|
|
|
v-model="selAllFlag" |
|
|
|
:disabled="tableData.length==0" |
|
|
|
:disabled="selAllFlagDisabled" |
|
|
|
@change="handleSelectAll">全选</el-checkbox> |
|
|
|
<el-button v-if="selection.length > 0" style="margin-left:15px" |
|
|
|
type="danger" |
|
|
@ -277,6 +287,7 @@ export default { |
|
|
|
disabled: false, |
|
|
|
pageLoading: false, |
|
|
|
selAllFlag: false, |
|
|
|
selAllFlagDisabled: false, |
|
|
|
isIndeterminate: false, |
|
|
|
dialogEditVisible: false, |
|
|
|
dialogVisible: false, |
|
|
@ -473,6 +484,35 @@ export default { |
|
|
|
this.conditions = val |
|
|
|
this.getTableData() |
|
|
|
}, |
|
|
|
async handleExportModule () { |
|
|
|
let url = "/epmetuser/icresiuser/import/download-template" |
|
|
|
|
|
|
|
|
|
|
|
let params = {} |
|
|
|
await this.$http |
|
|
|
.post(url, params) |
|
|
|
.then(res => { |
|
|
|
// this.download(res.data, title + '.xls') |
|
|
|
if (res.headers["content-disposition"]) { |
|
|
|
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) |
|
|
|
console.log('filename', fileName) |
|
|
|
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) |
|
|
|
var url = window.URL.createObjectURL(blob) |
|
|
|
var aLink = document.createElement('a') |
|
|
|
aLink.style.display = 'none' |
|
|
|
aLink.href = url |
|
|
|
aLink.setAttribute('download', fileName) |
|
|
|
document.body.appendChild(aLink) |
|
|
|
aLink.click() |
|
|
|
document.body.removeChild(aLink) //下载完成移除元素 |
|
|
|
window.URL.revokeObjectURL(url) //释放掉blob对象 |
|
|
|
} else this.$message.error('下载失败') |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log('err', err) |
|
|
|
return this.$message.error('网络错误') |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 下载文件 |
|
|
|
download (data, fileName) { |
|
|
|
console.log('data', data) |
|
|
@ -859,6 +899,11 @@ export default { |
|
|
|
isChecked: this.filterEdit(item.ORG_ID) |
|
|
|
} |
|
|
|
}) |
|
|
|
let _selAllFlagDisabled = true |
|
|
|
this.tableData.forEach(item => { |
|
|
|
if (item.isChecked) _selAllFlagDisabled = false |
|
|
|
}) |
|
|
|
this.selAllFlagDisabled = _selAllFlagDisabled |
|
|
|
this.total = res.data.total |
|
|
|
} |
|
|
|
}) |
|
|
@ -1135,15 +1180,15 @@ export default { |
|
|
|
margin-left: 10px; |
|
|
|
border: 0; |
|
|
|
} |
|
|
|
.el-button--success { |
|
|
|
background: rgba(34, 193, 195, 1); |
|
|
|
} |
|
|
|
.el-button--warning { |
|
|
|
background: rgba(254, 179, 73, 1); |
|
|
|
} |
|
|
|
.el-button--danger { |
|
|
|
background: rgba(254, 98, 82, 1); |
|
|
|
} |
|
|
|
// .el-button--success { |
|
|
|
// background: rgba(34, 193, 195, 1); |
|
|
|
// } |
|
|
|
// .el-button--warning { |
|
|
|
// background: rgba(254, 179, 73, 1); |
|
|
|
// } |
|
|
|
// .el-button--danger { |
|
|
|
// background: rgba(254, 98, 82, 1); |
|
|
|
// } |
|
|
|
} |
|
|
|
.resi-other { |
|
|
|
width: 100%; |
|
|
|