|
|
@ -84,7 +84,7 @@ |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
|
|
|
|
<el-button style="float:left" |
|
|
|
<el-button |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule">下载模板</el-button> |
|
|
@ -96,16 +96,26 @@ |
|
|
|
accept=".xls,.xlsx" |
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:http-request="uploadFile"> |
|
|
|
<el-button style="margin-left:10px" |
|
|
|
size="small" |
|
|
|
class="diy-button--delete">导入</el-button> |
|
|
|
:http-request="uploadHttpRequest"> |
|
|
|
<el-button size="small" |
|
|
|
style="margin-left: 10px" |
|
|
|
class="diy-button--delete" |
|
|
|
:loading="importLoading">{{importBtnTitle}}</el-button> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
<el-button style="float:left;margin-left:10px" |
|
|
|
<el-button style="margin-left:10px" |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="handleExport">导出</el-button> |
|
|
|
:loading="exportBtn" |
|
|
|
@click="handleExport">{{ exportBtnTitle }}</el-button> |
|
|
|
<el-button style="margin-left:15px" |
|
|
|
class="diy-button--more" |
|
|
|
size="small" |
|
|
|
@click="handleSendNotice">发送通知</el-button> |
|
|
|
<el-button style="margin-left:15px" |
|
|
|
class="diy-button--more" |
|
|
|
size="small" |
|
|
|
@click="handleDeletes">取消关注</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table class="table" |
|
|
@ -114,7 +124,10 @@ |
|
|
|
:height="tableHeight" |
|
|
|
v-loading="tableLoading" |
|
|
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
|
|
|
style="width: 100%"> |
|
|
|
style="width: 100%" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" |
|
|
|
width="55"></el-table-column> |
|
|
|
<el-table-column label="序号" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
@ -125,7 +138,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="姓名" |
|
|
|
width="90"> |
|
|
|
width="100"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="mobile" |
|
|
|
header-align="center" |
|
|
@ -178,7 +191,7 @@ |
|
|
|
label="备注" |
|
|
|
min-width="120"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="heSuanCheck" |
|
|
|
<el-table-column prop="heSuanCheckDesc" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="核酸检测关注名单" |
|
|
@ -197,15 +210,41 @@ |
|
|
|
class="div-table-button--detail" |
|
|
|
size="small" |
|
|
|
@click="handleDetail(scope.row)">查看</el-button> |
|
|
|
<el-button type="text" |
|
|
|
<el-button v-if="scope.row.userType != 'resi'" type="text" |
|
|
|
class="div-table-button--edit" |
|
|
|
size="small" |
|
|
|
@click="handleEdit(scope.row)">修改</el-button> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
<el-popover popper-class="btn-popper" |
|
|
|
placement="bottom" |
|
|
|
style="margin-left:10px" |
|
|
|
width="20" |
|
|
|
trigger="click"> |
|
|
|
<div class="more-btn"> |
|
|
|
<el-button type="text" |
|
|
|
class="div-table-button--detail--noline" |
|
|
|
size="small" |
|
|
|
@click="handleNoticeList(scope.row)">通知记录</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="more-btn"> |
|
|
|
<el-button type="text" |
|
|
|
class="div-table-button--detail--noline" |
|
|
|
size="small" |
|
|
|
@click="handleVisiteList(scope.row) ">随访记录</el-button> |
|
|
|
</div> |
|
|
|
<div v-if="scope.row.userType != 'resi'" class="more-btn"> |
|
|
|
<el-button type="text" |
|
|
|
class="div-table-button--delete--noline " |
|
|
|
size="small" |
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-button type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--more" |
|
|
|
slot="reference">更多<i class="el-icon-caret-bottom"></i></el-button> |
|
|
|
</el-popover> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -231,17 +270,55 @@ |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose"> |
|
|
|
<travel-form ref="ref_form" |
|
|
|
<travel-form v-if="formShow" ref="ref_form" |
|
|
|
@dialogCancle="addFormCancle" |
|
|
|
@dialogOk="addFormOk"></travel-form> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 发送通知弹出框 --> |
|
|
|
<el-dialog :visible.sync="sendNoticeFormShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
title="发送通知" |
|
|
|
width="1050px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose"> |
|
|
|
<nf-send-notice ref="ref_sendnotice" |
|
|
|
@dialogCancle="diaClose"></nf-send-notice> |
|
|
|
</el-dialog> |
|
|
|
<!-- 通知记录弹出框 --> |
|
|
|
<el-dialog :visible.sync="noticeListFormShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
title="通知记录" |
|
|
|
width="1050px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose"> |
|
|
|
<nf-notice-list ref="ref_noticelist" |
|
|
|
@dialogCancle="diaClose"></nf-notice-list> |
|
|
|
</el-dialog> |
|
|
|
<!-- 随访记录弹出框 --> |
|
|
|
<el-dialog :visible.sync="visiteListFormShow" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" |
|
|
|
title="随访记录" |
|
|
|
width="1050px" |
|
|
|
top="5vh" |
|
|
|
class="dialog-h" |
|
|
|
@closed="diaClose"> |
|
|
|
<nf-visite-list ref="ref_visitelist" |
|
|
|
@dialogCancle="diaClose"></nf-visite-list> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import travelForm from './travelForm' |
|
|
|
import nfNoticeList from './natFocus/nfNoticeList' |
|
|
|
import nfSendNotice from './natFocus/nfSendNotice' |
|
|
|
import nfVisiteList from './natFocus/nfVisiteList' |
|
|
|
|
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
@ -250,6 +327,13 @@ let loading // 加载动画 |
|
|
|
export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
sendNoticeFormShow: false, |
|
|
|
visiteListFormShow: false, |
|
|
|
noticeListFormShow: false, |
|
|
|
exportBtn: false, |
|
|
|
exportBtnTitle: '导出', |
|
|
|
importBtnTitle: '导入', |
|
|
|
importLoading: false, |
|
|
|
loading: false, |
|
|
|
total: 0, |
|
|
|
pageSize: 20, |
|
|
@ -258,7 +342,7 @@ export default { |
|
|
|
sHeight: 0, |
|
|
|
|
|
|
|
agencyId: '', |
|
|
|
|
|
|
|
selectionAll: [], |
|
|
|
timeRange: [], |
|
|
|
formData: { |
|
|
|
name: '',//负责人 |
|
|
@ -278,7 +362,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
travelForm |
|
|
|
travelForm, |
|
|
|
nfNoticeList, |
|
|
|
nfSendNotice, |
|
|
|
nfVisiteList |
|
|
|
}, |
|
|
|
async created () { |
|
|
|
|
|
|
@ -300,8 +387,10 @@ export default { |
|
|
|
this.loadTable() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
console.log('val----', val) |
|
|
|
this.selectionAll = val |
|
|
|
}, |
|
|
|
|
|
|
|
async loadTable () { |
|
|
|
this.tableLoading = true |
|
|
@ -347,8 +436,84 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
diaClose () { |
|
|
|
this.$refs.ref_form.resetData() |
|
|
|
// this.$refs.ref_form.resetData() |
|
|
|
this.formShow = false |
|
|
|
this.sendNoticeFormShow = false |
|
|
|
this.noticeListFormShow = false |
|
|
|
this.visiteListFormShow = false |
|
|
|
}, |
|
|
|
handleNoticeList (row) { |
|
|
|
this.noticeListFormShow = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ref_noticelist.initTable(row.idCard) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
handleVisiteList (row) { |
|
|
|
|
|
|
|
this.visiteListFormShow = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ref_visitelist.initTable(row, '0') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
handleSendNotice () { |
|
|
|
if (this.selectionAll.length === 0) { |
|
|
|
this.$message.info('请选择要通知的人员') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.sendNoticeFormShow = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.ref_sendnotice.initForm(this.selectionAll) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
async handleDeletes (row) { |
|
|
|
if (this.selectionAll.length === 0) { |
|
|
|
this.$message.info('请选择要取消关注的名单') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$confirm("确认取消关注选择的名单?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.deleteFocus(row) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
if (err == "cancel") { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
async deleteFocus (row) { |
|
|
|
const url = "/epmetuser/icEpidemicSpecialAttention/cancel-attention" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del" |
|
|
|
let idCards = [] |
|
|
|
|
|
|
|
this.selectionAll.forEach(element => { |
|
|
|
idCards.push(element.idCard) |
|
|
|
}); |
|
|
|
let params = { |
|
|
|
attentionType: 0, |
|
|
|
idCards: idCards |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "操作成功" |
|
|
|
}); |
|
|
|
|
|
|
|
this.loadTable() |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleDetail (row) { |
|
|
@ -446,27 +611,48 @@ export default { |
|
|
|
|
|
|
|
//导出表格 |
|
|
|
async handleExport () { |
|
|
|
let title = this.agencyObj.label |
|
|
|
title = title + '—房屋列表' |
|
|
|
|
|
|
|
const url = "/gov/org/house/exporthouseinfo" |
|
|
|
this.exportBtn = true |
|
|
|
this.exportBtnTitle = '正在导出...' |
|
|
|
let params = { |
|
|
|
ownerName: this.ownerName, |
|
|
|
ownerPhone: this.ownerPhone, |
|
|
|
buildingId: this.agencyObj.id |
|
|
|
...this.formData |
|
|
|
} |
|
|
|
|
|
|
|
app.ajax.exportFilePost( |
|
|
|
url, |
|
|
|
params, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
|
this.download(data, title + '.xls') |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg); |
|
|
|
} |
|
|
|
); |
|
|
|
// .post('epmetuser/icresiuser/exportExcel', params) |
|
|
|
// await axios({ |
|
|
|
// url: window.SITE_CONFIG['apiURL'] + '/epmetuser/tripreport/export', |
|
|
|
// // url: 'epmetuser/icresiuser/exportExcel', |
|
|
|
// method: 'post', |
|
|
|
// data: params, |
|
|
|
// responseType: 'blob' |
|
|
|
// }) |
|
|
|
await this.$http({ |
|
|
|
method: 'POST', |
|
|
|
url: '/epmetuser/tripreport/export', |
|
|
|
responseType: 'blob', |
|
|
|
data: params |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
|
|
|
|
console.log('resllll', res) |
|
|
|
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对象 |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log('获取导出情失败', err) |
|
|
|
this.$message.error('获取导出失败') |
|
|
|
}) |
|
|
|
this.exportBtnTitle = '导出' |
|
|
|
this.exportBtn = false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
@ -496,24 +682,40 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleExportModule () { |
|
|
|
async handleExportModule () { |
|
|
|
let title = '' |
|
|
|
title = '房屋模板' |
|
|
|
|
|
|
|
const url = "/gov/org/house/exporttemplate" |
|
|
|
const url = "/epmetuser/tripreport/template-download" |
|
|
|
let params = {} |
|
|
|
|
|
|
|
app.ajax.exportFilePost( |
|
|
|
await this.$http({ |
|
|
|
method: 'POST', |
|
|
|
url, |
|
|
|
params, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
|
this.download(data, title + '.xls') |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg); |
|
|
|
} |
|
|
|
); |
|
|
|
responseType: 'blob', |
|
|
|
data: params |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
console.log('res----dddd', 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('网络错误') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 上传文件之前的钩子 |
|
|
@ -536,6 +738,32 @@ export default { |
|
|
|
handleExceed (files, fileList) { |
|
|
|
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) |
|
|
|
}, |
|
|
|
async uploadHttpRequest (file) { |
|
|
|
this.importLoading = true |
|
|
|
this.importBtnTitle = '正在上传中...' |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '导入中,请到系统管理-导入记录中查看进度', |
|
|
|
duration: 0 |
|
|
|
}) |
|
|
|
const formData = new FormData() //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|
|
|
formData.append('file', file.file) //添加文件对象 |
|
|
|
await this.$http |
|
|
|
.post('/epmetuser/tripreport/import', formData).then(res => { |
|
|
|
console.log('res-up', res) |
|
|
|
if (res.data.code == 0 && res.data.msg == 'success') { |
|
|
|
// this.$message.success('导入成功') |
|
|
|
this.loadTable() |
|
|
|
} else this.$message.error(res.data.msg) |
|
|
|
}).catch(err => { |
|
|
|
console.log('失败', err) |
|
|
|
file.onError() //上传失败的文件会从文件列表中删除 |
|
|
|
// this.$message.error('导入失败') |
|
|
|
}) |
|
|
|
this.importLoading = false |
|
|
|
this.importBtnTitle = '导入' |
|
|
|
this.$refs.upload.clearFiles() |
|
|
|
}, |
|
|
|
|
|
|
|
async uploadFile () { |
|
|
|
if (this.fileName == "") { |
|
|
|