Browse Source

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

# Conflicts:
#	src/views/modules/base/resi.vue
V1.0
dai 3 years ago
parent
commit
76c9ae9102
  1. 4
      src/assets/scss/modules/management/list-main.scss
  2. 1
      src/views/components/resiForm.vue
  3. 247
      src/views/components/resiSearch.vue

4
src/assets/scss/modules/management/list-main.scss

@ -38,6 +38,10 @@
.u-item-width-communitycascader{ .u-item-width-communitycascader{
width: 141px; width: 141px;
} }
// 查询栏人防年龄两个输入框
.u-item-width-resiAge{
width: 67px;
}
.u-item-width-buildcascader{ .u-item-width-buildcascader{
width: 96px; width: 96px;
} }

1
src/views/components/resiForm.vue

@ -1161,6 +1161,7 @@ export default {
if(flag){ if(flag){
return this.form return this.form
} }
console.log(this.form);
return this.form return this.form
}, },

247
src/views/components/resiSearch.vue

@ -25,6 +25,7 @@
type="date" type="date"
size="small" size="small"
class="u-item-width-daterange" class="u-item-width-daterange"
value-format="yyyy-MM-dd"
placeholder="开始日期"> placeholder="开始日期">
</el-date-picker> </el-date-picker>
<span class="u-data-tag"></span> <span class="u-data-tag"></span>
@ -32,12 +33,16 @@
v-model="form.birthdayEnd" v-model="form.birthdayEnd"
type="date" type="date"
size="small" size="small"
value-format="yyyy-MM-dd"
class="u-item-width-daterange u-data-tag" class="u-item-width-daterange u-data-tag"
placeholder="结束日期"> placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="居民年龄" > <el-form-item label="居民年龄" >
<el-input v-model="form.ageStart" class="u-item-width-normal" placeholder="请输入" clearable size="small"> <el-input v-model="form.ageStart" class="u-item-width-resiAge" placeholder="请输入" clearable size="small">
</el-input>
<span class="u-data-tag"></span>
<el-input v-model="form.ageEnd" class="u-item-width-resiAge u-data-tag" placeholder="请输入" clearable size="small">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="文化程度" > <el-form-item label="文化程度" >
@ -75,33 +80,33 @@
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="agencyIdArray"> <el-form-item >
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; " >所属组织:</span> <span style="width:100px;text-align: right;padding-right:14px;display: inline-block; " >所属组织:</span>
<el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model="agencyIdArray" :options="orgOptions" <el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model="form.agencyId" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader> :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item prop="VILLAGE_ID" > <el-form-item prop="villageId" >
<div class="resi-cell"> <div class="resi-cell">
<div class="resi-cell-value"> <div class="resi-cell-value">
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; " >所属房屋:</span> <span style="width:100px;text-align: right;padding-right:14px;display: inline-block; " >所属房屋:</span>
<el-select v-model.trim="form.VILLAGE_ID" placeholder="请选择小区" size="small" filterable clearable <el-select v-model.trim="form.villageId" placeholder="请选择小区" size="small" filterable clearable
class="u-item-width-communitycascader" @clear="handleClearVillage" @change="handleChangeV"> class="u-item-width-communitycascader" @clear="handleClearVillage" @change="handleChangeV">
<el-option v-for="item in optionsV" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in optionsV" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model.trim="form.BUILD_ID" placeholder="楼号" size="small" filterable clearable <el-select v-model.trim="form.buildId" placeholder="楼号" size="small" filterable clearable
style="margin-left: 5px" class="u-item-width-buildcascader" :disabled="changeVDisabled" @clear="handleClearBuild" style="margin-left: 5px" class="u-item-width-buildcascader" :disabled="changeVDisabled" @clear="handleClearBuild"
@change="handleChangeB"> @change="handleChangeB">
<el-option v-for="item in optionsB" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in optionsB" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model.trim="form.UNIT_ID" :disabled="changeBDisabled" placeholder="单元" size="small" <el-select v-model.trim="form.unitId" :disabled="changeBDisabled" placeholder="单元" size="small"
filterable clearable style="margin-left: 5px" class="u-item-width-buildcascader" @click="handleClearDan" filterable clearable style="margin-left: 5px" class="u-item-width-buildcascader" @click="handleClearDan"
@change="handleChangeD"> @change="handleChangeD">
<el-option v-for="item in optionsD" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in optionsD" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model.trim="form.HOME_ID" :disabled="changeDDisabled" placeholder="房号" size="small" <el-select v-model.trim="form.homeId" :disabled="changeDDisabled" placeholder="房号" size="small"
filterable clearable style="margin-left: 5px" class="u-item-width-buildcascader"> filterable clearable style="margin-left: 5px" class="u-item-width-buildcascader">
<el-option v-for="item in optionsH" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in optionsH" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
@ -208,31 +213,7 @@ export default {
} }
}) })
let constForm = { let constForm = {
name:'',
mobile:'',
idNum:'',
birthdayStart:'',
birthdayEnd:'',
ageStart:'',
ageEnd:'',
gender:'',
cultureLevel:'',
localResidenceFlag:'',
householdSituation:'',
nation:'',
agencyId:'',
buildId:'',
homeId:'',
unitId:'',
gridId:'',
villageId:'',
categoryKey:[],
remark:'',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
} }
let orgOptionProps = { let orgOptionProps = {
multiple: false, multiple: false,
@ -278,13 +259,31 @@ export default {
fixedList: [], fixedList: [],
constForm, constForm,
form: { form: {
...form, name:'',
agencyId : '', mobile:'',
idNum:'',
birthdayStart:'',
birthdayEnd:'',
ageStart:'',
ageEnd:'',
gender:'',
cultureLevel:'',
localResidenceFlag:'',
householdSituation:'',
nation:'',
agencyId:'',
buildId:'',
homeId:'',
unitId:'',
gridId:'',
villageId:'',
categoryKey:[],
remark:'',
GRID_ID: '', GRID_ID: '',
VILLAGE_ID: '', villageId: '',
BUILD_ID: '', buildId: '',
UNIT_ID: '', unitId: '',
HOME_ID: '' homeId: ''
}, },
tempFormList, tempFormList,
pickerOptions: { pickerOptions: {
@ -449,13 +448,13 @@ export default {
} }
}, },
changeVDisabled() { changeVDisabled() {
return !this.form.VILLAGE_ID return !this.form.villageId
}, },
changeBDisabled() { changeBDisabled() {
return !this.form.BUILD_ID return !this.form.buildId
}, },
changeDDisabled() { changeDDisabled() {
return !this.form.UNIT_ID return !this.form.unitId
}, },
}, },
watch: { watch: {
@ -513,17 +512,17 @@ export default {
return len == 1 ? 24 : 6 return len == 1 ? 24 : 6
}, },
handleClearVillage() { handleClearVillage() {
this.form.BUILD_ID = '' this.form.buildId = ''
this.form.HOME_ID = '' this.form.homeId = ''
}, },
handleClearBuild() { handleClearBuild() {
this.form.BUILD_ID = '' this.form.buildId = ''
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
}, },
handleClearDan() { handleClearDan() {
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
}, },
resetForm(formName) { resetForm(formName) {
for (const n in this.form) { for (const n in this.form) {
@ -545,58 +544,58 @@ export default {
// this.handleSearch() // this.handleSearch()
// this.orgOptions = []; // this.orgOptions = [];
}, },
handleSearch() { // handleSearch() {
if (this.showSmartSearchForm) { // if (this.showSmartSearchForm) {
let refObj = this.$refs['ref_rule'] // let refObj = this.$refs['ref_rule']
refObj.getRule() // refObj.getRule()
} else { // } else {
// debugger // // debugger
// console.log('formmmmm---', this.form) // // console.log('formmmmm---', this.form)
const itemTypes = ['daterange', 'timerange', 'checkbox'] // const itemTypes = ['daterange', 'timerange', 'checkbox']
let a = this.tempFormList.filter(item => item.itemType != 'inputRange') // let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
let arr = a.filter(n => n.isChange).map((item) => { // let arr = a.filter(n => n.isChange).map((item) => {
return { // return {
queryType: item.queryType, // queryType: item.queryType,
tableName: item.tableName, // tableName: item.tableName,
columnName: item.columnName, // columnName: item.columnName,
columnValue: this.form[item.columnName] && // columnValue: this.form[item.columnName] &&
(itemTypes.includes(item.queryType) || // (itemTypes.includes(item.queryType) ||
itemTypes.includes(item.itemType) || item.multiSelect == 1 // itemTypes.includes(item.itemType) || item.multiSelect == 1
? this.form[item.columnName] // ? this.form[item.columnName]
: [this.form[item.columnName].toString()]) // : [this.form[item.columnName].toString()])
} // }
}) // })
const arr2 = arr.filter(item => item.columnValue.length > 0) // const arr2 = arr.filter(item => item.columnValue.length > 0)
let arr1 = this.fixedList // let arr1 = this.fixedList
.filter((n) => n.columnValue.length > 0) // .filter((n) => n.columnValue.length > 0)
.map((item) => { // .map((item) => {
return { // return {
...item // ...item
} // }
}) // })
var arr4 = [] // var arr4 = []
var arr3 = [...arr1, ...arr2]; // var arr3 = [...arr1, ...arr2];
if (this.timer.startPickerTime && this.timer.endPickerTime) { // if (this.timer.startPickerTime && this.timer.endPickerTime) {
arr4 = [{ // arr4 = [{
queryType: 'daterange', // queryType: 'daterange',
tableName: 'ic_resi_user', // tableName: 'ic_resi_user',
columnName: 'BIRTHDAY', // columnName: 'BIRTHDAY',
columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || ''] // columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || '']
}] // }]
arr3 = [...arr1, ...arr2, ...arr4] // arr3 = [...arr1, ...arr2, ...arr4]
} else { // } else {
let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY') // let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY')
console.log(i, '标'); // console.log(i, '');
arr3 = arr3.splice(i,1) // arr3 = arr3.splice(i,1)
console.log(arr3); // console.log(arr3);
} // }
this.$emit('search', arr3) // this.$emit('search', arr3)
arr3 = [] // arr3 = []
return arr3 // return arr3
} // }
}, // },
handleOpenSearch() { handleOpenSearch() {
this.openSearch = !this.openSearch this.openSearch = !this.openSearch
}, },
@ -617,49 +616,45 @@ export default {
handleChangeAgency(val) { handleChangeAgency(val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) { if (obj) {
if (obj.level === 'grid') {
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.agencyId = ''
} else {
this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.GRID_ID = '' this.GRID_ID = ''
}
} else { } else {
this.form.agencyId = '' this.form.agencyId = ''
this.form.GRID_ID = '' this.GRID_ID = ''
} }
this.form.VILLAGE_ID = '' this.form.villageId = ''
this.form.BUILD_ID = '' this.form.buildId = ''
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
this.getValiheList() this.getValiheList()
}, },
handleChangeGrid(val) { handleChangeGrid(val) {
console.log('val', val) console.log('val', val)
this.form.VILLAGE_ID = '' this.form.villageId = ''
this.form.BUILD_ID = '' this.form.buildId = ''
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
this.getValiheList() this.getValiheList()
}, },
handleChangeV(val) { handleChangeV(val) {
console.log('val', val) console.log('val', val)
this.form.BUILD_ID = '' this.form.buildId = ''
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
this.getBuildList() this.getBuildList()
}, },
handleChangeB(val) { handleChangeB(val) {
console.log('val', val) console.log('val', val)
this.form.UNIT_ID = '' this.form.unitId = ''
this.form.HOME_ID = '' this.form.homeId = ''
this.getUniList() this.getUniList()
}, },
handleChangeD(val) { handleChangeD(val) {
console.log('val', val) console.log('val', val)
this.form.HOME_ID = '' this.form.homeId = ''
this.getHouseList() this.getHouseList()
}, },
// form // form
@ -738,7 +733,7 @@ export default {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { .post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID, gridId: this.GRID_ID,
agencyId: this.form.agencyId , agencyId: this.form.agencyId ,
// agencyId: user.agencyId // agencyId: user.agencyId
}) })
@ -757,7 +752,7 @@ export default {
getBuildList() { getBuildList() {
this.$http this.$http
.post('/gov/org/icbuilding/buildingoption', { .post('/gov/org/icbuilding/buildingoption', {
neighborHoodId: this.form.VILLAGE_ID neighborHoodId: this.form.villageId
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -774,7 +769,7 @@ export default {
getUniList() { getUniList() {
this.$http this.$http
.post('/gov/org/icbuildingunit/unitoption', { .post('/gov/org/icbuildingunit/unitoption', {
buildingId: this.form.BUILD_ID buildingId: this.form.buildId
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -790,7 +785,7 @@ export default {
}, },
getHouseList() { getHouseList() {
this.$http this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID }) .post('/gov/org/ichouse/houseoption', { unitId: this.form.unitId })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)

Loading…
Cancel
Save