diff --git a/src/assets/scss/modules/management/detail-main.scss b/src/assets/scss/modules/management/detail-main.scss index 309bfe353..1d4a6b5f7 100644 --- a/src/assets/scss/modules/management/detail-main.scss +++ b/src/assets/scss/modules/management/detail-main.scss @@ -125,11 +125,14 @@ } } + + +//-----旧版 + .cell-width-area{ width: 450px } - .div_searchmap { z-index: 1000; position: absolute; @@ -137,7 +140,6 @@ left: 5px; } - .cell-width-1{ width: 250px } @@ -178,16 +180,11 @@ overflow-x: auto; } - .m-btns { display: flex; justify-content: center; } - - -//-----旧版 - .m-info { .info-title { diff --git a/src/assets/scss/modules/management/list-main.css b/src/assets/scss/modules/management/list-main.css index e708dbfc9..9e5ef5f8b 100644 --- a/src/assets/scss/modules/management/list-main.css +++ b/src/assets/scss/modules/management/list-main.css @@ -8,12 +8,18 @@ .div_main .div_search { padding: 10px; - background-color: #f6f6f6; - border: 1px solid #D3DCE6; + background: #FFFFFF; + box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12); margin: 7px 7px; } +.div_main .div_search /deep/ .el-form-item { + margin-bottom: 14px; +} + .div_main .div_search .div_search_btn { + margin-right: 10px; + margin-top: 5px; float: right; } @@ -31,20 +37,31 @@ } .div_main .item_width_normal { - width: 138px; + width: 168px; } .div_main .item_width_daterange { - width: 176px; + width: 206px; +} + +.div_main .item_width_daterange2 { + width: 445px; +} + +.div_main .item_width_communitycascader { + width: 141px; } .div_main .item_width_buildcascader { - width: 151px; + width: 96px; } .div_main .div_table { - margin: 15px 7px 7px; + margin: 16px 7px 7px; + background: #FFFFFF; + box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12); position: relative; + padding: 24px 16px 10px; } .div_main .div_table .div_btn { @@ -59,13 +76,23 @@ .div_main .div_table .div_btn .div_btn_left .btn_upload { margin-left: 10px; display: flex; + text-align: center; } .div_main .div_table .div_table_item { - margin-top: 10px; + margin-top: 16px; position: relative; } +.div_main .setFormBoxHeight { + max-height: 99px; + overflow: hidden; +} + +.div_main .setFormBoxHeightAuto { + height: auto; +} + .div_main .item_width_2 { width: 138px; } @@ -138,7 +165,3 @@ -webkit-line-clamp: 2; overflow: hidden; } - -.font_color_blue { - color: #0054d7; -} diff --git a/src/assets/scss/modules/management/list-main.min.css b/src/assets/scss/modules/management/list-main.min.css index 6d314c3b8..379c79249 100644 --- a/src/assets/scss/modules/management/list-main.min.css +++ b/src/assets/scss/modules/management/list-main.min.css @@ -1 +1 @@ -.div_main{width:100%}.div_main .marginl-20{margin-left:16px}.div_main .div_search{padding:10px;background-color:#f6f6f6;border:1px solid #D3DCE6;margin:7px 7px}.div_main .div_search .div_search_btn{float:right}.div_main .div_search .div_search_label{line-height:36px;margin-left:24px;margin-right:6px;font-size:14px;color:#606266;vertical-align:middle}.div_main .data-tag{margin-left:10px}.div_main .item_width_normal{width:138px}.div_main .item_width_daterange{width:176px}.div_main .item_width_buildcascader{width:151px}.div_main .div_table{margin:15px 7px 7px;position:relative}.div_main .div_table .div_btn{display:flex;justify-content:space-between}.div_main .div_table .div_btn .div_btn_left{display:flex}.div_main .div_table .div_btn .div_btn_left .btn_upload{margin-left:10px;display:flex}.div_main .div_table .div_table_item{margin-top:10px;position:relative}.div_main .item_width_2{width:138px}.div_main .item_width_1{width:260px}.div_main .item_width_3{width:200px}.div_main .list_item_width_1{width:165px}.div_main .list_item_width_2{width:135px}.div-mult-form{margin-top:20px}.div-mult-form .div_person{display:flex;font-size:14px;padding-bottom:20px}.div-mult-form .div_person .person_title{text-align:right;flex:0 0 100px;line-height:36px;padding:0 12px 0 0}.div-mult-form .div_person .tag_item{margin-right:10px;margin-top:10px}.div-mult-form .div_person .tag_tip{margin-top:10px;color:#9c9c9c}.div-mult-table{position:relative;padding:0 20px}.div-mult-table .div_selcount{position:absolute;bottom:10px;left:30px}.div_dialog_table{padding:10px}.div_dialog_table .table{margin-top:20px}.twoline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.font_color_blue{color:#0054d7} +.div_main{width:100%}.div_main .marginl-20{margin-left:16px}.div_main .div_search{padding:10px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);margin:7px 7px}.div_main .div_search /deep/ .el-form-item{margin-bottom:14px}.div_main .div_search .div_search_btn{margin-right:10px;margin-top:5px;float:right}.div_main .div_search .div_search_label{line-height:36px;margin-left:24px;margin-right:6px;font-size:14px;color:#606266;vertical-align:middle}.div_main .data-tag{margin-left:10px}.div_main .item_width_normal{width:168px}.div_main .item_width_daterange{width:206px}.div_main .item_width_daterange2{width:445px}.div_main .item_width_communitycascader{width:141px}.div_main .item_width_buildcascader{width:96px}.div_main .div_table{margin:16px 7px 7px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);position:relative;padding:24px 16px 10px}.div_main .div_table .div_btn{display:flex;justify-content:space-between}.div_main .div_table .div_btn .div_btn_left{display:flex}.div_main .div_table .div_btn .div_btn_left .btn_upload{margin-left:10px;display:flex;text-align:center}.div_main .div_table .div_table_item{margin-top:16px;position:relative}.div_main .setFormBoxHeight{max-height:99px;overflow:hidden}.div_main .setFormBoxHeightAuto{height:auto}.div_main .item_width_2{width:138px}.div_main .item_width_1{width:260px}.div_main .item_width_3{width:200px}.div_main .list_item_width_1{width:165px}.div_main .list_item_width_2{width:135px}.div-mult-form{margin-top:20px}.div-mult-form .div_person{display:flex;font-size:14px;padding-bottom:20px}.div-mult-form .div_person .person_title{text-align:right;flex:0 0 100px;line-height:36px;padding:0 12px 0 0}.div-mult-form .div_person .tag_item{margin-right:10px;margin-top:10px}.div-mult-form .div_person .tag_tip{margin-top:10px;color:#9c9c9c}.div-mult-table{position:relative;padding:0 20px}.div-mult-table .div_selcount{position:absolute;bottom:10px;left:30px}.div_dialog_table{padding:10px}.div_dialog_table .table{margin-top:20px}.twoline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden} diff --git a/src/assets/scss/modules/management/list-main.scss b/src/assets/scss/modules/management/list-main.scss index 944ca823f..e14eea038 100644 --- a/src/assets/scss/modules/management/list-main.scss +++ b/src/assets/scss/modules/management/list-main.scss @@ -22,9 +22,10 @@ } .div_search_btn{ + margin-right:10px; margin-top:5px; float:right; - } + } //特殊查询的文字,如房屋级联 .div_search_label{ @@ -71,22 +72,22 @@ display: flex; // margin-top: 10px; justify-content: space-between; - + .div_btn_left{ display: flex; - + .btn_upload { margin-left: 10px; display: flex; text-align: center; } } - + .div_btn_right{ - + } - - + + } .div_table_item { @@ -95,6 +96,17 @@ } } +// 搜索栏高度控制显示隐藏 +.setFormBoxHeight{ + max-height: 99px; + overflow: hidden; +} +.setFormBoxHeightAuto{ + height: auto; +} + + //---------旧版 + .item_width_2{ width: 138px; } @@ -106,7 +118,7 @@ width: 200px; } - + .list_item_width_1 { width: 165px; @@ -168,3 +180,4 @@ -webkit-line-clamp: 2; overflow: hidden; } + diff --git a/src/assets/scss/modules/visual/communityManage.css b/src/assets/scss/modules/visual/communityManage.css index 64b4e0b71..44e0cda84 100644 --- a/src/assets/scss/modules/visual/communityManage.css +++ b/src/assets/scss/modules/visual/communityManage.css @@ -31,12 +31,3 @@ margin-top: 10px; margin-right: 50px; } - -.setFormBoxHeight { - max-height: 99px; - overflow: hidden; -} - -.setFormBoxHeightAuto { - height: auto; -} diff --git a/src/assets/scss/modules/visual/communityManage.min.css b/src/assets/scss/modules/visual/communityManage.min.css index 0e774a493..2a04f1927 100644 --- a/src/assets/scss/modules/visual/communityManage.min.css +++ b/src/assets/scss/modules/visual/communityManage.min.css @@ -1 +1 @@ -.div_del{position:absolute;left:10px;bottom:0}.div_search{display:flex}.div_search .resi-cell{display:flex;align-items:center}.div_search .resi-cell .resi-cell-label{width:70px;box-sizing:border-box;margin-right:15px;text-align:right}.div_search .resi-cell .resi-cell-input{width:180px}.el-row{display:flex;flex-wrap:wrap;margin-top:10px;margin-right:50px}.setFormBoxHeight{max-height:99px;overflow:hidden}.setFormBoxHeightAuto{max-height:auto} +.div_del{position:absolute;left:10px;bottom:0}.div_search{display:flex}.div_search .resi-cell{display:flex;align-items:center}.div_search .resi-cell .resi-cell-label{width:70px;box-sizing:border-box;margin-right:15px;text-align:right}.div_search .resi-cell .resi-cell-input{width:180px}.el-row{display:flex;flex-wrap:wrap;margin-top:10px;margin-right:50px} diff --git a/src/assets/scss/modules/visual/communityManage.scss b/src/assets/scss/modules/visual/communityManage.scss index 237d311c7..3af16b159 100644 --- a/src/assets/scss/modules/visual/communityManage.scss +++ b/src/assets/scss/modules/visual/communityManage.scss @@ -35,10 +35,3 @@ margin-top: 10px; margin-right: 50px; } -.setFormBoxHeight{ - max-height: 99px; - overflow: hidden; -} -.setFormBoxHeightAuto{ - height: auto; -} diff --git a/src/views/components/deathSearch copy.vue b/src/views/components/deathSearch copy.vue new file mode 100644 index 000000000..f82185e81 --- /dev/null +++ b/src/views/components/deathSearch copy.vue @@ -0,0 +1,623 @@ + + + + + + + + 所属网格 + + + + + + + + + + + 所属房屋 + + + + + + + + + + + + + + + + + + + + + + + + + {{ n.label }} + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + + diff --git a/src/views/components/deathSearch.vue b/src/views/components/deathSearch.vue index 1c46b7e93..25bc772ea 100644 --- a/src/views/components/deathSearch.vue +++ b/src/views/components/deathSearch.vue @@ -1,206 +1,160 @@ - - - - - - - 所属网格 - - - - - - - - - - - 所属房屋 - - - - - - - - - - - - - - - - - - - - - - - - - {{ n.label }} - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - 查询 - 重置 - - - - - - - + placeholder="请输入内容"> + + + + + + + + + + + + + + + + + 重置 + 查询 + + + + + + @@ -217,7 +171,7 @@ export default { default: '' } }, - data() { + data () { let initForm = (arr, columnName) => { let _form = {} // console.log('formInfo', obj) @@ -278,7 +232,7 @@ export default { shortcuts: [ { text: '最近一周', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) @@ -287,7 +241,7 @@ export default { }, { text: '最近一个月', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) @@ -296,7 +250,7 @@ export default { }, { text: '最近三个月', - onClick(picker) { + onClick (picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) @@ -308,7 +262,7 @@ export default { } }, computed: { - sliceList() { + sliceList () { return function (data, count) { if (data !== undefined) { let index = 0 @@ -324,19 +278,19 @@ export default { } } }, - changeVDisabled() { + changeVDisabled () { return !this.form.VILLAGE_ID }, - changeBDisabled() { + changeBDisabled () { return !this.form.BUILD_ID }, - changeDDisabled() { + changeDDisabled () { return !this.form.UNIT_ID } }, watch: { form: { - handler(val, val2) { + handler (val, val2) { // console.log('valpppp----', val, val2) for (let n in val) { if (this.constForm[n] !== val[n]) { @@ -349,7 +303,7 @@ export default { deep: true } }, - created() { + created () { // this.initForm() // console.log('formcccc---', this.form) this.getGridList() @@ -357,32 +311,32 @@ export default { if (this.columnName) this.handleChangeForm(this.columnName) }, methods: { - initForm() { + initForm () { this.formList.forEach((item) => { this.$set(this.form, item.columnName, '') }) console.log('formcccc---', this.form) }, - handleClearVillage() { + handleClearVillage () { this.form.BUILD_ID = '' this.form.HOME_ID = '' }, - handleClearBuild() { + handleClearBuild () { this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - handleClearDan() { + handleClearDan () { this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - resetForm(formName) { - for(const n in this.form) { + resetForm (formName) { + for (const n in this.form) { this.form[n] = '' } this.handleSearch() }, - handleSearch() { + handleSearch () { // console.log('formmmmm---', this.form) const itemTypes = ['daterange', 'timerange'] let arr = this.tempFormList @@ -395,7 +349,7 @@ export default { // columnValue: [] columnValue: itemTypes.includes(item.queryType) || - itemTypes.includes(item.itemType) + itemTypes.includes(item.itemType) ? this.form[item.columnName] : [this.form[item.columnName].toString()] } @@ -410,10 +364,10 @@ export default { let arr3 = [...arr1, ...arr] this.$emit('search', arr3) }, - handleOpenSearch() { + handleOpenSearch () { this.openSearch = !this.openSearch }, - handleChangeGrid(val) { + handleChangeGrid (val) { console.log('val', val) this.form.VILLAGE_ID = '' this.form.BUILD_ID = '' @@ -421,26 +375,26 @@ export default { this.form.HOME_ID = '' this.getValiheList() }, - handleChangeV(val) { + handleChangeV (val) { console.log('val', val) this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getBuildList() }, - handleChangeB(val) { + handleChangeB (val) { console.log('val', val) this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getUniList() }, - handleChangeD(val) { + handleChangeD (val) { console.log('val', val) this.form.HOME_ID = '' this.getHouseList() }, // 监听基础form - handleChangeForm(val) { + handleChangeForm (val) { for (let n in this.fixedForm) { if (n === val) { if (this.fixedList.length > 0) { @@ -479,7 +433,7 @@ export default { if (item.columnName === val) item.isChange = true }) }, - getGridList() { + getGridList () { const { user } = this.$store.state this.$http .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) @@ -495,7 +449,7 @@ export default { return this.$message.error('网络错误') }) }, - getValiheList() { + getValiheList () { const { user } = this.$store.state this.$http .post('/gov/org/icneighborhood/neighborhoodoption', { @@ -515,7 +469,7 @@ export default { return this.$message.error('网络错误') }) }, - getBuildList() { + getBuildList () { this.$http .post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID @@ -532,7 +486,7 @@ export default { return this.$message.error('网络错误') }) }, - getUniList() { + getUniList () { this.$http .post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID @@ -549,7 +503,7 @@ export default { return this.$message.error('网络错误') }) }, - getHouseList() { + getHouseList () { this.$http .post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID }) .then(({ data: res }) => { @@ -569,81 +523,11 @@ export default { diff --git a/src/views/components/rangeInput.vue b/src/views/components/rangeInput.vue index a7cad965e..1aacc21cb 100644 --- a/src/views/components/rangeInput.vue +++ b/src/views/components/rangeInput.vue @@ -1,19 +1,18 @@ - - - + @@ -66,11 +65,7 @@ export default { } return { inputForm: { ...this.value }, - rules: { - end: [ - { validator: checkAge, trigger: 'blur' } - ], - } + } }, computed: { @@ -80,6 +75,7 @@ export default { }, watch: { 'value.start' (val) { + console.log(val); this.inputForm.start = val }, 'value.end' (val) { @@ -88,7 +84,7 @@ export default { }, methods: { handleChange (val) { - + console.log(this.inputForm ); // if () this.$emit('change', { ...this.inputForm }) }, @@ -102,13 +98,12 @@ export default { + \ No newline at end of file diff --git a/src/views/components/resiChangeRecord.vue b/src/views/components/resiChangeRecord.vue index a13585a82..4788ca80c 100644 --- a/src/views/components/resiChangeRecord.vue +++ b/src/views/components/resiChangeRecord.vue @@ -1,12 +1,10 @@ - - + - + diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 6592edf31..88c7463d2 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -3,213 +3,115 @@ - - - - - - - - - - - - - - - - - - - - - - - - {{ns.label}} - - - + + + + + + + + + + + + + + + + + + + {{ ns.label }} + + + + - - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - {{btnItem.name}} + {{ btnItem.name }} - + - + - 智能查询 - 重置 - 查询 - - {{boxHeight?'收起':'展开'}} - + 智能查询 + 重置 + 查询 + {{ boxHeight ? '收起' : '展开' }} @@ -242,7 +144,7 @@ export default { default: false } }, - data () { + data() { let initForm = (arr, columnName) => { let _form = {} // console.log('formInfo', obj) @@ -269,6 +171,8 @@ export default { ...item } }) + + let form = initForm(itemList, this.columnName) let tempFormList = itemList.map(item => { @@ -292,9 +196,23 @@ export default { children: 'subAgencyList', checkStrictly: true } + let endDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 + let nowData = Date.now() + if (this.updateStartDate) { + let startTime = new Date(this.updateStartDate) + return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime + } else { + return time.getTime() > nowData + } + + } + let startDisabledDate = (time) => {//这个关键属性我们一定要写在data的里面并且return的外面,这是动态改变区间的关键 + let nowData = Date.now() + return time.getTime() > nowData + } return { - boxHeight: false, + boxHeight: true, pageLoading: false, openSearch: false, optionsV: [], @@ -306,6 +224,7 @@ export default { orgOptionProps, agencyIdArray: [], value: '', + // 1 itemList, fixedList: [], fixedForm: { @@ -331,7 +250,7 @@ export default { shortcuts: [ { text: '最近一周', - onClick (picker) { + onClick(picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) @@ -340,7 +259,7 @@ export default { }, { text: '最近一个月', - onClick (picker) { + onClick(picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) @@ -349,7 +268,7 @@ export default { }, { text: '最近三个月', - onClick (picker) { + onClick(picker) { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) @@ -456,13 +375,23 @@ export default { }, ] } - ] - + ], + endPickerOptions: { + disabledDate: endDisabledDate + }, + startPickerOptions: { + disabledDate: startDisabledDate + }, + timer: { + startPickerTime: '', + endPickerTime: '' + } } }, computed: { - sliceList () { + sliceList() { return function (data, count) { + // 接收 if (data !== undefined) { let index = 0 let arrTemp = [] @@ -472,25 +401,25 @@ export default { arrTemp.push([]) } arrTemp[index].push(data[i]) + // console.log(data[i],'zhi'); } - console.log(arrTemp); return arrTemp } } }, - changeVDisabled () { + changeVDisabled() { return !this.form.VILLAGE_ID }, - changeBDisabled () { + changeBDisabled() { return !this.form.BUILD_ID }, - changeDDisabled () { + changeDDisabled() { return !this.form.UNIT_ID }, }, watch: { form: { - handler (val, val2) { + handler(val, val2) { // console.log('valpppp----', val, val2) for (let n in val) { if (this.constForm[n] !== val[n]) { @@ -501,9 +430,16 @@ export default { this.constForm = { ...val } }, deep: true + }, + timer: { + handler(newVal) { + this.handelWatchStartDate(newVal) + }, + deep: true, + immediate: true } }, - created () { + created() { // this.initForm() // console.log('formcccc---', this.form) this.getOrgTreeList() @@ -512,47 +448,51 @@ export default { if (this.columnName) this.handleChangeForm(this.columnName) }, methods: { - handleSmartSearch () { + handleSmartSearch() { this.showSmartSearchForm = !this.showSmartSearchForm }, - - handelSelSmartBtn (index) { + handelSelSmartBtn(index) { this.selBtnIndex = index }, - - initForm () { + handelWatchStartDate(val) { + return val + }, + initForm() { this.formList.forEach((item) => { this.$set(this.form, item.columnName, '') }) console.log('formcccc---', this.form) }, - computdSpan (len) { + computdSpan(len) { return len == 1 ? 24 : 6 }, - handleClearVillage () { + handleClearVillage() { this.form.BUILD_ID = '' this.form.HOME_ID = '' }, - handleClearBuild () { + handleClearBuild() { this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - handleClearDan () { + handleClearDan() { this.form.UNIT_ID = '' this.form.HOME_ID = '' }, - resetForm (formName) { + resetForm(formName) { for (const n in this.form) { if (n == 'age') { this.form.age = { start: '', end: '' } + } else if (n == 'BIRTHDAY') { + this.form.BIRTHDAY = [] + this.timer.startPickerTime = null + this.timer.endPickerTime = null } else if (typeof this.form[n] == 'object') this.form[n] = [] else this.form[n] = '' - } this.agencyIdArray = [] // let arr3 = [...arr1, ...arr] @@ -560,21 +500,20 @@ export default { // this.handleSearch() // this.orgOptions = []; }, - handleSearch () { + handleSearch() { if (this.showSmartSearchForm) { let refObj = this.$refs['ref_rule'] - refObj.getRule() } else { + // debugger // console.log('formmmmm---', this.form) const itemTypes = ['daterange', 'timerange', 'checkbox'] 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 { queryType: item.queryType, tableName: item.tableName, columnName: item.columnName, - // columnValue: [] columnValue: this.form[item.columnName] && (itemTypes.includes(item.queryType) || itemTypes.includes(item.itemType) || item.multiSelect == 1 @@ -590,24 +529,47 @@ export default { ...item } }) - let arr3 = [...arr1, ...arr2] + var arr4 = [] + var arr3 = [...arr1, ...arr2]; + if (this.timer.startPickerTime && this.timer.endPickerTime) { + arr4 = [{ + queryType: 'daterange', + tableName: 'ic_resi_user', + columnName: 'BIRTHDAY', + columnValue: [this.timer.startPickerTime || '', this.timer.endPickerTime || ''] + }] + arr3 = [...arr1, ...arr2, ...arr4] + } else { + let i = arr3.findIndex(item => item.columnName == 'BIRTHDAY') + console.log(i, '标'); + arr3 = arr3.splice(i,1) + console.log(arr3); + } this.$emit('search', arr3) + arr3 = [] return arr3 + } }, - handleOpenSearch () { + handleOpenSearch() { this.openSearch = !this.openSearch }, - handleAgeChange (val) { + handleAgeChange(val) { + // debugger console.log('val----age---', val) - if (val.end) { - const s = this.computedBirth(val.end) - const e = this.computedBirth(val.start) - this.form.BIRTHDAY = [s, e] - } + // console.log(v); + if(val.start){ + const s = this.computedBirth1(val.start) + const e = this.computedBirth(val.start) + this.form.BIRTHDAY = [s, e] + }else { + this.form.BIRTHDAY = [] + return + } + }, - handleChangeAgency (val) { + handleChangeAgency(val) { let obj = this.$refs["myCascader"].getCheckedNodes()[0].data if (obj) { if (obj.level === 'grid') { @@ -629,7 +591,7 @@ export default { this.form.HOME_ID = '' this.getValiheList() }, - handleChangeGrid (val) { + handleChangeGrid(val) { console.log('val', val) this.form.VILLAGE_ID = '' this.form.BUILD_ID = '' @@ -637,28 +599,27 @@ export default { this.form.HOME_ID = '' this.getValiheList() }, - handleChangeV (val) { + handleChangeV(val) { console.log('val', val) this.form.BUILD_ID = '' this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getBuildList() }, - handleChangeB (val) { + handleChangeB(val) { console.log('val', val) this.form.UNIT_ID = '' this.form.HOME_ID = '' this.getUniList() }, - handleChangeD (val) { + handleChangeD(val) { console.log('val', val) this.form.HOME_ID = '' this.getHouseList() }, // 监听基础form - handleChangeForm (val) { + handleChangeForm(val) { for (let n in this.fixedForm) { - if (n === val) { if (this.fixedList.length > 0) { let _item = {} @@ -696,7 +657,7 @@ export default { if (item.columnName === val) item.isChange = true }) }, - getOrgTreeList () { + getOrgTreeList() { const { user } = this.$store.state this.$http .post('/gov/org/customeragency/agencygridtree', {}) @@ -713,7 +674,7 @@ export default { return this.$message.error('网络错误') }) }, - getGridList () { + getGridList() { const { user } = this.$store.state this.$http .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) @@ -729,7 +690,7 @@ export default { return this.$message.error('网络错误') }) }, - getValiheList () { + getValiheList() { const { user } = this.$store.state this.$http .post('/gov/org/icneighborhood/neighborhoodoption', { @@ -749,7 +710,7 @@ export default { return this.$message.error('网络错误') }) }, - getBuildList () { + getBuildList() { this.$http .post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID @@ -766,7 +727,7 @@ export default { return this.$message.error('网络错误') }) }, - getUniList () { + getUniList() { this.$http .post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID @@ -783,7 +744,7 @@ export default { return this.$message.error('网络错误') }) }, - getHouseList () { + getHouseList() { this.$http .post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID }) .then(({ data: res }) => { @@ -798,7 +759,7 @@ export default { return this.$message.error('网络错误') }) }, - computedBirth (age) { + computedBirth(age) { let now = new Date(); let nowYear = now.getFullYear(); let nowMonth = now.getMonth() + 1; @@ -810,8 +771,21 @@ export default { if (nowDay < 10) { nowDay = '0' + nowDay } - console.log(subYear + '-' + nowMonth + '-' + nowDay); return subYear + '-' + nowMonth + '-' + nowDay + }, + computedBirth1(age) { + let now = new Date(); + let nowYear = now.getFullYear(); + let nowMonth = now.getMonth() + 1; + let nowDay = now.getDate(); // 按照减法原理,先day相减,不够向month借;然后month相减,不够向year借;最后year相减。 + let subYear = nowYear - age + if (nowMonth < 10) { + nowMonth = '0' + nowMonth + } + if (nowDay < 10) { + nowDay = '0' + nowDay + } + return subYear - 1 + '-' + nowMonth + '-' + nowDay } } } @@ -820,6 +794,8 @@ export default {