diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue
index f9260af30..a4df68c01 100644
--- a/src/views/components/resiForm.vue
+++ b/src/views/components/resiForm.vue
@@ -1152,10 +1152,16 @@ export default {
methods: {
submit_from(){
- return this.form
- // this.$refs.formId.validate(v=>{
- // this.validateFlag = v
- // })
+ var flag = false
+ this.$refs.formId.validate(v=>{
+ this.validateFlag = v
+ flag = v
+
+ })
+ if(flag){
+ return this.form
+ }
+ return this.form
},
getAllNation(){
diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue
index 4043d1c1b..f57ab28aa 100644
--- a/src/views/components/resiSearch.vue
+++ b/src/views/components/resiSearch.vue
@@ -2,63 +2,84 @@
-
-
@@ -104,7 +127,7 @@
-
+
@@ -185,7 +208,26 @@ export default {
}
})
let constForm = {
- ...form,
+ 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: '',
@@ -228,20 +270,16 @@ export default {
agencyIdArray: [],
value: '',
// 1
+ Education:[],
+ nation:[],
+ household:[],
+ resiClass:[],
itemList,
fixedList: [],
- fixedForm: {
- AGENCY_ID: '',
- GRID_ID: '',
- VILLAGE_ID: '',
- BUILD_ID: '',
- UNIT_ID: '',
- HOME_ID: ''
- },
constForm,
form: {
...form,
- AGENCY_ID: '',
+ agencyId : '',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
@@ -282,7 +320,7 @@ export default {
},
queryType: {
- 'AGENCY_ID': 'like'
+ 'agencyId ': 'like'
},
showSmartSearchForm: false,
@@ -447,7 +485,11 @@ export default {
// console.log('formcccc---', this.form)
this.getOrgTreeList()
this.getGridList()
+ this.getEducation()
this.getValiheList()
+ this.getDictList()
+ this.getHousehold()
+ this.getResident()
if (this.columnName) this.handleChangeForm(this.columnName)
},
methods: {
@@ -577,14 +619,14 @@ export default {
if (obj) {
if (obj.level === 'grid') {
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
- this.form.AGENCY_ID = ''
+ this.form.agencyId = ''
} else {
- this.form.AGENCY_ID = 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 = ''
}
} else {
- this.form.AGENCY_ID = ''
+ this.form.agencyId = ''
this.form.GRID_ID = ''
}
@@ -661,7 +703,6 @@ export default {
})
},
getOrgTreeList() {
- const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
@@ -677,28 +718,28 @@ export default {
return this.$message.error('网络错误')
})
},
- getGridList() {
- const { user } = this.$store.state
- this.$http
- .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg)
- } else {
- console.log('获取查询详情成功', res.data)
- this.optionsG = res.data
- }
- })
- .catch(() => {
- return this.$message.error('网络错误')
- })
- },
+ getGridList () {
+ const { user } = this.$store.state
+ this.$http
+ .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'addorupdate' })
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ } else {
+ console.log('获取查询详情成功', res.data)
+ this.optionsG = res.data
+ }
+ })
+ .catch(() => {
+ return this.$message.error('网络错误')
+ })
+ },
getValiheList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID,
- agencyId: this.form.AGENCY_ID,
+ agencyId: this.form.agencyId ,
// agencyId: user.agencyId
})
.then(({ data: res }) => {
@@ -762,6 +803,58 @@ export default {
return this.$message.error('网络错误')
})
},
+ getTreeData (data) {
+ if (!Array.isArray(data)) return [];
+ let arr = data.map((item) => {
+ let _item = {};
+ if (item.children) {
+ if (item.children.length === 0)
+ _item = { ...item, children: undefined };
+ else _item = { ...item, children: this.getTreeData(item.children) };
+ } else {
+ _item = { ...item };
+ }
+ return _item;
+ });
+ return arr;
+ },
+ async getEducation(){
+ try {
+ let { data } = await this.$http.post('sys/dict/data/education',{formCode: "resi_base_info"})
+ data.data = this.getTreeData(data.data)
+ this.Education = data.data
+ console.log(this.Education);
+ } catch (error) {
+ console.log(error,'获取民族字典');
+ }
+
+ },
+ async getDictList(){
+ try {
+ const { data } = await this.$http.post('sys/dict/data/nation',{formCode: "resi_base_info"})
+ this.nation = data.data
+
+ } catch (error) {
+ console.log(error,'获取民族字典');
+ }
+
+ },
+ async getHousehold(){
+ try {
+ const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'household_situation'})
+ this.household = data.data
+ } catch (error) {
+ console.log(error,'获取人户状况字典');
+ }
+ },
+ async getResident(){
+ try {
+ const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'resident_category'})
+ this.resiClass = data.data
+ } catch (error) {
+ console.log(error,'获取配偶情况字典');
+ }
+ },
computedBirth(age) {
let now = new Date();
let nowYear = now.getFullYear();
diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue
index 5031ec293..67df2cf8f 100644
--- a/src/views/modules/base/resi.vue
+++ b/src/views/modules/base/resi.vue
@@ -39,6 +39,21 @@
-->
+
+
+
+ 查询
+
+ 重置
+
+
+
+
@@ -668,7 +683,9 @@ export default {
},
});
},
-
+ handleSearchFrom(){
+ console.log(this.$refs.myResiSearch.form);
+ },
// 是否可以选中
checkSelectable(row, index) {
return this.filterEdit(row.agencyId);