feat():前端组件样式修改,后端逻辑优化;

master
jiyufei 3 months ago
parent 0c91924906
commit ade21d0537

@ -0,0 +1,16 @@
package jnpf.mapper;
import jnpf.entity.YysDeviceUpkeepEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
public interface YysDeviceUpkeepMapper extends BaseMapper<YysDeviceUpkeepEntity> {
}

@ -0,0 +1,16 @@
package jnpf.mapper;
import jnpf.entity.YysdeviceunkeeplogsEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
public interface YysdeviceunkeeplogsMapper extends BaseMapper<YysdeviceunkeeplogsEntity> {
}

@ -0,0 +1,47 @@
package jnpf.service;
import jnpf.model.yysdeviceupkeep.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
public interface YysDeviceUpkeepService extends IService<YysDeviceUpkeepEntity> {
List<YysDeviceUpkeepEntity> getList(YysDeviceUpkeepPagination yysDeviceUpkeepPagination);
List<YysDeviceUpkeepEntity> getTypeList(YysDeviceUpkeepPagination yysDeviceUpkeepPagination, String dataType);
YysDeviceUpkeepEntity getInfo(String id);
void delete(YysDeviceUpkeepEntity entity);
void create(YysDeviceUpkeepEntity entity);
boolean update(String id, YysDeviceUpkeepEntity entity);
//子表方法
List<YysdeviceunkeeplogsEntity> getYysdeviceunkeeplogsList(String id, YysDeviceUpkeepPagination yysDeviceUpkeepPagination);
List<YysdeviceunkeeplogsEntity> getYysdeviceunkeeplogsList(String id);
//副表数据方法
String checkForm(YysDeviceUpkeepForm form, int i);
void saveOrUpdate(YysDeviceUpkeepForm yysDeviceUpkeepForm, String id, boolean isSave) throws Exception;
/**
*
*
* @param entity
*/
void syncSaveOrUpdate(YysDeviceEntity entity);
}

@ -0,0 +1,18 @@
package jnpf.service;
import jnpf.model.yysdeviceupkeep.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
public interface YysdeviceunkeeplogsService extends IService<YysdeviceunkeeplogsEntity> {
QueryWrapper<YysdeviceunkeeplogsEntity> getChild(YysDeviceUpkeepPagination pagination,QueryWrapper<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsQueryWrapper);
}

