<?xml version="1.0" encoding="UTF-8"?>
<jasperReport
  xmlns="http://jasperreports.sourceforge.net/jasperreports"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
  name="student"
  language="groovy"
  pageWidth="550"
  pageHeight="400"
  columnWidth="510"
  leftMargin="20"
  rightMargin="20"
  topMargin="40"
  bottomMargin="20"
  uuid="d82eee4a-2a48-4631-a297-a4cd2e0c107e"
>
  <property name="ireport.zoom" value="1.0" />
  <property name="ireport.x" value="0" />
  <property name="ireport.y" value="0" />
  <queryString language="SQL">
    <![CDATA[select count(lesson_name),student_name from student_lesson group by
    student_name]]>
  </queryString>
  <field name="count(lesson_name)" class="java.lang.Long" />
  <field name="student_name" class="java.lang.String">
    <fieldDescription><![CDATA[]]></fieldDescription>
  </field>
  <group name="student_name">
    <groupExpression><![CDATA[$F{student_name}]]></groupExpression>
  </group>
  <group name="count(lesson_name)">
    <groupExpression><![CDATA[$F{count(lesson_name)}]]></groupExpression>
  </group>
  <background>
    <band splitType="Stretch" />
  </background>
  <title>
    <band height="51" splitType="Stretch"> <staticText> <reportElement
    mode="Transparent" x="158" y="28" width="158" height="23"
    forecolor="#FF6633" backcolor="#99FF99"
    uuid="cf04997d-9298-4cc7-b78e-39bb9de3918b"/> <textElement
    textAlignment="Center" verticalAlignment="Middle" markup="none"> <font
    size="14" isBold="true" isItalic="false" pdfFontName="STSong-Light"
    pdfEncoding="UniGB-UCS2-H"/> <paragraph lineSpacing="Single"/>
    </textElement> <text><![CDATA[student]]></text> </staticText> </band>
  </title>
  <pageHeader>
    <band height="47" splitType="Stretch">
      <textField pattern="EEEEE dd MMMMM yyyy">
        <reportElement
          x="188"
          y="0"
          width="100"
          height="20"
          uuid="abc93c96-eaf0-43b9-9b89-52a4c848832d"
        />
        <box
          topPadding="0"
          leftPadding="0"
          bottomPadding="0"
          rightPadding="0"
        />
        <textElement>
          <font pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" />
        </textElement>
        <textFieldExpression
          ><![CDATA[new java.util.Date()]]></textFieldExpression
        >
      </textField>
    </band>
  </pageHeader>
  <columnHeader>
    <band height="57" splitType="Stretch">
      <staticText>
        <reportElement
          x="164"
          y="2"
          width="100"
          height="20"
          uuid="fd1135ac-354c-4119-94f0-52aa5ac62cf4"
        />
        <text><![CDATA[student_name]]></text>
      </staticText>
      <staticText>
        <reportElement
          x="264"
          y="2"
          width="100"
          height="20"
          uuid="446b250a-c1ff-4a8c-9510-ed6f9ce06f4b"
        />
        <text><![CDATA[count(lesson_name)]]></text>
      </staticText>
      <break type="Column">
        <reportElement
          mode="Opaque"
          x="0"
          y="2"
          width="100"
          height="1"
          uuid="170f0738-9112-47bb-a444-bf53f3b68ae6"
        />
      </break>
    </band>
  </columnHeader>
  <detail>
    <band height="63" splitType="Stretch">
      <textField>
        <reportElement
          x="158"
          y="0"
          width="100"
          height="20"
          uuid="b23b631b-77b7-44ec-89f8-ca7bbfaadbd6"
        />
        <textFieldExpression><![CDATA[$F{student_name}]]></textFieldExpression>
      </textField>
      <textField>
        <reportElement
          x="264"
          y="0"
          width="100"
          height="20"
          uuid="db2c95e7-7228-4314-9645-646e4a7a8a73"
        />
        <textFieldExpression
          ><![CDATA[$F{count(lesson_name)}]]></textFieldExpression
        >
      </textField>
    </band>
  </detail>
  <summary>
    <band height="160" splitType="Stretch" />
  </summary>
</jasperReport>



