Parcourir la source

特殊符号上传文件提交

SanHQin il y a 1 an
Parent
commit
3e9c8ef652

+ 29 - 31
src/permission.js

@@ -49,19 +49,26 @@ function getSystemState(to, callback) {
 }
 
 router.beforeEach(async(to, from, next) => {
-    // set page title
-
     try {
-        // throw Error('测试')
+				/*本地环境👇*/
+				// uid = "1270";
+				// setToken(btoa(md5(uid)));
+				// userLogin((isLogin) => {
+				// 	getSystemState(to, () => {
+				// 		if (!isLogin && to.name != 'resultShowDetail') {
+				// 			store.commit('getPlanEndProjectData');
+				// 		}
+				// 		next()
+				// 	})
+				// });
+				/*本地环境👆*/
+
+				/*正式环境👇*/
         const response = await ajax.get('https://cxcy.ssti.net.cn/sso/api');
-        console.log(response);
         let data = response.data.replaceAll("\'", "\"")
         if (data && JSON.parse(data).uid) {
             uid = JSON.parse(data).uid;
-            // uid = "1270";//本地
             setToken(btoa(md5(JSON.parse(data).uid)));
-            // setToken(btoa(md5("1270")));
-            // testApi();
             userLogin((isLogin) => {
                 getSystemState(to, () => {
                     if (!isLogin && to.name != 'resultShowDetail') {
@@ -70,35 +77,26 @@ router.beforeEach(async(to, from, next) => {
                     next()
                 })
             });
-
         } else {
-            // setToken('2021400203')//yym
-            // setToken("201901766");//qgt    
-
-            // userLogin((isLogin)=>{    
-            //   getSystemState(to,()=>{
-            //     if(!isLogin&&to.name!='resultShowDetail'){
-            //       store.commit('getPlanEndProjectData');
-            //     }
-            //     next()
-            //   })
-            // });
             window.location.href = "https://cxcy.ssti.net.cn/sso/caslogin.jsp";
         }
+				/*正式环境👆 */
     } catch {
-        // setToken('2021400203')//yym
-        // setToken(btoa(md5("1270"))); //wyt
+				/*本地环境👇 */
+				// uid = "1270";
+				// setToken(btoa(md5(uid)));
+				// userLogin((isLogin) => {
+				// 	getSystemState(to, () => {
+				// 		if (!isLogin && to.name != 'resultShowDetail') {
+				// 			store.commit('getPlanEndProjectData');
+				// 		}
+				// 		next()
+				// 	})
+				// });
+				/*本地环境👆 */
 
-        // userLogin((isLogin) => {
-        //     getSystemState(to, () => {
-        //         if (!isLogin && to.name != 'resultShowDetail') {
-        //             store.commit('getPlanEndProjectData');
-        //         }
-        //         next()
-        //     })
-        // });
+				/*正式环境👇 */
         window.location.href = "https://cxcy.ssti.net.cn/sso/caslogin.jsp";
+				/*正式环境👆 */
     }
-    // determine whether the user has logged in
-
 })

+ 3 - 3
src/views/messageNotification.vue

@@ -237,8 +237,8 @@
 
             let param ={
               uid:this.$store.state.userInfo.userid,
-              title:this.addMess.tit,
-              brief:this.addMess.con,
+              title:encodeURIComponent(this.addMess.tit),
+              brief:encodeURIComponent(this.addMess.con),
             }
             // console.log(param)
             this.ajax
@@ -285,7 +285,7 @@
             let currentPage=this.table.currentPage;
             const param={
               uid:this.$store.state.userInfo.userid,
-              title:this.selectInput,
+              title:encodeURIComponent(this.selectInput),
               nowPage:currentPage,
               lim:9
             }

+ 9 - 9
src/views/projectApply/MakerSpaceApply.vue

@@ -319,15 +319,15 @@ export default {
         let pram = {
           uid: this.$store.state.userInfo.userid, //用户ID
           pNo: result, //项目编号
-          tit: this.wordData["projectName"], //项目名称
-          bf: this.wordData["brief"], //项目简介
-          pLeader: this.wordData["pro_leader"], //项目负责人
-          lLeader: this.wordData["lead_leader"], //学院牵头领导,
+          tit: encodeURIComponent(this.wordData["projectName"]), //项目名称
+          bf: encodeURIComponent(this.wordData["brief"]), //项目简介
+          pLeader: encodeURIComponent(this.wordData["pro_leader"]), //项目负责人
+          lLeader: encodeURIComponent(this.wordData["lead_leader"]), //学院牵头领导,
           cid: this.wordData["college"], //学院ID,
-          ct: JSON.stringify(this.wordData["teacher"]), //教师组,
-          cs: JSON.stringify(this.wordData["student"]), //学生组,
+          ct: encodeURIComponent(JSON.stringify(this.wordData["teacher"])), //教师组,
+          cs: encodeURIComponent(JSON.stringify(this.wordData["student"])), //学生组,
           f: this.wordData["total"], //总经费
-          chp: JSON.stringify({
+          chp: encodeURIComponent(JSON.stringify({
             Construction: this.wordData["Construction"], //建设内容
             ProjectBasis: this.wordData["ProjectBasis"], //立项依据
             development: this.wordData["development"], //创客空间物理环境、制度建设及软件设施建设情况
@@ -336,10 +336,10 @@ export default {
             studentActivities: this.wordData["studentActivities"], //学生创客活动组织实施情况
             Transforming: this.wordData["Transforming"], //学生创客团队孵化、转化创业项目情况
             condition: this.wordData["condition"], //立 项基 础及条 件
-          }).replaceAll(/%/g, "%25"), //项目详细
+          })), //项目详细
           tid: "5f7a66d5-c206-11ed-a4cd-509a4c5b67cf", //特色创客空间建设项目分类ID
           tName: this.wordData["state"], //项目状态
-          mon: JSON.stringify(this.wordData["fund"]), //预算经费
+          mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
           planEnd: this.wordData["plannedEnd_at"], //计划完成时间,
           beh: this.wordData["begin_at"], //项目开始时间,
           apply: this.wordData["applicationDate"], //申请日期

+ 7 - 7
src/views/projectApply/components/MakerSpaceWordDetail.vue

@@ -216,15 +216,15 @@ export default {
       let pram = {
         uid: this.$store.state.userInfo.userid, //用户ID
         pid: this.$route.query["pid"],
-        tit: this.wordData["projectName"], //项目名称
-        bf: this.wordData["brief"], //项目简介
+        tit: encodeURIComponent(this.wordData["projectName"]), //项目名称
+        bf: encodeURIComponent(this.wordData["brief"]), //项目简介
         pLeader: this.wordData["pro_leader"], //项目负责人
         lLeader: this.wordData["lead_leader"], //学院牵头领导,
         cid: this.wordData["college"], //学院ID,
-        ct: JSON.stringify(this.wordData["teacher"]), //教师组,
-        cs: JSON.stringify(this.wordData["student"]), //学生组,
+        ct: encodeURIComponent(JSON.stringify(this.wordData["teacher"])), //教师组,
+        cs: encodeURIComponent(JSON.stringify(this.wordData["student"])), //学生组,
         f: this.wordData["fund"]["total"], //总经费
-        chp: JSON.stringify({
+        chp: encodeURIComponent(JSON.stringify({
           Construction: this.wordData["Construction"], //建设内容
           ProjectBasis: this.wordData["ProjectBasis"], //立项依据
           development: this.wordData["development"], //创客空间物理环境、制度建设及软件设施建设情况
@@ -233,9 +233,9 @@ export default {
           studentActivities: this.wordData["studentActivities"], //学生创客活动组织实施情况
           Transforming: this.wordData["Transforming"], //学生创客团队孵化、转化创业项目情况
           condition: this.wordData["condition"], //立 项基 础及条 件
-        }).replaceAll(/%/g, "%25"), //项目详细
+        })), //项目详细
         tName: this.wordData["state"], //项目状态
-        mon: JSON.stringify(this.wordData["fund"]), //预算经费
+        mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
         planEnd: this.wordData["plannedEnd_at"], //计划完成时间,
         beh: this.wordData["begin_at"], //项目开始时间,
         mem: this.wordData["student"].length + this.wordData["teacher"].length, //项目组人数

+ 11 - 13
src/views/projectApply/components/studentProjectWordDetail.vue

@@ -700,28 +700,26 @@ export default {
         uid: this.$store.state.userInfo.userid, //用户ID
         cid: this.$route.query["pid"],
         tid: "5e21b204-c206-11ed-a4cd-509a4c5b67cf", //特色创客空间建设项目分类ID
-        tit: this.wordData["projectName"], //项目名称
+        tit: encodeURIComponent(this.wordData["projectName"]), //项目名称
         radio: this.wordData["radio"], //项目分组
-        checkList: JSON.stringify(this.wordData["checkList"]), //优先支持项目
-        schoolRadio: JSON.stringify(this.wordData["schoolRadio"]), //美丽校园改造项目
-        applyParsonRadio: JSON.stringify(this.wordData["applyParsonRadio"]), //项 目 申 请 人
-        applyParsonName: this.wordData["applyParsonName"], //申请人姓名
+        checkList: encodeURIComponent(JSON.stringify(this.wordData["checkList"])), //优先支持项目
+        schoolRadio: encodeURIComponent(JSON.stringify(this.wordData["schoolRadio"])), //美丽校园改造项目
+        applyParsonRadio: encodeURIComponent(JSON.stringify(this.wordData["applyParsonRadio"])), //项 目 申 请 人
+        applyParsonName: encodeURIComponent(this.wordData["applyParsonName"]), //申请人姓名
         coid: this.wordData["college"], //学院ID,
         tel: this.wordData["tel"], //联系电话
         beh: this.wordData["beginTime"], //项目开始时间,
         planEnd: this.wordData["endTime"], //计划完成时间,
-        cs: JSON.stringify(this.wordData["studentS"]), //学生组,
-        ct: JSON.stringify(this.wordData["teacherS"]), //教师组,
-        bf: this.wordData["brief"], //项目简介
-        introduce: JSON.stringify(this.wordData["introduce"]).replaceAll(/%/g,"%25"), //项目详细
-        mon: JSON.stringify(this.wordData["fund"]), //预算经费
+        cs: encodeURIComponent(JSON.stringify(this.wordData["studentS"])), //学生组,
+        ct: encodeURIComponent(JSON.stringify(this.wordData["teacherS"])), //教师组,
+        bf: encodeURIComponent(this.wordData["brief"]), //项目简介
+        introduce: encodeURIComponent(JSON.stringify(this.wordData["introduce"])), //项目详细
+        mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
         f: this.wordData["total"], //总经费
         apply: this.wordData["applicationDate"], //申请日期
         mem:
           this.wordData["teacherS"].length + this.wordData["studentS"].length,
       };
-      console.log(param);
-      // return console.log(param);
       this.ajax
         .post(this.$store.state.api + "/updateStudentProjectData", param)
         .then(
@@ -807,7 +805,7 @@ export default {
 			let params = {
 				uid:this.$store.state.userInfo.userid,
 				pid:this.$route.query["pid"],
-				file:JSON.stringify(this.wordData.opinion)
+				file:encodeURIComponent(JSON.stringify(this.wordData.opinion))
 			}
 			this.ajax.post(this.$store.state.api+"/updateProjectOpinion",params).then(res=>{
 				if(res.data==1){

+ 9 - 12
src/views/projectApply/newStudentProjectApply.vue

@@ -320,24 +320,21 @@ export default {
           uid: this.$store.state.userInfo.userid, //用户ID
           pNo: result, //项目编号
           tid: "5e21b204-c206-11ed-a4cd-509a4c5b67cf", //特色创客空间建设项目分类ID
-          tit: this.wordData["projectName"], //项目名称
+          tit: encodeURIComponent(this.wordData["projectName"]), //项目名称
           radio: this.wordData["radio"], //项目分组
-          checkList: JSON.stringify(this.wordData["checkList"]), //优先支持项目
-          schoolRadio: JSON.stringify(this.wordData["schoolRadio"]), //美丽校园改造项目
-          applyParsonRadio: JSON.stringify(this.wordData["applyParsonRadio"]), //项 目 申 请 人
+          checkList: encodeURIComponent(JSON.stringify(this.wordData["checkList"])), //优先支持项目
+          schoolRadio: encodeURIComponent(JSON.stringify(this.wordData["schoolRadio"])), //美丽校园改造项目
+          applyParsonRadio: encodeURIComponent(JSON.stringify(this.wordData["applyParsonRadio"])), //项 目 申 请 人
           applyParsonName: this.wordData["applyParsonName"], //申请人姓名
           cid: this.wordData["college"], //学院ID,
           tel: this.wordData["tel"], //联系电话
           beh: this.wordData["beginTime"], //项目开始时间,
           planEnd: this.wordData["endTime"], //计划完成时间,
-          cs: JSON.stringify(this.wordData["studentS"]), //学生组,
-          ct: JSON.stringify(this.wordData["teacherS"]), //教师组,
-          bf: this.wordData["brief"], //项目简介
-          introduce: JSON.stringify(this.wordData["introduce"]).replaceAll(
-            /%/g,
-            "%25"
-          ), //项目详细
-          mon: JSON.stringify(this.wordData["fund"]), //预算经费
+          cs: encodeURIComponent(JSON.stringify(this.wordData["studentS"])), //学生组,
+          ct: encodeURIComponent(JSON.stringify(this.wordData["teacherS"])), //教师组,
+          bf: encodeURIComponent(this.wordData["brief"]), //项目简介
+          introduce: encodeURIComponent(JSON.stringify(this.wordData["introduce"])), //项目详细
+          mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
           f: this.wordData["total"], //总经费
           apply: this.wordData["applicationDate"], //申请日期
           mem:

+ 1 - 1
src/views/projectApply/projectApplication.vue

@@ -766,7 +766,7 @@ export default {
         leader: this.selectInp.person, //负责人
         st: this.selectInp.state, //审核状态
         year: "",
-        textInp: this.input,
+        textInp: encodeURIComponent(this.input),
         page: this.table.currentPage, //当前页
         lim: this.table.packageSize, //限制获取几条数据
       };

+ 5 - 5
src/views/projectManage/ProjectManagement.vue

@@ -620,9 +620,9 @@ export default {
         .post(this.$store.state.api + "/updateClosingstatementData", {
           uid: this.$store.state.userInfo.userid,
           cid: this.iid,
-          submitData: JSON.stringify(
+          submitData: encodeURIComponent(JSON.stringify(
             this.myArrayProp[0]["ClosingstatementData"]
-          ),
+          )),
           state: 3,
         })
         .then(
@@ -852,7 +852,7 @@ export default {
       this.caseLoading = true;
       this.ajax
         .post(this.$store.state.api + "/selectAllUser", {
-          n: this.un,
+          n: encodeURIComponent(this.un),
         })
         .then(
           (res) => {
@@ -869,7 +869,7 @@ export default {
       this.ajax
         .post(this.$store.state.api + "/updateProjectLookTeacher", {
           cid: this.project,
-          look: this.checkboxList.join(","),
+          look: encodeURIComponent(this.checkboxList.join(",")),
         })
         .then(
           (res) => {
@@ -902,7 +902,7 @@ export default {
         leader: this.selectInp.leader, //负责人
         endState: this.selectInp.state,
         year: this.selectInp.year, //年份
-        textInp: this.selectText,
+        textInp: encodeURIComponent(this.selectText),
         page: this.table.currentPage, //当前页
         lim: this.table.packageSize, //限制获取几条数据
       };

+ 1 - 1
src/views/projectManage/components/Closingstatement.vue

@@ -1698,7 +1698,7 @@ export default {
         .post(this.$store.state.api + "/updateClosingstatementData", {
           uid: this.$store.state.userInfo.userid,
           pid: this.iid,
-          cdata: JSON.stringify(this.myArrayProp[0]["ClosingstatementData"]),
+          cdata: encodeURIComponent(JSON.stringify(this.myArrayProp[0]["ClosingstatementData"])),
           sta: 2,
         })
         .then(

+ 2 - 2
src/views/projectManage/components/ProjectManagementEndProjectFile.vue

@@ -271,7 +271,7 @@ export default {
             .post(this.$store.state.api + "/updateEndAllFile", {
               uid: this.$store.state.userInfo.userid,
               pid: this.$route.query["pid"],
-              file: JSON.stringify(this.tableData),
+              file: encodeURIComponent(JSON.stringify(this.tableData)),
             })
             .then((res) => {
               console.log(res);
@@ -388,7 +388,7 @@ export default {
       let param = {
         uid: this.$store.state.userInfo.userid,
         cid: this.$route.query["pid"],
-        projectFile: JSON.stringify(oldData),
+        projectFile: encodeURIComponent(JSON.stringify(oldData)),
       };
       this.ajax
         .post(this.$store.state.api + "/AddProjectManageFile", param)

+ 2 - 2
src/views/projectManage/components/ProjectManagementOtherFile.vue

@@ -271,7 +271,7 @@ export default {
             .post(this.$store.state.api + "/updateOtherAllFile", {
               uid: this.$store.state.userInfo.userid,
               pid: this.$route.query["pid"],
-              file: JSON.stringify(this.tableData),
+              file: encodeURIComponent(JSON.stringify(this.tableData)),
             })
             .then((res) => {
               console.log(res);
@@ -389,7 +389,7 @@ export default {
       let param = {
         uid: this.$store.state.userInfo.userid,
         cid: this.$route.query["pid"],
-        projectFile: JSON.stringify(oldData),
+        projectFile: encodeURIComponent(JSON.stringify(oldData)),
       };
       this.ajax.post(this.$store.state.api + "/AddOtherFile", param).then(
         (res) => {

+ 2 - 2
src/views/projectManage/components/ProjectManagementProjectFile.vue

@@ -271,7 +271,7 @@ export default {
             .post(this.$store.state.api + "/updateProjectAllFile", {
               uid: this.$store.state.userInfo.userid,
               pid: this.$route.query["pid"],
-              file: JSON.stringify(this.tableData),
+              file: encodeURIComponent(JSON.stringify(this.tableData)),
             })
             .then((res) => {
               console.log(res);
@@ -389,7 +389,7 @@ export default {
       let param = {
         uid: this.$store.state.userInfo.userid,
         cid: this.$route.query["pid"],
-        projectFile: JSON.stringify(oldData),
+        projectFile: encodeURIComponent(JSON.stringify(oldData)),
       };
       this.ajax.post(this.$store.state.api + "/AddProjectFile", param).then(
         (res) => {

+ 1 - 1
src/views/projectSettlement/components/projectSettlementDetailConclusion.vue

@@ -151,7 +151,7 @@ export default {
       let param = {
         uid: this.$store.state.userInfo.userid,
         cid: this.$route.query["pid"],
-        projectFile: JSON.stringify(oldData),
+        projectFile: encodeURIComponent(JSON.stringify(oldData)),
       };
       this.ajax
         .post(this.$store.state.api + "/AddProjectManageFile", param)

+ 1 - 1
src/views/projectSettlement/projectSettlement.vue

@@ -290,7 +290,7 @@
             tid:this.selectInp.sort,    //分类
             leader:this.selectInp.person,  //负责人
             st:this.selectInp.state,  //审核状态
-            inp:this.input,
+            inp:encodeURIComponent(this.input),
             page:this.table.currentPage,  //当前页
             lim:this.table.packageSize  //限制获取几条数据
           }

+ 1 - 1
src/views/resultShow/resultsShow.vue

@@ -323,7 +323,7 @@ export default {
         tid: this.pavalues.value2, //分类
         leader: this.pavalues.value3, //负责人
         year: this.pavalues.value4,
-        textInp: this.input,
+        textInp: encodeURIComponent(this.input),
         page: this.Page.currentPage, //当前页
         lim: this.Page.lim, //限制获取几条数据
       };