{"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\\personData\\student\\student-add-or-update.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\personData\\student\\student-add-or-update.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//\n//\n//\n//\n//\n//\n//\n//\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 {\n\tgetDictDataList\n} from '@/utils'\nimport {\n\tisMobile,\n\tidCardValidate\n} from '@/utils/validate'\nimport debounce from 'lodash/debounce'\nimport Cookies from 'js-cookie'\nimport imgClip from '@/components/public/img-clip'\nexport default {\n\tcomponents: {\n\t\timgClip\n\t},\n\twatch: {\n\t\t'dataForm.scIdno': {\n\t\t\timmediate: true,\n\t\t\thandler(val) {\n\t\t\t\tlet gender = '0';\n\t\t\t\tif (val && val.length == 18) {\n\t\t\t\t\tgender = val[16] % 2 == 0 ? '0' : '1';\n\t\t\t\t}\n\t\t\t\tthis.dataForm.scSex = gender\n\t\t\t}\n\t\t}\n\t},\n\tdata() {\n\t\tlet _this = this;\n\t\treturn {\n\t\t\tdialogVisible: false,\n\t\t\tloading: false,\n\t\t\timgLoading: false,\n\t\t\ttype: 'post',\n\t\t\tdataForm: {\n\t\t\t\tscPhotoimg: '',\n\t\t\t\tscStuname: '',\n\t\t\t\tscIdno: '',\n\t\t\t\tscSex: '0',\n\t\t\t\tscPhonenum: '',\n\t\t\t\tscNo: '',\n\t\t\t\tscStatus: '',\n\t\t\t\tscEducation: '',\n\t\t\t\tscRegisterdate: '',\n\t\t\t\tscGraduationdate: '',\n\t\t\t\tscHeadphotoimg: \"\",\n\t\t\t\tscSchool:\"\", // 学院\n\t\t\t},\n\t\t\tpickerOptions: {\n\t\t\t\tdisabledDate: (time) => {\n\t\t\t\t\treturn time.getTime() < new Date(this.dataForm.scRegisterdate).getTime()\n\t\t\t\t}\n\t\t\t},\n\t\t\tgenderList: getDictDataList('gender').filter(item => item.dictValue < 2),\n\t\t\tstudentStatusList: getDictDataList('studentStatus'),\n\t\t\teducationList: getDictDataList('education'),\n\t\t\tschoolList: getDictDataList('school'), // 电子科技大学深圳高等研究院 学院列表\n\t\t\trules: {\n\t\t\t\tscHeadphotoimg: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请上传图片',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}, ],\n\t\t\t\tscStuname: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tmax: 50,\n\t\t\t\t\t\tmessage: '最多50个字符',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tscIdno: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalidator: idCardValidate,\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tscSex: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\tscPhonenum: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalidator: isMobile,\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tscNo: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\tscEducation: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\tscRegisterdate: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\tscStatus: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}]\n\n\t\t\t},\n\t\t\tuploadHeaders: {},\n\t\t\tuploadUrl: window.SITE_CONFIG['apiURL'] + '/system/upload'\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.uploadHeaders = {\n\t\t\tAuthorization: 'Bearer ' + Cookies.get('access_token') || ''\n\t\t}\n\t},\n\tmethods: {\n\t\tinit(data) {\n\t\t\tthis.dialogVisible = true;\n\t\t\t// 编辑\n\t\t\tif (data) {\n\t\t\t\tthis.type = \"put\";\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\t...data,\n\t\t\t\t\tscSex: String(data.scSex),\n\t\t\t\t\tscStatus: String(data.scStatus),\n\t\t\t\t\tscEducation: String(data.scEducation),\n\t\t\t\t}\n\t\t\t\tthis.$nextTick(()=>{\n\t\t\t\t\tthis.$refs['img'].init(this.dataForm.scHeadphotoimg)\n\t\t\t\t})\n\t\t\t}\n\t\t\t// 新增\n\t\t\telse {\n\t\t\t\tthis.type = \"post\";\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\tscPhotoimg: '',\n\t\t\t\t\tscStuname: '',\n\t\t\t\t\tscIdno: '',\n\t\t\t\t\tscSex: '0',\n\t\t\t\t\tscPhonenum: '',\n\t\t\t\t\tscNo: '',\n\t\t\t\t\tscStatus: '',\n\t\t\t\t\tscEducation: '',\n\t\t\t\t\tscRegisterdate: '',\n\t\t\t\t\tscGraduationdate: null,\n\t\t\t\t\tscHeadphotoimg: \"\",\n\t\t\t\t\tscSchool:\"\", // 学院\n\t\t\t\t};\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs['dataForm'].clearValidate()\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tsubmitInfo: debounce(function() {\n\t\t\tthis.$refs['dataForm'].validate((valid) => {\n\t\t\t\tif (!valid) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tthis.loading = true;\n\t\t\t\tthis.dataForm.scPhotoimg = sessionStorage.getItem(\"eightPic\")\n\t\t\t\tsessionStorage.removeItem(\"fivePic\")\n\t\t\t\tthis.dataForm.scGraduationdate = this.dataForm.scGraduationdate ? this.dataForm.scGraduationdate : null;\n\t\t\t\tthis.$http({\n\t\t\t\t\turl: \"/system/scstudents\",\n\t\t\t\t\tmethod: this.type,\n\t\t\t\t\tdata: this.dataForm\n\t\t\t\t}).then(({\n\t\t\t\t\tdata\n\t\t\t\t}) => {\n\t\t\t\t\tif (data.code != 0) {\n\t\t\t\t\t\treturn this.$message.error(data.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.dialogVisible = false;\n\t\t\t\t\tif (this.type == 'post') {\n\t\t\t\t\t\tthis.$parent.$parent.resetQuery();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.$parent.$parent.search();\n\t\t\t\t\t}\n\t\t\t\t\tthis.$message.success(data.msg)\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t})\n\t\t\t})\n\n\t\t}, 1000),\n\t}\n}\n",{"version":3,"sources":["student-add-or-update.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA;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;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;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","file":"student-add-or-update.vue","sourceRoot":"src/views/modules/personData/student","sourcesContent":["\n\n\n"]}]}