jiaweiqi 3 rokov pred
rodič
commit
4d5287e1ff

+ 1 - 1
uis/admin/exam/exampaper_edit.html

@@ -367,7 +367,7 @@
 
         var table_reload = function (subject, name='') {
             admin.req({
-                url: '/admin/exampaper/?subject=' + subject + '&name=' + name,
+                url: '/admin/exampaper/?subject=' + subject + '&name=' + name + '&type=2',
                 type: 'get',
                 done: function (res) {
                     tableIns.reload({

+ 7 - 7
uis/admin/exampaper/edit.html

@@ -35,11 +35,10 @@
                     <div class="layui-inline">
                         <label class="layui-form-label"><font color='red' size="4">*</font>类型:</label>
                         <div class="layui-input-inline">
-                            <select name="type" lay-verify="required">
+                            <select id="id_type" name="type" lay-verify="required">
                                 <option value="">请选择类型</option>
                                 <option value="1">模拟试卷</option>
                                 <option value="2">正式试卷</option>
-                                <option value="3">随机试卷</option>
                             </select>
                         </div>
                     </div>
@@ -205,18 +204,19 @@
                     var subject_value = subject[i].name;
                     subject_node.append("<option value='" + pid + "'>" + subject_value + "</option>");
                 }
+                loadData();
                 form.render();
-                loadData()
             }
         });
         var loadData = function () {
             if (id) {
                 var editdata = JSON.parse(JSON.stringify(parent.layui.table.editdata)); // 框架有Bug所以这么转换
                 form.val("component-form-element", editdata);
-                $('#id_fill_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.fill_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题')
-                $('#id_judgment_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.judgment_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题')
-                $('#id_multiple_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.multiple_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题')
-                $('#id_single_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.single_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题')
+                $('#id_fill_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.fill_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题');
+                $('#id_judgment_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.judgment_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题');
+                $('#id_multiple_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.multiple_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题');
+                $('#id_single_total_count').html('共&nbsp;&nbsp;&nbsp;&nbsp;' + editdata.single_total_count + '&nbsp;&nbsp;&nbsp;&nbsp;题');
+                $('#id_type').attr('disabled', 'disabled');
             }
         };