fix: 分页查询
This commit is contained in:
@@ -77,7 +77,7 @@ class Contract extends Common
|
|||||||
{
|
{
|
||||||
$param = request()->post();
|
$param = request()->post();
|
||||||
|
|
||||||
$FirstLeveType = db('partner_company')->where('company_type & 0x01', 1)->field('company_id as id, company_name as name')->select();
|
$FirstLeveType = db('partner_company')->where('company_type & 0x01', 1)->field('company_id as id, company_name as name')->order('company_name asc')->select();
|
||||||
|
|
||||||
for ($i = 0; $i < count($FirstLeveType); $i++)
|
for ($i = 0; $i < count($FirstLeveType); $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ class Partner extends Common
|
|||||||
//查找所有的签约客户公司
|
//查找所有的签约客户公司
|
||||||
$result = db('partner_company')->where('company_type & 0x01', 1)
|
$result = db('partner_company')->where('company_type & 0x01', 1)
|
||||||
->field('company_id as id, company_name as name')
|
->field('company_id as id, company_name as name')
|
||||||
|
->order('company_name asc')
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
for ($i=0; $i<count($result); $i++)
|
for ($i=0; $i<count($result); $i++)
|
||||||
@@ -271,6 +272,7 @@ class Partner extends Common
|
|||||||
//查找所有的业主公司
|
//查找所有的业主公司
|
||||||
$OwnerList = db('partner_company')->where('company_type & 0x02', 2)
|
$OwnerList = db('partner_company')->where('company_type & 0x02', 2)
|
||||||
->field('company_id as id, company_name as name')
|
->field('company_id as id, company_name as name')
|
||||||
|
->order('company_name asc')
|
||||||
->select();
|
->select();
|
||||||
$ret = [];
|
$ret = [];
|
||||||
$item = [];
|
$item = [];
|
||||||
|
|||||||
@@ -293,10 +293,10 @@ class Work extends Common
|
|||||||
if (1 == $user_info['user_role'])
|
if (1 == $user_info['user_role'])
|
||||||
{
|
{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
if($param['task_processor'] != ''){
|
if(isset($param['task_processor']) && $param['task_processor'] != ''){
|
||||||
$where['s.task_processor'] = $param['task_processor'];
|
$where['s.task_processor'] = $param['task_processor'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -318,7 +318,7 @@ class Work extends Common
|
|||||||
return $this->sendSuccess($ret);
|
return $this->sendSuccess($ret);
|
||||||
}else{
|
}else{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -445,7 +445,7 @@ class Work extends Common
|
|||||||
if (1 == $user_info['user_role'])
|
if (1 == $user_info['user_role'])
|
||||||
{
|
{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -468,7 +468,7 @@ class Work extends Common
|
|||||||
return $this->sendSuccess($ret);
|
return $this->sendSuccess($ret);
|
||||||
}else{
|
}else{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -572,7 +572,7 @@ class Work extends Common
|
|||||||
if (1 == $user_info['user_role'])
|
if (1 == $user_info['user_role'])
|
||||||
{
|
{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -586,7 +586,7 @@ class Work extends Common
|
|||||||
return $ret;
|
return $ret;
|
||||||
}else{
|
}else{
|
||||||
$where = [];
|
$where = [];
|
||||||
if($param['task_state'] != ''){
|
if(isset($param['task_state']) && $param['task_state'] != ''){
|
||||||
$where['s.task_state'] = $param['task_state'];
|
$where['s.task_state'] = $param['task_state'];
|
||||||
}
|
}
|
||||||
$ret = db('work_task_info')->alias('s')
|
$ret = db('work_task_info')->alias('s')
|
||||||
@@ -824,4 +824,283 @@ class Work extends Common
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取内部客户参与的项目 - 分页版本
|
||||||
|
public function GetWorkInfoByLoginIdPaginated()
|
||||||
|
{
|
||||||
|
$param = request()->post();
|
||||||
|
$user_id = $param['user_id'];
|
||||||
|
$currPage = isset($param['currPage']) ? $param['currPage'] : 1;
|
||||||
|
$pageSize = isset($param['pageSize']) ? $param['pageSize'] : 10;
|
||||||
|
|
||||||
|
$user = new User();
|
||||||
|
$project_work = $this->GetProjectListPaginated($user_id, $currPage, $pageSize);
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($project_work['list']); $i++) {
|
||||||
|
$involve_manager = $project_work['list'][$i]['involve_manager'];
|
||||||
|
$info = $user->GetUserInfoByLoginId($involve_manager);
|
||||||
|
if ($info && isset($info['name'])) {
|
||||||
|
$project_work['list'][$i]['issue_creator_name'] = $info['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$res['list'] = $project_work['list'];
|
||||||
|
$res['total'] = $project_work['total'];
|
||||||
|
return $this->sendSuccess($res);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取参与的客户项目列表 - 分页版本
|
||||||
|
public function GetProjectListPaginated($user_id, $currPage, $pageSize)
|
||||||
|
{
|
||||||
|
//判断登录用户的角色,如果是管理员,就获取所有的项目信息
|
||||||
|
$user_info = db('system_user')->where('id', $user_id)->find();
|
||||||
|
|
||||||
|
$query = db('project_info')->alias('p')
|
||||||
|
->join('project_state s', 's.id =p.project_state', 'left')
|
||||||
|
->where('p.project_state', '<', 10) //未关闭的项目
|
||||||
|
->field('p.*, s.desp as project_state_name,1 as project_types');
|
||||||
|
|
||||||
|
if (1 != $user_info['user_role']) {
|
||||||
|
$query->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('p.involve_manager', $user_id)
|
||||||
|
->whereor('p.involve_members', 'like', $user_id . ',%')
|
||||||
|
->whereor('p.involve_members', 'like', '%,' . $user_id . ',%')
|
||||||
|
->whereor('p.involve_members', 'like', $user_id . '')
|
||||||
|
->whereor('p.involve_members', 'like', '%,' . $user_id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取分页数据
|
||||||
|
$ret = $query->page($currPage, $pageSize)->select();
|
||||||
|
|
||||||
|
// 获取总数
|
||||||
|
$totalQuery = db('project_info')->alias('p')
|
||||||
|
->join('project_state s', 's.id =p.project_state', 'left')
|
||||||
|
->where('p.project_state', '<', 10);
|
||||||
|
|
||||||
|
if (1 != $user_info['user_role']) {
|
||||||
|
$totalQuery->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('p.involve_manager', $user_id)
|
||||||
|
->whereor('p.involve_members', 'like', $user_id . ',%')
|
||||||
|
->whereor('p.involve_members', 'like', '%,' . $user_id . ',%')
|
||||||
|
->whereor('p.involve_members', 'like', $user_id . '')
|
||||||
|
->whereor('p.involve_members', 'like', '%,' . $user_id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$total = $totalQuery->count();
|
||||||
|
|
||||||
|
//统计每个项目与登录用户有关的任务数
|
||||||
|
for ($i = 0; $i < count($ret); $i++) {
|
||||||
|
$ret[$i]['issue_count'] = $this->GetProjectIssueCount($user_id, $ret[$i]['project_id']);
|
||||||
|
$ret[$i]['task_count'] = $this->GetProjectTaskCount($user_id, $ret[$i]['project_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'list' => $ret,
|
||||||
|
'total' => $total
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取项目问题列表 - 分页版本
|
||||||
|
public function GetProjectIssueListPaginated()
|
||||||
|
{
|
||||||
|
$param = request()->post();
|
||||||
|
$user = new User();
|
||||||
|
$user_id = $param['user_id'];
|
||||||
|
$project_id = $param['project_id'];
|
||||||
|
$issue_state = $param['issue_state'];
|
||||||
|
$currPage = isset($param['currPage']) ? $param['currPage'] : 1;
|
||||||
|
$pageSize = isset($param['pageSize']) ? $param['pageSize'] : 10;
|
||||||
|
|
||||||
|
$user_info = db('system_user')->where('id', $user_id)->find();
|
||||||
|
|
||||||
|
if (1 == $user_info['user_role']) {
|
||||||
|
$where = [];
|
||||||
|
if ($issue_state == 1) {
|
||||||
|
$where['s.issue_state'] = array('<', 10); //未关闭
|
||||||
|
} else if ($issue_state == 2) {
|
||||||
|
$where['s.issue_state'] = array('>', 10);//已关闭
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取分页数据
|
||||||
|
$query = db('project_issues')->alias('s')
|
||||||
|
->join('project_info i', 'i.project_id =s.project_id', 'left')
|
||||||
|
->join('project_issue_state t', 't.id =s.issue_state', 'left')
|
||||||
|
->where('s.project_id', $project_id)
|
||||||
|
->where($where)
|
||||||
|
->field('s.*, i.project_name, i.project_number, t.desp as issue_state_name, i.involve_manager,1 as project_types');
|
||||||
|
|
||||||
|
$ret = $query->page($currPage, $pageSize)->select();
|
||||||
|
|
||||||
|
// 获取总数
|
||||||
|
$total = db('project_issues')->alias('s')
|
||||||
|
->join('project_info i', 'i.project_id =s.project_id', 'left')
|
||||||
|
->join('project_issue_state t', 't.id =s.issue_state', 'left')
|
||||||
|
->where('s.project_id', $project_id)
|
||||||
|
->where($where)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($ret); $i++) {
|
||||||
|
$info = $user->GetUserInfoByLoginId($ret[$i]['issue_processor']);
|
||||||
|
if ($info != "") {
|
||||||
|
$ret[$i]['issue_processor_name'] = $info['name'];
|
||||||
|
} else {
|
||||||
|
$ret[$i]['issue_processor_name'] = '-';
|
||||||
|
}
|
||||||
|
$info = $user->GetUserInfoByLoginId($ret[$i]['issue_creator']);
|
||||||
|
$ret[$i]['issue_creator_name'] = $info['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$res['list'] = $ret;
|
||||||
|
$res['total'] = $total;
|
||||||
|
return $this->sendSuccess($res);
|
||||||
|
} else {
|
||||||
|
$where = [];
|
||||||
|
if ($issue_state == 1) {
|
||||||
|
$where['s.issue_state'] = array('<', 10); //未关闭
|
||||||
|
} else if ($issue_state == 2) {
|
||||||
|
$where['s.issue_state'] = array('>', 10);//已关闭
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取分页数据
|
||||||
|
$query = db('project_issues')->alias('s')
|
||||||
|
->join('project_info i', 'i.project_id =s.project_id', 'left')
|
||||||
|
->join('project_issue_state t', 't.id =s.issue_state', 'left')
|
||||||
|
->where('s.project_id', $project_id)
|
||||||
|
->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('s.issue_processor', $user_id)
|
||||||
|
->whereor('s.issue_creator', $user_id)
|
||||||
|
->whereor('i.involve_manager', $user_id);
|
||||||
|
})
|
||||||
|
->where($where)
|
||||||
|
->field('s.*, i.project_name, i.project_number, t.desp as issue_state_name, i.involve_manager,1 as project_types');
|
||||||
|
|
||||||
|
$ret = $query->page($currPage, $pageSize)->select();
|
||||||
|
|
||||||
|
// 获取总数
|
||||||
|
$total = db('project_issues')->alias('s')
|
||||||
|
->join('project_info i', 'i.project_id =s.project_id', 'left')
|
||||||
|
->join('project_issue_state t', 't.id =s.issue_state', 'left')
|
||||||
|
->where('s.project_id', $project_id)
|
||||||
|
->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('s.issue_processor', $user_id)
|
||||||
|
->whereor('s.issue_creator', $user_id)
|
||||||
|
->whereor('i.involve_manager', $user_id);
|
||||||
|
})
|
||||||
|
->where($where)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
for ($i = 0; $i < count($ret); $i++) {
|
||||||
|
$info = $user->GetUserInfoByLoginId($ret[$i]['issue_processor']);
|
||||||
|
if ($info != "") {
|
||||||
|
$ret[$i]['issue_processor_name'] = $info['name'];
|
||||||
|
} else {
|
||||||
|
$ret[$i]['issue_processor_name'] = '-';
|
||||||
|
}
|
||||||
|
$info = $user->GetUserInfoByLoginId($ret[$i]['issue_creator']);
|
||||||
|
$ret[$i]['issue_creator_name'] = $info['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$res['list'] = $ret;
|
||||||
|
$res['total'] = $total;
|
||||||
|
return $this->sendSuccess($res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取运营Story列表 - 分页版本
|
||||||
|
public function GetOperationStoryListPaginated()
|
||||||
|
{
|
||||||
|
$param = request()->post();
|
||||||
|
$user = new User();
|
||||||
|
$user_id = $param['user_id'];
|
||||||
|
$currPage = isset($param['currPage']) ? $param['currPage'] : 1;
|
||||||
|
$pageSize = isset($param['pageSize']) ? $param['pageSize'] : 10;
|
||||||
|
|
||||||
|
$user_info = db('system_user')->where('id', $user_id)->find();
|
||||||
|
|
||||||
|
if (1 == $user_info['user_role']) {
|
||||||
|
$where = [];
|
||||||
|
if(isset($param['story_state']) && $param['story_state'] != ''){
|
||||||
|
$where['y.story_state'] = $param['story_state'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取分页数据
|
||||||
|
$query = db('work_story_info')->alias('y')
|
||||||
|
->join('work_story_state p', 'p.id =y.story_state', 'left')
|
||||||
|
->where('y.story_type', 2)
|
||||||
|
->where('y.story_state', '<', 4) //未完成的Story
|
||||||
|
->where($where)
|
||||||
|
->field('y.*, p.desp as story_state_desp');
|
||||||
|
|
||||||
|
$ret = $query->page($currPage, $pageSize)->select();
|
||||||
|
|
||||||
|
// 获取总数
|
||||||
|
$total = db('work_story_info')->alias('y')
|
||||||
|
->join('work_story_state p', 'p.id =y.story_state', 'left')
|
||||||
|
->where('y.story_type', 2)
|
||||||
|
->where('y.story_state', '<', 4)
|
||||||
|
->where($where)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
for ($i=0; $i<count($ret); $i++) {
|
||||||
|
//根据登录账号获取Story管理员用户姓名
|
||||||
|
$user_info = $user->GetUserInfoByLoginId($ret[$i]['story_manager']);
|
||||||
|
$ret[$i]['story_manager_name'] = $user_info['name'];
|
||||||
|
$ret[$i]['story_tasks'] = $this->GetOperationTaskCount($user_id,$ret[$i]['story_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$res['list'] = $ret;
|
||||||
|
$res['total'] = $total;
|
||||||
|
return $this->sendSuccess($res);
|
||||||
|
} else {
|
||||||
|
$where = [];
|
||||||
|
if(isset($param['story_state']) && $param['story_state'] != ''){
|
||||||
|
$where['y.story_state'] = $param['story_state'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取分页数据
|
||||||
|
$query = db('work_story_info')->alias('y')
|
||||||
|
->join('work_story_state p', 'p.id =y.story_state', 'left')
|
||||||
|
->where('y.story_type', 2)
|
||||||
|
->where('y.story_state', '<', 4) //未完成的Story
|
||||||
|
->where($where)
|
||||||
|
->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('y.story_manager', $user_id)
|
||||||
|
->whereor('y.story_member', 'like', $user_id . ',%')
|
||||||
|
->whereor('y.story_member', 'like', '%,' . $user_id . ',%')
|
||||||
|
->whereor('y.story_member', $user_id)
|
||||||
|
->whereor('y.story_member', 'like', '%,' . $user_id);
|
||||||
|
})
|
||||||
|
->field('y.*, p.desp as story_state_desp');
|
||||||
|
|
||||||
|
$ret = $query->page($currPage, $pageSize)->select();
|
||||||
|
|
||||||
|
// 获取总数
|
||||||
|
$total = db('work_story_info')->alias('y')
|
||||||
|
->join('work_story_state p', 'p.id =y.story_state', 'left')
|
||||||
|
->where('y.story_type', 2)
|
||||||
|
->where('y.story_state', '<', 4)
|
||||||
|
->where($where)
|
||||||
|
->where(function ($query) use ($user_id) {
|
||||||
|
$query->where('y.story_manager', $user_id)
|
||||||
|
->whereor('y.story_member', 'like', $user_id . ',%')
|
||||||
|
->whereor('y.story_member', 'like', '%,' . $user_id . ',%')
|
||||||
|
->whereor('y.story_member', $user_id)
|
||||||
|
->whereor('y.story_member', 'like', '%,' . $user_id);
|
||||||
|
})
|
||||||
|
->count();
|
||||||
|
|
||||||
|
for ($i=0; $i<count($ret); $i++) {
|
||||||
|
//根据登录账号获取Story管理员用户姓名
|
||||||
|
$user_info = $user->GetUserInfoByLoginId($ret[$i]['story_manager']);
|
||||||
|
$ret[$i]['story_manager_name'] = $user_info['name'];
|
||||||
|
$ret[$i]['story_tasks'] = $this->GetOperationTaskCount($user_id,$ret[$i]['story_id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$res['list'] = $ret;
|
||||||
|
$res['total'] = $total;
|
||||||
|
return $this->sendSuccess($res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取项目类型列表 - 分页版本
|
||||||
|
GetWorkInfoByLoginIdPaginated(param) {
|
||||||
|
return request({
|
||||||
|
url: `/work/GetWorkInfoByLoginIdPaginated`,
|
||||||
|
method: "post",
|
||||||
|
data: param
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
GetDevelopIssueList(param) {
|
GetDevelopIssueList(param) {
|
||||||
return request({
|
return request({
|
||||||
url: `/work/GetDevelopIssueList`,
|
url: `/work/GetDevelopIssueList`,
|
||||||
@@ -26,6 +35,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取项目问题列表 - 分页版本
|
||||||
|
GetProjectIssueListPaginated(param) {
|
||||||
|
return request({
|
||||||
|
url: `/work/GetProjectIssueListPaginated`,
|
||||||
|
method: "post",
|
||||||
|
data: param
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
GetProjectTaskList(param) {
|
GetProjectTaskList(param) {
|
||||||
return request({
|
return request({
|
||||||
url: `/work/GetProjectTaskList`,
|
url: `/work/GetProjectTaskList`,
|
||||||
@@ -50,6 +68,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取运营Story列表 - 分页版本
|
||||||
|
GetOperationStoryListPaginated(param) {
|
||||||
|
return request({
|
||||||
|
url: `/work/GetOperationStoryListPaginated`,
|
||||||
|
method: "post",
|
||||||
|
data: param
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
GetProjectDevelopProcessor(param) {
|
GetProjectDevelopProcessor(param) {
|
||||||
return request({
|
return request({
|
||||||
url: `/work/GetProjectDevelopProcessor`,
|
url: `/work/GetProjectDevelopProcessor`,
|
||||||
|
|||||||
@@ -132,13 +132,35 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination v-show="work_info_total > 0" :total="work_info_total" :page.sync="work_info_pageNum" :limit.sync="work_info_pageSize"
|
||||||
|
@pagination="get_work_info_list" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>我参与的工作</span>
|
<span>我参与的工作</span>
|
||||||
<WorkStoryList :project_id="project_id" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-table :data="work_story_list" border fit highlight-current-row style="width: 100%; margin-left: 2px;">
|
||||||
|
<el-table-column prop="story_intro" label="Story描述" align="left" width="300">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="story_manager_name" label="Story管理员" align="left" width="200">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="story_state_desp" label="Story状态" align="left" width="200">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划处理时间" align="left">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.create_time }}~{{ scope.row.plan_close_time }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="Task信息" align="left">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.story_tasks }}
|
||||||
|
<el-button class="el-icon-view" @click="showWorkTask(scope.row.story_id)" type="text"></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="work_story_total > 0" :total="work_story_total" :page.sync="work_story_pageNum" :limit.sync="work_story_pageSize"
|
||||||
|
@pagination="get_work_story_list" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 分配责任人对话框 -->
|
<!-- 分配责任人对话框 -->
|
||||||
@@ -193,6 +215,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="工作任务列表" v-if="update_view == false" :visible.sync="dialogVisibleShowWorkTask"
|
||||||
|
:close-on-click-modal="false" width="95%" style="position: fixed;top:-10%" append-to-body>
|
||||||
|
<div class="custom-dialog">
|
||||||
|
<WorkTaskList :story_id="story_id" />
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -203,6 +232,7 @@ import notice from '@/api/notice'
|
|||||||
import ProjectIssueList from './projectissuelist.vue'
|
import ProjectIssueList from './projectissuelist.vue'
|
||||||
import ProjectTaskList from './projecttasklist.vue'
|
import ProjectTaskList from './projecttasklist.vue'
|
||||||
import WorkStoryList from './workstorylist.vue'
|
import WorkStoryList from './workstorylist.vue'
|
||||||
|
import WorkTaskList from './worktasklist.vue'
|
||||||
import ProjectDetail from '@/views/components/ProjectDetail.vue'
|
import ProjectDetail from '@/views/components/ProjectDetail.vue'
|
||||||
import project from '@/api/project'
|
import project from '@/api/project'
|
||||||
import develop from '@/api/develop'
|
import develop from '@/api/develop'
|
||||||
@@ -214,12 +244,20 @@ export default {
|
|||||||
ProjectIssueList,
|
ProjectIssueList,
|
||||||
ProjectTaskList,
|
ProjectTaskList,
|
||||||
WorkStoryList,
|
WorkStoryList,
|
||||||
|
WorkTaskList,
|
||||||
ProjectDetail
|
ProjectDetail
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
work_info_list: [],
|
work_info_list: [],
|
||||||
|
work_info_total: 0,
|
||||||
|
work_info_pageNum: 1,
|
||||||
|
work_info_pageSize: 10,
|
||||||
|
work_story_list: [],
|
||||||
|
work_story_total: 0,
|
||||||
|
work_story_pageNum: 1,
|
||||||
|
work_story_pageSize: 10,
|
||||||
dialogVisibleShowProjectIssueList: false,
|
dialogVisibleShowProjectIssueList: false,
|
||||||
dialogVisibleShowProjectTaskList: false,
|
dialogVisibleShowProjectTaskList: false,
|
||||||
dialogVisibleUpdateProcessorType: false,
|
dialogVisibleUpdateProcessorType: false,
|
||||||
@@ -227,6 +265,8 @@ export default {
|
|||||||
dialogVisibleAddMember: false,
|
dialogVisibleAddMember: false,
|
||||||
dialogVisibleShowLog: false,
|
dialogVisibleShowLog: false,
|
||||||
dialogVisibleShowProjectDetail: false,
|
dialogVisibleShowProjectDetail: false,
|
||||||
|
dialogVisibleShowWorkTask: false,
|
||||||
|
story_id: 0,
|
||||||
project_id: 0,
|
project_id: 0,
|
||||||
update_view: false,
|
update_view: false,
|
||||||
issue_list: [],
|
issue_list: [],
|
||||||
@@ -285,6 +325,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.get_work_info_list()
|
this.get_work_info_list()
|
||||||
|
this.get_work_story_list()
|
||||||
this.get_issue_type_list()
|
this.get_issue_type_list()
|
||||||
this.handleSelectChange(this.selectedIssueTypeId)
|
this.handleSelectChange(this.selectedIssueTypeId)
|
||||||
},
|
},
|
||||||
@@ -556,13 +597,35 @@ export default {
|
|||||||
},
|
},
|
||||||
get_work_info_list() {
|
get_work_info_list() {
|
||||||
var param = {
|
var param = {
|
||||||
user_id: localStorage.getItem('user_id')
|
user_id: localStorage.getItem('user_id'),
|
||||||
|
currPage: this.work_info_pageNum,
|
||||||
|
pageSize: this.work_info_pageSize
|
||||||
}
|
}
|
||||||
work.GetWorkInfoByLoginId(param).then(res => {
|
work.GetWorkInfoByLoginIdPaginated(param).then(res => {
|
||||||
this.work_info_list = res.data.data
|
this.work_info_list = res.data.data.list
|
||||||
|
this.work_info_total = res.data.data.total
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
get_work_story_list() {
|
||||||
|
var param = {
|
||||||
|
user_id: localStorage.getItem('user_id'),
|
||||||
|
currPage: this.work_story_pageNum,
|
||||||
|
pageSize: this.work_story_pageSize
|
||||||
|
}
|
||||||
|
work.GetOperationStoryListPaginated(param).then(res => {
|
||||||
|
this.work_story_list = res.data.data.list
|
||||||
|
this.work_story_total = res.data.data.total
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
showWorkTask(storyId) {
|
||||||
|
this.story_id = storyId
|
||||||
|
this.dialogVisibleShowWorkTask = true
|
||||||
|
this.update_sub_component()
|
||||||
|
},
|
||||||
|
|
||||||
showIssueList(project) {
|
showIssueList(project) {
|
||||||
this.project_id = project.project_id
|
this.project_id = project.project_id
|
||||||
//客户项目
|
//客户项目
|
||||||
|
|||||||
Reference in New Issue
Block a user