<div class="panel-group" id="editAttachment">
  <div class="panel panel-default">
    <div class="panel-heading" >
      {{name}}-文件上传
    </div>
    <div id='collapseOne'>
      <div class="panel panel-default">
        <div class="panel-heading" data-toggle="collapse" data-parent="#collapseOne"
        href="#base">
          基本
        </div>
        <div id='base' class='panel-collapse collapse in'>
          <div class="panel-body">
            <div class="input-group">
              <span class="input-group-addon">名称</span>
              <input type='text' name="name" id="name" class="form-control"  value={{name}} />
            </div> <br />

            <div class="input-group">
              <span class="input-group-addon">是否显示label</span>
              <input type="checkbox" name="isshowlabel" id="isshowlabel" class="checkbox" {{if isshowlabel == 'true' || isshowlabel == true}} checked {{else}} {{/if}} />
              <input type='text' data-componentName='isshowlabel' data-value="true" name="labelvalue" id="labelvalue" class="form-control"  value={{labelvalue}} />

            </div> <br />

            <div class="input-group">
              <span class="input-group-addon">限制单个上传文件大小</span>
              <input type='number' name="limitsize" id="limitsize" class="form-control"  value={{limitsize}} />kb<span style="color:red;">默认10M</span>
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">上传文件类型</span>
              <label><input name="filetype" type="radio" value="00" {{if filetype == '00'}}checked{{/if}}/>所有 </label>
                <label><input name="filetype" type="radio" value="01" {{if filetype == '01'}}checked{{/if}}/>自定义 </label>
              <div class="input-group {{if filetype == "00"}}d-none {{else}} {{/if}}" data-componentName="filetype" data-value="01" >
                <textarea type="text" name="customizetype" id="customizetype">{{customizetype}}</textarea>
              </div>
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">最大上传数量</span>
              <input type='number' name="limitsize" id="limitsize" class="form-control"  value={{limitsize}} />
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">存放路径</span>
              <label><input name="filepattern" type="radio" value="00" {{if filepattern == '00'}}checked{{/if}}/>系统默认 </label>
              <label><input name="filepattern" type="radio" value="01" {{if filepattern == '01'}}checked{{/if}}/>自定义 </label>
                
            </div> <br />
            <div class="input-group {if filetype == "00"}}d-none {{else}} {{/if}}" data-componentName="filepattern" data-value="01" >
              <span class="input-group-addon">服务器目录</span>
              <input type='text' name="filecatalog" id="filecatalog" class="form-control"  value={{filecatalog}} />
            </div> <br />



            <div class="input-group">
              <span class="input-group-addon">只读时仅显示值</span>
              <input type="checkbox" name="readonlyshowvalonly" id="readonlyshowvalonly" class="checkbox" {{if readonlyshowvalonly == 'true' || readonlyshowvalonly == true}} checked {{else}} {{/if}} />
            </div> <br />

            <div class="input-group">
              <span class="input-group-addon">刷新</span>
              <input type="checkbox" name="refreshonchanged" id="refreshonchanged" class="checkbox" {{if refreshonchanged == "true" || refreshonchanged == true}} checked {{else}} {{/if}} value="true"/>
            </div> <br />
            <div class="input-group {{if refreshonchanged == "false"||refreshonchanged == false}}d-none {{else}} {{/if}}" id="refreshmode" data-componentName='refreshonchanged' data-value="true">
              <span class="input-group-addon">刷新方式</span>
              <label><input name="refreshmode" type="radio" value="0" {{if refreshmode == '0'}}checked{{/if}}/>全局刷新 </label>
              <label><input name="refreshmode" type="radio" value="1" {{if refreshmode == '1'}}checked{{/if}}/>局部刷新 </label>
              <div class="input-group {{if refreshmode == 0}}d-none {{else}} {{/if}}" data-componentName="refreshmode" data-value="1" >
                <span class="input-group-addon d-inline" >局部刷新字段</span>
                <button class="btn btn-default d-inline" id="addRefreshField">添加</button>
                {{each refreshfields as value}}
                  <div>
                    <span class="input-group-addon d-inline">字段名称</span>
                    <select id='refreshfields' name="refreshfields" class="form-control">
                    {{each allName as value}}
                      <option >{{value.name}}</option>
                      {{if value == value.name}}
                        <option selected>{{value.name}}</option>
                      {{else}}
                        <option>{{value.name}}</option>
                      {{/if}}
                    {{/each}}
                    </select>
                    <button class="btn btn-primary d-block" id="delRefreshField">删除</button>
                  </div>
                {{/each}}

              </div> <br />
              <div class="input-group {{if refreshmode == 1}}d-none {{else}} {{/if}}" data-componentName="refreshmode" data-value="0">
              </div> <br />

            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">重计算</span>
              <input type="checkbox" name="calculateonrefresh" id="calculateonrefresh" class="checkbox" {{if calculateonrefresh == 'true' || calculateonrefresh == true}} checked {{else}} {{/if}} />
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">手机可用</span>
              <input type="checkbox" name="mobile" id="mobile" class="checkbox" {{if mobile == 'true' ||mobile == true}} checked {{else}} {{/if}} />
            </div> <br />
          
            <div class="input-group">
              <span class="input-group-addon">office文档预览时可编辑</span>
              <input type="checkbox" name="previewedit" id="previewedit" class="checkbox" {{if previewedit == 'true' ||previewedit == true}} checked {{else}} {{/if}} />
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">是否添加水印</span>
              <input type="checkbox" name="openwatermark" id="openwatermark" class="checkbox" {{if openwatermark == 'true' ||openwatermark == true}} checked {{else}} {{/if}} />
            </div> <br />
            <div class="input-group">
              <span class="input-group-addon">文件排序功能仅支持H5皮肤</span>
              <input type="checkbox" name="supportsorting" id="supportsorting" class="checkbox" {{if supportsorting == 'true' ||supportsorting == true}} checked {{else}} {{/if}} />
            </div> <br />

            <div class="input-group">
              <span class="input-group-addon">描述</span>
              <textarea type="text" name="discript" id="discript">{{discript}}</textarea>
            </div> <br />

          </div>
        </div>

        <div class="panel-heading" data-toggle="collapse" data-parent="#collapseOne"
        href="#checkPart">
          校验
        </div>
        <div id='checkPart' class='panel-collapse collapse in'>
          <div class="panel-body">
            <div class="input-group">
              <div class="input-group">
                <span class="input-group-addon">即时校验</span>
                <input type="checkbox" name="instantvalidate" id="instantvalidate" class="checkbox" {{if instantvalidate == 'true'|| instantvalidate == true}} checked {{else}} {{/if}} />
              </div> <br />
              {{each validatelibsOption as value}}
                <label><input name="validatelibs" type="radio" value={{value.value}} {{if  value.select=="true"}} checked {{else}} {{/if}}/>{{value.name}}</label>
              {{/each}}
              <textarea type="text" name="validaterule" id="validaterule" placeholder="请输入脚本" title="/*描述：动作触发前执行
              返回值：
                  1.无返回值，不做处理
                  2.返回字符串      --弹出警告框（Alert）
              */">{{validaterule}}</textarea>
            </div> <br />
          </div>
        </div>
        <div class="panel-heading" data-toggle="collapse" data-parent="#collapseOne"
        href="#hiddenPart">
          隐藏条件
        </div>
        <div id='hiddenPart' class='panel-collapse collapse in'>
          <div class="panel-body">
            <div class="input-group">
              <textarea type="text" name="hiddenscript" id="hiddenscript" placeholder="请输入脚本">{{hiddenscript}}</textarea>
              <div class="input-group">
                <span class="input-group-addon">隐藏时显示值</span>
                <input type='text' name="hiddenvalue" id="hiddenvalue" class="form-control"  value={{hiddenvalue}} />
              </div> <br />
            </div> <br />
          </div>
        </div>
        <div class="panel-heading" data-toggle="collapse" data-parent="#collapseOne"
        href="#printPart">
          打印时隐藏条件
        </div>
        <div id='printPart' class='panel-collapse collapse in'>
          <div class="panel-body">
            <div class="input-group">
              <textarea type="text" name="hiddenprintscript" id="hiddenprintscript" placeholder="请输入脚本">{{hiddenprintscript}}</textarea>
              <div class="input-group">
                <span class="input-group-addon">打印隐藏时显示值</span>
                <input type='text' name="printhiddenvalue" id="printhiddenvalue" class="form-control"  value={{printhiddenvalue}} />
              </div> <br />
            </div> <br />
          </div>
        </div>
        <div class="panel-heading" data-toggle="collapse" data-parent="#collapseOne"
        href="#readonlyPart">
          只读条件
        </div>
        <div id='readonlyPart' class='panel-collapse collapse in'>
          <div class="panel-body">
            <div class="input-group">
              <textarea type="text" name="readonlyscript" id="readonlyscript" placeholder="请输入脚本">{{readonlyscript}}</textarea>
            </div> <br />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
  