{"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\\BasicData\\components\\PersonalDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\components\\PersonalDialog.vue","mtime":1703831130678},{"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/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//\nimport utils from '@/utils.js';\nimport Personal from '@/api/basicConfiguration/Personal';\nimport Team from '@/api/basicConfiguration/Team';\nimport placesDialog from \"./placesDialog.vue\";\nexport default {\n props: {},\n name: 'PersonalDialog',\n components: {\n placesDialog: placesDialog\n },\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 var validateSquare = function validateSquare(rule, value, callback) {\n console.log(value);\n\n if (value.length) {\n callback();\n } else {\n callback(new Error('请选择广场舞地点'));\n }\n };\n\n return {\n visible: false,\n loading: false,\n rules: {\n name: [{\n required: true,\n message: '请输入姓名',\n trigger: 'blur'\n }],\n phone: [{\n required: true,\n message: '请输入联系电话',\n trigger: 'blur'\n }, {\n validator: validatePhone,\n tirgger: 'blur'\n }],\n areaCode: [{\n required: true,\n message: '请选择行政区划',\n trigger: 'blur'\n }],\n squareTeamList: [{\n required: true,\n validator: validateSquare,\n tirgger: 'change'\n }]\n },\n type: '新增',\n formData: {\n squareTeamList: []\n },\n areaCode: [],\n btnLoading: false,\n options: []\n };\n },\n created: function created() {\n this.getTownTree();\n },\n methods: {\n getTownTree: function getTownTree() {\n var _this = this;\n\n Team.townTree({}, function (res) {\n if (res.state) {\n _this.options = res.value;\n }\n });\n },\n open: function open(data) {\n this.formData = {\n squareTeamList: []\n };\n this.visible = true;\n this.type = '新增';\n },\n edit: function edit(id) {\n var _this2 = this;\n\n this.formData = {};\n this.visible = true;\n this.type = '编辑';\n Personal.detailId(id, function (res) {\n _this2.formData = res;\n _this2.areaCode = res.areaFullCode ? res.areaFullCode.split('/').splice(1) : [];\n console.log(_this2.areaCode);\n });\n },\n handleClose: function handleClose() {\n this.visible = false;\n },\n resetForm: function resetForm(formName) {\n this.$refs.form.resetFields();\n },\n handleChange: function handleChange(val) {\n var arr = JSON.parse(JSON.stringify(val));\n this.formData.areaFullCode = '/' + arr.join('/');\n this.formData.areaCode = arr.pop();\n },\n //保存\n handleSave: function handleSave() {\n var _this3 = this;\n\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this3.btnLoading = true;\n var method;\n\n if (_this3.type === '新增') {\n method = Personal.addSave;\n } else {\n method = Personal.upData;\n }\n\n console.log(_this3.formData);\n method(_this3.formData, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.type + '成功',\n duration: 2000\n });\n\n _this3.handleClose();\n\n _this3.$emit('getData');\n } else {\n _this3.$message.warning(response.message);\n }\n\n _this3.btnLoading = false;\n });\n } else {\n _this3.$notify({\n type: 'warning',\n message: '请完善表单信息!',\n duration: 2000\n });\n }\n });\n },\n handleSearchPlaces: function handleSearchPlaces() {\n this.$refs.placesDialog.open(this.formData.squareTeamList);\n },\n changePlaces: function changePlaces(data) {\n console.log(data);\n this.formData.squareTeamList = data;\n }\n }\n};",null]}