|
@@ -67,9 +67,6 @@
|
|
|
<button class="layui-btn layui-btn-sm" id="exam_question_add">
|
|
|
<i class="layui-icon layui-icon-add-circle"></i>添加
|
|
|
</button>
|
|
|
- <button class="layui-btn layui-btn-sm" id="exam_question_add">
|
|
|
- <i class="layui-icon layui-icon-cols"></i>批量导入
|
|
|
- </button>
|
|
|
</div>
|
|
|
<form class="layui-form" lay-filter="query-form-element">
|
|
|
<div class="seach_items">
|
|
@@ -78,7 +75,7 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
<div class="seach_items">
|
|
|
- <input type="text" name="name" autocomplete="off" class="layui-input"
|
|
|
+ <input type="text" name="title" autocomplete="off" class="layui-input"
|
|
|
placeholder="名称"/>
|
|
|
</div>
|
|
|
</form>
|
|
@@ -87,10 +84,18 @@
|
|
|
<table class="layui-hide" id="exam_question_datagrid" lay-filter="exam_question-operate"></table>
|
|
|
|
|
|
<script type="text/html" id="exam_question-operate-bar">
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <a class="layui-btn layui-btn-xs" lay-event="exam_question_edit"
|
|
|
+ >查看</a>
|
|
|
+ </div>
|
|
|
<div class="layui-btn-group">
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="exam_question_edit"
|
|
|
>修改</a>
|
|
|
</div>
|
|
|
+ <div class="layui-btn-group">
|
|
|
+ <a class="layui-btn layui-btn-xs" lay-event="exam_question_edit"
|
|
|
+ >删除</a>
|
|
|
+ </div>
|
|
|
</script>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -104,28 +109,25 @@
|
|
|
base: '../../../layuiadmin/' //静态资源所在路径
|
|
|
}).extend({
|
|
|
index: 'lib/index' //主入口模块
|
|
|
- }).use(['index', 'table', 'form', ], function () {
|
|
|
+ }).use(['index', 'table', 'form',], function () {
|
|
|
var $ = layui.$;
|
|
|
var table = layui.table
|
|
|
, form = layui.form;
|
|
|
|
|
|
table.render({
|
|
|
elem: '#exam_question_datagrid'
|
|
|
- , url: '/exam_question/'
|
|
|
+ , url: '/examination/examquestion/'
|
|
|
, cols: [[
|
|
|
{title: '编号', type: 'numbers'}
|
|
|
- , {field: 'introduce', title: '题型', width: 100}
|
|
|
- , {field: 'price', title: '内容', width: 200}
|
|
|
- , {field: 'days', title: '难度', width: 100}
|
|
|
- , {field: 'amount', title: '录入人', width: 150}
|
|
|
- , {field: 'create_time_f', title: '录入时间', width: 150}
|
|
|
- , {title: '操作', width: 80, align: 'center', fixed: 'right', toolbar: '#exam_question-operate-bar'}
|
|
|
+ , {field: 'type_text', title: '难度', width: 100}
|
|
|
+ , {field: 'title', title: '内容', width: 400}
|
|
|
+ , {field: 'difficulty_text', title: '题型', width: 100}
|
|
|
+ , {field: 'create_user_text', title: '录入人', width: 150}
|
|
|
+ , {field: 'create_time', title: '录入时间', width: 200}
|
|
|
+ , {title: '操作', width: 180, align: 'center', fixed: 'right', toolbar: '#exam_question-operate-bar'}
|
|
|
]]
|
|
|
, page: true
|
|
|
, height: 'full-108'
|
|
|
- , done: function () {
|
|
|
- layui.index.removeNoPermButtons();
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
//监听工具条
|
|
@@ -135,7 +137,7 @@
|
|
|
if (obj.event === 'exam_question_edit') {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
- title: '修改',
|
|
|
+ title: '修改试题',
|
|
|
shadeClose: false,
|
|
|
area: ['40%', '80%'],
|
|
|
btn: ['保存', '取消'],
|
|
@@ -151,30 +153,10 @@
|
|
|
},
|
|
|
content: 'edit.html?id=' + data.id
|
|
|
});
|
|
|
- } else if (obj.event === 'upload_main' || obj.event === 'upload_list') {
|
|
|
- layer.open({
|
|
|
- type: 2,
|
|
|
- title: obj.event === 'upload_main' ? '上传主图片' : '上传列表图片',
|
|
|
- shadeClose: false,
|
|
|
- area: ['40%', '80%'],
|
|
|
- btn: ['保存', '取消'],
|
|
|
- yes: function (index, dom) {
|
|
|
- layui.onSubmitChild = function (res) {
|
|
|
- layer.close(index);
|
|
|
- table.reload('exam_question_datagrid', {});
|
|
|
- };
|
|
|
- layui.submitChild();
|
|
|
- },
|
|
|
- btn2: function (index, layero) {
|
|
|
- layer.close(index);//关闭当前按钮
|
|
|
- table.reload('exam_question_datagrid', {});
|
|
|
- },
|
|
|
- content: 'uploadImage.html?id=' + data.id + '&type=' + obj.event
|
|
|
- });
|
|
|
} else if (obj.event === 'upload_detail') {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
- title: '上传详情图片',
|
|
|
+ title: '查看详情',
|
|
|
shadeClose: false,
|
|
|
area: ['80%', '80%'],
|
|
|
btn: ['保存', '取消'],
|
|
@@ -206,7 +188,7 @@
|
|
|
$('#exam_question_add').on('click', function () {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
- title: '添加',
|
|
|
+ title: '添加试题',
|
|
|
area: ['40%', '80%'],
|
|
|
btn: ['保存', '取消'],
|
|
|
yes: function (index, dom) {
|