{"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\\TeamDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\views\\BasicData\\components\\TeamDialog.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/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 Team from '@/api/basicConfiguration/Team';\nimport placesDialog from \"./placesDialog.vue\";\nexport default {\n props: {},\n name: 'TeamDialog',\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 validateIdCard = function validateIdCard(rule, value, callback) {\n var regExp = /(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)/;\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 tirgger: ['blur', 'change']\n }],\n // filingNumber: [\n // {\n // required: true,\n // message: '请输入备案编号',\n // trigger: 'blur',\n // },\n // ],\n headman: [{\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 areaCode: [{\n required: true,\n message: '请选择行政区划',\n trigger: 'change'\n }],\n address: [{\n required: true,\n message: '请选择地址',\n trigger: 'blur'\n }],\n idcard: [{\n validator: validateIdCard,\n tirgger: ['blur', 'change']\n }],\n squareTeamList: [{\n required: true,\n validator: validateSquare,\n tirgger: 'change'\n }]\n },\n xboptions: [{\n value: '1',\n label: '男'\n }, {\n value: '2',\n label: '女'\n }],\n type: '新增',\n areaCode: [],\n formData: {\n name: '',\n // filingNumber: '',\n number: '',\n headman: '',\n phone: '',\n areaCode: '',\n address: '',\n squareTeamList: [] // teamMemberList: [\n // {\n // sex: '1',\n // },\n // ],\n\n },\n options: [],\n btnLoading: false\n };\n },\n created: function created() {\n this.getTownTree();\n },\n methods: {\n changeAge: function changeAge(value, row, $index) {\n row.age = value.replace(/[^0-9]/g, '');\n console.log('changeAge', $index, value);\n },\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 handleInput: function handleInput(val) {// console.log(val)\n // Team.getPinyin(val, (res) => {\n // if (res.state) {\n // this.formData.filingNumber = res.value\n // }\n // })\n },\n open: function open(data) {\n this.areaCode = [];\n this.formData = {\n name: '',\n // filingNumber: '',\n headman: '',\n number: '',\n phone: '',\n areaCode: '',\n address: '',\n squareTeamList: [] // teamMemberList: [\n // {\n // sex: '1',\n // },\n // ],\n\n };\n this.visible = true;\n this.type = '新增';\n },\n handleDelete: function handleDelete(val, index) {\n var _this2 = this;\n\n this.formData.teamMemberList.forEach(function (e, ei) {\n if (ei === index) {\n _this2.formData.teamMemberList.splice(index, 1);\n }\n });\n },\n //编辑\n edit: function edit(id) {\n var _this3 = this;\n\n this.formData = {};\n this.visible = true;\n this.type = '编辑';\n Team.detailId(id, function (res) {\n _this3.formData = res;\n\n _this3.$refs.form.resetFields();\n\n _this3.areaCode = res.areaFullCode ? res.areaFullCode.split('/').splice(1) : [];\n });\n },\n handleClose: function handleClose() {\n this.visible = false;\n },\n submitForm: function submitForm(formName) {\n this.$refs.form.validate(function (valid) {\n if (valid) {\n alert('submit!');\n } else {\n console.log('error submit!!');\n return false;\n }\n });\n },\n resetForm: function resetForm(formName) {\n this.$refs.form.resetFields();\n },\n addMember: function addMember() {\n this.formData.teamMemberList.push({\n sex: '1'\n });\n },\n handleChange: function handleChange(val) {\n var nodesObj = this.$refs['cascaders'].getCheckedNodes()[0].data;\n this.formData.areaFullCode = nodesObj.fullCode;\n this.formData.areaCode = nodesObj.code;\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; // 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 //保存\n handleSave: function handleSave() {\n var _this4 = this;\n\n console.log(this.formData);\n this.$refs.form.validate(function (valid) {\n if (valid) {\n _this4.btnLoading = true;\n var method;\n\n if (_this4.type === '新增') {\n method = Team.addSave;\n } else {\n method = Team.upData;\n }\n\n console.log(_this4.formData);\n method(_this4.formData, function (response) {\n if (response.state) {\n _this4.$notify({\n type: 'success',\n message: _this4.type + '成功',\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 }\n};",null]}