From bfe20710765632d6b3c7abcfb8ada4523fdf66be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Fri, 9 Aug 2019 09:56:47 +0800
Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 public/react/config/webpack.config.prod.js           |  4 ++--
 .../Shixunworkdetails/ShixunWorkModal.js             | 12 +++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js
index 0abd707af..7b9795e80 100644
--- a/public/react/config/webpack.config.prod.js
+++ b/public/react/config/webpack.config.prod.js
@@ -301,8 +301,8 @@ module.exports = {
         },
         warnings: false,
         compress: {
-          drop_debugger: false,
-          drop_console: false
+          drop_debugger: true,
+          drop_console: true
         }
       }
     }),
diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
index cc9586577..051fbd32a 100644
--- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
+++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
@@ -132,13 +132,14 @@ class ShixunWorkModal extends Component{
 
 	onChange=(e)=>{
 		let{group_list}=this.state;
-
 		let {data}=this.props;
 		if(e.target.checked===true){
 			if(data&&data.length===0){
 				let id=[]
 				group_list.forEach((item,key)=>{
-					id.push(item.id)
+					if(item.works_count!=0){
+						id.push(item.id)
+					}
 				})
 				this.setState({
 					group_ids:id,
@@ -147,7 +148,9 @@ class ShixunWorkModal extends Component{
 			}else{
 				let id=[]
 				group_list.forEach((item,key)=>{
-					id.push(item.id)
+					if(item.works_count!=0){
+						id.push(item.id)
+					}
 				})
 				this.setState({
 					group_ids:id,
@@ -161,6 +164,9 @@ class ShixunWorkModal extends Component{
 			})
 		}
 
+
+
+
 	}