Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -25,5 +25,22 @@ namespace Ewide.Application
|
||||
|
||||
[Comment("状态")]
|
||||
public HouseLogStatus Status { get; set; }
|
||||
|
||||
[Comment("备注信息")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
[Comment("完成时间")]
|
||||
public DateTime? FinishedTime { get; set; }
|
||||
|
||||
[Comment("完成者Id")]
|
||||
[MaxLength(36)]
|
||||
public string FinishedUserId { get; set; }
|
||||
|
||||
[Comment("完成者名称")]
|
||||
[MaxLength(20)]
|
||||
public string FinishedUserName { get; set; }
|
||||
|
||||
[Comment("排序")]
|
||||
public int Sort { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,6 +261,6 @@ namespace Ewide.Application
|
||||
/// 是否有效
|
||||
/// </summary>
|
||||
[Comment("是否有效")]
|
||||
public bool IsEnabled { get; set; }
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace Ewide.Application.Service.HouseCode
|
||||
await houseCode.InsertAsync();
|
||||
|
||||
// 添加到流转日志
|
||||
await _houseLogService.AddThenDone(id, _userManager.User, HouseLogType.CreateCode);
|
||||
await _houseLogService.Add(id, _userManager.User, HouseLogType.SelectMember);
|
||||
var sort = await _houseLogService.AddThenDone(id, _userManager.User, HouseLogType.CreateCode);
|
||||
sort = await _houseLogService.Add(id, _userManager.User, HouseLogType.SelectMember, sort: sort);
|
||||
}
|
||||
|
||||
[HttpPost("/houseCode/edit")]
|
||||
|
||||
@@ -132,6 +132,7 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task InputDataProcess(HouseInfoInputSave input,DataStatus dataStatus = DataStatus.Init)
|
||||
{
|
||||
//房屋编码地址/坐标单独更新
|
||||
@@ -142,13 +143,14 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
var houseEntity = await _houseInfoRep.DetachedEntities.FirstOrDefaultAsync(h => h.HouseCodeId == input.houseCode.Id);
|
||||
|
||||
//建档审核通过的房屋数据修改时,对应的建档任务Task不处理
|
||||
var houseTask = input.PatrolInfo.Adapt<BsHouseTask>();
|
||||
var houseTask = await _houseTaskRep.DetachedEntities.FirstOrDefaultAsync(p => p.Id == input.PatrolInfo.Id);
|
||||
if (houseEntity == null || houseEntity.State != 6)
|
||||
{
|
||||
houseTask.HouseCodeId = input.houseCode.Id;
|
||||
var _houseTask = input.PatrolInfo.Adapt<BsHouseTask>();
|
||||
_houseTask.HouseCodeId = input.houseCode.Id;
|
||||
//任务没有暂存状态,其他状态与HouseInfo的State一致
|
||||
houseTask.Status = dataStatus == DataStatus.TempSaved ? (int)DataStatus.Saved : (int)dataStatus;
|
||||
await houseTask.UpdateExcludeAsync(new string[] { nameof(BsHouseTask.TaskType) }, ignoreNullValues: true);
|
||||
_houseTask.Status = dataStatus == DataStatus.TempSaved ? (int)DataStatus.Saved : (int)dataStatus;
|
||||
await _houseTask.UpdateExcludeAsync(new string[] { nameof(BsHouseTask.TaskType) }, ignoreNullValues: true);
|
||||
}
|
||||
//判断房屋建档状态
|
||||
//dataStatus == DataStatus.Saved 若是保存操作 则判断是新增/更新
|
||||
@@ -168,7 +170,9 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
await houseInfo.UpdateExcludeAsync(new[] { nameof(BsHouseInfo.HouseGrade) }, true);
|
||||
}
|
||||
|
||||
if(dataStatus == DataStatus.Submited)
|
||||
int? logSort = null;
|
||||
|
||||
if (dataStatus == DataStatus.Submited)
|
||||
{
|
||||
await _houseLogService.Done(input.houseCode.Id);
|
||||
|
||||
@@ -184,7 +188,7 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
where e.OrgId == org.Id && r.Code == Enum.GetName(HouseManagerRole.ZoneManager).ToUnderScoreCase()
|
||||
select u).ToListAsync();
|
||||
|
||||
await _houseLogService.Add(input.houseCode.Id, zoneManagerList, HouseLogType.Check);
|
||||
logSort = await _houseLogService.Add(input.houseCode.Id, zoneManagerList, HouseLogType.Check);
|
||||
}
|
||||
//审核操作则新增一条审核记录
|
||||
if (dataStatus == DataStatus.Back || dataStatus == DataStatus.Passed)
|
||||
@@ -192,11 +196,11 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
var checkRecord = input.TaskCheckRecord.Adapt<BsHouseTaskCheckRecord>();
|
||||
await checkRecord.InsertAsync();
|
||||
await _houseLogService.Done(input.houseCode.Id);
|
||||
await _houseLogService.AddThenDone(input.houseCode.Id, _userManager.User, dataStatus == DataStatus.Passed ? HouseLogType.Agree : HouseLogType.Disagree);
|
||||
logSort = await _houseLogService.AddThenDone(input.houseCode.Id, _userManager.User, dataStatus == DataStatus.Passed ? HouseLogType.Agree : HouseLogType.Disagree, remark: checkRecord.Content, sort: logSort);
|
||||
if (dataStatus == DataStatus.Back)
|
||||
{
|
||||
var user = await _sysUserRep.DetachedEntities.FirstOrDefaultAsync(p => p.Id.Equals(houseTask.UserID));
|
||||
await _houseLogService.Add(input.houseCode.Id, user, HouseLogType.CreateInfo);
|
||||
logSort = await _houseLogService.Add(input.houseCode.Id, user, HouseLogType.CreateInfo, sort: logSort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ namespace Ewide.Application
|
||||
{
|
||||
public class HouseLogOutput
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string TargetUserNames { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int Status { get; set; }
|
||||
public DateTime CreatedTime { get; set; }
|
||||
public DateTime? UpdatedTimeg { get; set; }
|
||||
public string CreatedUserName { get; set; }
|
||||
public string UpdatedUserName { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public DateTime? FinishedTime { get; set; }
|
||||
public string FinishedUserId { get; set; }
|
||||
public string FinishedUserName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,33 +22,45 @@ namespace Ewide.Application.Service
|
||||
{
|
||||
private readonly IDapperRepository _dapperRep;
|
||||
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
private readonly IRepository<BsHouseLog> _bsHouseLogRep;
|
||||
|
||||
public HouseLogService(IDapperRepository dapperRep, IRepository<BsHouseLog> bsHouseLogRep)
|
||||
public HouseLogService(IDapperRepository dapperRep, IUserManager userManager, IRepository<BsHouseLog> bsHouseLogRep)
|
||||
{
|
||||
_dapperRep = dapperRep;
|
||||
_userManager = userManager;
|
||||
_bsHouseLogRep = bsHouseLogRep;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task Add(string houseCodeId, SysUser targetUser, HouseLogType type)
|
||||
public async Task<int> Add(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
await Add(houseCodeId, new List<SysUser> { targetUser }, type);
|
||||
return await Add(houseCodeId, new List<SysUser> { targetUser }, type, remark, sort);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task Add(string houseCodeId, List<SysUser> targetUsers, HouseLogType type)
|
||||
public async Task<int> Add(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
if (!sort.HasValue)
|
||||
{
|
||||
sort = await _bsHouseLogRep.DetachedEntities.Where(p => p.HouseCodeId.Equals(houseCodeId)).MaxAsync(p => p.Sort);
|
||||
}
|
||||
var _sort = sort.GetValueOrDefault(1) + 1;
|
||||
await new BsHouseLog
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
HouseCodeId = houseCodeId,
|
||||
TargetUserIds = String.Join(",", targetUsers.Select(p => p.Id)),
|
||||
Type = type,
|
||||
Status = HouseLogStatus.Handle
|
||||
Status = HouseLogStatus.Handle,
|
||||
Remark = remark,
|
||||
Sort = _sort
|
||||
}.InsertAsync();
|
||||
|
||||
return _sort;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
@@ -77,57 +89,88 @@ namespace Ewide.Application.Service
|
||||
if (log != null)
|
||||
{
|
||||
log.Status = HouseLogStatus.Handled;
|
||||
log.FinishedTime = DateTime.Now;
|
||||
log.FinishedUserId = _userManager.UserId;
|
||||
log.FinishedUserName = _userManager.User.Account;
|
||||
await log.UpdateAsync();
|
||||
}
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task AddThenRead(string houseCodeId, SysUser targetUser, HouseLogType type)
|
||||
public async Task<int> AddThenRead(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
await AddThenRead(houseCodeId, new List<SysUser> { targetUser }, type);
|
||||
return await AddThenRead(houseCodeId, new List<SysUser> { targetUser }, type, remark, sort);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task AddThenRead(string houseCodeId, List<SysUser> targetUsers, HouseLogType type)
|
||||
public async Task<int> AddThenRead(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
if (!sort.HasValue)
|
||||
{
|
||||
sort = await _bsHouseLogRep.DetachedEntities.Where(p => p.HouseCodeId.Equals(houseCodeId)).MaxAsync(p => p.Sort);
|
||||
}
|
||||
var _sort = sort.GetValueOrDefault(1) + 1;
|
||||
await new BsHouseLog
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
HouseCodeId = houseCodeId,
|
||||
TargetUserIds = String.Join(",", targetUsers.Select(p => p.Id)),
|
||||
Type = type,
|
||||
Status = HouseLogStatus.Handling
|
||||
Status = HouseLogStatus.Handling,
|
||||
Remark = remark,
|
||||
Sort = _sort
|
||||
}.InsertAsync();
|
||||
|
||||
return _sort;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task AddThenDone(string houseCodeId, SysUser targetUser, HouseLogType type)
|
||||
public async Task<int> AddThenDone(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
await AddThenDone(houseCodeId, new List<SysUser> { targetUser }, type);
|
||||
return await AddThenDone(houseCodeId, new List<SysUser> { targetUser }, type, remark, sort);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[UnitOfWork]
|
||||
public async Task AddThenDone(string houseCodeId, List<SysUser> targetUsers, HouseLogType type)
|
||||
public async Task<int> AddThenDone(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null)
|
||||
{
|
||||
if (!sort.HasValue)
|
||||
{
|
||||
sort = await _bsHouseLogRep.DetachedEntities.Where(p => p.HouseCodeId.Equals(houseCodeId)).MaxAsync(p => p.Sort);
|
||||
}
|
||||
var _sort = sort.GetValueOrDefault(1) + 1;
|
||||
await new BsHouseLog
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
HouseCodeId = houseCodeId,
|
||||
TargetUserIds = String.Join(",", targetUsers.Select(p => p.Id)),
|
||||
Type = type,
|
||||
Status = HouseLogStatus.Handled
|
||||
Status = HouseLogStatus.Handled,
|
||||
Remark = remark,
|
||||
FinishedTime = DateTime.Now,
|
||||
FinishedUserId = _userManager.UserId,
|
||||
FinishedUserName = _userManager.User.Account,
|
||||
Sort = _sort
|
||||
}.InsertAsync();
|
||||
|
||||
return _sort;
|
||||
}
|
||||
|
||||
[HttpGet("/houseLog/list")]
|
||||
public async Task<dynamic> List([FromQuery] HouseLogInput input)
|
||||
{
|
||||
var sql = @"SELECT *,
|
||||
(SELECT GROUP_CONCAT(`Name`) FROM sys_user
|
||||
var sql = @"SELECT
|
||||
HL.Id,
|
||||
HL.Type,
|
||||
HL.`Status`,
|
||||
HL.Remark,
|
||||
HL.FinishedTime,
|
||||
HL.FinishedUserId,
|
||||
IFNULL(NickName, `Name`) FinishedUserName,
|
||||
(SELECT GROUP_CONCAT(IFNULL(NickName,`Name`)) FROM sys_user
|
||||
WHERE Id IN (
|
||||
SELECT DISTINCT SUBSTRING_INDEX(SUBSTRING_INDEX(_HL.TargetUserIds,',',HT.help_topic_id + 1),',',-1)
|
||||
FROM bs_house_log _HL
|
||||
@@ -136,8 +179,9 @@ namespace Ewide.Application.Service
|
||||
)
|
||||
) TargetUserNames
|
||||
FROM bs_house_log HL
|
||||
LEFT JOIN sys_user SU ON HL.FinishedUserId = SU.Id
|
||||
WHERE HouseCodeId = @HouseCodeId
|
||||
ORDER BY HL.CreatedTime DESC, Type DESC";
|
||||
ORDER BY Sort DESC";
|
||||
|
||||
return await _dapperRep.QueryAsync<HouseLogOutput>(sql, new { houseCodeId = input.Id });
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ namespace Ewide.Application.Service
|
||||
{
|
||||
public interface IHouseLogService
|
||||
{
|
||||
Task Add(string houseCodeId, SysUser targetUser, HouseLogType type);
|
||||
Task Add(string houseCodeId, List<SysUser> targetUsers, HouseLogType type);
|
||||
Task<int> Add(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task<int> Add(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task Read(string houseCodeId);
|
||||
Task Done(string houseCodeId);
|
||||
Task AddThenRead(string houseCodeId, SysUser targetUser, HouseLogType type);
|
||||
Task AddThenRead(string houseCodeId, List<SysUser> targetUsers, HouseLogType type);
|
||||
Task AddThenDone(string houseCodeId, SysUser targetUser, HouseLogType type);
|
||||
Task AddThenDone(string houseCodeId, List<SysUser> targetUsers, HouseLogType type);
|
||||
Task<int> AddThenRead(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task<int> AddThenRead(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task<int> AddThenDone(string houseCodeId, SysUser targetUser, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task<int> AddThenDone(string houseCodeId, List<SysUser> targetUsers, HouseLogType type, string remark = null, int? sort = null);
|
||||
Task<dynamic> List(HouseLogInput input);
|
||||
Task<dynamic> ListByInfoId(HouseLogInput input);
|
||||
Task<dynamic> ListByTaskId(HouseLogInput input);
|
||||
|
||||
@@ -155,7 +155,7 @@ INNER JOIN (SELECT * FROM bs_house_member_relation WHERE SysUserId = @UserId) HM
|
||||
// 选定房屋
|
||||
house.ForEach(async p =>
|
||||
{
|
||||
var originalTask = _bsHouseTaskRep.DetachedEntities.FirstOrDefault(t =>t.HouseCodeId == p && t.TaskType == 0);
|
||||
var originalTask = _bsHouseTaskRep.DetachedEntities.FirstOrDefault(t => t.HouseCodeId == p && t.TaskType == 0 && t.IsEnabled);
|
||||
if (originalTask == null)
|
||||
{
|
||||
new BsHouseTask
|
||||
@@ -173,7 +173,7 @@ INNER JOIN (SELECT * FROM bs_house_member_relation WHERE SysUserId = @UserId) HM
|
||||
}
|
||||
else
|
||||
{
|
||||
await _houseLogService.AddThenDone(p, _userManager.User, HouseLogType.SelectMember);
|
||||
var sort = await _houseLogService.AddThenDone(p, _userManager.User, HouseLogType.SelectMember);
|
||||
if (originalTask.Status != 6)//建档未完成,生成新建档任务分配给新的人员;原建档任务数据保留,有效性设置为false,取消巡查关系
|
||||
{
|
||||
var newTask = originalTask.Adapt<BsHouseTask>();
|
||||
@@ -185,7 +185,7 @@ INNER JOIN (SELECT * FROM bs_house_member_relation WHERE SysUserId = @UserId) HM
|
||||
originalTask.IsEnabled = false;
|
||||
originalTask.Update();
|
||||
|
||||
await _houseLogService.Add(p, selectedUser, HouseLogType.CreateInfo);
|
||||
sort = await _houseLogService.Add(p, selectedUser, HouseLogType.CreateInfo, sort: sort);
|
||||
}//已建档完成,不再分配建档任务,仅更换巡查关系
|
||||
else
|
||||
{
|
||||
|
||||
@@ -100,7 +100,10 @@
|
||||
"sysUser:updateAvatar",
|
||||
"sysNotice:received",
|
||||
"sysNotice:unread",
|
||||
"sysNotice:detail"
|
||||
"sysNotice:detail",
|
||||
"houseLog:list",
|
||||
"houseLog:listByInfoId",
|
||||
"houseLog:listByTaskId"
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
const urls = {
|
||||
houseLogList: '/houseLog/list',
|
||||
houseLogListByInfoId: '/houseLog/listByInfoId',
|
||||
houseLogListByTaskId: '/houseLog/listByTaskId',
|
||||
}
|
||||
|
||||
export default urls
|
||||
@@ -7,6 +7,7 @@ import houseTask from './houseTask'
|
||||
import houseInfo from './houseInfo'
|
||||
import houseQuery from './houseQuery'
|
||||
import houseCompany from './houseCompany'
|
||||
import houseLog from './houseLog'
|
||||
|
||||
const urls = {
|
||||
...houseProjectInfo,
|
||||
@@ -17,7 +18,8 @@ const urls = {
|
||||
...houseTask,
|
||||
...houseInfo,
|
||||
...houseQuery,
|
||||
...houseCompany
|
||||
...houseCompany,
|
||||
...houseLog
|
||||
}
|
||||
|
||||
export default urls
|
||||
@@ -1,10 +1,12 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Spin, Steps, Timeline } from 'antd'
|
||||
import { Descriptions, Spin, Steps, Timeline } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDictData from 'util/dic'
|
||||
import { toCamelCase } from 'util/format'
|
||||
|
||||
const ellipsisType = [3, 4, 6]
|
||||
|
||||
export default class houseLog extends Component {
|
||||
state = {
|
||||
loading: true,
|
||||
@@ -21,7 +23,11 @@ export default class houseLog extends Component {
|
||||
state.codes = await getDictData('house_log_type')
|
||||
|
||||
if (id) {
|
||||
const { data } = await api.houseLogList({ id })
|
||||
state.data = data
|
||||
} else if (infoId) {
|
||||
const { data } = await api.houseLogListByInfoId({ id: infoId })
|
||||
state.data = data
|
||||
} else if (taskId) {
|
||||
const { data } = await api.houseLogListByTaskId({ id: taskId })
|
||||
state.data = data
|
||||
@@ -51,18 +57,37 @@ export default class houseLog extends Component {
|
||||
<Timeline.Item
|
||||
key={i}
|
||||
dot={
|
||||
[
|
||||
,
|
||||
<AntIcon type="clock-circle" />,
|
||||
<AntIcon type="check-circle" />,
|
||||
][item.status]
|
||||
item.type === 6 ? (
|
||||
<AntIcon type="close-circle" className="text-error" />
|
||||
) : (
|
||||
[
|
||||
,
|
||||
<AntIcon type="clock-circle" />,
|
||||
<AntIcon type="check-circle" className="text-success" />,
|
||||
][item.status]
|
||||
)
|
||||
}
|
||||
>
|
||||
<h5 className="h5">
|
||||
{this.bindCodeValue(item.type, 'house_log_type')}
|
||||
</h5>
|
||||
<p className="text-gray">{item.updatedTime}</p>
|
||||
<p>{item.targetUserNames}</p>
|
||||
<h6 className="h6">
|
||||
<b>
|
||||
{['等待', '正在', ''][item.status] +
|
||||
this.bindCodeValue(item.type, 'house_log_type')}
|
||||
</b>
|
||||
</h6>
|
||||
<p className="text-gray">{item.finishedTime}</p>
|
||||
<Descriptions column={1} colon={false} labelStyle={{ opacity: 0.5 }}>
|
||||
{item.remark && (
|
||||
<Descriptions.Item>{item.remark}</Descriptions.Item>
|
||||
)}
|
||||
<Descriptions.Item label="操作人">
|
||||
{item.targetUserNames.split(',').join(' / ')}
|
||||
</Descriptions.Item>
|
||||
{item.finishedUserName && (
|
||||
<Descriptions.Item label="实际操作人">
|
||||
{item.finishedUserName}
|
||||
</Descriptions.Item>
|
||||
)}
|
||||
</Descriptions>
|
||||
</Timeline.Item>
|
||||
))}
|
||||
</Timeline>
|
||||
|
||||
@@ -10,9 +10,10 @@ import {
|
||||
message as Message,
|
||||
Radio,
|
||||
Select,
|
||||
Drawer,
|
||||
} from 'antd'
|
||||
import { isEqual } from 'lodash'
|
||||
import { AntIcon, Auth, Container, QueryTable, QueryTableActions } from 'components'
|
||||
import { AntIcon, Auth, Container, HouseLog, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDictData from 'util/dic'
|
||||
import auth from 'components/authorized/handler'
|
||||
@@ -39,6 +40,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -95,7 +98,7 @@ export default class index extends Component {
|
||||
if (flag) {
|
||||
this.columns.push({
|
||||
title: '操作',
|
||||
width: 150,
|
||||
width: 180,
|
||||
dataIndex: 'actions',
|
||||
render: (text, record) => (
|
||||
<QueryTableActions>
|
||||
@@ -111,6 +114,7 @@ export default class index extends Component {
|
||||
<a>删除</a>
|
||||
</Popconfirm>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -255,10 +259,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { options, codes, type } = this.state
|
||||
const { options, codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -348,7 +355,14 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
{this.props.supportInfo}
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog id={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ export default class index extends Component {
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
type="danger"
|
||||
onClick={() => this.onCheck(-1)}
|
||||
>
|
||||
退回
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Button, Card, Form, Input, message as Message, Popconfirm, Radio, Select, Tag } from 'antd'
|
||||
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Drawer,
|
||||
Form,
|
||||
Input,
|
||||
message as Message,
|
||||
Popconfirm,
|
||||
Radio,
|
||||
Select,
|
||||
Tag,
|
||||
} from 'antd'
|
||||
import {
|
||||
AntIcon,
|
||||
Auth,
|
||||
Container,
|
||||
HouseLog,
|
||||
ModalForm,
|
||||
QueryTable,
|
||||
QueryTableActions,
|
||||
} from 'components'
|
||||
import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { isEqual } from 'lodash'
|
||||
@@ -37,6 +56,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -113,6 +134,7 @@ export default class index extends Component {
|
||||
{record.state === 3 ? `审核` : `查看`}
|
||||
</a>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -228,10 +250,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { codes, type } = this.state
|
||||
const { codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -298,6 +323,15 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog taskId={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Card, Checkbox, Form, Input, message as Message, Radio, Select, Tag } from 'antd'
|
||||
import { Auth, Container, QueryTable, QueryTableActions } from 'components'
|
||||
import { Card, Checkbox, Drawer, Form, Input, message as Message, Radio, Select, Tag } from 'antd'
|
||||
import { Auth, Container, HouseLog, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { isEqual } from 'lodash'
|
||||
@@ -35,6 +35,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -115,6 +117,7 @@ export default class index extends Component {
|
||||
: `登记`}
|
||||
</a>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -230,10 +233,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { codes, type } = this.state
|
||||
const { codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -310,6 +316,15 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog taskId={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user