Browse Source

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

shibei_master
jiangyy 3 years ago
parent
commit
1bde660958
  1. 25
      src/views/components/resiSearch.vue
  2. 16
      src/views/modules/communityParty/elegant/index.vue
  3. 33
      src/views/modules/communityService/sqzzz/index.vue

25
src/views/components/resiSearch.vue

@ -52,6 +52,7 @@
placeholder="楼号" placeholder="楼号"
size="small" size="small"
clearable clearable
style="width: 120px;"
class="resi-cell-select" class="resi-cell-select"
:disabled="changeVDisabled" :disabled="changeVDisabled"
@clear="handleClearBuild" @clear="handleClearBuild"
@ -65,12 +66,13 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select <el-select
v-model.trim="form.UNIT_ID" v-model.trim="form.UNIT_ID"
:disabled="changeBDisabled" :disabled="changeBDisabled"
placeholder="单元" placeholder="单元"
size="small" size="small"
clearable clearable
style="width: 120px;"
class="resi-cell-select" class="resi-cell-select"
@click="handleClearDan" @click="handleClearDan"
@change="handleChangeD" @change="handleChangeD"
@ -86,9 +88,10 @@
<el-select <el-select
v-model.trim="form.HOME_ID" v-model.trim="form.HOME_ID"
:disabled="changeDDisabled" :disabled="changeDDisabled"
placeholder="号" placeholder="号"
size="small" size="small"
clearable clearable
style="width: 120px;"
class="resi-cell-select" class="resi-cell-select"
> >
<el-option <el-option
@ -98,7 +101,7 @@
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> --> </el-select>
</div> </div>
</div> </div>
</el-col> </el-col>
@ -190,6 +193,7 @@
</el-col> --> </el-col> -->
<el-col :span="24"> <el-col :span="24">
<el-button type="primary" size="small" @click="handleSearch">查询</el-button> <el-button type="primary" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button>
</el-col> </el-col>
</el-row> </el-row>
<div class="resi-down" @click="handleOpenSearch"> <div class="resi-down" @click="handleOpenSearch">
@ -372,6 +376,12 @@ export default {
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
}, },
resetForm(formName) {
for(const n in this.form) {
this.form[n] = ''
}
this.handleSearch()
},
handleSearch() { handleSearch() {
// console.log('formmmmm---', this.form) // console.log('formmmmm---', this.form)
const itemTypes = ['daterange', 'timerange'] const itemTypes = ['daterange', 'timerange']
@ -435,9 +445,13 @@ export default {
if (n === val) { if (n === val) {
if (this.fixedList.length > 0) { if (this.fixedList.length > 0) {
let _item = {} let _item = {}
let hasVal = false
this.fixedList.forEach((item, index) => { this.fixedList.forEach((item, index) => {
if (item.columnName === val) { if (item.columnName == val) {
hasVal = true
item.columnValue[0] = this.form[val] item.columnValue[0] = this.form[val]
if (!this.form[val]) this.fixedList.splice(index, 1)
console.log('fixedList----val', this.fixedList)
} else { } else {
_item = { _item = {
queryType: 'equal', queryType: 'equal',
@ -445,10 +459,11 @@ export default {
columnName: val, columnName: val,
columnValue: [this.form[val]] columnValue: [this.form[val]]
} }
console.log('fixedList----else', _item)
// this.$set(this.fixedList, index, _item) // this.$set(this.fixedList, index, _item)
} }
}) })
if (Object.keys(_item).length > 0) this.fixedList.push(_item) if (Object.keys(_item).length > 0 && !hasVal) this.fixedList.push(_item)
} else { } else {
this.$set(this.fixedList, 0, { this.$set(this.fixedList, 0, {
queryType: 'equal', queryType: 'equal',

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

@ -48,6 +48,10 @@
<div class="resi-row-btn"> <div class="resi-row-btn">
<el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button> <el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button>
<el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload <el-upload
ref="upload" ref="upload"
class="upload-demo" class="upload-demo"
@ -62,11 +66,9 @@
> >
<el-button size="small" class="diy-button--delete" :loading="importLoading">{{importBtnTitle}}</el-button> <el-button size="small" class="diy-button--delete" :loading="importLoading">{{importBtnTitle}}</el-button>
</el-upload> </el-upload>
<el-button class="diy-button--reset" size="small" :loading="exportBtn" @click="handleExport">{{ exportBtnTitle }}</el-button> <el-button class="diy-button--reset" size="small" :loading="exportBtn" @click="handleExport">{{ exportBtnTitle }}</el-button>
<!-- <el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button> -->
</div> </div>
<el-table <el-table
@ -236,7 +238,7 @@ export default {
data() { data() {
return { return {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入数据', importBtnTitle: '导入',
importLoading: false, importLoading: false,
exportBtn: false, exportBtn: false,
exportBtnTitle: '导出', exportBtnTitle: '导出',
@ -381,7 +383,7 @@ export default {
this.unloadPencent = Number(file.percentage.toFixed(0)) this.unloadPencent = Number(file.percentage.toFixed(0))
}, },
async handleExportModule () { async handleExportModule () {
let url = "/resi/partymember/import/template-download" let url = "/resi/partymember/icpartymemberstyle/import/template-download"
let params = {} let params = {}
@ -477,7 +479,7 @@ export default {
// this.$message.error('') // this.$message.error('')
// }) // })
this.importLoading = false this.importLoading = false
this.importBtnTitle = '导入数据' this.importBtnTitle = '导入'
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()
}, },
async handleExport() { async handleExport() {

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

@ -35,6 +35,10 @@
<el-button class="diy-button--add" size="small" @click="handleAdd" <el-button class="diy-button--add" size="small" @click="handleAdd"
>新增</el-button >新增</el-button
> >
<el-button
class="diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload <el-upload
ref="upload" ref="upload"
class="upload-btn" class="upload-btn"
@ -232,6 +236,35 @@ export default {
this.getTableData(); this.getTableData();
}, },
methods: { methods: {
async handleExportModule () {
let url = "/heart/iccommunityselforganization/import-template-download"
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('网络错误')
})
},
// //
handleExcelSuccess(res, file) { handleExcelSuccess(res, file) {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {

Loading…
Cancel
Save