增加信用分排行榜

change
panqihua 5 years ago
parent e83754d8dc
commit bea1f26c0a
  1. 29
      src/app/account/score/score.component.html
  2. 8
      src/app/account/score/score.component.ts
  3. 2
      src/app/forum/notice/notice.component.html
  4. 5
      src/assets/i18n/en-US.json
  5. 5
      src/assets/i18n/zh-CN.json

@ -2,7 +2,7 @@
<div class="">
<form [formGroup]="scoreFrom">
<!-- 用户名-->
<div class="input-group mb-3 mx-auto col-4">
<div class="input-group mb-3 mx-auto col-6">
<div class="input-group-prepend">
<span class="input-group-text">{{ prefix('username') | translate }}</span>
</div>
@ -13,6 +13,33 @@
<option value="true">{{prefix('search_is_like')|translate}}</option>
<option value="false">{{prefix('search_is_not_like')|translate}}</option>
</select>
<div class="input-group-prepend">
<span
class="input-group-text bg-transparent">{{ prefix('orderScore') | translate:{order: scoreFrom.get('desc').value ? (prefix('desc')|translate) : (prefix('asc')|translate)} }}</span>
</div>
<div class="input-group-prepend">
<div class="input-group-text">
<input type="checkbox" formControlName="orderScore">
</div>
</div>
<ng-container *ngIf="scoreFrom.get('orderScore').value">
<div class="input-group-prepend">
<div class="input-group-text">
{{prefix('desc')|translate}}
</div>
<div class="input-group-text">
<input type="radio" formControlName="desc" [value]="true">
</div>
<div class="input-group-text">
{{prefix('asc')|translate}}
</div>
<div class="input-group-text">
<input type="radio" formControlName="desc" [value]="false">
</div>
</div>
</ng-container>
<div class="input-group-prepend">
<button class="btn btn-outline-secondary" type="button" [disabled]="form().invalid"
(click)="loadAll(1)">{{'button.search'|translate}}</button>

@ -15,9 +15,13 @@ export class ScoreComponent extends Commons implements OnInit, MessageInterface
scoreFrom = this.fb.group({
// 用户名
username: this.fb.control('', [Validators.required]),
username: this.fb.control(''),
// 是否模糊查询
like: this.fb.control(true, [Validators.required]),
like: this.fb.control(true),
// 是否按照信用分排行
orderScore: this.fb.control(true),
// 是否降序
desc: this.fb.control(true)
});
editForm = this.fb.group({

@ -17,7 +17,7 @@
<!-- 公告内容-->
<div class="input-group mb-3 mx-auto col-7">
<div class="input-group-prepend">
<span class="input-group-text">{{ 'forum.notice_title' | translate }}</span>
<span class="input-group-text">{{ 'forum.notice_content' | translate }}</span>
</div>
<textarea class="form-control" [class.is-invalid]="getValue('content').invalid"
[placeholder]="'tip.input' | translate:{value:'forum.notice_content'|translate}"

@ -94,7 +94,10 @@
"notes": "备注信息",
"edit_ok": "修改成功",
"edit_fail": "修改失败",
"score_tip": "当前用户信用分{{beforeScore}},预计变为{{afterScore}}分"
"score_tip": "当前用户信用分{{beforeScore}},预计变为{{afterScore}}分",
"orderScore": "按照信用分排行",
"asc": "正序",
"desc": "降序"
},
"server": {
"login": {

@ -94,7 +94,10 @@
"notes": "备注信息",
"edit_ok": "修改成功",
"edit_fail": "修改失败",
"score_tip": "当前用户信用分{{beforeScore}},预计变为{{afterScore}}分"
"score_tip": "当前用户信用分{{beforeScore}},预计变为{{afterScore}}分",
"orderScore": "按照信用分{{order}}排行",
"asc": "正序",
"desc": "降序"
},
"server": {
"login": {

Loading…
Cancel
Save