Browse Source

Merge branch 'dev-220309' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-220309

shibei_master
dai 3 years ago
parent
commit
ddb3fd12ce
  1. 9
      src/views/modules/base/resi.vue
  2. 68
      src/views/modules/communityParty/elegant/index.vue
  3. 8
      src/views/modules/communityService/measure/index.vue
  4. 8
      src/views/modules/communityService/sqzzz/index.vue
  5. 9
      src/views/modules/workSys/demandCate.vue
  6. 12
      src/views/modules/workSys/resiCate.vue

9
src/views/modules/base/resi.vue

@ -48,6 +48,7 @@
@selection-change="selectionChange">
<el-table-column type="selection"
fixed="left"
align="center"
:selectable="checkSelect"
width="55" />
<el-table-column label="序号"
@ -489,8 +490,12 @@ export default {
let params = {}
await this.$http
.post(url, params)
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
console.log('res----dddd', res)
// this.download(res.data, title + '.xls')

68
src/views/modules/communityParty/elegant/index.vue

@ -381,28 +381,68 @@ export default {
this.uploading = true
this.unloadPencent = Number(file.percentage.toFixed(0))
},
download (data, fileName) {
console.log('data', data)
if (!data) {
return
}
var csvData = new Blob([data])
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(csvData, fileName)
}
// for Non-IE (chrome, firefox etc.)
else {
var a = document.createElement('a')
document.body.appendChild(a)
a.style = 'display: none'
var url = window.URL.createObjectURL(csvData)
a.href = url
a.download = fileName
a.click()
a.remove()
window.URL.revokeObjectURL(url)
}
},
async handleExportModule () {
let url = "/resi/partymember/icpartymemberstyle/import/template-download"
let params = {}
await this.$http
.post(url, params)
// app.ajax.exportFilePost(
// url,
// params,
// (data, rspMsg) => {
// this.download(data, 'a.xls')
// },
// (rspMsg, data) => {
// this.$message.error(rspMsg);
// }
// );
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
// this.download(res.data, title + '.xls')
console.log('res-------dd', res)
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
this.download(res.data, fileName)
// 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 => {

8
src/views/modules/communityService/measure/index.vue

@ -131,12 +131,10 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="yellow" @click="resetForm('searchForm')"
>重置</el-button
>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</div>
</el-form>
@ -145,7 +143,7 @@
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="success" @click="handleAdd('add')">新增需求</el-button>
<el-button class="diy-button--add" size="small" @click="handleAdd('add')">新增</el-button>
</div>
<el-table

8
src/views/modules/communityService/sqzzz/index.vue

@ -241,8 +241,12 @@ export default {
let params = {}
await this.$http
.post(url, params)
await this.$http({
method: 'POST',
url,
responseType: 'blob',
data: params
})
.then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {

9
src/views/modules/workSys/demandCate.vue

@ -5,6 +5,7 @@
class="search-card">
<div>
<el-form :inline="true"
ref="searchForm"
:model="form"
class="demo-form-inline">
<el-form-item label="需求分类">
@ -25,6 +26,9 @@
size="small"
@click="handleSearch">查询</el-button>
</el-form-item>
<el-form-item>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
@ -220,6 +224,11 @@ export default {
}
return _val || row[item.columnName]
},
resetForm(formName) {
this.form.firstCategoryCode = ''
this.handleSearch();
},
handleSearch (val) {
console.log('searchhh--', val)
this.currentPage = 1

12
src/views/modules/workSys/resiCate.vue

@ -2,7 +2,7 @@
<div v-if="pageLoading" class="resi-container">
<el-card ref="searchCard" class="search-card">
<div >
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form ref="searchForm" :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="是否预警">
<el-select
v-model="isWarn"
@ -38,6 +38,10 @@
<el-form-item>
<el-button class="diy-button--search" size="small" @click="handleSearch">查询</el-button>
</el-form-item>
<el-form-item>
<el-button class="diy-button--reset" size="small" @click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-card>
@ -335,6 +339,12 @@ export default {
}
return _val || row[item.columnName]
},
resetForm(formName) {
this.isWarn = ''
this.level = ''
this.handleSearch();
},
handleSearch(val) {
console.log('searchhh--', val)
this.currentPage = 1

Loading…
Cancel
Save