{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\falshForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\components\\falshForm-dialog.vue","mtime":1684458239152},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport req from '@/request.js'\r\nimport latitude from '@/mixins/latitude'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport flashFloods from '@/api/flashFloods.js'\r\nexport default {\r\n name: 'falshForm',\r\n props: {\r\n showFormDia: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n title: {\r\n type: String,\r\n default: '',\r\n },\r\n pId: {\r\n type: String,\r\n default: '',\r\n },\r\n },\r\n data() {\r\n return {\r\n params: {\r\n addvcd: null, //行政区\r\n name: null, //防治区名称\r\n villageCode: null, //村落代码\r\n basinName: null, //所属小流域名称\r\n basinCode: null, //所属小流域代码\r\n householder: null, //户主名称\r\n peopleNum: null, //总人数(人)\r\n buildArea: null, //住房建筑面积(㎡)\r\n buildType: null, //住房建筑类型\r\n buildStructure: null, //住房结构形式\r\n lng: null,\r\n lat: null,\r\n altitude: null,\r\n isNearWater: 0,\r\n isNearSlope: 0,\r\n tel: null,\r\n },\r\n crOverTypes: [], //跨界类型字典数组\r\n basGrads: [], //流域级别字典类型\r\n basAdNames: [], //行政下拉\r\n AdName: null, //接受每次选中的值\r\n setKesLabel: {\r\n value: 'code',\r\n label: 'name',\r\n children: 'children',\r\n },\r\n rules: {\r\n name: [{required: true, message: '请输入防治区名称', trigger: 'blur'}],\r\n villageCode: [\r\n {required: true, message: '请输入村落代码', trigger: 'blur'},\r\n ],\r\n addvcd: [\r\n {\r\n required: true,\r\n message: '请选择行政区划',\r\n trigger: 'blur',\r\n },\r\n ],\r\n basinName: [\r\n {required: true, message: '请输入所属小流域名称', trigger: 'blur'},\r\n ],\r\n basinCode: [\r\n {required: true, message: '请输入所属小流域代码', trigger: 'blur'},\r\n ],\r\n householder: [\r\n {required: true, message: '请输入户主名称', trigger: 'blur'},\r\n ],\r\n\r\n buildType: [\r\n {required: true, message: '请选择住房建筑类型', trigger: 'change'},\r\n ],\r\n buildStructure: [\r\n {required: true, message: '请选择住房结构形式', trigger: 'change'},\r\n ],\r\n lng: [{required: true, message: '请输入经度(°)', trigger: 'blur'}],\r\n lat: [{required: true, message: '请输入纬度(°)', trigger: 'blur'}],\r\n },\r\n buildTypes: [],\r\n buildStructures: [],\r\n }\r\n },\r\n created() {\r\n this.getDetailInfo()\r\n this.buildTypes = dictUtils.getDictItemsFromCache('shzhfz-zfjzlx')\r\n this.buildStructures = dictUtils.getDictItemsFromCache('shzhfz-zfjgxs')\r\n // 行政区查询\r\n flashFloods.getbasAdName({}, (res) => {\r\n this.basAdNames = res.value\r\n })\r\n },\r\n methods: {\r\n onhouChange(val) {\r\n if (val) {\r\n this.params.addvcd = val[val.length - 1]\r\n }\r\n // let arr = this.basAdNames.filter((ite) => ite.code === val[0])\r\n // this.calleArr(arr, val[val.length - 1])\r\n },\r\n handleClose() {\r\n this.params = {}\r\n this.$emit('closeFormDiao')\r\n },\r\n // 根据ID查询\r\n getDetailInfo() {\r\n console.log(111)\r\n if (this.title === '修改') {\r\n flashFloods.detailId(this.pId, (res) => {\r\n if (res.state) {\r\n this.params.name = res.value.name\r\n this.params.villageCode = res.value.villageCode\r\n this.params.basinName = res.value.basinName\r\n this.params.basinCode = res.value.basinCode\r\n this.params.peopleNum = res.value.peopleNum\r\n this.params.householder = res.value.householder\r\n this.params.buildArea = res.value.buildArea\r\n this.params.buildType = res.value.buildType\r\n this.params.buildStructure = res.value.buildStructure\r\n this.params.lng = res.value.lng\r\n this.params.lat = res.value.lat\r\n this.params.altitude = res.value.altitude\r\n this.params.isNearWater = Number(res.value.isNearWater)\r\n this.params.isNearSlope = Number(res.value.isNearSlope)\r\n this.params.tel = res.value.tel\r\n this.params.id = res.value.id\r\n this.params.addvcd = res.value.addvcd\r\n }\r\n })\r\n } else {\r\n }\r\n },\r\n goInfo() {\r\n console.log(123)\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n if (this.title === '新增') {\r\n flashFloods.addSave(this.params, (response) => {\r\n if (response.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '新增成功',\r\n duration: 2000,\r\n // offset: 80\r\n })\r\n this.$emit('closeFormDiao')\r\n this.$emit('refList')\r\n } else {\r\n }\r\n })\r\n }\r\n if (this.title === '修改') {\r\n console.log(1)\r\n // let params = JSON.parse(JSON.stringify(this.params))\r\n // params.basAdCode = params.basAdCode.toString()\r\n flashFloods.upData(this.params, (response) => {\r\n if (response.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '修改成功',\r\n duration: 2000,\r\n })\r\n this.$emit('closeFormDiao')\r\n this.$emit('refList')\r\n } else {\r\n }\r\n })\r\n }\r\n } else {\r\n return false\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}