@ -44,6 +44,8 @@ import java.util.*;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/** /**
* yysDevice * yysDevice
* V3.5 * V3.5
@ -59,6 +61,9 @@ public class YysDeviceServiceImpl extends ServiceImpl<YysDeviceMapper, YysDevice
@Autowired @Autowired
private UserProvider userProvider; private UserProvider userProvider;
@Resource
private YysDeviceUpkeepService yysDeviceUpkeepService;
@Override @Override
public List<YysDeviceEntity> getList(YysDevicePagination yysDevicePagination) { public List<YysDeviceEntity> getList(YysDevicePagination yysDevicePagination) {
return getTypeList(yysDevicePagination, yysDevicePagination.getDataType()); return getTypeList(yysDevicePagination, yysDevicePagination.getDataType());
@ -329,8 +334,11 @@ public class YysDeviceServiceImpl extends ServiceImpl<YysDeviceMapper, YysDevice
entity.setLastModifyTime(DateUtil.getNowDate()); entity.setLastModifyTime(DateUtil.getNowDate());
entity.setLastModifyUserId(userInfo.getUserId()); entity.setLastModifyUserId(userInfo.getUserId());
} }
this.saveOrUpdate(entity); boolean result = this.saveOrUpdate(entity);
if (result) {
//向设备维保表同步数据
yysDeviceUpkeepService.syncSaveOrUpdate(entity);
}
} }
@Override @Override

@ -0,0 +1,481 @@
package jnpf.service.impl;
import cn.hutool.core.bean.BeanUtil;
import jnpf.entity.*;
import jnpf.mapper.YysDeviceUpkeepMapper;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.yysdeviceupkeep.*;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel;
import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.regex.Pattern;
import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat;
import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
@Service
@Slf4j
public class YysDeviceUpkeepServiceImpl extends ServiceImpl<YysDeviceUpkeepMapper, YysDeviceUpkeepEntity> implements YysDeviceUpkeepService {
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
@Autowired
private YysdeviceunkeeplogsService yysdeviceunkeeplogsService;
@Override
public List<YysDeviceUpkeepEntity> getList(YysDeviceUpkeepPagination yysDeviceUpkeepPagination) {
return getTypeList(yysDeviceUpkeepPagination, yysDeviceUpkeepPagination.getDataType());
}
/**
*
*/
@Override
public List<YysDeviceUpkeepEntity> getTypeList(YysDeviceUpkeepPagination yysDeviceUpkeepPagination, String dataType) {
String userId = userProvider.get().getUserId();
List<String> AllIdList = new ArrayList();
List<List<String>> intersectionList = new ArrayList<>();
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String columnData = !isPc ? YysDeviceUpkeepConstant.getAppColumnData() : YysDeviceUpkeepConstant.getColumnData();
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp()) : JsonUtil.getObjectToString(columnDataModel.getRuleList());
int total = 0;
int yysDeviceUpkeepNum = 0;
QueryWrapper<YysDeviceUpkeepEntity> yysDeviceUpkeepQueryWrapper = new QueryWrapper<>();
int yysdeviceunkeeplogsNum = 0;
QueryWrapper<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsQueryWrapper = new QueryWrapper<>();
long yysdeviceunkeeplogscount = yysdeviceunkeeplogsService.count();
List<String> allSuperIDlist = new ArrayList<>();
String superOp = "";
if (ObjectUtil.isNotEmpty(yysDeviceUpkeepPagination.getSuperQueryJson())) {
List<String> allSuperList = new ArrayList<>();
List<List<String>> intersectionSuperList = new ArrayList<>();
String queryJson = yysDeviceUpkeepPagination.getSuperQueryJson();
SuperJsonModel superJsonModel = JsonUtil.getJsonToBean(queryJson, SuperJsonModel.class);
int superNum = 0;
QueryWrapper<YysDeviceUpkeepEntity> yysDeviceUpkeepSuperWrapper = new QueryWrapper<>();
yysDeviceUpkeepSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(yysDeviceUpkeepSuperWrapper, YysDeviceUpkeepEntity.class, queryJson, "0"));
int yysDeviceUpkeepNum1 = yysDeviceUpkeepSuperWrapper.getExpression().getNormal().size();
if (yysDeviceUpkeepNum1 > 0) {
List<String> yysDeviceUpkeepList = this.list(yysDeviceUpkeepSuperWrapper).stream().map(YysDeviceUpkeepEntity::getId).collect(Collectors.toList());
allSuperList.addAll(yysDeviceUpkeepList);
intersectionSuperList.add(yysDeviceUpkeepList);
superNum++;
}
String yysdeviceunkeeplogsTable = "yys_device_unkeep_logs";
boolean yysdeviceunkeeplogsHasSql = queryJson.contains(yysdeviceunkeeplogsTable);
List<String> yysdeviceunkeeplogsList = generaterSwapUtil.selectIdsByChildCondition(YysDeviceUpkeepConstant.getTableList(), yysdeviceunkeeplogsTable, queryJson, null);
if (yysdeviceunkeeplogsHasSql) {
allSuperList.addAll(yysdeviceunkeeplogsList);
intersectionSuperList.add(yysdeviceunkeeplogsList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if (superOp.equalsIgnoreCase("and")) {
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList);
} else {
allSuperIDlist = allSuperList;
}
}
List<String> allRuleIDlist = new ArrayList<>();
String ruleOp = "";
if (ObjectUtil.isNotEmpty(ruleJson)) {
List<String> allRuleList = new ArrayList<>();
List<List<String>> intersectionRuleList = new ArrayList<>();
SuperJsonModel ruleJsonModel = JsonUtil.getJsonToBean(ruleJson, SuperJsonModel.class);
int ruleNum = 0;
QueryWrapper<YysDeviceUpkeepEntity> yysDeviceUpkeepSuperWrapper = new QueryWrapper<>();
yysDeviceUpkeepSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(yysDeviceUpkeepSuperWrapper, YysDeviceUpkeepEntity.class, ruleJson, "0"));
int yysDeviceUpkeepNum1 = yysDeviceUpkeepSuperWrapper.getExpression().getNormal().size();
if (yysDeviceUpkeepNum1 > 0) {
List<String> yysDeviceUpkeepList = this.list(yysDeviceUpkeepSuperWrapper).stream().map(YysDeviceUpkeepEntity::getId).collect(Collectors.toList());
allRuleList.addAll(yysDeviceUpkeepList);
intersectionRuleList.add(yysDeviceUpkeepList);
ruleNum++;
}
String yysdeviceunkeeplogsTable = "yys_device_unkeep_logs";
boolean yysdeviceunkeeplogsHasSql = ruleJson.contains(yysdeviceunkeeplogsTable);
List<String> yysdeviceunkeeplogsList = generaterSwapUtil.selectIdsByChildCondition(YysDeviceUpkeepConstant.getTableList(), yysdeviceunkeeplogsTable, ruleJson, null);
if (yysdeviceunkeeplogsHasSql) {
allRuleList.addAll(yysdeviceunkeeplogsList);
intersectionRuleList.add(yysdeviceunkeeplogsList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if (ruleOp.equalsIgnoreCase("and")) {
allRuleIDlist = generaterSwapUtil.getIntersection(intersectionRuleList);
} else {
allRuleIDlist = allRuleList;
}
}
boolean pcPermission = false;
boolean appPermission = false;
if (isPc && pcPermission) {
if (!userProvider.get().getIsAdministrator()) {
Object yysDeviceUpkeepObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysDeviceUpkeepQueryWrapper, YysDeviceUpkeepEntity.class, yysDeviceUpkeepPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysDeviceUpkeepObj)) {
return new ArrayList<>();
} else {
yysDeviceUpkeepQueryWrapper = (QueryWrapper<YysDeviceUpkeepEntity>) yysDeviceUpkeepObj;
if (yysDeviceUpkeepQueryWrapper.getExpression().getNormal().size() > 0) {
yysDeviceUpkeepNum++;
}
}
Object yysdeviceunkeeplogsObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysdeviceunkeeplogsQueryWrapper, YysdeviceunkeeplogsEntity.class, yysDeviceUpkeepPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysdeviceunkeeplogsObj)) {
return new ArrayList<>();
} else {
yysdeviceunkeeplogsQueryWrapper = (QueryWrapper<YysdeviceunkeeplogsEntity>) yysdeviceunkeeplogsObj;
if (yysdeviceunkeeplogsQueryWrapper.getExpression().getNormal().size() > 0) {
yysdeviceunkeeplogsNum++;
}
}
}
}
if (!isPc && appPermission) {
if (!userProvider.get().getIsAdministrator()) {
Object yysDeviceUpkeepObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysDeviceUpkeepQueryWrapper, YysDeviceUpkeepEntity.class, yysDeviceUpkeepPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysDeviceUpkeepObj)) {
return new ArrayList<>();
} else {
yysDeviceUpkeepQueryWrapper = (QueryWrapper<YysDeviceUpkeepEntity>) yysDeviceUpkeepObj;
if (yysDeviceUpkeepQueryWrapper.getExpression().getNormal().size() > 0) {
yysDeviceUpkeepNum++;
}
}
Object yysdeviceunkeeplogsObj = generaterSwapUtil.getAuthorizeCondition(new QueryModel(yysdeviceunkeeplogsQueryWrapper, YysdeviceunkeeplogsEntity.class, yysDeviceUpkeepPagination.getMenuId(), "0"));
if (ObjectUtil.isEmpty(yysdeviceunkeeplogsObj)) {
return new ArrayList<>();
} else {
yysdeviceunkeeplogsQueryWrapper = (QueryWrapper<YysdeviceunkeeplogsEntity>) yysdeviceunkeeplogsObj;
if (yysdeviceunkeeplogsQueryWrapper.getExpression().getNormal().size() > 0) {
yysdeviceunkeeplogsNum++;
}
}
}
}
if (isPc) {
if (ObjectUtil.isNotEmpty(yysDeviceUpkeepPagination.getDeviceName())) {
yysDeviceUpkeepNum++;
String value = yysDeviceUpkeepPagination.getDeviceName() instanceof List ?
JsonUtil.getObjectToString(yysDeviceUpkeepPagination.getDeviceName()) :
String.valueOf(yysDeviceUpkeepPagination.getDeviceName());
yysDeviceUpkeepQueryWrapper.lambda().like(YysDeviceUpkeepEntity::getDeviceName, value);
}
if (ObjectUtil.isNotEmpty(yysDeviceUpkeepPagination.getDeviceDept())) {
yysDeviceUpkeepNum++;
List<String> idList = new ArrayList<>();
try {
String[][] deviceDept = JsonUtil.getJsonToBean(yysDeviceUpkeepPagination.getDeviceDept(), String[][].class);
for (int i = 0; i < deviceDept.length; i++) {
if (deviceDept[i].length > 0) {
idList.add(JsonUtil.getObjectToString(Arrays.asList(deviceDept[i])));
}
}
} catch (Exception e1) {
try {
List<String> deviceDept = JsonUtil.getJsonToList(yysDeviceUpkeepPagination.getDeviceDept(), String.class);
if (deviceDept.size() > 0) {
idList.addAll(deviceDept);
}
} catch (Exception e2) {
idList.add(String.valueOf(yysDeviceUpkeepPagination.getDeviceDept()));
}
}
yysDeviceUpkeepQueryWrapper.lambda().and(t -> {
idList.forEach(tt -> {
t.like(YysDeviceUpkeepEntity::getDeviceDept, tt).or();
});
});
}
if (ObjectUtil.isNotEmpty(yysDeviceUpkeepPagination.getEnabledStatus())) {
yysDeviceUpkeepNum++;
List<String> idList = new ArrayList<>();
try {
String[][] enabledStatus = JsonUtil.getJsonToBean(yysDeviceUpkeepPagination.getEnabledStatus(), String[][].class);
for (int i = 0; i < enabledStatus.length; i++) {
if (enabledStatus[i].length > 0) {
idList.add(JsonUtil.getObjectToString(Arrays.asList(enabledStatus[i])));
}
}
} catch (Exception e1) {
try {
List<String> enabledStatus = JsonUtil.getJsonToList(yysDeviceUpkeepPagination.getEnabledStatus(), String.class);
if (enabledStatus.size() > 0) {
idList.addAll(enabledStatus);
}
} catch (Exception e2) {
idList.add(String.valueOf(yysDeviceUpkeepPagination.getEnabledStatus()));
}
}
yysDeviceUpkeepQueryWrapper.lambda().and(t -> {
idList.forEach(tt -> {
t.like(YysDeviceUpkeepEntity::getEnabledStatus, tt).or();
});
});
}
}
if (yysdeviceunkeeplogsNum > 0) {
List<String> yysdeviceunkeeplogsIdList = yysdeviceunkeeplogsService.list(yysdeviceunkeeplogsQueryWrapper).stream().filter(t -> StringUtil.isNotEmpty(t.getUnkeepId())).map(t -> t.getUnkeepId()).collect(Collectors.toList());
long count = yysdeviceunkeeplogsService.count();
if (count > 0) {
intersectionList.add(yysdeviceunkeeplogsIdList);
}
AllIdList.addAll(yysdeviceunkeeplogsIdList);
}
total += yysdeviceunkeeplogsNum;
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total > 0) {
if (intersection.size() == 0) {
intersection.add("jnpfNullList");
}
yysDeviceUpkeepQueryWrapper.lambda().in(YysDeviceUpkeepEntity::getId, intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)) {
if (allSuperIDlist.size() == 0) {
allSuperIDlist.add("jnpfNullList");
}
List<String> finalAllSuperIDlist = allSuperIDlist;
yysDeviceUpkeepQueryWrapper.lambda().and(t -> t.in(YysDeviceUpkeepEntity::getId, finalAllSuperIDlist));
}
//是否有数据过滤查询
if (StringUtil.isNotEmpty(ruleOp)) {
if (allRuleIDlist.size() == 0) {
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
yysDeviceUpkeepQueryWrapper.lambda().and(t -> t.in(YysDeviceUpkeepEntity::getId, finalAllRuleIDlist));
}
//假删除标志
yysDeviceUpkeepQueryWrapper.lambda().isNull(YysDeviceUpkeepEntity::getDeleteMark);
//排序
if (StringUtil.isEmpty(yysDeviceUpkeepPagination.getSidx())) {
yysDeviceUpkeepQueryWrapper.lambda().orderByDesc(YysDeviceUpkeepEntity::getId);
} else {
try {
String sidx = yysDeviceUpkeepPagination.getSidx();
String[] strs = sidx.split("_name");
YysDeviceUpkeepEntity yysDeviceUpkeepEntity = new YysDeviceUpkeepEntity();
Field declaredField = yysDeviceUpkeepEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
yysDeviceUpkeepQueryWrapper = "asc".equals(yysDeviceUpkeepPagination.getSort().toLowerCase()) ? yysDeviceUpkeepQueryWrapper.orderByAsc(value) : yysDeviceUpkeepQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) {
Page<YysDeviceUpkeepEntity> page = new Page<>(yysDeviceUpkeepPagination.getCurrentPage(), yysDeviceUpkeepPagination.getPageSize());
IPage<YysDeviceUpkeepEntity> userIPage = this.page(page, yysDeviceUpkeepQueryWrapper);
return yysDeviceUpkeepPagination.setData(userIPage.getRecords(), userIPage.getTotal());
} else {
List<YysDeviceUpkeepEntity> list = new ArrayList();
return yysDeviceUpkeepPagination.setData(list, list.size());
}
} else {
return this.list(yysDeviceUpkeepQueryWrapper);
}
}
@Override
public YysDeviceUpkeepEntity getInfo(String id) {
QueryWrapper<YysDeviceUpkeepEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(YysDeviceUpkeepEntity::getId, id);
return this.getOne(queryWrapper);
}
@Override
public void create(YysDeviceUpkeepEntity entity) {
this.save(entity);
}
@Override
public boolean update(String id, YysDeviceUpkeepEntity entity) {
return this.updateById(entity);
}
@Override
public void delete(YysDeviceUpkeepEntity entity) {
if (entity != null) {
this.removeById(entity.getId());
}
}
/**
* Yysdeviceunkeeplogs
*/
@Override
public List<YysdeviceunkeeplogsEntity> getYysdeviceunkeeplogsList(String id, YysDeviceUpkeepPagination yysDeviceUpkeepPagination) {
Map<String, Object> newtabMap = YysDeviceUpkeepConstant.TABLEFIELDKEY.entrySet()
.stream().collect(Collectors.toMap(e -> e.getValue(), e -> e.getKey()));
String tableName = "yysdeviceunkeeplogs";
tableName = newtabMap.get(tableName) == null ? tableName : newtabMap.get(tableName).toString();
QueryWrapper<YysdeviceunkeeplogsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper = yysdeviceunkeeplogsService.getChild(yysDeviceUpkeepPagination, queryWrapper);
queryWrapper.lambda().eq(YysdeviceunkeeplogsEntity::getUnkeepId, id);
generaterSwapUtil.wrapperHandle(YysDeviceUpkeepConstant.getColumnData(), YysDeviceUpkeepConstant.getAppColumnData(), queryWrapper, YysdeviceunkeeplogsEntity.class, "sub", tableName);
return yysdeviceunkeeplogsService.list(queryWrapper);
}
/**
* Yysdeviceunkeeplogs
*/
@Override
public List<YysdeviceunkeeplogsEntity> getYysdeviceunkeeplogsList(String id) {
QueryWrapper<YysdeviceunkeeplogsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(YysdeviceunkeeplogsEntity::getUnkeepId, id);
return yysdeviceunkeeplogsService.list(queryWrapper);
}
/**
* i-0-1
*/
@Override
public String checkForm(YysDeviceUpkeepForm form, int i) {
boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0");
String id = "";
String countRecover = "";
if (isUp) {
id = form.getId();
}
//主表字段验证
//子表字段验证
if (form.getYysdeviceunkeeplogsList() != null) {
}
return countRecover;
}
/**
* ()
*
* @param id
* @param yysDeviceUpkeepForm
* @return
*/
@Override
@Transactional
public void saveOrUpdate(YysDeviceUpkeepForm yysDeviceUpkeepForm, String id, boolean isSave) throws Exception {
UserInfo userInfo = userProvider.get();
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
yysDeviceUpkeepForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(YysDeviceUpkeepConstant.getFormData(), yysDeviceUpkeepForm), YysDeviceUpkeepForm.class);
YysDeviceUpkeepEntity entity = JsonUtil.getJsonToBean(yysDeviceUpkeepForm, YysDeviceUpkeepEntity.class);
if (isSave) {
String mainId = RandomUtil.uuId();
entity.setId(mainId);
entity.setVersion(0);
} else {
}
this.saveOrUpdate(entity);
//Yysdeviceunkeeplogs子表数据新增修改
if (!isSave) {
QueryWrapper<YysdeviceunkeeplogsEntity> YysdeviceunkeeplogsqueryWrapper = new QueryWrapper<>();
YysdeviceunkeeplogsqueryWrapper.lambda().eq(YysdeviceunkeeplogsEntity::getUnkeepId, entity.getId());
yysdeviceunkeeplogsService.remove(YysdeviceunkeeplogsqueryWrapper);
}
if (yysDeviceUpkeepForm.getYysdeviceunkeeplogsList() != null) {
List<YysdeviceunkeeplogsEntity> tableField108 = JsonUtil.getJsonToList(yysDeviceUpkeepForm.getYysdeviceunkeeplogsList(), YysdeviceunkeeplogsEntity.class);
int repairs = 0;
int unkeep = 0;
for (YysdeviceunkeeplogsEntity entitys : tableField108) {
if ("1".equals(entitys.getUnkeepType())) {
repairs++;
}
if ("2".equals(entitys.getUnkeepType())) {
unkeep++;
}
entitys.setId(RandomUtil.uuId());
entitys.setUnkeepId(entity.getId());
entitys.setCreatorUserId(userInfo.getUserId());
entitys.setCreatorTime(DateUtil.getNowDate());
if (isSave) {
} else {
}
yysdeviceunkeeplogsService.saveOrUpdate(entitys);
}
//每次修改的时候去修改下 维保表的修改时间和创建用户 其次统计数量
entity.setLastModifyTime(DateUtil.getNowDate());
entity.setLastModifyUserId(userInfo.getUserId());
entity.setUnkeepNum(unkeep);
entity.setRepairsNum(repairs);
this.saveOrUpdate(entity);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void syncSaveOrUpdate(YysDeviceEntity entity) {
log.info("同步设备维保表entity{}", entity);
YysDeviceUpkeepEntity entity1 = BeanUtil.copyProperties(entity, YysDeviceUpkeepEntity.class);
if (StringUtils.isBlank(entity1.getId())) {
String mainId = RandomUtil.uuId();
entity1.setId(mainId);
}
this.saveOrUpdate(entity1);
}
}

