Browse Source

dd

shibei_master
13176889840 3 years ago
parent
commit
3ecf0e4fcd
  1. 20
      src/views/components/resiSearch.vue
  2. 7
      src/views/modules/base/resi.vue
  3. 4
      src/views/modules/communityParty/elegant/index.vue

20
src/views/components/resiSearch.vue

@ -65,7 +65,7 @@
> >
</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="单元"
@ -98,7 +98,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 +190,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 +373,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 +442,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 +456,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',

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

@ -12,11 +12,12 @@
@click="handleAdd">新增</el-button> @click="handleAdd">新增</el-button>
<el-button class="diy-button--export" <el-button class="diy-button--export"
size="small" size="small"
@click="handleExportModule('room')">下载人口模板</el-button> @click="handleExportModule('room')">下载模板</el-button>
<el-upload ref="upload" <el-upload ref="upload"
class="upload-demo" class="upload-demo"
action="uploadUlr" action="uploadUlr"
:limit="1" :limit="1"
:accept="'.xls,xlsx'"
:with-credentials="true" :with-credentials="true"
:show-file-list="false" :show-file-list="false"
:auto-upload="true" :auto-upload="true"
@ -277,7 +278,7 @@ export default {
return { return {
exportBtn: false, exportBtn: false,
exportBtnTitle: '导出', exportBtnTitle: '导出',
importBtnTitle: '导入人员数据', importBtnTitle: '导入',
importLoading: false, importLoading: false,
rowVisible: false, rowVisible: false,
tableLoading: false, tableLoading: false,
@ -659,7 +660,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()
}, },
handleClick (tab, event) { handleClick (tab, event) {

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

@ -236,7 +236,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: '导出',
@ -477,7 +477,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() {

Loading…
Cancel
Save