<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>调查问卷</title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=0.5, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>
    <meta name="sharetitle" content="全科界-精品课"/>
    <meta name="sharedesc" content="赋能全科医生，培养百姓良医"/>
    <meta name="sharepic" content="https://qkj-web.oss-cn-beijing.aliyuncs.com/html5/share.png"/>
    <meta name="shareurl" content=""/>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="/static/css/html5/questionnaire/index.css">
    <link href="/static/css/html5/common.css?v=" +Math.random() rel="stylesheet" type="text/css"/>
    <script src="/static/js/jquery-3.5.1.min.js?v=" +Math.random()></script>
    <script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
    <script src="/static/js/common.js?v=" +Math.random()></script>
    <script src="/static/js/ucenter.js?v=" +Math.random()></script>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?0305f34866fc4fe377f1bec6dc84d92f";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body>
<div id="container" class="container">
    <div class="mark" v-show="showMark"></div>
    <div th:include="html5/common::common-loading" v-if="loading"></div>
    <div v-else class="question-box">
        <div class="question-title" v-cloak>{{ title }}</div>
        <div class="question-content">
            <el-form :model="form" ref="form">
                <template v-for="(item,index) in questionnairesList">
                    <div class="question-content__item" :key="item.name"> <!-- 要循环的 -->
                        <div class="entity-office">{{ item.name }}</div>
                        <template v-for="(_i,_index) in item.questionGroups">
                            <div class="entity-item" :key="_i.id"> <!-- 要循环的 -->
                                <div class="entity-item__title">{{ _i.name }}</div>
                                <template v-for="(deep,deepIndex) in _i.questions">
                                    <el-form-item :required="deep.required"
                                                  :label="(deepIndex + 1) + '、' + deep.text">
                                        <div class="entity-item__survey" :key="deep.id">
                                            <!-- 要循环的 -->
                                            <template v-if="deep.type === 'SINGLE_CHOICE'">
                                                <el-radio v-for="answer in deep.questionOptions"
                                                          v-model="form.answers[index].questionGroups[_index].answers[deepIndex].optionId"
                                                          :label="answer.id + ',' + answer.text">{{
                                                    answer.label }} {{ answer.text }}
                                                </el-radio>
                                            </template>
                                        </div>
                                    </el-form-item>
                                </template>
                            </div>
                        </template>
                    </div>
                </template>
                <div class="question-content__btns" v-cloak>
                    <div class="reset" @click="resetQuestion">重置</div>
                    <div class="submit" @click="submitQuestion">提交</div>
                </div>
            </el-form>
        </div>
    </div>
    <!--    <p id="bottomInfo">全科在线提供技术支持</p>-->
</div>
</body>
<script src="/static/js/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="/static/js/jweixin-1.0.0.js"></script>
<script>
    document.write('<script src="/static/js/h5/questionnaire/index.js?v=' + Math.random() + '"><\/script\>');
</script>
</html>
