<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>FH Admin</title>
    <!-- HTML5 Shim and Respond.js IE10 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 10]>
		<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
		<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
		<![endif]-->
    <!-- Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="author" content="FH Admin QQ313596790" />

    <link rel="icon" href="../../../assets/images/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../../../assets/fonts/fontawesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="../../../assets/plugins/animation/css/animate.min.css">
    <link rel="stylesheet" href="../../../assets/plugins/modal-window-effects/css/md-modal.css">
    <link rel="stylesheet" href="../../../assets/css/style.css">
  <link type="text/css" rel="stylesheet" href="../../../plugins/fhdrag/style.css" />
  <!--引入弹窗组件start-->
  <script type="text/javascript" src="../../../plugins/fhdrag/drag.js"></script>
  <script type="text/javascript" src="../../../plugins/fhdrag/dialog.js"></script>
  <!--引入弹窗组件end-->
    
    <!-- vue -->
	<script src="../../../assets/js-vue/vue.js"></script>
    <!--全局配置-->
    <script src="../../../assets/js-v/config.js"></script>

</head>

<body style="background-color: white">
    
    <!-- [加载状态 ] start -->
    <div class="loader-bg">
        <div class="loader-track">
            <div class="loader-fill"></div>
        </div>
    </div>
    <!-- [ 加载状态  ] End -->

    <!-- [ 主内容区 ] start -->
        <div class="pcoded-wrapper" id="app">
            <div class="pcoded-content">
                <div class="pcoded-inner-content">
                    <div class="main-body">
                        <div class="page-wrapper">
                            <!-- [ Main Content ] start -->
                            <div class="row">
					
								<div style="width: 100%;">
									<div id="showform">
										<div class="input-group input-group-sm mb-3" style="margin-top: -10px;">
		                                    <div class="input-group-prepend">
		                                        <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">大题题目</span></span>
		                                    </div>
		                                    <input type="text" class="form-control" ref="TITLE" id="TITLE" v-model="pd.TITLE" maxlength="255" placeholder="这里输入大题题目" title="大题题目">
		                                </div>
		                                <div class="input-group input-group-sm mb-3" style="margin-top:-10px;">
		                                     <div class="input-group-prepend">
		                                         <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">本题题型</span></span>
		                                     </div>
		                                     <select ref="TYPE" id="TYPE" v-model="TYPE" v-bind:disabled="SELECTEDTOPICS != ''" title="本题题型" data-placeholder="这里输入本题题型" style="width:79px;padding-left:10px;border: 1px solid #CED4DA;transparent;appearance:none;-moz-appearance:none;-webkit-appearance:none;">
		                                    	<option value="">选择题型</option>
		                                    	<option value="A">单选题</option>
		                                    	<option value="B">多选题</option>
		                                    	<option value="C">判断题</option>
		                                    	<option value="D">填空题</option>
		                                    	<option value="E">问答题</option>
		                                    	<option value="F">复合题</option>
		                                    </select>
		                                     <div class="input-group-prepend">
		                                         <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">每题分数</span></span>
		                                     </div>
		                                     <input type="number" class="form-control" v-bind:disabled="SELECTEDTOPICS != ''" ref="FRACTION" id="FRACTION" v-model.number="pd.FRACTION" oninput="if(value.length>11 || value.length<1)value=value.slice(0,11)" placeholder="这里输入每题分数" title="每题分数">
		                                 	 <div class="input-group-prepend">
		                                        <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">题数/总分</span></span>
		                                     </div>
		                                     <input type="text" class="form-control" ref="TOTALSCORE" id="TOTALSCORE" v-model="TOTALSCORE" maxlength="30" placeholder="自动计算" title="题数总分" readonly="readonly">
		                                </div>
		                                 
		                                <div class="col-sm-12"> 
			                                <ul class="nav nav-tabs" id="myTab" role="tablist">
										        <li class="nav-item">
										            <a class="nav-link active text-uppercase" id="home-tab" data-toggle="tab" role="tab" href="#home" aria-controls="home" aria-selected="true" style="cursor:pointer;">随机选题</a>
										        </li>
										        <li class="nav-item">
										            <a class="nav-link text-uppercase" id="profile-tab" data-toggle="tab"  role="tab" href="#profile" aria-controls="profile" aria-selected="false" style="cursor:pointer;">手动选题</a>
										        </li>
										    </ul>
			                                <div class="tab-content" id="myTabContent">
			                                	<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
			                                		<p class="mb-0">
			                                			题数：<input type="number" ref="QNUMBER" id="QNUMBER" v-model.number="QNUMBER" oninput="if(value.length>4 || value.length<1)value=value.slice(0,4)" placeholder="题数" title="题数" style="height: 23px;width: 66px;border: 1px solid #CED4DA;">
			                                			<select ref="TYPE" id="QTYPE" v-model="QTYPE"  title="类型" data-placeholder="类型" style="width:225px;padding-left:10px;border: 1px solid #CED4DA;transparent;appearance:none;-moz-appearance:none;-webkit-appearance:none;"></select>
			                                			<select ref="LEVEL" id="LEVEL" v-model="LEVEL"  title="级别" data-placeholder="级别" style="width:225px;padding-left:10px;border: 1px solid #CED4DA;transparent;appearance:none;-moz-appearance:none;-webkit-appearance:none;"></select>
			                                			<a v-on:click="automatic" class="btn btn-light btn-sm" id="FHAU">获取</a>
			                                		</p>
			                                	</div>
			                                	<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
			                                		<p class="mb-0">
			                                			<a class="btn btn-light btn-sm" v-on:click="manualSelection">选择题目</a>
			                                		</p>
			                                	</div>	
			                                </div>
		                                </div> 
		                                 
							            <div class="input-group input-group-sm mb-3" style="margin-top: 10px;">
		                                    <div class="input-group-prepend">
		                                        <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">选中题目</span></span>
		                                    </div>
		                                    <div style="padding-top: 6px;padding-left: 5px;padding-right: 5px;" id="FHSEL">{{FHSEL}}</div>
		                                    <button v-show="FHSEL != '已选中0道题'" v-on:click="viewQue" data-modal="modal-2" style="margin-left: 10px;" type="button" class="btn btn-secondary btn-sm md-trigger"><i class="feather icon-search"></i>查看题目</button>
		                                    <div v-show="FHSEL != '已选中0道题'" style="padding-top: 6px;padding-left: 5px;padding-right: 5px;">(若要修改题型分值,请先移除全部选中的题目)</div>
		                                </div>
		                                <div class="input-group input-group-sm mb-3" style="margin-top: -10px;">
		                                    <div class="input-group-prepend">
		                                        <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">大题排序</span></span>
		                                    </div>
		                                    <input type="number" class="form-control" ref="FORDER" id="FORDER" v-model.number="pd.FORDER" oninput="if(value.length>5 || value.length<1)value=value.slice(0,5)" placeholder="此大题在试卷中的顺序" title="大题排序">
		                                </div>
							            <div class="input-group input-group-sm mb-3" style="margin-top: -10px;">
		                                    <div class="input-group-prepend">
		                                        <span class="input-group-text" style="width: 79px;"><span style="width: 100%;">大题说明</span></span>
		                                    </div>
		                                    <input type="text" class="form-control" ref="REMARKS" id="REMARKS" v-model="pd.REMARKS" maxlength="255" placeholder="这里输入大题说明" title="大题说明">
		                                </div>
							            <div class="input-group" style="margin-top:10px;background-color: white" >
							            	<span style="width: 100%;text-align: center;">
							            		<a class="btn btn-light btn-sm" v-on:click="save">保存</a>
							            		<a class="btn btn-light btn-sm" onclick="Dialog.close()">取消</a>
							            	</span>
							            </div>
							       </div>
						           <!-- [加载状态 ] start -->
								    <div id="jiazai" style="display:none;margin-top:50px;">
								    	<div class="d-flex justify-content-center">
	                                        <div class="spinner-border" style="width: 3rem; height: 3rem;" role="status">
                                                <span class="sr-only">Loading...</span>
                                            </div>
                                        </div>
                                    </div>
								    <!-- [ 加载状态  ] End -->
								</div>
	    
                            </div>
                            <!-- [ Main Content ] end -->
                        </div>
                    </div>
                </div>
            </div>

		<!-- 查看题目窗口 start -->
		<div class="md-modal md-effect-2" id="modal-2">
		    <div class="md-content">
		        <h3 class="theme-bg2">试题预览</h3>
		        <div style="overflow: scroll; scrolling: yes;height:500px">
		            <ul>
		            	<template v-for="(data,index) in queList">
			                <li>
			                	<template v-if="'F' != TYPE"><strong><b>{{index+1}}.</b></strong><b>{{data.TITLE}}</b></template>
			                	<template v-if="'F' == TYPE"><span v-html="data.TITLE.split('../../plugins/ueditor').join(serverurl+'plugins/ueditor')"></span></template>
			                	<template v-if="'A' == TYPE || 'B' == TYPE">(<span class="text-danger mb-1 mb-1">答案：{{data.ANSWER}}</span>)</template>
			                	<template v-if="'C' == TYPE">(<span class="text-danger mb-1 mb-1">答案：{{data.ANSWER == 'true'?'正确':'错误'}}</span>)</template>
			               		<template v-if="'F' != TYPE && '' != data.FILEPATH && null != data.FILEPATH"><br><img width="300" v-bind:src="data.FILEPATH"></template>
			                	<template v-if="('A' == TYPE || 'B' == TYPE) && data.FOPTION.length < 41"><br>{{data.FOPTION.split(",fh,").join(" ")}}</template>
								<template v-if="('A' == TYPE || 'B' == TYPE) && data.FOPTION.length > 40"><br><span v-html="lineFeed(data.FOPTION.split(',fh,'))"></span></template>
			                	<template v-if="'D' == TYPE || 'E' == TYPE || 'F' == TYPE"><br><span class="text-danger mb-1 mb-1">答案：{{data.ANSWER}}</span></template>
			                	<div class="text-info mb-1">[类型：{{data.DNAME1}}&nbsp;级别：{{data.DNAME2}}]</div>
			                	<template v-if="'A' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.SINGLEELECTION_ID,'A')">移除此题</span></template>
			                	<template v-if="'B' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.MULTIPLESELECTION_ID,'B')">移除此题</span></template>
			                	<template v-if="'C' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.COMPLETION_ID,'C')">移除此题</span></template>
			                	<template v-if="'D' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.JUDGEMENTQUESTION_ID,'D')">移除此题</span></template>
			                	<template v-if="'E' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.LARGEQUESTION_ID,'E')">移除此题</span></template>
			                	<template v-if="'F' == TYPE"><span class="badge badge-danger" style="cursor:pointer; float: right;" v-on:click="removeQue(data.COMPOUNDQUESTION_ID,'F')">移除此题</span></template>
			                </li>
		                </template>
		            </ul>
		            <button class="btn btn-primary md-close">关闭</button>
		        </div>
		    </div>
		</div>
		<div class="md-overlay"></div>
        <!-- 查看题目窗口 end -->
           
        </div>
    <!-- [ 主内容区 ] end -->
    
<script type="text/javascript" src="../../../assets/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../assets/js/pre-loader.js"></script>
<script type="text/javascript" src="../../../assets/plugins/sweetalert/js/sweetalert.min.js"></script>
<script type="text/javascript" src="../../../assets/plugins/modal-window-effects/js/classie.js"></script>

<!-- 表单验证提示 -->
<script src="../../../assets/js/jquery.tips.js"></script>

<!-- 本页面js --> 
<script type="text/javascript" src="../../../assets/js-v/exam/testpapermx_edit.js"></script>

</body>
</html>