77 lines
2.7 KiB
HTML
77 lines
2.7 KiB
HTML
{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-new">+ 新建产品</button>
|
|
</div>
|
|
<table class="layui-hide" id="product" lay-filter="product"></table>
|
|
</div>
|
|
{/block}
|
|
|
|
<!-- 脚本 -->
|
|
{block name="script"}
|
|
<script>
|
|
const moduleInit = ['tool', 'gouguEdit', 'gouguComment'];
|
|
function gouguInit() {
|
|
var table = layui.table, tool = layui.tool;
|
|
layui.pageTable = table.render({
|
|
elem: '#product',
|
|
title: '产品列表',
|
|
cellMinWidth: 80,
|
|
url: "/product/index/index", //数据接口
|
|
page: true, //开启分页
|
|
limit: 20,
|
|
height: 'full-130',
|
|
cols: [[
|
|
{
|
|
field: 'id', title: '产品编号', width: 100, fixed: 'left', rowspan: 2, templet: function (d) {
|
|
return 'P' + d.id;
|
|
}
|
|
}
|
|
, {
|
|
field: 'status', title: '状态', width: 100, rowspan: 2, templet: function (d) {
|
|
var html = '<span>' + d.status_name + '</span>';
|
|
return html;
|
|
}
|
|
}
|
|
, {
|
|
field: 'is_own', title: '类型', width: 100, rowspan: 2, templet: function (d) {
|
|
var text = d.is_own === 1 ? '自研' : '非自研';
|
|
var html = '<span class="color-flow-' + d.is_own + '">' + text + '</span>';
|
|
return html;
|
|
}
|
|
}
|
|
, {
|
|
field: 'name', title: '产品名称', rowspan: 2, templet: function (d) {
|
|
var html = '<span>' + d.name + '</span>';
|
|
return html;
|
|
}
|
|
}
|
|
// , { field: 'director_name', title: '负责人', width: 80, rowspan: 2 }
|
|
, { field: 'admin_name', title: '创建人', width: 80, rowspan: 2 }
|
|
, { field: 'projects', title: '关联项目', width: 100, rowspan: 2 }
|
|
, { align: 'center', title: '关联任务', colspan: 3 }
|
|
, { align: 'center', title: 'BUG缺陷', colspan: 3 }
|
|
], [
|
|
{ field: 'tasks_a_unfinish', style: 'color: #91CC75;', width: 80, 'title': '进行中' }
|
|
, { field: 'tasks_a_finish', style: 'color: #FAC858;', width: 80, 'title': '已完成' }
|
|
, { field: 'tasks_a_pensent', style: 'color: #EE6666;', width: 80, 'title': '完成率' }
|
|
, { field: 'tasks_b_unfinish', style: 'color: #91CC75;', width: 80, 'title': '进行中' }
|
|
, { field: 'tasks_b_finish', style: 'color: #FAC858;', width: 80, 'title': '已完成' }
|
|
, { field: 'tasks_b_pensent', style: 'color: #EE6666;', width: 80, 'title': '修复率' }
|
|
]]
|
|
});
|
|
|
|
$('.add-new').on('click', function () {
|
|
tool.open('/product/index/add');
|
|
});
|
|
}
|
|
</script>
|
|
{/block} |