Accept Merge Request #58: (feature/zy -> develop)
Merge Request: feature: 面板 Created By: @zhuyu Accepted By: @zhuyu URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/58?initial=true
This commit is contained in:
commit
8e87f97bea
|
|
@ -88,7 +88,7 @@ class Task extends Backend
|
||||||
|
|
||||||
|
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->with(['admin'])
|
->with(['exec'])
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ return [
|
||||||
'Admin.id' => 'ID',
|
'Admin.id' => 'ID',
|
||||||
'Admin.username' => '用户名',
|
'Admin.username' => '用户名',
|
||||||
'Admin.nickname' => '昵称',
|
'Admin.nickname' => '昵称',
|
||||||
|
'ExecAdmin.nickname' => '执行人',
|
||||||
'Admin.password' => '密码',
|
'Admin.password' => '密码',
|
||||||
'Admin.salt' => '密码盐',
|
'Admin.salt' => '密码盐',
|
||||||
'Admin.area_ids' => '地区ID,英文逗号分隔',
|
'Admin.area_ids' => '地区ID,英文逗号分隔',
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class Task extends Model
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function admin()
|
public function exec()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('app\admin\model\Admin', 'exec_admin_id', 'id', [], 'LEFT')->setEagerlyType(1);
|
return $this->belongsTo('app\admin\model\Admin', 'exec_admin_id', 'id', [], 'LEFT')->setEagerlyType(1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>指标名称</th>
|
<th>指标名称</th>
|
||||||
<th>目标值</th>
|
<th>目标值</th>
|
||||||
<th>目标值(单位)</th>
|
<th>完成值</th>
|
||||||
<th>指标描述</th>
|
<th>指标描述</th>
|
||||||
|
<th>指标数据</th>
|
||||||
<th>权重</th>
|
<th>权重</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -21,8 +22,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$item->name|htmlentities}</td>
|
<td>{$item->name|htmlentities}</td>
|
||||||
<td>{$item->target_value|htmlentities}</td>
|
<td>{$item->target_value|htmlentities}</td>
|
||||||
<td>{$item->unit_text|htmlentities}</td>
|
<td>0</td>
|
||||||
<td>{$item->desc|htmlentities}</td>
|
<td>{$item->desc|htmlentities}</td>
|
||||||
|
<td>0</td>
|
||||||
<td>{$item->pivot->rate|htmlentities}</td>
|
<td>{$item->pivot->rate|htmlentities}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,15 @@
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
.card.completed .title {
|
||||||
|
text-decoration: line-through;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card.completed .note {
|
||||||
|
text-decoration: line-through;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
/* 响应式:小屏变成1列 */
|
/* 响应式:小屏变成1列 */
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
|
|
@ -82,7 +91,11 @@
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h3 class="section-title">每日任务</h3>
|
<h3 class="section-title">每日任务</h3>
|
||||||
{foreach $day as $item}
|
{foreach $day as $item}
|
||||||
|
{if $item->status != 1}
|
||||||
|
<div class="card completed" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{else}
|
||||||
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{/if}
|
||||||
<div class="title">{$item->title}</div>
|
<div class="title">{$item->title}</div>
|
||||||
<div class="note">{$item->desc}</div>
|
<div class="note">{$item->desc}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -93,7 +106,11 @@
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h3 class="section-title">每周任务</h3>
|
<h3 class="section-title">每周任务</h3>
|
||||||
{foreach $week as $item}
|
{foreach $week as $item}
|
||||||
|
{if $item->status != 1}
|
||||||
|
<div class="card completed" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{else}
|
||||||
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{/if}
|
||||||
<div class="title">{$item->title}</div>
|
<div class="title">{$item->title}</div>
|
||||||
<div class="note">{$item->desc}</div>
|
<div class="note">{$item->desc}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -104,7 +121,11 @@
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h3 class="section-title">每月任务</h3>
|
<h3 class="section-title">每月任务</h3>
|
||||||
{foreach $month as $item}
|
{foreach $month as $item}
|
||||||
|
{if $item->status != 1}
|
||||||
|
<div class="card completed" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{else}
|
||||||
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
<div class="card spec_add_btn" data-url="/admin/dashboard/task_complete/ids/{$item->id}">
|
||||||
|
{/if}
|
||||||
<div class="title">{$item->title}</div>
|
<div class="title">{$item->title}</div>
|
||||||
<div class="note">{$item->desc}</div>
|
<div class="note">{$item->desc}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
<input id="c-prove_file_path" class="form-control" size="50" name="row[prove_file_path]" type="text" value="">
|
<input id="c-prove_file_path" class="form-control" size="50" name="row[prove_file_path]" type="text" value="">
|
||||||
<div class="input-group-addon no-border no-padding">
|
<div class="input-group-addon no-border no-padding">
|
||||||
<span><button type="button" id="plupload-path" class="btn btn-danger plupload" data-input-id="c-prove_file_path" data-mimetype="*" data-multiple="true" data-preview-id="p-path"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="plupload-path" class="btn btn-danger plupload" data-input-id="c-prove_file_path" data-mimetype="*" data-multiple="true" data-preview-id="p-path"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-path" class="btn btn-primary fachoose" data-input-id="c-prove_file_path" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="msg-box n-right" for="c-prove_file_path"></span>
|
<span class="msg-box n-right" for="c-prove_file_path"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
{field: 'admin_id', title: __('Admin_id')},
|
|
||||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||||
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
||||||
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
{field: 'path', title: __('Path'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
||||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||||
|
|
@ -40,13 +38,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
title: __('查看详情'),
|
title: __('查看详情'),
|
||||||
classname: 'btn btn-xs btn-primary btn-dialog',
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
icon: 'fa fa-list',
|
icon: 'fa fa-list',
|
||||||
url: 'oa/doc/detail',
|
url: 'oa/doc/detail'
|
||||||
visible:function(row){
|
|
||||||
if (!Config.detail) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
|
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
|
||||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3'),"4":__('Type 4')}, formatter: Table.api.formatter.normal},
|
||||||
{field: 'date', title: __('Date'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'date', title: __('Date'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
|
|
@ -65,14 +65,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||||
"visible":false
|
"visible":false
|
||||||
});
|
});
|
||||||
|
|
||||||
const startDate = new Date(new Date().setDate(1));
|
const startDate = new Date();
|
||||||
const endDate = new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0);
|
startDate.setDate(1);
|
||||||
|
startDate.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
console.log('Start Date:', startDate);
|
const endDate = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0);
|
||||||
console.log('End Date:', endDate);
|
endDate.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
for (let d = new Date(startDate); d <= endDate; ) {
|
||||||
|
const current = new Date(d); // 深拷贝
|
||||||
|
const tmpDate = current.toLocaleDateString('sv-SE');
|
||||||
|
|
||||||
for (let d = new Date(startDate); d <= endDate; d.setDate(d.getDate() + 1)) {
|
|
||||||
let tmpDate = d.toISOString().split('T')[0];
|
|
||||||
console.log('Current Date:', tmpDate);
|
console.log('Current Date:', tmpDate);
|
||||||
defaultColumnArr.push({
|
defaultColumnArr.push({
|
||||||
"title": tmpDate,
|
"title": tmpDate,
|
||||||
|
|
@ -96,6 +99,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'editable'], function
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
d.setDate(d.getDate() + 1); // 最后再改 d 的值
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'exec.nickname', title: __('ExecAdmin.nickname'), operate: 'LIKE'},
|
||||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||||
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
||||||
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
|
@ -36,7 +37,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'expire_start_time', title: __('Expire_start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'expire_start_time', title: __('Expire_start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'expire_end_time', title: __('Expire_end_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'expire_end_time', title: __('Expire_end_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'complete_time', title: __('Complete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{field: 'complete_time', title: __('Complete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||||
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
|
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||||
buttons:[
|
buttons:[
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user