Browse Source

后台调整

lizhen_gitee 5 months ago
parent
commit
3bad5c5b67

+ 2 - 2
application/admin/controller/Userquestionlog.php

@@ -51,7 +51,7 @@ class Userquestionlog extends Backend
             list($where, $sort, $order, $offset, $limit) = $this->buildparams();
 
             $list = $this->model
-                    ->with(['user','question','player'])
+                    ->with(['user','question','jigou'])
                     ->where($where)
                     ->order($sort, $order)
                     ->paginate($limit);
@@ -60,7 +60,7 @@ class Userquestionlog extends Backend
                 
                 $row->getRelation('user')->visible(['nickname','mobile','avatar']);
 				$row->getRelation('question')->visible(['title']);
-				$row->getRelation('player')->visible(['title']);
+				$row->getRelation('jigou')->visible(['title']);
             }
 
             $result = array("total" => $list->total(), "rows" => $list->items());

+ 2 - 2
application/admin/lang/zh-cn/userquestionlog.php

@@ -7,12 +7,12 @@ return [
     'Is_right'       => '状态',
     'Is_right 1'     => '答对',
     'Is_right 0'     => '答错',
-    'Player_id'      => '得分选手id',
+    'Jigou_id'      => '得分机构id',
     'Createtime'     => '答题时间',
     'Createdate'     => '答题日期',
     'User.nickname'  => '昵称',
     'User.mobile'    => '手机号',
     'User.avatar'    => '头像',
     'Question.title' => '题目',
-    'Player.title'   => '作品名称'
+    'Jigou.title'   => '机构名'
 ];

+ 2 - 2
application/admin/model/Userquestionlog.php

@@ -58,8 +58,8 @@ class Userquestionlog extends Model
     }
 
 
-    public function player()
+    public function jigou()
     {
-        return $this->belongsTo('Voteplayer', 'player_id', 'id', [], 'LEFT')->setEagerlyType(0);
+        return $this->belongsTo('Votejigou', 'jigou_id', 'id', [], 'LEFT')->setEagerlyType(0);
     }
 }

+ 2 - 2
application/admin/view/votejigou/index.html

@@ -18,7 +18,7 @@
                     <div id="toolbar" class="toolbar">
                         <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                         <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('votejigou/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
-                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('votejigou/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
+                        <!--<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('votejigou/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('votejigou/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                         
 
@@ -29,7 +29,7 @@
                                 <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
                                 {/foreach}
                             </ul>
-                        </div>
+                        </div>-->
 
                         
                     </div>

+ 2 - 2
application/admin/view/voteplayer/add.html

@@ -62,12 +62,12 @@
 
         </div>
     </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-score" class="form-control" name="row[score]" type="number" value="0">
         </div>
-    </div>
+    </div>-->
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Thumb_image')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 2 - 2
application/admin/view/voteplayer/edit.html

@@ -62,12 +62,12 @@
 
         </div>
     </div>
-    <div class="form-group">
+    <!--<div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
         <div class="col-xs-12 col-sm-8">
             <input id="c-score" class="form-control" name="row[score]" type="number" value="{$row.score|htmlentities}">
         </div>
-    </div>
+    </div>-->
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Thumb_image')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 2 - 2
public/assets/js/backend/userquestionlog.js

@@ -32,8 +32,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
 
 
-                        {field: 'player_id', title: __('Player_id')},
-                        {field: 'player.title', title: __('Player.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'jigou_id', title: __('Jigou_id')},
+                        {field: 'jigou.title', title: __('Jigou.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
 
                         {field: 'is_right', title: __('Is_right'), searchList: {"1":__('Is_right 1'),"0":__('Is_right 0')}, formatter: Table.api.formatter.normal},
 

+ 1 - 1
public/assets/js/backend/voteplayer.js

@@ -36,7 +36,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
 //                        {field: 'video_file', title: __('Video_file'), operate: false, formatter: Table.api.formatter.file},
                         {field: 'votes', title: __('Votes')},
                         {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1')}, formatter: Table.api.formatter.status},
-                        {field: 'score', title: __('Score')},
+//                        {field: 'score', title: __('Score')},
                         {field: 'thumb_image', title: __('Thumb_image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
                         {field: 'vodid', title: __('Vodid'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
                         {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}