diff --git a/src/views/modules/base/huji/immigration/edit.vue b/src/views/modules/base/huji/immigration/edit.vue index f90baa11b..9ba26be26 100644 --- a/src/views/modules/base/huji/immigration/edit.vue +++ b/src/views/modules/base/huji/immigration/edit.vue @@ -1,366 +1,285 @@ @@ -371,7 +290,7 @@ import formVltHelper from 'dai-js/tools/formVltHelper' import { computedCard } from '@/utils/index' import { isCard, isMobile } from '@/utils/validate' -function iniFmData() { +function iniFmData () { return { gridId: '', villageId: '', @@ -400,7 +319,7 @@ function iniFmData() { } export default { - data() { + data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 @@ -436,7 +355,7 @@ export default { }, components: {}, computed: { - dataRule() { + dataRule () { let checkIdCard = (rule, value, callback) => { if (value === '') { callback(new Error('请输入证件号')) @@ -469,26 +388,26 @@ export default { sourceAddress: [ { required: true, message: '来源地不能为空', trigger: 'blur' } ], - address: [ - { required: true, message: '详细地址不能为空', trigger: 'blur' } - ] + // address: [ + // { required: true, message: '详细地址不能为空', trigger: 'blur' } + // ] } }, - changeVDisabled() { + changeVDisabled () { return !this.fmData.villageId }, - changeBDisabled() { + changeBDisabled () { return !this.fmData.buildId }, - changeDDisabled() { + changeDDisabled () { return !this.fmData.unitId } }, props: {}, watch: {}, - async mounted() { + async mounted () { console.log('mounted-----我执行了') await this.getGridList() @@ -496,13 +415,13 @@ export default { }, methods: { - lzayLoadArea(node, resolve) { + lzayLoadArea (node, resolve) { // this.getArea(node, resolve) setTimeout(() => { this.getArea(node, resolve) }, 200) }, - async checkResiAvailable() { + async checkResiAvailable () { const { fmData: { idCard, isResiUser } } = this @@ -528,7 +447,7 @@ export default { } } }, - handleNowArea(val) { + handleNowArea (val) { console.log('val-----', val) console.log('label-----', this.$refs.nowArea.getCheckedNodes()) if (val.length > 0) { @@ -544,7 +463,7 @@ export default { this.fmData.sourceAddressPathCode = '' } }, - handleBlurId(val) { + handleBlurId (val) { const { sex, age } = computedCard(this.fmData.idCard) if (val) { this.fmData.age = age @@ -553,20 +472,20 @@ export default { } }, - handleClearVillage() { + handleClearVillage () { this.fmData.buildId = '' this.fmData.homeId = '' }, - handleClearBuild() { + handleClearBuild () { this.fmData.buildId = '' this.fmData.unitId = '' this.fmData.homeId = '' }, - handleClearDan() { + handleClearDan () { this.fmData.unitId = '' this.fmData.homeId = '' }, - handleChangeGrid(val) { + handleChangeGrid (val) { console.log('val', val) this.fmData.villageId = '' this.fmData.buildId = '' @@ -576,7 +495,7 @@ export default { this.fmData.householderRelation = '' this.getValiheList() }, - handleChangeV(val) { + handleChangeV (val) { console.log('val', val) this.fmData.buildId = '' this.fmData.unitId = '' @@ -585,7 +504,7 @@ export default { this.fmData.householderRelation = '' this.getBuildList() }, - handleChangeB(val) { + handleChangeB (val) { console.log('val', val) this.fmData.unitId = '' this.fmData.homeId = '' @@ -593,14 +512,14 @@ export default { this.fmData.householderRelation = '' this.getUniList() }, - handleChangeD(val) { + handleChangeD (val) { console.log('val', val) this.fmData.homeId = '' this.fmData.householderName = '' this.fmData.householderRelation = '' this.getHouseList() }, - handleChangeH(val) { + handleChangeH (val) { console.log('val', val) this.getHouseMaster() }, @@ -629,7 +548,7 @@ export default { } }, - getRelationList() { + getRelationList () { const { user } = this.$store.state this.$http .post('/sys/dict/data/relationship', { @@ -648,7 +567,7 @@ export default { }) }, - getGridList() { + getGridList () { const { user } = this.$store.state this.$http .post('/gov/org/customergrid/gridoption', { @@ -667,7 +586,7 @@ export default { return this.$message.error('网络错误') }) }, - getValiheList() { + getValiheList () { const { user } = this.$store.state this.$http .post('/gov/org/icneighborhood/neighborhoodoption', { @@ -687,7 +606,7 @@ export default { return this.$message.error('网络错误') }) }, - getBuildList() { + getBuildList () { this.$http .post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.fmData.villageId @@ -704,7 +623,7 @@ export default { return this.$message.error('网络错误') }) }, - getUniList() { + getUniList () { this.$http .post('/gov/org/icbuildingunit/unitoption', { buildingId: this.fmData.buildId @@ -721,7 +640,7 @@ export default { return this.$message.error('网络错误') }) }, - getHouseList() { + getHouseList () { this.$http .post('/gov/org/ichouse/houseoption', { unitId: this.fmData.unitId }) .then(({ data: res }) => { @@ -737,7 +656,7 @@ export default { }) }, - getHouseMaster() { + getHouseMaster () { const { homeId } = this.fmData if (!homeId) return (this.alreadyHaveMaster = false) @@ -763,7 +682,7 @@ export default { }) }, - async initForm(type, id) { + async initForm (type, id) { this.$refs.ref_form.resetFields() this.formType = type @@ -778,7 +697,7 @@ export default { this.getHouseList() } }, - async getDatail(moveInId) { + async getDatail (moveInId) { let url = '/epmetuser/icMoveIn/detail' const params = { @@ -792,7 +711,7 @@ export default { } else this.$message.error(msg) }, - async handleComfirm() { + async handleComfirm () { // setTimeout(() => { // this.btnDisable = false @@ -834,7 +753,7 @@ export default { }) }, - async submit() { + async submit () { let url = '' if (this.formType === 'add') { @@ -861,11 +780,11 @@ export default { } }, - handleCancle() { + handleCancle () { this.resetData() this.$emit('dialogCancle') }, - resetData() { + resetData () { this.orgId = '' this.nowAllCode = [] this.btnDisable = false