| | |
| | | <div class="row"> |
| | | <div class="col-sm-12 search-collapse"> |
| | | <form id="formId"> |
| | | |
| | | <!-- 条件表达式 --> |
| | | <div th:if="${type}=='3'" class="select-list"> |
| | | <ul> |
| | | <li> |
| | | <p>资料名称:</p> |
| | | <input type="text" name="name"/> |
| | | </li> |
| | | <li> |
| | | <p>业务类型:</p> |
| | | <select name="fileType" th:with="type=${@dict.getType('project_data_file_type')}"> |
| | | <option value="">所有</option> |
| | | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
| | | </select> |
| | | </li> |
| | | <li> |
| | | <p>标签:</p> |
| | | <input type="text" name="labels"/> |
| | | </li> |
| | | <li> |
| | | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
| | | <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <!-- 条件表达式 --> |
| | | <div th:if="${type}!='3'" class="select-list"> |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | <p>资料名称:</p> |
| | |
| | | <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:projectData:export">--> |
| | | <!-- <i class="fa fa-download"></i> 导出--> |
| | | <!-- </a>--> |
| | | <a class="btn btn-danger" data-toggle="modal" onclick="uploadZIP();"> |
| | | <i class="fa fa-upload"></i>上传附件 |
| | | </a> |
| | | </div> |
| | | <div class="col-sm-12 select-table table-striped"> |
| | | <table id="bootstrap-table"></table> |
| | |
| | | visible: false |
| | | }, |
| | | { |
| | | field : 'name', |
| | | field : 'name', |
| | | title : '资料名称' |
| | | }, |
| | | { |
| | | field : 'fileType', |
| | | title : '文件类型', |
| | | formatter: function(value, row, index) { |
| | | return $.table.selectDictLabel(fileTypeDatas, value); |
| | | } |
| | | }, |
| | | { |
| | | field : 'labels', |
| | |
| | | formatter: function(value, row, index) { |
| | | var actions = []; |
| | | actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> '); |
| | | actions.push('<a class="btn btn-info btn-xs ' + '" href="javascript:void(0)" onclick="viewImg(\'' + row.dataUrl + '\' , \'' + row.id + '\')"><i class="glyphicon glyphicon-menu-hamburger"></i>查看附件</a>'); |
| | | return actions.join(''); |
| | | } |
| | | }] |
| | | }; |
| | | $.table.init(options); |
| | | }); |
| | | |
| | | // 上传附件 |
| | | function uploadZIP(){ |
| | | $.modal.open('上传附件', prefix + "/importImg"); |
| | | } |
| | | |
| | | |
| | | // 查看图片详情 |
| | | function viewImg(path, id) { |
| | | if(path === null || path === '' || path === 'null'){ |
| | | $.modal.alertSuccess("文件无法打开!"); |
| | | return; |
| | | } |
| | | var url = prefix + "/viewImage?id=" + id; |
| | | $.modal.open("查看图片", url, 800, 600); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |