|
@@ -38,6 +38,46 @@
|
|
|
.heading th, .form td{
|
|
|
height: 36px;
|
|
|
}
|
|
|
+
|
|
|
+ .heading-1 td{
|
|
|
+ border-color: #e2e2e2;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ #filesBox2 .layui-table-tool{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ #filesBox2 .layui-table-view .layui-table{
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ #filesBox2 .layui-table-cell{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .laytable-cell-1-0-1, .laytable-cell-1-0-2{
|
|
|
+ justify-content: flex-start !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .laytable-cell-1-0-0 span, .laytable-cell-1-0-1 span, .laytable-cell-1-0-2 span, .laytable-cell-1-0-3 span, .laytable-cell-1-0-4 span, th>.laytable-cell-1-0-5 span{
|
|
|
+ display: flex;
|
|
|
+ font: 14px red;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #5f5f5f;
|
|
|
+
|
|
|
+ }
|
|
|
+ #tabniubi tr:first-child th{
|
|
|
+ border-right: 1px solid #e2e2e2 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ #filesBox2 th:sixth-child{
|
|
|
+ border-right: none !important;
|
|
|
+ }
|
|
|
+
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -304,13 +344,10 @@
|
|
|
<th colspan="9" class="forleft">相关附件</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th colspan="9" class="forleft fujianimg">
|
|
|
- <ul id="filesBox" style="height: 140px;display: flex;flex-flow: wrap;overflow: scroll;">
|
|
|
- {:fileCard($file_array)}
|
|
|
- </ul>
|
|
|
- {empty name="$file_array" }
|
|
|
- <div class="layui-data-none">暂无附件</div>
|
|
|
- {/empty}
|
|
|
+ <th colspan="9" class="fujianimg" style="padding: 0px 0;">
|
|
|
+ <div id="filesBox2">
|
|
|
+ <table class="layui-hide" id="get_file" lay-filter="get_file"></table>
|
|
|
+ </div>
|
|
|
</th>
|
|
|
</tr>
|
|
|
|
|
@@ -380,6 +417,56 @@
|
|
|
|
|
|
function first(){
|
|
|
|
|
|
+ let table = layui.table;
|
|
|
+ //项目任务
|
|
|
+ var allcount;
|
|
|
+ parent.layui.get_fileTable = table.render({
|
|
|
+ elem: '#get_file',
|
|
|
+ title: '文档列表',
|
|
|
+ toolbar: '#toolbarget_file',
|
|
|
+ cellMinWidth: 80,
|
|
|
+ parseData: function (res) { // 数据解析回调函数
|
|
|
+ // 在这里可以获取数据总数
|
|
|
+ allcount = res.data.length;
|
|
|
+ return {
|
|
|
+ code: res.code, // 数据状态码
|
|
|
+ msg: res.msg, // 状态信息
|
|
|
+ count: res.count, // 数据总数
|
|
|
+ data: res.data // 当前页数据
|
|
|
+ };
|
|
|
+ },
|
|
|
+ // className: 'layui-table-testcss', // 用于给表格主容器追加 css 类名
|
|
|
+ // lineStyle: 'height: 151px;', // 定义表格的多行样式
|
|
|
+ url: "/admin/project.api/get_file",
|
|
|
+ where: {'id': project_id},
|
|
|
+ page: true, //开启分页
|
|
|
+ limit: 20,
|
|
|
+ cols: [[
|
|
|
+ {field: 'id', title: '序号', width: 80, align: 'center',
|
|
|
+ templet: function (d) {
|
|
|
+ console.log(allcount,d.LAY_NUM)
|
|
|
+ return allcount - (d.LAY_NUM - 1);
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {field: 'name', title: '附件名称', align: 'left',
|
|
|
+ },
|
|
|
+ {field: 'remark', title: '附件说明', align: 'left',
|
|
|
+ },
|
|
|
+
|
|
|
+ {field: 'admin_name', title: '上传人', align: 'center', width: 150},
|
|
|
+ {field: 'create_time', title: '上传时间', align: 'center', width: 100},
|
|
|
+ {field: 'right', fixed: 'right', title: '操作', width: 150, align: 'center',
|
|
|
+ templet: function (d) {
|
|
|
+ var html = '<div class="layui-btn-group">';
|
|
|
+ var btn1 = `<a href="https://view.officeapps.live.com/op/view.aspx?src=${d.filepath}" target="_blank" class="layui-btn layui-btn-xs">预览</a>`;
|
|
|
+ var btn2 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href="${d.filepath}" download="${d.name}" lay-event="">下载</a>`;
|
|
|
+ return html + btn1 + btn2 +'</div>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]]
|
|
|
+ });
|
|
|
+
|
|
|
layui.use(['form', 'jquery'], function () {
|
|
|
var form = layui.form;
|
|
|
const $ = layui.jquery;
|