Kaynağa Gözat

科普答题

lizhen 16 saat önce
ebeveyn
işleme
1b138cd2ab

+ 6 - 0
application/admin/view/exam/paper/add.html

@@ -126,6 +126,12 @@
             </div>
         </div>
 
+        <div class="form-group">
+            <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
+            <div class="col-xs-12 col-sm-8">
+                <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
+            </div>
+        </div>
 
 
 

+ 2 - 2
application/admin/view/exam/paper/configs_setting_fix.html

@@ -40,7 +40,7 @@
                         <template slot="formatter"> {{summary.fill_quantity}}/{{summary.fill_score}} </template>
                     </el-statistic>
                 </div>
-            </el-col>-->
+            </el-col>
             <el-col :span="6">
                 <div>
                     <el-statistic title="简答题数/分数">
@@ -48,7 +48,7 @@
                     </el-statistic>
                 </div>
             </el-col>
-            <!--<el-col :span="6">
+            <el-col :span="6">
                 <div>
                     <el-statistic title="材料题数/分数">
                         <template slot="formatter"> {{summary.material_quantity}}/{{summary.material_score}} </template>

+ 6 - 0
application/admin/view/exam/paper/edit.html

@@ -125,6 +125,12 @@
             </div>
         </div>
 
+        <div class="form-group">
+            <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
+            <div class="col-xs-12 col-sm-8">
+                <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
+            </div>
+        </div>
 
 
         <div class="form-group layer-footer">

+ 3 - 1
public/assets/js/backend/exam/paper.js

@@ -54,7 +54,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
             table.bootstrapTable({
                 url: $.fn.bootstrapTable.defaults.extend.index_url,
                 pk: 'id',
-                sortName: 'id',
+                sortName: 'weigh',
+                sortOrder: 'desc',
                 search: false,
                 showExport: false,//隐藏导出
                 showToggle: false,//隐藏浏览模式
@@ -111,6 +112,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
                             searchList: {"NORMAL": __('Normal'), "HIDDEN": __('Hidden')},
                             formatter: Table.api.formatter.status
                         },
+                        {field: 'weigh', title: __('Weigh'), operate: false},
                         {
                             field: 'createtime',
                             title: __('Createtime'),