liting2017 преди 7 години
родител
ревизия
99f6b64fc0

+ 0 - 1
js/component/manageCenter/achievement/releaseResults.jsx

@@ -298,7 +298,6 @@ const Organization=Form.create()(React.createClass({
     },
     componentWillMount() {
     	this.selectSuperIds();
-    	
     },
     examine(record) {
         this.setState({

+ 11 - 15
js/component/manageCenter/achievement/techAchievement.jsx

@@ -179,15 +179,13 @@ const AchievementList = React.createClass({
         });
         this.state.achievementCategoryOption = theArr;
         this.state.auditStatusOption = auditArr;
-        if (window.location.search) {
-            let theObj = getSearchUrl(window.location.search);
-            if (theObj.rid) {
-                theObj.id = theObj.rid;
-                if (theObj.rid != 'null') {
-                    this.tableRowClick(theObj);
-                };
-            };
-        };
+        //从信息中跳转到页面
+        let data=localStorage.getItem('newData');
+    	if(data){
+    		var newData = JSON.parse(data);
+    		console.log(newData);
+    		this.tableRowClick(newData);
+    	}
         this.loadData();
     },
     componentWillReceiveProps(nextProps) {
@@ -209,12 +207,10 @@ const AchievementList = React.createClass({
         };
     },
     tableRowClick(record, index) {
-        if(index!=undefined){
-        	this.setState({
-        		RowData:record,
-            	showDesc: true
-        	});
-        }
+    	this.setState({
+    		RowData:record,
+        	showDesc: true
+    	});
     },
     delectRow() {
         let deletedIds = [];

+ 1 - 0
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -341,6 +341,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
     },
     componentWillMount() {
     	this.loadData(this.props.data.id, this.props.detailApiUrl);
+    	localStorage.setItem('newData','');
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {

+ 11 - 2
js/component/manageCenter/index/content.jsx

@@ -69,9 +69,9 @@ const MessageModal = React.createClass({
                             case 9:
                                 return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "&uid=" + record.uid + "#techDemandOrg"}> {record.noticeTypeName} </a >;
                             case 10:
-                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#orgTechAchievement"}> {record.noticeTypeName} </a >;
+                                return <a href='#' onClick={(e) =>{ e.stopPropagation(),this.setStore(record)}}> {record.noticeTypeName} </a >;
                             case 11:
-                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#userTechAchievement"}> {record.noticeTypeName} </a >;
+                                return <a href='#' onClick={(e) =>{ e.stopPropagation(),this.setStore(record)}}> {record.noticeTypeName+'123'} </a >;
                         }
                     }
                 }, {
@@ -95,6 +95,15 @@ const MessageModal = React.createClass({
             data: []
         };
     },
+    setStore(record){
+    	var data = {
+		    		"id":"506f0ba0-9c0d-4c98-a8e9-e1323f1974c0",
+		    		"ownerType":"1"
+		    	};
+    	var newData = JSON.stringify(data);
+    	localStorage.setItem('newData',newData);
+    	window.location.href=globalConfig.context + "/admin/achievement.html?rid=409bf85f-5cd7-459b-9c7c-4865001a87a2#techAchievementManage"
+    },
     loadReaded(pageNo) {
         this.state.data = [];
         this.setState({