{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\components\\PlazaLocationDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\components\\PlazaLocationDialog.vue","mtime":1703831130678},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-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\r\nimport utils from '@/utils.js'\r\nimport PlazaLocation from '@/api/basicConfiguration/PlazaLocation'\r\nimport Team from '@/api/basicConfiguration/Team'\r\n\r\nexport default {\r\n props: {},\r\n name: 'PersonalDialog',\r\n data() {\r\n return {\r\n visible: false,\r\n loading: false,\r\n rules: {\r\n squareLocationName: [\r\n {\r\n required: true,\r\n message: '请输入广场名称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n shortName: [\r\n {\r\n required: true,\r\n message: '请输入简称',\r\n trigger: 'blur',\r\n },\r\n ],\r\n noiseTypeId: [\r\n {\r\n required: true,\r\n message: '请选择噪音标准',\r\n trigger: 'blur',\r\n },\r\n ],\r\n detailAddress: [\r\n {\r\n required: true,\r\n message: '请选择详细地址',\r\n trigger: 'blur',\r\n },\r\n ],\r\n areaCode: [\r\n {\r\n required: true,\r\n message: '请选择行政区划',\r\n trigger: 'blur',\r\n },\r\n ],\r\n },\r\n xboptions: [],\r\n type: '新增',\r\n formData: {},\r\n areaCode: [],\r\n options: [],\r\n noise: [], //噪音标准\r\n noiseOptions: [], //噪音下拉数据\r\n squareTeam: [],\r\n squareTeamList: [], //组织团队\r\n btnLoading: false,\r\n }\r\n },\r\n created() {\r\n this.getTownTree()\r\n this.getNoiseTree()\r\n this.getTeam()\r\n },\r\n methods: {\r\n //行政区划\r\n getTownTree() {\r\n Team.townTree({}, (res) => {\r\n if (res.state) {\r\n this.options = res.value\r\n console.log(res.value)\r\n }\r\n })\r\n },\r\n handleChange(val) {\r\n this.$nextTick(() => {\r\n let nodesObj = this.$refs['cascader'].getCheckedNodes()\r\n console.log(nodesObj)\r\n if (nodesObj.length) {\r\n this.formData.areaCode = nodesObj[0].data.code\r\n this.formData.areaFullCode = nodesObj[0].data.fullCode\r\n this.formData.areaFullName = nodesObj[0].data.fullName\r\n } else {\r\n this.formData.areaCode = ''\r\n this.formData.areaFullCode = ''\r\n this.formData.areaFullName = ''\r\n }\r\n })\r\n },\r\n //噪音标准\r\n getNoiseTree() {\r\n PlazaLocation.getNoise({}, (res) => {\r\n if (res.state) {\r\n this.noiseOptions = res.value\r\n }\r\n })\r\n },\r\n handleNoise(val) {\r\n let arr = JSON.parse(JSON.stringify(val))\r\n this.formData.noiseTypeId = arr[0] ? arr[0] : ''\r\n this.formData.noiseLevelId = arr[1] ? arr[1] : ''\r\n },\r\n //组织团队\r\n getTeam() {\r\n Team.dataQuery(\r\n {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n },\r\n },\r\n (res) => {\r\n if (res.rows) {\r\n this.squareTeamList = res.rows\r\n }\r\n }\r\n )\r\n },\r\n open(data) {\r\n this.noise = []\r\n this.squareTeam = []\r\n this.areaCode = []\r\n this.visible = true\r\n this.formData = {}\r\n this.type = '新增'\r\n },\r\n handleClose() {\r\n this.visible = false\r\n },\r\n submitForm(formName) {\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n alert('submit!')\r\n } else {\r\n console.log('error submit!!')\r\n return false\r\n }\r\n })\r\n },\r\n edit(val) {\r\n this.noise = []\r\n this.squareTeam = []\r\n this.areaCode = []\r\n this.formData = {}\r\n this.type = '编辑'\r\n this.visible = true\r\n PlazaLocation.detailId(val, (res) => {\r\n if (res) {\r\n this.formData = res\r\n if (res.squareTeamList) {\r\n res.squareTeamList.forEach((e) => {\r\n this.squareTeam.push(e.teamFillingId)\r\n })\r\n }\r\n this.areaCode = res.areaFullCode\r\n ? res.areaFullCode.split('/').splice(1)\r\n : []\r\n console.log(this.areaCode)\r\n if (res.noiseLevelId && res.noiseTypeId) {\r\n this.noise = [res.noiseTypeId, res.noiseLevelId]\r\n } else if (res.noiseTypeId) {\r\n this.noise = [res.noiseTypeId]\r\n } else {\r\n this.noise = []\r\n }\r\n }\r\n })\r\n },\r\n handleSave() {\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n this.btnLoading = true\r\n // this.formData.squareTeamList = []\r\n // this.squareTeam.forEach((e) => {\r\n // this.formData.squareTeamList.push({\r\n // teamFillingId: e,\r\n // })\r\n // })\r\n let method\r\n if (this.type === '新增') {\r\n method = PlazaLocation.addSave\r\n } else {\r\n method = PlazaLocation.upData\r\n }\r\n method(this.formData, (response) => {\r\n if (response.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: this.type + '成功',\r\n duration: 2000,\r\n })\r\n this.handleClose()\r\n this.$emit('getData')\r\n } else {\r\n this.$message.warning(response.message)\r\n }\r\n this.btnLoading = false\r\n })\r\n } else {\r\n this.$notify({\r\n type: 'warning',\r\n message: '请完善表单信息!',\r\n duration: 2000,\r\n })\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}