123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <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="question-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">
- <div id="c-title1">
- <textarea id="c-title" class="form-control editor" name="row[title]">{$row.title|htmlentities}</textarea>
- </div>
- <input id="c-title2" class="form-control" name="row[title_fill]" type="text" @change="changeTitle" v-model:value="title">
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('title_video')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="input-group">
- <input id="c-title_video" class="form-control" size="50" name="row[title_video]" type="text" value="{$row.title_video|htmlentities}">
- <div class="input-group-addon no-border no-padding">
- <span><button type="button" id="plupload-title_video" class="btn btn-danger plupload" data-input-id="c-title_video" data-mimetype="mp4" data-multiple="false" data-preview-id="p-title_video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
- <span><button type="button" id="fachoose-title_video" class="btn btn-primary fachoose" data-input-id="c-title_video" data-mimetype="mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
- </div>
- <span class="msg-box n-right" for="c-title_video"></span>
- </div>
- <ul class="row list-inline plupload-preview" id="p-title_video"></ul>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Kind')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="radio">
- {foreach name="kindList" item="vo"}
- <label for="row[kind]-{$key}">
- <input @change="changeKind" id="row[kind]-{$key}" name="row[kind]" type="radio" value="{$key}" {in name="key" value="$row.kind" }checked{/in} /> {$vo}
- </label>
- {/foreach}
- </div>
- </div>
- </div>
- <input name="row[is_material_child]" type="hidden" value="0">
- <input name="row[material_question_id]" type="hidden" value="">
- <input name="row[material_score]" type="hidden" value="0">
- <!--<div class="form-group" id="is_material_child">
- <label class="control-label col-xs-12 col-sm-2">{:__('is_material_child')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="radio">
- <label for="row[is_material_child]-0">
- <input @change="changeIsMaterialChild" id="row[is_material_child]-0" name="row[is_material_child]" type="radio" value="0" {eq name="$row.is_material_child" value="0"}checked{/eq} /> 否
- </label>
- <label for="row[is_material_child]-1">
- <input @change="changeIsMaterialChild" id="row[is_material_child]-1" name="row[is_material_child]" type="radio" value="1" {eq name="$row.is_material_child" value="1"}checked{/eq} /> 是
- </label>
- </div>
- </div>
- </div>
- <div class="form-group is_material_child">
- <label class="control-label col-xs-12 col-sm-2">{:__('material_question_id')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-material_question_id" data-source="exam/question/index" data-field="title" data-params='{"custom[kind]":"MATERIAL"}' class="form-control selectpage" name="row[material_question_id]" type="text" value="{$row.material_question_id|htmlentities}">
- </div>
- </div>
- <div class="form-group is_material_child">
- <label class="control-label col-xs-12 col-sm-2">{:__('material_score')}:</label>
- <div class="col-xs-12 col-sm-8">
- <input id="c-material_score" class="form-control" name="row[material_score]" type="number" value="{$row.material_score|htmlentities}">
- </div>
- </div>-->
- <!--原题型-->
- <div v-show="kind === 'JUDGE' || kind === 'SINGLE' || kind === 'MULTI'">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Options_json')}:</label>
- <div class="col-xs-12 col-sm-8">
- <dl class="fieldlist" data-name="row[options_json]">
- <dd>
- <ins>选项</ins>
- <ins>内容</ins>
- </dd>
- <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
- <textarea name="row[options_json]" class="form-control hide" cols="30" rows="5">{$row.options_json|htmlentities}</textarea>
- </dl>
- <textarea id="c-options_img" name="row[options_img]" class="form-control hide" cols="30" rows="5">{$row.options_img|htmlentities}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Answer')}:</label>
- <div class="col-xs-12 col-sm-8">
- <!--{ notin name="$row.kind" value="FILL,SHORT,MATERIAL" }-->
- <input id="c-answer" class="form-control" name="row[answer]" type="text" value="{$row.answer|htmlentities}" readonly="readonly">
- <!--{ /notin }-->
- </div>
- </div>
- </div>
- <!--填空题-->
- <div v-show="kind === 'FILL'">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">填空位:</label>
- <div class="col-xs-12 col-sm-8">
- <button type="button" class="btn btn-success" @click="addFillOptions()"><i class="fa fa-plus"></i> 新增填空位</button>
- <div v-for="(option, index) in fillOptions" :key="index">
- <p style="margin-left: 10px; margin-top: 10px;">填空位({{(index + 1)}})答案(任意答案匹配即算正确)</p>
- <div class="fill-option" v-for="(answer, key) in option.answers" :key="key">
- <div>
- <input type="text" class="form-control" :name="'row[answer]['+index+'][answers][]'" v-model="fillOptions[index].answers[key]" placeholder="请输入答案" />
- </div>
- <div class="m-l-10">
- <button type="button" class="btn btn-danger" @click="deleteFillAnswer(index, key)"><i class="fa fa-trash"></i> </button>
- </div>
- </div>
- <button type="button" class="btn btn-info" @click="addFillAnswer(index)"><i class="fa fa-plus"></i> 新增答案项</button>
- </div>
- </div>
- </div>
- </div>
- <!--简答题-->
- <div v-show="kind === 'SHORT'">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">标准答案:</label>
- <div class="col-xs-12 col-sm-8">
- <textarea id="c-short_answer" class="form-control" name="row[short_answer]" rows="5">{$row.answer|htmlentities}</textarea>
- </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">
- <button type="button" class="btn btn-success" @click="addShortOptions()"><i class="fa fa-plus"></i> 新增关键词</button>
- <p style="margin-left: 10px; margin-top: 10px;" class="text-info">任意关键词匹配得分数</p>
- <div v-for="(option, index) in shortOptions" :key="index" class="row m-t-5">
- <div class="col-sm-7">
- <input type="text" class="form-control" :name="'row[answer_config]['+index+'][answer]'" v-model="option.answer" placeholder="请输入关键词" />
- </div>
- <div class="col-sm-2">
- <label class="m-t-5">得</label>
- <input type="number" step="1" min="1" class="form-control" :name="'row[answer_config]['+index+'][score]'" v-model="option.score" placeholder="请输入分数" style="width: 60px;"/>
- <label class="m-t-5">分</label>
- </div>
- <div class="col-sm-3">
- <button type="button" class="btn btn-danger" @click="deleteShortAnswer(index)"><i class="fa fa-trash"></i> </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--材料题-->
- <div v-show="kind === 'MATERIAL'">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">选择题目:</label>
- <div class="col-xs-12 col-sm-8">
- <button class="btn btn-success" type="button" @click="selectMaterialQuestion()"><i class="fa fa-search"></i> 选择题目</button>
- <!--材料题子题目设置-->
- {include file="../application/admin/view/exam/question/material_questions.html" /}
- </div>
- </div>
- </div>
- <!--<div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Difficulty')}:</label>
- <div class="col-xs-12 col-sm-8">
- <select id="c-difficulty" data-rule="required" class="form-control selectpicker" name="row[difficulty]">
- {foreach name="difficultyList" item="vo"}
- <option value="{$key}" {in name="key" value="$row.difficulty"}selected{/in}>{$vo}</option>
- {/foreach}
- </select>
- </div>
- </div>-->
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('Explain')}:</label>
- <div class="col-xs-12 col-sm-8">
- <!-- <input id="c-explain" class="form-control" name="row[explain]" type="text" value="{$row.explain|htmlentities}">-->
- <textarea id="c-explain" class="form-control editor" name="row[explain]">{$row.explain|htmlentities}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-2">{:__('explain_video')}:</label>
- <div class="col-xs-12 col-sm-8">
- <div class="input-group">
- <input id="c-explain_video" class="form-control" size="50" name="row[explain_video]" type="text" value="{$row.explain_video|htmlentities}">
- <div class="input-group-addon no-border no-padding">
- <span><button type="button" id="plupload-explain_video" class="btn btn-danger plupload" data-input-id="c-explain_video" data-mimetype="mp4" data-multiple="false" data-preview-id="p-explain_video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
- <span><button type="button" id="fachoose-explain_video" class="btn btn-primary fachoose" data-input-id="c-explain_video" data-mimetype="mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
- </div>
- <span class="msg-box n-right" for="c-explain_video"></span>
- </div>
- <ul class="row list-inline plupload-preview" id="p-explain_video"></ul>
- </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 layer-footer">
- <label class="control-label col-xs-12 col-sm-2"></label>
- <div class="col-xs-12 col-sm-8">
- <input type="button" id="valid" @click="valid" class="hide">
- <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/question/extend.html" /}
|