{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\registerManage\\student-bind.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\registerManage\\student-bind.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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\nimport {getDictLabel} from '@/utils'\nimport debounce from 'lodash/debounce'\nexport default {\n filters:{\n filterLabel(val,type){\n return getDictLabel(type,val)\n },\n },\n data(){\n const asyncValidate=(rule, value, callback) => {\n this.$http({\n url: \"/system/globalValidation/checkUwb\",\n method: \"get\",\n params: {\n id: this.dataForm.scStdid,\n uwb: value\n }\n }).then(({ data: res }) => {\n if (res) {\n callback()\n } else {\n callback(new Error('UWB标签重复'))\n }\n }).catch(err => {\n callback(new Error(err.msg))\n })\n };\n const asyncValidateRf=(rule, value, callback) => {\n this.$http({\n url: \"/system/globalValidation/checkRfid\",\n method: \"get\",\n params: {\n id: this.dataForm.scWaid,\n uwb: value\n }\n }).then(({ data: res }) => {\n if (res) {\n callback()\n } else {\n callback(new Error('RFID重复'))\n }\n }).catch(err => {\n callback(new Error(err.msg))\n })\n };\n return {\n dialogVisible:false,\n loading:false,\n type:'post',\n dataForm:{},\n rules:{\n scRfcardid:[\n {required: true, message:'请输入', trigger: ['blur','change']},\n {\n required: true,\n validator: asyncValidateRf,\n trigger: ['change']\n }\n ],\n scUwbid:[\n {\n required: true,\n validator: (rule, value, callback)=>{\n if (!/^[0-9]+$/.test(value)) {\n return callback(new Error(\"UWB标签只能是数字\"));\n }\n callback()\n },\n trigger: ['change']\n },\n {\n required: true,\n validator: asyncValidate,\n trigger: ['change',]\n }\n ]\n\n },\n }\n },\n methods:{\n init(data){\n this.dialogVisible=true;\n this.dataForm={\n ...data,\n scSex:String(data.scSex),\n scStatus:String(data.scStatus),\n scEducation:String(data.scEducation),\n }\n this.$nextTick(()=>{\n this.$refs['dataForm'].clearValidate();\n })\n },\n submitInfo:debounce(function(){\n this.$refs['dataForm'].validate((valid)=>{\n if(!valid){\n return false\n }\n this.loading=true;\n this.dataForm.scGraduationdate=this.dataForm.scGraduationdate?this.dataForm.scGraduationdate:null;\n this.$http({\n url:\"/system/scstudents\",\n method:'put',\n data:this.dataForm\n }).then(({data})=>{\n if(data.code!=0){\n return this.$message.error(data.msg)\n }\n this.dialogVisible=false;\n this.$parent.$parent.search();\n this.$message.success(data.msg)\n }).finally(()=>{\n this.loading=false\n })\n })\n \n },1000)\n }\n}\n",{"version":3,"sources":["student-bind.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","file":"student-bind.vue","sourceRoot":"src/views/modules/registerManage","sourcesContent":["\n\n"]}]}