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AS,GAAEV,IAAMS,EAAUE,WAAWC,SAAS,EAAE,OACrDV,EAAQQ,EAAM,GAChB,GAEV,C","sources":["webpack://scproject/./src/views/activityManage/newMarkerActivity.vue","webpack://scproject/src/views/activityManage/newMarkerActivity.vue","webpack://scproject/./src/views/activityManage/newMarkerActivity.vue?0cc1","webpack://scproject/./src/views/activityManage/newMarkerActivity.vue?b313","webpack://scproject/./src/components/tool/getProjectNo.js"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.loading),expression:\"loading\"}],attrs:{\"id\":\"MakerActivityWord\"}},[_vm._m(0),_c('hr'),_c('markeractivityWord',{attrs:{\"wordData\":_vm.wordData,\"total\":_vm.total}}),_c('div',{staticStyle:{\"position\":\"fixed\",\"bottom\":\"5%\",\"right\":\"2%\"}},[_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.saveDraft}},[_vm._v(\"保存草稿\")]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":_vm.test}},[_vm._v(\"提交活动\")])],1),_c('el-dialog',{staticClass:\"pageSubmitData\",attrs:{\"title\":\"提示\",\"visible\":_vm.submitHint,\"width\":\"600px\"},on:{\"update:visible\":function($event){_vm.submitHint=$event}}},[_c('div',{staticClass:\"deleteContent\"},[_vm._v(\" 确定提交“\"+_vm._s(_vm.wordData[\"activityName\"])+\"”创客活动吗? \")]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{staticClass:\"AllDialogBtn\",attrs:{\"type\":\"primary\"},on:{\"click\":_vm.applyActivity}},[_vm._v(\"确认提交\")]),_c('el-button',{staticClass:\"AllDialogBtn\",on:{\"click\":function($event){_vm.submitHint = false}}},[_vm._v(\"取消\")])],1)])],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"pAHeader\"},[_c('div',{staticClass:\"pAHeader1\"},[_vm._v(\"创客活动申请\")])])\n}]\n\nexport { render, staticRenderFns }","<template>\r\n <!-- 测试上传组件 -->\r\n <div v-loading=\"loading\" id=\"MakerActivityWord\">\r\n <div class=\"pAHeader\">\r\n <div class=\"pAHeader1\">创客活动申请</div>\r\n </div>\r\n <hr />\r\n <!-- 创客专项资金及项目申请表(创客活动) -->\r\n <markeractivityWord :wordData=\"wordData\" :total=\"total\" />\r\n <div style=\"position: fixed; bottom: 5%; right: 2%\">\r\n\t\t\t<el-button type=\"primary\" @click=\"saveDraft\">保存草稿</el-button>\r\n <el-button type=\"primary\" @click=\"test\">提交活动</el-button>\r\n </div>\r\n <el-dialog\r\n title=\"提示\"\r\n :visible.sync=\"submitHint\"\r\n width=\"600px\"\r\n class=\"pageSubmitData\"\r\n >\r\n <div class=\"deleteContent\">\r\n 确定提交“{{ wordData[\"activityName\"] }}”创客活动吗?\r\n </div>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <el-button type=\"primary\" @click=\"applyActivity\" class=\"AllDialogBtn\"\r\n >确认提交</el-button\r\n >\r\n <el-button @click=\"submitHint = false\" class=\"AllDialogBtn\"\r\n >取消</el-button\r\n >\r\n </span>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport markeractivityWord from \"./components/markeractivityWord.vue\";\r\nimport { getNowDate } from \"@/components/tool/Date.js\";\r\nimport getProjectNo from \"@/components/tool/getProjectNo\";\r\nexport default {\r\n components: {\r\n markeractivityWord,\r\n },\r\n data() {\r\n return {\r\n loading: false,\r\n submitHint: false,\r\n wordData: {\r\n applicationDate: getNowDate(1), //申请日期\r\n associatedProjects: \"\", //关联项目\r\n activityName: \"\", //项目名称\r\n pro_leader: \"\", //活动负责人\r\n college: \"\", //所在学院\r\n tel: \"\", //联系电话\r\n activityTime: [], //活动时间\r\n student: 0, //参与学生人数\r\n member: [\r\n { name: \"\", collage: \"\", work: \"\" },\r\n { name: \"\", collage: \"\", work: \"\" },\r\n { name: \"\", collage: \"\", work: \"\" },\r\n ],\r\n activityPlan: \"\", //活动计划\r\n expectations: \"\", //预期目标\r\n eventAudience: \"\", //活动受众面\r\n fundingPlan: \"\", //经费支出计划\r\n expenditureMothPlan: [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"],\r\n fund: {\r\n device: \"\",\r\n Material: \"\",\r\n processing: \"\",\r\n Collaboration: \"\",\r\n APPRAISAL: \"\",\r\n entery: \"\",\r\n activities: \"\",\r\n Transaction: \"\",\r\n }, //预算经费\r\n },\r\n };\r\n },\r\n computed: {\r\n total() {\r\n let num = 0;\r\n for (let i in this.wordData[\"fund\"])\r\n num += Number(this.wordData[\"fund\"][i]);\r\n return num;\r\n },\r\n },\r\n methods: {\r\n // changeFund(newFund){\r\n // this.wordData['allFund'] = newFund;\r\n // },\r\n test() {\r\n const cEmpty = /^\\s*$/g;\r\n const checkPhone =\r\n /^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[189]))\\d{8}$/; //获取正则表达式 存放到verify变量中\r\n for (let i in this.wordData) {\r\n switch (i) {\r\n // case \"associatedProjects\":\r\n // if(cEmpty.test(this.wordData[i])){\r\n // this.$message.error(\"请选择关联项目\")\r\n // document.querySelector('#one').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n case \"activityName\":\r\n if (cEmpty.test(this.wordData[i])) {\r\n this.$message.error(\"请输入活动名称\");\r\n document\r\n .querySelector(\"#two\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n case \"pro_leader\":\r\n if (cEmpty.test(this.wordData[i])) {\r\n this.$message.error(\"请输入活动负责人\");\r\n document\r\n .querySelector(\"#three\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n case \"college\":\r\n if (cEmpty.test(this.wordData[i])) {\r\n this.$message.error(\"请选择所在学院\");\r\n document\r\n .querySelector(\"#three\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n case \"tel\":\r\n if (cEmpty.test(this.wordData[i])) {\r\n this.$message.error(\"请输入联系电话\");\r\n document\r\n .querySelector(\"#three\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n } else if (!checkPhone.test(this.wordData[i])) {\r\n this.$message.error(\"请输入正确的手机号\");\r\n document\r\n .querySelector(\"#three\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n case \"activityTime\":\r\n if (this.wordData[i].length <= 0) {\r\n this.$message.error(\"请选择活动时间\");\r\n document\r\n .querySelector(\"#four\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n case \"allFund\":\r\n console.log(11111);\r\n if (this.total <= 0) {\r\n this.$message.error(\"请输入预算经费\");\r\n document\r\n .querySelector(\"#fund\")\r\n .scrollIntoView({ behavior: \"smooth\" });\r\n return false;\r\n }\r\n break;\r\n // case \"member\":\r\n // let num = 0;\r\n // this.wordData[i].forEach(item=>{\r\n // if(cEmpty.test(item['name']))num++;\r\n // // for(let j in item){\r\n // // if(cEmpty.test(item[j])){\r\n // // num++;\r\n // // }\r\n // // }\r\n\r\n // })\r\n // if(num>0){\r\n // this.$message.error(\"指导老师姓名不能为空\");\r\n // document.querySelector('#five').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n // case \"activityPlan\":\r\n // if(cEmpty.test(this.wordData[i][0])){\r\n // this.$message.error(\"请输入活动计划\");\r\n // document.querySelector('#six').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n // case \"expectations\":\r\n // if(cEmpty.test(this.wordData[i][0])){\r\n // this.$message.error(\"预期目标\");\r\n // document.querySelector('#seven').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n // case \"eventAudience\":\r\n // if(cEmpty.test(this.wordData[i][0])){\r\n // this.$message.error(\"活动受众面\")\r\n // document.querySelector('#nine').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n // case \"fundingPlan\":\r\n // if(cEmpty.test(this.wordData[i][0])){\r\n // this.$message.error(\"经费支出计划\")\r\n // document.querySelector('#ten').scrollIntoView({ behavior: \"smooth\" });\r\n // return false;\r\n // }\r\n // break;\r\n }\r\n }\r\n // if()\r\n this.submitHint = true;\r\n },\r\n applyActivity() {\r\n getProjectNo(\"HD\").then((result) => {\r\n let pram = {\r\n uid: this.$store.state.userInfo.userid, //用户ID\r\n aNo: result, //活动编号\r\n tit: this.wordData[\"activityName\"], //活动名称\r\n courseId: this.wordData[\"associatedProjects\"], //关联项目ID\r\n pLeader: this.wordData[\"pro_leader\"], //活动负责人\r\n mon: this.total, //预算经费\r\n st: this.wordData[\"student\"], //参与学生人数\r\n ct: JSON.stringify(this.wordData[\"member\"]), //活动指导老师\r\n chp: JSON.stringify({\r\n activityPlan: this.wordData[\"activityName\"], //活动计划\r\n expectations: this.wordData[\"expectations\"], //预期目标\r\n eventAudience: this.wordData[\"eventAudience\"], //活动受众面\r\n fundingPlan: this.wordData[\"fundingPlan\"], //经费支出计划\r\n }), //活动信息\r\n cid: this.wordData[\"college\"], //学院ID,\r\n ph: this.wordData[\"tel\"], //联系电话\r\n beg: JSON.stringify(this.wordData[\"activityTime\"]), //活动时间\r\n f: JSON.stringify(this.wordData[\"fund\"]), //预算经费明细\r\n appltTime: this.wordData[\"applicationDate\"], //申请日期\r\n mp: JSON.stringify(this.wordData[\"expenditureMothPlan\"]),\r\n t: this.wordData[\"associatedProjects\"] != \"\" ? 0 : 1, //活动分类 0 创客活动\r\n };\r\n this.ajax\r\n .post(this.$store.state.api + \"/ActivityApply\", pram)\r\n .then(async (result) => {\r\n if (result[\"data\"] == 1) {\r\n this.$message.success(\"活动提交成功\");\r\n //提交项目成功,查看sessionStore是否有数据,有则删\r\n if (localStorage.getItem(`makerActivityApplyData${this.$store.state.userInfo.userid}`))localStorage.removeItem(`makerActivityApplyData${this.$store.state.userInfo.userid}`);\r\n\t\t\t\t\t\t\tawait this.ajax.post(this.$store.state.api+\"/delDraft\",{userid:this.$store.state.userInfo.userid,type:2})\r\n this.$router.push(\"/makerActvity\");\r\n } else {\r\n this.$message.error(\"活动提交失败\");\r\n }\r\n })\r\n .catch((err) => {\r\n console.log(err);\r\n });\r\n });\r\n },\r\n saveData(){\r\n localStorage.setItem(\r\n `makerActivityApplyData${this.$store.state.userInfo.userid}`,\r\n JSON.stringify(this.wordData)\r\n );\r\n },\r\n\t\t// 保存草稿\r\n\t\tsaveDraft(){\r\n\t\t\tif(this.loading)return this.$message.info('请稍等...');\r\n\t\t\tthis.loading = true;\r\n\t\t\tlet params = {\r\n\t\t\t\tuserid:this.$store.state.userInfo.userid,\r\n\t\t\t\ttype:2,\r\n\t\t\t\tjsonData:encodeURIComponent(JSON.stringify(this.wordData))\r\n\t\t\t}\r\n\t\t\tthis.ajax.post(this.$store.state.api + \"/saveDraft\",params).then(res=>{\r\n\t\t\t\tif(res.data==1){\r\n\t\t\t\t\tthis.$message.success(\"保存成功\")\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.$message.error(\"保存失败\")\r\n\t\t\t\t}\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t},\r\n\t\t//获取草稿\r\n\t\tgetDraft(){\r\n\t\t\tif(this.loading)return this.$message.info('请稍等...');\r\n\t\t\tthis.loading = true;\r\n\t\t\tlet params = {\r\n\t\t\t\tuserid:this.$store.state.userInfo.userid,\r\n\t\t\t\ttype:2,\r\n\t\t\t}\r\n\t\t\tthis.ajax.get(this.$store.state.api + \"/getDraft\",params).then(res=>{\r\n\t\t\t\tif(res.data[0].length){\r\n\t\t\t\t\tthis.wordData = JSON.parse(res.data[0][0].json)\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif (localStorage.getItem(`makerActivityApplyData${this.$store.state.userInfo.userid}`))\r\n \t\tthis.wordData = JSON.parse(\r\n \t\t localStorage.getItem(`makerActivityApplyData${this.$store.state.userInfo.userid}`)\r\n \t\t);\r\n\t\t\t\t}\r\n\t\t\t\tthis.loading = false;\r\n\t\t\t})\r\n\t\t}\r\n },\r\n mounted() {\r\n //跳转到此页面立刻获取数据\r\n //判断,如果sessionStore里有MakerSpaceApplyData这个字段,则存到this.wordData里\r\n // if (localStorage.getItem(\"makerActivityApplyData\"))\r\n // this.wordData = JSON.parse(\r\n // localStorage.getItem(\"makerActivityApplyData\")\r\n // );\r\n\t\tthis.getDraft();\r\n window.addEventListener(\"beforeunload\", () => this.saveData());\r\n },\r\n\tactivated(){\r\n\t\tthis.getDraft();\r\n window.addEventListener(\"beforeunload\", () => this.saveData());\r\n\t},\r\n destroyed() {\r\n window.removeEventListener(\"beforeunload\", (e) => this.saveData());\r\n },\r\n // beforeDestroy() {},\r\n beforeRouteLeave(to, from, next) {\r\n //判断,如果还没提交然后切换页面了,则把数据存到sessionStore里;\r\n if (!this.submitHint)this.saveData();\r\n \r\n next();\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"less\" scoped>\r\n#MakerActivityWord {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./newMarkerActivity.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./newMarkerActivity.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./newMarkerActivity.vue?vue&type=template&id=07eb3b45&scoped=true\"\nimport script from \"./newMarkerActivity.vue?vue&type=script&lang=js\"\nexport * from \"./newMarkerActivity.vue?vue&type=script&lang=js\"\nimport style0 from \"./newMarkerActivity.vue?vue&type=style&index=0&id=07eb3b45&prod&lang=less&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"07eb3b45\",\n null\n \n)\n\nexport default component.exports","import ajax from '@/api/userApi'\r\nimport store from '@/config/config' //vuex\r\n\r\nconst TYPE_NO = {\r\n \"XM\":\"/getProjectNo\",\r\n\t\t\"CX\":\"/getProjectNo\",\r\n\t\t\"CY\":\"/getProjectNo\",\r\n\t\t\"SJ\":\"/getProjectNo\",\r\n \"HD\":\"/getActivityNo\",\r\n 'ZJ':\"/getFundNo\",\r\n}\r\n\r\nexport default function getProjectNo(str=\"XM\"){\r\n return new Promise((resolve,reject)=>{\r\n ajax.get(store.state.api+TYPE_NO[str],{\r\n uid:store.state.userInfo.userid,\r\n\t\t\t\t\t\ttype:str\r\n }).then(res=>{\r\n console.log(res['data'])\r\n if(res['data'][0].length==0||res['data'][0][0]['No']==null)return resolve(`${str}0000001`)\r\n let LastNo = res['data'][0][0]['No']\r\n let number = parseInt(LastNo.slice(-7));\r\n let newNumber = number+1;\r\n let newNo = `${str}${newNumber.toString().padStart(7,\"0\")}`;\r\n resolve(newNo);\r\n })\r\n })\r\n}"],"names":["render","_vm","this","_c","_self","directives","name","rawName","value","loading","expression","attrs","_m","wordData","total","staticStyle","on","saveDraft","_v","test","staticClass","submitHint","$event","_s","slot","applyActivity","staticRenderFns","components","markeractivityWord","data","applicationDate","getNowDate","associatedProjects","activityName","pro_leader","college","tel","activityTime","student","member","collage","work","activityPlan","expectations","eventAudience","fundingPlan","expenditureMothPlan","fund","device","Material","processing","Collaboration","APPRAISAL","entery","activities","Transaction","computed","num","i","Number","methods","cEmpty","checkPhone","$message","error","document","querySelector","scrollIntoView","behavior","length","console","log","getProjectNo","then","result","pram","uid","$store","state","userInfo","userid","aNo","tit","courseId","pLeader","mon","st","ct","JSON","stringify","chp","cid","ph","beg","f","appltTime","mp","t","ajax","post","api","success","localStorage","getItem","removeItem","type","$router","push","catch","err","saveData","setItem","info","params","jsonData","encodeURIComponent","res","getDraft","get","parse","json","mounted","window","addEventListener","activated","destroyed","removeEventListener","e","beforeRouteLeave","to","from","next","component","TYPE_NO","str","Promise","resolve","reject","store","LastNo","number","parseInt","slice","newNumber","newNo","toString","padStart"],"sourceRoot":""}