123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
- <script src="__CDN__/assets/addons/exam/js/vue.js"></script>
- <link rel="stylesheet" type="text/css" href="__CDN__/assets/addons/exam/css/common.css"></link>
- <script src="__CDN__/assets/addons/exam/js/element-ui/index.js"></script>
- <link rel="stylesheet" type="text/css" href="__CDN__/assets/addons/exam/js/element-ui/index.css"></link>
- <div id="app">
- <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Cate_id')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-cate_id" data-rule="required" data-source="exam/cate/selectpage"
- data-params='{"custom[kind]":"QUESTION","isTree":true}' class="form-control selectpage" name="row[cate_id]"
- type="text" value="{$row.cate_id|htmlentities}">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text"
- value="{$row.title|htmlentities}" placeholder="请输入试卷名称">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="input-group">
- <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
- <div class="input-group-addon no-border no-padding">
- <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
- <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
- </div>
- <span class="msg-box n-right" for="c-image"></span>
- </div>
- <ul class="row list-inline faupload-preview" id="p-image"></ul>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-quantity" data-rule="required" class="form-control" name="row[quantity]" type="number"
- value="{$row.quantity|htmlentities}" step="1" min="1" placeholder="请输入试卷总题数">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Total_score')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-total_score" data-rule="required" class="form-control" name="row[total_score]" type="number"
- value="{$row.total_score|htmlentities}" step="1" min="1" placeholder="请输入试卷总分数">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Pass_score')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-pass_score" data-rule="required" class="form-control" name="row[pass_score]" type="number"
- value="{$row.pass_score|htmlentities}" step="1" min="1" placeholder="请输入及格分数">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Mode')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="radio">
- {foreach name="modeList" item="vo"}
- <label for="row[mode]-{$key}">
- <input @change="changeMode" id="row[mode]-{$key}" name="row[mode]" type="radio" value="{$key}" {in name="key" value="$row.mode" }checked{/in} /> {$vo}
- </label>
- {/foreach}
- </div>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Configs')}:</label>
- <div class="col-xs-12 col-sm-8" v-show="mode === 'RANDOM'" id="div_random_configs">
- <input id="c-configs" data-rule="required" class="form-control hide" name="row[configs]" type="text"
- value="{$row.configs|htmlentities}">
- {include file="../application/admin/view/exam/paper/configs_setting.html" /}
- </div>
- <div class="col-xs-12 col-sm-8" v-show="mode === 'FIX'">
- <a href="javascript:;" class="btn btn-sm btn-success btn-fix-configs margin-bottom" @click="openQuestionSelect()"><i class="fa fa-cog"></i> 固定选题配置</a>
- {include file="../application/admin/view/exam/paper/configs_setting_fix.html" /}
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Limit_time')}:</label>
- <div class="col-xs-12 col-sm-8" style="line-height: 31px;">
- <input id="c-limit_time" data-rule="required" class="form-control hide" name="row[limit_time]"
- value="{$row.limit_time|default=0}" type="number" step="1" min="0" placeholder="考试限时,0不限制"
- style="width: 200px">
- <input id="c-limit_time_hour" data-rule="required" class="form-control" name="row[limit_time_hour]"
- type="number" step="1" min="0" max="23" value="0" style="width: 100px" placeholder="考试限时小时">时
- <input id="c-limit_time_minute" data-rule="required" class="form-control" name="row[limit_time_minute]"
- type="number" step="1" min="0" max="60" value="60" style="width: 100px" placeholder="考试限时分钟,0不限制">分
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-start_time" data-rule="match(lte, row[end_time], date);" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-end_time" data-rule="match(gte, row[start_time], date);" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
- <p class="text-info">* 试卷使用时间,清空则不限制试卷使用时间</p>
- </div>
- </div>
- <!--<div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">仅用于考场:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-is_only_room" name="row[is_only_room]" type="hidden" value="{$row.is_only_room|default=0}">
- <a href="javascript:;" data-toggle="switcher" class="btn-is_only_room" data-input-id="c-is_only_room" data-yes="1" data-no="0" >
- <i class="fa fa-toggle-on text-success {if condition="!isset($row['is_only_room']) || !$row['is_only_room']"}fa-flip-horizontal text-gray{/if} fa-2x"></i>
- </a>
- <p class="text-info">* 开启该功能后,该试卷将不再显示于前端试卷列表,仅考场可使用</p>
- </div>
- </div>-->
- <!--<div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
- <p class="text-info">* 试卷结束使用时间,清空则不限制试卷使用时间</p>
- </div>
- </div>-->
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">每人限制考试次数:</label>
- <div class="col-xs-12 col-sm-8" style="line-height: 31px;">
- <input id="c-limit_count" data-rule="required" class="form-control" name="row[limit_count]" type="number"
- step="1" min="0" value="{$row.limit_count|default=1}" style="width: 200px" placeholder="考试限时,0不限制">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="radio">
- {foreach name="statusList" item="vo"}
- <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
- value="{$key}" {in name="key" value="$row.status" }checked{/in}
- /> {$vo}</label>
- {/foreach}
- </div>
- </div>
- </div>
- <!--<div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">可参加考试的用户:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-user_ids" data-source="user/user/index" data-multiple="true" data-order-by="id desc" data-pagination="false" data-field="nickname" class="form-control selectpage" name="row[user_ids]" type="text" value="{$row.user_ids}">
- </div>
- </div>-->
- <div class="form-group layer-footer">
- <label class="control-label col-xs-12 col-sm-2"></label>
- <div class="col-xs-12 col-sm-8">
- <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
- <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
- </div>
- </div>
- </form>
- </div>
- <!--试卷设置扩展-->
- {include file="../application/admin/view/exam/paper/extend.html" /}
|