lihai-oa/app/home/view/index/layout_project.html

34 lines
1.2 KiB
HTML
Raw Normal View History

2023-10-24 15:17:16 +08:00
<div class="layui-row layui-col-space16">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-title">项目列表</div>
<div style="padding: 12px;">
<table id="Project" lay-filter="Project" class="layui-hide" style="margin-top:0"></table>
</div>
</div>
</div>
</div>
<script>
//项目
function layoutProject(table){
table.render({
elem: '#Project'
, url: "/home/api/get_project_list" //数据接口
, page: false //开启分页
, cols: [[ //表头
{ field: 'id', title: '项目编号', align: 'center','width': 90, templet: function (d) {
return 'P' + d.id;
}
},
{field: 'status', title: '状态', align: 'center', width: 80, templet: function (d) {
var html = '<span class="layui-btn layui-btn-xs layui-bg-' + d.status + '">' + d.status_name + '</span>';
return html;
}
},
{ field: 'title', title: '项目名称',templet: '<div><a data-href="/project/index/view/id/{{d.id}}.html" class="side-a">{{d.name}}</a></div>'},
{ field: 'director_name', title: '负责人', align: 'center', width: 80},
{ field: 'plan_time', title: '项目周期', align: 'center', width: 190},
]]
});
}
</script>