更新命名问题
This commit is contained in:
@@ -39,9 +39,9 @@ class Index extends BaseController
|
||||
|
||||
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
||||
$list = ProductList::withoutField('content,md_content')
|
||||
->where(function ($query) use ($map1, $map2, $map3, $map4) {
|
||||
$query->where($map1)->whereor($map2)->whereor($map3)->whereor($map4);
|
||||
})
|
||||
// ->where(function ($query) use ($map1, $map2, $map3, $map4) {
|
||||
// $query->where($map1)->whereor($map2)->whereor($map3)->whereor($map4);
|
||||
// })
|
||||
->where('delete_time', 0)
|
||||
->order('id desc')
|
||||
->paginate($rows, false, ['query' => $param])
|
||||
|
||||
@@ -18,55 +18,60 @@
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','gouguEdit','gouguComment'];
|
||||
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, align: 'center', fixed: 'left', rowspan: 2, templet: function (d) {
|
||||
return 'P' + d.id;
|
||||
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: '状态', 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: 'status', title: '状态', width: 100, rowspan: 2, templet: function (d) {
|
||||
var html = '<span>' + d.status_name + '</span>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
}
|
||||
, {
|
||||
field: 'name', title: '产品名称', align: 'center', rowspan: 2, templet: function (d) {
|
||||
var className = d.is_own == 1 ? 'ziyan' : 'feiziyan';
|
||||
var text = d.is_own == 1 ? '自研' : '非自研';
|
||||
var html = '<div style="display:grid;justify-content:center"><a class="open-a" data-href="/product/index/view/id/' + d.id + '" style="display: flex;justify-content: center;align-items: center;"><span class="' + className + '" style="float:left">' + text + '</span>' + '<p style="float:left">' + d.name + '</p>' + '</a></div>';
|
||||
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: 'director_name', title: '负责人', align: 'center', width: 80, rowspan: 2 }
|
||||
, { field: 'admin_name', title: '创建人', align: 'center', width: 80, rowspan: 2 }
|
||||
, { field: 'projects', title: '关联项目', align: 'center', width: 100, 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': '修复率' }
|
||||
]]
|
||||
});
|
||||
, {
|
||||
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');
|
||||
});
|
||||
}
|
||||
$('.add-new').on('click', function () {
|
||||
tool.open('/product/index/add');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user