@ -0,0 +1,59 @@
package jnpf.service.impl;
import jnpf.entity.*;
import jnpf.mapper.YysdeviceunkeeplogsMapper;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.yysdeviceupkeep.*;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel;
import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat;
import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
*
* yysDeviceUpkeep
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
@Service
public class YysdeviceunkeeplogsServiceImpl extends ServiceImpl<YysdeviceunkeeplogsMapper, YysdeviceunkeeplogsEntity> implements YysdeviceunkeeplogsService{
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
//子表过滤方法
@Override
public QueryWrapper<YysdeviceunkeeplogsEntity> getChild(YysDeviceUpkeepPagination pagination, QueryWrapper<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsQueryWrapper){
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String ruleQueryJson = isPc?YysDeviceUpkeepConstant.getColumnData():YysDeviceUpkeepConstant.getAppColumnData();
ColumnDataModel dataModel = JsonUtil.getJsonToBean(ruleQueryJson,ColumnDataModel.class);
String ruleJson = isPc?JsonUtil.getObjectToString(dataModel.getRuleList()):JsonUtil.getObjectToString(dataModel.getRuleListApp());
if(isPc){
}
return yysdeviceunkeeplogsQueryWrapper;
}
}

@ -0,0 +1,224 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.UserService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
import jnpf.model.yysdeviceupkeep.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.*;
import jnpf.annotation.JnpfField;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.base.entity.ProvinceEntity;
import java.io.IOException;
import java.util.stream.Collectors;
import jnpf.engine.entity.FlowTaskEntity;
import jnpf.exception.WorkFlowException;
import org.springframework.transaction.annotation.Transactional;
/**
* yysDeviceUpkeep
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
*/
@Slf4j
@RestController
@Tag(name = "yysDeviceUpkeep", description = "example")
@RequestMapping("/api/example/YysDeviceUpkeep")
public class YysDeviceUpkeepController {
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
@Autowired
private YysDeviceUpkeepService yysDeviceUpkeepService;
@Autowired
private YysdeviceunkeeplogsService yysdeviceunkeeplogsService;
@Resource
private UserService userService;
/**
*
*
* @param yysDeviceUpkeepPagination
* @return
*/
@Operation(summary = "获取列表")
@PostMapping("/getList")
public ActionResult list(@RequestBody YysDeviceUpkeepPagination yysDeviceUpkeepPagination) throws IOException {
List<YysDeviceUpkeepEntity> list = yysDeviceUpkeepService.getList(yysDeviceUpkeepPagination);
List<Map<String, Object>> realList = new ArrayList<>();
for (YysDeviceUpkeepEntity entity : list) {
Map<String, Object> yysDeviceUpkeepMap = JsonUtil.entityToMap(entity);
yysDeviceUpkeepMap.put("id", yysDeviceUpkeepMap.get("id"));
//副表数据
//子表数据
List<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsList = yysDeviceUpkeepService.getYysdeviceunkeeplogsList(entity.getId(), yysDeviceUpkeepPagination);
yysDeviceUpkeepMap.put("tableField108", JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(yysdeviceunkeeplogsList)));
realList.add(yysDeviceUpkeepMap);
}
//数据转换
realList = generaterSwapUtil.swapDataList(realList, YysDeviceUpkeepConstant.getFormData(), YysDeviceUpkeepConstant.getColumnData(), yysDeviceUpkeepPagination.getModuleId(), false);
//返回对象
PageListVO vo = new PageListVO();
vo.setList(realList);
PaginationVO page = JsonUtil.getJsonToBean(yysDeviceUpkeepPagination, PaginationVO.class);
vo.setPagination(page);
return ActionResult.success(vo);
}
/**
*
*
* @param yysDeviceUpkeepForm
* @return
*/
@PostMapping()
@Operation(summary = "创建")
public ActionResult create(@RequestBody @Valid YysDeviceUpkeepForm yysDeviceUpkeepForm) {
String b = yysDeviceUpkeepService.checkForm(yysDeviceUpkeepForm, 0);
if (StringUtil.isNotEmpty(b)) {
return ActionResult.fail(b);
}
try {
yysDeviceUpkeepService.saveOrUpdate(yysDeviceUpkeepForm, null, true);
} catch (Exception e) {
return ActionResult.fail("新增数据失败");
}
return ActionResult.success("创建成功");
}
/**
*
*
* @param id
* @param yysDeviceUpkeepForm
* @return
*/
@PutMapping("/{id}")
@Operation(summary = "更新")
public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid YysDeviceUpkeepForm yysDeviceUpkeepForm,
@RequestParam(value = "isImport", required = false) boolean isImport) {
yysDeviceUpkeepForm.setId(id);
if (!isImport) {
String b = yysDeviceUpkeepService.checkForm(yysDeviceUpkeepForm, 1);
if (StringUtil.isNotEmpty(b)) {
return ActionResult.fail(b);
}
}
YysDeviceUpkeepEntity entity = yysDeviceUpkeepService.getInfo(id);
if (entity != null) {
try {
yysDeviceUpkeepService.saveOrUpdate(yysDeviceUpkeepForm, id, false);
} catch (Exception e) {
return ActionResult.fail("修改数据失败");
}
return ActionResult.success("更新成功");
} else {
return ActionResult.fail("更新失败,数据不存在");
}
}
/**
*
*
* @param id
* @return
*/
@Operation(summary = "删除")
@DeleteMapping("/{id}")
@Transactional
public ActionResult delete(@PathVariable("id") String id) {
YysDeviceUpkeepEntity entity = yysDeviceUpkeepService.getInfo(id);
if (entity != null) {
//假删除
entity.setDeleteMark(1);
entity.setDeleteTime(DateUtil.getNowDate());
yysDeviceUpkeepService.update(id, entity);
}
return ActionResult.success("删除成功");
}
/**
* ()
* 使-
*
* @param id
* @return
*/
@Operation(summary = "表单信息(详情页)")
@GetMapping("/detail/{id}")
public ActionResult detailInfo(@PathVariable("id") String id) {
YysDeviceUpkeepEntity entity = yysDeviceUpkeepService.getInfo(id);
if (entity == null) {
return ActionResult.fail("表单数据不存在!");
}
Map<String, Object> yysDeviceUpkeepMap = JsonUtil.entityToMap(entity);
yysDeviceUpkeepMap.put("id", yysDeviceUpkeepMap.get("id"));
//副表数据
//子表数据
List<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsList = yysDeviceUpkeepService.getYysdeviceunkeeplogsList(entity.getId());
yysDeviceUpkeepMap.put("tableField108", JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(yysdeviceunkeeplogsList)));
yysDeviceUpkeepMap = generaterSwapUtil.swapDataDetail(yysDeviceUpkeepMap, YysDeviceUpkeepConstant.getFormData(), "590893609868337221", false);
return ActionResult.success(yysDeviceUpkeepMap);
}
/**
* ()
* 使-
*
* @param id
* @return
*/
@Operation(summary = "信息")
@GetMapping("/{id}")
public ActionResult info(@PathVariable("id") String id) {
YysDeviceUpkeepEntity entity = yysDeviceUpkeepService.getInfo(id);
if (entity == null) {
return ActionResult.fail("表单数据不存在!");
}
//查询所有用户
List<UserEntity> list = userService.list();
Map<String, Object> yysDeviceUpkeepMap = JsonUtil.entityToMap(entity);
yysDeviceUpkeepMap.put("id", yysDeviceUpkeepMap.get("id"));
yysDeviceUpkeepMap.put("creatorUserId", userService.getInfo(yysDeviceUpkeepMap.get("creatorUserId").toString()).getRealName());
yysDeviceUpkeepMap.put("lastModifyUserId", userService.getInfo(yysDeviceUpkeepMap.get("lastModifyUserId").toString()).getRealName());
//副表数据
//子表数据
List<YysdeviceunkeeplogsEntity> yysdeviceunkeeplogsList = yysDeviceUpkeepService.getYysdeviceunkeeplogsList(entity.getId());
yysDeviceUpkeepMap.put("yysdeviceunkeeplogsList", JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(yysdeviceunkeeplogsList)));
yysDeviceUpkeepMap = generaterSwapUtil.swapDataForm(yysDeviceUpkeepMap, YysDeviceUpkeepConstant.getFormData(), YysDeviceUpkeepConstant.TABLEFIELDKEY, YysDeviceUpkeepConstant.TABLERENAMES);
return ActionResult.success(yysDeviceUpkeepMap);
}
}

