Browse Source

页面组件高度调整,居民信息字典请求,数字类型输入框输入为空回填为nan

V1.0
mk 2 years ago
parent
commit
62e4a59e19
  1. 278
      src/views/components/resiForm.vue
  2. 6
      src/views/modules/cpts/base/index.vue

278
src/views/components/resiForm.vue

@ -1317,31 +1317,34 @@ export default {
await this.getHouseList()
await this.residentEduInfo(this.form.resiId)
},
getAllDict () {
//
this.getDictList()
//
this.getRelationship()
//
this.getEducation()
//
this.getdisabilityDict()
this.getdisabilityDictClass()
this.getillnessDict()
this.getchronicDict()
this.getHouseholdDict()
this.getMarriageDict()
this.getResideDict()
this.getSpouseDict()
this.getPartyDict()
this.getResidentDict()
this.getHousing()
this.getVolunteerDict()
this.gethobbyDict()
this.getWelfareDict()
this.getUnemployment()
this.getCareer()
async getAllDict() {
try {
await Promise.all([
this.getDictList(),
this.getRelationship(),
this.getEducation(),
this.getdisabilityDict(),
this.getdisabilityDictClass(),
this.getillnessDict(),
this.getchronicDict(),
this.getHouseholdDict(),
this.getMarriageDict(),
this.getResideDict(),
this.getSpouseDict(),
this.getPartyDict(),
this.getResidentDict(),
this.getHousing(),
this.getVolunteerDict(),
this.gethobbyDict(),
this.getWelfareDict(),
this.getUnemployment(),
this.getCareer()
]);
} catch (error) {
console.error("Error fetching dictionaries: ", error);
}
},
getGridList () {
const { user } = this.$store.state
this.$http.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'addorupdate' }).then(({ data: res }) => {
@ -1372,237 +1375,67 @@ export default {
this.newForm.nation = val
},
async getdisabilityDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'disability_category_code' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'disabilityCategoryCode') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取残疾字典');
}
await this.getDictData('disability_category_code','disabilityCategoryCode')
},
async getVolunteerDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'VOLUNTEER_CATEGORY' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'volunteerCategory') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取志愿者字典');
}
await this.getDictData('VOLUNTEER_CATEGORY','volunteerCategory')
},
async gethobbyDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'SPECIAL_SKILL' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'hobbyCode') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取兴趣爱好字典');
}
await this.getDictData('SPECIAL_SKILL','hobbyCode')
},
async getdisabilityDictClass () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'disability_level' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'disabilityLevel') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取残疾等级字典');
}
await this.getDictData('disability_level','disabilityLevel')
},
async getillnessDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'illness_code' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'illnessCode') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取所患大病字典');
}
await this.getDictData('illness_code','illnessCode')
},
async getchronicDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'chronic_disease_code' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'chronicDiseaseCode') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取所患慢病字典');
}
await this.getDictData('chronic_disease_code','chronicDiseaseCode')
},
async getWelfareDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'welfare_post' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'jobPost') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取公益岗位字典');
}
await this.getDictData('welfare_post','jobPost')
},
async getUnemployment () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'unemployment_cause' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'unemploymentReason') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取失业原因字典');
}
await this.getDictData('unemployment_cause','unemploymentReason')
},
async getCareer () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'career_goals' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'employmentWish') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取就业愿望字典');
}
await this.getDictData('career_goals','employmentWish')
},
async getHouseholdDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'household_situation' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'householdSituation') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取人户状况字典');
}
await this.getDictData('household_situation','householdSituation')
},
async getMarriageDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'marriage' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'marriage') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取婚姻状况字典');
}
await this.getDictData('marriage','marriage')
},
async getResideDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'reside_situation' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'resideSituation') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取居住情况字典');
}
await this.getDictData('reside_situation','resideSituation')
},
async getPartyDict () {
await this.getDictData('party_job','partyJob')
},
async getSpouseDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'spouse_situation' })
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'spouseSituation') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取配偶情况字典');
}
await this.getDictData('spouse_situation','spouseSituation')
},
async getResidentDict () {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'special_resident_category' })
console.log(data.data, 'see');
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'specialCategoryCode') {
i.opction = data.data
}
}
})
} catch (error) {
console.log(error, '获取配偶情况字典');
}
await this.getDictData('special_resident_category','specialCategoryCode')
},
async getPartyDict () {
//
async getDictData(dictType, formName) {
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': 'party_job' })
const { data } = await this.$http.post('sys/dict/data/dictlist', { 'dictType': dictType });
this.footerInputList.forEach(c => {
for (let i of c.children) {
if (i.formName == 'partyJob') {
i.opction = data.data
if (i.formName == formName) {
i.opction = data.data;
}
}
})
});
} catch (error) {
console.log(error, '获取职务字典');
console.log(error, `获取 ${dictType} 字典`);
}
},
getBuildList () {
this.$http.post('/actual/base/communityBuilding/buildingoption', { quartersId: this.form.villageId }).then(({ data: res }) => {
if (res.code !== 0) {
@ -1663,7 +1496,8 @@ export default {
},
checkNumberInput (itemj, itemk) {
if (isNaN(this.form[itemj][itemk])) {
if(this.form[itemj][itemk]){
if (isNaN(this.form[itemj][itemk])) {
this.$message.error("请输入数字");
this.form[itemj][itemk] = "";
} else {
@ -1671,6 +1505,8 @@ export default {
this.form[itemj][itemk]
);
}
}
},
handleChangeGrid (val) {
console.log('val', val)
@ -2282,7 +2118,7 @@ export default {
securityType: '',//
certificateDate: '',//yyyy-MM-dd
subsidyNum: '',//
subsidyAmount: '',//
subsidyAmount: null,//
}
this.newForm.ensureHouseDto = this.form.ensureHouseDto
}

6
src/views/modules/cpts/base/index.vue

@ -410,7 +410,7 @@ export default {
showSercahStatus:{
type: Boolean,
default: false,
}
},
},
data () {
@ -436,8 +436,8 @@ export default {
maxTableHeight () {
const { ref_search_height } = this;
return this.$store.state.inIframe
? this.clientHeight - ref_search_height - 265 + this.iframeHeight
: this.clientHeight - ref_search_height - 265;
? this.clientHeight - ref_search_height - 270 + this.iframeHeight
: this.clientHeight - ref_search_height - 270;
},
...mapGetters(["clientHeight", "iframeHeight"]),
},

Loading…
Cancel
Save