1 line
9.9 KiB
JSON
1 line
9.9 KiB
JSON
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\userControl\\userdetail.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\userControl\\userdetail.vue","mtime":1737610069452},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.array.find\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { UserBian, getAllLevel2Dept, save2Dept, addUser, getWebRoleList as _getWebRoleList } from \"@/api/getdata\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport { constants } from \"crypto\";\nexport default {\n components: {\n Popup: Popup\n },\n data: function data() {\n // var foodNameVa = (rule, value, callback) => {\n // var reg = /[`~!@#$%^&*()_\\-+=<>?:\"{}|,./;'\\\\[\\]·~!@#¥%……&*()——\\-+={}|《》?:“”【】、;‘’,。、]/g;\n // if (!reg.test(value)) {\n // callback();\n // } else {\n // callback(new Error(\"不支持输入@#¥%……...等特殊字符 !\"));\n // }\n // };\n\n var phoneRule = function phoneRule(rule, value, callback) {\n var isPhone = /^1(3|4|5|7|8|9)\\d{9}$/;\n if (isPhone.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输入正确格式的手机号\"));\n }\n };\n var nameRule = function nameRule(rule, value, callback) {\n var isname = /^[\\u4e00-\\u9fa5]+$/;\n if (isname.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输入纯中文\"));\n }\n };\n var EleID = function EleID(rule, value, callback) {\n var isname = /^[A-Za-z0-9]+$/;\n if (isname.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输英文或数字\"));\n }\n };\n var ordinary = function ordinary(rule, value, callback) {\n if (value || value == \"\") {\n callback();\n } else {\n callback(new Error(\"\"));\n }\n };\n var NumberRule = function NumberRule(rule, value, callback) {\n var isname = /^[0-9]+$/;\n if (isname.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输入纯数字格式\"));\n }\n };\n var baizu = function baizu(rule, value, callback) {\n var aa = /^[<>\"'%¥()&+\\\\\\\\'\\\\\"]$/g;\n if (!aa.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输入正确的数据\"));\n }\n };\n var loginName = function loginName(rule, value, callback) {\n var aa = /(^[A-Za-z]+$)|(^[A-Za-z]+-[A-Za-z]+$)/g;\n if (aa.test(value) || value == \"\") {\n callback();\n } else {\n callback(new Error(\"请输入正确字符类型!\"));\n }\n };\n return {\n indexCall: this.$route.query.index ? this.$route.query.index : window.localStorage.getItem(\"userIndex\"),\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n imgData: {},\n options: [],\n dialogImageUrl: \"\",\n dialogVisible: false,\n timeUpdate: \"\",\n row: this.$route.query.rowdata ? this.$route.query.rowdata : '',\n ruleForm: {\n Name: this.$route.query.rowdata ? this.$route.query.rowdata.realName : \"\",\n LoginId: this.$route.query.rowdata ? this.$route.query.rowdata.loginName : \"\",\n phone: this.$route.query.rowdata ? this.$route.query.rowdata.mobile : \"\",\n userSetting: this.$route.query.rowdata ? this.$route.query.rowdata.deptName : \"\",\n role_id: this.$route.query.rowdata ? this.$route.query.rowdata.role_id : ''\n },\n aa: \"\",\n til: \"添加\",\n id: this.$route.query.rowdata ? this.$route.query.rowdata.id : \"\",\n rules: {\n Name: [{\n required: true,\n message: \"请输入姓名\",\n trigger: \"blur\"\n }, {\n validator: nameRule,\n trigger: \"blur\"\n }],\n LoginId: [{\n required: true,\n message: \"请输入登录账号\",\n trigger: \"blur\"\n }, {\n trigger: \"blur\"\n }],\n role_id: [{\n required: true,\n message: \"请选择权限\",\n trigger: \"blur\"\n }]\n },\n role: []\n };\n },\n created: function created() {},\n mounted: function mounted() {\n this.getSelect();\n this.getWebRoleList();\n },\n methods: {\n getSelect: function getSelect() {\n var _this = this;\n getAllLevel2Dept().then(function (res) {\n if (res.returnCode == \"1\") {\n _this.options = res.returnData;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n },\n getWebRoleList: function getWebRoleList() {\n var _this2 = this;\n var aa = {\n roleName: '',\n pageIndex: 1,\n pageSize: 100\n };\n _getWebRoleList(aa).then(function (res) {\n if (res.returnCode == '1') {\n _this2.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this2.role = res.returnData.data;\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n },\n /**返回上一级 */comeBack: function comeBack() {\n this.$router.push({\n name: \"userManagement\",\n // name: \"Canteen\",\n params: {\n index: this.indexCall\n }\n });\n },\n closeDialogDel: function closeDialogDel(val) {\n var _this3 = this;\n var obj = {\n id: '',\n name: ''\n };\n // console.log(this.ruleForm.userSetting)\n // console.log(this.options)\n if (this.ruleForm.userSetting) {\n obj = this.options.find(function (item) {\n return item.id == _this3.ruleForm.userSetting || item.name == _this3.ruleForm.userSetting;\n });\n }\n // console.log(obj)\n if (val == \"2\") {\n // this.$route.query.rowdata?this.$route.query.rowdata.id:\"\",\n var Content = {\n id: this.id,\n //必传\n loginName: this.ruleForm.LoginId,\n realName: this.ruleForm.Name,\n mobile: this.ruleForm.phone,\n departmentId: obj.id,\n departmentName: obj.name,\n roleId: this.ruleForm.role_id\n };\n console.log(Content, 350);\n UserBian(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.$router.push({\n name: \"userManagement\",\n params: {\n index: _this3.indexCall\n }\n });\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n } else if (val == \"3\") {\n var Content = {\n loginName: this.ruleForm.LoginId,\n realName: this.ruleForm.Name,\n mobile: this.ruleForm.phone,\n departmentId: obj.id,\n departmentName: obj.name,\n roleId: this.ruleForm.role_id\n };\n addUser(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.$router.push({\n name: \"userManagement\",\n params: {\n index: _this3.indexCall\n }\n });\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(err);\n });\n }\n this.validation = false;\n },\n resetForm: function resetForm(formName) {\n this.$refs[formName].resetFields();\n this.$router.push({\n name: \"userManagement\",\n params: {\n index: this.indexCall\n }\n });\n },\n submitForm: function submitForm(formName) {\n var _this4 = this;\n this.$refs[formName].validate(function (valid) {\n // console.log(11111)\n if (valid) {\n _this4.validation = true;\n\n // console.log(222222)\n if (_this4.$route.query.title) {\n _this4.completeTitle = \"添加\";\n _this4.nav = \"是否进行添加?\";\n } else {\n _this4.completeTitle = \"编辑\";\n _this4.nav = \"是否进行编辑?\";\n }\n }\n });\n }\n }\n};",null]} |