Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fbe424e913
44
app/api/controller/Api.php
Normal file
44
app/api/controller/Api.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (c) 2021 勾股工作室
|
||||||
|
* @license https://opensource.org/licenses/Apache-2.0
|
||||||
|
* @link https://www.gougucms.com
|
||||||
|
*/
|
||||||
|
declare (strict_types = 1);
|
||||||
|
namespace app\api\controller;
|
||||||
|
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\project\model\ProjectTask as TaskList;
|
||||||
|
use app\project\validate\TaskCheck;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
|
||||||
|
class Api
|
||||||
|
{
|
||||||
|
//添加
|
||||||
|
public function task_add()
|
||||||
|
{
|
||||||
|
$param = get_params();
|
||||||
|
if (request()->isPost()) {
|
||||||
|
if (isset($param['end_time'])) {
|
||||||
|
$param['end_time'] = strtotime(urldecode($param['end_time']));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
validate(TaskCheck::class)->scene('add')->check($param);
|
||||||
|
} catch (ValidateException $e) {
|
||||||
|
// 验证失败 输出错误信息
|
||||||
|
return to_assign(1, $e->getError());
|
||||||
|
}
|
||||||
|
$param['create_time'] = time();
|
||||||
|
$param['admin_id'] = 1;
|
||||||
|
if (!empty($param['md5']) && strlen($param['md5']) > 2) {
|
||||||
|
$id = TaskList::where('md5', $param['md5'])->where('flow_status',1)->value('id');
|
||||||
|
if ($id) {
|
||||||
|
return to_assign(1, '已存在');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TaskList::strict(false)->field(true)->insertGetId($param);
|
||||||
|
return json(['code'=>200,'msg'=>'ok']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -13,7 +13,6 @@ use Firebase\JWT\JWT;
|
|||||||
use Firebase\JWT\Key;
|
use Firebase\JWT\Key;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\facade\Request;
|
use think\facade\Request;
|
||||||
|
|
||||||
class Demo extends BaseController
|
class Demo extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,42 +1,46 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @copyright Copyright (c) 2021 勾股工作室
|
* @copyright Copyright (c) 2021 勾股工作室
|
||||||
* @license https://opensource.org/licenses/GPL-3.0
|
* @license https://opensource.org/licenses/GPL-3.0
|
||||||
* @link https://www.gougucms.com
|
* @link https://www.gougucms.com
|
||||||
*/
|
*/
|
||||||
declare (strict_types = 1);
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace app\home\controller;
|
namespace app\home\controller;
|
||||||
|
|
||||||
use app\api\BaseController;
|
use app\api\BaseController;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
class api extends BaseController
|
class api extends BaseController
|
||||||
{
|
{
|
||||||
//首页公告
|
//首页公告
|
||||||
public function get_note_list()
|
public function get_note_list()
|
||||||
{
|
{
|
||||||
$list = Db::name('Note')
|
$list = Db::name('Note')
|
||||||
->field('a.id,a.title,a.create_time,c.title as cate_title')
|
->field('a.id,a.title,a.create_time,c.title as cate_title')
|
||||||
->alias('a')
|
->alias('a')
|
||||||
->join('note_cate c', 'a.cate_id = c.id')
|
->join('note_cate c', 'a.cate_id = c.id')
|
||||||
->where(['a.status' => 1])
|
->where(['a.status' => 1])
|
||||||
->order('a.end_time desc,a.sort desc,a.create_time desc')
|
->order('a.end_time desc,a.sort desc,a.create_time desc')
|
||||||
->limit(8)
|
->limit(8)
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
foreach ($list as $key => $val) {
|
foreach ($list as $key => $val) {
|
||||||
$list[$key]['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
$list[$key]['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
||||||
}
|
}
|
||||||
$res['data'] = $list;
|
$res['data'] = $list;
|
||||||
return table_assign(0, '', $res);
|
return table_assign(0, '', $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//首页知识列表
|
//首页知识列表
|
||||||
public function get_article_list()
|
public function get_article_list()
|
||||||
{
|
{
|
||||||
$prefix = get_config('database.connections.mysql.prefix');//判断是否安装了文章模块
|
$prefix = get_config('database.connections.mysql.prefix'); //判断是否安装了文章模块
|
||||||
$exist = Db::query('show tables like "'.$prefix.'article"');
|
$exist = Db::query('show tables like "' . $prefix . 'article"');
|
||||||
$res['data'] = [];
|
$res['data'] = [];
|
||||||
if($exist){
|
if ($exist) {
|
||||||
$list = Db::name('Article')
|
$list = Db::name('Article')
|
||||||
->field('a.id,a.title,a.create_time,a.read,c.title as cate_title')
|
->field('a.id,a.title,a.create_time,a.read,c.title as cate_title')
|
||||||
->alias('a')
|
->alias('a')
|
||||||
@ -48,14 +52,14 @@ class api extends BaseController
|
|||||||
foreach ($list as $key => $val) {
|
foreach ($list as $key => $val) {
|
||||||
$list[$key]['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
$list[$key]['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
||||||
}
|
}
|
||||||
$res['data'] = $list;
|
$res['data'] = $list;
|
||||||
}
|
}
|
||||||
return table_assign(0, '', $res);
|
return table_assign(0, '', $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isAuthProject($uid)
|
function isAuthProject($uid)
|
||||||
{
|
{
|
||||||
if($uid == 1){
|
if ($uid == 1) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
$map = [];
|
$map = [];
|
||||||
@ -64,17 +68,17 @@ class api extends BaseController
|
|||||||
$count = Db::name('DataAuth')->where($map)->count();
|
$count = Db::name('DataAuth')->where($map)->count();
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
//首页项目
|
//首页项目
|
||||||
public function get_project_list()
|
public function get_project_list()
|
||||||
{
|
{
|
||||||
$prefix = get_config('database.connections.mysql.prefix');//判断是否安装了项目模块
|
$prefix = get_config('database.connections.mysql.prefix'); //判断是否安装了项目模块
|
||||||
$exist = Db::query('show tables like "'.$prefix.'project"');
|
$exist = Db::query('show tables like "' . $prefix . 'project"');
|
||||||
$res['data'] = [];
|
$res['data'] = [];
|
||||||
if($exist){
|
if ($exist) {
|
||||||
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
||||||
$where =[];
|
$where = [];
|
||||||
$where[] = ['a.delete_time', '=', 0];
|
$where[] = ['a.delete_time', '=', 0];
|
||||||
if($this->isAuthProject($this->uid)==0){
|
if ($this->isAuthProject($this->uid) == 0) {
|
||||||
$where[] = ['a.id', 'in', $project_ids];
|
$where[] = ['a.id', 'in', $project_ids];
|
||||||
}
|
}
|
||||||
$list = Db::name('Project')
|
$list = Db::name('Project')
|
||||||
@ -87,26 +91,25 @@ class api extends BaseController
|
|||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
foreach ($list as $key => &$val) {
|
foreach ($list as $key => &$val) {
|
||||||
$val['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
$val['create_time'] = date('Y-m-d H:i', $val['create_time']);
|
||||||
if($val['end_time']>0){
|
if ($val['end_time'] > 0) {
|
||||||
$val['plan_time'] = date('Y-m-d', $val['start_time']) . ' 至 ' . date('Y-m-d', $val['end_time']);
|
$val['plan_time'] = date('Y-m-d', $val['start_time']) . ' 至 ' . date('Y-m-d', $val['end_time']);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$val['plan_time'] = '-';
|
$val['plan_time'] = '-';
|
||||||
}
|
}
|
||||||
$val['status_name'] = \app\project\model\Project::$Status[(int) $val['status']];
|
$val['status_name'] = \app\project\model\Project::$Status[(int) $val['status']];
|
||||||
}
|
}
|
||||||
$res['data'] = $list;
|
$res['data'] = $list;
|
||||||
}
|
}
|
||||||
return table_assign(0, '', $res);
|
return table_assign(0, '', $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//首页任务
|
//首页任务
|
||||||
public function get_task_list()
|
public function get_task_list()
|
||||||
{
|
{
|
||||||
$prefix = get_config('database.connections.mysql.prefix');//判断是否安装了项目模块
|
$prefix = get_config('database.connections.mysql.prefix'); //判断是否安装了项目模块
|
||||||
$exist = Db::query('show tables like "'.$prefix.'project_task"');
|
$exist = Db::query('show tables like "' . $prefix . 'project_task"');
|
||||||
$res['data'] = [];
|
$res['data'] = [];
|
||||||
if($exist){
|
if ($exist) {
|
||||||
$where = array();
|
$where = array();
|
||||||
$whereOr = array();
|
$whereOr = array();
|
||||||
$map1 = [];
|
$map1 = [];
|
||||||
@ -115,77 +118,76 @@ class api extends BaseController
|
|||||||
$map1[] = ['admin_id', '=', $this->uid];
|
$map1[] = ['admin_id', '=', $this->uid];
|
||||||
$map2[] = ['director_uid', '=', $this->uid];
|
$map2[] = ['director_uid', '=', $this->uid];
|
||||||
$map3[] = ['', 'exp', Db::raw("FIND_IN_SET({$this->uid},assist_admin_ids)")];
|
$map3[] = ['', 'exp', Db::raw("FIND_IN_SET({$this->uid},assist_admin_ids)")];
|
||||||
if($this->isAuthProject($this->uid)==0){
|
if ($this->isAuthProject($this->uid) == 0) {
|
||||||
$whereOr =[$map1,$map2,$map3];
|
$whereOr = [$map1, $map2, $map3];
|
||||||
}
|
}
|
||||||
$where[] = ['delete_time', '=', 0];
|
$where[] = ['delete_time', '=', 0];
|
||||||
$list = Db::name('ProjectTask')
|
$list = Db::name('ProjectTask')
|
||||||
->where(function ($query) use ($whereOr) {
|
->where(function ($query) use ($whereOr) {
|
||||||
if (!empty($whereOr))
|
if (!empty($whereOr))
|
||||||
$query->whereOr($whereOr);
|
$query->whereOr($whereOr);
|
||||||
})
|
})
|
||||||
->where($where)
|
->where($where)
|
||||||
->withoutField('content,md_content')
|
->withoutField('content,md_content')
|
||||||
->order('flow_status asc')
|
->order('flow_status asc')
|
||||||
->order('id desc')
|
->order('id desc')
|
||||||
->limit(8)
|
->limit(8)
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
foreach ($list as $key => &$val) {
|
foreach ($list as $key => &$val) {
|
||||||
$val['director_name'] = Db::name('Admin')->where(['id' => $val['director_uid']])->value('name');
|
$val['director_name'] = Db::name('Admin')->where(['id' => $val['director_uid']])->value('name');
|
||||||
if($val['end_time']>0){
|
if ($val['end_time'] > 0) {
|
||||||
$val['end_time'] = date('Y-m-d', $val['end_time']);
|
$val['end_time'] = date('Y-m-d', $val['end_time']);
|
||||||
}
|
} else {
|
||||||
else{
|
$val['end_time'] = '-';
|
||||||
$val['end_time'] = '-';
|
|
||||||
}
|
|
||||||
$val['flow_name'] = \app\project\model\ProjectTask::$FlowStatus[(int) $val['flow_status']];
|
|
||||||
}
|
}
|
||||||
|
$val['flow_name'] = \app\project\model\ProjectTask::$FlowStatus[(int) $val['flow_status']];
|
||||||
|
}
|
||||||
$res['data'] = $list;
|
$res['data'] = $list;
|
||||||
}
|
}
|
||||||
return table_assign(0, '', $res);
|
return table_assign(0, '', $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取访问记录
|
//获取访问记录
|
||||||
public function get_view_data()
|
public function get_view_data()
|
||||||
{
|
{
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
$first_time = time();
|
$first_time = time();
|
||||||
$second_time = $first_time - 86400;
|
$second_time = $first_time - 86400;
|
||||||
$three_time = $first_time - 86400 * 365;
|
$three_time = $first_time - 86400 * 365;
|
||||||
$begin_first = strtotime(date('Y-m-d', $first_time) . " 00:00:00");
|
$begin_first = strtotime(date('Y-m-d', $first_time) . " 00:00:00");
|
||||||
$end_first = strtotime(date('Y-m-d', $first_time) . " 23:59:59");
|
$end_first = strtotime(date('Y-m-d', $first_time) . " 23:59:59");
|
||||||
$begin_second = strtotime(date('Y-m-d', $second_time) . " 00:00:00");
|
$begin_second = strtotime(date('Y-m-d', $second_time) . " 00:00:00");
|
||||||
$end_second = strtotime(date('Y-m-d', $second_time) . " 23:59:59");
|
$end_second = strtotime(date('Y-m-d', $second_time) . " 23:59:59");
|
||||||
$begin_three = strtotime(date('Y-m-d', $three_time) . " 00:00:00");
|
$begin_three = strtotime(date('Y-m-d', $three_time) . " 00:00:00");
|
||||||
$data_first = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_first,$end_first")->select();
|
$data_first = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_first,$end_first")->select();
|
||||||
$data_second = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_second,$end_second")->select();
|
$data_second = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_second,$end_second")->select();
|
||||||
$data_three = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_three,$end_first")->select();
|
$data_three = Db::name('AdminLog')->field('create_time')->whereBetween('create_time', "$begin_three,$end_first")->select();
|
||||||
return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three)]);
|
return to_assign(0, '', ['data_first' => hour_document($data_first), 'data_second' => hour_document($data_second), 'data_three' => date_document($data_three)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取员工活跃数据
|
//获取员工活跃数据
|
||||||
public function get_view_log()
|
public function get_view_log()
|
||||||
{
|
{
|
||||||
$times = strtotime("-30 day");
|
$times = strtotime("-30 day");
|
||||||
$where = [];
|
$where = [];
|
||||||
$where[] = ['uid','<>',1];
|
$where[] = ['uid', '<>', 1];
|
||||||
$where[] = ['create_time', '>', $times];
|
$where[] = ['create_time', '>', $times];
|
||||||
$list = Db::name('AdminLog')->field("id,uid")->where($where)->select();
|
$list = Db::name('AdminLog')->field("id,uid")->where($where)->select();
|
||||||
$logs = array();
|
$logs = array();
|
||||||
foreach ($list as $key => $value) {
|
foreach ($list as $key => $value) {
|
||||||
$uid = $value['uid'];
|
$uid = $value['uid'];
|
||||||
if (empty($logs[$uid])) {
|
if (empty($logs[$uid])) {
|
||||||
$logs[$uid]['count'] = 1;
|
$logs[$uid]['count'] = 1;
|
||||||
$logs[$uid]['name'] = Db::name('Admin')->where('id',$uid)->value('name');
|
$logs[$uid]['name'] = Db::name('Admin')->where('id', $uid)->value('name');
|
||||||
} else {
|
} else {
|
||||||
$logs[$uid]['count'] += 1;
|
$logs[$uid]['count'] += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$counts = array_column($logs, 'count');
|
$counts = array_column($logs, 'count');
|
||||||
array_multisort($counts, SORT_DESC, $logs);
|
array_multisort($counts, SORT_DESC, $logs);
|
||||||
//攫取前10
|
//攫取前10
|
||||||
$data_logs = array_slice($logs, 0, 10);
|
$data_logs = array_slice($logs, 0, 10);
|
||||||
return to_assign(0, '', ['data_logs' => $data_logs]);
|
return to_assign(0, '', ['data_logs' => $data_logs]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,6 @@
|
|||||||
<td class="info-td">执行时间限制</td>
|
<td class="info-td">执行时间限制</td>
|
||||||
<td>{:get_system_info('max_execution_time')}</td>
|
<td>{:get_system_info('max_execution_time')}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="info-td">勾股OA</td>
|
|
||||||
<td colspan="3">{:CMS_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px"
|
|
||||||
href="https://blog.gougucms.com/home/book/detail/bid/3.html" target="_blank">勾股OA文档</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info-td">ThinkPHP版本</td>
|
<td class="info-td">ThinkPHP版本</td>
|
||||||
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://doc.thinkphp.cn/v8_0/preface.html" target="_blank">TP8文档</a></td>
|
<td colspan="3">{$TP_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://doc.thinkphp.cn/v8_0/preface.html" target="_blank">TP8文档</a></td>
|
||||||
@ -32,26 +27,6 @@
|
|||||||
<td class="info-td">Layui版本</td>
|
<td class="info-td">Layui版本</td>
|
||||||
<td colspan="3">{:LAYUI_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://layui.dev/docs/2/" target="_blank">Layui文档</a></td>
|
<td colspan="3">{:LAYUI_VERSION}<a class="layui-badge layui-bg-blue" style="margin-left:8px" href="https://layui.dev/docs/2/" target="_blank">Layui文档</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="info-td">合作联系</td>
|
|
||||||
<td colspan="3"><i class="iconfont icon-weixin green"></i>微信号:hdm588,业务合作、功能定制请备注</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="info-td">QQ交流群</td>
|
|
||||||
<td colspan="3">搜Q群:24641076(满),46924914(满),295256660<br>或点击 <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=vb-Jdu0e-7iAAxbqGczDg1xFjxbdBsip&authKey=lwlNHAZiUOK2Rua5B14KhfwoYcvpQtHnlWMAJAbQRhfg3YQOUVIFEmfxpbhcCQw%2F&noverify=0&group_code=295256660" target="_blank" rel="nofollow"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="gougucms交流群" title="点击链接加入群聊【勾股开源交流群】" style="vertical-align:middle"></a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="info-td">同系列开源软件</td>
|
|
||||||
<td colspan="3"><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/gougucms" target="_blank">勾股CMS</a><a class="layui-badge layui-bg-blue" style="margin-right:8px" href="https://gitee.com/gouguopen/blog" target="_blank">勾股BLOG</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/dev" target="_blank" style="margin-right:8px">勾股DEV</a><a class="layui-badge layui-bg-blue" href="https://gitee.com/gouguopen/guoguadmin" target="_blank">勾股ADMIN</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4" style="text-align:center; color:#D2873D">🍗🍗 <strong>给作者加鸡腿 </strong>🍗🍗</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<img src="https://www.gougucms.com/static/home/images/zfb.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center /><img src="https://www.gougucms.com/static/home/images/wx.png" data-event="pay" style="width:50%; max-width:100%; cursor:pointer;" align=center />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -138,6 +138,10 @@ class ProjectTask extends Model
|
|||||||
$item['priority_name'] = self::$Priority[(int) $item['priority']];
|
$item['priority_name'] = self::$Priority[(int) $item['priority']];
|
||||||
$item['flow_name'] = self::$FlowStatus[(int) $item['flow_status']];
|
$item['flow_name'] = self::$FlowStatus[(int) $item['flow_status']];
|
||||||
$item['type_name'] = self::$Type[(int) $item['type']];
|
$item['type_name'] = self::$Type[(int) $item['type']];
|
||||||
|
$item['create_time'] = date('Y-m-d H:i:s',$item['create_time']);
|
||||||
|
if ($item['admin_id'] > 0) {
|
||||||
|
$item['admin_name'] = Db::name('Admin')->where(['id' => $item['admin_id']])->value('name');
|
||||||
|
}
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
return $list;
|
return $list;
|
||||||
|
@ -96,33 +96,35 @@
|
|||||||
}
|
}
|
||||||
, { field: 'cate_name', title: '工作类型', width: 90, align: 'center' }
|
, { field: 'cate_name', title: '工作类型', width: 90, align: 'center' }
|
||||||
,{
|
,{
|
||||||
field: 'title', title: '任务主题',minWidth:240, rowspan: 2, templet: function (d) {
|
field: 'title', title: '任务主题',minWidth:500, rowspan: 2, templet: function (d) {
|
||||||
var html = '<span class="layui-badge layui-bg-' + d.priority + '">' + d.priority_name + '</span> <a class="side-a" data-href="/project/task/view/id/' + d.id + '">' + d.title + '</a>';
|
var html = '<span class="layui-badge layui-bg-' + d.priority + '">' + d.priority_name + '</span> <a class="side-a" data-href="/project/task/view/id/' + d.id + '">' + d.title + '</a>';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, { field: 'before_task', title: '前置任务编号',align: 'center', width: 110, templet: function (d) {
|
// , { field: 'before_task', title: '前置任务编号',align: 'center', width: 110, templet: function (d) {
|
||||||
var html = '-';
|
// var html = '-';
|
||||||
if(d.before_task > 0){
|
// if(d.before_task > 0){
|
||||||
html = '<a class="side-a" data-href="/project/task/view/id/' + d.before_task + '">T' + d.before_task + '</a>';
|
// html = '<a class="side-a" data-href="/project/task/view/id/' + d.before_task + '">T' + d.before_task + '</a>';
|
||||||
}
|
// }
|
||||||
return html;
|
// return html;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
, { field: 'after_num', title: '后置任务数', align: 'center',width: 100, templet: function (d) {
|
// , { field: 'after_num', title: '后置任务数', align: 'center',width: 100, templet: function (d) {
|
||||||
var html = '-';
|
// var html = '-';
|
||||||
if(d.after_num > 0){
|
// if(d.after_num > 0){
|
||||||
html = '<a class="blue" lay-event="more" style="cursor:pointer;">'+d.after_num+'</a>';
|
// html = '<a class="blue" lay-event="more" style="cursor:pointer;">'+d.after_num+'</a>';
|
||||||
if(d.after_num == 1){
|
// if(d.after_num == 1){
|
||||||
html = ' <a class="side-a" data-href="/project/task/view/id/' + d.after_id + '">'+d.after_num+'</a>';
|
// html = ' <a class="side-a" data-href="/project/task/view/id/' + d.after_id + '">'+d.after_num+'</a>';
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return html;
|
// return html;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
, { field: 'project_name', title: '关联项目', width: 300 }
|
, { field: 'admin_name', title: '创建人',width: 100 }
|
||||||
|
, { field: 'create_time', title: '创建时间', width: 150}
|
||||||
|
, { field: 'project_name', title: '关联项目', width: 150 }
|
||||||
, { field: 'director_name', title: '负责人', align: 'center', width: 80 }
|
, { field: 'director_name', title: '负责人', align: 'center', width: 80 }
|
||||||
, { field: 'assist_admin_names', title: '协作人', width: 200 }
|
, { field: 'assist_admin_names', title: '协作人', width: 80 }
|
||||||
, { field: 'plan_hours', title: '预估工时', align: 'center', width: 80 }
|
, { field: 'plan_hours', title: '预估工时', align: 'center', width: 80 }
|
||||||
, {
|
, {
|
||||||
field: 'end_time', title: '计划完成日期', width: 150, templet: function (d) {
|
field: 'end_time', title: '计划完成日期', width: 150, templet: function (d) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user