@ -0,0 +1,61 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
*/
@Data
@TableName("yys_device_upkeep")
public class YysDeviceUpkeepEntity {
@TableId(value ="ID" )
private String id;
@TableField(value = "DEVICE_CODE" , updateStrategy = FieldStrategy.IGNORED)
private String deviceCode;
@TableField(value = "DEVICE_NAME" , updateStrategy = FieldStrategy.IGNORED)
private String deviceName;
@TableField(value = "DEVICE_DEPT" , updateStrategy = FieldStrategy.IGNORED)
private String deviceDept;
@TableField("DEIVCE_TYPE")
private String deivceType;
@TableField(value = "ENABLED_STATUS" , updateStrategy = FieldStrategy.IGNORED)
private String enabledStatus;
@TableField(value = "BUY_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date buyTime;
@TableField(value = "REPAIRS_NUM" , updateStrategy = FieldStrategy.IGNORED)
private Integer repairsNum;
@TableField(value = "UNKEEP_NUM" , updateStrategy = FieldStrategy.IGNORED)
private Integer unkeepNum;
@TableField(value = "F_CREATOR_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date creatorTime;
@TableField(value = "F_CREATOR_USER_ID" , updateStrategy = FieldStrategy.IGNORED)
private String creatorUserId;
@TableField(value = "F_LAST_MODIFY_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date lastModifyTime;
@TableField(value = "F_LAST_MODIFY_USER_ID" , updateStrategy = FieldStrategy.IGNORED)
private String lastModifyUserId;
@TableField("F_DELETE_TIME")
private Date deleteTime;
@TableField("F_DELETE_USER_ID")
private String deleteUserId;
@TableField("F_DELETE_MARK")
private Integer deleteMark;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("COMPANY_ID")
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
@TableField("F_FLOW_ID")
private String flowId;
@TableField("F_VERSION")
private Integer version;
}

@ -0,0 +1,74 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
*/
@Data
@TableName("yys_device_unkeep_logs")
public class YysdeviceunkeeplogsEntity {
@TableId(value ="ID" )
private String id;
@TableField("UNKEEP_ID")
private String unkeepId;
@TableField(value = "UNKEEP_TYPE" , updateStrategy = FieldStrategy.IGNORED)
private String unkeepType;
@TableField(value = "START_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date startTime;
@TableField(value = "END_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date endTime;
@TableField(value = "HOURS" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal hours;
@TableField(value = "UNKEEP_DETAILS" , updateStrategy = FieldStrategy.IGNORED)
private String unkeepDetails;
@TableField(value = "SOLUTION" , updateStrategy = FieldStrategy.IGNORED)
private String solution;
@TableField(value = "UNKEEP_MEMBER" , updateStrategy = FieldStrategy.IGNORED)
private String unkeepMember;
@TableField(value = "CHANGE_PART_NAME" , updateStrategy = FieldStrategy.IGNORED)
private String changePartName;
@TableField(value = "MODELS" , updateStrategy = FieldStrategy.IGNORED)
private String models;
@TableField(value = "CHANG_NUM" , updateStrategy = FieldStrategy.IGNORED)
private Integer changNum;
@TableField(value = "UNKEEP_DEVICE_STATUS" , updateStrategy = FieldStrategy.IGNORED)
private String unkeepDeviceStatus;
@TableField(value = "LEADER" , updateStrategy = FieldStrategy.IGNORED)
private String leader;
@TableField(value = "ESTIMATED_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date estimatedTime;
@TableField(value = "REMARKS" , updateStrategy = FieldStrategy.IGNORED)
private String remarks;
@TableField("F_CREATOR_TIME")
private Date creatorTime;
@TableField("F_CREATOR_USER_ID")
private String creatorUserId;
@TableField("F_LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("F_LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("F_DELETE_TIME")
private Date deleteTime;
@TableField("F_DELETE_USER_ID")
private String deleteUserId;
@TableField("F_DELETE_MARK")
private Integer deleteMark;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("COMPANY_ID")
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
@TableField("F_FLOW_ID")
private String flowId;
}

@ -0,0 +1,59 @@
package jnpf.model.yysdeviceupkeep;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* yysDeviceUpkeep
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
*/
@Data
public class YysDeviceUpkeepForm {
/** 主键 */
private String id;
/** 子表数据 **/
@JsonProperty("yysdeviceunkeeplogsList")
private List<YysdeviceunkeeplogsModel> yysdeviceunkeeplogsList;
/** 乐观锁 **/
@JsonProperty("version")
private Integer version;
/** 设备编码 **/
@JsonProperty("deviceCode")
private String deviceCode;
/** 设备名称 **/
@JsonProperty("deviceName")
private String deviceName;
/** 购入日期 **/
@JsonProperty("buyTime")
private String buyTime;
/** 所属部门 **/
@JsonProperty("deviceDept")
private Object deviceDept;
/** 维修次数 **/
@JsonProperty("repairsNum")
private BigDecimal repairsNum;
/** 保养次数 **/
@JsonProperty("unkeepNum")
private BigDecimal unkeepNum;
/** 创建人 **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 创建时间 **/
@JsonProperty("creatorTime")
private String creatorTime;
/** 修改人 **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
/** 启用状态 **/
@JsonProperty("enabledStatus")
private Object enabledStatus;
}

@ -0,0 +1,39 @@
package jnpf.model.yysdeviceupkeep;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import jnpf.base.Pagination;
import java.util.List;
/**
*
* yysDeviceUpkeep
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
*/
@Data
public class YysDeviceUpkeepPagination extends Pagination {
/** 查询key */
private String[] selectKey;
/** json */
private String json;
/** 数据类型 0-当前页1-全部数据 */
private String dataType;
/** 高级查询 */
private String superQueryJson;
/** 功能id */
private String moduleId;
/** 菜单id */
private String menuId;
/** 设备名称 */
@JsonProperty("deviceName")
private Object deviceName;
/** 所属部门 */
@JsonProperty("deviceDept")
private Object deviceDept;
/** 启用状态 */
@JsonProperty("enabledStatus")
private Object enabledStatus;
}

@ -0,0 +1,72 @@
package jnpf.model.yysdeviceupkeep;
import lombok.Data;
import java.util.List;
import java.util.Date;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
* yysDeviceUpkeep
* V3.5
* : https://www.jnpfsoft.com
* JNPF
* 2024-08-07
*/
@Data
public class YysdeviceunkeeplogsModel {
/** 维保类型 **/
@JSONField(name = "unkeepType")
private Object unkeepType;
/** 维保开始时间 **/
@JSONField(name = "startTime")
private Long startTime;
/** 维保结束时间 **/
@JSONField(name = "endTime")
private Long endTime;
/** 总耗时 **/
@JSONField(name = "hours")
private BigDecimal hours;
/** 维保详细内容 **/
@JSONField(name = "unkeepDetails")
private String unkeepDetails;
/** 解决办法 **/
@JSONField(name = "solution")
private String solution;
/** 维保人员 **/
@JSONField(name = "unkeepMember")
private Object unkeepMember;
/** 更换零配件名称 **/
@JSONField(name = "changePartName")
private String changePartName;
/** 规格型号 **/
@JSONField(name = "models")
private String models;
/** 更换数量 **/
@JSONField(name = "changNum")
private BigDecimal changNum;
/** 维保后设备状态 **/
@JSONField(name = "unkeepDeviceStatus")
private Object unkeepDeviceStatus;
/** 操作组长 **/
@JSONField(name = "leader")
private Object leader;
/** 预估下次维保时间 **/
@JSONField(name = "estimatedTime")
private Long estimatedTime;
/** 备注 **/
@JSONField(name = "remarks")
private String remarks;
}

@ -105,8 +105,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产状态" prop="productionStatus" align="center"> <el-table-column label="生产状态" prop="productionStatus" align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
{{ scope.row.productionStatus }} {{ scope.row.productionStatus }}
</template> -->
<template slot-scope="scope">
<el-tag v-if="scope.row.productionStatus == '未开工'"></el-tag>
<el-tag type="success" v-else-if="scope.row.productionStatus == ''">已完工</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">

@ -0,0 +1,260 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
content="详情"/>
<div class="options">
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<jnpf-form-tip-item label="设备编码"
prop="deviceCode" >
<p>{{dataForm.deviceCode}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="设备名称"
prop="deviceName" >
<p>{{dataForm.deviceName}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="购入日期"
prop="buyTime" >
<p>{{dataForm.buyTime}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="所属部门"
prop="deviceDept" >
<p>{{dataForm.deviceDept}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="维修次数"
prop="repairsNum" >
<JnpfNumber v-model="dataForm.repairsNum"
placeholder="数字文本" disabled
:step="1" >
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="保养次数"
prop="unkeepNum" >
<JnpfNumber v-model="dataForm.unkeepNum"
placeholder="数字文本" disabled
:step="1" >
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>检修记录</h2>
</div>
<el-table :data="dataForm.tableField108" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="unkeepType" label="维保类型" >
<template slot-scope="scope">
<p>{{ scope.row.unkeepType}}</p>
</template>
</el-table-column>
<el-table-column prop="startTime" label="维保开始时间" >
<template slot-scope="scope">
<p>{{scope.row.startTime}}</p>
</template>
</el-table-column>
<el-table-column prop="endTime" label="维保结束时间" >
<template slot-scope="scope">
<p>{{scope.row.endTime}}</p>
</template>
</el-table-column>
<el-table-column prop="hours" label="总耗时" >
<template slot-scope="scope">
<JnpfNumber v-model="scope.row.hours"
placeholder="总耗时" disabled
:step="1" >
</JnpfNumber>
</template>
</el-table-column>
<el-table-column prop="unkeepDetails" label="维保详细内容" >
<template slot-scope="scope">
<p>{{scope.row.unkeepDetails}}</p>
</template>
</el-table-column>
<el-table-column prop="solution" label="解决办法" >
<template slot-scope="scope">
<p>{{scope.row.solution}}</p>
</template>
</el-table-column>
<el-table-column prop="unkeepMember" label="维保人员" >
<template slot-scope="scope">
<p>{{scope.row.unkeepMember}}</p>
</template>
</el-table-column>
<el-table-column prop="changePartName" label="更换零配件名称" >
<template slot-scope="scope">
<p>{{scope.row.changePartName}}</p>
</template>
</el-table-column>
<el-table-column prop="models" label="规格型号" >
<template slot-scope="scope">
<p>{{scope.row.models}}</p>
</template>
</el-table-column>
<el-table-column prop="changNum" label="更换数量" >
<template slot-scope="scope">
<JnpfNumber v-model="scope.row.changNum"
placeholder="更换数量" disabled
:step="1" >
</JnpfNumber>
</template>
</el-table-column>
<el-table-column prop="unkeepDeviceStatus" label="维保后设备状态" >
<template slot-scope="scope">
<p>{{ scope.row.unkeepDeviceStatus}}</p>
</template>
</el-table-column>
<el-table-column prop="leader" label="操作组长" >
<template slot-scope="scope">
<p>{{scope.row.leader}}</p>
</template>
</el-table-column>
<el-table-column prop="estimatedTime" label="预估下次维保时间" >
<template slot-scope="scope">
<p>{{scope.row.estimatedTime}}</p>
</template>
</el-table-column>
<el-table-column prop="remarks" label="备注" >
<template slot-scope="scope">
<p>{{scope.row.remarks}}</p>
</template>
</el-table-column>
</el-table>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" >
<jnpf-form-tip-item label="创建人"
prop="creatorUserId" >
<p>{{dataForm.creatorUserId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" >
<jnpf-form-tip-item label="创建时间"
prop="creatorTime" >
<p>{{dataForm.creatorTime}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" >
<jnpf-form-tip-item label="修改人"
prop="lastModifyUserId" >
<p>{{dataForm.lastModifyUserId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" >
<jnpf-form-tip-item label="修改时间"
prop="lastModifyTime" >
<p>{{dataForm.lastModifyTime}}</p>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { getConfigData } from '@/api/onlineDev/visualDev'
import jnpf from '@/utils/jnpf'
import Detail from '@/views/basic/dynamicModel/list/detail'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { Detail},
props: [],
data() {
return {
visible: false,
detailVisible: false,
loading: false,
dataForm: {
id :'',
deviceCode : '',
deviceName : '',
buyTime : '',
deviceDept : '',
repairsNum : 0,
unkeepNum : 0,
creatorUserId : '',
creatorTime : '',
lastModifyUserId : '',
lastModifyTime : '',
enabledStatus : "",
yysdeviceunkeeplogsList:[],
},
enabledStatusOptions:[{"fullName":"启用","id":"1"},{"fullName":"未启用","id":"2"}],
enabledStatusProps:{"label":"fullName","value":"id" },
unkeepTypeOptions:[{"fullName":"维修","id":"1"},{"fullName":"保养","id":"2"}],
unkeepTypeProps:{"label":"fullName","value":"id" },
unkeepDeviceStatusOptions:[{"fullName":"运行正常","id":"1"},{"fullName":"运行异常","id":"2"}],
unkeepDeviceStatusProps:{"label":"fullName","value":"id" },
}
},
computed: {},
watch: {},
created() {
},
mounted() {},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(formData, modelId, defaultValue)
})
})
},
dataInfo(dataAll){
let _dataAll =dataAll
this.dataForm = _dataAll
},
goBack() {
this.$emit('refresh')
},
init(id) {
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if(this.dataForm.id){
this.loading = true
request({
url: '/api/example/YysDeviceUpkeep/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
}
})
},
},
}
</script>

File diff suppressed because one or more lines are too long

@ -0,0 +1,840 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="设备编码" prop="deviceCode">
<JnpfInput v-model="dataForm.deviceCode" @change="changeData('deviceCode', -1)"
placeholder="设备编码" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="设备名称" prop="deviceName">
<JnpfInput v-model="dataForm.deviceName" @change="changeData('deviceName', -1)"
placeholder="设备名称" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="购入日期" prop="buyTime">
<JnpfDatePicker v-model="dataForm.buyTime" @change="changeData('buyTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="可选择购入日期" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="所属部门" prop="deviceDept">
<JnpfDepSelect v-model="dataForm.deviceDept" @change="changeData('deviceDept', -1)"
placeholder="请选择" selectType="all" :ableIds="ableAll.deviceDeptableIds" disabled
clearable :style='{ "width": "100%" }'>
</JnpfDepSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="维修次数" prop="repairsNum">
<JnpfInputNumber v-model="dataForm.repairsNum" @change="changeData('repairsNum', -1)"
placeholder="自动统计" disabled :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="保养次数" prop="unkeepNum">
<JnpfInputNumber v-model="dataForm.unkeepNum" @change="changeData('unkeepNum', -1)"
placeholder="自动统计" disabled :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">检修记录</span>
</div>
</el-col>
<el-table :data="dataForm.yysdeviceunkeeplogsList" size='small'>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="维保类型" prop="unkeepType" fixed="left" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>维保类型
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.unkeepType"
@change="changeData('yysdeviceunkeeplogs-unkeepType', scope.$index)"
placeholder="请选择维保类型" clearable :style='{ "width": "100%" }'
:options="yysdeviceunkeeplogsunkeepTypeOptions"
:props="yysdeviceunkeeplogsunkeepTypeProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="维保开始时间" prop="startTime" fixed="left" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>维保开始时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.startTime"
@change="changeData('yysdeviceunkeeplogs-startTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择维保开始时间"
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="维保结束时间" prop="endTime" fixed="left" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>维保结束时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.endTime"
@change="changeData('yysdeviceunkeeplogs-endTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择维保结束时间"
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="总耗时" prop="hours" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>总耗时
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.hours"
@change="changeData('yysdeviceunkeeplogs-hours', scope.$index)"
placeholder="总耗时" :precision="1" :step="1">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="维保详细内容" prop="unkeepDetails" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>维保详细内容
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.unkeepDetails"
@change="changeData('yysdeviceunkeeplogs-unkeepDetails', scope.$index)"
placeholder="请输入维保详细内容" :style='{ "width": "100%" }' true
type="textarea" :autosize='{ "minRows": 2, "maxRows": 2 }'>
</JnpfTextarea>
</template>
</el-table-column>
<el-table-column label="解决办法" prop="solution" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>解决办法
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.solution"
@change="changeData('yysdeviceunkeeplogs-solution', scope.$index)"
placeholder="请输入解决办法" :style='{ "width": "100%" }' true type="textarea"
:autosize='{ "minRows": 2, "maxRows": 2 }'>
</JnpfTextarea>
</template>
</el-table-column>
<el-table-column label="维保人员" prop="unkeepMember" width="200">
<template slot="header" v-if="true">
<span class="required-sign">*</span>维保人员
</template>
<template slot-scope="scope">
<JnpfUserSelect v-model="scope.row.unkeepMember"
@change="changeData('yysdeviceunkeeplogs-unkeepMember', scope.$index)"
placeholder="请选择维保人员" selectType="all"
:ableIds="ableAll.yysdeviceunkeeplogsunkeepMemberableIds" clearable
:style='{ "width": "100%" }' :multiple="true">
</JnpfUserSelect>
</template>
</el-table-column>
<el-table-column label="更换零配件名称" prop="changePartName" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>更换零配件名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.changePartName"
@change="changeData('yysdeviceunkeeplogs-changePartName', scope.$index)"
placeholder="请输入更换零配件名称" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格型号" prop="models" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>规格型号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.models"
@change="changeData('yysdeviceunkeeplogs-models', scope.$index)"
placeholder="请输入规格型号" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="更换数量" prop="changNum" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>更换数量
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.changNum"
@change="changeData('yysdeviceunkeeplogs-changNum', scope.$index)"
placeholder="更换数量" :step="1">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="维保后设备状态" prop="unkeepDeviceStatus" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>维保后设备状态
</template>
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.unkeepDeviceStatus"
@change="changeData('yysdeviceunkeeplogs-unkeepDeviceStatus', scope.$index)"
placeholder="请选择维保后设备状态" clearable :style='{ "width": "100%" }'
:options="yysdeviceunkeeplogsunkeepDeviceStatusOptions"
:props="yysdeviceunkeeplogsunkeepDeviceStatusProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="操作组长" prop="leader" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>操作组长
</template>
<template slot-scope="scope">
<JnpfUserSelect v-model="scope.row.leader"
@change="changeData('yysdeviceunkeeplogs-leader', scope.$index)"
placeholder="请选择操作组长" selectType="all"
:ableIds="ableAll.yysdeviceunkeeplogsleaderableIds" clearable
:style='{ "width": "100%" }'>
</JnpfUserSelect>
</template>
</el-table-column>
<el-table-column label="预估下次维保时间" prop="estimatedTime" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>预估下次维保时间
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.estimatedTime"
@change="changeData('yysdeviceunkeeplogs-estimatedTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="预估下次维保时间"
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="备注" prop="remarks" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>备注
</template>
<template slot-scope="scope">
<JnpfTextarea v-model="scope.row.remarks"
@change="changeData('yysdeviceunkeeplogs-remarks', scope.$index)"
placeholder="请输入备注" :style='{ "width": "100%" }' true type="textarea"
:autosize='{ "minRows": 4, "maxRows": 4 }'>
</JnpfTextarea>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delyysdeviceunkeeplogsList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addyysdeviceunkeeplogsList()">
<el-button type="text" icon="el-icon-plus">新增</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="创建人" prop="creatorUserId">
<JnpfInput v-model="dataForm.creatorUserId" @change="changeData('creatorUserId', -1)"
placeholder="自动生成" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="创建时间" prop="creatorTime">
<JnpfDatePicker v-model="dataForm.creatorTime" @change="changeData('creatorTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="自动生成" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="修改人" prop="lastModifyUserId">
<JnpfInput v-model="dataForm.lastModifyUserId"
@change="changeData('lastModifyUserId', -1)" placeholder="修改时记录" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="修改时间" prop="lastModifyTime">
<JnpfDatePicker v-model="dataForm.lastModifyTime"
@change="changeData('lastModifyTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="修改时记录" disabled clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
yysdeviceunkeeplogsList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
yysdeviceunkeeplogsList: {
unkeepTypeOptions: [],
startTime: '',
startTimeOptions: [],
endTime: '',
endTimeOptions: [],
hours: undefined,
hoursOptions: [],
unkeepDetails: '',
unkeepDetailsOptions: [],
solution: '',
solutionOptions: [],
unkeepMember: [],
unkeepMemberOptions: [],
changePartName: '',
changePartNameOptions: [],
models: '',
modelsOptions: [],
changNum: undefined,
changNumOptions: [],
unkeepDeviceStatusOptions: [],
leaderOptions: [],
estimatedTime: '',
estimatedTimeOptions: [],
remarks: '',
remarksOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
deviceCode: undefined,
deviceName: undefined,
buyTime: undefined,
deviceDept: undefined,
repairsNum: 0,
unkeepNum: 0,
creatorUserId: undefined,
creatorTime: undefined,
lastModifyUserId: undefined,
lastModifyTime: undefined,
enabledStatus: undefined,
yysdeviceunkeeplogsList: [],
version: 0,
},
tableRequiredData: {},
dataRule:
{
},
enabledStatusOptions: [{ "fullName": "启用", "id": "1" }, { "fullName": "未启用", "id": "2" }],
enabledStatusProps: { "label": "fullName", "value": "id" },
yysdeviceunkeeplogsunkeepTypeOptions: [{ "fullName": "维修", "id": "1" }, { "fullName": "保养", "id": "2" }],
yysdeviceunkeeplogsunkeepTypeProps: { "label": "fullName", "value": "id" },
yysdeviceunkeeplogsunkeepDeviceStatusOptions: [{ "fullName": "运行正常", "id": "1" }, { "fullName": "运行异常", "id": "2" }],
yysdeviceunkeeplogsunkeepDeviceStatusProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
deviceCode: [],
deviceName: [],
buyTime: [],
deviceDept: [],
repairsNum: [],
unkeepNum: [],
creatorUserId: [],
creatorTime: [],
lastModifyUserId: [],
lastModifyTime: [],
enabledStatus: [],
yysdeviceunkeeplogsunkeepType: [],
yysdeviceunkeeplogsstartTime: [],
yysdeviceunkeeplogsendTime: [],
yysdeviceunkeeplogshours: [],
yysdeviceunkeeplogsunkeepDetails: [],
yysdeviceunkeeplogssolution: [],
yysdeviceunkeeplogsunkeepMember: [],
yysdeviceunkeeplogschangePartName: [],
yysdeviceunkeeplogsmodels: [],
yysdeviceunkeeplogschangNum: [],
yysdeviceunkeeplogsunkeepDeviceStatus: [],
yysdeviceunkeeplogsleader: [],
yysdeviceunkeeplogsestimatedTime: [],
yysdeviceunkeeplogsremarks: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
prev() {
this.index--
if (this.index === 0) {
this.prevDis = true
}
this.nextDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
next() {
this.index++
if (this.index === this.allList.length - 1) {
this.nextDis = true
}
this.prevDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
getInfo(id) {
request({
url: '/api/example/YysDeviceUpkeep/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
},
goBack() {
this.visible = false
this.$emit('refreshDataList', true)
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
yysdeviceunkeeplogsExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.yysdeviceunkeeplogsList.length; i++) {
const e = this.dataForm.yysdeviceunkeeplogsList[i];
if (!e.unkeepType) {
this.$message({
message: '维保类型不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.startTime) {
this.$message({
message: '维保开始时间不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.endTime) {
this.$message({
message: '维保结束时间不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.hours) {
this.$message({
message: '总耗时不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.unkeepDetails) {
this.$message({
message: '维保详细内容不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.solution) {
this.$message({
message: '解决办法不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.unkeepMember.length) {
this.$message({
message: '维保人员不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
goBack() {
this.$emit('refresh')
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(id, isDetail, allList) {
this.prevDis = false
this.nextDis = false
this.allList = allList || []
if (allList.length) {
this.index = this.allList.findIndex(item => item.id === id)
if (this.index == 0) {
this.prevDis = true
}
if (this.index == this.allList.length - 1) {
this.nextDis = true
}
} else {
this.prevDis = true
this.nextDis = true
}
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/YysDeviceUpkeep/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData()
this.initDefaultData()
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
if (!this.yysdeviceunkeeplogsExist()) return
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
this.btnLoading = true
}
if (!this.dataForm.id) {
request({
url: '/api/example/YysDeviceUpkeep',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
} else {
request({
url: '/api/example/YysDeviceUpkeep/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}
},
addyysdeviceunkeeplogsList() {
let item = {
unkeepType: '',
startTime: undefined,
endTime: undefined,
hours: undefined,
unkeepDetails: '',
solution: undefined,
unkeepMember: [],
changePartName: undefined,
models: undefined,
changNum: undefined,
unkeepDeviceStatus: '',
leader: undefined,
estimatedTime: undefined,
remarks: undefined,
}
this.getyysdeviceunkeeplogsList(item)
},
delyysdeviceunkeeplogsList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.yysdeviceunkeeplogsList.splice(index, 1);
}).catch(() => {
});
},
getyysdeviceunkeeplogsList(value) {
let item = { ...this.tableRows.yysdeviceunkeeplogsList, ...value }
this.dataForm.yysdeviceunkeeplogsList.push(item)
this.childIndex = this.dataForm.yysdeviceunkeeplogsList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.yysdeviceunkeeplogsList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

@ -0,0 +1,456 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="设备名称">
<el-input v-model="query.deviceName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="所属部门">
<JnpfDepSelect selectType="all" v-model="query.deviceDept" placeholder="
" clearable multiple />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="启用状态">
<JnpfSelect v-model="query.enabledStatus" placeholder="请选择" clearable
:options="enabledStatusOptions" :props="enabledStatusProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod" border>
<el-table-column prop="deviceCode" label="设备编码" align="center">
</el-table-column>
<el-table-column prop="deviceName" label="设备名称" align="center">
</el-table-column>
<el-table-column prop="buyTime" label="购入日期" align="center">
</el-table-column>
<el-table-column prop="repairsNum" label="维修次数" align="center">
<template slot-scope="scope" >
<JnpfNumber v-model="scope.row.repairsNum" :thousands="false" />
</template>
</el-table-column>
<el-table-column prop="unkeepNum" label="保养次数" align="center">
<template slot-scope="scope" >
<JnpfNumber v-model="scope.row.unkeepNum" :thousands="false" />
</template>
</el-table-column>
<el-table-column prop="deviceDept" label="所属部门" align="center">
</el-table-column>
<el-table-column label="启用状态" prop="enabledStatus" align="center">
<!-- <template slot-scope="scope">
{{ scope.row.enabledStatus }}
</template> -->
<template slot-scope="scope">
<el-tag v-if="scope.row.enabledStatus == '启用'"></el-tag>
<el-tag type="success" v-else-if="scope.row.enabledStatus == ''">未启用</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './form'
import Detail from './Detail'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
JNPFForm,
Detail,
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
deviceName: undefined,
deviceDept: undefined,
enabledStatus: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
enabledStatusOptions: [{ "fullName": "启用", "id": "1" }, { "fullName": "未启用", "id": "2" }],
enabledStatusProps: { "label": "fullName", "value": "id" },
tableField108_unkeepTypeOptions: [{ "fullName": "维修", "id": "1" }, { "fullName": "保养", "id": "2" }],
tableField108_unkeepTypeProps: { "label": "fullName", "value": "id" },
tableField108_unkeepDeviceStatusOptions: [{ "fullName": "运行正常", "id": "1" }, { "fullName": "运行异常", "id": "2" }],
tableField108_unkeepDeviceStatusProps: { "label": "fullName", "value": "id" },
interfaceRes: {
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '590893609868337221',
type: 1,
};
request({
url: `/api/example/YysDeviceUpkeep/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/example/YysDeviceUpkeep/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "example/YysDeviceUpkeep")
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, isDetail) {
let id = row ? row.id : ""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail, this.list)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/example/YysDeviceUpkeep/Actions/Export`,
method: 'post',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -127,8 +127,12 @@
<el-table-column prop="reportMember" label="报工成员" align="center"> <el-table-column prop="reportMember" label="报工成员" align="center">
</el-table-column> </el-table-column>
<el-table-column label="确认状态" prop="status" align="center"> <el-table-column label="确认状态" prop="status" align="center">
<template slot-scope="scope"> <!-- <template slot-scope="scope">
{{ scope.row.status }} {{ scope.row.status }}
</template> -->
<template slot-scope="scope">
<el-tag v-if="scope.row.status == '待确认'"></el-tag>
<el-tag type="success" v-else-if="scope.row.status == ''">已确认</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="50"> <el-table-column label="操作" fixed="right" width="50">

Loading…
Cancel
Save