|
|
@ -80,7 +80,7 @@ |
|
|
|
:show-file-list='false' |
|
|
|
:before-upload="beforeUpload" |
|
|
|
action="" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
accept=".xlsx" |
|
|
|
:limit="1" |
|
|
|
:on-exceed="handleExceed" |
|
|
|
:http-request="uploadFile"> |
|
|
@ -115,7 +115,6 @@ |
|
|
|
@select-all="handleSelAll" |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column type="selection" |
|
|
|
:selectable="checkSelect" |
|
|
|
width="55"></el-table-column> |
|
|
|
<el-table-column label="序号" |
|
|
|
header-align="center" |
|
|
@ -305,7 +304,7 @@ export default { |
|
|
|
loading: false, |
|
|
|
total: 0, |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 0, |
|
|
|
pageNo: 1, |
|
|
|
tableLoading: false, |
|
|
|
|
|
|
|
selection: [], |
|
|
@ -339,6 +338,9 @@ export default { |
|
|
|
}, |
|
|
|
async created () { |
|
|
|
|
|
|
|
}, |
|
|
|
activated () { |
|
|
|
this.$refs['ref_table'].doLayout() |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
for (let i = 0; i < 11; i++) { |
|
|
@ -524,14 +526,17 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async handleDelete (row) { |
|
|
|
|
|
|
|
this.$confirm("确认删除?", "提示", { |
|
|
|
if (this.selectionAll.length === 0) { |
|
|
|
this.$message.info('请选择要取消关注的名单') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$confirm("确认取消关注选择的名单?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.deleteNat(row) |
|
|
|
this.deleteFocus(row) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
if (err == "cancel") { |
|
|
@ -541,12 +546,17 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async deleteNat (row) { |
|
|
|
const url = "/gov/org/placepatrolteam/del" |
|
|
|
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 = { |
|
|
|
veroFocusId: row.veroFocusId |
|
|
|
attentionType: 1, |
|
|
|
idCards: idCards |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
@ -554,7 +564,7 @@ export default { |
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "删除成功" |
|
|
|
message: "操作成功" |
|
|
|
}); |
|
|
|
|
|
|
|
this.loadTable() |
|
|
@ -573,8 +583,8 @@ export default { |
|
|
|
vaccinationCount: '', |
|
|
|
} |
|
|
|
|
|
|
|
this.pageNo = 0 |
|
|
|
this.loadTable() |
|
|
|
this.pageNo = 1 |
|
|
|
// this.loadTable() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -605,7 +615,7 @@ export default { |
|
|
|
params, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
|
this.download(data, title + '.xls') |
|
|
|
this.download(data, title + '.xlsx') |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg); |
|
|
@ -652,7 +662,7 @@ export default { |
|
|
|
params, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
|
this.download(data, title + '.xls') |
|
|
|
this.download(data, title + '.xlsx') |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg); |
|
|
@ -660,17 +670,18 @@ export default { |
|
|
|
); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 上传文件之前的钩子 |
|
|
|
beforeUpload (file) { |
|
|
|
this.files = file; |
|
|
|
|
|
|
|
const isText = file.type === 'application/vnd.ms-excel' |
|
|
|
const isTextComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' |
|
|
|
|
|
|
|
if (!isText && !isTextComputer) { |
|
|
|
this.$message.error('请选择正确格式的文件') |
|
|
|
const array = file.name.split('.') |
|
|
|
const extension = array[array.length - 1] |
|
|
|
// const isLt1M = (file.size / 1024 / 1024) < 5 |
|
|
|
if (extension !== 'xlsx') { |
|
|
|
this.$message.error('只能上传xlsx文件!') |
|
|
|
return false |
|
|
|
} else { |
|
|
|
this.files = file; |
|
|
|
this.fileName = file.name; |
|
|
|
return true |
|
|
|
} |
|
|
@ -703,7 +714,7 @@ export default { |
|
|
|
fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 |
|
|
|
fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 |
|
|
|
|
|
|
|
this.importRoomLoading = true |
|
|
|
|
|
|
|
window.app.ajax.post2(url, fileFormData, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
@ -718,12 +729,12 @@ export default { |
|
|
|
// }) |
|
|
|
// this.$message.error(rspMsg) |
|
|
|
} |
|
|
|
this.$emit('refreshTree') |
|
|
|
this.loadTable() |
|
|
|
this.importRoomLoading = false |
|
|
|
|
|
|
|
// this.loadTable() |
|
|
|
|
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.importRoomLoading = false |
|
|
|
|
|
|
|
}, { headers: { 'Content-Type': 'multipart/form-data' } }) |
|
|
|
|
|
|
|
|
|
|
|