地质所 沉降监测网建设项目
zmk
2024-05-17 5e697a70c7e49e18bc3bc2f75c2e9ad5bda17489
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html
@@ -56,8 +56,11 @@
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:deviceLog:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:deviceLog:export">
                    <i class="fa fa-download"></i> 导出
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:deviceLog:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                 </a>-->
                <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="geo:deviceLog:import">
                    <i class="fa fa-upload"></i> 导入
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
@@ -76,10 +79,11 @@
        $(function() {
            var options = {
                url: prefix + "/list?projectId="+projectId,
                createUrl: prefix + "/add",
                createUrl: prefix + "/add?projectId="+projectId,
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                importUrl: prefix + "/importDeviceLog/"+projectId,
                modalName: "设备出入库记录",
                columns: [{
                    checkbox: true
@@ -96,6 +100,10 @@
                {
                    field : 'projectName', 
                    title : '项目名称'
                },
                    {
                        field : 'deviceCode',
                        title : '设备编码'
                },
                {
                    field : 'deviceName', 
@@ -141,6 +149,29 @@
            };
            $.table.init(options);
        });
        //下载
        function importTemplate() {
            var filename="设备出入库记录模板.xls";
            window.location.href = ctx + "common/download?fileName=" + encodeURI(filename) + "&delete=" + false;
        }
    </script>
</body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                <input type="checkbox" id="updateSupport" name="updateSupport" title="导入设备出入库信息信息"> 是否更新已经存在的数据
                <a onclick="importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示:仅允许导入“xls”或“xlsx”格式文件!
            </font>
        </div>
    </form>
</script>
</html>