From 831d0f4b6927e76fb87ecef6e00751bb6bb2d073 Mon Sep 17 00:00:00 2001 From: nsgkyjk <759200926@qq.com> Date: Fri, 25 Mar 2022 11:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=85=E5=9F=BA=E5=9C=B0=E8=B0=83=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homesteadSurvey/add.vue | 182 +- src/views/homesteadSurvey/index.vue | 19 +- src/views/homesteadSurvey/list.vue | 161 +- static/dictyType.json | 5217 +++++++++++++++++++++++++++ 4 files changed, 5361 insertions(+), 218 deletions(-) create mode 100644 static/dictyType.json diff --git a/src/views/homesteadSurvey/add.vue b/src/views/homesteadSurvey/add.vue index af2c8e3c..f055f129 100644 --- a/src/views/homesteadSurvey/add.vue +++ b/src/views/homesteadSurvey/add.vue @@ -2927,6 +2927,7 @@ import { listVillage} from "@/api/homesteadSurvey/village"; import { sysConfig} from "@/api/homesteadSurvey/index"; import { Notify, Dialog, Toast } from 'vant'; + import axios from "axios"; export default { name: "homesteadAdd", components: { MapGisDrawing,}, @@ -3153,9 +3154,50 @@ zjdProductResh:this.guidProduct(), zrzProductResh:this.guidProduct(), fsssProductResh:this.guidProduct(), + // 字典列表json + dictTypeList:null, }; }, created(){ + axios.get('../static/dictyType.json').then(res => { + this.dictTypeList = res.data + this.lyzkOptions= this.dictTypeList.zjdlyzk + console.log(this.dictTypeList.zjdlyzk) + this.zjdqdfsOptions = this.dictTypeList.acquisition_method; + this.sjlyOptions = this.dictTypeList.sjly; + this.fssslxOptions = this.dictTypeList.fsss_type; + this.qslyOptions = this.dictTypeList.acquisition_method; + this.fwztOptions = this.dictTypeList.fwzt; + this.jglxOptions = this.dictTypeList.house_jglx; + this.jzwqkOptions = this.dictTypeList.fwzt; + this.tdzkOptions = this.dictTypeList.land_state; + this.pzsjOptions = this.dictTypeList.approve_time; + this.phlymsOptions = this.dictTypeList.phlyms; + this.fwlxOptions = this.dictTypeList.fwlx; + this.fwxzOptions = this.dictTypeList.fwxz; + this.hxOptions = this.dictTypeList.nmfwhx; + this.hxjgOptions = this.dictTypeList.nmfwhxjg; + this.fwjgOptions = this.dictTypeList.housing_structure; + this.fwytOptions = this.dictTypeList.fwyt; + this.gyfsOptions = this.dictTypeList.common_mode; + this.qlrlxOptions = this.dictTypeList.obligee_type; + this.zjlxOptions = this.dictTypeList.zjlx; + this.hjszssOptions = this.dictTypeList.hjszss; + this.qlxzOptions = this.dictTypeList.rights_nature; + this.qllxOptions = this.dictTypeList.rights_type; + this.qlsdfsOptions = this.dictTypeList.right_setting_mode; + this.ytOptions = this.dictTypeList.land_use; + this.jzhcssfyzfOptions = this.dictTypeList.jzhcssfyzf; + this.occupationOptions = this.dictTypeList.occupation; + this.hyzkOptions = this.dictTypeList.hyzk; + this.cybzOptions = this.dictTypeList.member_remark; + this.jzqkOptions = this.dictTypeList.living_condition; + if(this.dictTypeList.tddj){ + this.tddjOptions = this.dictTypeList.tddj; + } + this.industryOptions = this.dictTypeList.Industry; + }) + this.baseUrl = this.$cookies.get("url") console.log(this.$route.query.res); console.log(this.$cookies.get("search")); //this.itemBc = this.$cookies.get("map"); @@ -3190,7 +3232,7 @@ } this.form = this.cookiesInfo.mapZjdAData; this.getnhdmlist(); - this.getBaseUrl(); + /*this.getBaseUrl();*/ this.getZjd(); if(this.ztMap){ this.$cookies.set("search",this.backMap); @@ -3223,7 +3265,7 @@ if(this.item.houseDataConfirmStatus!="CONFIRMED"){ this.isFinished = true } - this.getBaseUrl(); + /*this.getBaseUrl();*/ this.getnhdmlist(); this.getZjd(); @@ -3233,119 +3275,21 @@ if(this.item.houseDataConfirmStatus!="CONFIRMED"){ this.isFinished = true } - this.getBaseUrl(); + /*this.getBaseUrl();*/ this.getnhdmlist(); this.getZjd(); } - this.getDicts("zjdlyzk").then(response => { - this.lyzkOptions = response.data; - }); - this.getDicts("acquisition_method").then(response => { - this.zjdqdfsOptions = response.data; - }); - this.getDicts("sjly").then(response => { - this.sjlyOptions = response.data; - }); - this.getDicts("fsss_type").then(response => { - this.fssslxOptions = response.data; - }); - this.getDicts("acquisition_method").then(response => { - this.qslyOptions = response.data; - }); - this.getDicts("fwzt").then(response => { - this.fwztOptions = response.data; - }); - this.getDicts("house_jglx").then(response => { - this.jglxOptions = response.data; - }); - this.getDicts("fwzt").then(response => { - this.jzwqkOptions = response.data; - }); - this.getDicts("land_state").then(response => { - this.tdzkOptions = response.data; - }); - this.getDicts("approve_time").then(response => { - this.pzsjOptions = response.data; - }); - this.getDicts("phlyms").then(response => { - this.phlymsOptions = response.data; - }); - this.getDicts("fwlx").then(response => { - this.fwlxOptions = response.data; - }); - this.getDicts("fwxz").then(response => { - this.fwxzOptions = response.data; - }); - this.getDicts("nmfwhx").then(response => { - this.hxOptions = response.data; - }); - this.getDicts("nmfwhxjg").then(response => { - this.hxjgOptions = response.data; - }); - this.getDicts("housing_structure").then(response => { - this.fwjgOptions = response.data; - }); - this.getDicts("fwyt").then(response => { - this.fwytOptions = response.data; - }); - this.getDicts("common_mode").then(response => { - this.gyfsOptions = response.data; - }); - this.getDicts("obligee_type").then(response => { - this.qlrlxOptions = response.data; - }); - this.getDicts("zjlx").then(response => { - this.zjlxOptions = response.data; - }); - this.getDicts("hjszss").then(response => { - this.hjszssOptions = response.data; - }); this.getDicts("family_status").then(response => { - var arr = [];response.data.forEach(function (item) { + let arr = [];response.data.forEach(function (item) { if (item.dictLabel !== '户主') { arr.push(item) } }); this.yhzgxOptions = arr; }); - this.getDicts("rights_nature").then(response => { - this.qlxzOptions = response.data; - }); - this.getDicts("rights_type").then(response => { - this.qllxOptions = response.data; - }); - this.getDicts("right_setting_mode").then(response => { - this.qlsdfsOptions = response.data; - }); - this.getDicts("land_use").then(response => { - this.ytOptions = response.data; - }); - this.getDicts("jzhcssfyzf").then(response => { - this.jzhcssfyzfOptions = response.data; - }); - this.getDicts("occupation").then(response => { - this.occupationOptions = response.data; - }); - this.getDicts("hyzk").then(response => { - this.hyzkOptions = response.data; - }); - this.getDicts("member_remark").then(response => { - this.cybzOptions = response.data; - }); - this.getDicts("living_condition").then(response => { - this.jzqkOptions = response.data; - }); - this.getDicts("tddj").then(response => { - this.tddjOptions = response.data; - }); - this.getDicts("Industry").then(response => { - this.industryOptions = response.data; - }); }, mounted(){ - // if(this.active ==1 && !this.ztMap){ - // this.mapClickLoading(); - // } + }, methods: { showPic(){ @@ -3617,14 +3561,13 @@ }) } }, - getBaseUrl(){ + /*getBaseUrl(){ let params={ configKey: "system.attachment.url"} sysConfig(params).then(response => { this.baseUrl = response.rows[0].configValue - console.log(this.baseUrl) }) - }, + },*/ // 验证 validator(val){ if(val>1||val<0||val.length>4){ @@ -4517,29 +4460,10 @@ } this.fileListzjd = [] if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""&&this.form.zjdxctp.length>0){ - if(this.baseUrl==""){ - let tt = setInterval( function () - { - if(this.baseUrl!=""){ - clearInterval(tt) - if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""){ - let li = this.form.zjdxctp.split(","); - li.map(res => { - this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) - console.log({"url":this.baseUrl+res,"baseUrl":res}) - }) - } - } - },1000); - }else{ - if(this.form.zjdxctp!=null&&this.form.zjdxctp!=""){ - let li = this.form.zjdxctp.split(","); - li.map(res => { - this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) - console.log({"url":this.baseUrl+res,"baseUrl":res}) - }) - } - } + let li = this.form.zjdxctp.split(","); + li.map(res => { + this.fileListzjd.push({"url":this.baseUrl+res,"baseUrl":res}) + }) } this.lyzkOptions.map(res => { diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index 7f810d83..4d17553f 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -171,9 +171,11 @@