{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\RegistrationManage\\components\\EventRegistrationDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\RegistrationManage\\components\\EventRegistrationDialog.vue","mtime":1704791096033},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapState } from 'vuex';\nimport moment from 'moment';\nimport RegistrationManage from '@/api/RegistrationManage/RegistrationManage.js';\nimport PlazaLocation from '@/api/basicConfiguration/PlazaLocation.js';\nimport placesDialog from \"../../BasicData/components/placesDialog.vue\";\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nexport default {\n props: {},\n components: {\n placesDialog: placesDialog\n },\n name: 'NoiseClassifyDialog',\n data: function data() {\n var validatePhone = function validatePhone(rule, value, callback) {\n var regExp = /^1[3|4|5|7|8|9][0-9]{9}$/;\n\n if (!regExp.test(value)) {\n callback(new Error('请输入正确的手机号'));\n } else {\n callback();\n }\n };\n\n return {\n uploadUrl: window.context.portal + '/file/v1/fileUpload',\n // 服务器上传地址\n accept: '.png,.jpg,.jpeg',\n visible: false,\n loading: false,\n type: '新增',\n rules: {\n eventName: [{\n required: true,\n message: '请输入事件名称',\n trigger: 'blur'\n }],\n eventProduceTime: [{\n required: true,\n message: '请选择发生时间',\n trigger: 'change'\n }],\n areaCode: [{\n required: true,\n message: '请选择所属行政区划',\n trigger: 'change'\n }],\n eventType: [{\n required: true,\n message: '请选择事件分类',\n trigger: 'change'\n }],\n eventLevel: [{\n required: true,\n message: '请选择告警等级',\n trigger: 'change'\n }],\n eventSource: [{\n required: true,\n message: '请选择事件来源',\n trigger: 'change'\n }],\n eventUrgency: [{\n required: true,\n message: '请选择紧急程度',\n trigger: 'change'\n }],\n noiseLevel: [{\n required: true,\n message: '请输入噪音大小',\n trigger: 'blur'\n }],\n memo: [{\n required: true,\n message: '请输入事发原因',\n trigger: 'blur'\n }],\n reportPerson: [{\n required: true,\n message: '请输入上报人姓名',\n trigger: 'blur'\n }],\n phone: [{\n required: true,\n message: '请输入上报人电话',\n trigger: 'blur'\n }, {\n validator: validatePhone,\n trigger: 'blur'\n }]\n },\n formData: {\n eventType: '1',\n eventLevel: '1',\n eventSource: '1',\n eventUrgency: '1',\n noiseLevel: 0,\n sex: '1',\n eventProduceTime: moment().format('YYYY-MM-DD HH:mm:ss'),\n reportPerson: '',\n phone: '',\n imgUrl1: ''\n },\n areaTree: [],\n sjlyList: [],\n btnLoading: false,\n // 按钮loading\n imageUrl: [],\n fileList: []\n };\n },\n created: function created() {\n var _this = this;\n\n this.sjlyList = dictUtils.getDictItemsFromCache('sjly_bd');\n RegistrationManage.getbaseAreaTree().then(function (res) {\n _this.areaTree = res.value;\n _this.formData.reportPerson = _this.currentUserDetail.user.fullname;\n _this.formData.phone = _this.currentUserDetail.user.phone;\n });\n },\n mounted: function mounted() {},\n watch: {\n fileList: {\n handler: function handler(newVal, oldVal) {\n console.log(newVal);\n\n if (newVal.length) {\n this.formData.imgUrl1 = newVal.join(',');\n }\n }\n }\n },\n computed: mapState({\n currentUserDetail: function currentUserDetail(state) {\n return state.user.currentUserDetail;\n },\n header: function header(state) {\n if (state.login && state.login.currentUser) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n\n return {};\n }\n }),\n methods: {\n changeArea: function changeArea() {\n var _this2 = this;\n\n this.$nextTick(function () {\n var nodesObj = _this2.$refs['cascader'].getCheckedNodes();\n\n console.log(nodesObj);\n\n if (nodesObj.length) {\n _this2.formData.areaCode = nodesObj[0].data.code;\n _this2.formData.areaFullCode = nodesObj[0].data.fullCode;\n } else {\n _this2.formData.areaCode = '';\n _this2.formData.areaFullCode = '';\n }\n });\n },\n handleIncident: function handleIncident(val) {\n if (val == 1) {\n this.formData.reportPerson = this.currentUserDetail.user.fullname;\n this.formData.phone = this.currentUserDetail.user.phone;\n } else {\n this.formData.reportPerson = '';\n this.formData.phone = '';\n }\n },\n clearPlaces: function clearPlaces() {\n this.formData.squareLocationName = '';\n this.formData.squareLocationId = '';\n this.formData.areaCode = '';\n this.formData.areaFullCode = '';\n },\n changePlaces: function changePlaces(data) {\n this.formData.squareLocationName = data.squareLocationName;\n this.formData.squareLocationId = data.id;\n this.formData.areaCode = data.areaCode;\n this.formData.areaFullCode = data.areaFullCode;\n this.$forceUpdate();\n },\n handleSearchPlaces: function handleSearchPlaces() {\n this.$refs.placesDialog.open();\n },\n open: function open(data, type) {\n var _this3 = this;\n\n this.visible = true;\n\n if (type == 'edit') {\n this.type = '编辑';\n }\n\n if (data) {\n this.formData = data;\n console.log(data);\n this.fileList = data.imgUrl1 ? data.imgUrl1.split(',') : [];\n this.fileList.forEach(function (it) {\n _this3.imageUrl.push(window.context.portal + '/file/v1/downloadFile?fileId=' + it);\n });\n }\n\n if (data && data.squareLocationId) {\n PlazaLocation.getPlaceName(data.squareLocationId).then(function (res) {\n _this3.formData.squareLocationName = res.squareLocationName;\n\n _this3.$forceUpdate();\n });\n }\n },\n handleClose: function handleClose() {\n this.visible = false; // this.$refs.form.resetFields()\n\n this.formData = {\n eventType: '1',\n eventLevel: '1',\n eventSource: '1',\n eventUrgency: '1',\n noiseLevel: 0,\n sex: '1',\n eventProduceTime: moment().format('YYYY-MM-DD HH:mm:ss'),\n reportPerson: '',\n phone: '',\n imgUrl1: ''\n };\n this.imageUrl = [];\n this.fileList = [];\n this.$emit('getData');\n },\n handleSubmit: function handleSubmit(submitStatus) {\n var _this4 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this4.btnLoading = true;\n var API = RegistrationManage.add;\n\n if (_this4.type == '编辑') {\n API = RegistrationManage.update;\n }\n\n _this4.formData.submitStatus = submitStatus;\n API(_this4.formData).then(function (res) {\n console.log('res', res);\n\n if (res.state) {\n _this4.$notify({\n type: 'success',\n message: submitStatus === 0 ? '保存成功' : '提交成功',\n duration: 2000\n });\n\n _this4.handleClose();\n\n _this4.$emit('getData');\n } else {\n _this4.$message.warning(response.message);\n }\n\n _this4.btnLoading = false;\n });\n } else {\n _this4.$notify({\n type: 'warning',\n message: '请完善表单信息!',\n duration: 2000\n });\n }\n });\n },\n uploadSuccessRow: function uploadSuccessRow(res, index) {\n if (res) {\n console.log(res);\n this.imageUrl.push(window.context.portal + '/file/v1/downloadFile?fileId=' + res.fileId);\n this.fileList.push(res.fileId);\n } else {\n this.$message.error('上传失败!');\n }\n },\n beforeUpload: function beforeUpload(file) {\n return true;\n },\n beforeRemoveRow: function beforeRemoveRow(file, ind) {// this.basicsData.processDetails[ind].filePath.forEach((e, index) => {\n // console.log(e)\n // if (e.fileId == file.fileId) {\n // this.basicsData.processDetails[ind].filePath.splice(\n // index,\n // 1\n // )\n // }\n // })\n },\n deleteList: function deleteList(it, index) {\n this.fileList.splice(index, 1);\n this.imageUrl.splice(index, 1);\n }\n }\n};",null]}