first commit
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
<!-- 主体 -->
|
||||
{block name="breadcrumb"}
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="http://www.meteteme.com/" target="_blank">江苏美天科技</a>
|
||||
<a><cite>项目中心</cite></a>
|
||||
</span>
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="table-content p-3">
|
||||
<div class="layui-form-bar border-t border-x">
|
||||
<button class="layui-btn layui-btn-sm add-project">+ 新建项目</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="projectList" lay-filter="project"></table>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool', 'gouguEdit', 'gouguComment', 'gouguSchedule', 'employeepicker', 'editormd'];
|
||||
function gouguInit() {
|
||||
var table = layui.table, tool = layui.tool;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#projectList',
|
||||
title: '项目列表',
|
||||
cellMinWidth: 80,
|
||||
page: true, //开启分页
|
||||
limit: 20,
|
||||
height: 'full-130',
|
||||
url: "/project/index/index", //数据接口
|
||||
cols: [[
|
||||
{
|
||||
field: 'id', title: '项目编号', width: 100, align: 'center', fixed: 'left', rowspan: 2, templet: function (d) {
|
||||
return 'M' + d.id;
|
||||
}
|
||||
}
|
||||
, {
|
||||
field: 'status', title: '状态', align: 'center', width: 100, rowspan: 2, templet: function (d) {
|
||||
var html = '<span class="layui-btn layui-btn-xs bg-status-' + d.status + '">' + d.status_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, {
|
||||
field: 'project_type', title: '项目类型', align: 'center', width: 140, rowspan: 2, templet: function (d) {
|
||||
var typeText = '';
|
||||
if (d.project_type == 1) {
|
||||
typeText = '申报项目';
|
||||
} else if (d.project_type == 2) {
|
||||
typeText = '维护保障项目';
|
||||
} else if (d.project_type == 3) {
|
||||
typeText = '开发项目【外部】';
|
||||
} else if (d.project_type == 4) {
|
||||
typeText = '开发项目【内部】';
|
||||
}
|
||||
var html = '<span class="layui-btn-xs ">' + typeText + '</span>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, {
|
||||
field: 'business_id', title: '客户单位', align: 'center', width: 140, rowspan: 2, templet: function (d) {
|
||||
var html = '<span>' + d.business_id + '</span>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, {
|
||||
field: 'name', title: '项目名称', rowspan: 2, templet: function (d) {
|
||||
var html = '<a class="link-a" data-href="/project/index/view/id/' + d.id + '">' + d.name + '</a>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
, { field: 'director_name', title: '负责人', align: 'center', width: 80, rowspan: 2 }
|
||||
, { field: 'plan_time', title: '项目周期', align: 'center', width: 240, rowspan: 2 }
|
||||
, { align: 'center', title: '关联任务', colspan: 3 }
|
||||
, { align: 'center', title: 'BUG缺陷', colspan: 3 }
|
||||
], [
|
||||
{ field: 'tasks_a_unfinish', align: 'center', style: 'color: #91CC75;', width: 80, 'title': '进行中' }
|
||||
, { field: 'tasks_a_finish', align: 'center', style: 'color: #FAC858;', width: 80, 'title': '已完成' }
|
||||
, { field: 'tasks_a_pensent', align: 'center', style: 'color: #EE6666;', width: 80, 'title': '完成率' }
|
||||
, { field: 'tasks_b_unfinish', align: 'center', style: 'color: #91CC75;', width: 80, 'title': '进行中' }
|
||||
, { field: 'tasks_b_finish', align: 'center', style: 'color: #FAC858;', width: 80, 'title': '已完成' }
|
||||
, { field: 'tasks_b_pensent', align: 'center', style: 'color: #EE6666;', width: 80, 'title': '修复率' }
|
||||
]]
|
||||
});
|
||||
|
||||
$('.layui-form-bar').on('click', '.add-project', function () {
|
||||
tool.open('/project/index/add');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
Reference in New Issue
Block a user