<%@ page language="java" contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fastboot" prefix="fb"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<fb:ui src="base/main">
    <fb:property name="title">批量发布任务</fb:property>
    <fb:css href="${base}/static/js/city-picker/city-picker.css"></fb:css>
    <fb:script src="${base}/static/js/city-picker/city-picker.data.js"></fb:script>
    <fb:script type="text/javascript">
        <script>
            layui.use([ 'tool', 'form', 'city' ], function() {
                var $ = layui.$, tool = layui.tool, form = layui.form, city= layui.city;
                let currentPicker = new city("#city-picker", {
                    getValListener: function(item){}});
            });
            function exportCrop(){
                let data = $("#form1").serializeArray();
                console.log(data)
                let src = '${base}/crop/export?';
                for(let item of data){
                    src += item.name + "=" + item.value + "&"
                }
                window.open(src)
            }
        </script>

    </fb:script>
    <fb:layout>
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>导出耕地信息</legend>
        </fieldset>
        <form class="layui-form" id="form1" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">地区</label>
                    <div class="layui-input-inline">
                        <input  id="city-picker"    class="layui-input">
                    </div>
                </div>
            </div>
            <input type="hidden" name="status" value="3" />
            <input type="button" onclick="exportCrop()" id="submit" style="display: none"  />
        </form>
    </fb:layout>
</fb:ui>