Browse Source

fix(front): 修复样式调整

Go 5 years ago
parent
commit
2c53af558d

+ 4 - 0
front/project/www/app.less

@@ -398,6 +398,10 @@
   white-space: pre;
 }
 
+.ws-n {
+  white-space: nowrap;
+}
+
 .u-s-n {
   user-select: none;
 }

+ 3 - 3
front/project/www/components/Continue/index.js

@@ -5,7 +5,7 @@ import './index.less';
 import Button from '../Button';
 
 function Continue(props) {
-  const { data = {}, onContinue, onRestart, onNext, onClose } = props;
+  const { data = {}, onContinue, onRestart, onClose } = props;
   const { updateTime, paper = {}, userNumber, questionNumber } = data;
   return (
     <div className="continue">
@@ -29,12 +29,12 @@ function Continue(props) {
               <Assets name="ico_24_restart" svg />
               Restart
             </Button>}
-            {userNumber < questionNumber && <Button radius theme="border" size="small" onClick={() => {
+            {/* {userNumber < questionNumber && <Button radius theme="border" size="small" onClick={() => {
               onNext();
             }}>
               <Assets name="ico_24_next" svg />
               Next
-            </Button>}
+            </Button>} */}
           </div>
         </div>
         <div className="right">

+ 1 - 1
front/project/www/components/Header/index.js

@@ -90,7 +90,7 @@ function Header(props) {
             >
               <Link to="/my/main" className="info">
                 <Assets className="avatar" name="sun_blue" src={user.info.avatar} />
-                <span className="t-2 f-s-12">{(user.info.nickname || '').substr(0, 5) || `qx${user.info.mobile}`}</span>
+                <span className="t-2 f-s-12">{(user.info.nickname || '') || `qx${user.info.mobile}`}</span>
               </Link>
             </Dropdown>
           ) : (<Button onClick={() => {

+ 1 - 1
front/project/www/components/Panel/index.js

@@ -72,7 +72,7 @@ export default function Panel(props) {
           {(data.children || []).map(item => {
             return (
               <ProgressButton
-                className="item"
+                className="item ws-n"
                 progress={item.progress}
                 onClick={() => {
                   if (onClick) onClick(item);

+ 6 - 0
front/project/www/components/Panel/index.less

@@ -90,6 +90,9 @@
         margin-bottom: 12px;
         margin-left: 9px;
         margin-right: 9px;
+        padding: 11px 0;
+        text-align: center;
+        white-space: nowrap;
       }
     }
 
@@ -101,6 +104,9 @@
         margin-bottom: 12px;
         margin-left: 10px;
         margin-right: 10px;
+        padding: 11px 0;
+        text-align: center;
+        white-space: nowrap;
       }
     }
   }

+ 0 - 1
front/project/www/routes/examination/main/page.js

@@ -262,7 +262,6 @@ export default class extends Page {
 
   renderTextbook() {
     const { textbookProgress = [] } = this.state;
-    console.log(textbookProgress);
     return (
       <div>
         <Division col={2}>

+ 5 - 4
front/project/www/routes/exercise/main/page.js

@@ -508,6 +508,7 @@ export default class extends Page {
     Question.getExerciseProgress(type.id).then(result => {
       // const exerciseProgress = getMap(r, 'id');
       result = result.map(row => {
+        row.title = `${row.titleZh}${row.titleEn}`;
         row.info = [
           {
             title: '已做',
@@ -696,9 +697,9 @@ export default class extends Page {
               this.restart(latest);
               Question.startLink('exercise', { id: latest.originId, report: latest });
             }}
-            onNext={() => {
-              Question.continueLink('exercise', { id: latest.originId, report: latest });
-            }}
+          // onNext={() => {
+          //   Question.continueLink('exercise', { id: latest.originId, report: latest });
+          // }}
           />
         )}
         <div className="content">
@@ -1143,7 +1144,7 @@ export default class extends Page {
             }
             return (
               <Panel
-                title={struct.titleEn}
+                title={struct.title}
                 message={struct.description}
                 data={struct}
                 col={col}

+ 5 - 5
front/project/www/routes/my/main/page.js

@@ -539,7 +539,7 @@ export default class extends Page {
                   this.setState({ showEdit: true });
                 }}
               >
-                {(info.nickname || '').substr(0, 5) || `qx${info.mobile}`}{' '}
+                {(info.nickname || '') || `qx${info.mobile}`}{' '}
               </div>
               <div className="id">ID: {zeroFill(info.id, 4)} </div>
             </div>
@@ -688,12 +688,12 @@ export default class extends Page {
     return (
       number > 0 && (
         <div className="message-layout">
-          <div className="header c-p">
+          <div className="header c-p"
+            onClick={() => {
+              this.readAllMessage();
+            }}>
             <Assets
               name="all"
-              onCancel={() => {
-                this.readAllMessage();
-              }}
             />
             全部已读
           </div>

+ 7 - 4
front/project/www/routes/page/ready/page.js

@@ -166,6 +166,9 @@ export default class extends Page {
 
   refreshRoom() {
     const { isOverseas, keyword } = this.state;
+    if (!keyword) {
+      return;
+    }
     Main.listRoom({ page: 1, size: 10, keyword, isOverseas })
       .then(result => {
         result.list = result.list.map(row => {
@@ -329,7 +332,7 @@ export default class extends Page {
                 if (item.key === current) detail = item;
                 return (
                   <div
-                    className={`page-item ${item.key === current ? 'active' : ''}`}
+                    className={`page-item ${item.key === current && open ? 'active' : ''}`}
                     onClick={() => {
                       if (item.key === current) {
                         this.setState({ open: !open });
@@ -383,16 +386,16 @@ export default class extends Page {
       <div className="query-layout">
         <div className="search-wrapper">
           <Select theme="white" value={isOverseas} list={[{ title: '中国', key: false }, { title: '海外', key: true }]} onChange={({ key }) => this.setState({ isOverseas: key })} />
-          <input value={keyword} onChange={(e) => this.setState({ keyword: e.target.value })} />
+          <input value={keyword} placeholder='请输入城市名称' onChange={(e) => this.setState({ keyword: e.target.value })} />
           <Button width={150} onClick={() => this.refreshRoom()}>
             <Icon className="m-r-5" type="search" />
             搜索考场
           </Button>
         </div>
-        {rooms.map((item, index) => {
+        {rooms.map((item) => {
           return (
             <div className="m-b-2">
-              <div className="t-1 t-s-18">{index + 1}.{item.title}</div>
+              <div className="t-1 t-s-18">{item.title}</div>
               <div className="t-1">{item.address}</div>
               <div className="t-1">
                 温馨提示: {item.description} <span className="t-4 c-p" onClick={() => User.needLogin().then(() => this.setState({ showSupple: true, supple: { roomId: item.id }, room: item }))}>我要补充</span>

+ 1 - 1
front/project/www/routes/paper/process/base/index.js

@@ -174,7 +174,7 @@ export default class extends Component {
         {questions.map((item, index) => {
           return (
             <div>
-              <div className="text m-b-2">{item.description}</div>
+              <div className="text m-b-2" dangerouslySetInnerHTML={{ __html: item.description }} />
               <Answer
                 list={item.select}
                 type={type}

+ 11 - 0
front/project/www/routes/paper/process/base/index.less

@@ -197,6 +197,17 @@
       }
     }
 
+    .layout-body .one {
+
+      .block {
+        padding-bottom: 0px;
+
+        &.block-answer {
+          padding: 0px 20px 20px 20px
+        }
+      }
+    }
+
     .layout-body .two {
       display: flex;
       height: 100%;

+ 10 - 0
server/gateway-api/src/main/java/com/qxgmat/dto/response/UserReportBaseDto.java

@@ -18,6 +18,8 @@ public class UserReportBaseDto {
     private String paperModule;
 
     private String paperOrigin;
+    
+    private Integer originId;
 
     private Integer time;
 
@@ -128,4 +130,12 @@ public class UserReportBaseDto {
     public void setPaper(UserPaperBaseExtendDto paper) {
         this.paper = paper;
     }
+
+    public Integer getOriginId() {
+        return originId;
+    }
+
+    public void setOriginId(Integer originId) {
+        this.originId = originId;
+    }
 }